PIVX Core  5.6.99
P2P Digital Currency
Public Types | Public Slots | Signals | Static Public Member Functions | Private Member Functions | List of all members
RPCExecutor Class Reference

#include <rpcexecutor.h>

Inheritance diagram for RPCExecutor:
[legend]
Collaboration diagram for RPCExecutor:
[legend]

Public Types

enum  CommandClass { CMD_REQUEST , CMD_REPLY , CMD_ERROR }
 

Public Slots

void request (const QString &command)
 

Signals

void reply (int category, const QString &command)
 

Static Public Member Functions

static QString categoryClass (int category)
 

Private Member Functions

bool ExecuteCommandLine (std::string &strResult, const std::string &strCommand)
 Split shell command line into a list of arguments and execute the command(s). More...
 

Detailed Description

Definition at line 18 of file rpcexecutor.h.

Member Enumeration Documentation

◆ CommandClass

Enumerator
CMD_REQUEST 
CMD_REPLY 
CMD_ERROR 

Definition at line 22 of file rpcexecutor.h.

Member Function Documentation

◆ categoryClass()

QString RPCExecutor::categoryClass ( int  category)
static

Definition at line 18 of file rpcexecutor.cpp.

Here is the caller graph for this function:

◆ ExecuteCommandLine()

bool RPCExecutor::ExecuteCommandLine ( std::string &  strResult,
const std::string &  strCommand 
)
private

Split shell command line into a list of arguments and execute the command(s).

Aims to emulate bash and friends.

  • Command nesting is possible with brackets [example: validateaddress(getnewaddress())]
  • Arguments are delimited with whitespace or comma
  • Extra whitespace at the beginning and end and between arguments will be ignored
  • Text can be "double" or 'single' quoted
  • The backslash \ is used as escape character
    • Outside quotes, any character can be escaped
    • Within double quotes, only escape " and backslashes before a \c " or another backslash
    • Within single quotes, no escaping is possible and no special interpretation takes place
Parameters
[out]resultstringified Result from the executed command(chain)
[in]strCommandCommand line to split

Definition at line 107 of file rpcexecutor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reply

void RPCExecutor::reply ( int  category,
const QString &  command 
)
signal
Here is the caller graph for this function:

◆ request

void RPCExecutor::request ( const QString &  command)
slot

Definition at line 35 of file rpcexecutor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: