sipxmediaadapterlib  Version 3.3
Public Types | Static Public Attributes | Private Attributes | List of all members
MiDtmfNotf Class Reference

#include <MiDtmfNotf.h>

Inheritance diagram for MiDtmfNotf:
Inheritance graph
[legend]
Collaboration diagram for MiDtmfNotf:
Collaboration graph
[legend]

Public Types

enum  KeyPressState { KEY_UP, KEY_DOWN }
 
enum  KeyCode {
  DTMF_0 = 0, DTMF_1, DTMF_2, DTMF_3,
  DTMF_4, DTMF_5, DTMF_6, DTMF_7,
  DTMF_8, DTMF_9, DTMF_STAR = 10, DTMF_POUND,
  DTMF_A, DTMF_B, DTMF_C, DTMF_D
}
 
- Public Types inherited from MiNotification
enum  NotfType {
  MI_NOTF_MESSAGE_INVALID, MI_NOTF_PLAY_STARTED, MI_NOTF_PLAY_PAUSED, MI_NOTF_PLAY_RESUMED,
  MI_NOTF_PLAY_STOPPED, MI_NOTF_PLAY_FINISHED, MI_NOTF_PLAY_ERROR, MI_NOTF_PROGRESS,
  MI_NOTF_RECORD_STARTED, MI_NOTF_RECORD_PAUSED, MI_NOTF_RECORD_RESUMED, MI_NOTF_RECORD_STOPPED,
  MI_NOTF_RECORD_FINISHED, MI_NOTF_RECORD_ERROR, MI_NOTF_DTMF_RECEIVED, MI_NOTF_DELAY_SPEECH_STARTED,
  MI_NOTF_DELAY_NO_DELAY, MI_NOTF_DELAY_QUIESCENCE, MI_NOTF_RX_STREAM_ACTIVITY, MI_NOTF_ENERGY_LEVEL,
  MI_NOTF_VOICE_STARTED, MI_NOTF_VOICE_STOPPED, MI_NOTF_H264_SPS, MI_NOTF_H264_PPS,
  MI_NOTF_TONE_DETECT_ON, MI_NOTF_TONE_DETECT_OFF, MI_NOTF_RECORDER_CIRCULARBUFFER_WATERMARK_REACHED, MI_NOTF_INPUT_DEVICE_NOT_PRESENT,
  MI_NOTF_OUTPUT_DEVICE_NOT_PRESENT, MI_NOTF_INPUT_DEVICE_NOW_PRESENT, MI_NOTF_OUTPUT_DEVICE_NOW_PRESENT
}
 Media notification message types. More...
 

Public Member Functions

Creators
 MiDtmfNotf (const UtlString &sourceId, KeyCode key, KeyPressState pressState, int32_t duration=DURATION_NOT_APPLICABLE, int connId=-1, int streamId=-1)
 Constructor. More...
 
 MiDtmfNotf (const MiDtmfNotf &rNotf)
 Copy constructor. More...
 
virtual OsMsg * createCopy (void) const
 Create a copy of this msg object (which may be of a derived type) More...
 
virtual ~MiDtmfNotf ()
 Destructor. More...
 
Manipulators
MiDtmfNotfoperator= (const MiDtmfNotf &rhs)
 Assignment operator. More...
 
void setKeyCode (KeyCode key)
 Set the specific DTMF value that this notification represents. More...
 
void setKeyPressState (KeyPressState pressState)
 Set the key press state for this DTMF notification – down or up. More...
 
void setDuration (int32_t duration)
 Set the duration of this DTMF notification. More...
 
Accessors
KeyCode getKeyCode () const
 Get the specific DTMF value that this notification represents. More...
 
KeyPressState getKeyPressState () const
 Get the key press state for this DTMF notification – down or up. More...
 
int32_t getDuration () const
 Get the duration of this DTMF notification. More...
 
Inquiry
UtlBoolean isPressed () const
 
- Public Member Functions inherited from MiNotification
 MiNotification (NotfType msgType, const UtlString &sourceId, int connectionId=INVALID_CONNECTION_ID, int streamId=-1)
 Constructor. More...
 
 MiNotification (const MiNotification &rNotf)
 Copy constructor. More...
 
virtual ~MiNotification ()
 Destructor. More...
 
MiNotificationoperator= (const MiNotification &rhs)
 Assignment operator. More...
 
void setSourceId (const UtlString &sourceId)
 Set the unique source identifier. More...
 
void setConnectionId (int connId)
 Set the connection ID that this notification is associated with. More...
 
void setStreamId (int streamId)
 Set the stream number inside the connection this notification is associated with. More...
 
NotfType getType (void) const
 Returns the type of the notification message. More...
 
UtlString getSourceId (void) const
 Get the unique source identifier. More...
 
int getConnectionId () const
 Get the connection ID that this message is associated with. More...
 
int getStreamId () const
 Get the stream number inside the connection this notification is associated with. More...
 

Static Public Attributes

static const int32_t DURATION_NOT_APPLICABLE = -1
 
- Static Public Attributes inherited from MiNotification
static const int INVALID_CONNECTION_ID = -1
 Connection ID that indicates invalid connection or no connection. More...
 

Private Attributes

KeyCode mKey
 The DTMF key value. More...
 
KeyPressState mPressState
 Whether the key is up or down. More...
 
int32_t mDuration
 Duration of the DTMF event. More...
 

Detailed Description

Message notification class used to communicate DTMF signaling.

If one creates a KEY_DOWN notification, duration other than DURATION_NOT_APPLICABLE should not be supplied, as it isn't useful until a KEY_UP event happens.

Member Enumeration Documentation

Enumerator
KEY_UP 
KEY_DOWN 
enum KeyCode
Enumerator
DTMF_0 
DTMF_1 
DTMF_2 
DTMF_3 
DTMF_4 
DTMF_5 
DTMF_6 
DTMF_7 
DTMF_8 
DTMF_9 
DTMF_STAR 
DTMF_POUND 
DTMF_A 
DTMF_B 
DTMF_C 
DTMF_D 

Constructor & Destructor Documentation

MiDtmfNotf ( const UtlString &  sourceId,
KeyCode  key,
KeyPressState  pressState,
int32_t  duration = DURATION_NOT_APPLICABLE,
int  connId = -1,
int  streamId = -1 
)

Constructor.

MiDtmfNotf ( const MiDtmfNotf rNotf)

Copy constructor.

~MiDtmfNotf ( )
virtual

Destructor.

Member Function Documentation

OsMsg * createCopy ( void  ) const
virtual

Create a copy of this msg object (which may be of a derived type)

Reimplemented from MiNotification.

MiDtmfNotf & operator= ( const MiDtmfNotf rhs)

Assignment operator.

void setKeyCode ( KeyCode  key)

Set the specific DTMF value that this notification represents.

void setKeyPressState ( KeyPressState  pressState)

Set the key press state for this DTMF notification – down or up.

void setDuration ( int32_t  duration)

Set the duration of this DTMF notification.

MiDtmfNotf::KeyCode getKeyCode ( ) const

Get the specific DTMF value that this notification represents.

MiDtmfNotf::KeyPressState getKeyPressState ( ) const

Get the key press state for this DTMF notification – down or up.

int32_t getDuration ( ) const

Get the duration of this DTMF notification.

UtlBoolean isPressed ( ) const

Member Data Documentation

const int32_t DURATION_NOT_APPLICABLE = -1
static
KeyCode mKey
private

The DTMF key value.

KeyPressState mPressState
private

Whether the key is up or down.

int32_t mDuration
private

Duration of the DTMF event.