|
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: Contains CNcdServerSubscribableContent class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCD_SERVER_SUBSCRIBABLE_CONTENT_H |
|
20 #define NCD_SERVER_SUBSCRIBABLE_CONTENT_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 // For streams |
|
25 #include <s32mem.h> |
|
26 |
|
27 #include "ncdsubscription.h" |
|
28 |
|
29 class MNcdPreminetProtocolDataEntityContent; |
|
30 |
|
31 /** |
|
32 * This server side class contains the subscribableContent info |
|
33 * of a node. |
|
34 * |
|
35 * |
|
36 * @lib ?library |
|
37 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
38 */ |
|
39 class CNcdServerSubscribableContent : public CBase |
|
40 { |
|
41 |
|
42 public: |
|
43 /** |
|
44 * NewL |
|
45 * |
|
46 * @return CNcdServerSubscribableContent* Pointer to the created object |
|
47 * of this class. |
|
48 */ |
|
49 static CNcdServerSubscribableContent* NewL(); |
|
50 |
|
51 /** |
|
52 * NewLC |
|
53 * |
|
54 * @return CNcdServerSubscribableContent* Pointer to the created object |
|
55 * of this class. |
|
56 */ |
|
57 static CNcdServerSubscribableContent* NewLC(); |
|
58 |
|
59 /** |
|
60 * Destructor |
|
61 * |
|
62 */ |
|
63 virtual ~CNcdServerSubscribableContent(); |
|
64 |
|
65 |
|
66 |
|
67 /** |
|
68 * This function is called when the owner of this object |
|
69 * wants to internalize the content according to the |
|
70 * given protocol element. |
|
71 * |
|
72 * |
|
73 * @param aData The data is set in the protocol parser and can |
|
74 * be used to initialize this class object. |
|
75 */ |
|
76 void InternalizeL( const MNcdPreminetProtocolDataEntityContent& aData ); |
|
77 |
|
78 |
|
79 |
|
80 public: |
|
81 |
|
82 |
|
83 /** |
|
84 * Externalizer |
|
85 */ |
|
86 virtual void ExternalizeL( RWriteStream& aStream ); |
|
87 |
|
88 |
|
89 /** |
|
90 * Internalizer |
|
91 */ |
|
92 virtual void InternalizeL( RReadStream& aStream ); |
|
93 |
|
94 |
|
95 MNcdSubscription::TType SubscriptionType() const; |
|
96 |
|
97 |
|
98 protected: |
|
99 |
|
100 /** |
|
101 * Constructor |
|
102 * Is set in the NewLC function |
|
103 */ |
|
104 CNcdServerSubscribableContent(); |
|
105 |
|
106 /** |
|
107 * ConstructL |
|
108 */ |
|
109 virtual void ConstructL(); |
|
110 |
|
111 |
|
112 private: |
|
113 |
|
114 // Prevent these two if they are not implemented |
|
115 CNcdServerSubscribableContent( |
|
116 const CNcdServerSubscribableContent& aObject ); |
|
117 CNcdServerSubscribableContent& operator=( |
|
118 const CNcdServerSubscribableContent& aObject ); |
|
119 |
|
120 /** |
|
121 * Function to reset member variables. |
|
122 */ |
|
123 void ResetMemberVariables(); |
|
124 |
|
125 private: // data |
|
126 |
|
127 TTime iValidUntil; |
|
128 TBool iValidUntilSet; |
|
129 MNcdSubscription::TType iSubscriptionType; |
|
130 TBool iChildSeparatelyPurchasable; |
|
131 |
|
132 }; |
|
133 |
|
134 #endif // NCD_SERVER_SUBSCRIBABLE_CONTENT_H |