Bitcoin Core
28.99.0
P2P Digital Currency
src
interfaces
init.h
Go to the documentation of this file.
1
// Copyright (c) 2021-2022 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_INTERFACES_INIT_H
6
#define BITCOIN_INTERFACES_INIT_H
7
8
#include <
interfaces/chain.h
>
9
#include <
interfaces/echo.h
>
10
#include <
interfaces/mining.h
>
11
#include <
interfaces/node.h
>
12
#include <
interfaces/wallet.h
>
13
14
#include <memory>
15
16
namespace
node
{
17
struct
NodeContext;
18
}
// namespace node
19
20
namespace
interfaces
{
21
class
Ipc;
22
30
class
Init
31
{
32
public
:
33
virtual
~Init
() =
default
;
34
virtual
std::unique_ptr<Node>
makeNode
() {
return
nullptr
; }
35
virtual
std::unique_ptr<Chain>
makeChain
() {
return
nullptr
; }
36
virtual
std::unique_ptr<Mining>
makeMining
() {
return
nullptr
; }
37
virtual
std::unique_ptr<WalletLoader>
makeWalletLoader
(
Chain
& chain) {
return
nullptr
; }
38
virtual
std::unique_ptr<Echo>
makeEcho
() {
return
nullptr
; }
39
virtual
Ipc
*
ipc
() {
return
nullptr
; }
40
virtual
bool
canListenIpc
() {
return
false
; }
41
};
42
49
std::unique_ptr<Init>
MakeNodeInit
(
node::NodeContext
&
node
,
int
argc,
char
* argv[],
int
&
exit_status
);
50
52
std::unique_ptr<Init>
MakeWalletInit
(
int
argc,
char
* argv[],
int
&
exit_status
);
53
55
std::unique_ptr<Init>
MakeGuiInit
(
int
argc,
char
* argv[]);
56
}
// namespace interfaces
57
58
#endif
// BITCOIN_INTERFACES_INIT_H
exit_status
int exit_status
Definition:
bitcoin-wallet.cpp:107
interfaces::Chain
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition:
chain.h:129
interfaces::Init
Initial interface created when a process is first started, and used to give and get access to other i...
Definition:
init.h:31
interfaces::Init::makeEcho
virtual std::unique_ptr< Echo > makeEcho()
Definition:
init.h:38
interfaces::Init::ipc
virtual Ipc * ipc()
Definition:
init.h:39
interfaces::Init::makeChain
virtual std::unique_ptr< Chain > makeChain()
Definition:
init.h:35
interfaces::Init::canListenIpc
virtual bool canListenIpc()
Definition:
init.h:40
interfaces::Init::~Init
virtual ~Init()=default
interfaces::Init::makeNode
virtual std::unique_ptr< Node > makeNode()
Definition:
init.h:34
interfaces::Init::makeMining
virtual std::unique_ptr< Mining > makeMining()
Definition:
init.h:36
interfaces::Init::makeWalletLoader
virtual std::unique_ptr< WalletLoader > makeWalletLoader(Chain &chain)
Definition:
init.h:37
interfaces::Ipc
Interface providing access to interprocess-communication (IPC) functionality.
Definition:
ipc.h:50
echo.h
chain.h
mining.h
wallet.h
interfaces
Definition:
interfaces.cpp:41
interfaces::MakeGuiInit
std::unique_ptr< Init > MakeGuiInit(int argc, char *argv[])
Return implementation of Init interface for the gui process.
Definition:
bitcoin-gui.cpp:49
interfaces::MakeNodeInit
std::unique_ptr< Init > MakeNodeInit(node::NodeContext &node, int argc, char *argv[], int &exit_status)
Return implementation of Init interface for the node process.
Definition:
bitcoin-node.cpp:48
interfaces::MakeWalletInit
std::unique_ptr< Init > MakeWalletInit(int argc, char *argv[], int &exit_status)
Return implementation of Init interface for the wallet process.
Definition:
bitcoin-wallet.cpp:10
node
Definition:
messages.h:20
node.h
node::NodeContext
NodeContext struct containing references to chain state and connection state.
Definition:
context.h:56
Generated on Wed Dec 18 2024 20:00:10 for Bitcoin Core by
1.9.4