contentstorage/cautils/src/cainnerquery.cpp
author hgs
Wed, 24 Mar 2010 03:15:43 +0200
changeset 89 1e87eb3b400f
parent 88 7f0462e8c3da
child 99 7aaf39b772ac
permissions -rw-r--r--
201011
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
85
7feec50967db 201003_02
hgs
parents:
diff changeset
     1
/*
7feec50967db 201003_02
hgs
parents:
diff changeset
     2
 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
7feec50967db 201003_02
hgs
parents:
diff changeset
     3
 * All rights reserved.
7feec50967db 201003_02
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
7feec50967db 201003_02
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
7feec50967db 201003_02
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
7feec50967db 201003_02
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
7feec50967db 201003_02
hgs
parents:
diff changeset
     8
 *
7feec50967db 201003_02
hgs
parents:
diff changeset
     9
 * Initial Contributors:
7feec50967db 201003_02
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
7feec50967db 201003_02
hgs
parents:
diff changeset
    11
 *
7feec50967db 201003_02
hgs
parents:
diff changeset
    12
 * Contributors:
7feec50967db 201003_02
hgs
parents:
diff changeset
    13
 *
7feec50967db 201003_02
hgs
parents:
diff changeset
    14
 * Description:  ?Description
7feec50967db 201003_02
hgs
parents:
diff changeset
    15
 *
7feec50967db 201003_02
hgs
parents:
diff changeset
    16
 */
7feec50967db 201003_02
hgs
parents:
diff changeset
    17
7feec50967db 201003_02
hgs
parents:
diff changeset
    18
#include <badesca.h>
86
hgs
parents: 85
diff changeset
    19
#include <s32strm.h>
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    20
#include "cadef.h"
7feec50967db 201003_02
hgs
parents:
diff changeset
    21
#include "cainnerquery.h"
7feec50967db 201003_02
hgs
parents:
diff changeset
    22
7feec50967db 201003_02
hgs
parents:
diff changeset
    23
// ======== MEMBER FUNCTIONS ========
7feec50967db 201003_02
hgs
parents:
diff changeset
    24
7feec50967db 201003_02
hgs
parents:
diff changeset
    25
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    26
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    27
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    28
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    29
CCaInnerQuery::~CCaInnerQuery()
7feec50967db 201003_02
hgs
parents:
diff changeset
    30
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    31
    delete iEntryTypeNames;
7feec50967db 201003_02
hgs
parents:
diff changeset
    32
    iIds.Close();
88
hgs
parents: 86
diff changeset
    33
    iAttributes.ResetAndDestroy();
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    34
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
    35
7feec50967db 201003_02
hgs
parents:
diff changeset
    36
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    37
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    38
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    39
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    40
EXPORT_C CCaInnerQuery* CCaInnerQuery::NewL()
7feec50967db 201003_02
hgs
parents:
diff changeset
    41
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    42
    CCaInnerQuery* entry = CCaInnerQuery::NewLC();
7feec50967db 201003_02
hgs
parents:
diff changeset
    43
    CleanupStack::Pop( entry );
7feec50967db 201003_02
hgs
parents:
diff changeset
    44
    return entry;
7feec50967db 201003_02
hgs
parents:
diff changeset
    45
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
    46
7feec50967db 201003_02
hgs
parents:
diff changeset
    47
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    48
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    49
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    50
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    51
EXPORT_C CCaInnerQuery* CCaInnerQuery::NewLC()
7feec50967db 201003_02
hgs
parents:
diff changeset
    52
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    53
    CCaInnerQuery* self = new ( ELeave ) CCaInnerQuery();
7feec50967db 201003_02
hgs
parents:
diff changeset
    54
    CleanupStack::PushL( self );
7feec50967db 201003_02
hgs
parents:
diff changeset
    55
    self->ConstructL();
7feec50967db 201003_02
hgs
parents:
diff changeset
    56
    return self;
7feec50967db 201003_02
hgs
parents:
diff changeset
    57
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
    58
7feec50967db 201003_02
hgs
parents:
diff changeset
    59
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    60
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    61
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    62
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    63
EXPORT_C void CCaInnerQuery::ExternalizeL( RWriteStream& aStream ) const
7feec50967db 201003_02
hgs
parents:
diff changeset
    64
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    65
    aStream.WriteInt32L( iParentId );
7feec50967db 201003_02
hgs
parents:
diff changeset
    66
    aStream.WriteInt32L( iRole );
7feec50967db 201003_02
hgs
parents:
diff changeset
    67
    aStream.WriteUint32L( iFlagsOn );
7feec50967db 201003_02
hgs
parents:
diff changeset
    68
    aStream.WriteUint32L( iFlagsOff );
