author | Pat Downey <patd@symbian.org> |
Tue, 13 Jul 2010 14:53:59 +0100 | |
branch | RCL_3 |
changeset 50 | 2ac16fe2d995 |
parent 18 | 50bae5c5c85f |
permissions | -rw-r--r-- |
18
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
2 |
// All rights reserved. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
4 |
// under the terms of "Eclipse Public License v1.0" |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
7 |
// |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
10 |
// |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
11 |
// Contributors: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
12 |
// |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
13 |
// Description: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
14 |
// |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
15 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
16 |
#ifndef __WAPLOG_H__ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
17 |
#define __WAPLOG_H__ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
18 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
19 |
#ifdef _DEBUG |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
20 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
21 |
#include <comms-infras/commsdebugutility.h> |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
22 |
#define LOG(MSG) MSG |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
23 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
24 |
#if defined (DETAILED_LOG) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
25 |
#define LOG_DETAILED(MSG) MSG |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
26 |
#else |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
27 |
#define LOG_DETAILED(MSG) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
28 |
#endif |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
29 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
30 |
_LIT(KSWSLogFolder,"sws"); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
31 |
_LIT(KSWSLogFile,"sws.txt"); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
32 |
_LIT(KEndOfLine,"\r\n"); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
33 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
34 |
class SwsLog |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
35 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
36 |
public: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
37 |
static void Write(const TDesC& aDes); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
38 |
static void Printf(TRefByValue<const TDesC> aFmt, ...); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
39 |
}; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
40 |
#else |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
41 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
42 |
#define LOG(MSG) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
43 |
#define LOG_DETAILED(MSG) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
44 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
45 |
#endif |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
46 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
47 |
#endif |