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

Base interface for all kinds of message. More...

+ Inheritance diagram for CPNS::IBaseMessage:
+ Collaboration diagram for CPNS::IBaseMessage:

Public Member Functions

virtual CPNS::IEventMessageGetIEventMessage () const =0
 Check message type and return an IEventMessage object pointer if type match. More...
 
virtual CPNS::IModifierMessageGetIModifierMessage () const =0
 Check message type and return an IModifierMessage object pointer if type match. More...
 
virtual CPNS::ISelectorMessageGetISelectorMessage () const =0
 Check message type and return an ISelectorMessage object pointer if type match. More...
 
virtual CPNS::ITextMessageGetITextMessage () const =0
 Check message type and return an ITextMessage object pointer if type match. More...
 
virtual CPNS::IMIDISysexMessageGetIMIDISysexMessage () const =0
 Check message type and return an IMIDISysexMessage object pointer if type match. More...
 
virtual
CPNS::IDataTransferMessage
GetIDataTransferMessage () const =0
 Check message type and return an IDataTransferMessage object pointer if type match. More...
 
virtual
CPNS::CombinedTimeStampFlags 
GetTimeStampFlags () const =0
 Get time stamp flags, informing about time stamp types available and offline mode. More...
 
virtual CPNS::SongPosition GetTimeStampSongPosition () const =0
 Get the Song Position time stamp. More...
 
virtual CPNS::SystemTime GetTimeStampSystemTime () const =0
 Get the System Time time stamp. More...
 
virtual CPNS::Endpoint GetSource () const =0
 Get the message source endpoint. More...
 
virtual CPNS::uint16 GetDestinationNumber () const =0
 Get the number of destinations This methods is only useful in case of message trapped during recording session. More...
 
virtual CPNS::Endpoint GetDestination (CPNS::uint16 const wDestinationIndex)=0
 Get a destination Get the number of destinations This methods is only useful in case of message trapped during recording session. More...
 
- Public Member Functions inherited from CPNS::IHookedObject
virtual void Acquire ()=0
 Acquire an object. More...
 
virtual void Release ()=0
 Release an object. More...
 
virtual CPNS::uint32 GetHookCounter () const =0
 Get object's hook counter. More...
 
- Public Member Functions inherited from CPNS::IObject
virtual CPNS::ICHAIGetCHAI ()=0
 Get a pointer to the CHAI hosting this object. More...
 
virtual void RegisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0
 Register an Object's notification handler. More...
 
virtual void UnregisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0
 Unregister an Object's notification handler. More...
 
virtual CPNS::Enums::ObjectTypes GetObjectType () const =0
 Get the object type. More...
 
virtual CPNS::uint32 GetHandle () const =0
 Get a unique handle to the object if this object is handled by the trashcan. More...
 
virtual void SetUserDataPtr (void const *const pData)=0
 Set a custom user ptr data. More...
 
virtual void * GetUserDataPtr () const =0
 Get custom user ptr data. More...
 
virtual void SetUserDataUInt32 (const CPNS::uint32 dwData)=0
 Set a custom user uint32 data. More...
 
virtual CPNS::uint32 GetUserDataUInt32 () const =0
 Get custom user uint32 data. More...
 

Detailed Description

Base interface for all kinds of message.

All kinds of message inherits from this base interface providing a single anchor pointer for sending or receiving operation.

Warning
Due to internal pointer management, it is not correct to directly cast a IBaseMessage pointer to a specific message interface pointer. !!!! Use GetIXXXMessage() instead !!!!

Member Function Documentation

virtual CPNS::Endpoint CPNS::IBaseMessage::GetDestination ( CPNS::uint16 const  wDestinationIndex)
pure virtual

Get a destination Get the number of destinations This methods is only useful in case of message trapped during recording session.

It provides a way to explore original destination list related to a message sniffed by the recording feature.

Parameters
[in]wDestinationIndexan index from 0 to GetDestinationNumber()-1
Returns
the destination endpoint, or empty endpoint if the index is out of range
virtual CPNS::uint16 CPNS::IBaseMessage::GetDestinationNumber ( ) const
pure virtual

Get the number of destinations This methods is only useful in case of message trapped during recording session.

It provides a way to explore original destination list related to a message sniffed by the recording feature.

Returns
the number of destinations, excluding recording destinations
virtual CPNS::IDataTransferMessage* CPNS::IBaseMessage::GetIDataTransferMessage ( ) const
pure virtual

Check message type and return an IDataTransferMessage object pointer if type match.

Returns
the pointer to the IDataTransferMessage interface. It is internally pointing to the same BaseMessage object. Acquiring the returned object results in acquiring again the BaseMessage.
virtual CPNS::IEventMessage* CPNS::IBaseMessage::GetIEventMessage ( ) const
pure virtual

Check message type and return an IEventMessage object pointer if type match.

Returns
the pointer to the IEventMessage interface. It is internally pointing to the same BaseMessage object. Acquiring the returned object results in acquiring again the BaseMessage.
virtual CPNS::IMIDISysexMessage* CPNS::IBaseMessage::GetIMIDISysexMessage ( ) const
pure virtual

Check message type and return an IMIDISysexMessage object pointer if type match.

Returns
the pointer to the IMIDISysexMessage interface. It is internally pointing to the same BaseMessage object. Acquiring the returned object results in acquiring again the BaseMessage.
virtual CPNS::IModifierMessage* CPNS::IBaseMessage::GetIModifierMessage ( ) const
pure virtual

Check message type and return an IModifierMessage object pointer if type match.

Returns
the pointer to the IModifierMessage interface. It is internally pointing to the same BaseMessage object. Acquiring the returned object results in acquiring again the BaseMessage.
virtual CPNS::ISelectorMessage* CPNS::IBaseMessage::GetISelectorMessage ( ) const
pure virtual

Check message type and return an ISelectorMessage object pointer if type match.

Returns
the pointer to the ISelectorMessage interface. It is internally pointing to the same BaseMessage object. Acquiring the returned object results in acquiring again the BaseMessage.
virtual CPNS::ITextMessage* CPNS::IBaseMessage::GetITextMessage ( ) const
pure virtual

Check message type and return an ITextMessage object pointer if type match.

Returns
the pointer to the ITextMessage interface. It is internally pointing to the same BaseMessage object. Acquiring the returned object results in acquiring again the BaseMessage.
virtual CPNS::Endpoint CPNS::IBaseMessage::GetSource ( ) const
pure virtual

Get the message source endpoint.

Returns
the source endpoint
virtual CPNS::CombinedTimeStampFlags CPNS::IBaseMessage::GetTimeStampFlags ( ) const
pure virtual

Get time stamp flags, informing about time stamp types available and offline mode.

Returns
combination of time stamp flags
virtual CPNS::SongPosition CPNS::IBaseMessage::GetTimeStampSongPosition ( ) const
pure virtual

Get the Song Position time stamp.

Returns
The position expressed as a 32 bits number. Unit is (a quarter note / 1920).
virtual CPNS::SystemTime CPNS::IBaseMessage::GetTimeStampSystemTime ( ) const
pure virtual

Get the System Time time stamp.

Returns
The position expressed as a 64 bits number. Unit is 1 us.