Bitcoin Core  0.19.99
P2P Digital Currency
Classes | Namespaces | Typedefs | Functions | Variables
server.h File Reference
#include <amount.h>
#include <rpc/request.h>
#include <map>
#include <stdint.h>
#include <string>
#include <functional>
#include <univalue.h>
Include dependency graph for server.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RPCTimerBase
 Opaque base class for timers returned by NewTimerFunc. More...
 
class  RPCTimerInterface
 RPC timer "driver". More...
 
class  CRPCCommand
 
class  CRPCTable
 Bitcoin RPC command dispatcher. More...
 

Namespaces

 RPCServer
 

Typedefs

typedef UniValue(* rpcfn_type) (const JSONRPCRequest &jsonRequest)
 

Functions

void RPCServer::OnStarted (std::function< void()> slot)
 
void RPCServer::OnStopped (std::function< void()> slot)
 
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)
 
void RPCSetTimerInterface (RPCTimerInterface *iface)
 Set the factory function for timers. More...
 
void RPCSetTimerInterfaceIfUnset (RPCTimerInterface *iface)
 Set the factory function for timer, but only, if unset. More...
 
void RPCUnsetTimerInterface (RPCTimerInterface *iface)
 Unset factory function for timers. More...
 
void RPCRunLater (const std::string &name, std::function< void()> func, int64_t nSeconds)
 Run func nSeconds from now. More...
 
bool IsDeprecatedRPCEnabled (const std::string &method)
 
void StartRPC ()
 
void InterruptRPC ()
 
void StopRPC ()
 
std::string JSONRPCExecBatch (const JSONRPCRequest &jreq, const UniValue &vReq)
 
int RPCSerializationFlags ()
 

Variables

static const unsigned int DEFAULT_RPC_SERIALIZE_VERSION = 1
 
CRPCTable tableRPC
 

Typedef Documentation

◆ rpcfn_type

typedef UniValue(* rpcfn_type) (const JSONRPCRequest &jsonRequest)

Definition at line 84 of file server.h.

Function Documentation

◆ InterruptRPC()

void InterruptRPC ( )

Definition at line 288 of file server.cpp.

Here is the caller graph for this function:

◆ IsDeprecatedRPCEnabled()

bool IsDeprecatedRPCEnabled ( const std::string &  method)

Definition at line 329 of file server.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsRPCRunning()

bool IsRPCRunning ( )

Query whether RPC is running.

Definition at line 303 of file server.cpp.

Here is the caller graph for this function:

◆ JSONRPCExecBatch()

std::string JSONRPCExecBatch ( const JSONRPCRequest jreq,
const UniValue vReq 
)

Definition at line 359 of file server.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RPCIsInWarmup()

bool RPCIsInWarmup ( std::string *  outStatus)

Definition at line 321 of file server.cpp.

Here is the caller graph for this function:

◆ RPCRunLater()

void RPCRunLater ( const std::string &  name,
std::function< void()>  func,
int64_t  nSeconds 
)

Run func nSeconds from now.

Overrides previous timer <name> (if any).

Definition at line 482 of file server.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RPCSerializationFlags()

int RPCSerializationFlags ( )

Definition at line 491 of file server.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RPCSetTimerInterface()

void RPCSetTimerInterface ( RPCTimerInterface iface)

Set the factory function for timers.

Definition at line 471 of file server.cpp.

Here is the caller graph for this function:

◆ RPCSetTimerInterfaceIfUnset()

void RPCSetTimerInterfaceIfUnset ( RPCTimerInterface iface)

Set the factory function for timer, but only, if unset.

Definition at line 465 of file server.cpp.

Here is the caller graph for this function:

◆ RPCUnsetTimerInterface()

void RPCUnsetTimerInterface ( RPCTimerInterface iface)

Unset factory function for timers.

Definition at line 476 of file server.cpp.

Here is the caller graph for this function:

◆ SetRPCWarmupFinished()

void SetRPCWarmupFinished ( )

Definition at line 314 of file server.cpp.

Here is the caller graph for this function:

◆ SetRPCWarmupStatus()

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 308 of file server.cpp.

Here is the caller graph for this function:

◆ StartRPC()

void StartRPC ( )

Definition at line 281 of file server.cpp.

Here is the caller graph for this function:

◆ StopRPC()

void StopRPC ( )

Definition at line 295 of file server.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ DEFAULT_RPC_SERIALIZE_VERSION

const unsigned int DEFAULT_RPC_SERIALIZE_VERSION = 1
static

Definition at line 19 of file server.h.

◆ tableRPC

CRPCTable tableRPC

Definition at line 499 of file server.cpp.