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: Header file for plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PROFILESGSTONESPLUGIN_H |
|
20 #define PROFILESGSTONESPLUGIN_H |
|
21 |
|
22 // Includes |
|
23 #include <GSPluginInterface.h> |
|
24 #include <coneresloader.h> |
|
25 #include <MProfileViewHandler.h> |
|
26 #include <MProfileChangeObserver.h> |
|
27 |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CProfileSettingsContainer; |
|
31 class CProfileGSTonesTopControl; |
|
32 class CProfilesGSTonesPluginSettingsHandler; |
|
33 class CProfileEngineHandler; |
|
34 class MProfilesLocalFeatures; |
|
35 class CProfileChangeNotifyHandler; |
|
36 class CProfileNaviPaneContainer; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 |
|
41 /** |
|
42 * This interceptor control sits on top of the component stack. Its only purpose |
|
43 * is to route focus events to CProfileSettingsContainer. Key events are not |
|
44 * handled at all, they just fall through this component. |
|
45 */ |
|
46 NONSHARABLE_CLASS( CProfileGSTonesTopControl ) : public CCoeControl |
|
47 { |
|
48 public: |
|
49 |
|
50 static CProfileGSTonesTopControl* NewL( CCoeControl* aFocusControl ); |
|
51 void FocusChanged( TDrawNow aDrawNow ); |
|
52 |
|
53 private: |
|
54 CCoeControl* iFocusControl; |
|
55 }; |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 /** |
|
61 * CProfilesGSTonesPlugin view class. |
|
62 * |
|
63 * @since Series60_3.1 |
|
64 */ |
|
65 class CProfilesGSTonesPlugin : public CGSPluginInterface, |
|
66 public MProfileChangeObserver, |
|
67 public MProfileViewHandler |
|
68 { |
|
69 public: // Constructors and destructor |
|
70 |
|
71 /** |
|
72 * Symbian OS two-phased constructor |
|
73 * @return |
|
74 */ |
|
75 static CProfilesGSTonesPlugin* NewL( TAny* aInitParams ); |
|
76 |
|
77 /** |
|
78 * Destructor. |
|
79 */ |
|
80 ~CProfilesGSTonesPlugin(); |
|
81 |
|
82 public: // From CAknView |
|
83 |
|
84 /** |
|
85 * See base class. |
|
86 */ |
|
87 TUid Id() const; |
|
88 |
|
89 /** |
|
90 * See base class. |
|
91 */ |
|
92 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
93 TUid aCustomMessageId, |
|
94 const TDesC8& aCustomMessage ); |
|
95 /** |
|
96 * See base class. |
|
97 */ |
|
98 void DoDeactivate(); |
|
99 |
|
100 /** |
|
101 * See base class. |
|
102 */ |
|
103 void HandleCommandL( TInt aCommand ); |
|
104 |
|
105 /** |
|
106 * See base class. |
|
107 */ |
|
108 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
109 |
|
110 public: // From CGSPluginInterface |
|
111 |
|
112 /** |
|
113 * See base class. |
|
114 */ |
|
115 void GetCaptionL( TDes& aCaption ) const; |
|
116 |
|
117 /** |
|
118 * See base class. |
|
119 */ |
|
120 TGSListboxItemTypes ItemType(); |
|
121 |
|
122 /** |
|
123 * See base class. |
|
124 */ |
|
125 TInt PluginProviderCategory() const; |
|
126 |
|
127 /** |
|
128 * From MProfileChangeObserver |
|
129 */ |
|
130 void HandleActiveProfileEventL( |
|
131 TProfileEvent aProfileEvent, TInt aProfileId ); |
|
132 |
|
133 /** |
|
134 * From MProfileViewHandler |
|
135 */ |
|
136 virtual void UpdateClientRect(); |
|
137 |
|
138 /** |
|
139 * From MProfileViewHandler |
|
140 */ |
|
141 virtual CAknView& View(); |
|
142 |
|
143 protected: // New functions |
|
144 |
|
145 /** |
|
146 * Shows the information note with the text found from the given |
|
147 * resource. |
|
148 * @param aResourceId The ID of the resource containing the text to be |
|
149 * shown. |
|
150 */ |
|
151 void ShowInfoNoteL( TInt aResourceId ); |
|
152 |
|
153 protected: // Constructors |
|
154 /** |
|
155 * C++ default constructor. |
|
156 */ |
|
157 CProfilesGSTonesPlugin(); |
|
158 |
|
159 /** |
|
160 * Symbian OS default constructor. |
|
161 */ |
|
162 void ConstructL(); |
|
163 |
|
164 private: // Data |
|
165 |
|
166 // Resource loader. |
|
167 RConeResourceLoader iResourceLoader; |
|
168 |
|
169 /// Own: Container for the profile settings |
|
170 CProfileSettingsContainer* iContainer; |
|
171 |
|
172 /// Own: control needed to get the focus on listbox |
|
173 CProfileGSTonesTopControl* iTopControl; |
|
174 |
|
175 /// Own: handler for the settings external to Profiles |
|
176 CProfilesGSTonesPluginSettingsHandler* iSettingsHandler; |
|
177 |
|
178 /// Own: handler for Profiles Engine |
|
179 CProfileEngineHandler* iEngineHandler; |
|
180 |
|
181 // Own: Profile change notify handler. |
|
182 CProfileChangeNotifyHandler* iNotifier; |
|
183 |
|
184 // Own: Navi pane container. |
|
185 CProfileNaviPaneContainer* iNaviPaneContainer; |
|
186 |
|
187 // The ID of the previously active profile |
|
188 TInt iPreviousProfile; |
|
189 }; |
|
190 |
|
191 |
|
192 #endif // PROFILESGSTONESPLUGIN_H |
|
193 |
|
194 // End of File |
|
195 |
|