Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CAAbstractControlChannel Class Referenceabstract

The base of each control channel. More...

Inheritance diagram for CAAbstractControlChannel:
CASyncControlChannel CAAccountingControlChannel CAReplayControlChannel

Public Member Functions

 CAAbstractControlChannel (UINT8 id, bool bIsEncrypted)
 
virtual ~CAAbstractControlChannel ()
 
SINT32 sendXMLMessage (const XERCES_CPP_NAMESPACE::DOMDocument *pDocMsg) const
 Call to send a XML message via this control channel. More...
 
SINT32 sendXMLMessage (const UINT8 *msgXML, UINT32 msgLen) const
 Call to send a XML message via this control channel. More...
 
UINT32 getID () const
 Returns the id of this control channel. More...
 

Protected Member Functions

virtual SINT32 proccessMessage (const UINT8 *msg, UINT32 msglen)=0
 Processes some bytes of a message we got from the communication channel. More...
 
virtual SINT32 proccessMessageComplete ()=0
 Called if a whole messages was received, which should be delivered to the final recipient. More...
 
SINT32 setDispatcher (CAControlChannelDispatcher *pDispatcher)
 Sets the Dispatcher. More...
 

Protected Attributes

CAControlChannelDispatcherm_pDispatcher
 
bool m_bIsEncrypted
 
UINT32 m_ID
 

Friends

class CAControlChannelDispatcher
 

Detailed Description

The base of each control channel.

Controls channels should be derived from CASyncControlChannel or CAASyncControlChannel

Constructor & Destructor Documentation

◆ CAAbstractControlChannel()

CAAbstractControlChannel::CAAbstractControlChannel ( UINT8  id,
bool  bIsEncrypted 
)

References m_bIsEncrypted, m_ID, and m_pDispatcher.

◆ ~CAAbstractControlChannel()

virtual CAAbstractControlChannel::~CAAbstractControlChannel ( )
virtual

Member Function Documentation

◆ getID()

UINT32 CAAbstractControlChannel::getID ( ) const

Returns the id of this control channel.

Return values
idof control channel

References m_ID.

Referenced by CAControlChannelDispatcher::registerControlChannel(), and CAReplayCtrlChannelMsgProc::~CAReplayCtrlChannelMsgProc().

◆ proccessMessage()

virtual SINT32 CAAbstractControlChannel::proccessMessage ( const UINT8 msg,
UINT32  msglen 
)
protectedpure virtual

Processes some bytes of a message we got from the communication channel.

We reassemble this fragments in a buffer. If all parts are received we call proccessMessagesComplete()

Implemented in CASyncControlChannel.

Referenced by CAControlChannelDispatcher::proccessMixPacket().

◆ proccessMessageComplete()

virtual SINT32 CAAbstractControlChannel::proccessMessageComplete ( )
protectedpure virtual

Called if a whole messages was received, which should be delivered to the final recipient.

Implemented in CASyncControlChannel.

◆ sendXMLMessage() [1/2]

SINT32 CAAbstractControlChannel::sendXMLMessage ( const UINT8 msgXML,
UINT32  msgLen 
) const

Call to send a XML message via this control channel.

Parameters
msgXMLbuffer which holds the serialized XML message
msgLensize of msgXML
Return values
E_SPACE,ifthe serialized XML message is bigger than 0xFFFF bytes
E_SUCCESS,ifthe message that successful send
E_UNKNOWN,incase of an error

References E_SPACE, CAControlChannelDispatcher::encryptMessage(), m_bIsEncrypted, m_ID, m_pDispatcher, and CAControlChannelDispatcher::sendMessages().

◆ sendXMLMessage() [2/2]

SINT32 CAAbstractControlChannel::sendXMLMessage ( const XERCES_CPP_NAMESPACE::DOMDocument *  pDocMsg) const

◆ setDispatcher()

SINT32 CAAbstractControlChannel::setDispatcher ( CAControlChannelDispatcher pDispatcher)
protected

Sets the Dispatcher.

References E_SUCCESS, and m_pDispatcher.

Referenced by CAControlChannelDispatcher::registerControlChannel().

Friends And Related Function Documentation

◆ CAControlChannelDispatcher

friend class CAControlChannelDispatcher
friend

Member Data Documentation

◆ m_bIsEncrypted

bool CAAbstractControlChannel::m_bIsEncrypted
protected

◆ m_ID

UINT32 CAAbstractControlChannel::m_ID
protected

◆ m_pDispatcher

CAControlChannelDispatcher* CAAbstractControlChannel::m_pDispatcher
protected