|
1 /* |
|
2 * Copyright (c) 2009 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: Responsible for launching SUPL session details |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "lpdverifiersettinglauncher.h" |
|
21 |
|
22 // CONSTANTS |
|
23 const TInt KSettingsParamBufferLength = 64; |
|
24 |
|
25 // ================= MEMBER FUNCTIONS ======================= |
|
26 // ---------------------------------------------------------------------------- |
|
27 // CLmkLocSettingsLauncher::NewL |
|
28 // Two-phased constructor. |
|
29 // ---------------------------------------------------------------------------- |
|
30 // |
|
31 CLpdVerifierSettingsLauncher* CLpdVerifierSettingsLauncher:: NewL() |
|
32 { |
|
33 CLpdVerifierSettingsLauncher* self = new (ELeave) CLpdVerifierSettingsLauncher(); |
|
34 CleanupStack::PushL(self); |
|
35 self->ConstructL(); |
|
36 CleanupStack::Pop(); // self |
|
37 return self; |
|
38 } |
|
39 |
|
40 // ---------------------------------------------------------------------------- |
|
41 // CLmkLocSettingsLauncher::CLmkLocSettingsLauncher |
|
42 // ---------------------------------------------------------------------------- |
|
43 // |
|
44 CLpdVerifierSettingsLauncher::CLpdVerifierSettingsLauncher() |
|
45 : CActive( EPriorityStandard ) |
|
46 { |
|
47 } |
|
48 |
|
49 // ---------------------------------------------------------------------------- |
|
50 // CLpdVerifierSettingsLauncher::~CLpdVerifierSettingsLauncher |
|
51 // ---------------------------------------------------------------------------- |
|
52 // |
|
53 CLpdVerifierSettingsLauncher::~CLpdVerifierSettingsLauncher() |
|
54 { |
|
55 Cancel(); |
|
56 delete iClientLibrary; |
|
57 delete iLaunchParams; |
|
58 } |
|
59 |
|
60 // ---------------------------------------------------------------------------- |
|
61 // CLpdVerifierSettingsLauncher::ConstructL |
|
62 // ---------------------------------------------------------------------------- |
|
63 // |
|
64 void CLpdVerifierSettingsLauncher::ConstructL() |
|
65 { |
|
66 iClientLibrary = CLocSettingsUiClient::NewL(); |
|
67 iLaunchParams = HBufC::NewL( KSettingsParamBufferLength ); |
|
68 CActiveScheduler::Add( this ); |
|
69 } |
|
70 |
|
71 // ---------------------------------------------------------------------------- |
|
72 // CLpdVerifierSettingsLauncher::LaunchL |
|
73 // ---------------------------------------------------------------------------- |
|
74 // |
|
75 void CLpdVerifierSettingsLauncher::LaunchL( TInt aSessionId ) |
|
76 { |
|
77 Cancel(); |
|
78 iLaunchParams->Des().Zero(); |
|
79 iLaunchParams->Des().AppendNum( aSessionId ); |
|
80 iClientLibrary->LaunchSettingsUiAsEmbeddedAppL( TUid::Uid( KLocSUPLSettingsUID ), *iLaunchParams, iStatus ); |
|
81 SetActive(); |
|
82 } |
|
83 |
|
84 // ---------------------------------------------------------------------------- |
|
85 // CLpdVerifierSettingsLauncher::RunL |
|
86 // ---------------------------------------------------------------------------- |
|
87 // |
|
88 void CLpdVerifierSettingsLauncher::RunL() |
|
89 { |
|
90 switch( iStatus.Int()) |
|
91 { |
|
92 case KErrNone: |
|
93 { |
|
94 break; |
|
95 } |
|
96 case KErrCancel: |
|
97 { |
|
98 break; |
|
99 } |
|
100 default: |
|
101 { |
|
102 break; |
|
103 } |
|
104 } |
|
105 } |
|
106 |
|
107 // ---------------------------------------------------------------------------- |
|
108 // CLpdVerifierSettingsLauncher::DoCancel |
|
109 // ---------------------------------------------------------------------------- |
|
110 // |
|
111 void CLpdVerifierSettingsLauncher::DoCancel() |
|
112 { |
|
113 iClientLibrary->CancelLaunchedSettingsUi(); |
|
114 } |
|
115 |
|
116 // End of File |
|
117 |