|
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: CNcdPreminetProtocolPurchaseOptionImpl declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCD_PROTOCOL_ELEMENT_PURCHASEOPTION_IMPL_H |
|
20 #define NCD_PROTOCOL_ELEMENT_PURCHASEOPTION_IMPL_H |
|
21 |
|
22 #include "ncd_pp_purchaseoption.h" |
|
23 #include "ncdprotocoltypes.h" |
|
24 |
|
25 class MNcdPreminetProtocolDownload; |
|
26 class CNcdPreminetProtocolSubscriptionDetailsImpl; |
|
27 |
|
28 class CNcdPreminetProtocolPurchaseOptionImpl |
|
29 : public CBase, public MNcdPreminetProtocolPurchaseOption |
|
30 { |
|
31 |
|
32 public: |
|
33 |
|
34 static CNcdPreminetProtocolPurchaseOptionImpl* NewL(); |
|
35 static CNcdPreminetProtocolPurchaseOptionImpl* NewLC(); |
|
36 |
|
37 virtual ~CNcdPreminetProtocolPurchaseOptionImpl(); |
|
38 |
|
39 void ConstructL(); |
|
40 |
|
41 |
|
42 // From base class MNcdPreminetProtocolPurchaseOption |
|
43 /** |
|
44 * Entity name, localized. |
|
45 * @return Name, never KNullDesC |
|
46 */ |
|
47 virtual const TDesC& Name() const; |
|
48 |
|
49 /** |
|
50 * Returns the ID of this entity. |
|
51 * @return Id |
|
52 */ |
|
53 virtual const TDesC& DependencyId() const; |
|
54 |
|
55 /** |
|
56 * Returns the dependency ID of this entity. |
|
57 * @return Id |
|
58 */ |
|
59 virtual const TDesC& Id() const; |
|
60 |
|
61 /** |
|
62 * Retuns the description for this entity, localized. |
|
63 * @return Description or KNullDesC |
|
64 */ |
|
65 virtual TNcdPurchaseType Purchase() const; |
|
66 |
|
67 /** |
|
68 * Retuns true if this item is free. |
|
69 * @return true or false |
|
70 */ |
|
71 virtual TBool IsFree() const; |
|
72 |
|
73 /** |
|
74 * Retuns true if the item requires a purchase process. |
|
75 * This is not needed for free items. |
|
76 * @return true or false |
|
77 */ |
|
78 virtual TBool RequirePurchaseProcess() const; |
|
79 |
|
80 /** |
|
81 * Retuns true if the item can be purchased as a gift. |
|
82 * @return true or false |
|
83 */ |
|
84 virtual TBool CanBeGift() const; |
|
85 |
|
86 /** |
|
87 * Retuns the description for this entity, localized. |
|
88 * @return Description or KNullDesC |
|
89 */ |
|
90 virtual const TDesC& Description() const; |
|
91 |
|
92 virtual const MNcdPreminetProtocolDownload& |
|
93 DownloadDetailsL(TInt aIndex) const; |
|
94 virtual TInt DownloadDetailsCount() const; |
|
95 |
|
96 /** |
|
97 * Subscription details of this purchase. |
|
98 */ |
|
99 virtual const MNcdPreminetProtocolSubscriptionDetails* |
|
100 SubscriptionDetails() const; |
|
101 |
|
102 /** |
|
103 * Retuns a pointer to the subscription details of this purchase. |
|
104 * @return Pointer or NULL |
|
105 */ |
|
106 virtual const TDesC& ParentSubscriptionEntityId() const; |
|
107 virtual const TDesC& ParentSubscriptionPurchaseOptionId() const; |
|
108 |
|
109 virtual const TDesC& PriceText() const; |
|
110 virtual TReal32 Price() const; |
|
111 virtual const TDesC& PriceCurrency() const; |
|
112 virtual TReal32 CreditPrice() const; |
|
113 |
|
114 private: |
|
115 CNcdPreminetProtocolPurchaseOptionImpl(); |
|
116 |
|
117 public: |
|
118 |
|
119 |
|
120 HBufC* iName; |
|
121 HBufC* iDependencyId; |
|
122 HBufC* iId; |
|
123 TNcdPurchaseType iPurchase; |
|
124 TBool iFree; |
|
125 TBool iRequirePurchaseProcess; |
|
126 TBool iCanBeGift; |
|
127 |
|
128 HBufC* iDescription; |
|
129 |
|
130 RPointerArray<MNcdPreminetProtocolDownload> iDownloadDetails; |
|
131 |
|
132 // subscription details |
|
133 CNcdPreminetProtocolSubscriptionDetailsImpl* iSubscriptionDetails; |
|
134 |
|
135 HBufC* iParentSubscriptionEntityId; |
|
136 HBufC* iParentSubscriptionPurchaseOptionId; |
|
137 |
|
138 HBufC* iPriceText; |
|
139 |
|
140 TReal32 iPrice; |
|
141 HBufC* iPriceCurrency; |
|
142 TReal32 iCreditPrice; |
|
143 }; |
|
144 |
|
145 #endif // NCD_PROTOCOL_ELEMENT_PURCHASEOPTION_IMPL_H |