|
1 /* |
|
2 * Copyright (c) 2007-2008 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: stores the parameters needed for xmpp |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CXMPPPARAMETERS_H__ |
|
19 #define __CXMPPPARAMETERS_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 |
|
26 const TUint32 KMaxLength = 127; |
|
27 |
|
28 /** |
|
29 * CXmppParameters |
|
30 * |
|
31 * parameters for xmpp |
|
32 * |
|
33 */ |
|
34 class CXmppParameters: public CBase |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Two Phase Constructor |
|
40 */ |
|
41 IMPORT_C static CXmppParameters* NewL(); |
|
42 |
|
43 /** |
|
44 * Destructor |
|
45 */ |
|
46 virtual ~CXmppParameters(); |
|
47 |
|
48 |
|
49 private: |
|
50 |
|
51 /** |
|
52 * Default Constructor |
|
53 */ |
|
54 CXmppParameters(); |
|
55 void ConstructL(); |
|
56 |
|
57 |
|
58 public: |
|
59 |
|
60 /** |
|
61 * Sets the value of the member variable iIapId |
|
62 * |
|
63 * @param aIapId value to set |
|
64 */ |
|
65 void SetIapId(TInt32 aIapId); |
|
66 |
|
67 /** |
|
68 * Sets the value of the member variable iSettingsId |
|
69 * |
|
70 * @param aSettingsId value to set |
|
71 */ |
|
72 void SetSettingsId(TUint32 aSettingsId); |
|
73 |
|
74 /** |
|
75 * Sets the value of the member variable iServerAddress |
|
76 * |
|
77 * @param aServerAddress value to set |
|
78 */ |
|
79 void SetServerAddress(const TDesC& aServerAddress); |
|
80 |
|
81 /** |
|
82 * Sets the value of the member variable iUserName |
|
83 * |
|
84 * @param aUserName value to set |
|
85 */ |
|
86 void SetUserName(const TDesC& aUserName); |
|
87 |
|
88 /** |
|
89 * Sets the value of the member variable iPassword |
|
90 * |
|
91 * @param aPassword value to set |
|
92 */ |
|
93 void SetPasswd(const TDesC& aPassword); |
|
94 |
|
95 /** |
|
96 * Sets the value of the member variable iResource |
|
97 * |
|
98 * @param aResource value to set |
|
99 */ |
|
100 void SetResource(const TDesC& aResource); |
|
101 |
|
102 /** |
|
103 * Sets the value of the member variable iProxyServer |
|
104 * |
|
105 * @param aProxyServer value to set |
|
106 */ |
|
107 void SetProxyServer(const TDesC& aProxyServer); |
|
108 |
|
109 /** |
|
110 * Sets the value of the member variable iServerPort |
|
111 * |
|
112 * @param aServerPort value to set |
|
113 */ |
|
114 void SetServerPort(TInt32 aServerPort); |
|
115 |
|
116 /** |
|
117 * Sets the value of the member variable iProxyPort |
|
118 * |
|
119 * @param aProxyPort value to set |
|
120 */ |
|
121 void SetProxyPort(TInt32 aProxyPort); |
|
122 |
|
123 /** |
|
124 * Sets the value of the member variable iSsl |
|
125 * |
|
126 * @param aSsl value to set |
|
127 */ |
|
128 void SetSsl(TBool aSsl); |
|
129 |
|
130 /** |
|
131 * Sets the value of the member variable iConnMgrBus |
|
132 * |
|
133 * @param aSsl value to set |
|
134 */ |
|
135 void CXmppParameters::SetConnMgrBus(const TDesC& aConnMgrBus); |
|
136 |
|
137 /** |
|
138 * Sets the value of the member variable iConnMgrPath |
|
139 * |
|
140 * @param aSsl value to set |
|
141 */ |
|
142 void CXmppParameters::SetConnMgrPath(const TDesC& aConnMgrPath); |
|
143 |
|
144 /** |
|
145 * Sets the value of the member variable iProtocol |
|
146 * |
|
147 * @param aSsl value to set |
|
148 */ |
|
149 void CXmppParameters::SetProtocol(const TDesC& aProtocol); |
|
150 |
|
151 /** |
|
152 * Returns the value of the member variable iIapId |
|
153 * |
|
154 * @param None |
|
155 */ |
|
156 IMPORT_C TInt32 IapId(); |
|
157 |
|
158 /** |
|
159 * Returns the value of the member variable iSettingsId |
|
160 * |
|
161 * @param None |
|
162 */ |
|
163 IMPORT_C TUint32 SettingsId(); |
|
164 |
|
165 /** |
|
166 * Returns the value of the member variable iServerAddress |
|
167 * |
|
168 * @param None |
|
169 */ |
|
170 IMPORT_C const TDesC& ServerAddress(); |
|
171 |
|
172 /** |
|
173 * Returns the value of the member variable iUserName |
|
174 * |
|
175 * @param None |
|
176 */ |
|
177 IMPORT_C const TDesC& UserName(); |
|
178 |
|
179 /** |
|
180 * Returns the value of the member variable iPassword |
|
181 * |
|
182 * @param None |
|
183 */ |
|
184 IMPORT_C const TDesC& Passwd(); |
|
185 |
|
186 /** |
|
187 * Returns the value of the member variable iResource |
|
188 * |
|
189 * @param None |
|
190 */ |
|
191 IMPORT_C const TDesC& Resource(); |
|
192 |
|
193 /** |
|
194 * Returns the value of the member variable iProxyServer |
|
195 * |
|
196 * @param None |
|
197 */ |
|
198 IMPORT_C const TDesC& ProxyServer(); |
|
199 |
|
200 /** |
|
201 * Returns the value of the member variable iServerPort |
|
202 * |
|
203 * @param None |
|
204 */ |
|
205 IMPORT_C TInt32 ServerPort(); |
|
206 |
|
207 /** |
|
208 * Returns the value of the member variable iProxyPort |
|
209 * |
|
210 * @param None |
|
211 */ |
|
212 IMPORT_C TInt32 ProxyPort(); |
|
213 |
|
214 /** |
|
215 * Returns the value of the member variable iSsl |
|
216 * |
|
217 * @param None |
|
218 */ |
|
219 IMPORT_C TBool Ssl(); |
|
220 |
|
221 /** |
|
222 * Returns the value of the member variable iConnMgrBus |
|
223 * |
|
224 * @param None |
|
225 */ |
|
226 IMPORT_C const TDesC& CXmppParameters::ConnMgrBus(); |
|
227 |
|
228 /** |
|
229 * Returns the value of the member variable iConnMgrPath |
|
230 * |
|
231 * @param None |
|
232 */ |
|
233 IMPORT_C const TDesC& CXmppParameters::ConnMgrPath(); |
|
234 |
|
235 /** |
|
236 * Returns the value of iProtocol |
|
237 * |
|
238 * @param None |
|
239 */ |
|
240 IMPORT_C const TDesC& CXmppParameters::Protocol(); |
|
241 |
|
242 private: // data |
|
243 |
|
244 /** |
|
245 * IapId to use for the xmpp connection |
|
246 */ |
|
247 TInt32 iIapId; |
|
248 |
|
249 /** |
|
250 * settingsid in the xmpp settings store |
|
251 */ |
|
252 TInt32 iSettingsId; |
|
253 |
|
254 /** |
|
255 * xmpp server to connect to |
|
256 */ |
|
257 HBufC* iServerAddress; |
|
258 |
|
259 /** |
|
260 * username to use for the xmpp connection |
|
261 */ |
|
262 HBufC* iUserName; |
|
263 |
|
264 /** |
|
265 * password of the user |
|
266 */ |
|
267 HBufC* iPassword; |
|
268 |
|
269 /** |
|
270 * resource to use for the xmpp connection |
|
271 */ |
|
272 HBufC* iResource; |
|
273 |
|
274 /** |
|
275 * proxy server to use for the xmpp connection |
|
276 */ |
|
277 HBufC* iProxyServer; |
|
278 |
|
279 /** |
|
280 * port number to connect to in the xmpp server |
|
281 */ |
|
282 TInt32 iServerPort; |
|
283 |
|
284 /** |
|
285 * port number of the proxy server to connect to |
|
286 */ |
|
287 TInt32 iProxyPort; |
|
288 |
|
289 /** |
|
290 * indicates whether to use ssl or not for the connection |
|
291 */ |
|
292 TBool iSsl; |
|
293 |
|
294 /** |
|
295 * Connection manager bus : Protocol specific |
|
296 */ |
|
297 HBufC* iConnMgrBus; |
|
298 |
|
299 /** |
|
300 * Connection manager path : Protocol specific |
|
301 */ |
|
302 HBufC* iConnMgrPath; |
|
303 |
|
304 /** |
|
305 * Protocol name |
|
306 */ |
|
307 HBufC* iProtocol; |
|
308 }; |
|
309 |
|
310 |
|
311 #endif // __CXMPPSETTINGSFETCHER_H__ |
|
312 |