Update contrib.
1 // Copyright (c) 2002-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.
18 #ifndef __LOGSERVERCLI_H__
19 #define __LOGSERVERCLI_H__
26 #include "LogCliServShared.h"
28 class RLogSession : public RSessionBase
40 * Connect to Log Server
47 * Asynchronous send to server. Reply received via aStatus
49 void Send(TInt aType, const TIpcArgs& aArgs, TRequestStatus& aStatus) const;
52 * Synchronous send to server. Reply returned to caller
54 TInt Send(TInt aType, const TIpcArgs& aArgs) const;
57 * Get the next free operation id
59 inline TLogOperationId AllocateIdOperation();
62 * Get the next free view id
64 inline TLogViewId AllocateIdView();
67 TInt SendWithRetry(TInt aType, const TIpcArgs& aParam) const;
68 void SendWithRetryAsync(TInt aType, const TIpcArgs& aParam, TRequestStatus& aStatus) const;
71 TLogOperationId iOperationId;
76 inline TLogOperationId RLogSession::AllocateIdOperation()
78 return iOperationId++;
81 inline TLogViewId RLogSession::AllocateIdView()
87 #ifdef LOGGING_ENABLED
95 _LIT(KLogFileName, "LogEng.txt");
96 _LIT(KLogFolder, "LogEng");
97 _LIT(KTimeFormat, "%02d.%02d:%02d:%06d ");
98 _LIT(KTextFormat, "%S");
100 class Log : public RFileLogger
107 static void Write(const TDesC& aText);
108 static void WriteFormat(TRefByValue<const TDesC> aFmt, ...);
111 static void PruneLogFile();
117 #define LOGNEW Log::New()
118 #define LOGTEXT(AAA) { _LIT(KString, AAA); Log::Write(KString); }
119 #define LOGTEXT2(AAA, BBB) { _LIT(KString, AAA); Log::WriteFormat(TRefByValue<const TDesC>(KString()), BBB); }
120 #define LOGTEXT3(AAA, BBB, CCC) { _LIT(KString, AAA); Log::WriteFormat(TRefByValue<const TDesC>(KString()), BBB, CCC); }
121 #define LOGTEXT4(AAA, BBB, CCC, DDD) { _LIT(KString, AAA); Log::WriteFormat(TRefByValue<const TDesC>(KString()), BBB, CCC, DDD); }
127 #define LOGTEXT2(AAA, BBB)
128 #define LOGTEXT3(AAA, BBB, CCC)
129 #define LOGTEXT4(AAA, BBB, CCC, DDD)