|
1 /* |
|
2 * Copyright (c) 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: Location Notation Preferences Plugin View's container |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_LOCNOTPREFPLUGIN_H_ |
|
19 #define C_LOCNOTPREFPLUGIN_H_ |
|
20 |
|
21 // System Includes |
|
22 #include <ConeResLoader.h> |
|
23 |
|
24 // User Includes |
|
25 #include "locsettingsui.h" |
|
26 |
|
27 // Classes referenced |
|
28 class MLocSettingsUiObserver; |
|
29 class CAknViewAppUi; |
|
30 class CLocNotPrefPluginView; |
|
31 |
|
32 // Constant Definition |
|
33 /** |
|
34 * |
|
35 * Location Notation Preferences plug-in RSC file name |
|
36 */ |
|
37 _LIT( KLocNotPrefUiResFileName, "locnotprefpluginview.rsc" ); |
|
38 |
|
39 // Class Definition |
|
40 |
|
41 /** |
|
42 * CLocNotPrefPlugin |
|
43 * |
|
44 * Location Notation Preferences plug-in. |
|
45 */ |
|
46 class CLocNotPrefPlugin : public CLocSettingsUi |
|
47 { |
|
48 |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Symbian OS two-phased constructor |
|
53 * |
|
54 * @param aParam Generic parameter structure to the Settings UI plug-in |
|
55 * @return |
|
56 */ |
|
57 static CLocNotPrefPlugin* NewL( TAny* aParam ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 ~CLocNotPrefPlugin(); |
|
63 |
|
64 /** |
|
65 * Inherited from CSettingsUi |
|
66 * Launches the Settings UI |
|
67 * |
|
68 * @param aUiLaunchParams Flags that define specific configuration of |
|
69 * if the Settings UI, that the user of the API |
|
70 * wants to launch. If more than one functionality |
|
71 * is requested then the various combinations |
|
72 * are to be ORed. The interpretation of these |
|
73 * flag values is a part of the understanding |
|
74 * between the API user and the Settings UI |
|
75 */ |
|
76 void LaunchL( TInt aUiLaunchParams ); |
|
77 |
|
78 /** |
|
79 * Inherited from CSettingsUi |
|
80 * Closes the running Settings UI prematurely. |
|
81 */ |
|
82 void Close(); |
|
83 |
|
84 /** |
|
85 * Inherited from CSettingsUi |
|
86 * Method for getting caption of this plugin. This should be the |
|
87 * localized name of the settings view to be shown in parent view. |
|
88 * |
|
89 * @param aCaption pointer to Caption variable |
|
90 */ |
|
91 void GetCaptionL( TDes& aCaption ) const; |
|
92 |
|
93 /** |
|
94 * Inherited from CSettingsUi |
|
95 * Returns the priority of the UI module. |
|
96 * |
|
97 * @return Priority of the Settings UI |
|
98 */ |
|
99 TInt GetPriority(); |
|
100 |
|
101 private: |
|
102 /** |
|
103 * C++ default constructor. |
|
104 */ |
|
105 CLocNotPrefPlugin( MLocSettingsUiObserver& aSettingsUiObserver, |
|
106 CAknViewAppUi& aAppUi ); |
|
107 |
|
108 /** |
|
109 * Second phase constructor. |
|
110 */ |
|
111 void ConstructL(); |
|
112 |
|
113 /** |
|
114 * Opens the nearest localized resourcefile using aResourceLoader. |
|
115 * aResourceLoader should be opened only once before closing it. |
|
116 * Otherwise it will raise a panic. Therefore it is better to have |
|
117 * multiple resource loaders. |
|
118 * |
|
119 * @param aResourceFileName Drive and name of resource file in format |
|
120 * <path>:<rsc_file_name> |
|
121 * @param aResourceLoader Resource loader for the resource. The loader |
|
122 * must not be opened allready or it will raise |
|
123 * a panic. It is caller's responsibility to |
|
124 * close the resource loader after using the |
|
125 * resource. |
|
126 */ |
|
127 void OpenLocalizedResourceFileL( const TDesC& aResourceFileName, |
|
128 RConeResourceLoader& aResourceLoader ); |
|
129 |
|
130 |
|
131 private: |
|
132 /** |
|
133 * Resource Loader handle for handling Location Notation preferences settings' |
|
134 * specific resources |
|
135 */ |
|
136 RConeResourceLoader iResourceLoader; |
|
137 |
|
138 /** |
|
139 * Location Notation preferences view |
|
140 * Owns |
|
141 */ |
|
142 CLocNotPrefPluginView* iView; |
|
143 |
|
144 /** |
|
145 * Location Notation preferences view Id |
|
146 */ |
|
147 TUid iViewId; |
|
148 }; |
|
149 |
|
150 #endif // C_LOCNOTPREFPLUGIN_H_ |