|
1 /* |
|
2 * Copyright (c) 2002-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: Responsible for launching positioning settings |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "evtmgmtuilocsettinglauncher.h" |
|
20 #include "evtmgmtuilocsettinglauncherobserver.h" |
|
21 |
|
22 // ---------------------------------------------------------------------------- |
|
23 // CLmkLocSettingsLauncher::NewL |
|
24 // Two-phased constructor. |
|
25 // ---------------------------------------------------------------------------- |
|
26 // |
|
27 CEvtMgmtUiLocSettingsLauncher* CEvtMgmtUiLocSettingsLauncher:: NewL() |
|
28 { |
|
29 CEvtMgmtUiLocSettingsLauncher* self = new (ELeave) CEvtMgmtUiLocSettingsLauncher(); |
|
30 CleanupStack::PushL(self); |
|
31 self->ConstructL(); |
|
32 CleanupStack::Pop(); // self |
|
33 return self; |
|
34 } |
|
35 |
|
36 // ---------------------------------------------------------------------------- |
|
37 // CLmkLocSettingsLauncher::CLmkLocSettingsLauncher |
|
38 // ---------------------------------------------------------------------------- |
|
39 // |
|
40 CEvtMgmtUiLocSettingsLauncher::CEvtMgmtUiLocSettingsLauncher() |
|
41 : CActive( EPriorityStandard ) |
|
42 { |
|
43 } |
|
44 |
|
45 // ---------------------------------------------------------------------------- |
|
46 // CEvtMgmtUiLocSettingsLauncher::~CEvtMgmtUiLocSettingsLauncher |
|
47 // ---------------------------------------------------------------------------- |
|
48 // |
|
49 CEvtMgmtUiLocSettingsLauncher::~CEvtMgmtUiLocSettingsLauncher() |
|
50 { |
|
51 Cancel(); |
|
52 delete iClientLibrary; |
|
53 } |
|
54 |
|
55 // ---------------------------------------------------------------------------- |
|
56 // CEvtMgmtUiLocSettingsLauncher::ConstructL |
|
57 // ---------------------------------------------------------------------------- |
|
58 // |
|
59 void CEvtMgmtUiLocSettingsLauncher::ConstructL() |
|
60 { |
|
61 iClientLibrary = CLocSettingsUiClient::NewL(); |
|
62 CActiveScheduler::Add( this ); |
|
63 } |
|
64 |
|
65 // ---------------------------------------------------------------------------- |
|
66 // CEvtMgmtUiLocSettingsLauncher::LaunchL |
|
67 // It is used to cancel launching of position settings. |
|
68 // ---------------------------------------------------------------------------- |
|
69 // |
|
70 void CEvtMgmtUiLocSettingsLauncher::LaunchL() |
|
71 { |
|
72 iClientLibrary->LaunchPosSettingsAsEmbeddedAppL( iStatus ); |
|
73 SetActive(); |
|
74 } |
|
75 |
|
76 // ---------------------------------------------------------------------------- |
|
77 // CEvtMgmtUiLocSettingsLauncher::SetObserver |
|
78 // It is used to set observer which will get notification |
|
79 // after completion of operation. |
|
80 // ---------------------------------------------------------------------------- |
|
81 // |
|
82 void CEvtMgmtUiLocSettingsLauncher::SetObserver( MEvtMgmtUiLocSettingsLauncherObserver* aObserver ) |
|
83 { |
|
84 iObserver = aObserver; |
|
85 } |
|
86 |
|
87 // ---------------------------------------------------------------------------- |
|
88 // CEvtMgmtUiLocSettingsLauncher::RunL |
|
89 // Derived from CActive |
|
90 // ---------------------------------------------------------------------------- |
|
91 // |
|
92 void CEvtMgmtUiLocSettingsLauncher::RunL() |
|
93 { |
|
94 //notify observer completion of operation. |
|
95 if(iObserver) |
|
96 iObserver->NotifyLocSettingLaucherChangeL( iStatus.Int() ); |
|
97 } |
|
98 |
|
99 // ---------------------------------------------------------------------------- |
|
100 // CEvtMgmtUiLocSettingsLauncher::DoCancel |
|
101 // Derived from CActive |
|
102 // ---------------------------------------------------------------------------- |
|
103 // |
|
104 void CEvtMgmtUiLocSettingsLauncher::DoCancel() |
|
105 { |
|
106 iClientLibrary->ClosePosSettings(); |
|
107 } |
|
108 |
|
109 // End of File |
|
110 |