13 * |
13 * |
14 * Description: Handles publishing to title pane. |
14 * Description: Handles publishing to title pane. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 // System includes |
19 #include <StringLoader.h> |
19 #include <StringLoader.h> |
20 #include <AiNativeUi.rsg> |
20 #include <AiNativeUi.rsg> |
21 #include <gulicon.h> |
21 #include <gulicon.h> |
|
22 |
|
23 // User includes |
|
24 #include <hscontentpublisher.h> |
|
25 #include <hspublisherinfo.h> |
|
26 |
22 #include "aititlepanerenderer.h" |
27 #include "aititlepanerenderer.h" |
23 #include "aistatuspanel.h" |
28 #include "aistatuspanel.h" |
24 #include "aipropertyextension.h" |
29 |
25 #include <aicontentrequest.h> |
30 #include <aicontentrequest.h> |
26 #include "ainativeuiplugins.h" |
31 #include "ainativeuiplugins.h" |
27 #include "debug.h" |
32 #include "debug.h" |
28 |
33 |
29 using namespace AiNativeUiController; |
34 using namespace AiNativeUiController; |
30 |
35 |
31 |
36 // ======== MEMBER FUNCTIONS ======== |
|
37 // ---------------------------------------------------------------------------- |
|
38 // CAiTitlePaneRenderer::ConstructL() |
|
39 // |
|
40 // ---------------------------------------------------------------------------- |
|
41 // |
32 void CAiTitlePaneRenderer::ConstructL() |
42 void CAiTitlePaneRenderer::ConstructL() |
33 { |
43 { |
34 } |
44 } |
35 |
45 |
36 |
46 // ---------------------------------------------------------------------------- |
37 CAiTitlePaneRenderer* CAiTitlePaneRenderer::NewLC( CAiStatusPanel& aStatusPanel ) |
47 // CAiTitlePaneRenderer::NewLC() |
38 { |
48 // |
39 CAiTitlePaneRenderer* self = new( ELeave ) CAiTitlePaneRenderer( aStatusPanel ); |
49 // ---------------------------------------------------------------------------- |
|
50 // |
|
51 CAiTitlePaneRenderer* CAiTitlePaneRenderer::NewLC( |
|
52 CAiStatusPanel& aStatusPanel ) |
|
53 { |
|
54 CAiTitlePaneRenderer* self = |
|
55 new( ELeave ) CAiTitlePaneRenderer( aStatusPanel ); |
|
56 |
40 CleanupStack::PushL( self ); |
57 CleanupStack::PushL( self ); |
41 self->ConstructL(); |
58 self->ConstructL(); |
42 return self; |
59 return self; |
43 } |
60 } |
44 |
61 |
45 |
62 // ---------------------------------------------------------------------------- |
|
63 // CAiTitlePaneRenderer::CAiTitlePaneRenderer() |
|
64 // |
|
65 // ---------------------------------------------------------------------------- |
|
66 // |
46 CAiTitlePaneRenderer::~CAiTitlePaneRenderer() |
67 CAiTitlePaneRenderer::~CAiTitlePaneRenderer() |
47 { |
68 { |
48 } |
69 } |
49 |
70 |
50 |
71 // ---------------------------------------------------------------------------- |
|
72 // CAiTitlePaneRenderer::CAiTitlePaneRenderer() |
|
73 // |
|
74 // ---------------------------------------------------------------------------- |
|
75 // |
51 CAiTitlePaneRenderer::CAiTitlePaneRenderer( CAiStatusPanel& aStatusPanel ) |
76 CAiTitlePaneRenderer::CAiTitlePaneRenderer( CAiStatusPanel& aStatusPanel ) |
52 : iStatusPanel( aStatusPanel ) |
77 : iStatusPanel( aStatusPanel ) |
53 { |
78 { |
54 } |
79 } |
55 |
80 |
56 |
81 // ---------------------------------------------------------------------------- |
57 |
82 // CAiTitlePaneRenderer::DoPublishL() |
58 |
83 // |
59 void CAiTitlePaneRenderer::DoPublishL( MAiPropertyExtension& aPlugin, |
84 // ---------------------------------------------------------------------------- |
60 TInt aContent, |
85 // |
61 const TDesC16& aText, |
86 void CAiTitlePaneRenderer::DoPublishL( CHsContentPublisher& aPlugin, |
62 TInt /*aIndex*/ ) |
87 TInt aContent, const TDesC16& aText, TInt /*aIndex*/ ) |
63 { |
88 { |
64 if( aPlugin.PublisherInfoL()->iUid == KDeviceStatusPluginUid ) |
89 const THsPublisherInfo& info( aPlugin.PublisherInfo() ); |
|
90 |
|
91 if( info.Uid() == KDeviceStatusPluginUid ) |
65 { |
92 { |
66 switch( aContent ) |
93 switch( aContent ) |
67 { |
94 { |
68 case EAiDeviceStatusContentNetworkIdentity: |
95 case EAiDeviceStatusContentNetworkIdentity: |
69 { |
96 { |
87 { |
114 { |
88 User::Leave( KErrNotFound ); |
115 User::Leave( KErrNotFound ); |
89 } |
116 } |
90 } |
117 } |
91 |
118 |
92 void CAiTitlePaneRenderer::DoPublishL( MAiPropertyExtension& aPlugin, |
119 // ---------------------------------------------------------------------------- |
93 TInt aContent, |
120 // CAiTitlePaneRenderer::DoPublishL() |
94 const TDesC8& aBuf, |
121 // |
95 TInt /*aIndex*/ ) |
122 // ---------------------------------------------------------------------------- |
96 { |
123 // |
97 if( aPlugin.PublisherInfoL()->iUid == KDeviceStatusPluginUid ) |
124 void CAiTitlePaneRenderer::DoPublishL( CHsContentPublisher& aPlugin, |
|
125 TInt aContent, const TDesC8& aBuf, TInt /*aIndex*/ ) |
|
126 { |
|
127 const THsPublisherInfo& info( aPlugin.PublisherInfo() ); |
|
128 |
|
129 if( info.Uid() == KDeviceStatusPluginUid ) |
98 { |
130 { |
99 switch( aContent ) |
131 switch( aContent ) |
100 { |
132 { |
101 case EAiDeviceStatusContentNetworkIdentity: |
133 case EAiDeviceStatusContentNetworkIdentity: |
102 { |
134 { |
133 { |
165 { |
134 User::Leave( KErrNotFound ); |
166 User::Leave( KErrNotFound ); |
135 } |
167 } |
136 } |
168 } |
137 |
169 |
138 void CAiTitlePaneRenderer::DoPublishL( MAiPropertyExtension& aPlugin, |
170 // ---------------------------------------------------------------------------- |
139 TInt aContent, |
171 // CAiTitlePaneRenderer::DoPublishL() |
140 TInt aResource, |
172 // |
141 TInt /*aIndex*/ ) |
173 // ---------------------------------------------------------------------------- |
142 { |
174 // |
143 if( aPlugin.PublisherInfoL()->iUid == KDeviceStatusPluginUid ) |
175 void CAiTitlePaneRenderer::DoPublishL( CHsContentPublisher& aPlugin, |
|
176 TInt aContent, TInt aResource, TInt /*aIndex*/ ) |
|
177 { |
|
178 const THsPublisherInfo& info( aPlugin.PublisherInfo() ); |
|
179 |
|
180 if( info.Uid() == KDeviceStatusPluginUid ) |
144 { |
181 { |
145 switch( aContent ) |
182 switch( aContent ) |
146 { |
183 { |
147 case EAiDeviceStatusContentNetworkIdentity: |
184 case EAiDeviceStatusContentNetworkIdentity: |
148 { |
185 { |
166 { |
203 { |
167 User::Leave( KErrNotFound ); |
204 User::Leave( KErrNotFound ); |
168 } |
205 } |
169 } |
206 } |
170 |
207 |
171 |
208 // ---------------------------------------------------------------------------- |
172 void CAiTitlePaneRenderer::DoCleanL( MAiPropertyExtension& aPlugin, TInt aContent ) |
209 // CAiTitlePaneRenderer::DoCleanL() |
|
210 // |
|
211 // ---------------------------------------------------------------------------- |
|
212 // |
|
213 void CAiTitlePaneRenderer::DoCleanL( CHsContentPublisher& aPlugin, |
|
214 TInt aContent ) |
173 { |
215 { |
174 __PRINT(__DBG_FORMAT("XAI: Clean title pane - %d"), aContent ); |
216 __PRINT(__DBG_FORMAT("XAI: Clean title pane - %d"), aContent ); |
175 if( aPlugin.PublisherInfoL()->iUid == KDeviceStatusPluginUid ) |
217 |
|
218 const THsPublisherInfo& info( aPlugin.PublisherInfo() ); |
|
219 |
|
220 if( info.Uid() == KDeviceStatusPluginUid ) |
176 { |
221 { |
177 switch( aContent ) |
222 switch( aContent ) |
178 { |
223 { |
179 case EAiDeviceStatusContentNetworkIdentity: |
224 case EAiDeviceStatusContentNetworkIdentity: |
180 { |
225 { |
197 { |
242 { |
198 User::Leave( KErrNotFound ); |
243 User::Leave( KErrNotFound ); |
199 } |
244 } |
200 } |
245 } |
201 |
246 |
|
247 // ---------------------------------------------------------------------------- |
|
248 // CAiTitlePaneRenderer::TransactionCommittedL() |
|
249 // |
|
250 // ---------------------------------------------------------------------------- |
|
251 // |
202 void CAiTitlePaneRenderer::TransactionCommittedL() |
252 void CAiTitlePaneRenderer::TransactionCommittedL() |
203 { |
253 { |
204 } |
254 } |
205 |
255 |
|
256 // ---------------------------------------------------------------------------- |
|
257 // CAiTitlePaneRenderer::KeylockEnabledL() |
|
258 // |
|
259 // ---------------------------------------------------------------------------- |
|
260 // |
206 void CAiTitlePaneRenderer::KeylockEnabledL() |
261 void CAiTitlePaneRenderer::KeylockEnabledL() |
207 { |
262 { |
208 iStatusPanel.StopTitlePaneScrollingL(); |
263 iStatusPanel.StopTitlePaneScrollingL(); |
209 } |
264 } |
210 |
265 |
|
266 // ---------------------------------------------------------------------------- |
|
267 // CAiTitlePaneRenderer::FocusObtainedL() |
|
268 // |
|
269 // ---------------------------------------------------------------------------- |
|
270 // |
211 void CAiTitlePaneRenderer::FocusObtainedL() |
271 void CAiTitlePaneRenderer::FocusObtainedL() |
212 { |
272 { |
213 iStatusPanel.RenderTitlePaneL(); |
273 iStatusPanel.RenderTitlePaneL(); |
214 } |
274 } |
215 |
275 |
|
276 // ---------------------------------------------------------------------------- |
|
277 // CAiTitlePaneRenderer::FocusLostL() |
|
278 // |
|
279 // ---------------------------------------------------------------------------- |
|
280 // |
216 void CAiTitlePaneRenderer::FocusLostL() |
281 void CAiTitlePaneRenderer::FocusLostL() |
217 { |
282 { |
218 iStatusPanel.StopTitlePaneScrollingL(); |
283 iStatusPanel.StopTitlePaneScrollingL(); |
219 } |
284 } |
|
285 |
|
286 // End of file |