calendarui/server/CalenSvr/inc/calensvrmissedalarmmanager.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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:   An alarm UI class, CCalenSvrMissedAlarmManager.
       
    15 *                This class takes care of handling the UI and Cenrep updation
       
    16 *								 for missed alarms.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __CALENSVRMISSEDALARMMANAGER_H
       
    22 #define __CALENSVRMISSEDALARMMANAGER_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <AknSoftNotifier.h>
       
    27 #include <AknSoftNotificationParameters.h>
       
    28 #include <cenrepnotifyhandler.h>        // MCenRepNotifyHandlerCallback
       
    29 #include <missedalarmstore.h>
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CAknSoftNotifier;
       
    33 class CAknSoftNotificationParameters;
       
    34 class CAknSmallIndicator;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39  *  Class declaration for handling missed alarms 
       
    40  */
       
    41 
       
    42 NONSHARABLE_CLASS( CCalenSvrMissedAlarmManager ) : public CActive,
       
    43                                                    public MCenRepNotifyHandlerCallback
       
    44      {
       
    45 	 public: // Constructors and destructor
       
    46 	 
       
    47 	     /**
       
    48 	      * Constructor
       
    49 	      */
       
    50 	     static CCalenSvrMissedAlarmManager* NewL();
       
    51 
       
    52 	     /**
       
    53 	      * Destructor
       
    54 	      */
       
    55 	     ~CCalenSvrMissedAlarmManager();
       
    56 
       
    57     private:   
       
    58         
       
    59         /**
       
    60          * C++ default constructor
       
    61          */
       
    62         CCalenSvrMissedAlarmManager();
       
    63 
       
    64         /**
       
    65          * Symbian 2nd phase constructor
       
    66          */
       
    67         void ConstructL();
       
    68         
       
    69     public: 
       
    70         
       
    71         void Start();
       
    72     
       
    73         /**
       
    74          * Handles the change in missed alarm store.
       
    75          * updates soft notification and indicator plugins
       
    76          */ 
       
    77         void HandleMissedAlarmL();
       
    78     
       
    79     private: // From CActive
       
    80     
       
    81         void DoCancel();
       
    82         TInt RunError(TInt aError);
       
    83         void RunL();
       
    84     
       
    85     public:
       
    86         /**
       
    87          * From MCenRepNotifyHandlerCallback.
       
    88          * Notification of any change to the Missed Alarm Store central repository
       
    89          * @param aId Id of the cenrep key that changed
       
    90          */
       
    91         void HandleNotifyGeneric( TUint32 aId );
       
    92         
       
    93     private:
       
    94     
       
    95         /**
       
    96          * Method to handle the Missed Alarm Soft Notification 
       
    97          * Implements a Customized Soft Notification.   
       
    98          */
       
    99         void HandleMissedAlarmSoftNotificationL();
       
   100         
       
   101         /**
       
   102          * Method to display the Missed Alarm Notification 
       
   103          * on Cover UI
       
   104          */
       
   105         void HandleMissedAlarmCoverUISoftNotificationL();
       
   106         
       
   107         /**
       
   108          * Method to create the Group Soft Notification Parameters     
       
   109          */
       
   110         CAknSoftNotificationParameters* CreateNotificationParametersLC( 
       
   111                                 const TAknSoftNotificationType aNotificationType );
       
   112                                                                   
       
   113         /**
       
   114          * Method to handle the Missed Alarm Small Indicator     
       
   115          */
       
   116         void HandleMissedAlarmSmallIndicatorL(TBool aArg);
       
   117         
       
   118         /**
       
   119          * Method to update the ScreenSaver Icon for missed alarms
       
   120          */
       
   121         TInt SetMissedAlarmScreenSaverIcon();
       
   122         
       
   123         /**
       
   124          * Method to update the CentralRepository Key value for Missed Calendar Alarms 
       
   125          */
       
   126         TInt SetMissedAlarmCenRepValueL();
       
   127         
       
   128         /**
       
   129          * Method to update the count of the missed alarms
       
   130          * by reading the latest count from the central repository
       
   131          */
       
   132         void GetCountOfMissedAlarmsL();
       
   133         
       
   134     private:
       
   135         //Pointer for CMissedAlarmsStore class
       
   136         CMissedAlarmStore* iMissedAlarmStore;
       
   137         
       
   138         //Pointer for Customised Notification parameters
       
   139         CAknSoftNotifier* iSoftNotifier;
       
   140         
       
   141         CRepository* iMissedAlarmStoreRepository;
       
   142         CCenRepNotifyHandler* iCenRepChangeNotifier;
       
   143         
       
   144         //Number of missed alarms read from Calendar repository
       
   145         TInt iNumOfMissedAlarms;    
       
   146         
       
   147         TBool iShowSoftNotification;
       
   148  
       
   149      };
       
   150 
       
   151 #endif  // __CALENSVRMISSEDALARMMANAGER_H
       
   152 
       
   153 // End of File