|
1 /* |
|
2 * Copyright (c) 2006-2007 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: |
|
15 * |
|
16 */ |
|
17 // Created by TraceCompiler 2.3.0 |
|
18 // DO NOT EDIT, CHANGES WILL BE LOST |
|
19 |
|
20 #ifndef __THUMBNAILFETCHEDCHECKERTRACES_H__ |
|
21 #define __THUMBNAILFETCHEDCHECKERTRACES_H__ |
|
22 |
|
23 #define KOstTraceComponentID 0x102830ab |
|
24 |
|
25 #define CTHUMBNAILFETCHEDCHECKER_LASTFETCHRESULT 0x86000f |
|
26 #define DUP1_CTHUMBNAILFETCHEDCHECKER_LASTFETCHRESULT 0x860010 |
|
27 #define CTHUMBNAILFETCHEDCHECKER_SETFETCHRESULT 0x860011 |
|
28 #define DUP1_CTHUMBNAILFETCHEDCHECKER_SETFETCHRESULT 0x860012 |
|
29 #define DUP4_CTHUMBNAILFETCHEDCHECKER_SETFETCHRESULT 0x860013 |
|
30 #define DUP2_CTHUMBNAILFETCHEDCHECKER_SETFETCHRESULT 0x860014 |
|
31 #define DUP3_CTHUMBNAILFETCHEDCHECKER_SETFETCHRESULT 0x860015 |
|
32 #define CTHUMBNAILFETCHEDCHECKER_DELETEFETCHRESULT 0x860016 |
|
33 #define DUP1_CTHUMBNAILFETCHEDCHECKER_DELETEFETCHRESULT 0x860017 |
|
34 #define CTHUMBNAILFETCHEDCHECKER_RENAMEFETCHRESULTL 0x860018 |
|
35 #define DUP1_CTHUMBNAILFETCHEDCHECKER_RENAMEFETCHRESULTL 0x860019 |
|
36 #define CTHUMBNAILFETCHEDCHECKER_RESET 0x86001a |
|
37 #define CENTRY_NEWL 0x86001b |
|
38 #define CENTRY_FINDCB 0x86001c |
|
39 #define CENTRY_FINDCBURI 0x86001d |
|
40 #define CENTRY_INSERTCB 0x86001e |
|
41 |
|
42 |
|
43 #ifndef __KERNEL_MODE__ |
|
44 #ifndef __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_TUINT16__ |
|
45 #define __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_TUINT16__ |
|
46 |
|
47 inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC16& aParam1, TUint16 aParam2 ) |
|
48 { |
|
49 TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); |
|
50 if ( retval ) |
|
51 { |
|
52 TInt length = 0; |
|
53 // Check that parameter lenght is not too long |
|
54 TInt length1 = aParam1.Size(); |
|
55 if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength) |
|
56 { |
|
57 length1 = KOstMaxDataLength - (length + sizeof ( TUint32 )); |
|
58 } |
|
59 TInt lengthAligned1 = ( length1 + 3 ) & ~3; |
|
60 if (lengthAligned1 > 0) |
|
61 { |
|
62 length = length + sizeof ( TUint32 ) + lengthAligned1; |
|
63 } |
|
64 TUint8 data[ KOstMaxDataLength ]; |
|
65 TUint8* ptr = data; |
|
66 // Set length to zero and calculate it againg |
|
67 // when adding parameters |
|
68 length = 0; |
|
69 if (length1 > 0) |
|
70 { |
|
71 // Number of elements is written before data |
|
72 // In case of Unicode string, number of elements is half of length |
|
73 *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length()); |
|
74 ptr += sizeof ( TUint32 ); |
|
75 memcpy( ptr, aParam1.Ptr(), length1 ); |
|
76 ptr += length1; |
|
77 // Fillers are written to get 32-bit alignment |
|
78 while ( length1++ < lengthAligned1 ) |
|
79 { |
|
80 *ptr++ = 0; |
|
81 } |
|
82 length += sizeof ( TUint32 ) + lengthAligned1; |
|
83 } |
|
84 else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength) |
|
85 { |
|
86 *( ( TUint32* )ptr ) = 0; |
|
87 ptr += sizeof ( TUint32 ); |
|
88 length += sizeof ( TUint32 ); |
|
89 } |
|
90 // Check that there are enough space to next parameter |
|
91 if ((length + sizeof ( TUint16 )) <= KOstMaxDataLength) |
|
92 { |
|
93 *( ( TUint16* )ptr ) = aParam2; |
|
94 ptr += sizeof ( TUint16 ); |
|
95 length += sizeof ( TUint16 ); |
|
96 } |
|
97 *( ( TUint8* )ptr ) = 0; |
|
98 ptr += sizeof ( TUint8 ); |
|
99 *( ( TUint8* )ptr ) = 0; |
|
100 ptr += sizeof ( TUint8 ); |
|
101 ptr -= length; |
|
102 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length ); |
|
103 } |
|
104 return retval; |
|
105 } |
|
106 |
|
107 #endif // __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_TUINT16__ |
|
108 |
|
109 #endif |
|
110 |
|
111 |
|
112 #ifndef __KERNEL_MODE__ |
|
113 #ifndef __OSTTRACEGEN3_TUINT32_CONST_TDESC16REF_TUINT_TINT__ |
|
114 #define __OSTTRACEGEN3_TUINT32_CONST_TDESC16REF_TUINT_TINT__ |
|
115 |
|
116 inline TBool OstTraceGen3( TUint32 aTraceID, const TDesC16& aParam1, TUint aParam2, TInt aParam3 ) |
|
117 { |
|
118 TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); |
|
119 if ( retval ) |
|
120 { |
|
121 TInt length = 0; |
|
122 // Check that parameter lenght is not too long |
|
123 TInt length1 = aParam1.Size(); |
|
124 if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength) |
|
125 { |
|
126 length1 = KOstMaxDataLength - (length + sizeof ( TUint32 )); |
|
127 } |
|
128 TInt lengthAligned1 = ( length1 + 3 ) & ~3; |
|
129 if (lengthAligned1 > 0) |
|
130 { |
|
131 length = length + sizeof ( TUint32 ) + lengthAligned1; |
|
132 } |
|
133 TUint8 data[ KOstMaxDataLength ]; |
|
134 TUint8* ptr = data; |
|
135 // Set length to zero and calculate it againg |
|
136 // when adding parameters |
|
137 length = 0; |
|
138 if (length1 > 0) |
|
139 { |
|
140 // Number of elements is written before data |
|
141 // In case of Unicode string, number of elements is half of length |
|
142 *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length()); |
|
143 ptr += sizeof ( TUint32 ); |
|
144 memcpy( ptr, aParam1.Ptr(), length1 ); |
|
145 ptr += length1; |
|
146 // Fillers are written to get 32-bit alignment |
|
147 while ( length1++ < lengthAligned1 ) |
|
148 { |
|
149 *ptr++ = 0; |
|
150 } |
|
151 length += sizeof ( TUint32 ) + lengthAligned1; |
|
152 } |
|
153 else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength) |
|
154 { |
|
155 *( ( TUint32* )ptr ) = 0; |
|
156 ptr += sizeof ( TUint32 ); |
|
157 length += sizeof ( TUint32 ); |
|
158 } |
|
159 // Check that there are enough space to next parameter |
|
160 if ((length + sizeof ( TUint )) <= KOstMaxDataLength) |
|
161 { |
|
162 *( ( TUint* )ptr ) = aParam2; |
|
163 ptr += sizeof ( TUint ); |
|
164 length += sizeof ( TUint ); |
|
165 } |
|
166 // Check that there are enough space to next parameter |
|
167 if ((length + sizeof ( TInt )) <= KOstMaxDataLength) |
|
168 { |
|
169 *( ( TInt* )ptr ) = aParam3; |
|
170 ptr += sizeof ( TInt ); |
|
171 length += sizeof ( TInt ); |
|
172 } |
|
173 ptr -= length; |
|
174 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length ); |
|
175 } |
|
176 return retval; |
|
177 } |
|
178 |
|
179 #endif // __OSTTRACEGEN3_TUINT32_CONST_TDESC16REF_TUINT_TINT__ |
|
180 |
|
181 |
|
182 #ifndef __OSTTRACEGEN3_TUINT32_CONST_TDESC16REF_TUINT32_TINT32__ |
|
183 #define __OSTTRACEGEN3_TUINT32_CONST_TDESC16REF_TUINT32_TINT32__ |
|
184 |
|
185 inline TBool OstTraceGen3( TUint32 aTraceID, const TDesC16& aParam1, TUint32 aParam2, TInt32 aParam3 ) |
|
186 { |
|
187 TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); |
|
188 if ( retval ) |
|
189 { |
|
190 TInt length = 0; |
|
191 // Check that parameter lenght is not too long |
|
192 TInt length1 = aParam1.Size(); |
|
193 if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength) |
|
194 { |
|
195 length1 = KOstMaxDataLength - (length + sizeof ( TUint32 )); |
|
196 } |
|
197 TInt lengthAligned1 = ( length1 + 3 ) & ~3; |
|
198 if (lengthAligned1 > 0) |
|
199 { |
|
200 length = length + sizeof ( TUint32 ) + lengthAligned1; |
|
201 } |
|
202 TUint8 data[ KOstMaxDataLength ]; |
|
203 TUint8* ptr = data; |
|
204 // Set length to zero and calculate it againg |
|
205 // when adding parameters |
|
206 length = 0; |
|
207 if (length1 > 0) |
|
208 { |
|
209 // Number of elements is written before data |
|
210 // In case of Unicode string, number of elements is half of length |
|
211 *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length()); |
|
212 ptr += sizeof ( TUint32 ); |
|
213 memcpy( ptr, aParam1.Ptr(), length1 ); |
|
214 ptr += length1; |
|
215 // Fillers are written to get 32-bit alignment |
|
216 while ( length1++ < lengthAligned1 ) |
|
217 { |
|
218 *ptr++ = 0; |
|
219 } |
|
220 length += sizeof ( TUint32 ) + lengthAligned1; |
|
221 } |
|
222 else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength) |
|
223 { |
|
224 *( ( TUint32* )ptr ) = 0; |
|
225 ptr += sizeof ( TUint32 ); |
|
226 length += sizeof ( TUint32 ); |
|
227 } |
|
228 // Check that there are enough space to next parameter |
|
229 if ((length + sizeof ( TUint )) <= KOstMaxDataLength) |
|
230 { |
|
231 *( ( TUint* )ptr ) = aParam2; |
|
232 ptr += sizeof ( TUint ); |
|
233 length += sizeof ( TUint ); |
|
234 } |
|
235 // Check that there are enough space to next parameter |
|
236 if ((length + sizeof ( TInt )) <= KOstMaxDataLength) |
|
237 { |
|
238 *( ( TInt* )ptr ) = aParam3; |
|
239 ptr += sizeof ( TInt ); |
|
240 length += sizeof ( TInt ); |
|
241 } |
|
242 ptr -= length; |
|
243 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length ); |
|
244 } |
|
245 return retval; |
|
246 } |
|
247 |
|
248 #endif // __OSTTRACEGEN3_TUINT32_CONST_TDESC16REF_TUINT32_TINT32__ |
|
249 |
|
250 #endif |
|
251 |
|
252 |
|
253 #ifndef __KERNEL_MODE__ |
|
254 #ifndef __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__ |
|
255 #define __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__ |
|
256 |
|
257 inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC16& aParam1 ) |
|
258 { |
|
259 TBool retval; |
|
260 TInt size = aParam1.Size(); |
|
261 // BTrace assumes that parameter size is atleast 4 bytes |
|
262 if (size % 4 == 0) |
|
263 { |
|
264 TUint8* ptr = ( TUint8* )aParam1.Ptr(); |
|
265 // Data is written directly and length is determined from trace message length |
|
266 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size ); |
|
267 } |
|
268 else |
|
269 { |
|
270 TUint8 data[ KOstMaxDataLength ]; |
|
271 TUint8* ptr = data; |
|
272 if (size > KOstMaxDataLength) |
|
273 { |
|
274 size = KOstMaxDataLength; |
|
275 } |
|
276 TInt sizeAligned = ( size + 3 ) & ~3; |
|
277 memcpy( ptr, aParam1.Ptr(), size ); |
|
278 ptr += size; |
|
279 // Fillers are written to get 32-bit alignment |
|
280 while ( size++ < sizeAligned ) |
|
281 { |
|
282 *ptr++ = 0; |
|
283 } |
|
284 ptr -= sizeAligned; |
|
285 size = sizeAligned; |
|
286 // Data is written directly and length is determined from trace message length |
|
287 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size ); |
|
288 } |
|
289 return retval; |
|
290 } |
|
291 |
|
292 #endif // __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__ |
|
293 |
|
294 #endif |
|
295 |
|
296 |
|
297 #ifndef __KERNEL_MODE__ |
|
298 #ifndef __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__ |
|
299 #define __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__ |
|
300 |
|
301 inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC16& aParam1, const TDesC16& aParam2 ) |
|
302 { |
|
303 TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); |
|
304 if ( retval ) |
|
305 { |
|
306 TInt length = 0; |
|
307 // Check that parameter lenght is not too long |
|
308 TInt length1 = aParam1.Size(); |
|
309 if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength) |
|
310 { |
|
311 length1 = KOstMaxDataLength - (length + sizeof ( TUint32 )); |
|
312 } |
|
313 TInt lengthAligned1 = ( length1 + 3 ) & ~3; |
|
314 if (lengthAligned1 > 0) |
|
315 { |
|
316 length = length + sizeof ( TUint32 ) + lengthAligned1; |
|
317 } |
|
318 // Check that parameter lenght is not too long |
|
319 TInt length2 = aParam2.Size(); |
|
320 if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength) |
|
321 { |
|
322 length2 = KOstMaxDataLength - (length + sizeof ( TUint32 )); |
|
323 } |
|
324 TInt lengthAligned2 = ( length2 + 3 ) & ~3; |
|
325 if (lengthAligned2 > 0) |
|
326 { |
|
327 length = length + sizeof ( TUint32 ) + lengthAligned2; |
|
328 } |
|
329 TUint8 data[ KOstMaxDataLength ]; |
|
330 TUint8* ptr = data; |
|
331 // Set length to zero and calculate it againg |
|
332 // when adding parameters |
|
333 length = 0; |
|
334 if (length1 > 0) |
|
335 { |
|
336 // Number of elements is written before data |
|
337 // In case of Unicode string, number of elements is half of length |
|
338 *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length()); |
|
339 ptr += sizeof ( TUint32 ); |
|
340 memcpy( ptr, aParam1.Ptr(), length1 ); |
|
341 ptr += length1; |
|
342 // Fillers are written to get 32-bit alignment |
|
343 while ( length1++ < lengthAligned1 ) |
|
344 { |
|
345 *ptr++ = 0; |
|
346 } |
|
347 length += sizeof ( TUint32 ) + lengthAligned1; |
|
348 } |
|
349 else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength) |
|
350 { |
|
351 *( ( TUint32* )ptr ) = 0; |
|
352 ptr += sizeof ( TUint32 ); |
|
353 length += sizeof ( TUint32 ); |
|
354 } |
|
355 if (length2 > 0) |
|
356 { |
|
357 // Number of elements is written before data |
|
358 // In case of Unicode string, number of elements is half of length |
|
359 *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length()); |
|
360 ptr += sizeof ( TUint32 ); |
|
361 memcpy( ptr, aParam2.Ptr(), length2 ); |
|
362 ptr += length2; |
|
363 // Fillers are written to get 32-bit alignment |
|
364 while ( length2++ < lengthAligned2 ) |
|
365 { |
|
366 *ptr++ = 0; |
|
367 } |
|
368 length += sizeof ( TUint32 ) + lengthAligned2; |
|
369 } |
|
370 else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength) |
|
371 { |
|
372 *( ( TUint32* )ptr ) = 0; |
|
373 ptr += sizeof ( TUint32 ); |
|
374 length += sizeof ( TUint32 ); |
|
375 } |
|
376 ptr -= length; |
|
377 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length ); |
|
378 } |
|
379 return retval; |
|
380 } |
|
381 |
|
382 #endif // __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__ |
|
383 |
|
384 #endif |
|
385 |
|
386 |
|
387 #endif |
|
388 |
|
389 // End of file |
|
390 |