Update contrib.
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __SCHLOGGER_H__
17 #define __SCHLOGGER_H__
20 #pragma message(__FILE__ ": (15) WARNING! Schedule logging is enabled")
29 _LIT(KSchSvrLogFile, "SCHSVR.TXT");
30 _LIT(KSchSvrLogFolder, "SCHSVR");
33 // ------> CSheduleServerLog (header)
35 class CSheduleServerLog : public CBase
41 public: // CONSTRUCT / DESTRUCT
43 static CSheduleServerLog* NewL(const TDesC& aLogFileName);
47 private: // INTERNAL CONSTRUCT
50 void ConstructL(const TDesC& aLogFileName);
55 void Log(TRefByValue<const TDesC> aFmt,...);
56 void LogList(TRefByValue<const TDesC> aFmt, VA_LIST aList);
62 void Write(const TDesC& aText);
63 void Write(const TDesC& aFmt, VA_LIST& aList);
64 void WriteWithTimeStamp(const TDesC& aText);
68 private: // MEMBER DATA
79 #define LOGSTRING(AAA) \
80 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(tempLogDes()); }
81 #define LOGSTRING2(AAA,BBB) \
82 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB); }
83 #define LOGSTRING3(AAA,BBB,CCC) \
84 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); }
85 #define LOGSTRING4(AAA,BBB,CCC,DDD) \
86 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); }
87 #define LOGSTRING5(AAA,BBB,CCC,DDD,EEE) \
88 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD,EEE); }
89 #define LOGSTRING6(AAA,BBB,CCC,DDD,EEE,FFF) \
90 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD,EEE,FFF); }
91 #define LOGSTRING7(AAA,BBB,CCC,DDD,EEE,FFF,GGG) \
92 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD,EEE,FFF,GGG); }
93 #define LOGSTRING8(AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH) \
94 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD,EEE,FFF,GGG,HHH); }
95 #define LOGSTRING9(AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,III) \
96 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD,EEE,FFF,GGG,HHH,III); }
97 #define LOGSTRING10(AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,III, JJJ) \
98 { _LIT(tempLogDes, AAA); reinterpret_cast<CSheduleServerLog*>(Dll::Tls())->Log(TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD,EEE,FFF,GGG,HHH,III,JJJ); }
104 #define LOGSTRING(AAA)
105 #define LOGSTRING2(AAA,BBB)
106 #define LOGSTRING3(AAA,BBB,CCC)
107 #define LOGSTRING4(AAA,BBB,CCC,DDD)
108 #define LOGSTRING5(AAA,BBB,CCC,DDD,EEE)
109 #define LOGSTRING6(AAA,BBB,CCC,DDD,EEE,FFF)
110 #define LOGSTRING7(AAA,BBB,CCC,DDD,EEE,FFF,GGG)
111 #define LOGSTRING8(AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH)
112 #define LOGSTRING9(AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,III)
113 #define LOGSTRING10(AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,III, JJJ)