|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Contains declaration of CDummyAlarmControl class, which implements the |
|
15 // MEikServAlarm mixin |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __DUMMY_ALARM_CONTROL__ |
|
20 #define __DUMMY_ALARM_CONTROL__ |
|
21 |
|
22 // User Includes |
|
23 #include "TestMultipleAlarmsServer.h" |
|
24 #include "AlarmControlsManager.h" |
|
25 |
|
26 // System Includes |
|
27 #include <uikon/eiksvfty.h> |
|
28 #include <asshdalarm.h> |
|
29 #include <test/testexecutelog.h> |
|
30 #include <uikon/eiknotifyalert.h> |
|
31 |
|
32 /** |
|
33 Class which implements the MEikServAlarm mixin. |
|
34 @internalTechnology |
|
35 @test |
|
36 */ |
|
37 class CDummyAlarmControl : public CBase, public MEikServAlarm |
|
38 { |
|
39 public: |
|
40 // Construction |
|
41 CDummyAlarmControl(CEikAlmControlSupervisor* aSupervisor, CAlarmControlsManager* aAlarmControlsManager); |
|
42 |
|
43 // Destruction |
|
44 ~CDummyAlarmControl(); |
|
45 |
|
46 // From MEikServAlarm |
|
47 virtual void Release(); |
|
48 virtual void ShowAlarm(); |
|
49 virtual void HideAlarm(); |
|
50 virtual TInt CurrentServerState() const; |
|
51 virtual void UpdateSoundPauseTimeInterval(TInt aMinutes); |
|
52 virtual void UpdateForAlarmServerState(TInt aNewAlarmServerState); |
|
53 virtual void UpdateAlarmInfo(const TASShdAlarm& aAlarm,const TFullName& aOwner); |
|
54 virtual void StartPlayAlarmL(const TDesC& aAlarmName); |
|
55 virtual void StopPlayAlarm(); |
|
56 |
|
57 // Other functions |
|
58 const TDesC& AlarmMessage(); |
|
59 const TDesC& AlarmSoundName(); |
|
60 CEikAlmControlSupervisor* Supervisor(); |
|
61 const TASShdAlarm& AlarmObject(); |
|
62 TBool IsSnoozed(); |
|
63 TBool IsShowing(); |
|
64 void PrintWhoWasCalledL(TestMultipleAlarms::TAlarmControlState aAlarmControlState) const; |
|
65 void PrintLog(const TDesC& aMessage) const; |
|
66 TTime ActualNotificationTime(); |
|
67 TTime OriginalExpiryTime(); |
|
68 TInt MinsToSnooze(); |
|
69 |
|
70 private: |
|
71 CEikAlmControlSupervisor* iSupervisor; |
|
72 CAlarmControlsManager* iMyManager; |
|
73 TInt iCurrentAlarmServerState; |
|
74 TPtrC iAlarmMessage; |
|
75 TTime iMyNotificationTime; |
|
76 TTime iOrigExpTime; |
|
77 TInt iMinsToSnooze; |
|
78 TASShdAlarm iAlarm; |
|
79 TBool iIsSnoozed; |
|
80 TBool iIsShowing; |
|
81 TBool iIsPlaying; |
|
82 |
|
83 HBufC* iAlarmSoundName; |
|
84 }; |
|
85 |
|
86 #endif // __DUMMY_ALARM_CONTROL__ |
|
87 |