7feec50967db 201003_02
hgs
parents:
diff changeset
    69
    aStream.WriteUint32L( iUid );
7feec50967db 201003_02
hgs
parents:
diff changeset
    70
    aStream.WriteUint32L( iSort );
7feec50967db 201003_02
hgs
parents:
diff changeset
    71
    aStream.WriteUint32L( iCount );
7feec50967db 201003_02
hgs
parents:
diff changeset
    72
    aStream.WriteUint32L( iIds.Count() );
7feec50967db 201003_02
hgs
parents:
diff changeset
    73
    for( TInt i = 0; i < iIds.Count(); i++ )
7feec50967db 201003_02
hgs
parents:
diff changeset
    74
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
    75
        aStream.WriteInt32L( iIds[i] );
7feec50967db 201003_02
hgs
parents:
diff changeset
    76
        }
7feec50967db 201003_02
hgs
parents:
diff changeset
    77
7feec50967db 201003_02
hgs
parents:
diff changeset
    78
    aStream.WriteUint32L( iEntryTypeNames->MdcaCount() );
7feec50967db 201003_02
hgs
parents:
diff changeset
    79
    for( TInt i = 0; i < iEntryTypeNames->MdcaCount(); i++ )
7feec50967db 201003_02
hgs
parents:
diff changeset
    80
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
    81
        aStream.WriteInt32L( iEntryTypeNames->MdcaPoint( i ).Length() );
7feec50967db 201003_02
hgs
parents:
diff changeset
    82
        aStream.WriteL( iEntryTypeNames->MdcaPoint( i ),
7feec50967db 201003_02
hgs
parents:
diff changeset
    83
                iEntryTypeNames->MdcaPoint( i ).Length() );
7feec50967db 201003_02
hgs
parents:
diff changeset
    84
        }
88
hgs
parents: 86
diff changeset
    85
    iAttributes.ExternalizeL( aStream );
hgs
parents: 86
diff changeset
    86
    aStream.CommitL();
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    87
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
    88
7feec50967db 201003_02
hgs
parents:
diff changeset
    89
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    90
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    91
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    92
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    93
EXPORT_C void CCaInnerQuery::InternalizeL( RReadStream& aStream )
7feec50967db 201003_02
hgs
parents:
diff changeset
    94
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    95
    iParentId = aStream.ReadInt32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
    96
    iRole = aStream.ReadInt32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
    97
    iFlagsOn = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
    98
    iFlagsOff = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
    99
    iUid = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   100
    iSort = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   101
    iCount = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   102
    TInt count = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   103
    iIds.Close();
7feec50967db 201003_02
hgs
parents:
diff changeset
   104
    for( TInt i = 0; i < count; i++ )
7feec50967db 201003_02
hgs
parents:
diff changeset
   105
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
   106
        iIds.AppendL( aStream.ReadInt32L() );
7feec50967db 201003_02
hgs
parents:
diff changeset
   107
        }
7feec50967db 201003_02
hgs
parents:
diff changeset
   108
    iEntryTypeNames->Reset();
7feec50967db 201003_02
hgs
parents:
diff changeset
   109
    count = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   110
    for( TInt i = 0; i < count; i++ )
7feec50967db 201003_02
hgs
parents:
diff changeset
   111
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
   112
        TInt length = aStream.ReadInt32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   113
        RBuf16 buf;
7feec50967db 201003_02
hgs
parents:
diff changeset
   114
        CleanupClosePushL( buf );
7feec50967db 201003_02
hgs
parents:
diff changeset
   115
        buf.CreateL( length );
7feec50967db 201003_02
hgs
parents:
diff changeset
   116
        aStream.ReadL( buf, length );
7feec50967db 201003_02
hgs
parents:
diff changeset
   117
        iEntryTypeNames->AppendL( buf );
7feec50967db 201003_02
hgs
parents:
diff changeset
   118
        CleanupStack::PopAndDestroy( &buf );
7feec50967db 201003_02
hgs
parents:
diff changeset
   119
        }
88
hgs
parents: 86
diff changeset
   120
    iAttributes.InternalizeL( aStream );
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   121
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   122
7feec50967db 201003_02
hgs
parents:
diff changeset
   123
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   124
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   125
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   126
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   127
void CCaInnerQuery::ConstructL()
7feec50967db 201003_02
hgs
parents:
diff changeset
   128
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   129
    iEntryTypeNames = new ( ELeave ) CDesC16ArrayFlat( KDefaultGranularity );
7feec50967db 201003_02
hgs
parents:
diff changeset
   130
    iParentId = -1;
