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

Notification handler for Input. More...

Public Member Functions

virtual void OnInput_Message (CPNS::IInput *const pNotifiedObject, CPNS::IBaseMessage *const pMsg, CPNS::boolean const fRecording)=0
 Called on application message arriving. More...
 
virtual void OnInput_SourceChange (CPNS::IInput *const pNotifiedObject, CPNS::Endpoint const &source, CPNS::Enums::ISCCauses const cause)
 Source change notification Called if a new source is connected, or if a source is silent (the input does not receive message or internal system message for 2 seconds). More...
 

Detailed Description

Notification handler for Input.

Member Function Documentation

virtual void CPNS::IInput_NotificationHandler::OnInput_Message ( CPNS::IInput *const  pNotifiedObject,
CPNS::IBaseMessage *const  pMsg,
CPNS::boolean const  fRecording 
)
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.
[in]fRecordingTRUE if the received message is received in recording mode. The message contains TimeStamp information and IBaseMessage::GetDestination allows the application to get the message's original destination set.
virtual void CPNS::IInput_NotificationHandler::OnInput_SourceChange ( CPNS::IInput *const  pNotifiedObject,
CPNS::Endpoint const &  source,
CPNS::Enums::ISCCauses const  cause 
)
inlinevirtual

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

This can be used to prepare voice resource on new source, shut down sound generator, or reset some functionality in case of loosing source.

Parameters
[in]pNotifiedObjectPointer to the input object receiving the message
[in]sourceThe lost source
[in]causeThe cause