sipxmediaadapterlib
Version 3.3
|
Message notification class used to communicate media notification events. More...
#include <MiNotification.h>
Public Member Functions | |
Creators | |
MiNotification (NotfType msgType, const UtlString &sourceId, int connectionId=INVALID_CONNECTION_ID, int streamId=-1) | |
Constructor. More... | |
MiNotification (const MiNotification &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 | ~MiNotification () |
Destructor. More... | |
Manipulators | |
MiNotification & | operator= (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... | |
Accessors | |
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 int | INVALID_CONNECTION_ID = -1 |
Connection ID that indicates invalid connection or no connection. More... | |
Private Attributes | |
UtlString | mSourceId |
Unique identifier of the thing that originated this notification. More... | |
int | mConnectionId |
int | mStreamId |
Message notification class used to communicate media notification events.
To determine the source of the notification use the following information: 1) Test getConnectionId() - if it is >=1, then notification is sent from the selected input or output connection. If it is equal to -1, then notification is sent from local part (mic and speaker sides). 2) If notification belongs to input part of connection, then getStreamId() will give you a number of stream in the connection (starting from 0). In other cases (output part of connection or local flowgraph part) stream ID equals -1. 3) getSourceId() returns the name of the resource which sent this notification. Use this value to distinguish between several possible senders inside one part of the flowgraph, e.g. mic part from speaker part.
enum NotfType |
Media notification message types.
Enumerator | |
---|---|
MI_NOTF_MESSAGE_INVALID |
Message type is invalid (similar to NULL) |
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 |
Value for MiProgressNotf notifications. |
MI_NOTF_RECORD_STARTED |
Recording started. |
MI_NOTF_RECORD_PAUSED |
Recording paused after starting or resumed (MiIntNotf bears number of recorded samples thus far). |
MI_NOTF_RECORD_RESUMED |
Recording resumed after being paused. |
MI_NOTF_RECORD_STOPPED |
Recording stopped manually (MiIntNotf bears number of recorded samples). |
MI_NOTF_RECORD_FINISHED |
Recording stopped automatically (MiIntNotf bears number of recorded samples). |
MI_NOTF_RECORD_ERROR |
Recording stopped because of an error. |
MI_NOTF_DTMF_RECEIVED |
Value for MiDtmfNotf notifications. |
MI_NOTF_DELAY_SPEECH_STARTED | |
MI_NOTF_DELAY_NO_DELAY | |
MI_NOTF_DELAY_QUIESCENCE | |
MI_NOTF_RX_STREAM_ACTIVITY |
Value for MiRtpStreamActivityNotf notifications. |
MI_NOTF_ENERGY_LEVEL |
Audio energy level (MiIntNotf) |
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 |
MiNotification | ( | NotfType | msgType, |
const UtlString & | sourceId, | ||
int | connectionId = INVALID_CONNECTION_ID , |
||
int | streamId = -1 |
||
) |
Constructor.
MiNotification | ( | const MiNotification & | rNotf | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Create a copy of this msg object (which may be of a derived type)
Reimplemented in MiDtmfNotf, MiRtpStreamActivityNotf, MiIntNotf, MiStringNotf, and MiProgressNotf.
MiNotification & operator= | ( | const MiNotification & | rhs | ) |
Assignment operator.
void setSourceId | ( | const UtlString & | sourceId | ) |
Set the unique source identifier.
Sets the unique identifier of the thing that originated this notification.
void setConnectionId | ( | int | connId | ) |
Set the connection ID that this notification is associated with.
void setStreamId | ( | int | streamId | ) |
Set the stream number inside the connection this notification is associated with.
MiNotification::NotfType getType | ( | void | ) | const |
Returns the type of the notification message.
UtlString getSourceId | ( | void | ) | const |
Get the unique source identifier.
Returns the unique identifier of the thing that originated this notification.
int getConnectionId | ( | ) | const |
Get the connection ID that this message is associated with.
int getStreamId | ( | ) | const |
Get the stream number inside the connection this notification is associated with.
|
static |
Connection ID that indicates invalid connection or no connection.
|
private |
Unique identifier of the thing that originated this notification.
|
private |
If applicable, stores the ID of the connection this notification is associated with. (-1 if N/A)
|
private |
If applicable, stores the ID of the stream inside connection this notification is associated with. (-1 if N/A)