contentstorage/cautils/src/cainnerquery.cpp
author hgs
Thu, 24 Jun 2010 16:18:29 +0300
changeset 99 7aaf39b772ac
parent 89 1e87eb3b400f
permissions -rw-r--r--
201025
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 );
99
hgs
parents: 89
diff changeset
    66
    aStream.WriteInt32L( iChildId );
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    67
    aStream.WriteInt32L( iRole );
7feec50967db 201003_02
hgs
parents:
diff changeset
    68
    aStream.WriteUint32L( iFlagsOn );
7feec50967db 201003_02
hgs
parents:
diff changeset
    69
    aStream.WriteUint32L( iFlagsOff );
7feec50967db 201003_02
hgs
parents:
diff changeset
    70
    aStream.WriteUint32L( iUid );
7feec50967db 201003_02
hgs
parents:
diff changeset
    71
    aStream.WriteUint32L( iSort );
7feec50967db 201003_02
hgs
parents:
diff changeset
    72
    aStream.WriteUint32L( iCount );
7feec50967db 201003_02
hgs
parents:
diff changeset
    73
    aStream.WriteUint32L( iIds.Count() );
7feec50967db 201003_02
hgs
parents:
diff changeset
    74
    for( TInt i = 0; i < iIds.Count(); i++ )
7feec50967db 201003_02
hgs
parents:
diff changeset
    75
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
    76
        aStream.WriteInt32L( iIds[i] );
7feec50967db 201003_02
hgs
parents:
diff changeset
    77
        }
7feec50967db 201003_02
hgs
parents:
diff changeset
    78
7feec50967db 201003_02
hgs
parents:
diff changeset
    79
    aStream.WriteUint32L( iEntryTypeNames->MdcaCount() );
7feec50967db 201003_02
hgs
parents:
diff changeset
    80
    for( TInt i = 0; i < iEntryTypeNames->MdcaCount(); i++ )
7feec50967db 201003_02
hgs
parents:
diff changeset
    81
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
    82
        aStream.WriteInt32L( iEntryTypeNames->MdcaPoint( i ).Length() );
7feec50967db 201003_02
hgs
parents:
diff changeset
    83
        aStream.WriteL( iEntryTypeNames->MdcaPoint( i ),
7feec50967db 201003_02
hgs
parents:
diff changeset
    84
                iEntryTypeNames->MdcaPoint( i ).Length() );
7feec50967db 201003_02
hgs
parents:
diff changeset
    85
        }
88
hgs
parents: 86
diff changeset
    86
    iAttributes.ExternalizeL( aStream );
hgs
parents: 86
diff changeset
    87
    aStream.CommitL();
85
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
//
7feec50967db 201003_02
hgs
parents:
diff changeset
    94
EXPORT_C void CCaInnerQuery::InternalizeL( RReadStream& aStream )
7feec50967db 201003_02
hgs
parents:
diff changeset
    95
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    96
    iParentId = aStream.ReadInt32L();
99
hgs
parents: 89
diff changeset
    97
    iChildId = aStream.ReadInt32L();
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    98
    iRole = aStream.ReadInt32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
    99
    iFlagsOn = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   100
    iFlagsOff = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   101
    iUid = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   102
    iSort = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   103
    iCount = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   104
    TInt count = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   105
    iIds.Close();
7feec50967db 201003_02
hgs
parents:
diff changeset
   106
    for( TInt i = 0; i < count; i++ )
7feec50967db 201003_02
hgs
parents:
diff changeset
   107
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
   108
        iIds.AppendL( aStream.ReadInt32L() );
7feec50967db 201003_02
hgs
parents:
diff changeset
   109
        }
7feec50967db 201003_02
hgs
parents:
diff changeset
   110
    iEntryTypeNames->Reset();
7feec50967db 201003_02
hgs
parents:
diff changeset
   111
    count = aStream.ReadUint32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   112
    for( TInt i = 0; i < count; i++ )
7feec50967db 201003_02
hgs
parents:
diff changeset
   113
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
   114
        TInt length = aStream.ReadInt32L();
7feec50967db 201003_02
hgs
parents:
diff changeset
   115
        RBuf16 buf;
7feec50967db 201003_02
hgs
parents:
diff changeset
   116
        CleanupClosePushL( buf );
7feec50967db 201003_02
hgs
parents:
diff changeset
   117
        buf.CreateL( length );
7feec50967db 201003_02
hgs
parents:
diff changeset
   118
        aStream.ReadL( buf, length );
7feec50967db 201003_02
hgs
parents:
diff changeset
   119
        iEntryTypeNames->AppendL( buf );
7feec50967db 201003_02
hgs
parents:
diff changeset
   120
        CleanupStack::PopAndDestroy( &buf );
7feec50967db 201003_02
hgs
parents:
diff changeset
   121
        }
88
hgs
parents: 86
diff changeset
   122
    iAttributes.InternalizeL( aStream );
85
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
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   128
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   129
void CCaInnerQuery::ConstructL()
7feec50967db 201003_02
hgs
parents:
diff changeset
   130
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   131
    iEntryTypeNames = new ( ELeave ) CDesC16ArrayFlat( KDefaultGranularity );
