imagehandlingutilities/thumbnailmanager/thumbnailserver/traces/thumbnailfetchedcheckerTraces.h
author Jyri Kokkonen <jyri.kokkonen@nokia.com>
Fri, 10 Sep 2010 14:24:47 +0100
changeset 53 41b64ea195fa
parent 51 3baa1be38e89
permissions -rw-r--r--
Revised "traces" to match "Revision: 201033" - final fix for Bug 3676
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53
41b64ea195fa Revised "traces" to match "Revision: 201033" - final fix for Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents: 51
diff changeset
     1
// Created by TraceCompiler 2.2.3
51
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
     2
// 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
     3
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
     4
#ifndef __THUMBNAILFETCHEDCHECKERTRACES_H__
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
     5
#define __THUMBNAILFETCHEDCHECKERTRACES_H__
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
     6
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
     7
#define KOstTraceComponentID 0x102830ab
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
#define CTHUMBNAILFETCHEDCHECKER_LASTFETCHRESULT 0x86000f
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    10
#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
    11
#define CTHUMBNAILFETCHEDCHECKER_SETFETCHRESULT 0x860011
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    12
#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
    13
#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
    14
#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
    15
#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
    16
#define CTHUMBNAILFETCHEDCHECKER_DELETEFETCHRESULT 0x860016
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    17
#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
    18
#define CTHUMBNAILFETCHEDCHECKER_RENAMEFETCHRESULTL 0x860018
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    19
#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
    20
#define CTHUMBNAILFETCHEDCHECKER_RESET 0x86001a
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    21
#define CENTRY_NEWL 0x86001b
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    22
#define CENTRY_FINDCB 0x86001c
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    23
#define CENTRY_FINDCBURI 0x86001d
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    24
#define CENTRY_INSERTCB 0x86001e
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    25
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    26
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    27
#ifndef __KERNEL_MODE__
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    28
#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
    29