89
hgs
parents: 88
diff changeset
   131
    iRole = Item | Group;
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   132
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   133
7feec50967db 201003_02
hgs
parents:
diff changeset
   134
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   135
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   136
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   137
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   138
CCaInnerQuery::CCaInnerQuery()
7feec50967db 201003_02
hgs
parents:
diff changeset
   139
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   140
7feec50967db 201003_02
hgs
parents:
diff changeset
   141
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   142
7feec50967db 201003_02
hgs
parents:
diff changeset
   143
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   144
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   145
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   146
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   147
EXPORT_C const RArray<TInt>& CCaInnerQuery::GetIds() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   148
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   149
    return iIds;
7feec50967db 201003_02
hgs
parents:
diff changeset
   150
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   151
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   152
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   153
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   154
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   155
EXPORT_C void CCaInnerQuery::SetIdsL( const RArray<TInt>& aArray )
7feec50967db 201003_02
hgs
parents:
diff changeset
   156
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   157
    for( TInt i( 0 ); i < aArray.Count(); ++i )
7feec50967db 201003_02
hgs
parents:
diff changeset
   158
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
   159
        iIds.AppendL( aArray[i] );
7feec50967db 201003_02
hgs
parents:
diff changeset
   160
        }
7feec50967db 201003_02
hgs
parents:
diff changeset
   161
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   162
7feec50967db 201003_02
hgs
parents:
diff changeset
   163
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   164
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   165
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   166
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   167
EXPORT_C TInt CCaInnerQuery::GetParentId() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   168
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   169
    return iParentId;
7feec50967db 201003_02
hgs
parents:
diff changeset
   170
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   171
7feec50967db 201003_02
hgs
parents:
diff changeset
   172
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   173
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   174
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   175
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   176
EXPORT_C void CCaInnerQuery::SetParentId( TInt aId )
7feec50967db 201003_02
hgs
parents:
diff changeset
   177
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   178
    iParentId = aId;
7feec50967db 201003_02
hgs
parents:
diff changeset
   179
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   180
7feec50967db 201003_02
hgs
parents:
diff changeset
   181
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   182
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   183
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   184
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   185
EXPORT_C const CDesC16ArrayFlat* CCaInnerQuery::GetEntryTypeNames() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   186
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   187
    return iEntryTypeNames;
7feec50967db 201003_02
hgs
parents:
diff changeset
   188
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   189
7feec50967db 201003_02
hgs
parents:
diff changeset
   190
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   191
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   192
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   193
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   194
EXPORT_C void CCaInnerQuery::SetEntryTypeNames( CDesC16ArrayFlat* aArray )
7feec50967db 201003_02
hgs
parents:
diff changeset
   195
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   196
    ASSERT( aArray );
7feec50967db 201003_02
hgs
parents:
diff changeset
   197
    delete iEntryTypeNames;
7feec50967db 201003_02
hgs
parents:
diff changeset
   198
    iEntryTypeNames = aArray;
7feec50967db 201003_02
hgs
parents:
diff changeset
   199
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   200
7feec50967db 201003_02
hgs
parents:
diff changeset
   201
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   202
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   203
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   204
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   205
EXPORT_C TInt CCaInnerQuery::GetRole() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   206
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   207
    return iRole;
7feec50967db 201003_02
hgs
parents:
diff changeset
   208
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   209
7feec50967db 201003_02
hgs
parents:
diff changeset
   210
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   211
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   212
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   213
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   214
EXPORT_C void CCaInnerQuery::SetRole( TInt aRole )
7feec50967db 201003_02
hgs
parents:
diff changeset
   215
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   216
    iRole = aRole;
7feec50967db 201003_02
hgs
parents:
diff changeset
   217
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   218
7feec50967db 201003_02
hgs
parents:
diff changeset
   219
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   220
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   221
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   222
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   223
EXPORT_C TUint CCaInnerQuery::GetFlagsOn() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   224
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   225
    return iFlagsOn;
7feec50967db 201003_02
hgs
parents:
diff changeset
   226
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   227
7feec50967db 201003_02
hgs
parents:
diff changeset
   228
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   229
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   230
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   231
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   232
EXPORT_C void CCaInnerQuery::SetFlagsOn( TUint aFlagsOn )
7feec50967db 201003_02
hgs
parents:
diff changeset
   233
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   234
    iFlagsOn = aFlagsOn;
7feec50967db 201003_02
hgs
parents:
diff changeset
   235
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   236
7feec50967db 201003_02
hgs
parents:
diff changeset
   237
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   238
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   239
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   240
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   241
EXPORT_C TUint CCaInnerQuery::GetFlagsOff() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   242
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   243
    return iFlagsOff;
