|
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: MNcdPreminetProtocolPurchaseOption declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCD_PROTOCOL_ELEMENT_PURCHASEOPTION_H |
|
20 #define NCD_PROTOCOL_ELEMENT_PURCHASEOPTION_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "ncdprotocoltypes.h" |
|
24 |
|
25 |
|
26 class MNcdPreminetProtocolDownload; |
|
27 class MNcdPreminetProtocolSubscriptionDetails; |
|
28 |
|
29 class MNcdPreminetProtocolPurchaseOption |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Destructor |
|
35 */ |
|
36 virtual ~MNcdPreminetProtocolPurchaseOption() {} |
|
37 |
|
38 /** |
|
39 * Entity name, localized. |
|
40 * @return Name, never KNullDesC |
|
41 */ |
|
42 virtual const TDesC& Name() const = 0; |
|
43 |
|
44 /** |
|
45 * Returns the purchase option dependency ID. |
|
46 * @return Id |
|
47 */ |
|
48 virtual const TDesC& DependencyId() const = 0; |
|
49 |
|
50 /** |
|
51 * Returns the purchase option ID. |
|
52 * @return Id |
|
53 */ |
|
54 virtual const TDesC& Id() const = 0; |
|
55 |
|
56 /** |
|
57 * Retuns the description for this entity, localized. |
|
58 * @return Description or KNullDesC |
|
59 */ |
|
60 virtual TNcdPurchaseType Purchase() const = 0; |
|
61 |
|
62 /** |
|
63 * Retuns true if this item is free. |
|
64 * @return true or false |
|
65 */ |
|
66 virtual TBool IsFree() const = 0; |
|
67 |
|
68 /** |
|
69 * Retuns true if the item requires a purchase process. |
|
70 * This is not needed for free items. |
|
71 * @return true or false |
|
72 */ |
|
73 virtual TBool RequirePurchaseProcess() const = 0; |
|
74 |
|
75 /** |
|
76 * Retuns true if the item can be purchased as a gift. |
|
77 * @return true or false |
|
78 */ |
|
79 virtual TBool CanBeGift() const = 0; |
|
80 |
|
81 /** |
|
82 * Retuns the description for this entity, localized. |
|
83 * @return Description or KNullDesC |
|
84 */ |
|
85 virtual const TDesC& Description() const = 0; |
|
86 |
|
87 /** |
|
88 * Retuns a reference to the download details of this purchase. |
|
89 * Leaves if index is out of bounds. Check DownloadDetailsCount(). |
|
90 * @return Download details object |
|
91 */ |
|
92 virtual const MNcdPreminetProtocolDownload& |
|
93 DownloadDetailsL(TInt aIndex) const = 0; |
|
94 |
|
95 /** |
|
96 * Retuns amoutn of download details of this purchase. |
|
97 * @return Amount of download details |
|
98 */ |
|
99 virtual TInt DownloadDetailsCount() const = 0; |
|
100 |
|
101 /** |
|
102 * Retuns a pointer to the subscription details of this purchase. |
|
103 * @return Pointer or NULL |
|
104 */ |
|
105 virtual const MNcdPreminetProtocolSubscriptionDetails* |
|
106 SubscriptionDetails() const = 0; |
|
107 |
|
108 /** |
|
109 * Entity ID of parent subscription (if available) |
|
110 * @return ID or KNullDesC |
|
111 */ |
|
112 virtual const TDesC& ParentSubscriptionEntityId() const = 0; |
|
113 |
|
114 /** |
|
115 * Purchase option ID of parent subscription (if available) |
|
116 * @return ID or KNullDesC |
|
117 */ |
|
118 virtual const TDesC& ParentSubscriptionPurchaseOptionId() const = 0; |
|
119 |
|
120 /** |
|
121 * Combined price text |
|
122 * @return Price text or KNullDesC |
|
123 */ |
|
124 virtual const TDesC& PriceText() const = 0; |
|
125 |
|
126 /** |
|
127 * Purchase price |
|
128 * @return Price |
|
129 */ |
|
130 virtual TReal32 Price() const = 0; |
|
131 |
|
132 /** |
|
133 * Purchase price currency string |
|
134 * @return Currency string or KNullDesC |
|
135 */ |
|
136 virtual const TDesC& PriceCurrency() const = 0; |
|
137 |
|
138 /** |
|
139 * Purchase price in credits |
|
140 * @return Credit price |
|
141 */ |
|
142 virtual TReal32 CreditPrice() const = 0; |
|
143 |
|
144 }; |
|
145 |
|
146 |
|
147 #endif //NCD_PROTOCOL_ELEMENT_PURCHASEOPTION_H |