Begin moving CLI parsing to CallRPC.

This commit is contained in:
Arthur Britto
2012-12-01 18:01:59 -08:00
parent d0e30b29d8
commit 8ffea0530a
2 changed files with 170 additions and 42 deletions

View File

@@ -1,7 +1,25 @@
#ifndef __CALLRPC__
#define __CALLRPC__
#include <string>
#include "../json/value.h"
class RPCParser
{
protected:
typedef Json::Value (RPCParser::*parseFuncPtr)(Json::Value jvRet, const Json::Value &jvParams);
Json::Value parseAsIs(Json::Value jvRet, const Json::Value &jvParams);
public:
Json::Value parseCommand(Json::Value jvRequest);
};
extern int commandLineRPC(const std::vector<std::string>& vCmd);
extern Json::Value callRPC(const std::string& strMethod, const Json::Value& params);
#endif
// vim:ts=4