1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
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 |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
17 #define __LOGWRAP_H__ |
17 #define __LOGWRAP_H__ |
18 |
18 |
19 #include <e32base.h> |
19 #include <e32base.h> |
20 #include <f32file.h> |
20 #include <f32file.h> |
21 #include <barsc2.h> // For CResourceFile |
21 #include <barsc2.h> // For CResourceFile |
22 #include <logcntdef.h> |
|
23 #include <d32dbms.h> |
22 #include <d32dbms.h> |
|
23 #include <logwrapconst.h> |
|
24 |
|
25 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
26 #include <logwraplimits.h> |
|
27 #include "logcntdef.h" |
|
28 #endif |
24 |
29 |
25 #ifndef __WINC__ |
30 #ifndef __WINC__ |
26 #include <logwrap.rsg> |
31 #include <logwrap.rsg> |
27 #endif |
32 #endif |
28 |
33 |
|
34 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
35 /** |
|
36 Contact item ID. These are used to uniquely identify contact items within a contacts database. |
|
37 @publishedAll |
|
38 @released |
|
39 */ |
|
40 typedef TInt32 TLogContactItemId; |
|
41 |
|
42 #endif |
|
43 |
29 /** |
44 /** |
30 String lengths |
45 @publishedAll |
31 @internalAll |
46 @released |
32 */ |
47 */ |
33 const TInt KLogMaxRemotePartyLength = 64; |
48 typedef TUint32 TLogViewId; |
34 const TInt KLogMaxDirectionLength = 64; |
49 |
35 const TInt KLogMaxStatusLength = 64; |
50 |
36 const TInt KLogMaxSubjectLength = 64; |
51 const TLogFlags KLogNullFlags = 0; |
37 const TInt KLogMaxDescriptionLength = 64; |
52 const TLogFlags KLogFlagsMask = 0xF; |
38 const TInt KLogMaxSharedStringLength = 64; |
53 |
39 const TInt KLogMaxNumberLength = 100; |
54 |
40 |
55 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
41 /** |
|
42 Big enough to contain any of the above strings |
|
43 Defines a modifiable buffer descriptor into which a standard string from the |
|
44 resource in the logwrap.dll resource file can be safely put. |
|
45 |
|
46 @see CLogClient::GetString() |
|
47 @publishedAll |
|
48 @released |
|
49 */ |
|
50 typedef TBuf<64> TLogString; |
|
51 |
|
52 /** |
|
53 Type definitions |
|
54 The unique event ID associated with a log event. |
|
55 |
|
56 @see CLogEvent |
|
57 @see CLogViewDuplicate |
|
58 @see CLogViewRecent |
|
59 @see CLogClient |
|
60 @see CLogBase |
|
61 @publishedAll |
|
62 @released |
|
63 */ |
|
64 typedef TInt32 TLogId; |
|
65 /** |
|
66 The duration type of an event. |
|
67 |
|
68 @see CLogEvent |
|
69 @see CLogFilter |
|
70 @publishedAll |
|
71 @released |
|
72 */ |
|
73 typedef TInt8 TLogDurationType; |
|
74 typedef TInt8 TLogRecentList; |
|
75 typedef TUint16 TLogSize; |
|
76 typedef TUint8 TLogRecentSize; |
|
77 /** |
|
78 Duration of an event, expressed as the number of seconds since the time of |
|
79 the event. |
|
80 |
|
81 @see CLogEvent |
|
82 @publishedAll |
|
83 @released |
|
84 */ |
|
85 typedef TUint32 TLogDuration; |
|
86 typedef TUint32 TLogAge; |
|
87 /** |
|
88 Link value relating a log event to an entity in another application. |
|
89 |
|
90 @see CLogEvent |
|
91 @publishedAll |
|
92 @released |
|
93 */ |
|
94 typedef TUint32 TLogLink; |
|
95 typedef TInt16 TLogStringId; |
|
96 typedef TInt16 TLogTypeId; |
|
97 /** |
|
98 The duration type of an event. |
|
99 |
|
100 @see CLogEvent |
|
101 @see CLogFilter |
|
102 @publishedAll |
|
103 @released |
|
104 */ |
|
105 typedef TInt8 TLogDurationType; |
|
106 /** |
|
107 Event flags. |
|
108 |
|
109 @see CLogEvent |
|
110 @see CLogFilter |
|
111 @publishedAll |
|
112 @released |
|
113 */ |
|
114 typedef TUint8 TLogFlags; |
|
115 |
|
116 /** |
56 /** |
117 @internalAll |
57 @internalAll |
118 */ |
58 */ |
119 typedef TUint32 TLogViewId; |
|
120 |
|
121 /** |
|
122 Limits |
|
123 @internalAll |
|
124 */ |
|
125 const TLogId KLogNullId = -1; |
|
126 const TLogDurationType KLogNullDurationType = -1; |
|
127 const TLogDuration KLogNullDuration = 0; |
|
128 const TLogLink KLogNullLink = 0; |
|
129 const TLogRecentList KLogNullRecentList = -1; |
|
130 const TLogStringId KLogNullStringId = -1; |
|
131 const TLogTypeId KLogNullTypeId = -1; |
|
132 const TLogFlags KLogNullFlags = 0; |
|
133 const TLogFlags KLogFlagsMask = 0xF; |
|
134 const TInt KLogFlagsCount = 4; |
|
135 const TInt KLogNeverUsedId = -2; |
|
136 |
|
137 /** |
|
138 @internalAll |
|
139 */ |
|
140 const TInt KLogActiveDoNotCompleteIfActive = KMaxTInt-1; |
59 const TInt KLogActiveDoNotCompleteIfActive = KMaxTInt-1; |
|
60 #endif |
|
61 |
|
62 //SimId typedef. Probably the final version will import it from different header. |
|
63 typedef TUint32 TSimId; |
|
64 //"Null" SimId value. |
|
65 const TSimId KLogNullSimId = 0; |
141 |
66 |
142 //********************************** |
67 //********************************** |
143 // CLogActive |
68 // CLogActive |
144 //********************************** |
69 //********************************** |
145 |
70 |
146 class CLogActive : public CActive |
|
147 /** |
71 /** |
148 Common active object behaviour. |
72 Common active object behaviour. |
149 |
73 |
150 This is an abstract class that defines common active object behaviour for |
74 This is an abstract class that defines common active object behaviour for |
151 the log engine classes. |
75 the log engine classes. |
152 @publishedAll |
76 @publishedAll |
153 @released |
77 @released |
154 */ |
78 */ |
|
79 class CLogActive : public CActive |
155 { |
80 { |
156 public: |
81 public: |
157 IMPORT_C ~CLogActive(); |
82 IMPORT_C ~CLogActive(); |
158 // |
83 // |
159 protected: |
84 protected: |