1 // Copyright (c) 1998-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined(__MIUTLOG_H__)
19 #if !defined(__E32BASE_H__)
23 #if !defined(__F32FILE_H__)
27 _LIT(KMiutLogFile, "c:\\logs\\Email\\ImLog%d");
28 _LIT(KMiutLogFileExtension, ".txt");
29 _LIT(KMiutLogUnopenedFileFormatString, "%S(%u).txt");
30 _LIT8(KMiutLogOutputString, ">> %S");
31 _LIT8(KMiutLogResponseString, "<< %S");
32 _LIT8(KMiutLogErrorString, "** %S %d");
33 _LIT8(KMiutLogCommentString, "** %S");
34 _LIT8(KMiutLogCR, "\r\n");
35 _LIT(KMiutLogDateFormatString, "%D%M%*Y%1%/1%2%/2%3 %H%:1%T%:2%S ");
38 // Setting to select whether a new log file will be created,
39 // or existing one will be appended to...
51 class CImLog : public CBase
58 IMPORT_C static CImLog* NewL(const TDesC& aFullFilePath, TImLogOpenMode aImLogOpenMode);
59 IMPORT_C static CImLog* NewL(TInt aPortNum);
62 IMPORT_C void AppendOut(const TDesC8 &outPut);
63 IMPORT_C void AppendResponse(const TDesC8 &theResponse);
64 IMPORT_C void AppendComment(const TDesC8 &theError);
65 IMPORT_C void AppendError(const TDesC8 &theError, TInt anErrorCode);
68 void ConstructL(TInt aPortNum);
69 void ConstructL(const TDesC& aFullFilePath, TImLogOpenMode aImLogOpenMode);
71 void BuildLogString(const TDesC8& aFormat,const TDesC8 &theOutPut, TBool aWriteCrLf = EFalse);
72 void WriteToLog(TRefByValue<const TDesC8> aFmt,...);