alarmui/inc/alarmutils.h
changeset 89 b57382753122
parent 23 fd30d51f876b
equal deleted inserted replaced
83:5aadd1120515 89:b57382753122
    33 #include <starterclient.h>
    33 #include <starterclient.h>
    34 #include <calentry.h>
    34 #include <calentry.h>
    35 #include <caltime.h>
    35 #include <caltime.h>
    36 #include <calprogresscallback.h>
    36 #include <calprogresscallback.h>
    37 
    37 
    38 #include "alarmcommon.h"
       
    39 
       
    40 // FORWARD DECLARATIONS
    38 // FORWARD DECLARATIONS
    41 
    39 
    42 class CCalSession;
    40 class CCalSession;
    43 class CCalEntryView;
    41 class CCalEntryView;
    44 class CAlmAlarmControl;
    42 class CAlmAlarmControl;
    49 class CAlarmContextFwSupport;
    47 class CAlarmContextFwSupport;
    50 #endif // RD_ALMALERT__SENSOR_SUPPORT
    48 #endif // RD_ALMALERT__SENSOR_SUPPORT
    51 class MProfileEngine;
    49 class MProfileEngine;
    52 class CNotifierDialogController;
    50 class CNotifierDialogController;
    53 class CAknAlarmService;
    51 class CAknAlarmService;
    54 class AlarmAlert;
       
    55 
    52 
    56 // CLASS DECLARATION
    53 // CLASS DECLARATION
    57 
    54 
    58 /**
    55 /**
    59 *  ?description
    56 *  ?description
    69     */
    66     */
    70     enum TAlarmType
    67     enum TAlarmType
    71         {
    68         {
    72         EAlarmTypeClock = 0,
    69         EAlarmTypeClock = 0,
    73         EAlarmTypeCalendar,
    70         EAlarmTypeCalendar,
    74         EAlarmTypeTodo,
       
    75         EAlarmTypeOther
    71         EAlarmTypeOther
    76         };
    72         };
    77 
    73 
    78 
    74 
    79     struct TAlarmData
    75     struct TAlarmData
   242     /**
   238     /**
   243     * ?description
   239     * ?description
   244     * @since S60 3.2
   240     * @since S60 3.2
   245     * @return Pointer to CNotifierDialogController.
   241     * @return Pointer to CNotifierDialogController.
   246     */
   242     */
   247     // CNotifierDialogController* NotifierDialogController();
   243     CNotifierDialogController* NotifierDialogController();
   248     AlarmAlert *NotifierDialogController();
       
   249 
   244 
   250     /**
   245     /**
   251     * Stop the active alarm and reset the snooze count.
   246     * Stop the active alarm and reset the snooze count.
   252     * @since S60 3.2
   247     * @since S60 3.2
   253     **/
   248     **/
   263     /**
   258     /**
   264     * Snooze the active alarm.
   259     * Snooze the active alarm.
   265     * @since S60 3.2
   260     * @since S60 3.2
   266     **/
   261     **/
   267     void DoSnooze();
   262     void DoSnooze();
   268 
   263     /**
       
   264     * Silence the active alarm.
       
   265     * @since tb9.2
       
   266     **/
       
   267     void DoSilence();    
   269     /**
   268     /**
   270     * Checks if this alarm can be shown in "alarm" or in "charging" state.
   269     * Checks if this alarm can be shown in "alarm" or in "charging" state.
   271     * @since S60 3.2
   270     * @since S60 3.2
   272     * @return ETrue, if alarm can be shown.
   271     * @return ETrue, if alarm can be shown.
   273     */
   272     */
   479     /**
   478     /**
   480     * Get the status whether, calendar viewer is open or not
   479     * Get the status whether, calendar viewer is open or not
   481 	* @return ETrue if viewer is open.
   480 	* @return ETrue if viewer is open.
   482     */
   481     */
   483     TBool IsCalendarAlarmViewer();
   482     TBool IsCalendarAlarmViewer();
       
   483 
       
   484 	    
       
   485     /**
       
   486     * Stores details of current calendar alarm. i.e LUID, file name and original expiry time
       
   487     */
       
   488     void StoreCurrentCalendarAlarmData();
       
   489 
       
   490     /**
       
   491     * Comapres details of current calendar alarm with previous calendar alarm.(LUID, file name and original expiry time)
       
   492 	* @return ETrue if alarm is duplicate of previous alarm ,EFalse otherwise.
       
   493     */	
   484     
   494     
   485     /**
   495     TBool CheckForDuplicateAlarm();
   486      * @brief Gets the alarm information for the alarm that is
       
   487      * about to expire
       
   488      * @return The alarm information 
       
   489      */
       
   490     SAlarmInfo* GetAlarmInfo();
       
   491 
   496 
   492 private:
   497 private:
   493 
   498 
   494     /**
   499     /**
   495     * Read alarm sound filenames from CenRep.
   500     * Read alarm sound filenames from CenRep.
   636 
   641 
   637     /**
   642     /**
   638     * Pointer to global note API.
   643     * Pointer to global note API.
   639     * Not own.
   644     * Not own.
   640     */
   645     */
   641     // CNotifierDialogController* iNotifierDialogController;
   646     CNotifierDialogController* iNotifierDialogController;
   642     AlarmAlert* iAlarmAlert;
       
   643 
   647 
   644     /**
   648     /**
   645     * Plays alarm tones according to user settings.
   649     * Plays alarm tones according to user settings.
   646     * Own.
   650     * Own.
   647     */
   651     */
   795    
   799    
   796    /**
   800    /**
   797    * Calendar Alarm Viewer flag
   801    * Calendar Alarm Viewer flag
   798    */
   802    */
   799    TBool iCalendarAlarmViewer; 
   803    TBool iCalendarAlarmViewer; 
       
   804    
       
   805    /**
       
   806    * Stores local UID of expired calendar event
       
   807    */
       
   808    TCalLocalUid iPrevLocalUid;
       
   809    
       
   810    /**
       
   811    * Stores filename of expired calendar event
       
   812    */
       
   813    TBuf<256> iPrevCalFileName;
       
   814 
       
   815    /**
       
   816    * Stores org expiry time of expired calendar alarm
       
   817    */
       
   818    TTime iPrevAlarmOriginalExpiryTime;
       
   819 
   800     };
   820     };
   801 
   821 
   802 #endif  // ALARMUTILS_H
   822 #endif  // ALARMUTILS_H
   803 
   823 
   804 
   824