Project

General

Profile

Feature #516

Verify command request in RemoteCommand::exec

Added by David Demelier over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
irccd
Target version:
Start date:
06/09/2016
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:
MFD after:
MFD revision:
Branch:
default
Bookmark:
@
Platform:

Description

The idea is to verify that the request has required properties of a given type. This makes it easier to write safe commands.

Example:

RemoteCommand::Properties MySuperCommand::properties() const
{
    /*
     * 0: property name
     * 1: list of types requested
     */
    return {
        { "prop1", { json::value_t::string, json::value_t::int } }
    }
}

And in exec(), check that properties are not missing.

History

#1

Updated by David Demelier over 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
#2

Updated by David Demelier over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF