AdminUtils.h 658 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <libwebthree/SystemManager.h>
  3. #include "AdminUtilsFace.h"
  4. namespace dev
  5. {
  6. namespace rpc
  7. {
  8. class SessionManager;
  9. class AdminUtils: public dev::rpc::AdminUtilsFace
  10. {
  11. public:
  12. AdminUtils(SessionManager& _sm, SystemManager* _systemManager = nullptr);
  13. virtual RPCModules implementedModules() const override
  14. {
  15. return RPCModules{RPCModule{"admin", "1.0"}};
  16. }
  17. virtual bool admin_setVerbosity(int _v, std::string const& _session) override;
  18. virtual bool admin_verbosity(int _v) override;
  19. virtual bool admin_exit(std::string const& _session) override;
  20. private:
  21. SessionManager& m_sm;
  22. SystemManager* m_systemManager = nullptr;
  23. };
  24. }
  25. }