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: GSFW plugin header for Presence Settings UI GS plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef PSUIGSPLUGIN_H |
|
22 #define PSUIGSPLUGIN_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <ConeResLoader.h> |
|
26 #include <coeview.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CPSUIGSPluginContainer; |
|
30 class CPSUIGSPluginModel; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 class CEikMenuPane; |
|
34 |
|
35 /** |
|
36 * Header of CPSUIGSPlugin which implements the CGSPluginInterface. |
|
37 * |
|
38 * @lib PSUIGSPlugin.lib |
|
39 * @since Series60_3.2 |
|
40 */ |
|
41 class CPSUIGSPlugin : |
|
42 public MCoeViewDeactivationObserver |
|
43 { |
|
44 |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Symbian OS two-phased constructor |
|
49 */ |
|
50 static CPSUIGSPlugin* NewL( TAny* aAppUi ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CPSUIGSPlugin(); |
|
56 |
|
57 private: // Functions from base classes |
|
58 |
|
59 /** |
|
60 * From CAknView |
|
61 * See base class. |
|
62 */ |
|
63 TUid Id() const; |
|
64 |
|
65 /** |
|
66 * From CAknView |
|
67 * See base class. |
|
68 */ |
|
69 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
70 TUid aCustomMessageId, |
|
71 const TDesC8& aCustomMessage ); |
|
72 |
|
73 /** |
|
74 * From CAknView |
|
75 * See base class. |
|
76 */ |
|
77 void DoDeactivate(); |
|
78 |
|
79 /** |
|
80 * From CAknView |
|
81 * See base class. |
|
82 */ |
|
83 void HandleCommandL( TInt aCommand ); |
|
84 |
|
85 /** |
|
86 * From MEikMenuObserver |
|
87 * See base class. |
|
88 */ |
|
89 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane *aMenuPane ); |
|
90 |
|
91 /** |
|
92 * From MCoeViewDeactivationObserver |
|
93 * Used to be able to free memory when plugin get's closed. |
|
94 * See base class. |
|
95 */ |
|
96 void HandleViewDeactivation ( |
|
97 const TVwsViewId& aViewIdToBeDeactivated, |
|
98 const TVwsViewId& aNewlyActivatedViewId ); |
|
99 |
|
100 public: // New |
|
101 |
|
102 /** |
|
103 * Gives a handle to PS Model. Ownership is not transferred. |
|
104 * |
|
105 * @return handle to PS Model |
|
106 */ |
|
107 CPSUIGSPluginModel* PSModel(); |
|
108 |
|
109 /** |
|
110 * Takes care of settings deletion. |
|
111 */ |
|
112 void DeleteSettingsL(); |
|
113 |
|
114 private: // New |
|
115 |
|
116 /** |
|
117 * Returns count and index of current item in listbox. |
|
118 * |
|
119 * @param aIndex returns the index. If no items, KErrNotFound. |
|
120 * @return TInt containing the count. |
|
121 */ |
|
122 TInt SettingCountAndIndex( TInt& aIndex ); |
|
123 |
|
124 /** |
|
125 * Shows the delete certain setting set confirmation note. |
|
126 * |
|
127 * @param aCount is the amount of all settings |
|
128 * @param aIndex is the to be deleted setting set |
|
129 * @return TBool about proceed with deletion. |
|
130 */ |
|
131 TBool AcceptDeletionL( TInt aCount, TInt aIndex ); |
|
132 |
|
133 /** |
|
134 * Constructs the setting view |
|
135 */ |
|
136 void ConstructSettingViewL(); |
|
137 |
|
138 /** |
|
139 * Removes the setting view |
|
140 */ |
|
141 void RemoveSettingView(); |
|
142 |
|
143 /** |
|
144 * Create new default settings and launch setting view |
|
145 */ |
|
146 void CreateNewDefaultSettingsL(); |
|
147 |
|
148 /** |
|
149 * Create new a copy of existing settings and launch setting view |
|
150 */ |
|
151 void CreateCopyOfExistingSettingsL(); |
|
152 |
|
153 /** |
|
154 * Toggles visibility of MSK depending on the amount of setting sets |
|
155 */ |
|
156 void UpdateMSK(); |
|
157 |
|
158 private: // Constructors |
|
159 |
|
160 /** |
|
161 * C++ default constructor. |
|
162 */ |
|
163 CPSUIGSPlugin(); |
|
164 |
|
165 /** |
|
166 * Symbian OS default constructor. |
|
167 */ |
|
168 void ConstructL(); |
|
169 |
|
170 private: // Data |
|
171 |
|
172 // Presence UI model |
|
173 CPSUIGSPluginModel* iPSModel; |
|
174 |
|
175 // Indicates when PSUIGSPlugin's views are closed |
|
176 TBool iClosing; |
|
177 // Previous view |
|
178 TVwsViewId iPSUIGSPrevViewId; |
|
179 }; |
|
180 |
|
181 #endif // PSUIGSPLUGIN_H |
|
182 // End of File |
|