data/publisherif/src/transaction.cpp
author jake
Wed, 02 Jun 2010 13:22:05 +0300
changeset 0 b856a9924bbc
permissions -rw-r--r--
initial contribution
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
     1
/*
b856a9924bbc initial contribution
jake
parents:
diff changeset
     2
* Copyright (c) {Year(s)} {Copyright owner}.
b856a9924bbc initial contribution
jake
parents:
diff changeset
     3
* All rights reserved.
b856a9924bbc initial contribution
jake
parents:
diff changeset
     4
* This component and the accompanying materials are made available
b856a9924bbc initial contribution
jake
parents:
diff changeset
     5
* under the terms of the "Eclipse Public License v1.0"
b856a9924bbc initial contribution
jake
parents:
diff changeset
     6
* which accompanies this distribution, and is available
b856a9924bbc initial contribution
jake
parents:
diff changeset
     7
* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
b856a9924bbc initial contribution
jake
parents:
diff changeset
     8
*
b856a9924bbc initial contribution
jake
parents:
diff changeset
     9
* Initial Contributors:
b856a9924bbc initial contribution
jake
parents:
diff changeset
    10
* {Name} {Company} ? Initial contribution
b856a9924bbc initial contribution
jake
parents:
diff changeset
    11
*
b856a9924bbc initial contribution
jake
parents:
diff changeset
    12
* Contributors:
b856a9924bbc initial contribution
jake
parents:
diff changeset
    13
* {Name} {Company} ? {{Description of contribution}}
b856a9924bbc initial contribution
jake
parents:
diff changeset
    14
*
b856a9924bbc initial contribution
jake
parents:
diff changeset
    15
* Description:
b856a9924bbc initial contribution
jake
parents:
diff changeset
    16
* {{Description of the file}}
b856a9924bbc initial contribution
jake
parents:
diff changeset
    17
*
b856a9924bbc initial contribution
jake
parents:
diff changeset
    18
*/
b856a9924bbc initial contribution
jake
parents:
diff changeset
    19
// System includes  
b856a9924bbc initial contribution
jake
parents:
diff changeset
    20
b856a9924bbc initial contribution
jake
parents:
diff changeset
    21
// User includes
b856a9924bbc initial contribution
jake
parents:
diff changeset
    22
#include "transaction.h"
b856a9924bbc initial contribution
jake
parents:
diff changeset
    23
b856a9924bbc initial contribution
jake
parents:
diff changeset
    24
// Constants
b856a9924bbc initial contribution
jake
parents:
diff changeset
    25
b856a9924bbc initial contribution
jake
parents:
diff changeset
    26
// ============================= LOCAL FUNCTIONS ===============================
b856a9924bbc initial contribution
jake
parents:
diff changeset
    27
b856a9924bbc initial contribution
jake
parents:
diff changeset
    28
// ============================ MEMBER FUNCTIONS ===============================
b856a9924bbc initial contribution
jake
parents:
diff changeset
    29
b856a9924bbc initial contribution
jake
parents:
diff changeset
    30
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    31
// CTransactionItem::CTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
    32
// C++ default constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
    33
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    34
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
    35
CTransactionItem::CTransactionItem( const TDesC8& aElementId )
b856a9924bbc initial contribution
jake
parents:
diff changeset
    36
    : iElementId( aElementId.Alloc() )
