|
1 /* |
|
2 * Copyright (c) 2002-2007 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 |
|
19 #include "AknNotifyPlugin.h" |
|
20 #include <AknNotifyStd.h> |
|
21 |
|
22 #include <eikenv.h> |
|
23 #include <eikspane.h> |
|
24 #include <avkon.hrh> |
|
25 #include <eikspane.h> |
|
26 #include <aknappui.h> |
|
27 |
|
28 #include <bautils.h> // For NearestLanguageFile |
|
29 #include <aknnotpi.rsg> |
|
30 |
|
31 #include <AknNotifySignature.h> |
|
32 #include <s32mem.h> |
|
33 #include <e32capability.h> |
|
34 #include <eiksrvsp.h> |
|
35 #include "aknstatuspanedatapublisher.h" |
|
36 |
|
37 const TInt KIndicatorTap = 0xFFFF; |
|
38 |
|
39 void CAknMediatorEvent::RaiseEvent(TInt aId, const TDesC8& aBuf ) |
|
40 { |
|
41 TInt err(0); |
|
42 if (iImpl) |
|
43 { |
|
44 if (iArray.Find(aId) == KErrNotFound) |
|
45 { |
|
46 err = iImpl->RegisterEvent( |
|
47 KMediatorSecondaryDisplayDomain, |
|
48 KAknSecondaryDisplayCategory, |
|
49 aId, |
|
50 TVersion(0,0,0), |
|
51 TCapabilitySet(ECapabilityReadDeviceData)); |
|
52 |
|
53 if (!err) |
|
54 { |
|
55 iArray.Append(aId); |
|
56 } |
|
57 } |
|
58 |
|
59 if (!err) |
|
60 { // ignore possible errors from now on... |
|
61 iImpl->RaiseEvent( |
|
62 KMediatorSecondaryDisplayDomain, |
|
63 KAknSecondaryDisplayCategory, |
|
64 aId, |
|
65 TVersion(0,0,0), |
|
66 aBuf); |
|
67 } |
|
68 } |
|
69 } |
|
70 |
|
71 NONSHARABLE_CLASS(CAknIndicatorData): public CBase |
|
72 { |
|
73 public: |
|
74 void HandleIndicatorChanged(TInt aIndicator, TInt aState) |
|
75 { |
|
76 TInt index = KErrNotFound; |
|
77 for (TInt i = 0; i < iArray.Count(); i++) |
|
78 { |
|
79 if (iArray[i].iIndicator == aIndicator) |
|
80 { |
|
81 index = i; |
|
82 break; |
|
83 } |
|
84 } |
|
85 if (index == KErrNotFound) |
|
86 { |
|
87 const SAknSmallIndicatorData data= |
|
88 { |
|
89 aIndicator, aState |
|
90 }; |
|
91 if (aState != EAknIndicatorStateOff) |
|
92 { |
|
93 iArray.Append(data); // ignore return value |
|
94 } |
|
95 } |
|
96 else |
|
97 { |
|
98 if (aState == EAknIndicatorStateOff) |
|
99 { |
|
100 iArray.Remove(index); |
|
101 } |
|
102 else |
|
103 { |
|
104 iArray[index].iIndicatorState = aState; |
|
105 } |
|
106 } |
|
107 } |
|
108 |
|
109 void ExternalizeL(RWriteStream& aStream) const |
|
110 { |
|
111 TInt count = iArray.Count(); |
|
112 aStream.WriteInt16L(count); |
|
113 for (TInt i = 0; i < count; i++) |
|
114 { |
|
115 aStream.WriteInt32L(iArray[i].iIndicator); |
|
116 aStream.WriteInt32L(iArray[i].iIndicatorState); |
|
117 } |
|
118 } |
|
119 |
|
120 ~CAknIndicatorData() |
|
121 { |
|
122 iArray.Close(); |
|
123 } |
|
124 |
|
125 RArray<SAknSmallIndicatorData> iArray; |
|
126 }; |
|
127 |
|
128 |
|
129 void CAknPopupNotifierSubject::Release() |
|
130 { |
|
131 delete this; |
|
132 } |
|
133 |
|
134 CAknPopupNotifierSubject::TNotifierInfo CAknPopupNotifierSubject::RegisterL() |
|
135 { |
|
136 iInfo.iUid=KAknPopupNotifierUid; |
|
137 iInfo.iChannel=KAknPopupNotifierUid; // made up uid |
|
138 iInfo.iPriority=ENotifierPriorityVHigh; |
|
139 return iInfo; |
|
140 } |
|
141 |
|
142 CAknPopupNotifierSubject::TNotifierInfo CAknPopupNotifierSubject::Info() const |
|
143 { |
|
144 return iInfo; |
|
145 } |
|
146 |
|
147 TPtrC8 CAknPopupNotifierSubject::StartL(const TDesC8& aBuffer) |
|
148 { |
|
149 PopupL(aBuffer); |
|
150 return KNullDesC8(); |
|
151 } |
|
152 |
|
153 void CAknPopupNotifierSubject::StartL(const TDesC8& aBuffer, TInt /*aReplySlot*/, |
|
154 const RMessagePtr2& aMessage) |
|
155 { |
|
156 PopupL(aBuffer); |
|
157 aMessage.Complete(EEikNotExtRequestCompleted); |
|
158 } |
|
159 |
|
160 void CAknPopupNotifierSubject::Cancel() |
|
161 { |
|
162 } |
|
163 |
|
164 TPtrC8 CAknPopupNotifierSubject::UpdateL(const TDesC8& aBuffer) |
|
165 { |
|
166 PopupL(aBuffer); |
|
167 return KNullDesC8(); |
|
168 } |
|
169 |
|
170 CAknPopupNotifierSubject* CAknPopupNotifierSubject::NewL() |
|
171 { |
|
172 CAknPopupNotifierSubject* self=new (ELeave) CAknPopupNotifierSubject(); |
|
173 CleanupStack::PushL(self); |
|
174 self->ConstructL(); |
|
175 CleanupStack::Pop(); |
|
176 return self; |
|
177 } |
|
178 |
|
179 CAknPopupNotifierSubject::CAknPopupNotifierSubject() |
|
180 { |
|
181 } |
|
182 |
|
183 void CAknPopupNotifierSubject::ConstructL() |
|
184 { |
|
185 } |
|
186 |
|
187 void CAknPopupNotifierSubject::PopupL(const TDesC8& aBuffer) |
|
188 { |
|
189 TPtrC msg(reinterpret_cast<const TUint16*>(aBuffer.Ptr()), aBuffer.Length()/2); |
|
190 CEikonEnv::Static()->InfoWinL(_L("popup"), msg); |
|
191 } |
|
192 |
|
193 void CAknSignalNotifierSubject::Release() |
|
194 { |
|
195 delete this; |
|
196 } |
|
197 |
|
198 CAknSignalNotifierSubject::TNotifierInfo CAknSignalNotifierSubject::RegisterL() |
|
199 { |
|
200 iInfo.iUid=KAknSignalNotifierUid; |
|
201 iInfo.iChannel=KAknSignalNotifierUid; |
|
202 iInfo.iPriority=ENotifierPriorityVHigh; |
|
203 return iInfo; |
|
204 } |
|
205 |
|
206 CAknSignalNotifierSubject::TNotifierInfo CAknSignalNotifierSubject::Info() const |
|
207 { |
|
208 return iInfo; |
|
209 } |
|
210 |
|
211 TPtrC8 CAknSignalNotifierSubject::StartL(const TDesC8& aBuffer) |
|
212 { |
|
213 HandleSignalMessageL(aBuffer); |
|
214 return KNullDesC8(); |
|
215 } |
|
216 |
|
217 void CAknSignalNotifierSubject::StartL(const TDesC8& aBuffer, TInt /*aReplySlot*/, |
|
218 const RMessagePtr2& aMessage) |
|
219 { |
|
220 HandleSignalMessageL(aBuffer); |
|
221 aMessage.Complete(EEikNotExtRequestCompleted); |
|
222 } |
|
223 |
|
224 void CAknSignalNotifierSubject::Cancel() |
|
225 { |
|
226 } |
|
227 |
|
228 TPtrC8 CAknSignalNotifierSubject::UpdateL(const TDesC8& aBuffer) |
|
229 { |
|
230 HandleSignalMessageL(aBuffer); |
|
231 return KNullDesC8(); |
|
232 } |
|
233 |
|
234 CAknSignalNotifierSubject* CAknSignalNotifierSubject::NewL(CAknMediatorEvent* aEvent) |
|
235 { |
|
236 CAknSignalNotifierSubject* self=new (ELeave) CAknSignalNotifierSubject(); |
|
237 CleanupStack::PushL(self); |
|
238 self->iEvent = aEvent; |
|
239 self->ConstructL(); |
|
240 CleanupStack::Pop(); |
|
241 return self; |
|
242 } |
|
243 |
|
244 CAknSignalNotifierSubject::CAknSignalNotifierSubject() |
|
245 { |
|
246 } |
|
247 |
|
248 CAknSignalNotifierSubject::~CAknSignalNotifierSubject() |
|
249 { |
|
250 } |
|
251 |
|
252 void CAknSignalNotifierSubject::ConstructL() |
|
253 { |
|
254 } |
|
255 |
|
256 void CAknSignalNotifierSubject::HandleSignalMessageL(const TDesC8& aBuffer) |
|
257 { |
|
258 SAknNotifierPackage<SAknSignalNotifyParams>* params = |
|
259 (SAknNotifierPackage<SAknSignalNotifyParams>*)aBuffer.Ptr(); |
|
260 |
|
261 if ( aBuffer.Length() < 0 |
|
262 || (TUint)aBuffer.Length() < sizeof(SAknNotifierPackage<SAknSignalNotifyParams>) |
|
263 || params->iSignature != KAKNNOTIFIERSIGNATURE ) |
|
264 { |
|
265 User::Leave( KErrArgument ); |
|
266 } |
|
267 SAknSignalNotifyParams sParams = params->iParamData; // safe |
|
268 |
|
269 CEikServStatusPane* ssp = static_cast<CEikServStatusPane*>(CEikStatusPaneBase::Current()); |
|
270 CAknStatusPaneDataPublisher* publisher = ssp->iDataPublisher; |
|
271 |
|
272 if ( sParams.iValue != EAknSignalStateNotChanged ) |
|
273 { |
|
274 publisher->SetSignalLevel(params->iParamData.iValue); |
|
275 } |
|
276 |
|
277 if ( sParams.iGprsState != EAknSignalGprsIndicatorBgTypeWipe && |
|
278 sParams.iGprsState != EAknNaviPaneBackgroundTypeSolid && |
|
279 sParams.iGprsState >= 0 ) |
|
280 { |
|
281 publisher->SetSignalIcon( sParams.iGprsState ); |
|
282 } |
|
283 |
|
284 publisher->PublishDataL(); |
|
285 |
|
286 TPckgBuf<SAknSignalNotifyParams> buf(sParams); |
|
287 iEvent->RaiseEvent(EAknSignalIndicatorSDInfo, buf ); |
|
288 } |
|
289 |
|
290 void CAknBatteryNotifierSubject::Release() |
|
291 { |
|
292 delete this; |
|
293 } |
|
294 |
|
295 CAknBatteryNotifierSubject::TNotifierInfo CAknBatteryNotifierSubject::RegisterL() |
|
296 { |
|
297 iInfo.iUid=KAknBatteryNotifierUid; |
|
298 iInfo.iChannel=KAknBatteryNotifierUid; |
|
299 iInfo.iPriority=ENotifierPriorityVHigh; |
|
300 return iInfo; |
|
301 } |
|
302 |
|
303 CAknBatteryNotifierSubject::TNotifierInfo CAknBatteryNotifierSubject::Info() const |
|
304 { |
|
305 return iInfo; |
|
306 } |
|
307 |
|
308 TPtrC8 CAknBatteryNotifierSubject::StartL(const TDesC8& aBuffer) |
|
309 { |
|
310 HandleBatteryMessageL(aBuffer); |
|
311 return KNullDesC8(); |
|
312 } |
|
313 |
|
314 void CAknBatteryNotifierSubject::StartL(const TDesC8& aBuffer, TInt /*aReplySlot*/, |
|
315 const RMessagePtr2& aMessage) |
|
316 { |
|
317 HandleBatteryMessageL(aBuffer); |
|
318 aMessage.Complete(EEikNotExtRequestCompleted); |
|
319 } |
|
320 |
|
321 void CAknBatteryNotifierSubject::Cancel() |
|
322 { |
|
323 } |
|
324 |
|
325 TPtrC8 CAknBatteryNotifierSubject::UpdateL(const TDesC8& aBuffer) |
|
326 { |
|
327 HandleBatteryMessageL(aBuffer); |
|
328 return KNullDesC8(); |
|
329 } |
|
330 |
|
331 CAknBatteryNotifierSubject* CAknBatteryNotifierSubject::NewL(CAknMediatorEvent* aEvent) |
|
332 { |
|
333 CAknBatteryNotifierSubject* self=new (ELeave) CAknBatteryNotifierSubject(); |
|
334 CleanupStack::PushL(self); |
|
335 self->iEvent = aEvent; |
|
336 self->ConstructL(); |
|
337 CleanupStack::Pop(); |
|
338 return self; |
|
339 } |
|
340 |
|
341 CAknBatteryNotifierSubject::CAknBatteryNotifierSubject() |
|
342 { |
|
343 } |
|
344 |
|
345 CAknBatteryNotifierSubject::~CAknBatteryNotifierSubject() |
|
346 { |
|
347 } |
|
348 |
|
349 void CAknBatteryNotifierSubject::ConstructL() |
|
350 { |
|
351 } |
|
352 |
|
353 void CAknBatteryNotifierSubject::HandleBatteryMessageL(const TDesC8& aBuffer) |
|
354 { |
|
355 SAknNotifierPackage<SAknBatteryNotifyParams>* params = |
|
356 (SAknNotifierPackage<SAknBatteryNotifyParams>*)aBuffer.Ptr(); |
|
357 |
|
358 if ( aBuffer.Length() < 0 |
|
359 || (TUint)aBuffer.Length() < sizeof(SAknNotifierPackage<SAknBatteryNotifyParams>) |
|
360 || params->iSignature != KAKNNOTIFIERSIGNATURE ) |
|
361 { |
|
362 User::Leave( KErrArgument ); |
|
363 } |
|
364 |
|
365 CEikServStatusPane* ssp = static_cast<CEikServStatusPane*>(CEikStatusPaneBase::Current()); |
|
366 CAknStatusPaneDataPublisher* publisher = ssp->iDataPublisher; |
|
367 switch ( params->iParamData.iType ) |
|
368 { |
|
369 case SAknBatteryNotifyParams::ESetValue: |
|
370 { |
|
371 publisher->SetBatteryLevel(params->iParamData.iValue); |
|
372 break; |
|
373 } |
|
374 case SAknBatteryNotifyParams::ERecharge: |
|
375 { |
|
376 publisher->SetRecharge(ETrue); |
|
377 break; |
|
378 } |
|
379 case SAknBatteryNotifyParams::EStopRecharge: |
|
380 { |
|
381 publisher->SetRecharge(EFalse); |
|
382 break; |
|
383 } |
|
384 case SAknBatteryNotifyParams::ENoRecharge: |
|
385 { |
|
386 publisher->SetRecharge(EFalse); |
|
387 break; |
|
388 } |
|
389 case SAknBatteryNotifyParams::ESetState: |
|
390 { |
|
391 publisher->SetBatteryIcon( params->iParamData.iBatteryState ); |
|
392 break; |
|
393 } |
|
394 default: |
|
395 break; |
|
396 } |
|
397 publisher->PublishDataL(); |
|
398 |
|
399 TPckgBuf<SAknBatteryNotifyParams> buf(params->iParamData ); |
|
400 iEvent->RaiseEvent(EAknBatteryIndicatorSDInfo, buf); |
|
401 } |
|
402 |
|
403 TInt CAknBatteryNotifierSubject::TickerCallback(TAny* aThis) |
|
404 { |
|
405 return static_cast<CAknBatteryNotifierSubject*>(aThis)->DoTick(); |
|
406 } |
|
407 |
|
408 TInt CAknBatteryNotifierSubject::DoTick() |
|
409 { |
|
410 return ETrue; |
|
411 } |
|
412 |
|
413 void CAknSmallIndicatorSubject::Release() |
|
414 { |
|
415 delete this; |
|
416 } |
|
417 |
|
418 CAknSmallIndicatorSubject::TNotifierInfo CAknSmallIndicatorSubject::RegisterL() |
|
419 { |
|
420 iInfo.iUid=KAknSmallIndicatorUid; |
|
421 iInfo.iChannel=KAknSmallIndicatorUid; |
|
422 iInfo.iPriority=ENotifierPriorityVHigh; |
|
423 return iInfo; |
|
424 } |
|
425 |
|
426 CAknSmallIndicatorSubject::TNotifierInfo CAknSmallIndicatorSubject::Info() const |
|
427 { |
|
428 return iInfo; |
|
429 } |
|
430 |
|
431 TPtrC8 CAknSmallIndicatorSubject::StartL(const TDesC8& aBuffer) |
|
432 { |
|
433 HandleIndicatorMessageL(aBuffer); |
|
434 return KNullDesC8(); |
|
435 } |
|
436 |
|
437 void CAknSmallIndicatorSubject::StartL(const TDesC8& aBuffer, TInt /*aReplySlot*/, |
|
438 const RMessagePtr2& aMessage) |
|
439 { |
|
440 HandleIndicatorMessageL(aBuffer); |
|
441 aMessage.Complete(EEikNotExtRequestCompleted); |
|
442 } |
|
443 |
|
444 void CAknSmallIndicatorSubject::Cancel() |
|
445 { |
|
446 } |
|
447 |
|
448 TPtrC8 CAknSmallIndicatorSubject::UpdateL(const TDesC8& aBuffer) |
|
449 { |
|
450 HandleIndicatorMessageL(aBuffer); |
|
451 return KNullDesC8(); |
|
452 } |
|
453 |
|
454 CAknSmallIndicatorSubject* CAknSmallIndicatorSubject::NewL(CAknMediatorEvent* aEvent) |
|
455 { |
|
456 CAknSmallIndicatorSubject* self=new (ELeave) CAknSmallIndicatorSubject(); |
|
457 CleanupStack::PushL(self); |
|
458 self->ConstructL(); |
|
459 self->iEvent = aEvent; // do not store until leaving methods are clear |
|
460 CleanupStack::Pop(); |
|
461 return self; |
|
462 } |
|
463 |
|
464 CAknSmallIndicatorSubject::CAknSmallIndicatorSubject() |
|
465 { |
|
466 } |
|
467 |
|
468 CAknSmallIndicatorSubject::~CAknSmallIndicatorSubject() |
|
469 { |
|
470 delete iIndicatorSDData; |
|
471 delete iEvent; // bit nasty, but does not have really effect even if not deleted at all |
|
472 } |
|
473 |
|
474 |
|
475 void CAknSmallIndicatorSubject::ConstructL() |
|
476 { |
|
477 iIndicatorSDData = new (ELeave) CAknIndicatorData(); |
|
478 } |
|
479 |
|
480 void CAknSmallIndicatorSubject::HandleIndicatorMessageL(const TDesC8& aBuffer) |
|
481 { |
|
482 SAknNotifierPackage<SAknSmallIndicatorParams>* params = |
|
483 (SAknNotifierPackage<SAknSmallIndicatorParams>*)aBuffer.Ptr(); |
|
484 |
|
485 if ( aBuffer.Length() < 0 |
|
486 || (TUint)aBuffer.Length() < sizeof(SAknNotifierPackage<SAknSmallIndicatorParams>) |
|
487 || params->iSignature != KAKNNOTIFIERSIGNATURE ) |
|
488 { |
|
489 User::Leave( KErrArgument ); |
|
490 } |
|
491 |
|
492 CEikServStatusPane* ssp = static_cast<CEikServStatusPane*>(CEikStatusPaneBase::Current()); |
|
493 CAknStatusPaneDataPublisher* publisher = ssp->iDataPublisher; |
|
494 |
|
495 if (params->iParamData.iValue == KIndicatorTap) |
|
496 { |
|
497 publisher->HandleIndicatorTapL(params->iParamData.iSmallIndicatorUid); |
|
498 } |
|
499 else |
|
500 { |
|
501 publisher->SetIndicatorState(params->iParamData.iSmallIndicatorUid, params->iParamData.iValue); |
|
502 publisher->PublishDataL(); |
|
503 |
|
504 // publish current indicator status to coverui |
|
505 iIndicatorSDData->HandleIndicatorChanged( |
|
506 params->iParamData.iSmallIndicatorUid.iUid, |
|
507 params->iParamData.iValue); |
|
508 |
|
509 CBufFlat* buf = CBufFlat::NewL(5); |
|
510 CleanupStack::PushL(buf); |
|
511 RBufWriteStream stream; |
|
512 stream.Open(*buf); |
|
513 CleanupClosePushL(stream); |
|
514 stream << *iIndicatorSDData; |
|
515 stream.CommitL(); |
|
516 CleanupStack::PopAndDestroy(); // close stream |
|
517 |
|
518 iEvent->RaiseEvent(EAknSmallIndicatorSDInfo, buf->Ptr(0) ); |
|
519 CleanupStack::PopAndDestroy(buf); |
|
520 } |
|
521 } |
|
522 |
|
523 void CAknIncallBubbleSubject::Release() |
|
524 { |
|
525 delete this; |
|
526 } |
|
527 |
|
528 |
|
529 CAknIncallBubbleSubject::TNotifierInfo CAknIncallBubbleSubject::RegisterL() |
|
530 { |
|
531 iInfo.iUid=KAknIncallBubbleUid; |
|
532 iInfo.iChannel=KAknIncallBubbleUid; |
|
533 iInfo.iPriority=ENotifierPriorityVHigh; |
|
534 return iInfo; |
|
535 } |
|
536 |
|
537 CAknIncallBubbleSubject::TNotifierInfo CAknIncallBubbleSubject::Info() const |
|
538 { |
|
539 return iInfo; |
|
540 } |
|
541 |
|
542 TPtrC8 CAknIncallBubbleSubject::StartL(const TDesC8& aBuffer) |
|
543 { |
|
544 HandleIndicatorMessageL( aBuffer, 0 ); |
|
545 return KNullDesC8(); |
|
546 } |
|
547 |
|
548 void CAknIncallBubbleSubject::StartL(const TDesC8& aBuffer, TInt /*aReplySlot*/, |
|
549 const RMessagePtr2& aMessage) |
|
550 { |
|
551 RThread clientThread; |
|
552 TUint64 clientId = 0; |
|
553 if ( KErrNone == aMessage.Client( clientThread ) ) |
|
554 { |
|
555 clientId = clientThread.Id().Id(); |
|
556 } |
|
557 clientThread.Close(); |
|
558 HandleIndicatorMessageL( aBuffer, clientId ); |
|
559 aMessage.Complete(EEikNotExtRequestCompleted); |
|
560 } |
|
561 |
|
562 void CAknIncallBubbleSubject::Cancel() |
|
563 { |
|
564 } |
|
565 |
|
566 TPtrC8 CAknIncallBubbleSubject::UpdateL(const TDesC8& aBuffer) |
|
567 { |
|
568 HandleIndicatorMessageL(aBuffer,0); |
|
569 return KNullDesC8(); |
|
570 } |
|
571 |
|
572 CAknIncallBubbleSubject* CAknIncallBubbleSubject::NewL() |
|
573 { |
|
574 CAknIncallBubbleSubject* self=new (ELeave) CAknIncallBubbleSubject(); |
|
575 CleanupStack::PushL(self); |
|
576 self->ConstructL(); |
|
577 CleanupStack::Pop(); |
|
578 return self; |
|
579 } |
|
580 |
|
581 CAknIncallBubbleSubject::CAknIncallBubbleSubject() |
|
582 { |
|
583 } |
|
584 |
|
585 void CAknIncallBubbleSubject::ConstructL() |
|
586 { |
|
587 } |
|
588 |
|
589 void CAknIncallBubbleSubject::HandleIndicatorMessageL( const TDesC8& aBuffer , const TUint64& aClientId ) |
|
590 { |
|
591 SAknNotifierPackage<SAknIncallBubbleParams>* params = |
|
592 (SAknNotifierPackage<SAknIncallBubbleParams>*)aBuffer.Ptr(); |
|
593 |
|
594 if ( aBuffer.Length() < 0 |
|
595 || (TUint)aBuffer.Length() < sizeof(SAknNotifierPackage<SAknIncallBubbleParams>) |
|
596 || params->iSignature != KAKNNOTIFIERSIGNATURE ) |
|
597 { |
|
598 User::Leave( KErrArgument ); |
|
599 } |
|
600 |
|
601 CEikServStatusPane* ssp = static_cast<CEikServStatusPane*>(CEikStatusPaneBase::Current()); |
|
602 CAknStatusPaneDataPublisher* publisher = ssp->iDataPublisher; |
|
603 TInt flags = params->iParamData.iIncallBubbleFlags; |
|
604 if ( flags & EAknStatusBubbleReservedInternal ) |
|
605 { |
|
606 if (flags & 4) |
|
607 { |
|
608 publisher->SetIncallBubbleAllowedInUsual( ETrue , aClientId ); |
|
609 } |
|
610 else if (flags & 2) |
|
611 { |
|
612 publisher->SetIncallBubbleAllowedInUsual( EFalse , aClientId ); |
|
613 } |
|
614 else if (flags & 1) |
|
615 { |
|
616 publisher->SetIncallBubbleAllowedInIdle( ETrue ); |
|
617 } |
|
618 else |
|
619 { |
|
620 publisher->SetIncallBubbleAllowedInIdle( EFalse ); |
|
621 } |
|
622 } |
|
623 else |
|
624 { |
|
625 publisher->SetIncallBubbleFlags( flags ); |
|
626 } |
|
627 |
|
628 publisher->PublishDataL(); |
|
629 } |
|
630 |
|
631 |