Fabcoin Core  0.16.2
P2P Digital Currency
AdminUtils.cpp
Go to the documentation of this file.
1 #include <jsonrpccpp/common/exception.h>
2 #include <libdevcore/Log.h>
3 #include <libethereum/Client.h>
4 #include "SessionManager.h"
5 #include "AdminUtils.h"
6 
7 using namespace std;
8 using namespace dev;
9 using namespace dev::eth;
10 using namespace dev::rpc;
11 
12 AdminUtils::AdminUtils(SessionManager& _sm, SystemManager* _systemManager):
13  m_sm(_sm),
14  m_systemManager(_systemManager)
15 {}
16 
17 bool AdminUtils::admin_setVerbosity(int _v, std::string const& _session)
18 {
19  RPC_ADMIN;
20  return admin_verbosity(_v);
21 }
22 
24 {
25  g_logVerbosity = _v;
26  return true;
27 }
28 
29 bool AdminUtils::admin_exit(std::string const& _session)
30 {
31  RPC_ADMIN;
32  if (m_systemManager)
33  {
35  return true;
36  }
37  return false;
38 }
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
virtual bool admin_setVerbosity(int _v, std::string const &_session) override
Definition: AdminUtils.cpp:17
std::hash for asio::adress
Definition: Common.h:323
virtual bool admin_exit(std::string const &_session) override
Definition: AdminUtils.cpp:29
virtual bool admin_verbosity(int _v) override
Definition: AdminUtils.cpp:23
SystemManager * m_systemManager
Definition: AdminUtils.h:31
#define RPC_ADMIN
Definition: SessionManager.h:5
int g_logVerbosity
The logging system&#39;s current verbosity.
Definition: Log.cpp:37
virtual void exit()=0