00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef MMCCEVENTS_H
00023 #define MMCCEVENTS_H
00024
00025
00026 #include <e32std.h>
00027 #include <rtpapi.h>
00028
00029
00033 typedef TInt TMccEventCategory;
00034 typedef TInt TMccEventType;
00035 typedef TInt TMccRtcpPacketType;
00036 typedef TInt TMccDtmfEventType;
00037
00041 const TInt KMccMaxEventDataLength = 1024;
00042 const TInt KMccMaxDtmfStringLength = 100;
00043
00047 const TMccEventCategory KMccEventCategoryStream = 1;
00048 const TMccEventCategory KMccEventCategoryRtcp = 2;
00049 const TMccEventCategory KMccEventCategoryRtp = 3;
00050 const TMccEventCategory KMccEventCategoryDtmf = 4;
00051 const TMccEventCategory KMccEventCategoryTranscode = 5;
00052
00056 const TMccEventType KMccEventNone = 1;
00057 const TMccEventType KMccStreamPrepared = 2;
00058 const TMccEventType KMccStreamStarted = 3;
00059 const TMccEventType KMccStreamPaused = 4;
00060 const TMccEventType KMccStreamResumed = 5;
00061 const TMccEventType KMccStreamStopped = 6;
00062 const TMccEventType KMccStreamClosed = 7;
00063 const TMccEventType KMccInactivityEvent = 8;
00064 const TMccEventType KMccActivityEvent = 9;
00065 const TMccEventType KMccStreamPlaying = 10;
00066 const TMccEventType KMccStreamBuffering = 11;
00067 const TMccEventType KMccStreamIdle = 12;
00068 const TMccEventType KMccStreamMMFEvent = 13;
00069 const TMccEventType KMccStreamError = 14;
00070 const TMccEventType KMccRtcpControl = 15;
00071 const TMccEventType KMccRtcpReceived = 16;
00072 const TMccEventType KMccDtmfControl = 17;
00073 const TMccEventType KMccDtmfReceived = 18;
00074 const TMccEventType KMccResourceReserved = 19;
00075 const TMccEventType KMccResourceReleased = 20;
00076 const TMccEventType KMccResourceNotAvailable = 21;
00077 const TMccEventType KMccTranscodeInProgress = 22;
00078 const TMccEventType KMccTranscodeCompleted = 23;
00079 const TMccEventType KMccAudioRoutingChanged = 24;
00080 const TMccEventType KMccLinkCreated = 25;
00081 const TMccEventType KMccTranscodeCancelled = 26;
00082 const TMccEventType KMccUnknownMediaReceived = 27;
00083 const TMccEventType KMccMediaQualityStatus = 28;
00084 const TMccEventType KMccMasterKeyStaled = 29;
00085
00089 const TMccRtcpPacketType KRtcpPacketUndefined = 0;
00090 const TMccRtcpPacketType KRtcpSdesPacket = 1;
00091 const TMccRtcpPacketType KRtcpByePacket = 2;
00092 const TMccRtcpPacketType KRtcpAppPacket = 3;
00093 const TMccRtcpPacketType KRtcpSrPacket = 4;
00094 const TMccRtcpPacketType KRtcpRrPacket = 5;
00095 const TMccRtcpPacketType KRtcpAnyPacket = 6;
00096
00100 const TMccDtmfEventType KMccDtmfUnknown = 0;
00101 const TMccDtmfEventType KMccDtmfSigStartTone = 1;
00102 const TMccDtmfEventType KMccDtmfSigStopTone = 2;
00103 const TMccDtmfEventType KMccDtmfSigSendString = 3;
00104 const TMccDtmfEventType KMccDtmfSigContinueSending = 4;
00105 const TMccDtmfEventType KMccDtmfSigCancelSending = 5;
00106 const TMccDtmfEventType KMccDtmfSendingComplete = 6;
00107 const TMccDtmfEventType KMccDtmfManualStart = 7;
00108 const TMccDtmfEventType KMccDtmfManualStop = 8;
00109 const TMccDtmfEventType KMccDtmfManualAbort = 9;
00110 const TMccDtmfEventType KMccDtmfSequenceStart = 10;
00111 const TMccDtmfEventType KMccDtmfSequenceStop = 11;
00112 const TMccDtmfEventType KMccDtmfSequenceAbort = 12;
00113 const TMccDtmfEventType KMccDtmfStopInDtmfString = 13;
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00141 class TMccEvent
00142 {
00143 public:
00144
00148 inline TMccEvent() :
00149 iSessionId( 0 ), iLinkId( 0 ), iStreamId( 0 ), iEndpointId( 0 ),
00150 iEventCategory( 0 ), iEventType( KMccEventNone ), iErrorCode( KErrNone ),
00151 iEventNumData( 0 ), iEventData( KNullDesC8 ),
00152 iReserved( 0 ), iReserved2( NULL )
00153 {
00154 }
00155
00159 inline TMccEvent( TUint32 aSessionId, TUint32 aLinkId,
00160 TUint32 aStreamId, TUint32 aEndpointId, TMccEventCategory aCategory,
00161 TMccEventType aEvent, TInt aError, const TDesC8& aData ) :
00162 iSessionId( aSessionId ), iLinkId( aLinkId ), iStreamId( aStreamId ),
00163 iEndpointId( aEndpointId ), iEventCategory( aCategory ), iEventType( aEvent ),
00164 iErrorCode( aError ), iEventNumData( 0 ), iEventData( aData ),
00165 iReserved( 0 ), iReserved2( NULL )
00166 {
00167 }
00168
00172 inline TMccEvent( const TMccEvent& aEvent ):
00173 iSessionId( aEvent.iSessionId ), iLinkId( aEvent.iLinkId ),
00174 iStreamId( aEvent.iStreamId ), iEndpointId( aEvent.iEndpointId ),
00175 iEventCategory( aEvent.iEventCategory ), iEventType( aEvent.iEventType ),
00176 iErrorCode( aEvent.iErrorCode ), iEventNumData(aEvent.iEventNumData),
00177 iEventData( aEvent.iEventData ),
00178 iReserved( aEvent.iReserved ), iReserved2( aEvent.iReserved2 )
00179 {
00180 }
00181
00182 inline TMccEvent& operator=(
00183 const TMccEvent& aEvent )
00184 {
00185 if ( &aEvent != this )
00186 {
00187 iSessionId = aEvent.iSessionId;
00188 iLinkId = aEvent.iLinkId;
00189 iStreamId = aEvent.iStreamId;
00190 iEndpointId = aEvent.iEndpointId;
00191 iEventCategory = aEvent.iEventCategory;
00192 iEventType = aEvent.iEventType;
00193 iErrorCode = aEvent.iErrorCode;
00194 iEventNumData = aEvent.iEventNumData;
00195 iEventData.Copy( aEvent.iEventData );
00196 iReserved = aEvent.iReserved;
00197 iReserved2 = aEvent.iReserved2;
00198 }
00199 return *this;
00200 }
00201
00202 public:
00203
00207 TUint32 iSessionId;
00208
00212 TUint32 iLinkId;
00213
00217 TUint32 iStreamId;
00218
00222 TUint32 iEndpointId;
00223
00227 TMccEventCategory iEventCategory;
00228
00232 TMccEventType iEventType;
00233
00237 TInt iErrorCode;
00238
00242 TUint32 iEventNumData;
00243
00247 TBuf8<KMccMaxEventDataLength> iEventData;
00248
00252 TUint32 iReserved;
00253
00257 TAny* iReserved2;
00258
00259 };
00260
00261 typedef TPckgBuf<TMccEvent> TMccEventPackage;
00262
00263 const TInt KMccMaxRtcpPacketDataLength = KMccMaxEventDataLength -
00264 TInt(sizeof( TMccRtcpPacketType )) -
00265 TInt(sizeof( TUint32 )) -
00266 TInt(sizeof( TTimeStamps )) -
00267 TInt(sizeof( TRtpPeerStat )) -
00268
00269 TInt(sizeof( TMccEventPackage ))
00270 + TInt(sizeof( TMccEvent ));
00271
00278 class TMccRtpEventData
00279 {
00280 public:
00281
00285 inline TMccRtpEventData() :
00286 iJitterEstimate( 0 ),
00287 iPacketsReceived( 0 ),
00288 iPrevTransTime( 0 ),
00289 iTriggeredJitterLevel( 0 )
00290 {
00291 }
00292
00296 inline TMccRtpEventData( const TMccRtpEventData& aEvent ) :
00297 iJitterEstimate( aEvent.iJitterEstimate ),
00298 iPacketsReceived( aEvent.iPacketsReceived ),
00299 iPrevTransTime( aEvent.iPrevTransTime ),
00300 iTriggeredJitterLevel( aEvent.iTriggeredJitterLevel )
00301 {
00302 }
00303
00307 inline TMccRtpEventData( TInt64 aEstimate,
00308 TUint32 aPcksRec,
00309 TInt64 aPrevTransTime,
00310 TUint64 aTriggeredJitterLevel ) :
00311 iJitterEstimate( aEstimate ),
00312 iPacketsReceived( aPcksRec ),
00313 iPrevTransTime( aPrevTransTime ),
00314 iTriggeredJitterLevel( aTriggeredJitterLevel )
00315 {
00316 }
00317
00318 public:
00319
00323 TUint64 iJitterEstimate;
00324
00328 TUint32 iPacketsReceived;
00329
00333 TInt64 iPrevTransTime;
00334
00338 TUint64 iTriggeredJitterLevel;
00339
00340 };
00341
00342 typedef TPckgBuf<TMccRtpEventData> TMccRtpEventDataPackage;
00343
00350 class TMccRtcpEventData
00351 {
00352 public:
00353
00357 inline TMccRtcpEventData() :
00358 iRtcpPacketData( KNullDesC8 ),
00359 iRtcpPacketType( KRtcpPacketUndefined ),
00360 iSsrc( 0 )
00361 {
00362 iStats.iNumPacketsSent = 0;
00363 iStats.iCumNumOctetsSent = 0;
00364 iStats.iRoundTripDelay = 0;
00365 iStats.iTxBandwidth = 0;
00366 iStats.iCumNumPacketsLost = 0;
00367 iStats.iFractionLost = 0;
00368 iStats.iArrivalJitter = 0;
00369 iStats.iRxBandwidth = 0;
00370 iStats.iChannelBufferSize = 0;
00371 iStats.iNTPTimeStampSec = 0;
00372 iStats.iNTPTimeStampFrac = 0;
00373 iStats.iTimeStamp = 0;
00374 iTimeStamps.iNTPTimeStampSec = 0;
00375 iTimeStamps.iNTPTimeStampFrac = 0;
00376 iTimeStamps.iTimeStamp = 0;
00377 }
00378
00382 inline TMccRtcpEventData( const TMccRtcpEventData& aEventData ) :
00383 iRtcpPacketData( aEventData.iRtcpPacketData ),
00384 iRtcpPacketType( aEventData.iRtcpPacketType ),
00385 iSsrc( aEventData.iSsrc ),
00386 iTimeStamps( aEventData.iTimeStamps ),
00387 iStats( aEventData.iStats )
00388 {
00389 }
00390
00391 public:
00392
00396 TBuf8<KMccMaxRtcpPacketDataLength> iRtcpPacketData;
00397
00401 TMccRtcpPacketType iRtcpPacketType;
00402
00406 TUint32 iSsrc;
00407
00411 TTimeStamps iTimeStamps;
00412
00416 TRtpPeerStat iStats;
00417 };
00418
00419 typedef TPckgBuf<TMccRtcpEventData> TMccRtcpEventDataPackage;
00420
00424 class TMccDtmfEventData
00425 {
00426 public:
00427
00431 inline TMccDtmfEventData() :
00432 iDtmfEventType( KMccDtmfUnknown ),
00433 iContinue( EFalse ),
00434 iDtmfString( NULL ),
00435 iTimeStamp( 0 ),
00436 iSeqNum( 0 )
00437 {
00438 }
00439
00443 inline TMccDtmfEventData( const TMccDtmfEventData& aEventData ) :
00444 iDtmfEventType( aEventData.iDtmfEventType ),
00445 iContinue( aEventData.iContinue ),
00446 iDtmfString( aEventData.iDtmfString ),
00447 iTimeStamp( aEventData.iTimeStamp ),
00448 iSeqNum( aEventData.iSeqNum )
00449 {
00450 }
00451
00452 public:
00453
00457 TMccDtmfEventType iDtmfEventType;
00458
00462 TBool iContinue;
00463
00467 TBuf8<KMccMaxDtmfStringLength> iDtmfString;
00468
00472 TUint32 iTimeStamp;
00473
00477 TUint32 iSeqNum;
00478
00479 };
00480
00481 typedef TPckgBuf<TMccDtmfEventData> TMccDtmfEventDataPackage;
00482
00483 #endif // MMCCEVENTS_H