Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
dev::p2p::Capability Class Referenceabstract

#include <Capability.h>

Inheritance diagram for dev::p2p::Capability:
[legend]
Collaboration diagram for dev::p2p::Capability:
[legend]

Public Member Functions

 Capability (std::shared_ptr< SessionFace > _s, HostCapabilityFace *_h, unsigned _idOffset, uint16_t _protocolID)
 
virtual ~Capability ()
 

Protected Member Functions

std::shared_ptr< SessionFacesession () const
 
HostCapabilityFacehostCapability () const
 
virtual bool interpret (unsigned _id, RLP const &)=0
 
void disable (std::string const &_problem)
 
RLPStreamprep (RLPStream &_s, unsigned _id, unsigned _args=0)
 
void sealAndSend (RLPStream &_s)
 
void addRating (int _r)
 

Protected Attributes

uint16_t const c_protocolID
 

Private Attributes

std::weak_ptr< SessionFacem_session
 
HostCapabilityFacem_hostCap
 
bool m_enabled = true
 
unsigned m_idOffset
 

Friends

class Session
 

Detailed Description

Definition at line 34 of file Capability.h.

Constructor & Destructor Documentation

Capability::Capability ( std::shared_ptr< SessionFace _s,
HostCapabilityFace _h,
unsigned  _idOffset,
uint16_t  _protocolID 
)

Definition at line 31 of file Capability.cpp.

Here is the call graph for this function:

virtual dev::p2p::Capability::~Capability ( )
inlinevirtual

Definition at line 40 of file Capability.h.

Member Function Documentation

void Capability::addRating ( int  _r)
protected

Definition at line 55 of file Capability.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Capability::disable ( std::string const &  _problem)
protected

Definition at line 37 of file Capability.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

HostCapabilityFace* dev::p2p::Capability::hostCapability ( ) const
inlineprotected

Definition at line 49 of file Capability.h.

Here is the call graph for this function:

virtual bool dev::p2p::Capability::interpret ( unsigned  _id,
RLP const &   
)
protectedpure virtual

Implemented in dev::eth::EthereumPeer, TestCapability, and TestCap.

Here is the caller graph for this function:

RLPStream & Capability::prep ( RLPStream _s,
unsigned  _id,
unsigned  _args = 0 
)
protected

Definition at line 43 of file Capability.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Capability::sealAndSend ( RLPStream _s)
protected

Definition at line 48 of file Capability.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::shared_ptr<SessionFace> dev::p2p::Capability::session ( ) const
inlineprotected

Definition at line 48 of file Capability.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Session
friend

Definition at line 36 of file Capability.h.

Member Data Documentation

uint16_t const dev::p2p::Capability::c_protocolID
protected

Definition at line 59 of file Capability.h.

bool dev::p2p::Capability::m_enabled = true
private

Definition at line 64 of file Capability.h.

HostCapabilityFace* dev::p2p::Capability::m_hostCap
private

Definition at line 63 of file Capability.h.

unsigned dev::p2p::Capability::m_idOffset
private

Definition at line 65 of file Capability.h.

std::weak_ptr<SessionFace> dev::p2p::Capability::m_session
private

Definition at line 62 of file Capability.h.


The documentation for this class was generated from the following files: