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: Presence Settings UI's setting view. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef PSUIGSPLUGINSETTINGVIEW_H |
|
22 #define PSUIGSPLUGINSETTINGVIEW_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <aknview.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CPSUIGSPluginContainer; |
|
29 class CPSUIGSPluginSettingViewContainer; |
|
30 class CPSUIGSPlugin; |
|
31 |
|
32 const TUid KPreSettingViewId = {313}; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Header of CPSUIGSPluginSettingView. |
|
38 * |
|
39 * @lib PSUIGSPlugin.lib |
|
40 * @since Series60_3.2 |
|
41 */ |
|
42 class CPSUIGSPluginSettingView : |
|
43 public CAknView |
|
44 { |
|
45 |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Symbian OS two-phased constructor |
|
50 */ |
|
51 static CPSUIGSPluginSettingView* NewL( CPSUIGSPlugin* aMainView ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CPSUIGSPluginSettingView(); |
|
57 |
|
58 private: // Functions from base classes |
|
59 |
|
60 /** |
|
61 * From CAknView |
|
62 * See base class. |
|
63 */ |
|
64 TUid Id() const; |
|
65 |
|
66 /** |
|
67 * From CAknView |
|
68 * See base class. |
|
69 */ |
|
70 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
71 TUid aCustomMessageId, |
|
72 const TDesC8& aCustomMessage ); |
|
73 |
|
74 /** |
|
75 * From CAknView |
|
76 * See base class. |
|
77 */ |
|
78 void DoDeactivate(); |
|
79 |
|
80 /** |
|
81 * From CAknView |
|
82 * See base class. |
|
83 */ |
|
84 void HandleCommandL( TInt aCommand ); |
|
85 |
|
86 /** |
|
87 * From CAknView |
|
88 * See base class. |
|
89 */ |
|
90 void HandleViewRectChange(); |
|
91 |
|
92 public : // New |
|
93 |
|
94 /** |
|
95 * Gives a handle to plugin main view. Ownership is not transferred. |
|
96 * |
|
97 * @return handle to plugin main view |
|
98 */ |
|
99 CPSUIGSPlugin* MainView(); |
|
100 |
|
101 /** |
|
102 * Uses model to check if name is a duplicate and if it |
|
103 * is shows a note. |
|
104 * |
|
105 * @return TBool about if duplicates were found |
|
106 */ |
|
107 TBool HandleDuplicatePSNamesL(); |
|
108 |
|
109 private: // New |
|
110 |
|
111 /** |
|
112 * Creates the setting view container |
|
113 * |
|
114 * @param none |
|
115 */ |
|
116 void CreateContainerL(); |
|
117 |
|
118 /** |
|
119 * Handles back-key presses. Checks if all compulsory |
|
120 * fields are filled and if there is duplicates. Based on |
|
121 * this saves and switches view back to main view. |
|
122 */ |
|
123 void HandleBackKeyL(); |
|
124 |
|
125 /** |
|
126 * Handles saving funtionality when Exit is chosen from Menu. |
|
127 * Checks if all compulsory fields are filled and in case of |
|
128 * duplicate changes name, after this saves settings. |
|
129 */ |
|
130 void HandleMenuExitL(); |
|
131 |
|
132 private: // Constructors |
|
133 |
|
134 /** |
|
135 * C++ default constructor. |
|
136 */ |
|
137 CPSUIGSPluginSettingView( CPSUIGSPlugin* aMainView ); |
|
138 |
|
139 /** |
|
140 * Symbian OS default constructor. |
|
141 */ |
|
142 void ConstructL(); |
|
143 |
|
144 private: // Data |
|
145 |
|
146 // Previous view ID |
|
147 TVwsViewId iPrevViewId; |
|
148 // Pointer to application UI. |
|
149 CAknViewAppUi* iAppUi; |
|
150 // Presence setting view container |
|
151 CPSUIGSPluginSettingViewContainer* iPSUIContainer; |
|
152 // Handle to main view |
|
153 CPSUIGSPlugin* iMainView; // not owned |
|
154 }; |
|
155 |
|
156 #endif // PSUIGSPLUGINSETTINGVIEW_H |
|
157 // End of File |
|