|
1 /* |
|
2 * Copyright (c) 2004 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: WV Client Info attribute constructor. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPENGWVCLIENTINFOCONSTRUCT_H |
|
19 #define CPENGWVCLIENTINFOCONSTRUCT_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "CPEngWVAttributeConstructBase.h" |
|
23 #include "CPEngWVAttributeModelBase.h" |
|
24 #include <PEngWVPresenceAttributes2.h> |
|
25 #include <E32Base.h> |
|
26 |
|
27 |
|
28 |
|
29 //FORWARD DECLARATION |
|
30 class T_CWVClientInfoModel; |
|
31 |
|
32 |
|
33 /** |
|
34 * WV Client Info attribute constructor. |
|
35 * |
|
36 * @lib PEngAttrLib |
|
37 * @since 3.0 |
|
38 */ |
|
39 NONSHARABLE_CLASS( CPEngWVClientInfoConstruct ) : public CPEngWVAttributeConstructBase |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CPEngWVClientInfoConstruct* NewL( TPEngWVCspVersion aCurrentCspVer ); |
|
47 |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CPEngWVClientInfoConstruct(); |
|
53 |
|
54 |
|
55 private: // Constructors |
|
56 |
|
57 /** |
|
58 * C++ constructor. |
|
59 */ |
|
60 CPEngWVClientInfoConstruct( TPEngWVCspVersion aCurrentCspVer ); |
|
61 |
|
62 |
|
63 /** |
|
64 * Symbian OS constructor. |
|
65 */ |
|
66 void ConstructL(); |
|
67 |
|
68 |
|
69 |
|
70 public: // Functions from MPEngPresenceAttrConstructorTypeImp |
|
71 |
|
72 /** |
|
73 * From MPEngPresenceAttrConstructorTypeImp. |
|
74 * |
|
75 * @since 3.0 |
|
76 */ |
|
77 MPEngPresenceAttrModelTypeImp* NewAttributeInstanceLC( TBool aUserOwnAttribute ) const; |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 public: //Attribute model implementation |
|
83 |
|
84 /** |
|
85 * WV Client Info attribute implementation. |
|
86 * |
|
87 * @lib PEngAttrLib |
|
88 * @since 3.0 |
|
89 */ |
|
90 NONSHARABLE_CLASS( CPEngWVClientInfoModel ) : public CPEngWVAttributeModelBase |
|
91 { |
|
92 public: // Constructors and destructor |
|
93 |
|
94 /** |
|
95 * Destructor. |
|
96 */ |
|
97 ~CPEngWVClientInfoModel(); |
|
98 |
|
99 |
|
100 /** |
|
101 * C++ constructor. |
|
102 */ |
|
103 CPEngWVClientInfoModel( const CPEngWVClientInfoConstruct& aConstructor, |
|
104 TBool aUserOwnAttribute ); |
|
105 |
|
106 |
|
107 public: // From MPEngPresenceAttrModelTypeImp |
|
108 |
|
109 |
|
110 /** |
|
111 * From MPEngPresenceAttrModelTypeImp. |
|
112 */ |
|
113 TBool GetData( TInt* aIntData, |
|
114 TPtrC8* a8Data, |
|
115 TPtrC16* a16Data, |
|
116 TInt aField, |
|
117 TInt aGroup ) const; |
|
118 |
|
119 TBool SetDataL( TInt* aIntData, |
|
120 const TDesC8* a8Data, |
|
121 const TDesC16* a16Data, |
|
122 TInt aField, |
|
123 TInt aGroup ); |
|
124 |
|
125 void EncodeDataToXmlL( MPEngXMLSerializer& aSerializer ) const; |
|
126 |
|
127 void DecodeDataFromXmlL( MPEngXMLParser& aParser, |
|
128 const TDesC8& aValueBlock ); |
|
129 |
|
130 void ResetDataL(); |
|
131 TInt DataExternalizeSize() const; |
|
132 void ExternalizeDataL( RWriteStream& aStream ) const; |
|
133 void InternalizeDataL( RReadStream& aStream ); |
|
134 |
|
135 |
|
136 private: //Friend declaration |
|
137 |
|
138 |
|
139 /** |
|
140 * Unit test class is friend so it can access members. |
|
141 */ |
|
142 friend class T_CWVClientInfoModel; // CSI: 36 # |
|
143 |
|
144 |
|
145 private: //Data |
|
146 |
|
147 //REF: The constructor |
|
148 const CPEngWVClientInfoConstruct& iConstructor; |
|
149 |
|
150 //OWN: Device type |
|
151 TPEngWVCliInfDeviceTypeValues iDeviceType; |
|
152 |
|
153 //OWN: Device detail |
|
154 HBufC* iDeviceManufacturer; |
|
155 |
|
156 //OWN: Device detail |
|
157 HBufC* iClientProducer; |
|
158 |
|
159 //OWN: Device detail |
|
160 HBufC* iDeviceModel; |
|
161 |
|
162 //OWN: Device detail |
|
163 HBufC* iClientVersion; |
|
164 |
|
165 //OWN: Device detail |
|
166 HBufC* iClientLanguage; |
|
167 }; |
|
168 |
|
169 |
|
170 private: //Friend declaration |
|
171 |
|
172 /** |
|
173 * Model is friend so it can access directly |
|
174 * cached device details. |
|
175 */ |
|
176 friend class CPEngWVClientInfoModel; // CSI: 36 # |
|
177 |
|
178 /** |
|
179 * Unit test class is friend so it can access members. |
|
180 */ |
|
181 friend class T_CWVClientInfoModel; // CSI: 36 # |
|
182 |
|
183 |
|
184 |
|
185 private: //Data |
|
186 |
|
187 |
|
188 //OWN: User device detail |
|
189 HBufC* iUserDeviceManufacturer; |
|
190 |
|
191 //OWN: User device detail |
|
192 HBufC* iUserClientProducer; |
|
193 |
|
194 //OWN: User device detail |
|
195 HBufC* iUserDeviceModel; |
|
196 |
|
197 //OWN: User device detail |
|
198 HBufC* iUserClientVersion; |
|
199 |
|
200 //OWN: User device detail |
|
201 HBufC* iUserClientLanguage; |
|
202 |
|
203 }; |
|
204 |
|
205 #endif //CPENGWVCLIENTINFOCONSTRUCT_H |
|
206 |
|
207 // End of File |
|
208 |