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