|
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: CNcdEntityRefParser implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "ncd_pp_subscriptiondetailsimpl.h" |
|
20 #include "ncdprotocolutils.h" |
|
21 #include "ncdprotocoltypes.h" |
|
22 |
|
23 CNcdPreminetProtocolSubscriptionDetailsImpl* |
|
24 CNcdPreminetProtocolSubscriptionDetailsImpl::NewL() |
|
25 { |
|
26 CNcdPreminetProtocolSubscriptionDetailsImpl* self = |
|
27 new (ELeave) CNcdPreminetProtocolSubscriptionDetailsImpl; |
|
28 CleanupStack::PushL( self ); |
|
29 self->ConstructL(); |
|
30 CleanupStack::Pop( self ); |
|
31 return self; |
|
32 } |
|
33 |
|
34 CNcdPreminetProtocolSubscriptionDetailsImpl* |
|
35 CNcdPreminetProtocolSubscriptionDetailsImpl::NewLC() |
|
36 { |
|
37 CNcdPreminetProtocolSubscriptionDetailsImpl* self = |
|
38 new (ELeave) CNcdPreminetProtocolSubscriptionDetailsImpl; |
|
39 CleanupStack::PushL( self ); |
|
40 self->ConstructL(); |
|
41 return self; |
|
42 } |
|
43 |
|
44 void CNcdPreminetProtocolSubscriptionDetailsImpl::ConstructL() |
|
45 { |
|
46 NcdProtocolUtils::AssignEmptyDesL( iAmountOfCreditsCurrency ); |
|
47 } |
|
48 |
|
49 CNcdPreminetProtocolSubscriptionDetailsImpl::CNcdPreminetProtocolSubscriptionDetailsImpl() |
|
50 : CBase(), iValidityDelta( -1 ), iValidityAutoUpdate( EFalse ), iAmountOfCredits( -1 ), |
|
51 iNumberOfDownloads( -1 ) |
|
52 { |
|
53 } |
|
54 |
|
55 CNcdPreminetProtocolSubscriptionDetailsImpl::~CNcdPreminetProtocolSubscriptionDetailsImpl() |
|
56 { |
|
57 delete iAmountOfCreditsCurrency; |
|
58 } |
|
59 |
|
60 |
|
61 // subscription details |
|
62 TInt CNcdPreminetProtocolSubscriptionDetailsImpl::ValidityDelta() const |
|
63 { |
|
64 return iValidityDelta; |
|
65 } |
|
66 |
|
67 TBool CNcdPreminetProtocolSubscriptionDetailsImpl::ValidityAutoUpdate() const |
|
68 { |
|
69 return iValidityAutoUpdate; |
|
70 } |
|
71 |
|
72 TReal32 CNcdPreminetProtocolSubscriptionDetailsImpl::AmountOfCredits() const |
|
73 { |
|
74 return iAmountOfCredits; |
|
75 } |
|
76 |
|
77 const TDesC& |
|
78 CNcdPreminetProtocolSubscriptionDetailsImpl::AmountOfCreditsCurrency() const |
|
79 { |
|
80 DASSERT((iAmountOfCreditsCurrency)); |
|
81 return *iAmountOfCreditsCurrency; |
|
82 } |
|
83 |
|
84 TInt CNcdPreminetProtocolSubscriptionDetailsImpl::NumberOfDownloads() const |
|
85 { |
|
86 return iNumberOfDownloads; |
|
87 } |
|
88 |
|
89 |