mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Remove direct bitcoin calls from qt/optionsmodel.cpp
This commit is contained in:
committed by
John Newbery
parent
71e0d90876
commit
c0f2756be5
@@ -5,10 +5,14 @@
|
||||
#ifndef BITCOIN_INTERFACE_NODE_H
|
||||
#define BITCOIN_INTERFACE_NODE_H
|
||||
|
||||
#include <netaddress.h> // For Network
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class proxyType;
|
||||
|
||||
namespace interface {
|
||||
|
||||
class Handler;
|
||||
@@ -22,6 +26,12 @@ public:
|
||||
//! Set command line arguments.
|
||||
virtual void parseParameters(int argc, const char* const argv[]) = 0;
|
||||
|
||||
//! Set a command line argument if it doesn't already have a value
|
||||
virtual bool softSetArg(const std::string& arg, const std::string& value) = 0;
|
||||
|
||||
//! Set a command line boolean argument if it doesn't already have a value
|
||||
virtual bool softSetBoolArg(const std::string& arg, bool value) = 0;
|
||||
|
||||
//! Load settings from configuration file.
|
||||
virtual void readConfigFile(const std::string& conf_path) = 0;
|
||||
|
||||
@@ -49,6 +59,12 @@ public:
|
||||
//! Start shutdown.
|
||||
virtual void startShutdown() = 0;
|
||||
|
||||
//! Map port.
|
||||
virtual void mapPort(bool use_upnp) = 0;
|
||||
|
||||
//! Get proxy.
|
||||
virtual bool getProxy(Network net, proxyType& proxy_info) = 0;
|
||||
|
||||
//! Register handler for init messages.
|
||||
using InitMessageFn = std::function<void(const std::string& message)>;
|
||||
virtual std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) = 0;
|
||||
|
||||
Reference in New Issue
Block a user