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: Postioning Method Settings UI plugin to the Location System |
|
15 * UI engine |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef C_LOCPSYSETTINGSUI_H_ |
|
21 #define C_LOCPSYSETTINGSUI_H_ |
|
22 |
|
23 // User Includes |
|
24 #include "locsettingsui.h" |
|
25 #include "locpsycommandhandler.h" |
|
26 |
|
27 // System Includes |
|
28 #include <ConeResLoader.h> |
|
29 #include <data_caging_path_literals.hrh> |
|
30 |
|
31 // Forward Declarations |
|
32 class MLocSettingsUiObserver; |
|
33 class CAknViewAppUi; |
|
34 class CLocPsySettingsView; |
|
35 |
|
36 // Global constants |
|
37 |
|
38 /** |
|
39 * Position Method Settings RSC file name |
|
40 */ |
|
41 _LIT( KPosSettingsUiResFileName, "locpsysettingsuiview.rsc" ); |
|
42 |
|
43 /** |
|
44 * Position Method Settings UI plugin |
|
45 * |
|
46 * The Positioning Method Settings UI is implemented as an ECom plug-in |
|
47 * that plugs into the Location System UI Engine ECom interface. It |
|
48 * implements the settings view and functionalities for configuring PSYs. |
|
49 * It also provides a plug-in interface for sub-settings UIs (like PSY |
|
50 * specific Configuration UIs) to get included into the settings hierarchy. |
|
51 * It uses the Location framework for retrieving the location settings. |
|
52 */ |
|
53 class CLocPsySettingsUi : public CLocSettingsUi, |
|
54 public MLocPsyCommandHandler |
|
55 { |
|
56 public: |
|
57 /** |
|
58 * Symbian OS two-phased constructor |
|
59 * @return |
|
60 */ |
|
61 static CLocPsySettingsUi* NewL( TAny* aParams ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 virtual ~CLocPsySettingsUi(); |
|
67 |
|
68 public: |
|
69 /** |
|
70 * Inherited from CLocSettingsUi |
|
71 * Launches the Settings UI |
|
72 * |
|
73 * @param aUiLaunchParams Flags that define specific configuration of |
|
74 * if the Settings UI, that the user of the API |
|
75 * wants to launch. |
|
76 */ |
|
77 void LaunchL( TInt aUiLaunchParams ); |
|
78 |
|
79 /** |
|
80 * Inherited from CLocSettingsUi |
|
81 * Closes the running Settings UI prematurely. |
|
82 * |
|
83 */ |
|
84 void Close(); |
|
85 |
|
86 /** |
|
87 * Inherited from CLocSettingsUi |
|
88 * Method for getting caption of this plugin. This should be the |
|
89 * localized name of the settings view to be shown in parent view. |
|
90 * |
|
91 * @param aCaption pointer to Caption variable |
|
92 */ |
|
93 void GetCaptionL( TDes& aCaption ) const; |
|
94 |
|
95 /** |
|
96 * Inherited from CLocSettingsUi |
|
97 * Returns the priority of the UI module. |
|
98 * |
|
99 * |
|
100 * @return Priority of the Settings UI |
|
101 */ |
|
102 TInt GetPriority(); |
|
103 |
|
104 /** |
|
105 * Inherited from MLocPsyCommandHandler |
|
106 * Handles commands from the views |
|
107 * |
|
108 * @param aCommand Command ID |
|
109 */ |
|
110 void HandleCommandL( TInt aCommand ); |
|
111 |
|
112 private: |
|
113 /** |
|
114 * C++ default constructor. |
|
115 */ |
|
116 CLocPsySettingsUi( MLocSettingsUiObserver& aSettingsUiObserver, |
|
117 CAknViewAppUi& aAppUi ); |
|
118 |
|
119 /** |
|
120 * Second phase constructor. |
|
121 */ |
|
122 void ConstructL(); |
|
123 |
|
124 |
|
125 /** |
|
126 * Opens the nearest localized resourcefile using aResourceLoader. |
|
127 * aResourceLoader should be opened only once before closing it. |
|
128 * Otherwise it will raise a panic. Therefore it is better to have |
|
129 * multiple resource loaders. |
|
130 * |
|
131 * @param aResourceFileName Drive and name of resource file in format |
|
132 * <path>:<rsc_file_name> |
|
133 * @param aResourceLoader Resource loader for the resource. The loader |
|
134 * must not be opened allready or it will raise |
|
135 * a panic. It is caller's responsibility to |
|
136 * close the resource loader after using the |
|
137 * resource. |
|
138 */ |
|
139 void OpenLocalizedResourceFileL( const TDesC& aResourceFileName, |
|
140 RConeResourceLoader& aResourceLoader ); |
|
141 |
|
142 private: |
|
143 /** |
|
144 * View of the View that was active before this view was launched |
|
145 */ |
|
146 RConeResourceLoader iResourceLoader; |
|
147 |
|
148 /** |
|
149 * Reference to the Position Method Settings View |
|
150 * Owns |
|
151 */ |
|
152 CLocPsySettingsView* iView; |
|
153 |
|
154 /** |
|
155 * View Id for Position Method Settings View |
|
156 */ |
|
157 TUid iViewId; |
|
158 |
|
159 }; |
|
160 |
|
161 #endif // C_LOCPSYSETTINGSUI_H_ |
|