b856a9924bbc initial contribution
jake
parents:
diff changeset
    37
    {    
b856a9924bbc initial contribution
jake
parents:
diff changeset
    38
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    39
b856a9924bbc initial contribution
jake
parents:
diff changeset
    40
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    41
// CTransactionItem::~CTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
    42
// Destructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
    43
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    44
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
    45
CTransactionItem::~CTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
    46
    {    
b856a9924bbc initial contribution
jake
parents:
diff changeset
    47
    delete iElementId;
b856a9924bbc initial contribution
jake
parents:
diff changeset
    48
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    49
b856a9924bbc initial contribution
jake
parents:
diff changeset
    50
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    51
// CTransactionItem::ElementId()
b856a9924bbc initial contribution
jake
parents:
diff changeset
    52
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    53
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    54
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
    55
const TDesC8& CTransactionItem::ElementId() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
    56
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
    57
    return iElementId ? *iElementId : KNullDesC8();
b856a9924bbc initial contribution
jake
parents:
diff changeset
    58
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    59
b856a9924bbc initial contribution
jake
parents:
diff changeset
    60
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    61
// CImageTransactionItem::CImageTransactionItem
b856a9924bbc initial contribution
jake
parents:
diff changeset
    62
// C++ default constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
    63
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    64
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
    65
CImageTransactionItem::CImageTransactionItem( const TDesC8& aElementId, 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    66
    TInt aImageHandle, TInt aMaskHandle )
b856a9924bbc initial contribution
jake
parents:
diff changeset
    67
    : CTransactionItem( aElementId ), 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    68
      iImageHandle( aImageHandle ), 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    69
      iMaskHandle( aMaskHandle ), 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    70
      iPath( NULL )
b856a9924bbc initial contribution
jake
parents:
diff changeset
    71
    {    
b856a9924bbc initial contribution
jake
parents:
diff changeset
    72
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    73
b856a9924bbc initial contribution
jake
parents:
diff changeset
    74
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    75
// CImageTransactionItem::CImageTransactionItem
b856a9924bbc initial contribution
jake
parents:
diff changeset
    76
// C++ default constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
    77
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    78
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
    79
CImageTransactionItem::CImageTransactionItem( const TDesC8& aElementId, 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    80
    const TDesC& aPath )
b856a9924bbc initial contribution
jake
parents:
diff changeset
    81
    : CTransactionItem( aElementId ), 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    82
      iImageHandle( KErrBadHandle ), 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    83
      iMaskHandle( KErrBadHandle ), 
b856a9924bbc initial contribution
jake
parents:
diff changeset
    84
      iPath( aPath.Alloc() )
b856a9924bbc initial contribution
jake
parents:
diff changeset
    85
    {   
b856a9924bbc initial contribution
jake
parents:
diff changeset
    86
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    87
b856a9924bbc initial contribution
jake
parents:
diff changeset
    88
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    89
// CImageTransactionItem::~CImageTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
    90
// Destructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
    91
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    92
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
    93
CImageTransactionItem::~CImageTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
    94
    {    
b856a9924bbc initial contribution
jake
parents:
diff changeset
    95
    delete iPath;
b856a9924bbc initial contribution
jake
parents:
diff changeset
    96
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    97
b856a9924bbc initial contribution
jake
parents:
diff changeset
    98
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    99
// CImageTransactionItem::Type()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   100
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   101
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   102
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   103
const TDesC8& CImageTransactionItem::Type() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   104
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   105
    _LIT8( KImage, "image" );
b856a9924bbc initial contribution
jake
parents:
diff changeset
   106
    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   107
    return KImage();    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   108
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   109
b856a9924bbc initial contribution
jake
parents:
diff changeset
   110
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   111
// CImageTransactionItem::ImageHandle()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   112
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   113
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   114
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   115
TInt CImageTransactionItem::ImageHandle() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   116
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   117
    return iImageHandle;
b856a9924bbc initial contribution
jake
parents:
diff changeset
   118
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   119
b856a9924bbc initial contribution
jake
parents:
diff changeset
   120
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   121
// CImageTransactionItem::MaskHandle()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   122
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   123
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   124
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   125
TInt CImageTransactionItem::MaskHandle() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   126
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   127
    return iMaskHandle;
b856a9924bbc initial contribution
jake
parents:
diff changeset
   128
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   129
b856a9924bbc initial contribution
jake
parents:
diff changeset
   130
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   131
// CImageTransactionItem::Path()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   132
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   133
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   134
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   135
const TDesC& CImageTransactionItem::Path() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   136
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   137
    return iPath ? *iPath : KNullDesC();
b856a9924bbc initial contribution
jake
parents:
diff changeset
   138
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   139
b856a9924bbc initial contribution
jake
parents:
diff changeset
   140
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   141
// CTextTransactionItem::CTextTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   142
// C++ default constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
   143
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   144
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   145
CTextTransactionItem::CTextTransactionItem( const TDesC8& aElementId, 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   146
    const TDesC& aText )
b856a9924bbc initial contribution
jake
parents:
diff changeset
   147
    : CTransactionItem( aElementId ),
b856a9924bbc initial contribution
jake
parents:
diff changeset
   148
      iText( aText.Alloc() )
b856a9924bbc initial contribution
jake
parents:
diff changeset
   149
    {    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   150
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   151
b856a9924bbc initial contribution
jake
parents:
diff changeset
   152
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   153
// CTextTransactionItem::~CTextTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   154
// Destructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
   155
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   156
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   157
CTextTransactionItem::~CTextTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   158
    {    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   159
    delete iText;
b856a9924bbc initial contribution
jake
parents:
diff changeset
   160
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   161
b856a9924bbc initial contribution
jake
parents:
diff changeset
   162
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   163
// CTextTransactionItem::Type()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   164
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   165
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   166
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   167
const TDesC8& CTextTransactionItem::Type() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   168
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   169
    _LIT8( KText, "text" );
b856a9924bbc initial contribution
jake
parents:
diff changeset
   170
    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   171
    return KText();
b856a9924bbc initial contribution
jake
parents:
diff changeset
   172
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   173
b856a9924bbc initial contribution
jake
parents:
diff changeset
   174
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   175
// CTextTransactionItem::Text()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   176
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   177
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   178
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   179
const TDesC& CTextTransactionItem::Text() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   180
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   181
    return iText ? *iText : KNullDesC();
b856a9924bbc initial contribution
jake
parents:
diff changeset
   182
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   183
b856a9924bbc initial contribution
jake
parents:
diff changeset
   184
b856a9924bbc initial contribution
jake
parents:
diff changeset
   185
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   186
// CDataTransactionItem::CDataTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   187
// C++ default constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
   188
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   189
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   190
CDataTransactionItem::CDataTransactionItem( const TDesC8& aElementId, 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   191
    const TDesC8& aData )
b856a9924bbc initial contribution
jake
parents:
diff changeset
   192
    : CTransactionItem( aElementId ),
b856a9924bbc initial contribution
jake
parents:
diff changeset
   193
      iData( aData.Alloc() )
b856a9924bbc initial contribution
jake
parents:
diff changeset
   194
    {    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   195
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   196
b856a9924bbc initial contribution
jake
parents:
diff changeset
   197
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   198
// CDataTransactionItem::~CDataTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   199
// Destructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
   200
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   201
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   202
CDataTransactionItem::~CDataTransactionItem()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   203
    {    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   204
    delete iData;
b856a9924bbc initial contribution
jake
parents:
diff changeset
   205
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   206
b856a9924bbc initial contribution
jake
parents:
diff changeset
   207
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   208
// CDataTransactionItem::Type()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   209
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   210
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   211
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   212
const TDesC8& CDataTransactionItem::Type() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   213
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   214
    _LIT8( KData, "data" );
b856a9924bbc initial contribution
jake
parents:
diff changeset
   215
    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   216
    return KData();
b856a9924bbc initial contribution
jake
parents:
diff changeset
   217
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   218
b856a9924bbc initial contribution
jake
parents:
diff changeset
   219
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   220
// CDataTransactionItem::Data()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   221
// 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   222
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   223
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   224
const TDesC8& CDataTransactionItem::Data() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   225
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   226
    return iData ? *iData : KNullDesC8();
b856a9924bbc initial contribution
jake
parents:
diff changeset
   227
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   228
b856a9924bbc initial contribution
jake
parents:
diff changeset
   229
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   230
// CTransaction::CTransaction()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   231
// C++ default constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
   232
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   233
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   234
CTransaction::CTransaction( const TDesC& aWidgetId ) 
b856a9924bbc initial contribution
jake
parents:
diff changeset
   235
    : iWidgetId( aWidgetId )
b856a9924bbc initial contribution
jake
parents:
diff changeset
   236
    {            
b856a9924bbc initial contribution
jake
parents:
diff changeset
   237
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   238
b856a9924bbc initial contribution
jake
parents:
diff changeset
   239
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   240
// CTransaction::~CTransaction()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   241
// Destructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
   242
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   243
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   244
CTransaction::~CTransaction()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   245
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   246
    iItems.ResetAndDestroy();
b856a9924bbc initial contribution
jake
parents:
diff changeset
   247
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   248
b856a9924bbc initial contribution
jake
parents:
diff changeset
   249
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   250
// CTransaction::operator==()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   251
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   252
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   253
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   254
TBool CTransaction::operator== ( const TDesC& aWidgetId ) const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   255
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   256
    if ( iWidgetId == KNullDesC )
b856a9924bbc initial contribution
jake
parents:
diff changeset
   257
        {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   258
        return EFalse;
b856a9924bbc initial contribution
jake
parents:
diff changeset
   259
        }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   260
    
b856a9924bbc initial contribution
jake
parents:
diff changeset
   261
    return aWidgetId == iWidgetId;
b856a9924bbc initial contribution
jake
parents:
diff changeset
   262
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   263
b856a9924bbc initial contribution
jake
parents:
diff changeset
   264
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   265
// CTransaction::AppendL()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   266
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   267
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   268
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   269
void CTransaction::AppendL( CTransactionItem* aItem )
b856a9924bbc initial contribution
jake
parents:
diff changeset
   270
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   271
    User::LeaveIfError( iItems.InsertInAddressOrder( aItem ) );
b856a9924bbc initial contribution
jake
parents:
diff changeset
   272
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   273
b856a9924bbc initial contribution
jake
parents:
diff changeset
   274
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   275
// CTransaction::Items()
b856a9924bbc initial contribution
jake
parents:
diff changeset
   276
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   277
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   278
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   279
const RPointerArray< CTransactionItem >& CTransaction::Items() const
b856a9924bbc initial contribution
jake
parents:
diff changeset
   280
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   281
    return iItems;
b856a9924bbc initial contribution
jake
parents:
diff changeset
   282
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   283
b856a9924bbc initial contribution
jake
parents:
diff changeset
   284
// End of file