equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2004-2009 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 * Name : exbtutil.h |
|
16 * Part of : ex_btsocket |
|
17 * Created : 17/11/2004 by Shane Kearns |
|
18 * Helper functions |
|
19 * Version : |
|
20 * |
|
21 * |
|
22 */ |
|
23 |
|
24 |
|
25 |
|
26 #ifndef EXBTUTIL_H |
|
27 #define EXBTUTIL_H |
|
28 |
|
29 #include <e32std.h> |
|
30 |
|
31 |
|
32 /** |
|
33 A static utility class for debugging purposes |
|
34 */ |
|
35 class ExBtSocket |
|
36 { |
|
37 public: |
|
38 enum TExBtPanic |
|
39 { |
|
40 EBadCallback, |
|
41 EReEntrant, |
|
42 EUnsupportedProtocol |
|
43 }; |
|
44 static void Panic(TExBtPanic aPanic); |
|
45 static void Log(const TRefByValue<const TDesC> aFormat, ...); |
|
46 }; |
|
47 |
|
48 #ifdef _DEBUG |
|
49 #define ENABLE_LOG_INFO |
|
50 #define ENABLE_LOG_FN_TRACE |
|
51 #define ENABLE_LOG_ERROR |
|
52 #define USE_FLOGGER |
|
53 #endif |
|
54 |
|
55 #ifdef ENABLE_LOG_INFO |
|
56 #ifdef USE_FLOGGER |
|
57 #define LOG_INFO(X) ExBtSocket::Log X |
|
58 #else |
|
59 #define LOG_INFO(X) RDebug::Print X |
|
60 #endif |
|
61 #else |
|
62 #define LOG_INFO(X) |
|
63 #endif |
|
64 |
|
65 #ifdef ENABLE_LOG_ERROR |
|
66 #ifdef USE_FLOGGER |
|
67 #define LOG_ERROR(X) ExBtSocket::Log X |
|
68 #else |
|
69 #define LOG_ERROR(X) RDebug::Print X |
|
70 #endif |
|
71 #else |
|
72 #define LOG_ERROR(X) |
|
73 #endif |
|
74 |
|
75 #ifdef ENABLE_LOG_FN_TRACE |
|
76 #ifdef USE_FLOGGER |
|
77 #define LOG_FN_TRACE(X) ExBtSocket::Log X |
|
78 #else |
|
79 #define LOG_FN_TRACE(X) RDebug::Print X |
|
80 #endif |
|
81 #else |
|
82 #define LOG_FN_TRACE(X) |
|
83 #endif |
|
84 |
|
85 #endif // EXBTUTIL_H |