|
1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HSCONTENTCONTROLUI_H |
|
19 #define HSCONTENTCONTROLUI_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 #include <ecom/ecom.h> |
|
24 |
|
25 // Forward declarations |
|
26 class MHsContentController; |
|
27 class CAknView; |
|
28 |
|
29 /** |
|
30 * Content control UI interface |
|
31 * |
|
32 * |
|
33 * @code |
|
34 * |
|
35 * @endcode |
|
36 * |
|
37 * @lib hscontentcontrol.lib |
|
38 * @since S60 v5.0 |
|
39 */ |
|
40 class MHsContentControlUi |
|
41 { |
|
42 public: |
|
43 /** |
|
44 * |
|
45 */ |
|
46 virtual void Activate() = 0; |
|
47 |
|
48 /** |
|
49 * |
|
50 */ |
|
51 virtual void DeActivate() = 0; |
|
52 |
|
53 /** |
|
54 * |
|
55 */ |
|
56 virtual void Views( RPointerArray<CAknView>& aViews ) = 0; |
|
57 |
|
58 /** |
|
59 * |
|
60 */ |
|
61 virtual void NotifyWidgetListChanged() = 0; |
|
62 |
|
63 /** |
|
64 * |
|
65 */ |
|
66 virtual void NotifyViewListChanged() = 0; |
|
67 |
|
68 /** |
|
69 * |
|
70 */ |
|
71 virtual void NotifyAppListChanged() = 0; |
|
72 |
|
73 /** |
|
74 * |
|
75 */ |
|
76 virtual void SetContentController( MHsContentController* aController ) = 0; |
|
77 }; |
|
78 |
|
79 /** |
|
80 * Content control UI base class |
|
81 * |
|
82 * |
|
83 * @code |
|
84 * |
|
85 * @endcode |
|
86 * |
|
87 * @lib hscontentcontrol.lib |
|
88 * @since S60 v5.0 |
|
89 */ |
|
90 class CHsContentControlUi : public CBase, public MHsContentControlUi |
|
91 { |
|
92 public: |
|
93 /** |
|
94 * Two-phased constructor. |
|
95 * @param aImplUid Requested implementation UID |
|
96 */ |
|
97 IMPORT_C static CHsContentControlUi* NewL( |
|
98 TUid aImplUid ); |
|
99 |
|
100 /** |
|
101 * Destructor. |
|
102 */ |
|
103 inline ~CHsContentControlUi(); |
|
104 |
|
105 public: // From MHsContentControlUi |
|
106 /** |
|
107 * |
|
108 */ |
|
109 inline void Activate(); |
|
110 |
|
111 /** |
|
112 * |
|
113 */ |
|
114 inline void DeActivate(); |
|
115 |
|
116 /** |
|
117 * |
|
118 */ |
|
119 inline void Views( RPointerArray<CAknView>& aViews ); |
|
120 |
|
121 /** |
|
122 * |
|
123 */ |
|
124 inline void NotifyWidgetListChanged(); |
|
125 |
|
126 /** |
|
127 * |
|
128 */ |
|
129 inline void NotifyViewListChanged(); |
|
130 |
|
131 /** |
|
132 * |
|
133 */ |
|
134 inline void NotifyAppListChanged(); |
|
135 |
|
136 /** |
|
137 * |
|
138 */ |
|
139 void SetContentController( |
|
140 MHsContentController* aController ); |
|
141 |
|
142 |
|
143 public: // New functions |
|
144 |
|
145 /** |
|
146 * |
|
147 */ |
|
148 TUid ImplUid() const; |
|
149 |
|
150 /** |
|
151 * |
|
152 */ |
|
153 void SetContentControlTypeL( |
|
154 const TDesC8& aContentControlType ); |
|
155 |
|
156 /** |
|
157 * |
|
158 */ |
|
159 const TDesC8& ContentControlType() const; |
|
160 |
|
161 protected: // Data |
|
162 |
|
163 /** |
|
164 * |
|
165 */ |
|
166 MHsContentController* iHsContentController; |
|
167 |
|
168 private: // Data |
|
169 |
|
170 /** |
|
171 * |
|
172 */ |
|
173 TUid iDestructKey; |
|
174 |
|
175 /** |
|
176 * |
|
177 */ |
|
178 TUid iImplUid; |
|
179 |
|
180 /** |
|
181 * |
|
182 */ |
|
183 HBufC8* iContentControlType; |
|
184 |
|
185 }; |
|
186 |
|
187 inline CHsContentControlUi::~CHsContentControlUi() |
|
188 { |
|
189 delete iContentControlType; |
|
190 REComSession::DestroyedImplementation( iDestructKey ); |
|
191 } |
|
192 |
|
193 inline void CHsContentControlUi::Activate() |
|
194 { |
|
195 // Default implementation of MHsContentControlUi method |
|
196 } |
|
197 inline void CHsContentControlUi::DeActivate() |
|
198 { |
|
199 // Default implementation of MHsContentControlUi method |
|
200 } |
|
201 inline void CHsContentControlUi::Views( |
|
202 RPointerArray<CAknView>& /*aViews*/ ) |
|
203 { |
|
204 // Default implementation of MHsContentControlUi method |
|
205 } |
|
206 inline void CHsContentControlUi::NotifyWidgetListChanged() |
|
207 { |
|
208 // Default implementation of MHsContentControlUi method |
|
209 } |
|
210 inline void CHsContentControlUi::NotifyViewListChanged() |
|
211 { |
|
212 // Default implementation of MHsContentControlUi method |
|
213 } |
|
214 inline void CHsContentControlUi::NotifyAppListChanged() |
|
215 { |
|
216 // Default implementation of MHsContentControlUi method |
|
217 } |
|
218 |
|
219 inline void CHsContentControlUi::SetContentController( |
|
220 MHsContentController* aController ) |
|
221 { |
|
222 iHsContentController = aController; |
|
223 } |
|
224 |
|
225 #endif // HSCONTENTCONTROLUI_H |
|
226 // End of file |