AdminNet.h 951 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include "AdminNetFace.h"
  3. namespace dev
  4. {
  5. class NetworkFace;
  6. namespace rpc
  7. {
  8. class SessionManager;
  9. class AdminNet: public dev::rpc::AdminNetFace
  10. {
  11. public:
  12. AdminNet(NetworkFace& _network, SessionManager& _sm);
  13. virtual RPCModules implementedModules() const override
  14. {
  15. return RPCModules{RPCModule{"admin", "1.0"}};
  16. }
  17. virtual bool admin_net_start(std::string const& _session) override;
  18. virtual bool admin_net_stop(std::string const& _session) override;
  19. virtual bool admin_net_connect(std::string const& _node, std::string const& _session) override;
  20. virtual Json::Value admin_net_peers(std::string const& _session) override;
  21. virtual Json::Value admin_net_nodeInfo(std::string const& _session) override;
  22. virtual Json::Value admin_nodeInfo() override;
  23. virtual Json::Value admin_peers() override;
  24. virtual bool admin_addPeer(std::string const& _node) override;
  25. private:
  26. NetworkFace& m_network;
  27. SessionManager& m_sm;
  28. };
  29. }
  30. }