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