|
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: CNcdRequestConfiguration declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCD_REQUEST_CONFIGURATION_DATA_HH |
|
20 #define C_NCD_REQUEST_CONFIGURATION_DATA_HH |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include "ncdprotocoltypes.h" |
|
25 |
|
26 class MNcdConfigurationProtocolCookie; |
|
27 class MNcdConfigurationProtocolDetail; |
|
28 |
|
29 |
|
30 /** |
|
31 * Software-element for client-elements |
|
32 */ |
|
33 class CNcdRequestConfigurationSoftware : public CBase |
|
34 { |
|
35 public: |
|
36 |
|
37 static CNcdRequestConfigurationSoftware* NewLC(); |
|
38 ~CNcdRequestConfigurationSoftware(); |
|
39 |
|
40 public: |
|
41 |
|
42 void SetSoftwareTypeL( const TDesC& aType ); |
|
43 void SetSoftwareVersionL( const TDesC& aVersion ); |
|
44 void SetSoftwareIdsL( const TDesC& aUid, const TDesC& aId, |
|
45 const TDesC8& aSsid ); |
|
46 void SetSoftwareLanguageL( const TDesC& aLanguage ); |
|
47 void AddSoftwareCapabilityL( const TDesC& aCapability ); |
|
48 void AddSoftwareDetailsL( MNcdConfigurationProtocolDetail* aDetail); |
|
49 |
|
50 |
|
51 TXmlEngElement GetSoftwareConfigurationElementL( |
|
52 RXmlEngDocument& aDocument, const TXmlEngString& aPrefix ); |
|
53 |
|
54 private: |
|
55 |
|
56 // client software configuration |
|
57 TNcdConfigurationSoftware iSoftware; |
|
58 |
|
59 |
|
60 }; |
|
61 |
|
62 |
|
63 /** |
|
64 * Hardware-element for client-elements |
|
65 */ |
|
66 class CNcdRequestConfigurationHardware : public CBase |
|
67 { |
|
68 public: |
|
69 |
|
70 static CNcdRequestConfigurationHardware* NewL(); |
|
71 ~CNcdRequestConfigurationHardware(); |
|
72 |
|
73 public: |
|
74 |
|
75 void SetHardwareUaProfileUriL( const TDesC& aUaProfileUri ); |
|
76 void SetHardwareIdentificationL( const TDesC& aIdentification ); |
|
77 void SetHardwareManufacturerL( const TDesC& aManufacturer ); |
|
78 void SetHardwareModelL( const TDesC& aModel ); |
|
79 void SetHardwareLanguageL( const TDesC& aLanguage ); |
|
80 void SetHardwarePlatformL( const TDesC& aPlatform ); |
|
81 void SetHardwareFirmwareL( const TDesC& aFirmwareVersion ); |
|
82 void AddHardwareDisplayL( TInt aColors, TInt aHeight, TInt aWidth ); |
|
83 void AddHardwareDetailsL( MNcdConfigurationProtocolDetail* aDetail ); |
|
84 |
|
85 TXmlEngElement GetHardwareConfigurationElementL( |
|
86 RXmlEngDocument& aDocument, |
|
87 const TXmlEngString& aPrefix ); |
|
88 |
|
89 private: |
|
90 |
|
91 // client hardware configuration |
|
92 TNcdConfigurationHardware iHardware; |
|
93 |
|
94 }; |
|
95 |
|
96 |
|
97 /** |
|
98 * Client-element for configuration requests |
|
99 */ |
|
100 class CNcdRequestConfigurationClient : public CBase |
|
101 { |
|
102 public: |
|
103 static CNcdRequestConfigurationClient* NewLC(); |
|
104 ~CNcdRequestConfigurationClient(); |
|
105 |
|
106 public: |
|
107 |
|
108 void AddSoftwareL( CNcdRequestConfigurationSoftware* aSoftware ); |
|
109 |
|
110 TInt SoftwareCount() const; |
|
111 CNcdRequestConfigurationSoftware& Software( TInt aIndex ); |
|
112 |
|
113 |
|
114 CNcdRequestConfigurationHardware& Hardware(); |
|
115 |
|
116 protected: |
|
117 |
|
118 CNcdRequestConfigurationClient(); |
|
119 void ConstructL(); |
|
120 |
|
121 private: |
|
122 |
|
123 RPointerArray<CNcdRequestConfigurationSoftware> iSoftwares; |
|
124 CNcdRequestConfigurationHardware* iHardware; |
|
125 |
|
126 }; |
|
127 |
|
128 |
|
129 |
|
130 class CNcdRequestConfigurationData : public CBase |
|
131 { |
|
132 public: |
|
133 |
|
134 static CNcdRequestConfigurationData* NewLC(); |
|
135 ~CNcdRequestConfigurationData(); |
|
136 |
|
137 private: |
|
138 |
|
139 CNcdRequestConfigurationData(); |
|
140 |
|
141 public: |
|
142 void SetNamespacePrefixL( const TDesC8& aPrefix ); |
|
143 |
|
144 void AddCookieL( MNcdConfigurationProtocolCookie* aCookie ); |
|
145 |
|
146 void AddQueryResponseL( |
|
147 TNcdConfigurationQueryResponse aQueryResponse); |
|
148 |
|
149 /* Network configuration data */ |
|
150 void SetNetworkMccL( const TDesC& aMcc, const TDesC& aCurrentMcc ); |
|
151 void SetNetworkMncL( const TDesC& aMnc, const TDesC& aCurrentMnc ); |
|
152 void SetNetworkGidL( const TDesC& aGid1, const TDesC& aGid2 ); |
|
153 void SetNetworkSmscL( const TDesC& aSmsc ); |
|
154 void SetNetworkImsiL( const TDesC& aImsi ); |
|
155 void SetNetworkMsisdnL( const TDesC& aMsisdn ); |
|
156 void SetNetworkCellIdL( const TDesC& aCellId ); |
|
157 void SetNetworkProviderL( const TDesC& aServiceProviderName ); |
|
158 void SetNetworkOperatorL( const TDesC& aOperatorName ); |
|
159 void AddNetworkDetailsL( MNcdConfigurationProtocolDetail* aDetail ); |
|
160 |
|
161 /* Software configuration data */ |
|
162 |
|
163 /** |
|
164 * Adds a new client-info. Ownership is transferred |
|
165 */ |
|
166 void AddClientL( CNcdRequestConfigurationClient* aClient ); |
|
167 |
|
168 // request generation methods, |
|
169 // used by request generator |
|
170 TXmlEngElement GetConfigurationElementL(RXmlEngDocument& aDocument); |
|
171 TXmlEngElement GetCookiesElementL(RXmlEngDocument& aDocument); |
|
172 TXmlEngElement GetQueryResponseElementL(RXmlEngDocument& aDocument); |
|
173 TXmlEngElement GetNetworkConfigurationElementL(RXmlEngDocument& aDocument); |
|
174 |
|
175 /** |
|
176 * Number of client-elements |
|
177 */ |
|
178 TInt ClientConfigurationCount() const; |
|
179 |
|
180 /** |
|
181 * Returns the client element for the given index |
|
182 */ |
|
183 TXmlEngElement GetClientConfigurationElementL( RXmlEngDocument& aDocument, |
|
184 TInt aIndex ); |
|
185 |
|
186 |
|
187 public: |
|
188 // network configuration |
|
189 TNcdConfigurationNetwork iNetwork; |
|
190 |
|
191 TXmlEngString iQueryResponseId; |
|
192 |
|
193 private: |
|
194 TXmlEngString iPrefix; |
|
195 |
|
196 TBool iNetworkConfigurationEnabled; |
|
197 TBool iSoftwareConfigurationEnabled; |
|
198 TBool iHardwareConfigurationEnabled; |
|
199 |
|
200 RPointerArray<CNcdRequestConfigurationClient> iClients; |
|
201 RPointerArray<MNcdConfigurationProtocolCookie> iCookies; |
|
202 RArray<TNcdConfigurationQueryResponse> iQueryResponses; |
|
203 |
|
204 }; |
|
205 |
|
206 |
|
207 #endif //C_NCD_REQUEST_CONFIGURATION_DATA_HH |