|
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 #ifndef C_NCD_SERVER_SUBSCRIPTION |
|
20 #define C_NCD_SERVER_SUBSCRIPTION |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 /** |
|
26 * Class to represent subscription part of purchaseoption. |
|
27 * |
|
28 * Server-side class to represent a subscription part of |
|
29 * a purchaseoption. |
|
30 * |
|
31 * @lib ?library |
|
32 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
33 */ |
|
34 class CNcdServerSubscription : public CBase |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 static CNcdServerSubscription* NewL(); |
|
40 |
|
41 static CNcdServerSubscription* NewLC(); |
|
42 |
|
43 virtual ~CNcdServerSubscription(); |
|
44 |
|
45 |
|
46 /* |
|
47 * Setters for subscription data. |
|
48 */ |
|
49 void SetValidityDelta( TInt aValidityDelta ); |
|
50 void SetValidityAutoUpdate( TBool aValidityAutoUpdate ); |
|
51 void SetAmountOfCredits( TReal32 aAmountOfCredits ); |
|
52 void SetAmountOfCreditsCurrency( HBufC* aAmountOfCreditsCurrency ); |
|
53 void SetNumberOfDownloads( TInt aNumberOfDownloads ); |
|
54 |
|
55 /* |
|
56 * Getters for subscription data. |
|
57 */ |
|
58 TInt ValidityDelta() const; |
|
59 TBool ValidityAutoUpdate() const; |
|
60 TReal32 AmountOfCredits() const; |
|
61 const TDesC& AmountOfCreditsCurrency() const; |
|
62 TInt NumberOfDownloads() const; |
|
63 |
|
64 protected: |
|
65 |
|
66 CNcdServerSubscription(); |
|
67 |
|
68 void ConstructL(); |
|
69 |
|
70 private: |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 private: // data |
|
76 |
|
77 |
|
78 /* |
|
79 * Subscription data. |
|
80 * Own. |
|
81 */ |
|
82 TInt iValidityDelta; |
|
83 TBool iValidityAutoUpdate; |
|
84 TReal32 iAmountOfCredits; |
|
85 HBufC* iAmountOfCreditsCurrency; |
|
86 TInt iNumberOfDownloads; |
|
87 |
|
88 }; |
|
89 |
|
90 |
|
91 |
|
92 #endif // C_NCD_SERVER_SUBSCRIPTION |