|
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 <e32base.h> |
|
20 |
|
21 #include "ncdserversubscription.h" |
|
22 |
|
23 #include "catalogsinterfaceidentifier.h" |
|
24 |
|
25 |
|
26 |
|
27 // ======== MEMBER FUNCTIONS ======== |
|
28 |
|
29 |
|
30 CNcdServerSubscription::CNcdServerSubscription() |
|
31 { |
|
32 } |
|
33 |
|
34 void CNcdServerSubscription::ConstructL() |
|
35 { |
|
36 } |
|
37 |
|
38 |
|
39 CNcdServerSubscription* CNcdServerSubscription::NewL() |
|
40 { |
|
41 CNcdServerSubscription* self = |
|
42 CNcdServerSubscription::NewLC(); |
|
43 CleanupStack::Pop( self ); |
|
44 return self; |
|
45 } |
|
46 |
|
47 |
|
48 CNcdServerSubscription* CNcdServerSubscription::NewLC() |
|
49 { |
|
50 CNcdServerSubscription* self = |
|
51 new( ELeave ) CNcdServerSubscription(); |
|
52 CleanupStack::PushL( self ); |
|
53 self->ConstructL(); |
|
54 return self; |
|
55 } |
|
56 |
|
57 |
|
58 CNcdServerSubscription::~CNcdServerSubscription() |
|
59 { |
|
60 delete iAmountOfCreditsCurrency; |
|
61 } |
|
62 |
|
63 void CNcdServerSubscription::SetValidityDelta( |
|
64 TInt aValidityDelta ) |
|
65 { |
|
66 iValidityDelta = aValidityDelta; |
|
67 } |
|
68 |
|
69 void CNcdServerSubscription::SetValidityAutoUpdate( |
|
70 TBool aValidityAutoUpdate ) |
|
71 { |
|
72 iValidityAutoUpdate = aValidityAutoUpdate; |
|
73 } |
|
74 |
|
75 void CNcdServerSubscription::SetAmountOfCredits( |
|
76 TReal32 aAmountOfCredits ) |
|
77 { |
|
78 iAmountOfCredits = aAmountOfCredits; |
|
79 } |
|
80 |
|
81 void CNcdServerSubscription::SetAmountOfCreditsCurrency( |
|
82 HBufC* aAmountOfCreditsCurrency ) |
|
83 { |
|
84 delete iAmountOfCreditsCurrency; |
|
85 iAmountOfCreditsCurrency = aAmountOfCreditsCurrency; |
|
86 } |
|
87 |
|
88 void CNcdServerSubscription::SetNumberOfDownloads( |
|
89 TInt aNumberOfDownloads ) |
|
90 { |
|
91 iNumberOfDownloads = aNumberOfDownloads; |
|
92 } |
|
93 |
|
94 |
|
95 |
|
96 TInt CNcdServerSubscription::ValidityDelta() const |
|
97 { |
|
98 return iValidityDelta; |
|
99 } |
|
100 |
|
101 TBool CNcdServerSubscription::ValidityAutoUpdate() const |
|
102 { |
|
103 return iValidityAutoUpdate; |
|
104 } |
|
105 |
|
106 TReal32 CNcdServerSubscription::AmountOfCredits() const |
|
107 { |
|
108 return iAmountOfCredits; |
|
109 } |
|
110 |
|
111 const TDesC& CNcdServerSubscription::AmountOfCreditsCurrency() const |
|
112 { |
|
113 if ( iAmountOfCreditsCurrency == NULL ) |
|
114 { |
|
115 return KNullDesC; |
|
116 } |
|
117 return *iAmountOfCreditsCurrency; |
|
118 } |
|
119 |
|
120 TInt CNcdServerSubscription::NumberOfDownloads() const |
|
121 { |
|
122 return iNumberOfDownloads; |
|
123 } |