mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Name load source. Hook up load sources through WSConnection->RPCHandler.
This commit is contained in:
@@ -61,14 +61,20 @@ public:
|
||||
static const int lsfOutbound = 2; // outbound connection
|
||||
|
||||
protected:
|
||||
int mBalance;
|
||||
int mFlags;
|
||||
int mLastUpdate;
|
||||
int mLastWarning;
|
||||
std::string mName;
|
||||
int mBalance;
|
||||
int mFlags;
|
||||
int mLastUpdate;
|
||||
int mLastWarning;
|
||||
|
||||
public:
|
||||
LoadSource() : mBalance(0), mFlags(0), mLastWarning(0)
|
||||
{ mLastUpdate = upTime(); }
|
||||
LoadSource(bool admin) : mBalance(0), mFlags(admin ? lsfPrivileged : 0), mLastUpdate(upTime()), mLastWarning(0)
|
||||
{ ; }
|
||||
LoadSource(const std::string& name) : mName(name), mBalance(0), mFlags(0), mLastUpdate(upTime()), mLastWarning(0)
|
||||
{ ; }
|
||||
|
||||
void rename(const std::string& name)
|
||||
{ mName = name; }
|
||||
|
||||
bool isPrivileged() const { return (mFlags & lsfPrivileged) != 0; }
|
||||
void setPrivileged() { mFlags |= lsfPrivileged; }
|
||||
|
||||
Reference in New Issue
Block a user