|
1 /* |
|
2 * Copyright (c) 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: This file contains the header file of the CTxtLogger. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TXTLOGGER_H |
|
19 #define TXTLOGGER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "StifLoggerBase.h" |
|
23 #include "FileOutput.h" |
|
24 #include "RDebugOutput.h" |
|
25 |
|
26 // CONSTANTS |
|
27 // None |
|
28 |
|
29 // MACROS |
|
30 // None |
|
31 |
|
32 // DATA TYPES |
|
33 // None |
|
34 |
|
35 // FUNCTION PROTOTYPES |
|
36 // None |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 class COutput; |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 // DESCRIPTION |
|
44 // CTxtLogger is a STIF Test Framework StifLoggerBase class. |
|
45 // Class contains a file logging operations. |
|
46 |
|
47 class CTxtLogger |
|
48 :public CStifLoggerBase |
|
49 { |
|
50 public: // Enumerations |
|
51 |
|
52 private: // Enumerations |
|
53 |
|
54 public: // Constructors and destructor |
|
55 |
|
56 /** |
|
57 * Two-phased constructor. |
|
58 */ |
|
59 static CTxtLogger* NewL( const TDesC& aTestPath, |
|
60 const TDesC& aTestFile, |
|
61 CStifLogger::TLoggerType aLoggerType, |
|
62 CStifLogger::TOutput aOutput, |
|
63 TBool aOverWrite, |
|
64 TBool aWithTimeStamp, |
|
65 TBool aWithLineBreak, |
|
66 TBool aWithEventRanking, |
|
67 TBool aThreadIdToLogFile, |
|
68 TBool aCreateLogDir, |
|
69 TInt aStaticBufferSize, |
|
70 TBool aUnicode, |
|
71 TInt aThreadId); |
|
72 |
|
73 /** |
|
74 * Destructor. |
|
75 */ |
|
76 ~CTxtLogger(); |
|
77 |
|
78 public: // New functions |
|
79 |
|
80 /** |
|
81 * Send style information and data to the output module. |
|
82 * aStyle parameter is not supporter in txt printing. |
|
83 */ |
|
84 TInt Send( TInt aStyle, const TDesC& aData ); |
|
85 |
|
86 /** |
|
87 * Send style information and data to the output module. |
|
88 * aStyle parameter is not supporter in txt printing. |
|
89 */ |
|
90 TInt Send( TInt aStyle, const TDesC8& aData ); |
|
91 |
|
92 public: // Functions from base classes |
|
93 |
|
94 protected: // New functions |
|
95 |
|
96 protected: // Functions from base classes |
|
97 |
|
98 private: |
|
99 |
|
100 /** |
|
101 * C++ default constructor. |
|
102 */ |
|
103 CTxtLogger( COutput* output ); |
|
104 |
|
105 /** |
|
106 * By default Symbian OS constructor is private. |
|
107 */ |
|
108 void ConstructL(); |
|
109 |
|
110 public: // Data |
|
111 |
|
112 protected: // Data |
|
113 |
|
114 private: // Data |
|
115 |
|
116 public: // Friend classes |
|
117 |
|
118 protected: // Friend classes |
|
119 |
|
120 private: // Friend classes |
|
121 |
|
122 }; |
|
123 |
|
124 #endif // TXTLOGGER_H |
|
125 |
|
126 // End of File |