|
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: Implementation of CSuplSettings..in turn calls CSuplSettingsEngine methods |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include "epos_csuplsettingsengine.h" |
|
23 #include "epos_csuplsettings.h" |
|
24 #include "epos_csuplsettingparams.h" |
|
25 #include "epos_msuplsettingsobserver.h" |
|
26 #include "epos_csuplsettingsnotifier.h" |
|
27 #include "epos_csuplsettingsconstants.h" |
|
28 #include "epos_suplsessionnotifier.h" |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // ==================== LOCAL FUNCTIONS ==================== |
|
33 |
|
34 |
|
35 // ================= MEMBER FUNCTIONS ======================= |
|
36 |
|
37 // C++ default constructor can NOT contain any code, that |
|
38 // might leave. |
|
39 // |
|
40 CSuplSettings::CSuplSettings(): |
|
41 iSettingsNotifier(NULL),iSettingsDBChangeNotifier(NULL),iSessionNotifier(NULL) |
|
42 { |
|
43 |
|
44 } |
|
45 |
|
46 EXPORT_C CSuplSettings* CSuplSettings::NewL() |
|
47 { |
|
48 CSuplSettings* self = new (ELeave) CSuplSettings(); |
|
49 |
|
50 CleanupStack::PushL( self ); |
|
51 self->ConstructL(); |
|
52 CleanupStack::Pop(self); |
|
53 |
|
54 return self; |
|
55 } |
|
56 |
|
57 EXPORT_C CSuplSettings* CSuplSettings::NewLC() |
|
58 { |
|
59 CSuplSettings* self = new (ELeave) CSuplSettings(); |
|
60 |
|
61 CleanupStack::PushL( self ); |
|
62 self->ConstructL(); |
|
63 return self; |
|
64 } |
|
65 // EPOC default constructor can leave. |
|
66 void CSuplSettings::ConstructL() |
|
67 { |
|
68 iSettingsEngine = CSuplSettingsEngine::NewL(); |
|
69 } |
|
70 |
|
71 // Destructor |
|
72 EXPORT_C CSuplSettings::~CSuplSettings() |
|
73 { |
|
74 delete iSettingsNotifier; |
|
75 delete iSettingsDBChangeNotifier; |
|
76 delete iSettingsEngine; |
|
77 delete iSessionNotifier; |
|
78 } |
|
79 //------------------------------------------------------------------------------------- |
|
80 //CSuplSettings::SetObserverL() |
|
81 // |
|
82 //This method is used to start listening for SUPL setting changes. |
|
83 //-------------------------------------------------------------------------------------- |
|
84 EXPORT_C TInt CSuplSettings::SetObserverL(MSuplSettingsObserver& aObserver) |
|
85 { |
|
86 if (&aObserver == NULL) |
|
87 return KErrArgument; |
|
88 |
|
89 if(iSettingsDBChangeNotifier) |
|
90 { |
|
91 return KErrAlreadyExists; |
|
92 } |
|
93 else |
|
94 { |
|
95 iSettingsDBChangeNotifier = CSuplSettingsNotifier::NewL(aObserver,ETrue);//create a notifier for DB changes |
|
96 } |
|
97 |
|
98 // If already observing return error to client, if not start observation |
|
99 if (iSettingsNotifier) |
|
100 { |
|
101 return KErrAlreadyExists; |
|
102 } |
|
103 else |
|
104 { |
|
105 iSettingsNotifier = CSuplSettingsNotifier::NewL(aObserver); |
|
106 } |
|
107 |
|
108 return KErrNone; |
|
109 } |
|
110 //------------------------------------------------------------------------------------- |
|
111 //CSuplSettings::RemoveObserver() |
|
112 // |
|
113 //This method is used to stop listening for SUPL setting changes. |
|
114 //-------------------------------------------------------------------------------------- |
|
115 EXPORT_C void CSuplSettings::RemoveObserver() |
|
116 { |
|
117 if (iSettingsNotifier) |
|
118 { |
|
119 delete iSettingsNotifier; |
|
120 iSettingsNotifier = NULL; |
|
121 } |
|
122 if(iSettingsDBChangeNotifier) |
|
123 { |
|
124 delete iSettingsDBChangeNotifier; |
|
125 iSettingsDBChangeNotifier = NULL; |
|
126 } |
|
127 } |
|
128 |
|
129 //------------------------------------------------------------------------------------- |
|
130 //CSuplSettings::SetSessionObserverL() |
|
131 // |
|
132 //This method is used to start listening for SUPL session changes. |
|
133 //-------------------------------------------------------------------------------------- |
|
134 EXPORT_C TInt CSuplSettings::SetSessionObserverL(MSuplSessionObserver& aObserver) |
|
135 { |
|
136 |
|
137 if(iSessionNotifier) |
|
138 { |
|
139 return KErrAlreadyExists; |
|
140 } |
|
141 else |
|
142 { |
|
143 iSessionNotifier = CSuplSessionNotifier::NewL(aObserver);//create a notifier for DB changes |
|
144 } |
|
145 |
|
146 return KErrNone; |
|
147 } |
|
148 //------------------------------------------------------------------------------------- |
|
149 //CSuplSettings::RemoveSessionObserver() |
|
150 // |
|
151 //This method is used to stop listening for SUPL session changes. |
|
152 //-------------------------------------------------------------------------------------- |
|
153 EXPORT_C void CSuplSettings::RemoveSessionObserver() |
|
154 { |
|
155 delete iSessionNotifier; |
|
156 iSessionNotifier = NULL; |
|
157 } |
|
158 |
|
159 //------------------------------------------------------------------------------------- |
|
160 //CSuplSettings::Initialize() |
|
161 // |
|
162 //This method is invoked to initialize SUPL settings object. |
|
163 //-------------------------------------------------------------------------------------- |
|
164 EXPORT_C void CSuplSettings::Initialize(TRequestStatus& aStatus) |
|
165 { |
|
166 iSettingsEngine->Initialize(aStatus); |
|
167 } |
|
168 //------------------------------------------------------------------------------------- |
|
169 //CSuplSettings::CancelInitialize() |
|
170 // |
|
171 //This method is invoked to cancel Initialize() |
|
172 //-------------------------------------------------------------------------------------- |
|
173 EXPORT_C void CSuplSettings::CancelInitialize() |
|
174 { |
|
175 iSettingsEngine->CancelInitialize(); |
|
176 } |
|
177 //------------------------------------------------------------------------------------- |
|
178 //CSuplSettings::GenerateHslpAddressFromImsi() |
|
179 // |
|
180 //This method can be used to generate HSLP address from the IMSI |
|
181 // obtained during initialization. |
|
182 //-------------------------------------------------------------------------------------- |
|
183 EXPORT_C TInt CSuplSettings::GenerateHslpAddressFromImsi(TDes& aHslpAddress) |
|
184 { |
|
185 if (!iSettingsEngine->IsInitDone()) |
|
186 return KErrNotReady; |
|
187 |
|
188 if (!iSettingsEngine->IsInitPassed()) |
|
189 return KErrNotReady; |
|
190 |
|
191 if (aHslpAddress.MaxLength() == 0) |
|
192 return KErrArgument; |
|
193 |
|
194 if (aHslpAddress.MaxLength() < 40) |
|
195 return KErrOverflow; |
|
196 |
|
197 return iSettingsEngine->GetHslpAddressFromImsi(aHslpAddress); |
|
198 } |
|
199 //------------------------------------------------------------------------------------- |
|
200 //CSuplSettings::GetImsi() |
|
201 // |
|
202 //This method returns IMSI obtained during initialization of SUPL settings object. |
|
203 //-------------------------------------------------------------------------------------- |
|
204 EXPORT_C TInt CSuplSettings::GetImsi(TDes& aImsi) |
|
205 { |
|
206 if (!iSettingsEngine->IsInitDone()) |
|
207 return KErrNotReady; |
|
208 |
|
209 if (!iSettingsEngine->IsInitPassed()) |
|
210 return KErrNotReady; |
|
211 |
|
212 if (aImsi.MaxLength() == 0) |
|
213 return KErrArgument; |
|
214 |
|
215 if (aImsi.MaxLength() < KMaxIMSILen) |
|
216 return KErrOverflow; |
|
217 |
|
218 return iSettingsEngine->GetImsi(aImsi); |
|
219 } |
|
220 //------------------------------------------------------------------------------------- |
|
221 //CSuplSettings::IsImsiChanged() |
|
222 // |
|
223 //This method compares IMSI value currently stored in SUPL settings storage with |
|
224 //IMSI value obtained during initialization. |
|
225 //-------------------------------------------------------------------------------------- |
|
226 EXPORT_C TInt CSuplSettings::IsImsiChanged(TBool& aChanged) |
|
227 { |
|
228 if (!iSettingsEngine->IsInitDone()) |
|
229 return KErrNotReady; |
|
230 if (!iSettingsEngine->IsInitPassed()) |
|
231 return KErrNotReady; |
|
232 |
|
233 return iSettingsEngine->IsImsiChanged(aChanged); |
|
234 } |
|
235 //------------------------------------------------------------------------------------- |
|
236 //CSuplSettings::GetSuplUsage() |
|
237 // |
|
238 //This method is used to retrieve SUPL usage from settings storage. |
|
239 //-------------------------------------------------------------------------------------- |
|
240 EXPORT_C TInt CSuplSettings::GetSuplUsage(TSuplSettingsUsage& aUsage) const |
|
241 { |
|
242 TInt usage, ret; |
|
243 ret = iSettingsEngine->GetSuplUsage(usage); |
|
244 |
|
245 if (ret == KErrNone) |
|
246 { |
|
247 aUsage = (TSuplSettingsUsage)usage; |
|
248 return KErrNone; |
|
249 } |
|
250 else |
|
251 return ret; |
|
252 } |
|
253 //------------------------------------------------------------------------------------- |
|
254 //CSuplSettings::SetSuplUsage() |
|
255 // |
|
256 //This method is used to change SUPL usage. |
|
257 //-------------------------------------------------------------------------------------- |
|
258 EXPORT_C TInt CSuplSettings::SetSuplUsage(const TSuplSettingsUsage aUsage) |
|
259 { |
|
260 TInt usage = aUsage; |
|
261 |
|
262 if (usage < CSuplSettings::ESuplUsageAlwaysAsk || |
|
263 usage > CSuplSettings::ESuplUsageDisabled) |
|
264 return KErrArgument; |
|
265 |
|
266 return iSettingsEngine->SetSuplUsage(aUsage); |
|
267 } |
|
268 //------------------------------------------------------------------------------------- |
|
269 //CSuplSettings::AddNewServer() |
|
270 // |
|
271 //This method is used to add new server into settings. |
|
272 //-------------------------------------------------------------------------------------- |
|
273 EXPORT_C TInt CSuplSettings::AddNewServer( const CServerParams* aParamValues, TInt64& aSlpId ) |
|
274 { |
|
275 if(aParamValues == NULL) |
|
276 return KErrGeneral; |
|
277 return iSettingsEngine->AddNewServer(aParamValues,aSlpId ); |
|
278 } |
|
279 |
|
280 //------------------------------------------------------------------------------------- |
|
281 //CSuplSettings::SetServerAddress() |
|
282 // |
|
283 //This method is used to change server address parameter in server settings |
|
284 //-------------------------------------------------------------------------------------- |
|
285 EXPORT_C TInt CSuplSettings::SetServerAddress( const TInt64 aSlpId, const TDesC& aServerAddress) |
|
286 { |
|
287 if(aServerAddress.Length() <= 0) |
|
288 return KErrArgument; |
|
289 return iSettingsEngine->SetServerAddress(aSlpId,aServerAddress); |
|
290 } |
|
291 //------------------------------------------------------------------------------------- |
|
292 //CSuplSettings::GetServerAddress() |
|
293 // |
|
294 //This method is used to retrieve server address parameter from server settings. |
|
295 //-------------------------------------------------------------------------------------- |
|
296 EXPORT_C TInt CSuplSettings::GetServerAddress(const TInt64 aSlpId, TDes& aServerAddress) const |
|
297 { |
|
298 return iSettingsEngine->GetServerAddress(aSlpId,aServerAddress); |
|
299 } |
|
300 //------------------------------------------------------------------------------------- |
|
301 //CSuplSettings::SetIapName() |
|
302 // |
|
303 //This method is used to change IAP Name in server parameters. |
|
304 //-------------------------------------------------------------------------------------- |
|
305 EXPORT_C TInt CSuplSettings::SetIapName( const TInt64 aSlpId, const TDesC& aIapName) |
|
306 { |
|
307 |
|
308 if(aIapName.Length() <= 0) |
|
309 return KErrArgument; |
|
310 return iSettingsEngine->SetIapName(aSlpId,aIapName); |
|
311 } |
|
312 //------------------------------------------------------------------------------------- |
|
313 //CSuplSettings::GetIapName() |
|
314 // |
|
315 //This method is used to retrieve IAP Name in server parameters. |
|
316 //-------------------------------------------------------------------------------------- |
|
317 EXPORT_C TInt CSuplSettings::GetIapName( const TInt64 aSlpId, TDes& aIapName) const |
|
318 { |
|
319 return iSettingsEngine->GetIapName(aSlpId,aIapName); |
|
320 } |
|
321 //------------------------------------------------------------------------------------- |
|
322 //CSuplSettings::SetServerEnabledFlag() |
|
323 // |
|
324 //This method is used to change parameter which indicates whether server |
|
325 // can be used for SUPL session or not. |
|
326 //-------------------------------------------------------------------------------------- |
|
327 EXPORT_C TInt CSuplSettings::SetServerEnabledFlag( const TInt64 aSlpId, const TBool aEnable ) |
|
328 { |
|
329 return iSettingsEngine->SetServerEnabledFlag(aSlpId,aEnable); |
|
330 } |
|
331 //------------------------------------------------------------------------------------- |
|
332 //CSuplSettings::GetServerEnabledFlag() |
|
333 // |
|
334 //This method is used to retrieve parameter which indicates whether server |
|
335 // can be used for SUPL session or not. |
|
336 //-------------------------------------------------------------------------------------- |
|
337 EXPORT_C TInt CSuplSettings::GetServerEnabledFlag( const TInt64 aSlpId, TBool& aEnable ) const |
|
338 { |
|
339 return iSettingsEngine->GetServerEnabledFlag(aSlpId,aEnable ); |
|
340 } |
|
341 //------------------------------------------------------------------------------------- |
|
342 //CSuplSettings::SetSimChangeRemoveFlag() |
|
343 // |
|
344 //This method is used to change parameter which indicates whether server |
|
345 // details can be removed if SIM is changed. |
|
346 //-------------------------------------------------------------------------------------- |
|
347 EXPORT_C TInt CSuplSettings::SetSimChangeRemoveFlag( const TInt64 aSlpId, const TBool aSimChangeFlag ) |
|
348 { |
|
349 return iSettingsEngine->SetSimChangeRemoveFlag(aSlpId,aSimChangeFlag ); |
|
350 } |
|
351 //------------------------------------------------------------------------------------- |
|
352 //CSuplSettings::GetSimChangeRemoveFlag() |
|
353 // |
|
354 //This method is used to retrieve parameter which indicates whether server |
|
355 //details can be removed if SIM is changed. |
|
356 //-------------------------------------------------------------------------------------- |
|
357 EXPORT_C TInt CSuplSettings::GetSimChangeRemoveFlag( const TInt64 aSlpId, TBool& aSimChangeFlag ) const |
|
358 { |
|
359 return iSettingsEngine->GetSimChangeRemoveFlag(aSlpId,aSimChangeFlag ); |
|
360 } |
|
361 //------------------------------------------------------------------------------------- |
|
362 //CSuplSettings::SetUsageInHomwNwFlag() |
|
363 // |
|
364 //This method is used to change parameter which indicates whether server |
|
365 // can be used out side home network or not. |
|
366 //-------------------------------------------------------------------------------------- |
|
367 EXPORT_C TInt CSuplSettings::SetUsageInHomwNwFlag( const TInt64 aSlpId, const TBool aHomeNwFlag ) |
|
368 { |
|
369 return iSettingsEngine->SetUsageInHomwNwFlag(aSlpId,aHomeNwFlag ); |
|
370 } |
|
371 //------------------------------------------------------------------------------------- |
|
372 //CSuplSettings::GetUsageInHomwNwFlag() |
|
373 // |
|
374 //This method is used to retrieve parameter which indicates whether server |
|
375 //can be used out side home network or not. |
|
376 //-------------------------------------------------------------------------------------- |
|
377 EXPORT_C TInt CSuplSettings::GetUsageInHomwNwFlag( const TInt64 aSlpId, TBool& aHomeNwFlag ) const |
|
378 { |
|
379 return iSettingsEngine->GetUsageInHomwNwFlag(aSlpId,aHomeNwFlag ); |
|
380 } |
|
381 |
|
382 //------------------------------------------------------------------------------------- |
|
383 //CSuplSettings::SetEditableFlag() |
|
384 // |
|
385 //This method is used to change parameter which indicates whether server |
|
386 // details are editable or not. |
|
387 //-------------------------------------------------------------------------------------- |
|
388 EXPORT_C TInt CSuplSettings::SetEditableFlag( const TInt64 aSlpId, const TBool aEditFlag )const |
|
389 { |
|
390 return iSettingsEngine->SetEditableFlag(aSlpId,aEditFlag); |
|
391 } |
|
392 |
|
393 //------------------------------------------------------------------------------------- |
|
394 //CSuplSettings::GetEditableFlag() |
|
395 // |
|
396 //This method is used to retrieve parameter which indicates whether server |
|
397 //details are editable or not. |
|
398 //-------------------------------------------------------------------------------------- |
|
399 EXPORT_C TInt CSuplSettings::GetEditableFlag( const TInt64 aSlpId, TBool& aEditFlag ) const |
|
400 { |
|
401 return iSettingsEngine->GetEditableFlag(aSlpId,aEditFlag ); |
|
402 } |
|
403 //------------------------------------------------------------------------------------- |
|
404 //CSuplSettings::SetAllParameter() |
|
405 // |
|
406 //This method is used to change all parameters of server in SUPL settings. |
|
407 //-------------------------------------------------------------------------------------- |
|
408 EXPORT_C TInt CSuplSettings::SetAllParameter( |
|
409 const CServerParams* aParamValues) |
|
410 { |
|
411 return iSettingsEngine->SetAllParameter(aParamValues); |
|
412 } |
|
413 //------------------------------------------------------------------------------------- |
|
414 //CSuplSettings::SetDefaultServer() |
|
415 // |
|
416 //This method is used to change all parameters of default server in SUPL settings. |
|
417 //-------------------------------------------------------------------------------------- |
|
418 EXPORT_C TInt CSuplSettings::SetDefaultServer( |
|
419 const CServerParams* aParamValues) |
|
420 { |
|
421 return iSettingsEngine->SetDefaultServer(aParamValues); |
|
422 } |
|
423 //------------------------------------------------------------------------------------- |
|
424 //CSuplSettings::RemoveServer() |
|
425 // |
|
426 //This method is deletes server entry from SUPL settings storage. |
|
427 //-------------------------------------------------------------------------------------- |
|
428 EXPORT_C TInt CSuplSettings::RemoveServer(TInt64 aSlpId) |
|
429 { |
|
430 return iSettingsEngine->RemoveServer(aSlpId); |
|
431 } |
|
432 //------------------------------------------------------------------------------------- |
|
433 //CSuplSettings::ChangePriority() |
|
434 // |
|
435 //This method is changes the priority of the server to the specified priority. |
|
436 //-------------------------------------------------------------------------------------- |
|
437 EXPORT_C TInt CSuplSettings::ChangePriority(TInt64 aSlpId,TInt aPriority,TBool aDirection) |
|
438 { |
|
439 return iSettingsEngine->ChangePriority(aSlpId,aPriority,aDirection); |
|
440 } |
|
441 |
|
442 //------------------------------------------------------------------------------------- |
|
443 //CSuplSettings::GetSlpInfoFromId() |
|
444 // |
|
445 //This method is used to retrieve all properties of server from SUPL settings storage |
|
446 //based on SLP Id. |
|
447 //-------------------------------------------------------------------------------------- |
|
448 EXPORT_C TInt CSuplSettings::GetSlpInfoFromId( |
|
449 const TInt64 aSlpId, |
|
450 CServerParams* aParamValues) const |
|
451 { |
|
452 if(aParamValues == NULL) |
|
453 return KErrArgument; |
|
454 return iSettingsEngine->GetSlpInfoFromId(aSlpId,aParamValues); |
|
455 } |
|
456 //------------------------------------------------------------------------------------- |
|
457 //CSuplSettings::GetSlpInfoAddress() |
|
458 // |
|
459 //This method is used to retrieve all properties of server from SUPL settings storage |
|
460 //based on SLP address. |
|
461 //-------------------------------------------------------------------------------------- |
|
462 EXPORT_C TInt CSuplSettings::GetSlpInfoAddress(const TDesC& aServerAddress,CServerParams* aParamValues) const |
|
463 { |
|
464 if(aParamValues == NULL) |
|
465 return KErrArgument; |
|
466 return iSettingsEngine->GetSlpInfoAddress(aServerAddress,aParamValues); |
|
467 } |
|
468 |
|
469 |
|
470 //-------------------------------------------------------------------------------------- |
|
471 //CSuplSettings::GetDefaultServer() |
|
472 // |
|
473 //This method is used to retrieve all properties of default server from SUPL settings storage. |
|
474 //-------------------------------------------------------------------------------------- |
|
475 EXPORT_C TInt CSuplSettings::GetDefaultServer(CServerParams* aParamValues) const |
|
476 { |
|
477 return iSettingsEngine->GetDefaultServer(aParamValues); |
|
478 } |
|
479 |
|
480 //-------------------------------------------------------------------------------------- |
|
481 //CSuplSettings::SlpCount() |
|
482 // |
|
483 //This method is used to retrieve number of server entries present in SUPL settings. |
|
484 //-------------------------------------------------------------------------------------- |
|
485 |
|
486 EXPORT_C TInt CSuplSettings:: SlpCount(TInt& aCount ) |
|
487 { |
|
488 return iSettingsEngine->SlpCount(aCount); |
|
489 } |
|
490 |
|
491 //-------------------------------------------------------------------------------------- |
|
492 //CSuplSettings::IsSlpExists() |
|
493 // |
|
494 //This method is used check whether server entry exists or not based on SLP id |
|
495 //-------------------------------------------------------------------------------------- |
|
496 EXPORT_C TBool CSuplSettings::IsSlpExists(const TInt64 aSlpId) |
|
497 { |
|
498 return iSettingsEngine->IsSlpExists(aSlpId); |
|
499 } |
|
500 //-------------------------------------------------------------------------------------- |
|
501 //CSuplSettings::IsSlpExists() |
|
502 // |
|
503 //This method is used check whether server entry exists or not based on SLP address |
|
504 //-------------------------------------------------------------------------------------- |
|
505 EXPORT_C TBool CSuplSettings::IsSlpExists(const TDesC& aServerAddress) |
|
506 { |
|
507 return iSettingsEngine->IsSlpExists(aServerAddress); |
|
508 } |
|
509 //-------------------------------------------------------------------------------------- |
|
510 //CSuplSettings::GetAllSlp() |
|
511 // |
|
512 //This synchronous method is used to retrieve properties of all servers |
|
513 //from SUPL settings storage. |
|
514 //-------------------------------------------------------------------------------------- |
|
515 EXPORT_C TInt CSuplSettings::GetAllSlp(RPointerArray<CServerParams>& aParamValues) const |
|
516 { |
|
517 return iSettingsEngine->GetAllSlp(aParamValues); |
|
518 } |
|
519 //--------------------------------------------------------------------- |
|
520 // CSuplSettings::GetAllSlp() |
|
521 // |
|
522 // This method is used to retrieve properties of all servers from SUPL |
|
523 // settings storage. |
|
524 //--------------------------------------------------------------------- |
|
525 EXPORT_C TInt CSuplSettings::GetAllSlp(RPointerArray<CServerParams>& aParamValues,TRequestStatus& aStatus) const |
|
526 { |
|
527 return iSettingsEngine->GetAllSlp(aParamValues,aStatus); |
|
528 } |
|
529 |
|
530 //--------------------------------------------------------------------- |
|
531 // CSuplSettings::SetFallBack() |
|
532 // |
|
533 // This method enables or disables the fall back in SUPL settings. |
|
534 //--------------------------------------------------------------------- |
|
535 EXPORT_C TInt CSuplSettings::SetFallBack(TBool aFallBack) |
|
536 { |
|
537 return iSettingsEngine->SetFallBack(aFallBack); |
|
538 } |
|
539 //--------------------------------------------------------------------- |
|
540 // CSuplSettings::GetFallBack() |
|
541 // |
|
542 // This method retrieves the fallback value from SUPL settings storage. |
|
543 //--------------------------------------------------------------------- |
|
544 EXPORT_C TInt CSuplSettings::GetFallBack(TBool& aFallBack) const |
|
545 { |
|
546 return iSettingsEngine->GetFallBack(aFallBack); |
|
547 } |
|
548 |
|
549 //--------------------------------------------------------------------- |
|
550 // CSuplSettings::GetTriggerParams() |
|
551 // |
|
552 // This method is used to retrieve properties of all active triggers. |
|
553 //--------------------------------------------------------------------- |
|
554 EXPORT_C TInt CSuplSettings::GetTriggerParams( RPointerArray<CTriggerParams>& aParamValues ) const |
|
555 { |
|
556 return iSettingsEngine->GetTriggerParams(aParamValues); |
|
557 } |
|
558 |
|
559 //--------------------------------------------------------------------- |
|
560 // CSuplSettings::GetTriggerParams() |
|
561 // |
|
562 // This method is used to retrieve properties of a given session. |
|
563 //--------------------------------------------------------------------- |
|
564 EXPORT_C TInt CSuplSettings::GetTriggerParams( TInt64 aSessionId, |
|
565 CTriggerParams*& aParamValues ) const |
|
566 { |
|
567 if( aParamValues ) |
|
568 { |
|
569 return iSettingsEngine->GetTriggerParams(aSessionId,aParamValues); |
|
570 } |
|
571 return KErrArgument; |
|
572 |
|
573 } |
|
574 |
|
575 //--------------------------------------------------------------------- |
|
576 // CSuplSettings::SetNotificationStatus() |
|
577 // |
|
578 // Sets Notification status of particular session |
|
579 //--------------------------------------------------------------------- |
|
580 EXPORT_C TInt CSuplSettings::SetNotificationStatus( TInt64 aSessionId, |
|
581 TBool aTriggerNotificationStatus ) |
|
582 { |
|
583 return iSettingsEngine->SetNotificationStatus(aSessionId,aTriggerNotificationStatus); |
|
584 } |
|
585 //--------------------------------------------------------------------- |
|
586 // CSuplSettings::CancelTriggerSession() |
|
587 // |
|
588 // Cancels ongoing triggering session |
|
589 //--------------------------------------------------------------------- |
|
590 EXPORT_C TInt CSuplSettings::CancelTriggerSession( TInt64 aSessionId ) |
|
591 { |
|
592 return iSettingsEngine->CancelTriggerSession(aSessionId); |
|
593 } |
|
594 //--------------------------------------------------------------------- |
|
595 // CSuplSettings::GetDefaultIAPName() |
|
596 // |
|
597 // Returns the default configured IAP name |
|
598 //--------------------------------------------------------------------- |
|
599 EXPORT_C TInt CSuplSettings::GetDefaultIAPName(TDes& aIapName) |
|
600 { |
|
601 return iSettingsEngine->GetDefaultIAPName(aIapName); |
|
602 } |
|
603 // End of File |