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 <consensus/amount.h> | #include <consensus/amount.h> // For Amount | ||||
#include <net.h> // For CConnman::NumConnections | #include <net.h> // For CConnman::NumConnections | ||||
#include <net_types.h> // For banmap_t | #include <net_types.h> // For banmap_t | ||||
#include <netaddress.h> // For Network | #include <netaddress.h> // For Network | ||||
#include <support/allocators/secure.h> // For SecureString | #include <support/allocators/secure.h> // For SecureString | ||||
#include <util/settings.h> // For util::SettingsValue | |||||
#include <util/translation.h> | #include <util/translation.h> | ||||
#include <cstddef> | #include <cstddef> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <functional> | #include <functional> | ||||
#include <memory> | #include <memory> | ||||
#include <string> | #include <string> | ||||
#include <tuple> | #include <tuple> | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | public: | ||||
virtual void appShutdown() = 0; | virtual void appShutdown() = 0; | ||||
//! Start shutdown. | //! Start shutdown. | ||||
virtual void startShutdown() = 0; | virtual void startShutdown() = 0; | ||||
//! Return whether shutdown was requested. | //! Return whether shutdown was requested. | ||||
virtual bool shutdownRequested() = 0; | virtual bool shutdownRequested() = 0; | ||||
//! Return whether a particular setting in <datadir>/settings.json is or | |||||
//! would be ignored because it is also specified in the command line. | |||||
virtual bool isSettingIgnored(const std::string &name) = 0; | |||||
//! Return setting value from <datadir>/settings.json or bitcoin.conf. | |||||
virtual util::SettingsValue | |||||
getPersistentSetting(const std::string &name) = 0; | |||||
//! Update a setting in <datadir>/settings.json. | |||||
virtual void updateRwSetting(const std::string &name, | |||||
const util::SettingsValue &value) = 0; | |||||
//! Force a setting value to be applied, overriding any other configuration | |||||
//! source, but not being persisted. | |||||
virtual void forceSetting(const std::string &name, | |||||
const util::SettingsValue &value) = 0; | |||||
//! Map port. | //! Map port. | ||||
virtual void mapPort(bool use_upnp, bool use_natpmp) = 0; | virtual void mapPort(bool use_upnp, bool use_natpmp) = 0; | ||||
//! Get proxy. | //! Get proxy. | ||||
virtual bool getProxy(Network net, proxyType &proxy_info) = 0; | virtual bool getProxy(Network net, proxyType &proxy_info) = 0; | ||||
//! Get number of connections. | //! Get number of connections. | ||||
virtual size_t getNodeCount(CConnman::NumConnections flags) = 0; | virtual size_t getNodeCount(CConnman::NumConnections flags) = 0; | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |