Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/node.h
// Copyright (c) 2018 The Bitcoin Core developers | // Copyright (c) 2018 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_INTERFACES_NODE_H | #ifndef BITCOIN_INTERFACES_NODE_H | ||||
#define BITCOIN_INTERFACES_NODE_H | #define BITCOIN_INTERFACES_NODE_H | ||||
#include <addrdb.h> // For banmap_t | #include <addrdb.h> // For banmap_t | ||||
#include <amount.h> // For Amount | |||||
#include <init.h> // For HelpMessageMode | #include <init.h> // For HelpMessageMode | ||||
#include <net.h> // For CConnman::NumConnections | #include <net.h> // For CConnman::NumConnections | ||||
#include <netaddress.h> // For Network | #include <netaddress.h> // For Network | ||||
#include <cstddef> | #include <cstddef> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <functional> | #include <functional> | ||||
#include <memory> | #include <memory> | ||||
▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | public: | ||||
virtual bool getImporting() = 0; | virtual bool getImporting() = 0; | ||||
//! Set network active. | //! Set network active. | ||||
virtual void setNetworkActive(bool active) = 0; | virtual void setNetworkActive(bool active) = 0; | ||||
//! Get network active. | //! Get network active. | ||||
virtual bool getNetworkActive() = 0; | virtual bool getNetworkActive() = 0; | ||||
//! Get max tx fee. | |||||
virtual Amount getMaxTxFee() = 0; | |||||
//! Execute rpc command. | //! Execute rpc command. | ||||
virtual UniValue executeRpc(Config &config, const std::string &command, | virtual UniValue executeRpc(Config &config, const std::string &command, | ||||
const UniValue ¶ms, | const UniValue ¶ms, | ||||
const std::string &uri) = 0; | const std::string &uri) = 0; | ||||
//! List rpc commands. | //! List rpc commands. | ||||
virtual std::vector<std::string> listRpcCommands() = 0; | virtual std::vector<std::string> listRpcCommands() = 0; | ||||
//! Set RPC timer interface if unset. | //! Set RPC timer interface if unset. | ||||
virtual void rpcSetTimerInterfaceIfUnset(RPCTimerInterface *iface) = 0; | virtual void rpcSetTimerInterfaceIfUnset(RPCTimerInterface *iface) = 0; | ||||
//! Unset RPC timer interface. | //! Unset RPC timer interface. | ||||
virtual void rpcUnsetTimerInterface(RPCTimerInterface *iface) = 0; | virtual void rpcUnsetTimerInterface(RPCTimerInterface *iface) = 0; | ||||
//! Return interfaces for accessing wallets (if any). | |||||
virtual std::vector<std::unique_ptr<Wallet>> getWallets() = 0; | |||||
//! Register handler for init messages. | //! Register handler for init messages. | ||||
using InitMessageFn = std::function<void(const std::string &message)>; | using InitMessageFn = std::function<void(const std::string &message)>; | ||||
virtual std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) = 0; | virtual std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) = 0; | ||||
//! Register handler for message box messages. | //! Register handler for message box messages. | ||||
using MessageBoxFn = | using MessageBoxFn = | ||||
std::function<bool(const std::string &message, | std::function<bool(const std::string &message, | ||||
const std::string &caption, unsigned int style)>; | const std::string &caption, unsigned int style)>; | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |