calendarui/missedalarmindicatorplugin/inc/missedalarmindicatorplugin.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:   MissedAlarmIndicatorPlugin plugin implementation for Calendar
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MISSEDALARMINDICATORPLUGIN_H
       
    21 #define MISSEDALARMINDICATORPLUGIN_H
       
    22 
       
    23 #include <badesca.h>
       
    24 #include <cenrepnotifyhandler.h>        // MCenRepNotifyHandlerCallback
       
    25 #include <AknIndicatorPlugin.h>         // CAknIndicatorPlugin
       
    26 #include <missedalarmstore.h>
       
    27 #include <missedalarm.h>
       
    28 
       
    29 //Forward declarations
       
    30 class TAknWindowComponentLayout;
       
    31 class CAknStylusActivatedPopUpContent;
       
    32 class CAknPreviewPopUpController;
       
    33 class CMissedAlarmStore;
       
    34 
       
    35 /**
       
    36  * CMisssedAlarmIndicatorPlugin class declaration 
       
    37  */
       
    38 class CMissedAlarmIndicatorPlugin : public CAknIndicatorPlugin,
       
    39                                     public MCenRepNotifyHandlerCallback
       
    40     {                                    
       
    41 	public:
       
    42 	
       
    43 	    /**
       
    44          * Two-phased constructor.
       
    45          */
       
    46 		static 	CMissedAlarmIndicatorPlugin* NewL();
       
    47 		
       
    48 		/**
       
    49          * Destructor.
       
    50          */
       
    51 		~CMissedAlarmIndicatorPlugin();
       
    52 		
       
    53 	private:
       
    54 	
       
    55 	    /**
       
    56          * Constructor.
       
    57          */
       
    58 		CMissedAlarmIndicatorPlugin();
       
    59 		
       
    60 		/**
       
    61          * 2nd Phase Construction.
       
    62          */
       
    63 		void ConstructL();
       
    64 	
       
    65     public:
       
    66         /**
       
    67          * From MCenRepNotifyHandlerCallback.
       
    68          * Notification of any change to the Missed Alarm Store central repository
       
    69          * @param aId Id of the cenrep key that changed
       
    70          */
       
    71         void HandleNotifyGeneric( TUint32 aId );
       
    72         
       
    73 	private: // From CAknIndicatorPlugin
       
    74 		
       
    75 		/**
       
    76          * Implements stylus tap actions for the indicator in question (aUid)
       
    77          * @param aUid UID of an indicator 
       
    78          * @return none
       
    79          */
       
    80         void HandleIndicatorTapL( const TInt aUid );
       
    81         
       
    82 		/**
       
    83 		 * Returns the description used as link text, displayed with
       
    84 		 * the indicator icon in the indicator popup.
       
    85 		 */
       
    86 		HBufC* TextL( const TInt aUid, TInt& aTextType );
       
    87 	   
       
    88 	public:
       
    89         
       
    90         /**
       
    91          * Reads the latest missed alarms count from MissedAlarmStore
       
    92          * @param  
       
    93          * @return TInt
       
    94          */
       
    95         TInt GetMissedAlarmsCount();
       
    96        
       
    97    	private: //data
       
    98     
       
    99         enum ETitleText
       
   100             {
       
   101             ESingularText = 0,
       
   102             EPluralText
       
   103             };
       
   104     	CMissedAlarmStore *iMissedAlarmStore;
       
   105     	
       
   106         CRepository* iMissedAlarmStoreRepository;
       
   107         CCenRepNotifyHandler* iCenRepChangeNotifier;
       
   108     	CDesCArrayFlat*  iArryOfFlatText;
       
   109         };
       
   110 		
       
   111 #endif //MISSEDALARMINDICATORPLUGIN_H