equal
deleted
inserted
replaced
30 #include "alarmremconeventshandler.h" |
30 #include "alarmremconeventshandler.h" |
31 #ifdef RD_ALMALERT__SENSOR_SUPPORT |
31 #ifdef RD_ALMALERT__SENSOR_SUPPORT |
32 #include "alarmcontextfwsupport.h" |
32 #include "alarmcontextfwsupport.h" |
33 #endif // RD_ALMALERT__SENSOR_SUPPORT |
33 #endif // RD_ALMALERT__SENSOR_SUPPORT |
34 |
34 |
|
35 #include <w32std.h> |
35 #include <almconst.h> |
36 #include <almconst.h> |
36 #include <eikenv.h> |
37 #include <eikenv.h> |
37 #include <AknCapServer.h> |
38 #include <AknCapServer.h> |
38 #include <e32property.h> |
39 #include <e32property.h> |
39 #include <centralrepository.h> |
40 #include <centralrepository.h> |
1666 TBool CAlarmUtils::IsCalendarAlarmViewer() |
1667 TBool CAlarmUtils::IsCalendarAlarmViewer() |
1667 { |
1668 { |
1668 return iCalendarAlarmViewer; |
1669 return iCalendarAlarmViewer; |
1669 } |
1670 } |
1670 |
1671 |
|
1672 // --------------------------------------------------------- |
|
1673 // Silence the notifying alarm |
|
1674 // --------------------------------------------------------- |
|
1675 // |
|
1676 void CAlarmUtils::DoSilence() |
|
1677 { |
|
1678 TRACE_ENTRY_POINT; |
|
1679 |
|
1680 // silence only if snoozing is possible |
|
1681 // this way user must hear the last "call" |
|
1682 if( CanSnooze() ) |
|
1683 { |
|
1684 delete iAlarmPlayer; |
|
1685 iAlarmPlayer = NULL; |
|
1686 SetBackLight( EFalse ); |
|
1687 |
|
1688 if( IsCalendarAlarm() ) |
|
1689 { |
|
1690 |
|
1691 // calendar alarm needs extra handling due to having stop - silence |
|
1692 //simulate right softkey pressing |
|
1693 RWsSession wsSession=CCoeEnv::Static()->WsSession(); |
|
1694 TKeyEvent keyEvent; |
|
1695 keyEvent.iCode = EKeyCBA2; |
|
1696 keyEvent.iScanCode = EStdKeyDevice1; |
|
1697 keyEvent.iModifiers = 0; |
|
1698 keyEvent.iRepeats = 0; |
|
1699 wsSession.SimulateKeyEvent( keyEvent ); |
|
1700 wsSession.Flush(); |
|
1701 } |
|
1702 // clockalarm |
|
1703 else |
|
1704 { |
|
1705 StartAutoSnoozeTimer(); |
|
1706 } |
|
1707 |
|
1708 #if defined( RD_ALMALERT__SENSOR_SUPPORT ) |
|
1709 // notify the result through the context framework |
|
1710 if( iCFSupport ) |
|
1711 { |
|
1712 PIM_TRAPD_ASSERT( iCFSupport->PublishAlarmResultL( EResultAlarmSilenced ); ) |
|
1713 } |
|
1714 #endif // RD_ALMALERT__SENSOR_SUPPORT |
|
1715 } |
|
1716 TRACE_EXIT_POINT; |
|
1717 } |
|
1718 |
1671 // End of File |
1719 // End of File |