7feec50967db 201003_02
hgs
parents:
diff changeset
   132
    iParentId = -1;
99
hgs
parents: 89
diff changeset
   133
    iChildId = -1;
89
hgs
parents: 88
diff changeset
   134
    iRole = Item | Group;
85
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
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   139
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   140
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   141
CCaInnerQuery::CCaInnerQuery()
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
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   148
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   149
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   150
EXPORT_C const RArray<TInt>& CCaInnerQuery::GetIds() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   151
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   152
    return iIds;
7feec50967db 201003_02
hgs
parents:
diff changeset
   153
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   154
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   155
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   156
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   157
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   158
EXPORT_C void CCaInnerQuery::SetIdsL( const RArray<TInt>& aArray )
7feec50967db 201003_02
hgs
parents:
diff changeset
   159
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   160
    for( TInt i( 0 ); i < aArray.Count(); ++i )
7feec50967db 201003_02
hgs
parents:
diff changeset
   161
        {
7feec50967db 201003_02
hgs
parents:
diff changeset
   162
        iIds.AppendL( aArray[i] );
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
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   168
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   169
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   170
EXPORT_C TInt CCaInnerQuery::GetParentId() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   171
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   172
    return iParentId;
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
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   177
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   178
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   179
EXPORT_C void CCaInnerQuery::SetParentId( TInt aId )
7feec50967db 201003_02
hgs
parents:
diff changeset
   180
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   181
    iParentId = aId;
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
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   186
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   187
//
99
hgs
parents: 89
diff changeset
   188
EXPORT_C TInt CCaInnerQuery::GetChildId() const
hgs
parents: 89
diff changeset
   189
    {
hgs
parents: 89
diff changeset
   190
    return iChildId;
hgs
parents: 89
diff changeset
   191
    }
hgs
parents: 89
diff changeset
   192
hgs
parents: 89
diff changeset
   193
// ---------------------------------------------------------------------------
hgs
parents: 89
diff changeset
   194
//
hgs
parents: 89
diff changeset
   195
// ---------------------------------------------------------------------------
hgs
parents: 89
diff changeset
   196
//
hgs
parents: 89
diff changeset
   197
EXPORT_C void CCaInnerQuery::SetChildId( TInt aId )
hgs
parents: 89
diff changeset
   198
    {
hgs
parents: 89
diff changeset
   199
    iChildId = aId;
hgs
parents: 89
diff changeset
   200
    }
hgs
parents: 89
diff changeset
   201
hgs
parents: 89
diff changeset
   202
hgs
parents: 89
diff changeset
   203
// ---------------------------------------------------------------------------
hgs
parents: 89
diff changeset
   204
//
hgs
parents: 89
diff changeset
   205
// ---------------------------------------------------------------------------
hgs
parents: 89
diff changeset
   206
//
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   207
EXPORT_C const CDesC16ArrayFlat* CCaInnerQuery::GetEntryTypeNames() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   208
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   209
    return iEntryTypeNames;
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
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   215
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   216
EXPORT_C void CCaInnerQuery::SetEntryTypeNames( CDesC16ArrayFlat* aArray )
7feec50967db 201003_02
hgs
parents:
diff changeset
   217
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   218
    ASSERT( aArray );
7feec50967db 201003_02
hgs
parents:
diff changeset
   219
    delete iEntryTypeNames;
7feec50967db 201003_02
hgs
parents:
diff changeset
   220
    iEntryTypeNames = aArray;
7feec50967db 201003_02
hgs
parents:
diff changeset
   221
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   222
7feec50967db 201003_02
hgs
parents:
diff changeset
   223
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   224
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   225
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   226
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   227
EXPORT_C TInt CCaInnerQuery::GetRole() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   228
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   229
    return iRole;
7feec50967db 201003_02
hgs
parents:
diff changeset
   230
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   231
7feec50967db 201003_02
hgs
parents:
diff changeset
   232
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   233
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   234
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   235
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   236
EXPORT_C void CCaInnerQuery::SetRole( TInt aRole )
7feec50967db 201003_02
hgs
parents:
diff changeset
   237
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   238
    iRole = aRole;
7feec50967db 201003_02
hgs
parents:
diff changeset
   239
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   240
7feec50967db 201003_02
hgs
parents:
diff changeset
   241
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   242
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   243
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   244
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   245
EXPORT_C TUint CCaInnerQuery::GetFlagsOn() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   246
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   247
    return iFlagsOn;
7feec50967db 201003_02
hgs
parents:
diff changeset
   248
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   249
7feec50967db 201003_02
hgs
parents:
diff changeset
   250
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   251
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   252
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   253
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   254
EXPORT_C void CCaInnerQuery::SetFlagsOn( TUint aFlagsOn )
7feec50967db 201003_02
hgs
parents:
diff changeset
   255
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   256
    iFlagsOn = aFlagsOn;
7feec50967db 201003_02
hgs
parents:
diff changeset
   257
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   258
7feec50967db 201003_02
hgs
parents:
diff changeset
   259
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   260
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   261
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   262
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   263
EXPORT_C TUint CCaInnerQuery::GetFlagsOff() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   264
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   265
    return iFlagsOff;
7feec50967db 201003_02
hgs
parents:
diff changeset
   266
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   267
7feec50967db 201003_02
hgs
parents:
diff changeset
   268
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   269
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   270
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   271
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   272
EXPORT_C void CCaInnerQuery::SetFlagsOff( TUint aFlagsOff )
7feec50967db 201003_02
hgs
parents:
diff changeset
   273
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   274
    iFlagsOff = aFlagsOff;
7feec50967db 201003_02
hgs
parents:
diff changeset
   275
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   276
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   277
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   278
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   279
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   280
EXPORT_C TUint CCaInnerQuery::GetUid() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   281
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   282
    return iUid;
7feec50967db 201003_02
hgs
parents:
diff changeset
   283
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   284
7feec50967db 201003_02
hgs
parents:
diff changeset
   285
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   286
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   287
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   288
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   289
EXPORT_C void CCaInnerQuery::SetUid( TUint aUid )
7feec50967db 201003_02
hgs
parents:
diff changeset
   290
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   291
    iUid = aUid;
7feec50967db 201003_02
hgs
parents:
diff changeset
   292
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   293
7feec50967db 201003_02
hgs
parents:
diff changeset
   294
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   295
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   296
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   297
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   298
EXPORT_C CCaInnerQuery::TSortAttribute CCaInnerQuery::GetSort() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   299
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   300
    return (TSortAttribute ) iSort;
7feec50967db 201003_02
hgs
parents:
diff changeset
   301
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   302
7feec50967db 201003_02
hgs
parents:
diff changeset
   303
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   304
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   305
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   306
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   307
EXPORT_C void CCaInnerQuery::SetSort( CCaInnerQuery::TSortAttribute aSort )
7feec50967db 201003_02
hgs
parents:
diff changeset
   308
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   309
    iSort = (TInt ) aSort;
7feec50967db 201003_02
hgs
parents:
diff changeset
   310
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   311
7feec50967db 201003_02
hgs
parents:
diff changeset
   312
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   313
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   314
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   315
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   316
EXPORT_C void CCaInnerQuery::SetCount( TUint aCount )
7feec50967db 201003_02
hgs
parents:
diff changeset
   317
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   318
    iCount = aCount;
7feec50967db 201003_02
hgs
parents:
diff changeset
   319
    }
