mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,54 @@
|
||||
|
||||
class RPCServer : public boost::enable_shared_from_this<RPCServer>
|
||||
{
|
||||
public:
|
||||
enum {
|
||||
rpcSUCCESS,
|
||||
|
||||
// Networking
|
||||
rpcNO_NETWORK,
|
||||
rpcNO_CLOSED,
|
||||
rpcNO_CURRENT,
|
||||
|
||||
// Ledger state
|
||||
rpcINSUF_FUNDS,
|
||||
rpcPASSWD_CHANGED,
|
||||
rpcSRC_MISSING,
|
||||
rpcSRC_UNCLAIMED,
|
||||
rpcWRONG_SEED,
|
||||
rpcNICKNAME_MISSING,
|
||||
|
||||
// Malformed command
|
||||
rpcINVALID_PARAMS,
|
||||
rpcUNKNOWN_COMMAND,
|
||||
|
||||
// Bad paramater
|
||||
rpcBAD_SEED,
|
||||
rpcSRC_ACT_MALFORMED,
|
||||
rpcDST_ACT_MALFORMED,
|
||||
rpcPUBLIC_MALFORMED,
|
||||
rpcHOST_IP_MALFORMED,
|
||||
rpcSRC_AMT_MALFORMED,
|
||||
rpcDST_AMT_MALFORMED,
|
||||
rpcNICKNAME_MALFORMED,
|
||||
rpcNICKNAME_PERM,
|
||||
|
||||
// Internal error (should never happen)
|
||||
rpcINTERNAL, // Generic internal error.
|
||||
rpcNO_GEN_DECRPYT,
|
||||
rpcNOT_IMPL,
|
||||
};
|
||||
|
||||
Json::Value RPCError(int iError);
|
||||
|
||||
private:
|
||||
typedef Json::Value (RPCServer::*doFuncPtr)(Json::Value ¶ms);
|
||||
enum {
|
||||
optNetwork = 1, // Need network
|
||||
optCurrent = 2+optNetwork, // Need current ledger
|
||||
optClosed = 4+optNetwork, // Need closed ledger
|
||||
};
|
||||
|
||||
NetworkOPs* mNetOps;
|
||||
|
||||
boost::asio::ip::tcp::socket mSocket;
|
||||
@@ -52,6 +99,7 @@ private:
|
||||
Json::Value doAccountInfo(Json::Value& params);
|
||||
Json::Value doAccountLines(Json::Value ¶ms);
|
||||
Json::Value doAccountMessageSet(Json::Value ¶ms);
|
||||
Json::Value doAccountTransactions(Json::Value& params);
|
||||
Json::Value doAccountWalletSet(Json::Value ¶ms);
|
||||
Json::Value doConnect(Json::Value& params);
|
||||
Json::Value doCreditSet(Json::Value& params);
|
||||
@@ -91,8 +139,6 @@ private:
|
||||
Json::Value doWalletUnlock(Json::Value& params);
|
||||
Json::Value doWalletVerify(Json::Value& params);
|
||||
|
||||
Json::Value doAccountTransactions(Json::Value& params);
|
||||
|
||||
void validatorsResponse(const boost::system::error_code& err, std::string strResponse);
|
||||
|
||||
public:
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
#include "types.h"
|
||||
|
||||
#define nothing() do {} while (0)
|
||||
#define fallthru() do {} while (0)
|
||||
#define fallthru() do {} while (0)
|
||||
#define NUMBER(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(x,y) ((x) < (y) ? (y) : (x))
|
||||
|
||||
Reference in New Issue
Block a user