|
1 /* |
|
2 * Copyright (c) 2006 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 #ifndef MCCSUBCONTROLLERLOGS_H |
|
22 #define MCCSUBCONTROLLERLOGS_H |
|
23 |
|
24 |
|
25 #include "mcclogs.h" |
|
26 |
|
27 #if defined( _DEBUG ) && !defined( TEST_EUNIT ) |
|
28 |
|
29 #define __MCC_SUBCONTROLLER |
|
30 |
|
31 #endif |
|
32 |
|
33 #ifdef __MCC_SUBCONTROLLER |
|
34 |
|
35 _LIT(KSubcontroller, "Mcc/Subcontroller:"); |
|
36 |
|
37 #define __SUBCONTROLLER(a) \ |
|
38 { _LIT( KStr, a); TMccLog::Print( KSubcontroller, KStr ); } |
|
39 #define __SUBCONTROLLER_INT1(a, b) \ |
|
40 { _LIT( KStr, a); TMccLog::Print( KSubcontroller, KStr, b); } |
|
41 #define __SUBCONTROLLER_INT2(a, b, c, d) \ |
|
42 { _LIT( KStr1, a); _LIT( KStr2, c); TMccLog::Print( KSubcontroller, KStr1, b, KStr2, d); } |
|
43 #define __SUBCONTROLLER_STR(a, b) \ |
|
44 { _LIT( KStr, a); TMccLog::Print( KSubcontroller, KStr, b); } |
|
45 #define __SUBCONTROLLER_STR8(a, b) \ |
|
46 { _LIT( KStr, a); TMccLog::Print( KSubcontroller, KStr, b); } |
|
47 |
|
48 #define __SUBCONTROLLER_EVENT( event ){ \ |
|
49 _LIT( KMccEventLogFormat, "ses:%d, lnk:%d, str:%d, ep:%d, cat:%d, ty:%d, err:%d" );\ |
|
50 TBuf<110> eventTxt;\ |
|
51 eventTxt.Format( KMccEventLogFormat, event.iSessionId, event.iLinkId, event.iStreamId,\ |
|
52 event.iEndpointId, event.iEventCategory, event.iEventType, event.iErrorCode ); \ |
|
53 TMccLog::Print( KSubcontroller, eventTxt ); } |
|
54 |
|
55 #else |
|
56 |
|
57 #define __SUBCONTROLLER(a) |
|
58 #define __SUBCONTROLLER_INT1(a, b) |
|
59 #define __SUBCONTROLLER_INT2(a, b, c, d) |
|
60 #define __SUBCONTROLLER_STR(a, b) |
|
61 #define __SUBCONTROLLER_STR8(a, b) |
|
62 #define __SUBCONTROLLER_EVENT( event ) |
|
63 |
|
64 #endif |
|
65 |
|
66 #endif |