7feec50967db 201003_02
hgs
parents:
diff changeset
   244
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   245
7feec50967db 201003_02
hgs
parents:
diff changeset
   246
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   247
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   248
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   249
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   250
EXPORT_C void CCaInnerQuery::SetFlagsOff( TUint aFlagsOff )
7feec50967db 201003_02
hgs
parents:
diff changeset
   251
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   252
    iFlagsOff = aFlagsOff;
7feec50967db 201003_02
hgs
parents:
diff changeset
   253
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   254
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   255
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   256
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   257
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   258
EXPORT_C TUint CCaInnerQuery::GetUid() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   259
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   260
    return iUid;
7feec50967db 201003_02
hgs
parents:
diff changeset
   261
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   262
7feec50967db 201003_02
hgs
parents:
diff changeset
   263
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   264
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   265
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   266
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   267
EXPORT_C void CCaInnerQuery::SetUid( TUint aUid )
7feec50967db 201003_02
hgs
parents:
diff changeset
   268
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   269
    iUid = aUid;
7feec50967db 201003_02
hgs
parents:
diff changeset
   270
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   271
7feec50967db 201003_02
hgs
parents:
diff changeset
   272
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   273
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   274
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   275
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   276
EXPORT_C CCaInnerQuery::TSortAttribute CCaInnerQuery::GetSort() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   277
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   278
    return (TSortAttribute ) iSort;
7feec50967db 201003_02
hgs
parents:
diff changeset
   279
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   280
7feec50967db 201003_02
hgs
parents:
diff changeset
   281
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   282
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   283
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   284
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   285
EXPORT_C void CCaInnerQuery::SetSort( CCaInnerQuery::TSortAttribute aSort )
7feec50967db 201003_02
hgs
parents:
diff changeset
   286
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   287
    iSort = (TInt ) aSort;
7feec50967db 201003_02
hgs
parents:
diff changeset
   288
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   289
7feec50967db 201003_02
hgs
parents:
diff changeset
   290
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   291
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   292
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   293
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   294
EXPORT_C void CCaInnerQuery::SetCount( TUint aCount )
7feec50967db 201003_02
hgs
parents:
diff changeset
   295
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   296
    iCount = aCount;
7feec50967db 201003_02
hgs
parents:
diff changeset
   297
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   298
7feec50967db 201003_02
hgs
parents:
diff changeset
   299
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   300
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   301
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   302
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   303
EXPORT_C TUint CCaInnerQuery::GetCount() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   304
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   305
    return iCount;
7feec50967db 201003_02
hgs
parents:
diff changeset
   306
    }
88
hgs
parents: 86
diff changeset
   307
hgs
parents: 86
diff changeset
   308
// ---------------------------------------------------------------------------
hgs
parents: 86
diff changeset
   309
//
hgs
parents: 86
diff changeset
   310
// ---------------------------------------------------------------------------
hgs
parents: 86
diff changeset
   311
//
hgs
parents: 86
diff changeset
   312
EXPORT_C void CCaInnerQuery::AddAttributeL( const TDesC& aKey,
hgs
parents: 86
diff changeset
   313
        const TDesC& aValue )
hgs
parents: 86
diff changeset
   314
    {
hgs
parents: 86
diff changeset
   315
    // to avoid duplicated attribute
hgs
parents: 86
diff changeset
   316
    if( iAttributes.Exist( aKey ) )
hgs
parents: 86
diff changeset
   317
        {
hgs
parents: 86
diff changeset
   318
        iAttributes.RemoveAttribute( aKey );
hgs
parents: 86
diff changeset
   319
        }
hgs
parents: 86
diff changeset
   320
    CCaEntryAttribute* attr = CCaEntryAttribute::NewLC( aKey );
hgs
parents: 86
diff changeset
   321
    attr->SetValueL( aValue );
hgs
parents: 86
diff changeset
   322
    iAttributes.AppendL( attr );
hgs
parents: 86
diff changeset
   323
    CleanupStack::Pop( attr );
hgs
parents: 86
diff changeset
   324
    }
hgs
parents: 86
diff changeset
   325
hgs
parents: 86
diff changeset
   326
// ---------------------------------------------------------------------------
hgs
parents: 86
diff changeset
   327
//
hgs
parents: 86
diff changeset
   328
// ---------------------------------------------------------------------------
hgs
parents: 86
diff changeset
   329
//
hgs
parents: 86
diff changeset
   330
EXPORT_C const RCaEntryAttrArray& CCaInnerQuery::GetAttributes() const
hgs
parents: 86
diff changeset
   331
    {
hgs
parents: 86
diff changeset
   332
    return iAttributes;
hgs
parents: 86
diff changeset
   333
    }