|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef MCESRVLOGS_H |
|
24 #define MCESRVLOGS_H |
|
25 |
|
26 #include <in_sock.h> |
|
27 #include "mcecomlogs.h" |
|
28 #include "mceevents.h" |
|
29 #include "mceclientserver.h" |
|
30 #include "mcesession.h" |
|
31 #include "mceaudiostream.h" |
|
32 #include "sipstrconsts.h" |
|
33 |
|
34 // INCLUDES |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 #ifdef MCESRV_UNIT_TEST_COVERAGE |
|
41 |
|
42 #undef _DEBUG |
|
43 |
|
44 #endif |
|
45 |
|
46 /** |
|
47 * Class provides logging through RDebug in debug builds |
|
48 * 'MCE: ' added automatically in fron of every logged line |
|
49 */ |
|
50 class TMceSrvDebug |
|
51 { |
|
52 public: |
|
53 |
|
54 #ifdef _DEBUG |
|
55 |
|
56 inline static void Print( const TDesC16& aStr ) |
|
57 { |
|
58 TChar notAllowed('%'); |
|
59 if ( aStr.Locate( notAllowed ) == KErrNotFound ) |
|
60 { |
|
61 _LIT(KMceFormat, "[Server] %S"); |
|
62 |
|
63 TBuf<256> str; |
|
64 str.Format(KMceFormat, &aStr); |
|
65 TMceDebug::Print( str, ETrue ); |
|
66 } |
|
67 else |
|
68 { |
|
69 _LIT(KMceWarning, "MCE: Text contains not allowed characters, log ignored"); |
|
70 RDebug::Print( KMceWarning ); |
|
71 } |
|
72 } |
|
73 |
|
74 inline static void Print( const TDesC16& aStr1, TUint32 aValue1 ) |
|
75 { |
|
76 TChar notAllowed('%'); |
|
77 if ( aStr1.Locate( notAllowed ) == KErrNotFound ) |
|
78 { |
|
79 _LIT(KMceFormat, "[Server] %S=%d"); |
|
80 TBuf<256> str; |
|
81 str.Format(KMceFormat, &aStr1, aValue1); |
|
82 TMceDebug::Print( str, ETrue ); |
|
83 } |
|
84 else |
|
85 { |
|
86 _LIT(KMceWarning, "MCE: Text contains not allowed characters, log ignored"); |
|
87 RDebug::Print( KMceWarning ); |
|
88 } |
|
89 } |
|
90 |
|
91 inline static void Print( const TDesC16& aStr1, const TDesC16& aStr2 ) |
|
92 { |
|
93 TChar notAllowed('%'); |
|
94 if ( aStr1.Locate( notAllowed ) == KErrNotFound && |
|
95 aStr2.Locate( notAllowed ) == KErrNotFound ) |
|
96 { |
|
97 _LIT(KMceFormat, "[Server] %S=%S"); |
|
98 TBuf<256> str; |
|
99 str.Format(KMceFormat, &aStr1, &aStr2); |
|
100 TMceDebug::Print( str, ETrue ); |
|
101 } |
|
102 else |
|
103 { |
|
104 _LIT(KMceWarning, "MCE: Text contains not allowed characters, log ignored"); |
|
105 RDebug::Print( KMceWarning ); |
|
106 } |
|
107 } |
|
108 |
|
109 inline static void Print( const TDesC16& aStr1, TUint32 aValue1, const TDesC16& aStr2, TUint32 aValue2 ) |
|
110 { |
|
111 TChar notAllowed('%'); |
|
112 if ( aStr1.Locate( notAllowed ) == KErrNotFound ) |
|
113 { |
|
114 _LIT(KMceFormat, "[Server] %S=%d, %S=%d"); |
|
115 TBuf<256> str; |
|
116 str.Format(KMceFormat, &aStr1, aValue1, &aStr2, aValue2 ); |
|
117 TMceDebug::Print( str ); |
|
118 } |
|
119 else |
|
120 { |
|
121 _LIT(KMceWarning, "MCE: Text contains not allowed characters, log ignored"); |
|
122 RDebug::Print( KMceWarning ); |
|
123 } |
|
124 } |
|
125 |
|
126 inline static void Print( const TDesC16& aStr1, TUint32 aValue1, const TDesC16& aStr2 ) |
|
127 { |
|
128 TChar notAllowed('%'); |
|
129 if ( aStr1.Locate( notAllowed ) == KErrNotFound ) |
|
130 { |
|
131 _LIT(KMceFormat, "[Server] %S=%d %S"); |
|
132 TBuf<256> str; |
|
133 str.Format(KMceFormat, &aStr1, aValue1, &aStr2 ); |
|
134 TMceDebug::Print( str ); |
|
135 } |
|
136 else |
|
137 { |
|
138 _LIT(KMceWarning, "MCE: Text contains not allowed characters, log ignored"); |
|
139 RDebug::Print( KMceWarning ); |
|
140 } |
|
141 } |
|
142 |
|
143 inline static void Print( const TDesC16& aStr1, const TDesC8& aValue1 ) |
|
144 { |
|
145 TChar notAllowed('%'); |
|
146 if ( aStr1.Locate( notAllowed ) == KErrNotFound ) |
|
147 { |
|
148 TBuf<100> str2; |
|
149 CnvUtfConverter::ConvertToUnicodeFromUtf8(str2, aValue1); |
|
150 |
|
151 _LIT(KMceFormat, "[Server] %S=\"%S\""); |
|
152 TBuf<256> str; |
|
153 str.Format(KMceFormat, &aStr1, &str2); |
|
154 TMceDebug::Print( str ); |
|
155 } |
|
156 else |
|
157 { |
|
158 _LIT(KMceWarning, "MCE: Text contains not allowed characters, log ignored"); |
|
159 RDebug::Print( KMceWarning ); |
|
160 } |
|
161 } |
|
162 |
|
163 inline static void Print( const TDesC16& aStr, const TInetAddr& aAddr ) |
|
164 { |
|
165 const TInt KIPv6AddrMaxLen = 39; |
|
166 TChar notAllowed('%'); |
|
167 if ( aStr.Locate( notAllowed ) == KErrNotFound ) |
|
168 { |
|
169 TBuf<KIPv6AddrMaxLen> addrBuf; |
|
170 aAddr.Output(addrBuf); |
|
171 _LIT(KMceFormat, "MCE: [Server] %S=%S port %d"); |
|
172 TBuf<256> str; |
|
173 str.Format(KMceFormat, &aStr, &addrBuf, aAddr.Port()); |
|
174 RDebug::RawPrint(str); |
|
175 } |
|
176 else |
|
177 { |
|
178 _LIT(KMceWarning, "MCE: Text contains not allowed characters, log ignored"); |
|
179 RDebug::Print( KMceWarning ); |
|
180 } |
|
181 } |
|
182 |
|
183 |
|
184 #endif |
|
185 |
|
186 }; |
|
187 |
|
188 |
|
189 #ifdef _DEBUG |
|
190 |
|
191 #define MCESRV_DEBUG( a ) { TMceSrvDebug::Print( _L( a ) ); } |
|
192 #define MCESRV_DEBUG2( a, b ) { TMceSrvDebug::Print( _L( a ), _L( b ) ); } |
|
193 #define MCESRV_DEBUG_DVALUE( a, b ) { TMceSrvDebug::Print( _L( a ), b ); } |
|
194 #define MCESRV_DEBUG_ADDRVALUE( a, b ) { TMceSrvDebug::Print( _L( a ), b ); } |
|
195 #define MCESRV_DEBUG_DVALUES( a, b, c, d ) { TMceSrvDebug::Print( _L( a ), b, _L( c ), d ); } |
|
196 #define MCESRV_DEBUG_SVALUE( a, b ) { TMceSrvDebug::Print( _L( a ), b ); } |
|
197 #define MCESRV_DEBUG_SVALUE16( a, b ) { TMceSrvDebug::Print( _L( a ), b ); } |
|
198 |
|
199 #define MCESRV_DEBUG_CALLBACK( str, callback )\ |
|
200 MCE_DEBUG_CALLBACK( TMceSrvDebug, str, callback ) |
|
201 |
|
202 #define MCESRV_DEBUG_DATATYPE( str, datatype )\ |
|
203 MCE_DEBUG_DATATYPE( TMceSrvDebug, str, datatype ) |
|
204 |
|
205 #define MCESRV_DEBUG_CLISTATE( str, state )\ |
|
206 MCE_DEBUG_CLISTATE( TMceSrvDebug, str, state ) |
|
207 |
|
208 #define MCESRV_DEBUG_ITC( str, event )\ |
|
209 MCE_DEBUG_ITC( TMceSrvDebug, str, event ) |
|
210 |
|
211 #define MCESRV_DEBUG_SESSIONTYPE( str, type )\ |
|
212 MCE_DEBUG_SESSIONTYPE( TMceSrvDebug, str, type ) |
|
213 |
|
214 #define MCESRV_DEBUG_DIALOGTYPE( str, type )\ |
|
215 MCE_DEBUG_DIALOGTYPE( TMceSrvDebug, str, type ) |
|
216 |
|
217 #define MCESRV_DEBUG_MEDIASTATE( str, state )\ |
|
218 MCE_DEBUG_MEDIASTATE( TMceSrvDebug, str, state ) |
|
219 |
|
220 #define MCESRV_DEBUG_EVENTSTATE( str, state )\ |
|
221 MCE_DEBUG_EVENTSTATE( TMceSrvDebug, str, state ) |
|
222 |
|
223 #define MCESRV_DEBUG_ARRAY( str, line, array )\ |
|
224 if ( array )\ |
|
225 {\ |
|
226 MCESRV_DEBUG( str );\ |
|
227 for( TInt _mced_array_ndx=0;_mced_array_ndx < array->MdcaCount();_mced_array_ndx++ )\ |
|
228 {\ |
|
229 MCESRV_DEBUG_SVALUE( line, array->MdcaPoint( _mced_array_ndx ) );\ |
|
230 }\ |
|
231 } |
|
232 |
|
233 |
|
234 // MCE_DEBUG_ARRAY( TMceSrvDebug, str, line, array ) |
|
235 |
|
236 #define MCESRV_DEBUG_METHOD( str, method )\ |
|
237 switch( method )\ |
|
238 {\ |
|
239 case SipStrConsts::EInvite:{ MCESRV_DEBUG2( str, "INVITE" );break; }\ |
|
240 case SipStrConsts::EUpdate:{ MCESRV_DEBUG2( str, "UPDATE" );break; }\ |
|
241 case SipStrConsts::EPrack:{ MCESRV_DEBUG2( str, "PRACK" );break; }\ |
|
242 case SipStrConsts::EBye:{ MCESRV_DEBUG2( str, "BYE" );break; }\ |
|
243 case SipStrConsts::ESubscribe:{ MCESRV_DEBUG2( str, "SUBSCRIBE" );break; }\ |
|
244 case SipStrConsts::ERefer:{ MCESRV_DEBUG2( str, "REFER" );break; }\ |
|
245 case SipStrConsts::EOptions:{ MCESRV_DEBUG2( str, "OPTIONS" );break; }\ |
|
246 case SipStrConsts::EAck:{ MCESRV_DEBUG2( str, "ACK" );break; }\ |
|
247 default:{ MCESRV_DEBUG2( str, "UNKNOWN METHOD" );break; }\ |
|
248 } |
|
249 |
|
250 |
|
251 #define MCESRV_DEBUG_STATE( str, state )\ |
|
252 switch( state )\ |
|
253 {\ |
|
254 case KMceStateIdle:{ MCESRV_DEBUG2( str, "KMceStateIdle" );break; }\ |
|
255 case KMceStateClientEstablishing:{ MCESRV_DEBUG2( str, "KMceStateClientEstablishing" );break; }\ |
|
256 case KMceStateOffering:{ MCESRV_DEBUG2( str, "KMceStateOffering" );break; }\ |
|
257 case KMceStateEstablished:{ MCESRV_DEBUG2( str, "KMceStateEstablished" );break; }\ |
|
258 case KMceStateTerminating:{ MCESRV_DEBUG2( str, "KMceStateTerminating" );break; }\ |
|
259 case KMceStateTerminated:{ MCESRV_DEBUG2( str, "KMceStateTerminated" );break; }\ |
|
260 case KMceStateServerEstablishing:{ MCESRV_DEBUG2( str, "KMceStateServerEstablishing" );break; }\ |
|
261 case KMceStateUpdating:{ MCESRV_DEBUG2( str, "KMceStateUpdating" );break; }\ |
|
262 case KMceStateUpdated:{ MCESRV_DEBUG2( str, "KMceStateUpdated" );break; }\ |
|
263 case KMceStateAnswering:{ MCESRV_DEBUG2( str, "KMceStateAnswering" );break; }\ |
|
264 case KMceStateError:{ MCESRV_DEBUG2( str, "KMceStateError" );break; }\ |
|
265 case KMceStateCanceled:{ MCESRV_DEBUG2( str, "KMceStateCanceled" );break; }\ |
|
266 default:{ MCESRV_DEBUG_DVALUE( str, state );break; }\ |
|
267 } |
|
268 |
|
269 #define MCESRV_DEBUG_MCE_EVENT( str, event )\ |
|
270 switch( (TMceMediaEventCode)event )\ |
|
271 {\ |
|
272 case EMceMediaSessionStopped:{ MCESRV_DEBUG2( str, "EMceMediaSessionStopped" );break; }\ |
|
273 case EMceMediaError:{ MCESRV_DEBUG2( str, "EMceMediaError" );break; }\ |
|
274 case EMceMediaReserved:{ MCESRV_DEBUG2( str, "EMceMediaReserved" );break; }\ |
|
275 case EMceMediaUpdated:{ MCESRV_DEBUG2( str, "EMceMediaUpdated" );break; }\ |
|
276 case EMceMediaEventReceived:{ MCESRV_DEBUG2( str, "EMceMediaEventReceived" );break; }\ |
|
277 default:{ MCESRV_DEBUG_SIP_EVENT( str, event );break; }\ |
|
278 } |
|
279 |
|
280 |
|
281 #define MCESRV_DEBUG_SIP_EVENT( str, event )\ |
|
282 switch( (TMceSipEventCode)event )\ |
|
283 {\ |
|
284 case EMceRegister:{ MCESRV_DEBUG2( str, "EMceRegister" );break; }\ |
|
285 case EMceInvite:{ MCESRV_DEBUG2( str, "EMceInvite" );break; }\ |
|
286 case EMceCancel:{ MCESRV_DEBUG2( str, "EMceCancel" );break; }\ |
|
287 case EMceAck:{ MCESRV_DEBUG2( str, "EMceAck" );break; }\ |
|
288 case EMceBye:{ MCESRV_DEBUG2( str, "EMceBye" );break; }\ |
|
289 case EMcePrack:{ MCESRV_DEBUG2( str, "EMcePrack" );break; }\ |
|
290 case EMceUpdate:{ MCESRV_DEBUG2( str, "EMceUpdate" );break; }\ |
|
291 case EMceSubscribe:{ MCESRV_DEBUG2( str, "EMceSubscribe" );break; }\ |
|
292 case EMceRefer:{ MCESRV_DEBUG2( str, "EMceRefer" );break; }\ |
|
293 case EMceMessage:{ MCESRV_DEBUG2( str, "EMceMessage" );break; }\ |
|
294 case EMceInfo:{ MCESRV_DEBUG2( str, "EMceInfo" );break; }\ |
|
295 case EMceResponse:{ MCESRV_DEBUG2( str, "EMceResponse" );break; }\ |
|
296 case EMceProvisionalResponse:{ MCESRV_DEBUG2( str, "EMceProvisionalResponse" );break; }\ |
|
297 case EMceRedirectionResponse:{ MCESRV_DEBUG2( str, "EMceRedirectionResponse" );break; }\ |
|
298 case EMceErrorResponse:{ MCESRV_DEBUG2( str, "EMceErrorResponse" );break; }\ |
|
299 case EMceStandAloneRequest:{ MCESRV_DEBUG2( str, "EMceStandAloneRequest" );break; }\ |
|
300 case EMceStandAloneResponse:{ MCESRV_DEBUG2( str, "EMceStandAloneResponse" );break; }\ |
|
301 case EMceSessionExpired:{ MCESRV_DEBUG2( str, "EMceSessionExpired" );break; }\ |
|
302 case EMceSessionRefresh:{ MCESRV_DEBUG2( str, "EMceSessionRefresh" );break; }\ |
|
303 default:{ MCESRV_DEBUG_DVALUE( str, event );break; }\ |
|
304 } |
|
305 |
|
306 #define MCESRV_DEBUG_EVENT( str, event )\ |
|
307 if( (TMceItcFunctions)event <= EMceItcCancelTranscode )\ |
|
308 {\ |
|
309 MCESRV_DEBUG_ITC( str, event );\ |
|
310 }\ |
|
311 else if ( (TMceMediaEventCode)event >= EMceMediaSessionStopped && (TMceMediaEventCode)event <= EMceMediaEventReceived )\ |
|
312 {\ |
|
313 MCESRV_DEBUG_MCE_EVENT( str, event );\ |
|
314 }\ |
|
315 else if ( (TMceSipEventCode)event >= EMceRegister && (TMceSipEventCode)event <= EMceReliableFailed )\ |
|
316 {\ |
|
317 MCESRV_DEBUG_SIP_EVENT( str, event );\ |
|
318 } |
|
319 |
|
320 |
|
321 #define MCESRV_DEBUG_SUBSTATE( str, state )\ |
|
322 switch( state )\ |
|
323 {\ |
|
324 case CMceSipSession::ENone:{ MCESRV_DEBUG2( str, "ENone" );break; }\ |
|
325 case CMceSipSession::EOffering:{ MCESRV_DEBUG2( str, "EOffering" );break; }\ |
|
326 case CMceSipSession::EAnswering:{ MCESRV_DEBUG2( str, "EAnswering" );break; }\ |
|
327 case CMceSipSession::EUpdating:{ MCESRV_DEBUG2( str, "EUpdating" );break; }\ |
|
328 case CMceSipSession::ERefreshing:{ MCESRV_DEBUG2( str, "ERefreshing" );break; }\ |
|
329 default:{ MCESRV_DEBUG_DVALUE( str, state );break; }\ |
|
330 } |
|
331 |
|
332 #define MCESRV_DEBUG_IDS( str, ids )\ |
|
333 MCESRV_DEBUG( str );\ |
|
334 MCESRV_DEBUG_DVALUE("application uid", ids.iAppUID );\ |
|
335 MCESRV_DEBUG_SESSIONTYPE("session type", ids.iManagerType );\ |
|
336 MCESRV_DEBUG_DVALUE("session id", ids.iSessionID );\ |
|
337 MCESRV_DEBUG_DIALOGTYPE("dialog type", ids.iDialogType );\ |
|
338 MCESRV_DEBUG_DVALUE("dialog id", ids.iDialogID );\ |
|
339 MCESRV_DEBUG_DVALUE("profile id", ids.iProfileID );\ |
|
340 MCESRV_DEBUG_DATATYPE("message type", ids.iMsgType );\ |
|
341 MCESRV_DEBUG_CALLBACK( "callback", ids.iCallbackID );\ |
|
342 MCESRV_DEBUG_CLISTATE("state", ids.iState );\ |
|
343 MCESRV_DEBUG_DVALUE("spare1", ids.iSpare1 );\ |
|
344 MCESRV_DEBUG_DVALUE("spare2", ids.iSpare2 );\ |
|
345 MCESRV_DEBUG_DVALUE("status", ids.iStatus );\ |
|
346 MCESRV_DEBUG_DVALUE("media id", ids.iMediaID.iId );\ |
|
347 MCESRV_DEBUG_DVALUE("source id", ids.iSourceID.iId );\ |
|
348 MCESRV_DEBUG_DVALUE("sink id", ids.iSinkID.iId );\ |
|
349 MCESRV_DEBUG_DVALUE("codec id", ids.iCodecID.iId ) |
|
350 |
|
351 |
|
352 #define MCESRV_DEBUG_CODEC( str, codec )\ |
|
353 if ( codec )\ |
|
354 {\ |
|
355 MCESRV_DEBUG( str );\ |
|
356 MCESRV_DEBUG_DVALUES(" iID.iAppId", codec->iID.iAppId, "iID.iId", codec->iID.iId );\ |
|
357 MCESRV_DEBUG_DVALUE( " iEnableVAD", codec->iEnableVAD );\ |
|
358 MCESRV_DEBUG_DVALUE( " iSamplingFreq", codec->iSamplingFreq );\ |
|
359 MCESRV_DEBUG_SVALUE( " iSdpName", codec->iSdpName );\ |
|
360 MCESRV_DEBUG_DVALUE( " iPTime", codec->iPTime );\ |
|
361 MCESRV_DEBUG_DVALUE( " iMaxPTime", codec->iMaxPTime );\ |
|
362 MCESRV_DEBUG_DVALUE( " iBitrate", codec->iBitrate );\ |
|
363 MCESRV_DEBUG_DVALUE( " iAllowedBitrates", codec->iAllowedBitrates );\ |
|
364 MCESRV_DEBUG_DVALUE( " iPayloadType", codec->iPayloadType );\ |
|
365 MCESRV_DEBUG_DVALUE( " iCodecMode", codec->iCodecMode );\ |
|
366 MCESRV_DEBUG_DVALUE( " iFourCC", codec->iFourCC );\ |
|
367 MCESRV_DEBUG_SVALUE( " iFmtpAttr", codec->iFmtpAttr ? *codec->iFmtpAttr : KNullDesC8() );\ |
|
368 MCESRV_DEBUG_DVALUE( " iFrameSize", codec->iFrameSize );\ |
|
369 MCESRV_DEBUG_DVALUE( " iStream", (TUint32)codec->Stream() );\ |
|
370 } |
|
371 |
|
372 #define _MCESRV_DEBUG_MEDIASTREAM( str, media )\ |
|
373 MCESRV_DEBUG( str );\ |
|
374 MCESRV_DEBUG_DVALUES(" iID.iAppId", media->iID.iAppId, "iID.iId", media->iID.iId );\ |
|
375 MCESRV_DEBUG_DVALUE( " iType", media->iType );\ |
|
376 MCESRV_DEBUG_DVALUE( " iIsEnabled", media->iIsEnabled );\ |
|
377 MCESRV_DEBUG_DVALUE( " iLocalMediaPort", media->iLocalMediaPort );\ |
|
378 MCESRV_DEBUG_DVALUE( " iRemoteMediaPort", media->iRemoteMediaPort );\ |
|
379 MCESRV_DEBUG_DVALUE( " iRemoteRtcpPort", media->iRemoteRtcpPort );\ |
|
380 MCESRV_DEBUG_ARRAY( " iLocalMediaSDPLines:", " medialine", media->iLocalMediaSDPLines );\ |
|
381 MCESRV_DEBUG_ARRAY( " iRemoteMediaSDPLines:", " medialine", media->iRemoteMediaSDPLines );\ |
|
382 MCESRV_DEBUG_DVALUE( " iSession", (TUint32)media->Session() ) |
|
383 |
|
384 |
|
385 #define MCESRV_DEBUG_MEDIASTREAM( str, media )\ |
|
386 if ( media )\ |
|
387 {\ |
|
388 _MCESRV_DEBUG_MEDIASTREAM( str, media );\ |
|
389 if ( media->iType == KMceAudio )\ |
|
390 {\ |
|
391 CMceComAudioStream* audio = static_cast<CMceComAudioStream*>( media );\ |
|
392 TInt _mced_codec_ndx = 0;\ |
|
393 for( _mced_codec_ndx=0;_mced_codec_ndx < audio->CodecCount();_mced_codec_ndx++)\ |
|
394 {\ |
|
395 MCESRV_DEBUG_CODEC( " codec:", audio->CodecL( _mced_codec_ndx ) );\ |
|
396 }\ |
|
397 if ( audio->iLinkedStream )\ |
|
398 {\ |
|
399 _MCESRV_DEBUG_MEDIASTREAM( " linked stream:", audio->iLinkedStream );\ |
|
400 if ( audio->iLinkedStream->iType == KMceAudio )\ |
|
401 {\ |
|
402 audio = static_cast<CMceComAudioStream*>( audio->iLinkedStream );\ |
|
403 for( _mced_codec_ndx=0;_mced_codec_ndx < audio->CodecCount();_mced_codec_ndx++)\ |
|
404 {\ |
|
405 MCESRV_DEBUG_CODEC( " codec:", audio->CodecL( _mced_codec_ndx ) );\ |
|
406 }\ |
|
407 }\ |
|
408 }\ |
|
409 }\ |
|
410 } |
|
411 |
|
412 /*lint -e666 */ |
|
413 |
|
414 #define MCESRV_DEBUG_COMSESSION( body )\ |
|
415 MCESRV_DEBUG_DVALUE("id", body->iID );\ |
|
416 MCESRV_DEBUG_DVALUE("type", body->iType );\ |
|
417 MCESRV_DEBUG_DVALUE("state", body->iState );\ |
|
418 MCESRV_DEBUG_SVALUE("recipient", body->iRecipient ? *body->iRecipient : KNullDesC8() );\ |
|
419 MCESRV_DEBUG_SVALUE("originator", body->iOriginator ? *body->iOriginator : KNullDesC8() );\ |
|
420 MCESRV_DEBUG_DVALUE("connectionActive", body->iIsConnectionActive );\ |
|
421 MCESRV_DEBUG_DVALUE("dialog id", body->iDialogId );\ |
|
422 MCESRV_DEBUG_DVALUE("iap id", body->iIapId );\ |
|
423 MCESRV_DEBUG_DVALUE("timeout", body->iTimeout );\ |
|
424 MCESRV_DEBUG_DVALUE("min se", body->iMinSE );\ |
|
425 MCESRV_DEBUG_DVALUE("refresher", body->iRefresh );\ |
|
426 MCESRV_DEBUG_DVALUE("mcc id", body->iMccID );\ |
|
427 MCESRV_DEBUG_ARRAY( "SIP headers:", " header", body->iSIPHeaders );\ |
|
428 MCESRV_DEBUG_ARRAY( "local session SDP lines:", " medialine", body->iLocalSessionSDPLines );\ |
|
429 MCESRV_DEBUG_ARRAY( "remote session SDP lines:", " medialine", body->iRemoteSessionSDPLines );\ |
|
430 MCESRV_DEBUG_SVALUE("content type", body->iSIPContentType ? *body->iSIPContentType : KNullDesC8() );\ |
|
431 for( TInt _mced_stream_ndx=0; _mced_stream_ndx < body->Streams().Count(); _mced_stream_ndx++ )\ |
|
432 {\ |
|
433 MCESRV_DEBUG_MEDIASTREAM( " stream:", body->Streams()[ _mced_stream_ndx ] );\ |
|
434 } |
|
435 |
|
436 #else |
|
437 |
|
438 |
|
439 #define MCESRV_DEBUG( a ) |
|
440 #define MCESRV_DEBUG2( a, b ) |
|
441 #define MCESRV_DEBUG_DVALUE( a, b ) |
|
442 #define MCESRV_DEBUG_ADDRVALUE( a, b ) |
|
443 #define MCESRV_DEBUG_DVALUES( a, b, c, d ) |
|
444 #define MCESRV_DEBUG_SVALUE( a, b ) |
|
445 #define MCESRV_DEBUG_SVALUE16( a, b ) |
|
446 #define MCESRV_DEBUG_CALLBACK( str, callback ) |
|
447 #define MCESRV_DEBUG_DATATYPE( str, datatype ) |
|
448 #define MCESRV_DEBUG_CLISTATE( str, state ) |
|
449 #define MCESRV_DEBUG_ITC( str, event ) |
|
450 #define MCESRV_DEBUG_SESSIONTYPE( str, type ) |
|
451 #define MCESRV_DEBUG_DIALOGTYPE( str, type ) |
|
452 #define MCESRV_DEBUG_MEDIASTATE( str, state ) |
|
453 #define MCESRV_DEBUG_EVENTSTATE( str, state ) |
|
454 #define MCESRV_DEBUG_ARRAY( str, line, array ) |
|
455 #define MCESRV_DEBUG_METHOD( str, method ) |
|
456 #define MCESRV_DEBUG_STATE( str, state ) |
|
457 #define MCESRV_DEBUG_CLISTATE( str, state ) |
|
458 #define MCESRV_DEBUG_EVENT( str, event ) |
|
459 #define MCESRV_DEBUG_MCE_EVENT( str, event ) |
|
460 #define MCESRV_DEBUG_SIP_EVENT( str, event ) |
|
461 #define MCESRV_DEBUG_SUBSTATE( str, state ) |
|
462 #define MCESRV_DEBUG_IDS( str, ids ) |
|
463 #define MCESRV_DEBUG_CALLBACK( str, callback ) |
|
464 #define MCESRV_DEBUG_CODEC( str, codec ) |
|
465 #define MCESRV_DEBUG_MEDIASTREAM( str, audio ) |
|
466 #define _MCESRV_DEBUG_MEDIASTREAM( str, media ) |
|
467 #define MCESRV_DEBUG_COMSESSION( body ) |
|
468 |
|
469 #endif |
|
470 |
|
471 #endif |
|
472 |
|
473 // End of File |