ncdengine/provider/server/src/ncdserverpartofsubscription.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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "ncdserverpartofsubscription.h"
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 
       
    28 CNcdServerPartOfSubscription::CNcdServerPartOfSubscription()
       
    29     {
       
    30     }
       
    31 
       
    32 void CNcdServerPartOfSubscription::ConstructL()
       
    33     {
       
    34     }
       
    35 
       
    36 
       
    37 CNcdServerPartOfSubscription* CNcdServerPartOfSubscription::NewL()
       
    38     {
       
    39     CNcdServerPartOfSubscription* self = 
       
    40         CNcdServerPartOfSubscription::NewLC();
       
    41     CleanupStack::Pop( self );
       
    42     return self;
       
    43     }
       
    44 
       
    45 
       
    46 CNcdServerPartOfSubscription* CNcdServerPartOfSubscription::NewLC()
       
    47     {
       
    48     CNcdServerPartOfSubscription* self =
       
    49         new( ELeave ) CNcdServerPartOfSubscription();
       
    50     CleanupStack::PushL( self );
       
    51     self->ConstructL();
       
    52     return self;
       
    53     }
       
    54 
       
    55 
       
    56 CNcdServerPartOfSubscription::~CNcdServerPartOfSubscription()
       
    57     {
       
    58     delete iParentEntityId;
       
    59     delete iParentPurchaseOptionId;
       
    60     }
       
    61 
       
    62 void CNcdServerPartOfSubscription::SetParentEntityId(
       
    63     HBufC* aParentEntityId )
       
    64     {
       
    65     delete iParentEntityId;
       
    66     iParentEntityId = aParentEntityId;
       
    67     }
       
    68     
       
    69 void CNcdServerPartOfSubscription::SetParentPurchaseOptionId(
       
    70     HBufC* aParentPurchaseOptionId )
       
    71     {
       
    72     delete iParentPurchaseOptionId;
       
    73     iParentPurchaseOptionId = aParentPurchaseOptionId;
       
    74     }
       
    75 
       
    76 void CNcdServerPartOfSubscription::SetCreditPrice( TReal32 aCreditPrice )
       
    77     {
       
    78     iCreditPrice = aCreditPrice;
       
    79     }
       
    80 
       
    81 const TDesC& CNcdServerPartOfSubscription::ParentEntityId() const
       
    82     {
       
    83     if ( iParentEntityId == NULL )
       
    84         {
       
    85         return KNullDesC;
       
    86         }
       
    87     return *iParentEntityId;
       
    88     }
       
    89     
       
    90 const TDesC& CNcdServerPartOfSubscription::ParentPurchaseOptionId() const
       
    91     {
       
    92     if ( iParentPurchaseOptionId == NULL )
       
    93         {
       
    94         return KNullDesC;
       
    95         }    
       
    96     return *iParentPurchaseOptionId;
       
    97     }
       
    98 TReal32 CNcdServerPartOfSubscription::CreditPrice() const
       
    99     {
       
   100     return iCreditPrice;
       
   101     }