|
1 /* |
|
2 * Copyright (c) 2005 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 * See class description below. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __EPOS_CSUPLSETTINGSENGINE_H__ |
|
22 #define __EPOS_CSUPLSETTINGSENGINE_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <etel.h> |
|
27 #include <etelmm.h> |
|
28 |
|
29 #include "epos_csuplsettings.h" |
|
30 #include "epos_csuplsettingsinternal.h" |
|
31 // FORWARD DECLARATIONS |
|
32 class CRepository; |
|
33 class CSuplEtelRequest; |
|
34 class CServerParams; |
|
35 class CTriggerParams; |
|
36 class CServerExtensionParams; |
|
37 class CSuplSettings; |
|
38 class CSettingsDatabaseHandler; |
|
39 |
|
40 // CONSTANTS |
|
41 |
|
42 // CLASS DECLARATION |
|
43 |
|
44 /** |
|
45 * This class is used for accessing central repository and to get |
|
46 * IMSI from ETEL. |
|
47 * |
|
48 * This is part of @lib epos_suplsettings.lib |
|
49 * @since 3.1 |
|
50 */ |
|
51 class CSuplSettingsEngine : public CBase |
|
52 { |
|
53 |
|
54 |
|
55 public: |
|
56 enum TEtelReqState |
|
57 { |
|
58 EUndefined, |
|
59 EImsi, |
|
60 ELoc |
|
61 }; |
|
62 public: // Constructors and destructor |
|
63 |
|
64 /** |
|
65 * Two-phased constructor. |
|
66 * |
|
67 * @returns A new instance of this class. |
|
68 */ |
|
69 static CSuplSettingsEngine* NewL(); |
|
70 |
|
71 /** |
|
72 * Destructor. |
|
73 */ |
|
74 virtual ~CSuplSettingsEngine(); |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * C++ default constructor. |
|
80 */ |
|
81 CSuplSettingsEngine(); |
|
82 |
|
83 /** |
|
84 * By default EPOC constructor is private. |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 public: // New functions |
|
89 |
|
90 /** |
|
91 * This method connects to ETEL, instantiates ETEL request |
|
92 * active object. This is an asynchronous call. |
|
93 * It retrieves IMSI value from IMSI. |
|
94 */ |
|
95 void Initialize(TRequestStatus& aStatus); |
|
96 |
|
97 /** |
|
98 * This method connects to ETEL. |
|
99 */ |
|
100 TInt ConnectToEtelL(); |
|
101 |
|
102 /** |
|
103 * This method cancels initialization request. |
|
104 */ |
|
105 void CancelInitialize(); |
|
106 |
|
107 /* * |
|
108 * This method sets HSLP address, IAP Name and changed by field |
|
109 * in SUPL settings. |
|
110 |
|
111 TInt Set( |
|
112 IN const TDesC& aHslpAddress, |
|
113 IN const TDesC& aIapName, |
|
114 IN const TInt aChangedBy |
|
115 ); |
|
116 |
|
117 * |
|
118 * This method retrieves HSLP address, IAP Name, IMSI vlaue and |
|
119 * changed by field from SUPL settings. |
|
120 |
|
121 TInt Get( |
|
122 OUT TDes& aHslpAddress, |
|
123 OUT TDes& aIapName, |
|
124 OUT TDes& aImsi, |
|
125 OUT TInt& aChangedBy |
|
126 ); |
|
127 */ |
|
128 /** |
|
129 * This method generates HSLP address from the IMSI retrieved from |
|
130 * ETEL during initialization. |
|
131 */ |
|
132 TInt GetHslpAddressFromImsi( |
|
133 /* OUT */ TDes& aHslpAddr |
|
134 ); |
|
135 |
|
136 /** |
|
137 * This method creates a concurrent read/write transaction. |
|
138 * The method leaves a clean-up item to clean-up stack to roll back |
|
139 * the changes in case of leave. |
|
140 * Remember to pop the item from the stack before making commit. |
|
141 */ |
|
142 TInt LockEngineL(); |
|
143 |
|
144 /** |
|
145 * This method commits a concurrent read/write transaction and pops |
|
146 * the roll-back clean-up item from the stack |
|
147 * |
|
148 * The method handles possible roll back in case of failure. |
|
149 * |
|
150 */ |
|
151 TInt UnLockEngine(TBool aWithCommit); |
|
152 |
|
153 /** |
|
154 * This method retrieves currently active IMSI. Currently active IMSI |
|
155 * is retrieved during initialization time. |
|
156 * |
|
157 * @param aImsi will hold, on successful completion, currently active IMSI |
|
158 * @return one of the following error codes returned |
|
159 * - KErrNone if method completed successfully |
|
160 * - KErrNotReady if this method is called before @ref Initialize |
|
161 */ |
|
162 |
|
163 TInt GetImsi(TDes& aImsi); |
|
164 |
|
165 /** |
|
166 * This method compares IMSI value currently stored in SUPL settings and |
|
167 * currently active IMSI. If both are same, this method returns false else |
|
168 * returns true. |
|
169 * |
|
170 * @param aChanged will hold, on successful completion, one of the following value |
|
171 * - ETrue if currently active IMSI and IMSI value stored in SUPL settings |
|
172 * are different. |
|
173 * - EFalse if currently active IMSI and IMSI value stored in SUPL settings |
|
174 * are same. |
|
175 * @return one of the following |
|
176 * - KErrNone if method completed successfully |
|
177 * - KErrNotReady if this method is called before @ref Initialize |
|
178 */ |
|
179 TInt IsImsiChanged(TBool& aChanged); |
|
180 |
|
181 /** |
|
182 * This method is used to retrieve SUPL usage from settings storage. |
|
183 * |
|
184 * @param [OUT] aUsage will hold, upon successful completion, value indicating |
|
185 * current SUPL usage |
|
186 * @return one of the following error codes: |
|
187 * - KErrNone if SUPL usage retrieved successfully. |
|
188 * - KErrNotFound if the SUPL State is not found in SUPL settings |
|
189 * - KErrUnknown if retrieving SUPL usage from settings storage failed |
|
190 */ |
|
191 |
|
192 TInt GetSuplUsage(TInt& aUsage); |
|
193 |
|
194 /** |
|
195 * This method is used to change SUPL usage. Using this method, SUPL usage can be |
|
196 * set to always ask or automatic or automatic in home network or disabled. |
|
197 * By default, SUPL usage will be set to always ask. |
|
198 * |
|
199 * Note that this method should be invoked only after settings are locked |
|
200 * using @ref LockSettingsL() method. After changing SUPL usage, settings |
|
201 * should be unlocked using @ref UnlockSettings() method. |
|
202 * |
|
203 * @param [IN] aUsage Usage to be set for SUPL usage |
|
204 * @return one of the following error codes: |
|
205 * - KErrNone if SUPL usage is changed successfully. |
|
206 * - KErrArgument if aUsage field is not in range |
|
207 * - KErrNotReady if this method is invoked before @ref LockSettingsL() |
|
208 * - KErrUnknown if changing SUPL usage in settings storage has failed |
|
209 */ |
|
210 TInt SetSuplUsage(const TInt aUsage); |
|
211 /* |
|
212 * This method is used to check if the initialisation has been done using @ref Initialize() |
|
213 * |
|
214 * @return ETrue if init has been done |
|
215 * EFalse otherwise |
|
216 */ |
|
217 TBool IsInitDone(); |
|
218 /* |
|
219 * This method is used to check if the initialisation has been successful |
|
220 * |
|
221 * @return ETrue if init has been succesful |
|
222 * EFalse otherwise |
|
223 */ |
|
224 TBool IsInitPassed(); |
|
225 |
|
226 /** |
|
227 * This method is used to add new server into settings. It is client's responsibility |
|
228 * to set all the parameters in aParamValues except SLP identification which will |
|
229 * generated automatically. |
|
230 * |
|
231 * @since S60 9.1TB |
|
232 * |
|
233 * @param [IN] aParamValues Server parameter values which which the server entry needs to be added |
|
234 * @param [OUT] aSlpId SLP identification for the new server added |
|
235 * @return one of the following error codes: |
|
236 * - KErrNone if SUPL settings are changed successfully. |
|
237 */ |
|
238 TInt AddNewServer( |
|
239 const CServerParams* aParamValues, |
|
240 TInt64& aSlpId |
|
241 ); |
|
242 |
|
243 |
|
244 /** |
|
245 * This method is used to change server address parameter in server settings |
|
246 * |
|
247 * @since S60 9.1TB |
|
248 * |
|
249 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
250 * @param [IN] aServerAddres SUPL Server address |
|
251 * @return one of the following error codes: |
|
252 * - KErrNone if SUPL settings are changed successfully. |
|
253 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
254 * - KErrArgument if address passed is empty or if the SLP ID passed is not valid |
|
255 */ |
|
256 |
|
257 TInt SetServerAddress( |
|
258 const TInt64 aSlpId, |
|
259 const TDesC& aServerAddress |
|
260 ); |
|
261 |
|
262 /** |
|
263 * This method is used to retrieve server address parameter from server settings. Client |
|
264 * has to allocate memory for server address parameter. |
|
265 * |
|
266 * @since S60 9.1TB |
|
267 * |
|
268 * @param [IN] aSlpId SLP ID of server for which the server address needs to be retrieved |
|
269 * @param [OUT] aServerAddres SUPL Server address |
|
270 * @return one of the following error codes: |
|
271 * - KErrNone if SUPL settings are changed successfully. |
|
272 * - KErrArgument if the SLP ID passed is not valid |
|
273 */ |
|
274 |
|
275 TInt GetServerAddress( |
|
276 TInt64 aSlpId, |
|
277 TDes& aServerAddress |
|
278 ) const; |
|
279 |
|
280 /** |
|
281 * This method is used to change protocol version supported by SUPL server. The protocol |
|
282 * version consists of two parts : Major version and Minor version. |
|
283 * |
|
284 * @since S60 9.1TB |
|
285 * |
|
286 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
287 * @param [IN] aMajor Major version number. It can takes values from 0 to 255. |
|
288 * @param [IN] aMinor Minor version number. It can takes values from 0 to 255. |
|
289 * @return one of the following error codes: |
|
290 * - KErrNone if SUPL settings are changed successfully. |
|
291 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
292 * - KErrArgument if version parameters are not in range or if the SLP ID passed is not valid |
|
293 */ |
|
294 TInt SetVersion( |
|
295 const TInt64 aSlpId, |
|
296 const TInt aMajor, |
|
297 const TInt aMinor |
|
298 ); |
|
299 |
|
300 /** |
|
301 * This method is used to retrieve protocol version supported by SUPL server. The protocol |
|
302 * version consists of two parts : Major version and Minor version. |
|
303 * |
|
304 * @since S60 9.1TB |
|
305 * |
|
306 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
307 * @param [OUT] aMajor Major version number. It can takes values from 0 to 255. |
|
308 * @param [OUT] aMinor Minor version number. It can takes values from 0 to 255. |
|
309 * @return one of the following error codes: |
|
310 * - KErrNone if SUPL settings are changed successfully. |
|
311 * - KErrArgument if the SLP ID passed is not valid |
|
312 */ |
|
313 TInt GetVersion( |
|
314 const TInt64 aSlpId, |
|
315 TInt& aMajor, |
|
316 TInt& aMinor |
|
317 ) const; |
|
318 |
|
319 /** |
|
320 * This method is used to change IAP Name in server parameters. IAP name refers to |
|
321 * the access point which is used to access the HSLP over the internet. |
|
322 * |
|
323 * @since S60 9.1TB |
|
324 * |
|
325 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
326 * @param [IN] aIapName The Internet Access Point Name refers to the access point which is |
|
327 * used to access the HSLP over the internet. This can have maximum size of 100 characters. |
|
328 * @return one of the following error codes: |
|
329 * - KErrNone if SUPL settings are changed successfully. |
|
330 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
331 * - KErrArgument if IAP Name is empty or if the SLP ID passed is not valid |
|
332 */ |
|
333 TInt SetIapName( |
|
334 const TInt64 aSlpId, |
|
335 const TDesC& aIapName |
|
336 ); |
|
337 |
|
338 /** |
|
339 * This method is used to retrieve IAP Name in server parameters. IAP name refers to |
|
340 * the access point which is used to access the HSLP over the internet. It is client's |
|
341 * responsibility to allocate memory for IAP name before invoking this method. |
|
342 * |
|
343 * @since S60 9.1TB |
|
344 * |
|
345 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
346 * @param [OUT] aIapName The Internet Access Point Name refers to the access point which is |
|
347 * used to access the HSLP over the internet. This can have maximum size of 100 characters. |
|
348 * @return one of the following error codes: |
|
349 * - KErrNone if SUPL settings are changed successfully. |
|
350 * - KErrArgument if the SLP ID passed is not valid |
|
351 */ |
|
352 TInt GetIapName( |
|
353 const TInt64 aSlpId, |
|
354 TDes& aIapName |
|
355 ) const; |
|
356 |
|
357 /** |
|
358 * This method is used to change manufacturer in server parameters. Manufacturer name |
|
359 * refers to the service provider who is providing SUPL service. |
|
360 * |
|
361 * @since S60 9.1TB |
|
362 * |
|
363 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
364 * @param [IN] aManufacturer Manufacture name. This can have maximum size of 100 characters. |
|
365 * @return one of the following error codes: |
|
366 * - KErrNone if SUPL settings are changed successfully. |
|
367 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
368 * - KErrArgument if manufacturer name is empty or if the SLP ID passed is not valid |
|
369 */ |
|
370 TInt SetManufacturerName( |
|
371 const TInt64 aSlpId, |
|
372 const TDesC& aManufacturer |
|
373 ); |
|
374 |
|
375 /** |
|
376 * This method is used to retrieve manufacturer name in server parameters. |
|
377 * |
|
378 * @since S60 9.1TB |
|
379 * |
|
380 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
381 * @param [OUT] aManufacturer Manufacture name. This can have maximum size of 100 characters. |
|
382 * @return one of the following error codes: |
|
383 * - KErrNone if SUPL settings are changed successfully. |
|
384 * - KErrArgument if the SLP ID passed is not valid |
|
385 */ |
|
386 TInt GetManufacturerName( |
|
387 const TInt64 aSlpId, |
|
388 TDes& aManufacturerName |
|
389 ) const; |
|
390 |
|
391 /** |
|
392 * This method is used to change timestamp when the HSLP was used last time. |
|
393 * |
|
394 * @since S60 9.1TB |
|
395 * |
|
396 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
397 * @param [IN] aTime Time stamp |
|
398 * @return one of the following error codes: |
|
399 * - KErrNone if SUPL settings are changed successfully. |
|
400 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
401 * - KErrArgument if the SLP ID passed is not valid |
|
402 */ |
|
403 TInt SetLastUseTime( |
|
404 const TInt64 aSlpId, |
|
405 const TTime aTime |
|
406 ); |
|
407 |
|
408 /** |
|
409 * This method is used to retrieve timestamp when the SLP was used last time. |
|
410 * |
|
411 * @since S60 9.1TB |
|
412 * |
|
413 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
414 * @param [OUT] aTime Time stamp |
|
415 * @return one of the following error codes: |
|
416 * - KErrNone if SUPL settings are changed successfully. |
|
417 * - KErrArgument if the SLP ID passed is not valid |
|
418 */ |
|
419 TInt GetLastUseTime( |
|
420 const TInt64 aSlpId, |
|
421 TTime& aTime |
|
422 ) const; |
|
423 |
|
424 /** |
|
425 * This method is used to change timestamp when the HSLP was used tried last time. |
|
426 * |
|
427 * @since S60 9.1TB |
|
428 * |
|
429 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
430 * @param [IN] aTime Time stamp |
|
431 * @return one of the following error codes: |
|
432 * - KErrNone if SUPL settings are changed successfully. |
|
433 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
434 * - KErrArgument if the SLP ID passed is not valid |
|
435 */ |
|
436 TInt SetLastTriedTime( |
|
437 const TInt64 aSlpId, |
|
438 const TTime aTime |
|
439 ); |
|
440 |
|
441 /** |
|
442 * This method is used to retrieve timestamp when the HSLP was used tried last time. |
|
443 * |
|
444 * @since S60 9.1TB |
|
445 * |
|
446 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
447 * @param [OUT] aTime Time stamp |
|
448 * @return one of the following error codes: |
|
449 * - KErrNone if SUPL settings are changed successfully. |
|
450 * - KErrArgument if the SLP ID passed is not valid |
|
451 */ |
|
452 TInt GetLastTriedTime( |
|
453 const TInt64 aSlpId, |
|
454 TTime& aTime |
|
455 ) const; |
|
456 |
|
457 |
|
458 /** |
|
459 * This method is used to change network information when the SUPL session was last done. |
|
460 * The SUPL session could be sucessful one or failed one. |
|
461 * |
|
462 * @since S60 9.1TB |
|
463 * |
|
464 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
465 * @param [IN] aNetType The network type |
|
466 * @param [IN] aMcc Mobile country code. It can have value from 0 to 999 |
|
467 * @param [IN] aMnc Mobile network code. It can have value from 0 to 999 |
|
468 * @param [IN] aCid Cell Identity. It can have value from 0 to 65535 if aNetType is GSM or |
|
469 * it can have value from 0 to 268435455 if aNetType is WCDMA |
|
470 * @param [IN] aLac Location Aread Code. This parameter is written to settings only if aNetType is GSM. |
|
471 * @return one of the following error codes: |
|
472 * - KErrNone if SUPL settings are changed successfully. |
|
473 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
474 * - KErrArgument if the SLP ID passed is not valid or any of the parameters passed is not in range |
|
475 */ |
|
476 TInt SetNetInfoLastUse( |
|
477 const TInt64 aSlpId, |
|
478 const CSuplSettingsInternal::TSuplSettingsNetworkType aNetType, |
|
479 const TInt aMcc, |
|
480 const TInt aMnc, |
|
481 const TInt aCid, |
|
482 const TInt aLac=0 |
|
483 ); |
|
484 |
|
485 /** |
|
486 * This method is used to retrieve network information when the SUPL session was last done. |
|
487 * The SUPL session could be sucessful one or failed one. |
|
488 * |
|
489 * @since S60 9.1TB |
|
490 * |
|
491 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
492 * @param [OUT] aNetType The network type |
|
493 * @param [OUT] aMcc Mobile country code. It can have value from 0 to 999 |
|
494 * @param [OUT] aMnc Mobile network code. It can have value from 0 to 999 |
|
495 * @param [OUT] aCid Cell Identity. It can have value from 0 to 65535 if aNetType is GSM or |
|
496 * it can have value from 0 to 268435455 if aNetType is WCDMA |
|
497 * @param [OUT] aLac Location Aread Code. This parameter is written to settings only if aNetType is GSM. |
|
498 * @return one of the following error codes: |
|
499 * - KErrNone if SUPL settings are changed successfully. |
|
500 * - KErrArgument if the SLP ID passed is not valid |
|
501 */ |
|
502 TInt GetNetInfoLastUse( |
|
503 const TInt64 aSlpId, |
|
504 CSuplSettingsInternal::TSuplSettingsNetworkType& aNetType, |
|
505 TInt& aMcc, |
|
506 TInt& aMnc, |
|
507 TInt& aCid, |
|
508 TInt& aLac |
|
509 ) const; |
|
510 |
|
511 /** |
|
512 * This method is used to change network information when the SUPL session was last done sucessfully. |
|
513 * |
|
514 * @since S60 9.1TB |
|
515 * |
|
516 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
517 * @param [IN] aNetType The network type |
|
518 * @param [IN] aMcc Mobile country code. It can have value from 0 to 999 |
|
519 * @param [IN] aMnc Mobile network code. It can have value from 0 to 999 |
|
520 * @param [IN] aCid Cell Identity. It can have value from 0 to 65535 if aNetType is GSM or |
|
521 * it can have value from 0 to 268435455 if aNetType is WCDMA |
|
522 * @param [IN] aLac Location Aread Code. This parameter is written to settings only if aNetType is GSM. |
|
523 * @return one of the following error codes: |
|
524 * - KErrNone if SUPL settings are changed successfully. |
|
525 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
526 * - KErrArgument if the SLP ID passed is not valid or any of the parameters passed is not in range |
|
527 */ |
|
528 TInt SetNetInfoLastSucess( |
|
529 const TInt64 aSlpId, |
|
530 const CSuplSettingsInternal::TSuplSettingsNetworkType aNetType, |
|
531 const TInt aMcc, |
|
532 const TInt aMnc, |
|
533 const TInt aCid, |
|
534 const TInt aLac=0 |
|
535 ); |
|
536 |
|
537 /** |
|
538 * This method is used to retrieve network information when the SUPL session was last done sucessfully. |
|
539 * |
|
540 * @since S60 9.1TB |
|
541 * |
|
542 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
543 * @param [OUT] aNetType The network type |
|
544 * @param [OUT] aMcc Mobile country code. It can have value from 0 to 999 |
|
545 * @param [OUT] aMnc Mobile network code. It can have value from 0 to 999 |
|
546 * @param [OUT] aCid Cell Identity. It can have value from 0 to 65535 if aNetType is GSM or |
|
547 * it can have value from 0 to 268435455 if aNetType is WCDMA |
|
548 * @param [OUT] aLac Location Aread Code. This parameter is written to settings only if aNetType is GSM. |
|
549 * @return one of the following error codes: |
|
550 * - KErrNone if SUPL settings are changed successfully. |
|
551 * - KErrArgument if the SLP ID passed is not valid |
|
552 */ |
|
553 TInt GetNetInfoLastSucess( |
|
554 const TInt64 aSlpId, |
|
555 CSuplSettingsInternal::TSuplSettingsNetworkType& aNetType, |
|
556 TInt& aMcc, |
|
557 TInt& aMnc, |
|
558 TInt& aCid, |
|
559 TInt& aLac |
|
560 ) const; |
|
561 |
|
562 |
|
563 /** |
|
564 * This method is used to change parameter which indicates whether server |
|
565 * supports emergency service or not. |
|
566 * |
|
567 * @since S60 9.1TB |
|
568 * |
|
569 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
570 * @param [IN] aEmergencySupportFlag Flag to indicate whether emergency service is supported or not |
|
571 * @return one of the following error codes: |
|
572 * - KErrNone if SUPL settings are changed successfully. |
|
573 * - KErrArgument if the SLP ID passed is not valid |
|
574 */ |
|
575 TInt SetEmergencySupportFlag( |
|
576 const TInt64 aSlpId, |
|
577 const TBool aEmergencySupportFlag |
|
578 ); |
|
579 |
|
580 /** |
|
581 * This method is used to retrieve parameter which indicates whether server |
|
582 * supports emergency service or not. |
|
583 * |
|
584 * @since S60 9.1TB |
|
585 * |
|
586 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
587 * @param [OUT] aEmergencySupportFlag Flag to indicate whether emergency service is supported or not |
|
588 * @return one of the following error codes: |
|
589 * - KErrNone if SUPL settings are retrieved successfully. |
|
590 * - KErrArgument if the SLP ID passed is not valid |
|
591 */ |
|
592 TInt GetEmergencySupportFlag( |
|
593 const TInt64 aSlpId, |
|
594 TBool& aEmergencySupportFlag |
|
595 ) const; |
|
596 |
|
597 /** |
|
598 * This method is used to retrieve parameter which indicates whether server |
|
599 * supports TLS or not. |
|
600 * |
|
601 * @since S60 9.1TB |
|
602 * |
|
603 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
604 * @param [OUT] aTlsFlag Flag to indicate whether TLS is enabled or not. |
|
605 * @return one of the following error codes: |
|
606 * - KErrNone if SUPL settings are changed successfully. |
|
607 * - KErrArgument if the SLP ID passed is not valid |
|
608 */ |
|
609 TInt GetTlsFlag(const TInt64 aSlpId,TBool& aTlsFlag )const; |
|
610 |
|
611 /** |
|
612 * This method is used to change parameter which indicates whether server |
|
613 * supports TLS or not. |
|
614 * |
|
615 * @since S60 9.1TB |
|
616 * |
|
617 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
618 * @param [IN] aTlsSupportFlag Flag to indicate whether TLS is needs to be enabled or not. |
|
619 * @return one of the following error codes: |
|
620 * - KErrNone if SUPL settings are changed successfully. |
|
621 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
622 * - KErrArgument if the SLP ID passed is not valid |
|
623 */ |
|
624 TInt SetTlsSupportFlag( |
|
625 const TInt64 aSlpId, |
|
626 const TBool aTlsSupportFlag |
|
627 ); |
|
628 |
|
629 /** |
|
630 * This method is used to change parameter which indicates whether server |
|
631 * supports PSK-TLS or not. |
|
632 * |
|
633 * @since S60 9.1TB |
|
634 * |
|
635 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
636 * @param [IN] aPskTlsSupportFlag Flag to indicate whether PSK-TLS is needs to be enabled or not. |
|
637 * @return one of the following error codes: |
|
638 * - KErrNone if SUPL settings are changed successfully. |
|
639 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
640 * - KErrArgument if the SLP ID passed is not valid |
|
641 */ |
|
642 TInt SetPskTlsSupportFlag( |
|
643 const TInt64 aSlpId, |
|
644 const TBool aPskTlsSupportFlag |
|
645 ); |
|
646 |
|
647 /** |
|
648 * This method is used to retrieve parameter which indicates whether server |
|
649 * supports PSK-TLS or not. |
|
650 * |
|
651 * @since S60 9.1TB |
|
652 * |
|
653 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
654 * @param [OUT] aPskTlsFlag Flag to indicate whether PSK-TLS needs to be enabled or not. |
|
655 * @return one of the following error codes: |
|
656 * - KErrNone if SUPL settings are changed successfully. |
|
657 * - KErrArgument if the SLP ID passed is not valid |
|
658 */ |
|
659 TInt GetPskTlsFlag( |
|
660 const TInt64 aSlpId, |
|
661 TBool& aPskTlsFlag |
|
662 ) const; |
|
663 |
|
664 /** |
|
665 * This method is used to change parameter which indicates whether server |
|
666 * can be used for SUPL session or not. |
|
667 * |
|
668 * @since S60 9.1TB |
|
669 * |
|
670 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
671 * @param [IN] aEnable Flag to indicate whether server can be enabled or not |
|
672 * @return one of the following error codes: |
|
673 * - KErrNone if SUPL settings are changed successfully. |
|
674 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
675 * - KErrArgument if the SLP ID passed is not valid |
|
676 */ |
|
677 TInt SetServerEnabledFlag( |
|
678 const TInt64 aSlpId, |
|
679 const TBool aEnable |
|
680 ); |
|
681 |
|
682 /** |
|
683 * This method is used to retrieve parameter which indicates whether server |
|
684 * can be used for SUPL session or not. |
|
685 * |
|
686 * @since S60 9.1TB |
|
687 * |
|
688 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
689 * @param [OUT] aEnable Flag to indicate whether server can be enabled or not |
|
690 * @return one of the following error codes: |
|
691 * - KErrNone if SUPL settings are changed successfully. |
|
692 * - KErrArgument if the SLP ID passed is not valid |
|
693 */ |
|
694 TInt GetServerEnabledFlag( |
|
695 const TInt64 aSlpId, |
|
696 TBool& aEnable |
|
697 ) const; |
|
698 |
|
699 /** |
|
700 * This method is used to change parameter which indicates whether server |
|
701 * details can be removed if SIM is changed. |
|
702 * |
|
703 * @since S60 9.1TB |
|
704 * |
|
705 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
706 * @param [IN] aSimChangeFlag Flag to indicate whether server can be removed or not if there is a SIM change |
|
707 * @return one of the following error codes: |
|
708 * - KErrNone if SUPL settings are changed successfully. |
|
709 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
710 * - KErrArgument if the SLP ID passed is not valid |
|
711 */ |
|
712 TInt SetSimChangeRemoveFlag( |
|
713 const TInt64 aSlpId, |
|
714 const TBool aSimChangeFlag |
|
715 ); |
|
716 |
|
717 /** |
|
718 * This method is used to retrieve parameter which indicates whether server |
|
719 * details can be removed if SIM is changed. |
|
720 * |
|
721 * @since S60 9.1TB |
|
722 * |
|
723 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
724 * @param [OUT] aSimChangeFlag Flag to indicate whether server can be removed or not if there is a SIM change |
|
725 * @return one of the following error codes: |
|
726 * - KErrNone if SUPL settings are changed successfully. |
|
727 * - KErrArgument if the SLP ID passed is not valid |
|
728 */ |
|
729 TInt GetSimChangeRemoveFlag( |
|
730 const TInt64 aSlpId, |
|
731 TBool& aSimChangeFlag |
|
732 ) const; |
|
733 |
|
734 /** |
|
735 * This method is used to change parameter which indicates whether server |
|
736 * can be used out side home network or not. |
|
737 * |
|
738 * @since S60 9.1TB |
|
739 * |
|
740 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
741 * @param [IN] aHomeNwFlag Flag to indicate whether server can be used outside home network or not |
|
742 * @return one of the following error codes: |
|
743 * - KErrNone if SUPL settings are changed successfully. |
|
744 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
745 * - KErrArgument if the SLP ID passed is not valid |
|
746 */ |
|
747 TInt SetUsageInHomwNwFlag( |
|
748 const TInt64 aSlpId, |
|
749 const TBool aHomeNwFlag |
|
750 ); |
|
751 |
|
752 /** |
|
753 * This method is used to retrieve parameter which indicates whether server |
|
754 * can be used out side home network or not. |
|
755 * |
|
756 * @since S60 9.1TB |
|
757 * |
|
758 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
759 * @param [OUT] aHomeNwFlag Flag to indicate whether server can be used outside home network or not |
|
760 * @return one of the following error codes: |
|
761 * - KErrNone if SUPL settings are changed successfully. |
|
762 * - KErrArgument if the SLP ID passed is not valid |
|
763 */ |
|
764 TInt GetUsageInHomwNwFlag( |
|
765 const TInt64 aSlpId, |
|
766 TBool& aHomeNwFlag |
|
767 ) const; |
|
768 |
|
769 /** |
|
770 * This method is used to change parameter which indicates whether server |
|
771 * details are editable or not. |
|
772 * |
|
773 * @since S60 9.1TB |
|
774 * |
|
775 * @param [IN] aSlpId SLP ID for which the parameter needs to be changed |
|
776 * @param [IN] aEditFlag Flag to indicate whether server details are editable or not |
|
777 * @return one of the following error codes: |
|
778 * - KErrNone if SUPL settings are changed successfully. |
|
779 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
780 * - KErrArgument if the SLP ID passed is not valid |
|
781 */ |
|
782 TInt SetEditableFlag( |
|
783 const TInt64 aSlpId, |
|
784 const TBool aEditFlag |
|
785 ); |
|
786 |
|
787 /** |
|
788 * This method is used to retrieve parameter which indicates whether server |
|
789 * details are editable or not. |
|
790 * |
|
791 * @since S60 9.1TB |
|
792 * |
|
793 * @param [IN] aSlpId SLP ID for which the parameter needs to be retrieved |
|
794 * @param [OUT] aEditFlag Flag to indicate whether server details are editable or not |
|
795 * @return one of the following error codes: |
|
796 * - KErrNone if SUPL settings are changed successfully. |
|
797 * - KErrArgument if the SLP ID passed is not valid |
|
798 */ |
|
799 TInt GetEditableFlag( |
|
800 const TInt64 aSlpId, |
|
801 TBool& aEditFlag |
|
802 ) const; |
|
803 |
|
804 /** |
|
805 * This method is used to change all parameters of server in SUPL settings. The server identity |
|
806 * in @ref CServerParams which is passed as parameter gives information on for which server |
|
807 * entry the values needs to be changed. If the passed server identity does not exists in |
|
808 * settings, error is returned. |
|
809 * |
|
810 * @since S60 9.1TB |
|
811 * |
|
812 * @param [IN] aParamValues New value for server parameters. |
|
813 * @ref CServerParams class |
|
814 * @return one of the following error codes: |
|
815 * - KErrNone if SUPL settings are changed successfully. |
|
816 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
817 * - KErrArgument if the value of any of the pamater is not in range |
|
818 * - KErrNotFound if the SLP Identity mentioned in aParamValues does not exist in settings |
|
819 */ |
|
820 |
|
821 TInt SetAllParameter( |
|
822 const CServerParams* aParamValues |
|
823 ); |
|
824 |
|
825 /** |
|
826 * This method is used to change all parameters of default server in SUPL settings. In this |
|
827 * method server identity of @ref CServerParams passed is not considered and values |
|
828 * of default server is updated except server identity. If none of the server is set |
|
829 * as default, error is returned. |
|
830 * |
|
831 * @since S60 9.1TB |
|
832 * |
|
833 * @param [IN] aParamValues Parameter for which the value needs to be changed |
|
834 * @ref CServerParams class |
|
835 * @return one of the following error codes: |
|
836 * - KErrNone if SUPL settings are changed successfully. |
|
837 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
838 * - KErrArgument if the value of any of the pamater is not in range |
|
839 * - KErrNotFound if none of the server is set as default |
|
840 */ |
|
841 |
|
842 TInt SetDefaultServer( |
|
843 const CServerParams* aParamValues |
|
844 ); |
|
845 |
|
846 /** |
|
847 * This method is used to set one server as default in SUPL settings storage. |
|
848 * |
|
849 * @since S60 9.1TB |
|
850 * |
|
851 * @param [IN] aSlpId SLP ID for which the parameters needs to be changed |
|
852 * @return one of the following error codes: |
|
853 * - KErrNone if SUPL settings are changed successfully. |
|
854 * - KErrNotReady if this method is invoked before invoked before @ref LockSettingsL() |
|
855 * - KErrNotFound if the specified server identity does not exists in the settings |
|
856 */ |
|
857 |
|
858 TInt SetAsDefault( |
|
859 const TInt64 aSlpId |
|
860 ); |
|
861 |
|
862 /** |
|
863 * This method is used to retrieve default SLP identification. |
|
864 * |
|
865 * @since S60 9.1TB |
|
866 * |
|
867 * @param [OUT] aSlpId SLP ID of default server |
|
868 * |
|
869 * @return one of the following error codes: |
|
870 * - KErrNone if SUPL settings are retrieved successfully. |
|
871 * - KErrNotFound if settings does not have any server entries or if none of server is marked as default |
|
872 * |
|
873 */ |
|
874 TInt GetDefaultSlpId( |
|
875 TInt64& aSlpId |
|
876 ) const; |
|
877 |
|
878 /** |
|
879 * This method is deletes server entry from SUPL settings storage. |
|
880 * |
|
881 * @since S60 9.1TB |
|
882 * |
|
883 * @param [IN] aSlpId Server identity for which the entery needs to be deleted from the SUPL settings storage |
|
884 * |
|
885 * @return one of the following error codes: |
|
886 * - KErrNone if entry is deleted sucessfully |
|
887 * - KErrNotFound if the specified server identity does not exists in settings storage |
|
888 * |
|
889 */ |
|
890 TInt RemoveServer(TInt64 aSlpId); |
|
891 |
|
892 /** |
|
893 * This method is changes the priority of the server to the specified priority. |
|
894 * |
|
895 * @since S60 9.1TB |
|
896 * |
|
897 * |
|
898 * @param [IN] aSlpId Server identity for which the priority needs to be changed |
|
899 * @param [IN] aPriority Number of positions to move |
|
900 * @param [IN] aDirection Whether to increase or decrease priority. |
|
901 * |
|
902 * @return one of the following error codes: |
|
903 * - KErrNone if the priority is changed sucessfully |
|
904 * - KErrNotFound if the specified server identity does not exists in settings storage |
|
905 * - KErrArgument if the specified priority is not valid (eg. negative) |
|
906 * |
|
907 */ |
|
908 IMPORT_C TInt ChangePriority( |
|
909 TInt64 aSlpId, |
|
910 TInt aPriority, |
|
911 TBool aDirection |
|
912 ); |
|
913 |
|
914 |
|
915 |
|
916 /** |
|
917 * This method is used to retrieve all properties of default server from SUPL settings storage. |
|
918 * |
|
919 * @since S60 9.1TB |
|
920 * |
|
921 * @param [OUT] aParamValues Retrieves values from SUPL Settings storage |
|
922 * @ref CServerParams class |
|
923 * |
|
924 * @return one of the following error codes: |
|
925 * - KErrNone if SUPL settings are retrieved successfully. |
|
926 * - KErrNotFound if the settings does not have any server entry |
|
927 * |
|
928 */ |
|
929 TInt GetDefaultServer( |
|
930 CServerParams* aParamValues |
|
931 ) const; |
|
932 #if 0 |
|
933 /** |
|
934 * This method is used to retrieve properties of all servers from SUPL settings storage. |
|
935 * |
|
936 * @since S60 9.1TB |
|
937 * |
|
938 * @param [OUT] aParamValues Array of retrieved server entries |
|
939 * @ref CServerParams class |
|
940 * |
|
941 * @return one of the following error codes: |
|
942 * - KErrNone if SUPL settings are retrieved successfully. |
|
943 * - KErrNotFound if the settings does not have any server entry |
|
944 * |
|
945 */ |
|
946 TInt GetAllSlp( |
|
947 RPointerArray<CServerParams> aParamValues, |
|
948 TRequestStatus& aStatus |
|
949 ) const; |
|
950 #endif |
|
951 /** |
|
952 * This method enables or disables the fall back in SUPL settings storage. |
|
953 * |
|
954 * @since S60 9.1TB |
|
955 * |
|
956 * @param [IN] aFallBack Indicates whether the fallback needs to be enabled or disabled |
|
957 * |
|
958 * @return one of the following error codes: |
|
959 * - KErrNone if the fallback value changed sucessfully |
|
960 * - KErrGeneral if the fallback is enabled when only one server entry is present |
|
961 */ |
|
962 TInt SetFallBack(TBool aFallBack); |
|
963 |
|
964 /** |
|
965 * This method retrieves the fallback value from SUPL settings storage |
|
966 * |
|
967 * @since S60 9.1TB |
|
968 * |
|
969 * @param [OUT] aFallBack Retrived fallback value |
|
970 * |
|
971 * @return one of the following error codes: |
|
972 * - KErrNone if the fallback value retrieved sucessfully |
|
973 */ |
|
974 TInt GetFallBack(TBool& aFallBack) const; |
|
975 |
|
976 /** |
|
977 * This method gets the fall back timer from SUPL settings storage. |
|
978 * |
|
979 * @since S60 9.1TB |
|
980 * |
|
981 * @param [IN] aFallBack Indicates whether the fallback needs to be enabled or disabled |
|
982 * |
|
983 * @return one of the following error codes: |
|
984 * - KErrNone if the fallback value changed sucessfully |
|
985 * - KErrGeneral if the fallback is enabled when only one server entry is present |
|
986 */ |
|
987 TInt GetFallBackTimer(TInt& aTimerValue) const; |
|
988 |
|
989 /** |
|
990 * This method sets the fall back timer value in SUPL settings storage. |
|
991 * |
|
992 * @since S60 9.1TB |
|
993 * |
|
994 * @param [IN] aFallBack Indicates whether the fallback needs to be enabled or disabled |
|
995 * |
|
996 * @return one of the following error codes: |
|
997 * - KErrNone if the fallback value changed sucessfully |
|
998 * - KErrGeneral if the fallback is enabled when only one server entry is present |
|
999 */ |
|
1000 TInt SetFallBackTimer(TBool aTimerValue); |
|
1001 |
|
1002 /** |
|
1003 * This method is used to retrieve all properties of server from SUPL settings storage |
|
1004 * based on SLP identification. |
|
1005 * |
|
1006 * @since S60 9.1TB |
|
1007 * |
|
1008 * @param [IN] aSlpId SLP ID for which the parameters needs to be changed |
|
1009 * @param [OUT] aParamValues Parameter for which the value needs to be changed |
|
1010 * @ref CServerParams class |
|
1011 * |
|
1012 * @return one of the following error codes: |
|
1013 * - KErrNone if SUPL settings are retrieved successfully. |
|
1014 * - KErrArgument if any of the argument passed is not valid |
|
1015 * - KErrNotFound if the specified server does not exists in the settings |
|
1016 * |
|
1017 */ |
|
1018 TInt GetSlpInfoFromId( |
|
1019 const TInt64 aSlpId, |
|
1020 CServerParams* aParamValues |
|
1021 ) const; |
|
1022 |
|
1023 /** |
|
1024 * This method is used to retrieve all properties of server from SUPL settings storage |
|
1025 * based on SLP address. |
|
1026 * |
|
1027 * @since S60 9.1TB |
|
1028 * |
|
1029 * @param [IN] aServerAddress SLP address for which the parameters needs to be changed |
|
1030 * @param [OUT] aParamValues Parameter for which the value needs to be changed |
|
1031 * @ref CServerParams class |
|
1032 * |
|
1033 * @return one of the following error codes: |
|
1034 * - KErrNone if SUPL settings are retrieved successfully. |
|
1035 * - KErrArgument if any of the argument passed is not valid |
|
1036 * - KErrNotFound if the specified server does not exists in the settings |
|
1037 * |
|
1038 */ |
|
1039 TInt GetSlpInfoAddress( |
|
1040 const TDesC& aServerAddress, |
|
1041 CServerParams* aParamValues |
|
1042 ) const; |
|
1043 |
|
1044 /** |
|
1045 * This method is used to retrieve number of server entries present in SUPL settings. |
|
1046 * |
|
1047 * @since S60 9.1TB |
|
1048 * |
|
1049 * @param [OUT] aCount Number of SLP entries |
|
1050 * |
|
1051 * @return one of the following error codes: |
|
1052 * - KErrNone if number of SLP entries are calculated |
|
1053 * - KErrNotFound if the settings does not have any server entry |
|
1054 * |
|
1055 */ |
|
1056 TInt SlpCount( |
|
1057 TInt& aCount |
|
1058 ); |
|
1059 |
|
1060 /** |
|
1061 * This method is used check whether server entry exists or not based on SLP |
|
1062 * identification |
|
1063 * |
|
1064 * @since S60 9.1TB |
|
1065 * |
|
1066 * @param [IN] aSlpId SLP identification |
|
1067 * |
|
1068 * @return one of the following codes: |
|
1069 * - ETrue if server entry exists in settings |
|
1070 * - EFalse if server entry does not exists in settings |
|
1071 * |
|
1072 */ |
|
1073 TBool IsSlpExists( |
|
1074 const TInt64 aSlpId |
|
1075 ); |
|
1076 |
|
1077 /** |
|
1078 * This method is used check whether server entry exists or not based on SLP |
|
1079 * address |
|
1080 * |
|
1081 * @since S60 9.1TB |
|
1082 * |
|
1083 * @param [IN] aServerAddress Server address |
|
1084 * |
|
1085 * @return one of the following codes: |
|
1086 * - ETrue if server entry exists in settings |
|
1087 * - EFalse if server entry does not exists in settings |
|
1088 * |
|
1089 */ |
|
1090 TBool IsSlpExists( |
|
1091 const TDesC& aServerAddress |
|
1092 ); |
|
1093 |
|
1094 |
|
1095 /** |
|
1096 * This synchronous method is used to retrieve properties of all servers from SUPL settings storage. |
|
1097 * This method retrieves all properties for each server. |
|
1098 * |
|
1099 * @since S60 9.1TB |
|
1100 * |
|
1101 * @param [OUT] aParamValues Array of retrieved server entries |
|
1102 * @ref CServerParams class |
|
1103 * |
|
1104 * @return one of the following error codes: |
|
1105 * - KErrNone if SUPL settings are retrieved successfully. |
|
1106 * - KErrNotFound if the settings does not have any server entry |
|
1107 * |
|
1108 */ |
|
1109 TInt GetAllSlp( |
|
1110 RPointerArray<CServerParams>& aParamValues |
|
1111 ); |
|
1112 |
|
1113 /** |
|
1114 * This method is used to retrieve properties of all servers from SUPL settings storage. |
|
1115 * This method retrieves all properties for each server. |
|
1116 * |
|
1117 * @since S60 9.1TB |
|
1118 * |
|
1119 * @param [OUT] aParamValues Array of retrieved server entries |
|
1120 * @ref CServerParams class |
|
1121 * |
|
1122 * @return one of the following error codes: |
|
1123 * - KErrNone if SUPL settings are retrieved successfully. |
|
1124 * - KErrNotFound if the settings does not have any server entry |
|
1125 * |
|
1126 */ |
|
1127 TInt GetAllSlp( |
|
1128 RPointerArray<CServerParams>& aParamValues, |
|
1129 TRequestStatus& aStatus |
|
1130 ); |
|
1131 /** |
|
1132 * This method is used to delete all servers which have the Sim Change Remove Flag set |
|
1133 * |
|
1134 * @since S60 9.1TB |
|
1135 * |
|
1136 * |
|
1137 * @return one of the following error codes: |
|
1138 * - KErrNone if entries were deleted. |
|
1139 * - KErrGeneral if changing settings failed |
|
1140 * |
|
1141 */ |
|
1142 TInt RemoveOnSimChange(); |
|
1143 |
|
1144 /** |
|
1145 * This method is used to retrieve properties of all active triggers. |
|
1146 * |
|
1147 * @since S60 5.2 |
|
1148 * |
|
1149 * @param [OUT] aParamValues Array of retrieved trigger parameters |
|
1150 * @ref CTriggerParams class |
|
1151 * |
|
1152 * @return one of the following error codes: |
|
1153 * - KErrNone if active trigger parameters are retrieved successfully. |
|
1154 * - KErrNotFound if there are no active triggers |
|
1155 * otherwise system wide error codes. |
|
1156 * |
|
1157 */ |
|
1158 TInt GetTriggerParams( RPointerArray<CTriggerParams>& aParamValues ) const; |
|
1159 |
|
1160 /** |
|
1161 * This method is used to retrieve properties of a given active trigger. |
|
1162 * |
|
1163 * @since S60 5.2 |
|
1164 * |
|
1165 * @param [IN] aSessionId Session identifier to get paramater of particular session |
|
1166 * @param [OUT] aParamValues Parameters for a given session |
|
1167 * @ref CTriggerParams class |
|
1168 * |
|
1169 * @return one of the following error codes: |
|
1170 * - KErrNone if active trigger parameters are retrieved successfully. |
|
1171 * - KErrNotFound if there is no active session with given id |
|
1172 * otherwise system wide error codes. |
|
1173 * |
|
1174 */ |
|
1175 |
|
1176 TInt GetTriggerParams( TInt64 aSessionId,CTriggerParams*& aParamValues ) const; |
|
1177 |
|
1178 /** |
|
1179 * Sets Notification status of particular session |
|
1180 * |
|
1181 * @since S60 5.2 |
|
1182 * @param [IN] aSessionId Session identifier to get/change paramater of particular session |
|
1183 * @param [IN] aTriggerNotificationStaus Indicates whether notification needs to be shown or |
|
1184 * not after every trigger fired |
|
1185 * |
|
1186 * @return following error codes |
|
1187 * - KErrNone if successful |
|
1188 * - KErrNotFound if there is no active session with given id |
|
1189 * otherwise system wide error codes. |
|
1190 */ |
|
1191 TInt SetNotificationStatus( TInt64 aSessionId, |
|
1192 TBool aTriggerNotificationStatus |
|
1193 ); |
|
1194 |
|
1195 /** |
|
1196 * Sets number of outstanding triggers for a particular session |
|
1197 * |
|
1198 * @since S60 5.2 |
|
1199 * @param [IN] aSessionId Session identifier to get/change paramater of particular session |
|
1200 * @param [IN] aOutstandingTriggers Indicates number of outstanding triggers for a given session |
|
1201 * |
|
1202 * @return following error codes |
|
1203 * - KErrNone if successful |
|
1204 * - KErrNotFound if there is no active session with given id |
|
1205 * otherwise system wide error codes. |
|
1206 */ |
|
1207 |
|
1208 TInt SetOutstandingTriggers( TInt64 aSessionId,TUint64 aOutstandingTriggers ); |
|
1209 |
|
1210 /* |
|
1211 * Cancels given ongoing triggering session |
|
1212 * |
|
1213 * @since S60 5.2 |
|
1214 * @param [IN] aSessionId Session identifier |
|
1215 * |
|
1216 * @return following error codes |
|
1217 * - KErrNone if successful |
|
1218 * - KErrNotFound if session is not found |
|
1219 * otherwise system wide error codes. |
|
1220 */ |
|
1221 TInt CancelTriggerSession( TInt64 aSessionId ); |
|
1222 |
|
1223 |
|
1224 /** |
|
1225 * This method is used to insert Active session record into the SUPL session DB |
|
1226 * @since S605.2 |
|
1227 * |
|
1228 * @param [IN] aSessionParamValues The CServerParams pointer containing trigger session params |
|
1229 * to be added to the DB |
|
1230 * - KErrNone if successful |
|
1231 * otherwise system wide error codes. |
|
1232 */ |
|
1233 TInt InsertSessionRecord(const CTriggerParams* aSessionParamValues); |
|
1234 |
|
1235 /** |
|
1236 * This method is used to delete a session record corresponding to the given session ID |
|
1237 * @since S60 5.2 |
|
1238 * @param [OUT] aSessionId The session ID of the session that is to be deleted |
|
1239 * - KErrNone if successful |
|
1240 * - KErrNotFound if session is not found |
|
1241 * otherwise system wide error codes. |
|
1242 */ |
|
1243 TInt DeleteSessionRecord(TInt64 aSessionId); |
|
1244 |
|
1245 /** |
|
1246 * This method is used to delete all session records from session table |
|
1247 * @since S60 5.2 |
|
1248 * - KErrNone if successful |
|
1249 * otherwise system wide error codes. |
|
1250 */ |
|
1251 |
|
1252 TInt DeleteAllSessionRecords(); |
|
1253 |
|
1254 /** |
|
1255 * This method is used to retrieve extended parameters of given server |
|
1256 * @since S60 5.2 |
|
1257 */ |
|
1258 |
|
1259 TInt GetServerExtensionParams( TInt64 aSlpId,CServerExtensionParams* aServerExtnParams ) const; |
|
1260 |
|
1261 /** |
|
1262 * This method is used to set extended parameters of a given server. |
|
1263 * @since S60 5.2 |
|
1264 */ |
|
1265 |
|
1266 TInt SetServerExtensionParams( TInt64 aSlpId,CServerExtensionParams* aServerExtnParams ); |
|
1267 |
|
1268 /** |
|
1269 * This method is used to read the default configured IAP name from the product config |
|
1270 * central repository. |
|
1271 * @since S60 5.2 |
|
1272 */ |
|
1273 TInt GetDefaultIAPName(TDes& aIapName); |
|
1274 |
|
1275 private: // New functions |
|
1276 void HandleNetInfoRequestComplete(TInt aErr, RMobilePhone::TMobilePhoneSubscriberId aImsi); |
|
1277 void HandleMncInfoRequestComplete(TInt aErr, TInt aMcc, TInt aMnc); |
|
1278 TInt GetMncLen(TInt aMcc); |
|
1279 |
|
1280 private: |
|
1281 // By default, prohibit copy constructor |
|
1282 CSuplSettingsEngine( const CSuplSettingsEngine& ); |
|
1283 // Prohibit assigment operator |
|
1284 CSuplSettingsEngine& operator= ( const CSuplSettingsEngine& ); |
|
1285 |
|
1286 private: // Data |
|
1287 TEtelReqState iState; |
|
1288 CRepository* iRepository; |
|
1289 |
|
1290 RMobilePhone::TMobilePhoneSubscriberId iImsi; |
|
1291 RTelServer iTelServer; |
|
1292 RMobilePhone iMobPhone; |
|
1293 RMobilePhone::TMobilePhoneNetworkInfoV1 iNetworkInfo; |
|
1294 RMobilePhone::TMobilePhoneNetworkInfoV1Pckg iNetworkInfoPkg; |
|
1295 RMobilePhone::TMobilePhoneLocationAreaV1 iLocationInfo; |
|
1296 TRequestStatus* iStatus; |
|
1297 TBool iInitDone; |
|
1298 TBool iInitPassed; |
|
1299 TFileName iTsyName; |
|
1300 TInt iMcc; |
|
1301 TInt iMnc; |
|
1302 //pointer to the DB Handler Class that accesses the Settings Db |
|
1303 CSettingsDatabaseHandler* iSettingsDBHandler; |
|
1304 }; |
|
1305 |
|
1306 #endif // __EPOS_CSUPLSETTINGSENGINE_H__ |
|
1307 |
|
1308 // End of File |