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

Custom Data Transfer message dedicated class. More...

+ Inheritance diagram for CPNS::IDataTransferMessage:
+ Collaboration diagram for CPNS::IDataTransferMessage:

Public Member Functions

virtual void SetNumber (CPNS::uint16 const wNumber)=0
 Set the message Number. More...
 
virtual CPNS::uint16 GetNumber () const =0
 Get the message's number. More...
 
virtual CPNS::uint16 GetSendBufferLength () const =0
 Get the maximum number of bytes the message can carry. More...
 
virtual CPNS::Enums::Errors SetSendBuffer (CPNS::uint16 const wToOffset, CPNS::uint16 const wBytesToCopy, CPNS::byte const *const pSrcBuffer)=0
 Fill the message buffer with data coming from the application. More...
 
virtual CPNS::uint16 GetReceiveBufferLength () const =0
 Get the number of bytes available. More...
 
virtual CPNS::uint16 GetReceiveBuffer (CPNS::uint16 const wFromOffset, CPNS::uint16 const wBytesToRead, CPNS::byte *const pDestBuffer) const =0
 Get the message buffer content. More...
 
- Public Member Functions inherited from CPNS::IBaseMessage
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

Custom Data Transfer message dedicated class.

Member Function Documentation

virtual CPNS::uint16 CPNS::IDataTransferMessage::GetNumber ( ) const
pure virtual

Get the message's number.

Returns
the message's number
virtual CPNS::uint16 CPNS::IDataTransferMessage::GetReceiveBuffer ( CPNS::uint16 const  wFromOffset,
CPNS::uint16 const  wBytesToRead,
CPNS::byte *const  pDestBuffer 
) const
pure virtual

Get the message buffer content.

Return the number of bytes copied from the message buffer to the application side. Might be 0 if the offset is outside the available length, or less than wBytesToRead if wOffset+bBytesToRead exceeds available length.

Parameters
[in]wFromOffsetMessage buffer offset
[in]wBytesToReadNumber of bytes to read from the message's buffer
[in]pDestBufferPointer to the application's destination buffer
Returns
number of bytes successfully copied
virtual CPNS::uint16 CPNS::IDataTransferMessage::GetReceiveBufferLength ( ) const
pure virtual

Get the number of bytes available.

Returns
buffer size
virtual CPNS::uint16 CPNS::IDataTransferMessage::GetSendBufferLength ( ) const
pure virtual

Get the maximum number of bytes the message can carry.

Returns
buffer size
virtual void CPNS::IDataTransferMessage::SetNumber ( CPNS::uint16 const  wNumber)
pure virtual

Set the message Number.

Remarks
Standard Modifier numbers are available from CPNS::Enums::DataTransferNumbers
Parameters
[in]wNumberthe message's number
virtual CPNS::Enums::Errors CPNS::IDataTransferMessage::SetSendBuffer ( CPNS::uint16 const  wToOffset,
CPNS::uint16 const  wBytesToCopy,
CPNS::byte const *const  pSrcBuffer 
)
pure virtual

Fill the message buffer with data coming from the application.

Parameters
[in]wToOffsetMessage buffer offset
[in]wBytesToCopyNumber of bytes to copy from application to message buffer
[in]pSrcBufferPointer to the source buffer
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BufferOverflow