Fabcoin Core  0.16.2
P2P Digital Currency
AdminNet.h
Go to the documentation of this file.
1 #pragma once
2 #include "AdminNetFace.h"
3 
4 namespace dev
5 {
6 
7 class NetworkFace;
8 
9 namespace rpc
10 {
11 
12 class SessionManager;
13 
15 {
16 public:
17  AdminNet(NetworkFace& _network, SessionManager& _sm);
18  virtual RPCModules implementedModules() const override
19  {
20  return RPCModules{RPCModule{"admin", "1.0"}};
21  }
22  virtual bool admin_net_start(std::string const& _session) override;
23  virtual bool admin_net_stop(std::string const& _session) override;
24  virtual bool admin_net_connect(std::string const& _node, std::string const& _session) override;
25  virtual Json::Value admin_net_peers(std::string const& _session) override;
26  virtual Json::Value admin_net_nodeInfo(std::string const& _session) override;
27  virtual Json::Value admin_nodeInfo() override;
28  virtual Json::Value admin_peers() override;
29  virtual bool admin_addPeer(std::string const& _node) override;
30 
31 private:
34 };
35 
36 }
37 }
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
std::vector< RPCModule > RPCModules
Definition: ModularServer.h:50
SessionManager & m_sm
Definition: AdminNet.h:33
virtual bool admin_net_stop(std::string const &_session) override
Definition: AdminNet.cpp:22
virtual bool admin_net_start(std::string const &_session) override
Definition: AdminNet.cpp:15
virtual Json::Value admin_net_peers(std::string const &_session) override
Definition: AdminNet.cpp:35
virtual RPCModules implementedModules() const override
Definition: AdminNet.h:18
virtual bool admin_addPeer(std::string const &_node) override
Definition: AdminNet.cpp:81
AdminNet(NetworkFace &_network, SessionManager &_sm)
Definition: AdminNet.cpp:13
virtual Json::Value admin_peers() override
Definition: AdminNet.cpp:73
virtual bool admin_net_connect(std::string const &_node, std::string const &_session) override
Definition: AdminNet.cpp:29
Config::Value_type Value
virtual Json::Value admin_net_nodeInfo(std::string const &_session) override
Definition: AdminNet.cpp:41
virtual Json::Value admin_nodeInfo() override
Definition: AdminNet.cpp:55
NetworkFace & m_network
Definition: AdminNet.h:32