1 /* |
1 /* |
2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
29 #include <AknMediatorFacade.h> // Not the best for the purpose but will do just fine. |
29 #include <AknMediatorFacade.h> // Not the best for the purpose but will do just fine. |
30 #include <secondarydisplay/AknSecondaryDisplayDefs.h> |
30 #include <secondarydisplay/AknSecondaryDisplayDefs.h> |
31 #include <AknNotify.h> |
31 #include <AknNotify.h> |
32 #include "AknSystemPopup.h" |
32 #include "AknSystemPopup.h" |
33 #include "AknGroupedNotifierNote.h" |
33 #include "AknGroupedNotifierNote.h" |
34 #include "AknNotifierControllerPlugin.h" |
|
35 #include "aknprivatesoftnotificationparameters.h" |
34 #include "aknprivatesoftnotificationparameters.h" |
36 #include "aknmessagereaderlongpressdetector.h" // MAknGroupedNoteObserver |
35 #include "aknmessagereaderlongpressdetector.h" // MAknGroupedNoteObserver |
37 |
36 |
38 class CAknSmsViewerLauncher; |
37 class CAknSmsViewerLauncher; |
39 class RDesReadStream; |
38 class RDesReadStream; |
67 * Soft notification plugin to EikSrv. |
66 * Soft notification plugin to EikSrv. |
68 */ |
67 */ |
69 NONSHARABLE_CLASS(CAknSoftNotificationSubject) : |
68 NONSHARABLE_CLASS(CAknSoftNotificationSubject) : |
70 public CBase, |
69 public CBase, |
71 public MEikSrvNotifierBase2, |
70 public MEikSrvNotifierBase2, |
72 public MAknGroupedNotifierNoteObserver, |
71 public MAknGroupedNotifierNoteObserver, |
73 public MAknKeyLockObserver, |
|
74 public MSoftNotificationObserver, |
72 public MSoftNotificationObserver, |
75 public MAknMessageNotifierObserver |
73 public MAknMessageNotifierObserver |
76 { |
74 { |
77 public: // Constructors and destructor |
75 public: // Constructors and destructor |
78 static CAknSoftNotificationSubject* NewL( |
76 static CAknSoftNotificationSubject* NewL( |
79 MAknKeyLockController* aKeyLockObserver, |
77 CAknGlobalNoteSubject* aGlobalNoteController ); |
80 CAknGlobalNoteSubject* aGlobalNoteController); |
|
81 |
78 |
82 public: // Functions from base classes |
79 public: // Functions from base classes |
83 /** |
|
84 * From MAknKeyLockController |
|
85 * Called when the status of keylock changes. |
|
86 * |
|
87 * @param aStatus the new status of the keylock. |
|
88 */ |
|
89 virtual void KeyLockStatusChange(TKeyLockStatus aStatus); |
|
90 |
80 |
91 /** |
81 /** |
92 * From MEikSrvNotifierBase. |
82 * From MEikSrvNotifierBase. |
93 * Method to release the EikSrv plugin |
83 * Method to release the EikSrv plugin |
94 */ |
84 */ |
220 |
210 |
221 /** |
211 /** |
222 * The constructor is private. |
212 * The constructor is private. |
223 */ |
213 */ |
224 CAknSoftNotificationSubject( |
214 CAknSoftNotificationSubject( |
225 MAknKeyLockController* aKeyLockObserver, |
215 CAknGlobalNoteSubject* aGlobalNoteController ); |
226 CAknGlobalNoteSubject* aGlobalNoteController); |
|
227 |
216 |
228 void HandleNotifierMessageL(const TDesC8& aBuffer, TInt& aNoteId ); |
217 void HandleNotifierMessageL(const TDesC8& aBuffer, TInt& aNoteId ); |
229 |
218 |
230 /** |
219 /** |
231 * The following method is called after the notifier has been started to reflect the changes |
220 * The following method is called after the notifier has been started to reflect the changes |
282 */ |
271 */ |
283 void ReportUserActivity(); |
272 void ReportUserActivity(); |
284 |
273 |
285 TBool CheckIfAlreadyExists(TAknSoftNotificationType aType); |
274 TBool CheckIfAlreadyExists(TAknSoftNotificationType aType); |
286 |
275 |
287 TBool AutoLockEnabled(); |
|
288 |
|
289 void SetNcnFlag(TBool aValue); |
276 void SetNcnFlag(TBool aValue); |
290 static TInt HandleNcnFlagStateChange(TAny *aPtr); |
277 static TInt HandleNcnFlagStateChange(TAny *aPtr); |
291 |
278 |
292 void HandleCustomNoteCompletedL(CCustomNotifParams* aParams, TInt aCommand); |
279 void HandleCustomNoteCompletedL(CCustomNotifParams* aParams, TInt aCommand); |
293 |
280 |
299 */ |
286 */ |
300 void HandleCustomNoteCanceledL( CCustomNotifParams* aParams, TInt aCommand ); |
287 void HandleCustomNoteCanceledL( CCustomNotifParams* aParams, TInt aCommand ); |
301 |
288 |
302 private: // Data |
289 private: // Data |
303 TNotifierInfo iInfo; |
290 TNotifierInfo iInfo; |
304 MAknKeyLockController* iKeyLockController; |
291 |
305 CAknGlobalNoteSubject* iGlobalNoteController; |
292 CAknGlobalNoteSubject* iGlobalNoteController; |
306 |
293 |
307 // The array keeps track of unselected soft notifications in priority order. |
294 // The array keeps track of unselected soft notifications in priority order. |
308 TInt iSoftNotificationAmounts[EMaxSoftNotification]; |
295 TInt iSoftNotificationAmounts[EMaxSoftNotification]; |
309 |
296 |
349 |
336 |
350 private: // New member data. |
337 private: // New member data. |
351 TBool iNotificationsSaved; |
338 TBool iNotificationsSaved; |
352 CIdle* iIdle; |
339 CIdle* iIdle; |
353 static TInt SetIdleStateFalse(TAny* aThis); |
340 static TInt SetIdleStateFalse(TAny* aThis); |
354 TBool iKeysLocked; |
|
355 |
341 |
356 public: // To allow static method above access this. |
342 public: // To allow static method above access this. |
357 TBool iIdleStateActive; |
343 TBool iIdleStateActive; |
358 |
344 |
359 private: |
345 private: |