1 // Created by TraceCompiler 2.1.2 |
1 /* |
|
2 * Copyright (c) 2010 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 |
2 // DO NOT EDIT, CHANGES WILL BE LOST |
18 // DO NOT EDIT, CHANGES WILL BE LOST |
3 |
19 |
4 #ifndef __APPLICATIONSPLUGINTRACES_H__ |
20 #ifndef __APPLICATIONSPLUGINTRACES_H__ |
5 #define __APPLICATIONSPLUGINTRACES_H__ |
21 #define __APPLICATIONSPLUGINTRACES_H__ |
6 |
22 |
8 |
24 |
9 #define CAPPLICATIONSPLUGIN_NEWL_ENTRY 0x8a0001 |
25 #define CAPPLICATIONSPLUGIN_NEWL_ENTRY 0x8a0001 |
10 #define CAPPLICATIONSPLUGIN_NEWL_EXIT 0x8a0002 |
26 #define CAPPLICATIONSPLUGIN_NEWL_EXIT 0x8a0002 |
11 #define CAPPLICATIONSPLUGIN_HANDLEAPPLISTEVENT_ENTRY 0x8a0003 |
27 #define CAPPLICATIONSPLUGIN_HANDLEAPPLISTEVENT_ENTRY 0x8a0003 |
12 #define CAPPLICATIONSPLUGIN_HANDLEAPPLISTEVENT_EXIT 0x8a0004 |
28 #define CAPPLICATIONSPLUGIN_HANDLEAPPLISTEVENT_EXIT 0x8a0004 |
13 #define CAPPLICATIONSPLUGIN_ADDWIDGETINFOL 0x860001 |
29 #define CAPPLICATIONSPLUGIN_PAUSEPLUGINL_ENTRY 0x8a0005 |
14 #define DUP1_CAPPLICATIONSPLUGIN_ADDWIDGETINFOL 0x860002 |
30 #define CAPPLICATIONSPLUGIN_PAUSEPLUGINL_EXIT 0x8a0006 |
15 #define _ADDAPPLICATIONINFOL 0x860003 |
31 #define CAPPLICATIONSPLUGIN_RESUMEPLUGINL_ENTRY 0x8a0007 |
|
32 #define CAPPLICATIONSPLUGIN_RESUMEPLUGINL_EXIT 0x8a0008 |
|
33 #define CAPPLICATIONSPLUGIN_CAPPLICATIONSPLUGIN_ENTRY 0x8a0009 |
|
34 #define CAPPLICATIONSPLUGIN_CAPPLICATIONSPLUGIN_EXIT 0x8a000a |
|
35 #define CAPPLICATIONSPLUGIN_CONSTRUCTL_ENTRY 0x8a000b |
|
36 #define CAPPLICATIONSPLUGIN_CONSTRUCTL_EXIT 0x8a000c |
|
37 #define CAPPLICATIONSPLUGIN_STARTPLUGINL_ENTRY 0x8a000d |
|
38 #define CAPPLICATIONSPLUGIN_STARTPLUGINL_EXIT 0x8a000e |
|
39 #define CAPPLICATIONSPLUGIN_STARTHARVESTINGL_ENTRY 0x8a000f |
|
40 #define CAPPLICATIONSPLUGIN_STARTHARVESTINGL_EXIT 0x8a0010 |
|
41 #define _ADDAPPLICATIONINFOL_ENTRY 0x8a0011 |
|
42 #define _ADDAPPLICATIONINFOL_EXIT 0x8a0012 |
16 #define DUP1__ADDAPPLICATIONINFOL 0x860004 |
43 #define DUP1__ADDAPPLICATIONINFOL 0x860004 |
17 #define CAPPLICATIONSPLUGIN_ISAPPHIDDENL 0x860005 |
44 #define CAPPLICATIONSPLUGIN_ISAPPHIDDENL 0x860005 |
18 #define DUP1_CAPPLICATIONSPLUGIN_ISAPPHIDDENL 0x860006 |
45 #define DUP1_CAPPLICATIONSPLUGIN_ISAPPHIDDENL 0x860006 |
19 #define CAPPLICATIONSPLUGIN_CREATEAPPLICATIONSINDEXITEML 0x860007 |
46 #define CAPPLICATIONSPLUGIN_CREATEAPPLICATIONSINDEXITEML 0x860007 |
20 #define DUP1_CAPPLICATIONSPLUGIN_CREATEAPPLICATIONSINDEXITEML 0x860008 |
47 #define DUP1_CAPPLICATIONSPLUGIN_CREATEAPPLICATIONSINDEXITEML 0x860008 |
21 #define CAPPLICATIONSPLUGIN_HANDLEAPPLISTEVENT 0x860009 |
48 #define CAPPLICATIONSPLUGIN_HANDLEAPPLISTEVENT 0x860009 |
22 #define STATE_DUP1_CAPPLICATIONSPLUGIN_ISAPPHIDDENL 0x870001 |
49 #define DUP2_CAPPLICATIONSPLUGIN_CREATEAPPLICATIONSINDEXITEML 0x86000a |
|
50 #define CAPPLICATIONSPLUGIN_DELAYEDCALLBACKL 0x86000b |
|
51 #define _ADDAPPLICATIONINFOL 0x86000c |
23 |
52 |
24 |
53 |
25 #ifndef __KERNEL_MODE__ |
54 #ifndef __KERNEL_MODE__ |
26 inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC16& aParam1 ) |
55 #ifndef __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__ |
27 { |
56 #define __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__ |
28 TBool retval; |
|
29 TInt size = aParam1.Size(); |
|
30 // BTrace assumes that parameter size is atleast 4 bytes |
|
31 if (size % 4 == 0) |
|
32 { |
|
33 TUint8* ptr = ( TUint8* )aParam1.Ptr(); |
|
34 // Data is written directly and length is determined from trace message length |
|
35 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size ); |
|
36 } |
|
37 else |
|
38 { |
|
39 TUint8 data[ KOstMaxDataLength ]; |
|
40 TUint8* ptr = data; |
|
41 if (size > KOstMaxDataLength) |
|
42 { |
|
43 size = KOstMaxDataLength; |
|
44 } |
|
45 TInt sizeAligned = ( size + 3 ) & ~3; |
|
46 memcpy( ptr, aParam1.Ptr(), size ); |
|
47 ptr += size; |
|
48 // Fillers are written to get 32-bit alignment |
|
49 while ( size++ < sizeAligned ) |
|
50 { |
|
51 *ptr++ = 0; |
|
52 } |
|
53 ptr -= sizeAligned; |
|
54 size = sizeAligned; |
|
55 // Data is written directly and length is determined from trace message length |
|
56 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size ); |
|
57 } |
|
58 return retval; |
|
59 } |
|
60 #endif |
|
61 |
57 |
62 |
|
63 #ifndef __KERNEL_MODE__ |
|
64 inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC16& aParam1, const TDesC16& aParam2 ) |
58 inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC16& aParam1, const TDesC16& aParam2 ) |
65 { |
59 { |
66 TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); |
60 TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); |
67 if ( retval ) |
61 if ( retval ) |
68 { |
62 { |
139 ptr -= length; |
133 ptr -= length; |
140 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length ); |
134 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length ); |
141 } |
135 } |
142 return retval; |
136 return retval; |
143 } |
137 } |
|
138 |
|
139 #endif // __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__ |
|
140 |
144 #endif |
141 #endif |
145 |
|
146 |
|
147 inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2 ) |
|
148 { |
|
149 TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); |
|
150 if ( retval ) |
|
151 { |
|
152 TInt length = 0; |
|
153 // Check that parameter lenght is not too long |
|
154 TInt length1 = aParam1.Size(); |
|
155 if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength) |
|
156 { |
|
157 length1 = KOstMaxDataLength - (length + sizeof ( TUint32 )); |
|
158 } |
|
159 TInt lengthAligned1 = ( length1 + 3 ) & ~3; |
|
160 if (lengthAligned1 > 0) |
|
161 { |
|
162 length = length + sizeof ( TUint32 ) + lengthAligned1; |
|
163 } |
|
164 // Check that parameter lenght is not too long |
|
165 TInt length2 = aParam2.Size(); |
|
166 if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength) |
|
167 { |
|
168 length2 = KOstMaxDataLength - (length + sizeof ( TUint32 )); |
|
169 } |
|
170 TInt lengthAligned2 = ( length2 + 3 ) & ~3; |
|
171 if (lengthAligned2 > 0) |
|
172 { |
|
173 length = length + sizeof ( TUint32 ) + lengthAligned2; |
|
174 } |
|
175 TUint8 data[ KOstMaxDataLength ]; |
|
176 TUint8* ptr = data; |
|
177 // Set length to zero and calculate it againg |
|
178 // when adding parameters |
|
179 length = 0; |
|
180 if (length1 > 0) |
|
181 { |
|
182 // Number of elements is written before data |
|
183 // In case of Unicode string, number of elements is half of length |
|
184 *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length()); |
|
185 ptr += sizeof ( TUint32 ); |
|
186 memcpy( ptr, aParam1.Ptr(), length1 ); |
|
187 ptr += length1; |
|
188 // Fillers are written to get 32-bit alignment |
|
189 while ( length1++ < lengthAligned1 ) |
|
190 { |
|
191 *ptr++ = 0; |
|
192 } |
|
193 length += sizeof ( TUint32 ) + lengthAligned1; |
|
194 } |
|
195 else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength) |
|
196 { |
|
197 *( ( TUint32* )ptr ) = 0; |
|
198 ptr += sizeof ( TUint32 ); |
|
199 length += sizeof ( TUint32 ); |
|
200 } |
|
201 if (length2 > 0) |
|
202 { |
|
203 // Number of elements is written before data |
|
204 // In case of Unicode string, number of elements is half of length |
|
205 *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length()); |
|
206 ptr += sizeof ( TUint32 ); |
|
207 memcpy( ptr, aParam2.Ptr(), length2 ); |
|
208 ptr += length2; |
|
209 // Fillers are written to get 32-bit alignment |
|
210 while ( length2++ < lengthAligned2 ) |
|
211 { |
|
212 *ptr++ = 0; |
|
213 } |
|
214 length += sizeof ( TUint32 ) + lengthAligned2; |
|
215 } |
|
216 else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength) |
|
217 { |
|
218 *( ( TUint32* )ptr ) = 0; |
|
219 ptr += sizeof ( TUint32 ); |
|
220 length += sizeof ( TUint32 ); |
|
221 } |
|
222 ptr -= length; |
|
223 retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length ); |
|
224 } |
|
225 return retval; |
|
226 } |
|
227 |
142 |
228 |
143 |
229 #endif |
144 #endif |
230 |
145 |
231 // End of file |
146 // End of file |