CHAI SDK  Version 1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CPNS::IPipe_NotificationHandler Class Referenceabstract

Notification handler for Pipe. More...

Public Member Functions

virtual void OnPipe_PeerChange (CPNS::IPipe *const pNotifiedObject, CPNS::Endpoint const &peer, CPNS::boolean const fNewPeer)
 Source change notification Called if a new source is connected, or if a source is silent (the pipe does not receive message or internal system message for 2 seconds). More...
 
virtual void OnPipe_DataConsumed (CPNS::IPipe *const pNotifiedObject)
 This is called on reception of DataConsumed from the target side. More...
 
virtual void OnPipe_Message (CPNS::IPipe *const pNotifiedObject, CPNS::IBaseMessage *const pMsg)=0
 Called on application message arriving. More...
 

Detailed Description

Notification handler for Pipe.

Member Function Documentation

virtual void CPNS::IPipe_NotificationHandler::OnPipe_DataConsumed ( CPNS::IPipe *const  pNotifiedObject)
inlinevirtual

This is called on reception of DataConsumed from the target side.

Parameters
[in]pNotifiedObjectPointer to the notified output object
virtual void CPNS::IPipe_NotificationHandler::OnPipe_Message ( CPNS::IPipe *const  pNotifiedObject,
CPNS::IBaseMessage *const  pMsg 
)
pure virtual

Called on application message arriving.

On message reception, the application must check the message object type using IObject::GetObjectType, then call the right dedicated IBaseMessage's method (such as IBaseMessage::GetIEventMessage) to get the correct interface pointer giving access to the message content.

Parameters
[in]pNotifiedObjectPointer to the input object receiving the message
[in]pMsgPointer to base interface of the message.
virtual void CPNS::IPipe_NotificationHandler::OnPipe_PeerChange ( CPNS::IPipe *const  pNotifiedObject,
CPNS::Endpoint const &  peer,
CPNS::boolean const  fNewPeer 
)
inlinevirtual

Source change notification Called if a new source is connected, or if a source is silent (the pipe does not receive message or internal system message for 2 seconds).

Parameters
[in]pNotifiedObjectPointer to the pipe object receiving the message
[in]peerThe lost source
[in]fNewPeerTRUE if this notifies a new peer, FALSE for a lost peer
Warning
it is NOT SAFE to modify the connection list during this call!