author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 14 May 2010 16:59:23 +0300 | |
changeset 21 | 5e5528a288fe |
parent 0 | 29b1cd4cb562 |
child 51 | 20ac952a623c |
permissions | -rw-r--r-- |
0
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
// All rights reserved. |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
// under the terms of "Eclipse Public License v1.0" |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
// |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
// |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
// Contributors: |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
// |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
// Description: |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
// Central place for nice debug-type macros & functions |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
// |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
// |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
#ifndef BT_DEBUG_H |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#define BT_DEBUG_H |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#ifdef __USING_POLICING_ESOCK__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#undef __USING_POLICING_ESOCK__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#endif |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
//#define __USING_POLICING_ESOCK__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#include <e32std.h> |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#include <f32file.h> |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
#include <comms-infras/commsdebugutility.h> |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
#ifdef __FLOG_ACTIVE // = commsdbg logging on |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
//#define BLOGGING__ //removed for MCL submission |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
#define __FLOGGING__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
#endif // __FLOG_ACTIVE |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
// Borrowed from comms-framework - experimental ASSERT variants that |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
// breakpt at the scene of the crime. |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
#ifdef _DEBUG |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
#if defined (__WINS__) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
#undef __ASSERT_DEBUG |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
inline void About_To_Panic_Thread() { __DEBUGGER() } |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
#define __ASSERT_DEBUG(c,p) (void)((c)||(About_To_Panic_Thread(),p,0)) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
#undef __ASSERT_ALWAYS |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
#define __ASSERT_ALWAYS(c,p) (void)((c)||(About_To_Panic_Thread(),p,0)) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
#endif |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
#endif |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
class CBlogger; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
class CDeltaTimer; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
class CDebugControlInterface; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
class CAvdtpLogEngine; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
class CAvctpLogEngine; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
struct SBtTls |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
public: |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
CDeltaTimer* iTimer; // always needed: not owned |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
TUint iPort; // the serial port we are on - for logging only |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
CBlogger* iBlogger; // for logging only |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
CDebugControlInterface* iDebugCtrlIF; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
CAvdtpLogEngine* iAvdtpLogEngine; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
CAvctpLogEngine* iAvctpLogEngine; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
}; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
#define BTTLS static_cast<SBtTls*>(Dll::Tls()) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
#ifdef __USING_POLICING_ESOCK__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
#else |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
enum TCapabilityRequestType |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
//Socket Capability |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
ESetOptCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
EGetOptCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
EIoctlCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
EBindCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
76 |
EListenCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
EConnectionCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
EWriteCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
EReceiveCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
EGetLocalNameCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
EGetRemoteNameCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
//HostResolver |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
EHRGetByNameCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
EHRGetByAddressCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
EHRSetHostNameCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
EHRGetHostNameCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
// NetDataBase |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
ENDQueryCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
ENDAddCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
ENDRemoveCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
// ServiceResolver |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
ESRGetByNameCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
ESRGetByNumberCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
ESRRegisterServiceCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
ESRRemoveServiceCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
//Cconnection |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
EReadCommdbCheck, |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
EControlCheck |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
}; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
#endif |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
static const TInt KL2CAPDebugOptionMask = 0xFFFF; //< SetOpt for debugging modes in L2CAP |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
static const TUint KL2CAPDebugSendRequestsTwice = 1; //< Send L2CAP requests twice |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
static const TUint KL2CAPDebugInvalidL2CAPLengthInConnect= 3; //< Set the L2CAP length wrong |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
static const TUint KL2CAPDebugInvalidL2CAPLengthInData=4;//< Set the L2CAP length wrong |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
#ifndef LOGGER_H |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
_LIT(KLogFile,"btlog0.txt"); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
const TInt KLogIndexOffset=5; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
_LIT(KLogDirFullName,"c:\\logs\\bt\\"); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
_LIT(KLogDir,"BT"); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
120 |
//#define COMMENT SLASH(/) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
#define COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
//#define SLASH(s) /##s |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
#ifndef BLOGGING__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
// define empty blogging macro stubs |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
#define BLOGGER COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
#define BLOG(layer,verbosity,type,blog_call,cbloggette_type) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
//------- Blogging for BT Qual ------------ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
#define LLQBLOG(type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
#define L2QBLOG(type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
#define RFQBLOG(type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
//------- Loud Blogging Calls ------------- |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
#define LLLBLOG(type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
#define L2LBLOG(type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
#define RFLBLOG(type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
//------- Generic Blogging calls ---------- |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
#define LLBLOG(verbosity,type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
#define L2BLOG(verbosity,type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
#define RFBLOG(verbosity,type,blog_call) COMMENT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
#else // define blogging calls |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
#define BLOGGER BTTLS->iBlogger |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
#define BLOG(layer,verbosity,type,blog_call,cbloggette_type) \ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
{ \ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
CBlogger* pBlog = BLOGGER; \ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
CBloggette* pBloggette;\ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
if((pBlog->LoggingMask(layer,verbosity))&(type)) \ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
{ \ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
pBloggette=(pBlog->GetLayerBloggette(layer)); \ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
(STATIC_CAST(cbloggette_type*,pBloggette))->blog_call; \ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
} \ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
// the blog_call should look like Log(KMyFormatingLit,var1,var2,varbla); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
// or L2BLOG(KVerbose,Log(KL2ConnLit, connH, addr)); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
// or L2BLOG(KVerbose,ConnLog(connH,addr)); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
//------- Blogging for BT Qual ------------ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
#define LLQBLOG(type,blog_call) BLOG(KBlogLayerLinkLayer,KBlogVerbosityBTQualLevel,type,blog_call, CLLBloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
#define L2QBLOG(type,blog_call) BLOG(KBlogLayerL2CAP,KBlogVerbosityBTQualLevel,type,blog_call, CL2Bloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
#define RFQBLOG(type,blog_call) BLOG(KBlogLayerRFComm,KBlogVerbosityBTQualLevel,type,blog_call, CRFBloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
//------- Loud Blogging Calls ------------- |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
#define LLLBLOG(type,blog_call) BLOG(KBlogLayerLinkLayer,KBlogVerbosityLoud,type,blog_call,CLLBloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
#define L2LBLOG(type,blog_call) BLOG(KBlogLayerL2CAP,KBlogVerbosityLoud,type,blog_call, CL2Bloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
161 |
#define RFLBLOG(type,blog_call) BLOG(KBlogLayerRFComm,KBlogVerbosityLoud,type,blog_call, CRFBloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
//------- Generic Blogging calls ---------- |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
#define LLBLOG(verbosity,type,blog_call) BLOG(KBlogLayerLinkLayer,verbosity,type,blog_call,CLLBloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
#define L2BLOG(verbosity,type,blog_call) BLOG(KBlogLayerL2CAP,verbosity,type,blog_call,CL2Bloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
#define RFBLOG(verbosity,type,blog_call) BLOG(KBlogLayerRFComm,verbosity,type,blog_call,CRFBloggette) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
#endif |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
inline void __BTDEBUGGER() |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
// needed to call __DEBUGGER inside an __ASSERT |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
__DEBUGGER() |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
#ifdef __FLOGGING__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
#define FLOG(a) {FPrint(a);} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
#define FTRACE(a) {a;} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
inline void FPrint(const TRefByValue<const TDesC> aFmt, ...) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
VA_LIST list; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
VA_START(list,aFmt); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
TBuf<32> logFile(KLogFile); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
183 |
#ifdef BLOGGING__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
// the Blogger holds the flogging file index since it is pointed by the TLS |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
185 |
CBlogger* pBlog = BLOGGER; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
186 |
logFile[KLogIndexOffset]=TText('0'+(TInt)pBlog->GetFloggerInfo()); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
187 |
#else |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
logFile[KLogIndexOffset]=TText('0'+BTTLS->iPort); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
#endif |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
RFileLogger::WriteFormat(KLogDir, logFile, EFileLoggingModeAppend, aFmt, list); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
#ifdef MEMTRACE |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
TInt size; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
User::Heap().AllocSize(size); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
RFileLogger::WriteFormat(KLogDir, logFile, EFileLoggingModeAppend, _L("Mem usage: %d high: %d"), size, User::Heap().Size()); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
#endif |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
inline void FHex(const TUint8* aPtr, TInt aLen) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
TBuf<32> logFile(KLogFile); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
logFile[KLogIndexOffset]=TText('0'+BTTLS->iPort); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
203 |
RFileLogger::HexDump(KLogDir, logFile, EFileLoggingModeAppend, 0, 0, aPtr, aLen); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
204 |
} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
205 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
206 |
inline void FHex(const TDesC8& aDes) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
207 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
FHex(aDes.Ptr(), aDes.Length()); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
212 |
#define SCO_LOG(a) FPrint(a); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
#define SCO_LOG_2(a, b) FPrint(a, b); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
#define SCO_LOG_3(a, b, c) FPrint(a, b, c); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
215 |
#define SCO_LOG_4(a, b, c, d) FPrint(a, b, c, d); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
#define SCO_LOG_5(a, b, c, d, e) FPrint(a, b, c, d, e); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
#define SCO_LOG_6(a, b, c, d, e, f) FPrint(a, b, c, d, e, f); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
#define SCO_LOG_ADDR(string, addr) { TBuf<20> addrbuf; addrbuf.Format(_L("%02x:%02x:%02x:%02x:%02x:%02x"), addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); SCO_LOG_2(string, &addrbuf); } |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
219 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
#else // i.e. __FLOGGING__ undefined |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
221 |
#define FLOG(a) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
#define FTRACE(a) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
#define SCO_LOG(a) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
#define SCO_LOG_2(a, b) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
226 |
#define SCO_LOG_3(a, b, c) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
#define SCO_LOG_4(a, b, c, d) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
#define SCO_LOG_5(a, b, c, d, e) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
229 |
#define SCO_LOG_6(a, b, c, d, e, f) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
230 |
#define SCO_LOG_ADDR(string, addr) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
231 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
232 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
233 |
inline void FPrint(const TRefByValue<const TDesC> /*aFmt*/,...) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
234 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
#ifdef _DEBUG // to quell linker warnings |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
236 |
RFileLogger dummy; |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
237 |
#endif |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
238 |
} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
239 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
240 |
inline void FHex(const TUint8* /*aPtr*/, TInt /*aLen*/) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
inline void FHex(const TDesC8& /*aDes*/) |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
{ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
246 |
} |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
247 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
248 |
#endif // __FLOGGING__ |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
249 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
#endif // #ifndef LOGGER_H |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
#define __PANIC_UNEXPECTED_CALL __ASSERT_DEBUG(NULL, User::Invariant()); |
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
|
29b1cd4cb562
Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
#endif // __BT_DEBUG_H__ |