Fabcoin Core  0.16.2
P2P Digital Currency
execrpccommand.h
Go to the documentation of this file.
1 #ifndef EXECRPCCOMMAND_H
2 #define EXECRPCCOMMAND_H
3 
4 #include <QObject>
5 #include <QString>
6 #include <QStringList>
7 #include <QVariant>
8 
12 class ExecRPCCommand : public QObject
13 {
14 public:
23  explicit ExecRPCCommand(const QString& command, const QStringList& mandatory, const QStringList& optional, const QMap<QString, QString>& translations, QObject *parent = 0);
24 
33  bool exec(const QMap<QString, QString>& params, QVariant& result, QString& resultJson, QString& errorMessage);
34 
41  static void appendParam(QMap<QString, QString>& params, const QString& paramName, const QString& paramValue);
42 
43 private:
44  QString m_command;
45  QStringList m_mandatoryParams;
46  QStringList m_optionalParams;
47  QMap<QString, QString> m_translations;
48 };
49 
50 #endif // EXECRPCCOMMAND_H
ExecRPCCommand(const QString &command, const QStringList &mandatory, const QStringList &optional, const QMap< QString, QString > &translations, QObject *parent=0)
ExecRPCCommand Constructor.
bool exec(const QMap< QString, QString > &params, QVariant &result, QString &resultJson, QString &errorMessage)
exec Execute the RPC command
QMap< QString, QString > m_translations
The ExecRPCCommand class Execution of RPC command line.
static void appendParam(QMap< QString, QString > &params, const QString &paramName, const QString &paramValue)
appendParam Append paramether to the list
QStringList m_mandatoryParams
QStringList m_optionalParams