7feec50967db 201003_02
hgs
parents:
diff changeset
   320
7feec50967db 201003_02
hgs
parents:
diff changeset
   321
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   322
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   323
// ---------------------------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   324
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   325
EXPORT_C TUint CCaInnerQuery::GetCount() const
7feec50967db 201003_02
hgs
parents:
diff changeset
   326
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   327
    return iCount;
7feec50967db 201003_02
hgs
parents:
diff changeset
   328
    }
88
hgs
parents: 86
diff changeset
   329
hgs
parents: 86
diff changeset
   330
// ---------------------------------------------------------------------------
hgs
parents: 86
diff changeset
   331
//
hgs
parents: 86
diff changeset
   332
// ---------------------------------------------------------------------------
hgs
parents: 86
diff changeset
   333
//
hgs
parents: 86
diff changeset
   334
EXPORT_C void CCaInnerQuery::AddAttributeL( const TDesC& aKey,
hgs
parents: 86
diff changeset
   335
        const TDesC& aValue )
hgs
parents: 86
diff changeset
   336
    {
hgs
parents: 86
diff changeset
   337
    // to avoid duplicated attribute
hgs
parents: 86
diff changeset
   338
    if( iAttributes.Exist( aKey ) )
hgs
parents: 86
diff changeset
   339
        {
hgs
parents: 86
diff changeset
   340
        iAttributes.RemoveAttribute( aKey );
hgs
parents: 86
diff changeset
   341
        }
hgs
parents: 86
diff changeset
   342
    CCaEntryAttribute* attr = CCaEntryAttribute::NewLC( aKey );
hgs
parents: 86
diff changeset
   343
    attr->SetValueL( aValue );
hgs
parents: 86
diff changeset
   344
    iAttributes.AppendL( attr );
hgs
parents: 86
diff changeset
   345
    CleanupStack::Pop( attr );
hgs
parents: 86
diff changeset
   346
    }
hgs
parents: 86
diff changeset
   347
hgs
parents: 86
diff changeset
   348
// ---------------------------------------------------------------------------
hgs
parents: 86
diff changeset
   349
//
hgs
parents: 86
diff changeset
   350
// ---------------------------------------------------------------------------
hgs
parents: 86
diff changeset
   351
//
hgs
parents: 86
diff changeset
   352
EXPORT_C const RCaEntryAttrArray& CCaInnerQuery::GetAttributes() const
hgs
parents: 86
diff changeset
   353
    {
hgs
parents: 86
diff changeset
   354
    return iAttributes;
hgs
parents: 86
diff changeset
   355
    }