2 #include <unordered_set> 3 #include <unordered_map> 5 #define RPC_ADMIN if (!m_sm.hasPrivilegeLevel(_session, Privilege::Admin)) throw jsonrpc::JsonRpcException("Invalid privileges"); 43 bool hasPrivilegeLevel(std::string
const& _session,
Privilege _l)
const;
46 std::unordered_map<std::string, SessionPermissions>
m_sessions;
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
std::hash for asio::adress
std::unordered_map< std::string, SessionPermissions > m_sessions
std::unordered_set< Privilege > privileges
size_t operator()(dev::rpc::Privilege _value) const