Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/register.h
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_RPC_REGISTER_H | #ifndef BITCOIN_RPC_REGISTER_H | ||||
#define BITCOIN_RPC_REGISTER_H | #define BITCOIN_RPC_REGISTER_H | ||||
/** These are in one header file to avoid creating tons of single-function | /** | ||||
* headers for everything under src/rpc/ */ | * These are in one header file to avoid creating tons of single-function | ||||
* headers for everything under src/rpc/ | |||||
*/ | |||||
class CRPCTable; | class CRPCTable; | ||||
class RPCServer; | class RPCServer; | ||||
/** Register block chain RPC commands */ | /** Register block chain RPC commands */ | ||||
void RegisterBlockchainRPCCommands(CRPCTable &tableRPC); | void RegisterBlockchainRPCCommands(CRPCTable &tableRPC); | ||||
/** Register P2P networking RPC commands */ | /** Register P2P networking RPC commands */ | ||||
void RegisterNetRPCCommands(CRPCTable &tableRPC); | void RegisterNetRPCCommands(CRPCTable &tableRPC); | ||||
/** Register miscellaneous RPC commands */ | /** Register miscellaneous RPC commands */ | ||||
void RegisterMiscRPCCommands(CRPCTable &tableRPC); | void RegisterMiscRPCCommands(CRPCTable &tableRPC); | ||||
/** Register mining RPC commands */ | /** Register mining RPC commands */ | ||||
void RegisterMiningRPCCommands(CRPCTable &tableRPC); | void RegisterMiningRPCCommands(CRPCTable &tableRPC); | ||||
/** Register raw transaction RPC commands */ | /** Register raw transaction RPC commands */ | ||||
void RegisterRawTransactionRPCCommands(CRPCTable &tableRPC); | void RegisterRawTransactionRPCCommands(CRPCTable &tableRPC); | ||||
/** Register ABC RPC commands */ | /** Register ABC RPC commands */ | ||||
void RegisterABCRPCCommands(CRPCTable &tableRPC); | void RegisterABCRPCCommands(CRPCTable &tableRPC); | ||||
/** Register Avalanche RPC commands */ | /** Register Avalanche RPC commands */ | ||||
void RegisterAvalancheRPCCommands(CRPCTable &tableRPC); | void RegisterAvalancheRPCCommands(CRPCTable &tableRPC); | ||||
/** | static inline void RegisterAllCoreRPCCommands(CRPCTable &t) { | ||||
* Register all context-free (legacy) RPC commands, except for wallet and dump | |||||
* RPC commands. | |||||
*/ | |||||
static inline void RegisterAllContextFreeRPCCommands(CRPCTable &t) { | |||||
RegisterBlockchainRPCCommands(t); | RegisterBlockchainRPCCommands(t); | ||||
RegisterNetRPCCommands(t); | RegisterNetRPCCommands(t); | ||||
RegisterMiscRPCCommands(t); | RegisterMiscRPCCommands(t); | ||||
RegisterMiningRPCCommands(t); | RegisterMiningRPCCommands(t); | ||||
RegisterRawTransactionRPCCommands(t); | RegisterRawTransactionRPCCommands(t); | ||||
RegisterABCRPCCommands(t); | RegisterABCRPCCommands(t); | ||||
RegisterAvalancheRPCCommands(t); | RegisterAvalancheRPCCommands(t); | ||||
} | } | ||||
/** | /** | ||||
* Register all context-sensitive RPC commands. | * Register all context-sensitive RPC commands. | ||||
*/ | */ | ||||
static inline void RegisterAllRPCCommands(const Config &config, | static inline void RegisterAllRPCCommands(const Config &config, | ||||
RPCServer &rpcServer, | RPCServer &rpcServer, | ||||
CRPCTable &rpcTable) { | CRPCTable &rpcTable) { | ||||
// TODO Register context-sensitive RPC commands using rpcServer | // TODO Register context-sensitive RPC commands using rpcServer | ||||
RegisterAllContextFreeRPCCommands(rpcTable); | RegisterAllCoreRPCCommands(rpcTable); | ||||
} | } | ||||
#endif // BITCOIN_RPC_REGISTER_H | #endif // BITCOIN_RPC_REGISTER_H |