rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | Static Private Member Functions | Private Attributes | List of all members
ripple::WSInfoSub Class Reference

#include <WSInfoSub.h>

Inheritance diagram for ripple::WSInfoSub:
Inheritance graph
[legend]
Collaboration diagram for ripple::WSInfoSub:
Collaboration graph
[legend]

Public Types

using pointer = std::shared_ptr< InfoSub >
 
using wptr = std::weak_ptr< InfoSub >
 
using ref = std::shared_ptr< InfoSub > const &
 
using Consumer = Resource::Consumer
 

Public Member Functions

 WSInfoSub (Source &source, std::shared_ptr< WSSession > const &ws)
 
std::string_view user () const
 
std::string_view forwarded_for () const
 
void send (Json::Value const &jv, bool) override
 
ConsumergetConsumer ()
 
std::uint64_t getSeq ()
 
void onSendEmpty ()
 
void insertSubAccountInfo (AccountID const &account, bool rt)
 
void deleteSubAccountInfo (AccountID const &account, bool rt)
 
bool insertSubAccountHistory (AccountID const &account)
 
void deleteSubAccountHistory (AccountID const &account)
 
void clearRequest ()
 
void setRequest (std::shared_ptr< InfoSubRequest > const &req)
 
std::shared_ptr< InfoSubRequest > const & getRequest ()
 
void setApiVersion (unsigned int apiVersion)
 
unsigned int getApiVersion () const noexcept
 

Protected Attributes

std::mutex mLock
 

Static Private Member Functions

static int assign_id ()
 
static auto & getCounter () noexcept
 

Private Attributes

std::weak_ptr< WSSessionws_
 
std::string user_
 
std::string fwdfor_
 
Consumer m_consumer
 
Sourcem_source
 
hash_set< AccountIDrealTimeSubscriptions_
 
hash_set< AccountIDnormalSubscriptions_
 
std::shared_ptr< InfoSubRequestrequest_
 
std::uint64_t mSeq
 
hash_set< AccountIDaccountHistorySubscriptions_
 
unsigned int apiVersion_ = 0
 

Detailed Description

Definition at line 35 of file WSInfoSub.h.

Member Typedef Documentation

◆ pointer

Definition at line 54 of file InfoSub.h.

◆ wptr

Definition at line 58 of file InfoSub.h.

◆ ref

using ripple::InfoSub::ref = std::shared_ptr<InfoSub> const&
inherited

Definition at line 60 of file InfoSub.h.

◆ Consumer

Definition at line 62 of file InfoSub.h.

Constructor & Destructor Documentation

◆ WSInfoSub()

ripple::WSInfoSub::WSInfoSub ( Source source,
std::shared_ptr< WSSession > const &  ws 
)

Definition at line 42 of file WSInfoSub.h.

Member Function Documentation

◆ user()

std::string_view ripple::WSInfoSub::user ( ) const

Definition at line 60 of file WSInfoSub.h.

◆ forwarded_for()

std::string_view ripple::WSInfoSub::forwarded_for ( ) const

Definition at line 66 of file WSInfoSub.h.

◆ send()

void ripple::WSInfoSub::send ( Json::Value const &  jv,
bool   
)
overridevirtual

Implements ripple::InfoSub.

Definition at line 72 of file WSInfoSub.h.

◆ getConsumer()

Resource::Consumer & ripple::InfoSub::getConsumer ( )
inherited

Definition at line 68 of file InfoSub.cpp.

◆ getSeq()

std::uint64_t ripple::InfoSub::getSeq ( )
inherited

Definition at line 74 of file InfoSub.cpp.

◆ onSendEmpty()

void ripple::InfoSub::onSendEmpty ( )
inherited

Definition at line 80 of file InfoSub.cpp.

◆ insertSubAccountInfo()

void ripple::InfoSub::insertSubAccountInfo ( AccountID const &  account,
bool  rt 
)
inherited

Definition at line 85 of file InfoSub.cpp.

◆ deleteSubAccountInfo()

void ripple::InfoSub::deleteSubAccountInfo ( AccountID const &  account,
bool  rt 
)
inherited

Definition at line 96 of file InfoSub.cpp.

◆ insertSubAccountHistory()

bool ripple::InfoSub::insertSubAccountHistory ( AccountID const &  account)
inherited

Definition at line 107 of file InfoSub.cpp.

◆ deleteSubAccountHistory()

void ripple::InfoSub::deleteSubAccountHistory ( AccountID const &  account)
inherited

Definition at line 114 of file InfoSub.cpp.

◆ clearRequest()

void ripple::InfoSub::clearRequest ( )
inherited

Definition at line 121 of file InfoSub.cpp.

◆ setRequest()

void ripple::InfoSub::setRequest ( std::shared_ptr< InfoSubRequest > const &  req)
inherited

Definition at line 127 of file InfoSub.cpp.

◆ getRequest()

std::shared_ptr< InfoSubRequest > const & ripple::InfoSub::getRequest ( )
inherited

Definition at line 133 of file InfoSub.cpp.

◆ setApiVersion()

void ripple::InfoSub::setApiVersion ( unsigned int  apiVersion)
inherited

Definition at line 139 of file InfoSub.cpp.

◆ getApiVersion()

unsigned int ripple::InfoSub::getApiVersion ( ) const
noexceptinherited

Definition at line 145 of file InfoSub.cpp.

◆ assign_id()

static int ripple::InfoSub::assign_id ( )
staticprivateinherited

Definition at line 252 of file InfoSub.h.

◆ getCounter()

static auto & ripple::CountedObject< InfoSub >::getCounter ( )
staticprivatenoexceptinherited

Definition at line 129 of file CountedObject.h.

Member Data Documentation

◆ ws_

std::weak_ptr<WSSession> ripple::WSInfoSub::ws_
private

Definition at line 37 of file WSInfoSub.h.

◆ user_

std::string ripple::WSInfoSub::user_
private

Definition at line 38 of file WSInfoSub.h.

◆ fwdfor_

std::string ripple::WSInfoSub::fwdfor_
private

Definition at line 39 of file WSInfoSub.h.

◆ mLock

std::mutex ripple::InfoSub::mLock
protectedinherited

Definition at line 239 of file InfoSub.h.

◆ m_consumer

Consumer ripple::InfoSub::m_consumer
privateinherited

Definition at line 242 of file InfoSub.h.

◆ m_source

Source& ripple::InfoSub::m_source
privateinherited

Definition at line 243 of file InfoSub.h.

◆ realTimeSubscriptions_

hash_set<AccountID> ripple::InfoSub::realTimeSubscriptions_
privateinherited

Definition at line 244 of file InfoSub.h.

◆ normalSubscriptions_

hash_set<AccountID> ripple::InfoSub::normalSubscriptions_
privateinherited

Definition at line 245 of file InfoSub.h.

◆ request_

std::shared_ptr<InfoSubRequest> ripple::InfoSub::request_
privateinherited

Definition at line 246 of file InfoSub.h.

◆ mSeq

std::uint64_t ripple::InfoSub::mSeq
privateinherited

Definition at line 247 of file InfoSub.h.

◆ accountHistorySubscriptions_

hash_set<AccountID> ripple::InfoSub::accountHistorySubscriptions_
privateinherited

Definition at line 248 of file InfoSub.h.

◆ apiVersion_

unsigned int ripple::InfoSub::apiVersion_ = 0
privateinherited

Definition at line 249 of file InfoSub.h.