20#ifndef RIPPLE_RESOURCE_CONSUMER_H_INCLUDED
21#define RIPPLE_RESOURCE_CONSUMER_H_INCLUDED
23#include <xrpl/basics/Log.h>
24#include <xrpl/protocol/PublicKey.h>
25#include <xrpl/resource/Charge.h>
26#include <xrpl/resource/Disposition.h>
A generic endpoint for log messages.
An endpoint that consumes resources.
bool warn()
Returns true if the consumer should be warned.
Consumer & operator=(Consumer const &other)
int balance()
Returns the credit balance representing consumption.
std::string to_string() const
Return a human readable string uniquely identifying this consumer.
bool disconnect(beast::Journal const &j)
Returns true if the consumer should be disconnected.
Disposition charge(Charge const &fee, std::string const &context={})
Apply a load charge to the consumer.
void setPublicKey(PublicKey const &publicKey)
bool isUnlimited() const
Returns true if this is a privileged endpoint.
Disposition disposition() const
Returns the current disposition of this consumer.
void elevate(std::string const &name)
Raise the Consumer's privilege level to a Named endpoint.
std::ostream & operator<<(std::ostream &os, Charge const &v)
Disposition
The disposition of a consumer after applying a load charge.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.