#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
    30
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    31
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
    32
    {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    33
    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
    34
    if ( retval )
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    35
        {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    36
        TInt length = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    37
        // 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
    38
        TInt length1 = aParam1.Size();
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    39
        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
    40
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    41
            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
    42
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    43
        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
    44
        if (lengthAligned1 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    45
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    46
            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
    47
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    48
        TUint8 data[ KOstMaxDataLength ];
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    49
        TUint8* ptr = data;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    50
        // 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
    51
        // when adding parameters
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    52
        length = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    53
        if (length1 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    54
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    55
            // 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
    56
            // 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
    57
            *( ( 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
    58
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    59
            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
    60
            ptr += length1;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    61
            // 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
    62
            while ( length1++ < 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
                *ptr++ = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    65
                }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    66
            length += sizeof ( TUint32 ) + lengthAligned1;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    67
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    68
        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
    69
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    70
            *( ( TUint32* )ptr ) = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    71
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    72
            length += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    73
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    74
        // 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
    75
        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
    76
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    77
            *( ( TUint16* )ptr ) = aParam2;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    78
            ptr += sizeof ( TUint16 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    79
            length += sizeof ( TUint16 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    80
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    81
        *( ( TUint8* )ptr ) = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    82
        ptr += sizeof ( TUint8 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    83
        *( ( TUint8* )ptr ) = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    84
        ptr += sizeof ( TUint8 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    85
        ptr -= length;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    86
        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
    87
        }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    88
    return retval;
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
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    91
#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
    92
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    93
#endif
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    94
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    95
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    96
#ifndef __KERNEL_MODE__
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
    97
#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
    98
#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
    99
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   100
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
   101
    {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   102
    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
   103
    if ( retval )
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   104
        {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   105
        TInt length = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   106
        // 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
   107
        TInt length1 = aParam1.Size();
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   108
        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
   109
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   110
            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
   111
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   112
        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
   113
        if (lengthAligned1 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   114
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   115
            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
   116
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   117
        TUint8 data[ KOstMaxDataLength ];
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   118
        TUint8* ptr = data;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   119
        // 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
   120
        // when adding parameters
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   121
        length = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   122
        if (length1 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   123
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   124
            // 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
   125
            // 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
   126
            *( ( 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
   127
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   128
            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
   129
            ptr += length1;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   130
            // 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
   131
            while ( length1++ < 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
                *ptr++ = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   134
                }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   135
            length += sizeof ( TUint32 ) + lengthAligned1;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   136
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   137
        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
   138
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   139
            *( ( TUint32* )ptr ) = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   140
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   141
            length += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   142
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   143
        // 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
   144
        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
   145
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   146
            *( ( TUint* )ptr ) = aParam2;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   147
            ptr += sizeof ( TUint );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   148
            length += sizeof ( TUint );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   149
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   150
        // 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
   151
        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
   152
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   153
            *( ( TInt* )ptr ) = aParam3;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   154
            ptr += sizeof ( TInt );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   155
            length += sizeof ( TInt );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   156
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   157
        ptr -= length;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   158
        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
   159
        }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   160
    return retval;
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
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   163
#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
   164
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
#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
   167
#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
   168
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   169
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
   170
    {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   171
    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
   172
    if ( retval )
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   173
        {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   174
        TInt length = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   175
        // 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
   176
        TInt length1 = aParam1.Size();
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   177
        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
   178
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   179
            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
   180
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   181
        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
   182
        if (lengthAligned1 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   183
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   184
            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
   185
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   186
        TUint8 data[ KOstMaxDataLength ];
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   187
        TUint8* ptr = data;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   188
        // 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
   189
        // when adding parameters
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   190
        length = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   191
        if (length1 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   192
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   193
            // 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
   194
            // 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
   195
            *( ( 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
   196
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   197
            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
   198
            ptr += length1;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   199
            // 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
   200
            while ( length1++ < 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
                *ptr++ = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   203
                }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   204
            length += sizeof ( TUint32 ) + lengthAligned1;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   205
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   206
        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
   207
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   208
            *( ( TUint32* )ptr ) = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   209
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   210
            length += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   211
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   212
        // 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
   213
        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
   214
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   215
            *( ( TUint* )ptr ) = aParam2;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   216
            ptr += sizeof ( TUint );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   217
            length += sizeof ( TUint );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   218
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   219
        // 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
   220
        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
   221
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   222
            *( ( TInt* )ptr ) = aParam3;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   223
            ptr += sizeof ( TInt );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   224
            length += sizeof ( TInt );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   225
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   226
        ptr -= length;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   227
        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
   228
        }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   229
    return retval;
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
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   232
#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
   233
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   234
#endif
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   235
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   236
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   237
#ifndef __KERNEL_MODE__
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   238
#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
   239
#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
   240
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   241
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
   242
    {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   243
    TBool retval;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   244
    TInt size = aParam1.Size();
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   245
    // 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
   246
    if (size % 4 == 0)
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
        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
   249
        // 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
   250
        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
   251
        }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   252
    else
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   253
        {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   254
        TUint8 data[ KOstMaxDataLength ];
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   255
        TUint8* ptr = data;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   256
        if (size > KOstMaxDataLength)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   257
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   258
            size = KOstMaxDataLength;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   259
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   260
        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
   261
        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
   262
        ptr += size;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   263
        // 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
   264
        while ( size++ < sizeAligned )
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   265
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   266
            *ptr++ = 0;
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
        ptr -= sizeAligned;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   269
        size = sizeAligned;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   270
        // 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
   271
        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
   272
        }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   273
    return retval;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   274
    }
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
#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
   277
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   278
#endif
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   279
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   280
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   281
#ifndef __KERNEL_MODE__
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   282
#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
   283
#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
   284
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   285
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
   286
    {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   287
    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
   288
    if ( retval )
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   289
        {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   290
        TInt length = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   291
        // 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
   292
        TInt length1 = aParam1.Size();
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   293
        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
   294
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   295
            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
   296
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   297
        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
   298
        if (lengthAligned1 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   299
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   300
            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
   301
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   302
        // 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
   303
        TInt length2 = aParam2.Size();
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   304
        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
   305
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   306
            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
   307
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   308
        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
   309
        if (lengthAligned2 > 0)
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
            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
   312
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   313
        TUint8 data[ KOstMaxDataLength ];
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   314
        TUint8* ptr = data;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   315
        // 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
   316
        // when adding parameters
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   317
        length = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   318
        if (length1 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   319
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   320
            // 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
   321
            // 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
   322
            *( ( 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
   323
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   324
            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
   325
            ptr += length1;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   326
            // 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
   327
            while ( length1++ < lengthAligned1 )
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
                *ptr++ = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   330
                }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   331
            length += sizeof ( TUint32 ) + lengthAligned1;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   332
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   333
        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
   334
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   335
            *( ( TUint32* )ptr ) = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   336
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   337
            length += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   338
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   339
        if (length2 > 0)
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   340
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   341
            // 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
   342
            // 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
   343
            *( ( 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
   344
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   345
            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
   346
            ptr += length2;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   347
            // 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
   348
            while ( length2++ < lengthAligned2 )
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   349
                {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   350
                *ptr++ = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   351
                }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   352
            length += sizeof ( TUint32 ) + lengthAligned2;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   353
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   354
        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
   355
            {
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   356
            *( ( TUint32* )ptr ) = 0;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   357
            ptr += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   358
            length += sizeof ( TUint32 );
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   359
            }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   360
        ptr -= length;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   361
        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
   362
        }
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   363
    return retval;
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   364
    }
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
#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
   367
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   368
#endif
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
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   371
#endif
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   372
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   373
// End of file
3baa1be38e89 Add missing "traces" directories to thumbnailmanager, to fix Bug 3676
Jyri Kokkonen <jyri.kokkonen@nokia.com>
parents:
diff changeset
   374