Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <rpc/server.h>
#include <base58.h>
#include <fs.h>
#include <init.h>
#include <random.h>
#include <sync.h>
#include <ui_interface.h>
#include <util.h>
#include <utilstrencodings.h>
#include <univalue.h>
#include <boost/bind.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <memory>
#include <unordered_map>
Go to the source code of this file.
Classes | |
struct | CRPCSignals |
Functions | |
void | RPCTypeCheck (const UniValue ¶ms, const std::list< UniValue::VType > &typesExpected, bool fAllowNull) |
Type-check arguments; throws JSONRPCError if wrong type given. More... | |
void | RPCTypeCheckArgument (const UniValue &value, UniValue::VType typeExpected) |
Type-check one argument; throws JSONRPCError if wrong type given. More... | |
void | RPCTypeCheckObj (const UniValue &o, const std::map< std::string, UniValueType > &typesExpected, bool fAllowNull, bool fStrict) |
CAmount | AmountFromValue (const UniValue &value) |
uint256 | ParseHashV (const UniValue &v, std::string strName) |
Utilities: convert hex-encoded Values (throws error if not hex). More... | |
uint256 | ParseHashO (const UniValue &o, std::string strKey) |
std::vector< unsigned char > | ParseHexV (const UniValue &v, std::string strName) |
std::vector< unsigned char > | ParseHexO (const UniValue &o, std::string strKey) |
UniValue | help (const JSONRPCRequest &jsonRequest) |
UniValue | stop (const JSONRPCRequest &jsonRequest) |
UniValue | uptime (const JSONRPCRequest &jsonRequest) |
bool | StartRPC () |
void | InterruptRPC () |
void | StopRPC () |
bool | IsRPCRunning () |
Query whether RPC is running. More... | |
void | SetRPCWarmupStatus (const std::string &newStatus) |
Set the RPC warmup status. More... | |
void | SetRPCWarmupFinished () |
bool | RPCIsInWarmup (std::string *outStatus) |
std::string | JSONRPCExecBatch (const UniValue &vReq) |
std::string | HelpExampleCli (const std::string &methodname, const std::string &args) |
std::string | HelpExampleRpc (const std::string &methodname, const std::string &args) |
void | RPCSetTimerInterfaceIfUnset (RPCTimerInterface *iface) |
Set the factory function for timer, but only, if unset. More... | |
void | RPCSetTimerInterface (RPCTimerInterface *iface) |
Set the factory function for timers. More... | |
void | RPCUnsetTimerInterface (RPCTimerInterface *iface) |
Unset factory function for timers. More... | |
void | RPCRunLater (const std::string &name, std::function< void(void)> func, int64_t nSeconds) |
Run func nSeconds from now. More... | |
int | RPCSerializationFlags () |
Variables | |
CRPCTable | tableRPC |
Definition at line 114 of file server.cpp.
UniValue help | ( | const JSONRPCRequest & | jsonRequest | ) |
Definition at line 217 of file server.cpp.
std::string HelpExampleCli | ( | const std::string & | methodname, |
const std::string & | args | ||
) |
Definition at line 554 of file server.cpp.
std::string HelpExampleRpc | ( | const std::string & | methodname, |
const std::string & | args | ||
) |
Definition at line 559 of file server.cpp.
void InterruptRPC | ( | ) |
bool IsRPCRunning | ( | ) |
Query whether RPC is running.
Definition at line 335 of file server.cpp.
std::string JSONRPCExecBatch | ( | const UniValue & | vReq | ) |
Definition at line 139 of file server.cpp.
Utilities: convert hex-encoded Values (throws error if not hex).
Definition at line 126 of file server.cpp.
std::vector<unsigned char> ParseHexO | ( | const UniValue & | o, |
std::string | strKey | ||
) |
Definition at line 152 of file server.cpp.
std::vector<unsigned char> ParseHexV | ( | const UniValue & | v, |
std::string | strName | ||
) |
Definition at line 143 of file server.cpp.
bool RPCIsInWarmup | ( | std::string * | outStatus | ) |
void RPCRunLater | ( | const std::string & | name, |
std::function< void(void)> | func, | ||
int64_t | nSeconds | ||
) |
Run func nSeconds from now.
Overrides previous timer <name> (if any).
Definition at line 582 of file server.cpp.
int RPCSerializationFlags | ( | ) |
Definition at line 591 of file server.cpp.
void RPCSetTimerInterface | ( | RPCTimerInterface * | iface | ) |
Set the factory function for timers.
Definition at line 571 of file server.cpp.
void RPCSetTimerInterfaceIfUnset | ( | RPCTimerInterface * | iface | ) |
Set the factory function for timer, but only, if unset.
Definition at line 565 of file server.cpp.
void RPCTypeCheck | ( | const UniValue & | params, |
const std::list< UniValue::VType > & | typesExpected, | ||
bool | fAllowNull = false |
||
) |
Type-check arguments; throws JSONRPCError if wrong type given.
Does not check that the right number of arguments are passed, just that any passed are the correct type.
Definition at line 59 of file server.cpp.
void RPCTypeCheckArgument | ( | const UniValue & | value, |
UniValue::VType | typeExpected | ||
) |
Type-check one argument; throws JSONRPCError if wrong type given.
Definition at line 77 of file server.cpp.
void RPCTypeCheckObj | ( | const UniValue & | o, |
const std::map< std::string, UniValueType > & | typesExpected, | ||
bool | fAllowNull, | ||
bool | fStrict | ||
) |
Definition at line 84 of file server.cpp.
void RPCUnsetTimerInterface | ( | RPCTimerInterface * | iface | ) |
Unset factory function for timers.
Definition at line 576 of file server.cpp.
void SetRPCWarmupFinished | ( | ) |
Definition at line 346 of file server.cpp.
void SetRPCWarmupStatus | ( | const std::string & | newStatus | ) |
Set the RPC warmup status.
When this is done, all RPC calls will error out immediately with RPC_IN_WARMUP.
Definition at line 340 of file server.cpp.
bool StartRPC | ( | ) |
UniValue stop | ( | const JSONRPCRequest & | jsonRequest | ) |
Definition at line 237 of file server.cpp.
void StopRPC | ( | ) |
Definition at line 327 of file server.cpp.
UniValue uptime | ( | const JSONRPCRequest & | jsonRequest | ) |
CRPCTable tableRPC |
Definition at line 599 of file server.cpp.