Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/node.h
- This file was moved from src/interface/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_INTERFACE_NODE_H | #ifndef BITCOIN_INTERFACES_NODE_H | ||||
#define BITCOIN_INTERFACE_NODE_H | #define BITCOIN_INTERFACES_NODE_H | ||||
#include <netaddress.h> // For Network | #include <netaddress.h> // For Network | ||||
#include <functional> | #include <functional> | ||||
#include <memory> | #include <memory> | ||||
#include <string> | #include <string> | ||||
class Config; | class Config; | ||||
class HTTPRPCRequestProcessor; | class HTTPRPCRequestProcessor; | ||||
class proxyType; | class proxyType; | ||||
class RPCServer; | class RPCServer; | ||||
namespace interface { | namespace interfaces { | ||||
class Handler; | class Handler; | ||||
//! Top-level interface for a bitcoin node (bitcoind process). | //! Top-level interface for a bitcoin node (bitcoind process). | ||||
class Node { | class Node { | ||||
public: | public: | ||||
virtual ~Node() {} | virtual ~Node() {} | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | using QuestionFn = std::function<bool( | ||||
const std::string &message, const std::string &non_interactive_message, | const std::string &message, const std::string &non_interactive_message, | ||||
const std::string &caption, unsigned int style)>; | const std::string &caption, unsigned int style)>; | ||||
virtual std::unique_ptr<Handler> handleQuestion(QuestionFn fn) = 0; | virtual std::unique_ptr<Handler> handleQuestion(QuestionFn fn) = 0; | ||||
}; | }; | ||||
//! Return implementation of Node interface. | //! Return implementation of Node interface. | ||||
std::unique_ptr<Node> MakeNode(); | std::unique_ptr<Node> MakeNode(); | ||||
} // namespace interface | } // namespace interfaces | ||||
#endif // BITCOIN_INTERFACE_NODE_H | #endif // BITCOIN_INTERFACES_NODE_H |