|
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_PREMINET_PROTOCOL_SUBSCRIPTION_IMPL_H |
|
20 #define NCD_PREMINET_PROTOCOL_SUBSCRIPTION_IMPL_H |
|
21 |
|
22 #include "ncd_pp_subscription.h" |
|
23 #include "ncdprotocoltypes.h" |
|
24 |
|
25 class MNcdPreminetProtocolSubscriptionDetails; |
|
26 class MNcdPreminetProtocolPayment; |
|
27 class MNcdConfigurationProtocolQuery; |
|
28 |
|
29 class CNcdPreminetProtocolSubscriptionImpl |
|
30 : public CBase, public MNcdPreminetProtocolSubscription |
|
31 { |
|
32 |
|
33 public: |
|
34 |
|
35 static CNcdPreminetProtocolSubscriptionImpl* NewL(); |
|
36 static CNcdPreminetProtocolSubscriptionImpl* NewLC(); |
|
37 |
|
38 virtual ~CNcdPreminetProtocolSubscriptionImpl(); |
|
39 |
|
40 void ConstructL(); |
|
41 |
|
42 |
|
43 // From base class MNcdPreminetProtocolPurchaseOption |
|
44 /** |
|
45 * Namespace. |
|
46 * @return The namespace. |
|
47 */ |
|
48 virtual const TDesC& Namespace() const; |
|
49 |
|
50 /** |
|
51 * Entity id. |
|
52 * @return Entity id or KNullDesC |
|
53 */ |
|
54 virtual const TDesC& EntityId() const; |
|
55 |
|
56 /** |
|
57 * Purchase option id. |
|
58 * @return Purchase option id or KNullDesC |
|
59 */ |
|
60 virtual const TDesC& PurchaseOptionId() const; |
|
61 |
|
62 /** |
|
63 * Subscription timestamp. |
|
64 * @return Timestamp or KNullDesC |
|
65 */ |
|
66 virtual const TDesC& Timestamp() const; |
|
67 |
|
68 /** |
|
69 * Subsctiption type. |
|
70 * @return Type |
|
71 */ |
|
72 virtual TNcdSubscriptionType Type() const; |
|
73 |
|
74 /** |
|
75 * Retuns true if this subscription is cancelled. |
|
76 * @return true or false |
|
77 */ |
|
78 virtual TBool Cancelled() const; |
|
79 |
|
80 /** |
|
81 * Total usage rights of this subscription. |
|
82 * @return Subscription details pointer or NULL |
|
83 */ |
|
84 virtual const MNcdPreminetProtocolSubscriptionDetails* |
|
85 TotalUsageRights() const; |
|
86 |
|
87 /** |
|
88 * Remaining usage rights of this subscription. |
|
89 * @return Subscription details pointer or NULL |
|
90 */ |
|
91 virtual const MNcdPreminetProtocolSubscriptionDetails* |
|
92 RemainingUsageRights() const; |
|
93 |
|
94 |
|
95 /** |
|
96 * Timestamp of expiration |
|
97 * @return Timestamp or KNullDesC |
|
98 */ |
|
99 virtual const TDesC& ExpiredOn() const; |
|
100 |
|
101 /** |
|
102 * Usage rights of this subscription. |
|
103 * Wrapping method for old subscriptions, uses TotalUsageRights(). |
|
104 * @return Subscription details pointer or NULL |
|
105 */ |
|
106 virtual const MNcdPreminetProtocolSubscriptionDetails* |
|
107 UsageRights() const; |
|
108 |
|
109 private: |
|
110 CNcdPreminetProtocolSubscriptionImpl(); |
|
111 |
|
112 public: |
|
113 HBufC* iNamespace; |
|
114 HBufC* iEntityId; |
|
115 HBufC* iPurchaseOptionId; |
|
116 HBufC* iTimestamp; |
|
117 TNcdSubscriptionType iType; |
|
118 TBool iCancelled; |
|
119 |
|
120 MNcdPreminetProtocolSubscriptionDetails* iTotalUsageRights; |
|
121 MNcdPreminetProtocolSubscriptionDetails* iRemainingUsageRights; |
|
122 |
|
123 HBufC* iExpiredOn; |
|
124 }; |
|
125 |
|
126 #endif // NCD_PREMINET_PROTOCOL_SUBSCRIPTION_IMPL_H |