ncdengine/provider/protocol/src/ncd_pp_purchaseprocessedimpl.cpp
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   CNcdPreminetProtocolPurchaseProcessedImpl implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "ncd_pp_purchaseprocessedimpl.h"
       
    20 #include "ncd_pp_purchase.h"
       
    21 #include "ncd_cp_query.h"
       
    22 #include "ncdprotocolutils.h"
       
    23 
       
    24 CNcdPreminetProtocolPurchaseProcessedImpl* 
       
    25 CNcdPreminetProtocolPurchaseProcessedImpl::NewL() 
       
    26     {
       
    27     CNcdPreminetProtocolPurchaseProcessedImpl* self =
       
    28         new (ELeave) CNcdPreminetProtocolPurchaseProcessedImpl;
       
    29     CleanupStack::PushL( self );
       
    30     self->ConstructL();
       
    31     CleanupStack::Pop( self );
       
    32     return self;
       
    33     }
       
    34     
       
    35 CNcdPreminetProtocolPurchaseProcessedImpl* 
       
    36 CNcdPreminetProtocolPurchaseProcessedImpl::NewLC() 
       
    37     {
       
    38     CNcdPreminetProtocolPurchaseProcessedImpl* self =
       
    39         new (ELeave) CNcdPreminetProtocolPurchaseProcessedImpl;
       
    40     CleanupStack::PushL( self );
       
    41     self->ConstructL();
       
    42     return self;
       
    43     }
       
    44 
       
    45 void CNcdPreminetProtocolPurchaseProcessedImpl::ConstructL()
       
    46     {
       
    47     NcdProtocolUtils::AssignEmptyDesL( iTransactionId );
       
    48     NcdProtocolUtils::AssignEmptyDesL( iQueryId );
       
    49     }
       
    50 
       
    51 CNcdPreminetProtocolPurchaseProcessedImpl::CNcdPreminetProtocolPurchaseProcessedImpl()
       
    52 : CBase()
       
    53     {
       
    54     iInformation = 0;
       
    55     }
       
    56 
       
    57 CNcdPreminetProtocolPurchaseProcessedImpl::~CNcdPreminetProtocolPurchaseProcessedImpl()
       
    58     {
       
    59     DLTRACEIN((""));
       
    60     delete iInformation;
       
    61     delete iTransactionId;
       
    62     delete iQueryId;
       
    63     iEntities.ResetAndDestroy();
       
    64     DLTRACEOUT((""));
       
    65     }
       
    66 
       
    67 TInt CNcdPreminetProtocolPurchaseProcessedImpl::ResultCode() const
       
    68     {
       
    69     return iResultCode;    
       
    70     }
       
    71 
       
    72 
       
    73 const MNcdPreminetProtocolPurchaseEntity&
       
    74 CNcdPreminetProtocolPurchaseProcessedImpl::EntityL(TInt aIndex) const
       
    75     {
       
    76     if ( aIndex < 0 || aIndex >= iEntities.Count() )
       
    77         {
       
    78         User::Leave(KErrArgument);
       
    79         }
       
    80     return *iEntities[aIndex];
       
    81     }
       
    82 
       
    83 TInt CNcdPreminetProtocolPurchaseProcessedImpl::EntityCount() const 
       
    84     {
       
    85     return iEntities.Count();
       
    86     }
       
    87 
       
    88 const MNcdConfigurationProtocolQuery* 
       
    89 CNcdPreminetProtocolPurchaseProcessedImpl::Information() const
       
    90     {
       
    91     return iInformation;
       
    92     }
       
    93 
       
    94 const TDesC& CNcdPreminetProtocolPurchaseProcessedImpl::TransactionId() const
       
    95     {
       
    96     return *iTransactionId;    
       
    97     }
       
    98 
       
    99 const TDesC& CNcdPreminetProtocolPurchaseProcessedImpl::QueryId() const
       
   100     {
       
   101     return *iQueryId;
       
   102     }
       
   103