|
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 // |
|
15 |
|
16 #ifndef __TEALARMTESTSTEPBASE_H__ |
|
17 #define __TEALARMTESTSTEPBASE_H__ |
|
18 |
|
19 #include <test/testexecutestepbase.h> |
|
20 #include <asclisession.h> |
|
21 #include "consoleantestclient.h" |
|
22 #include <asclisoundplay.h> |
|
23 #include <asshdalarm.h> |
|
24 #include "AlarmServer.hrh" |
|
25 |
|
26 |
|
27 class CTEAlarmTestStepBase : public CTestStep |
|
28 { |
|
29 public: |
|
30 // Destructor |
|
31 ~CTEAlarmTestStepBase(); |
|
32 |
|
33 // CTestStep virtual functions |
|
34 virtual TVerdict doTestStepPreambleL(); |
|
35 |
|
36 // Unility methods for reading parameters from config. |
|
37 TBool GetTimeFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TTime& aResult); |
|
38 TBool GetOffsetFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TTimeIntervalMinutes& aResult); |
|
39 TBool GetOffsetFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TTimeIntervalSeconds& aResult); |
|
40 TBool GetIntervalsFromConfigL(const TDesC& aSectName, CArrayFixFlat<TASCliSoundPlayDefinition>& aResult); |
|
41 TBool GetAlarmsFromConfigL(const TDesC& aSectName, CArrayFixFlat<TASShdAlarm>& aAlarmArray); |
|
42 TBool GetAlarmFromConfig( TInt aAlarmNumber, TASShdAlarm& aAlarm); |
|
43 TBool GetIntervalRepeatFromConfig(const TDesC& aSectName, TAlarmSoundRepeatSetting& aResult); |
|
44 TBool GetTimerContingencyFromConfig(const TDesC& aSectName, TTimeIntervalSeconds& aResult); |
|
45 protected: |
|
46 TBool CompareAlarmPlayIntervals(CArrayFixFlat<TASCliSoundPlayDefinition>& origArray, CArrayFixFlat<TASCliSoundPlayDefinition>& otherArray); |
|
47 protected: |
|
48 // Methods to control Console Alarm Alert Server |
|
49 TBool StartConsoleAlarmAlertServerL(); |
|
50 void StopConsoleAlarmAlertServer(); |
|
51 private: |
|
52 TBool GetIntervalFromConfig(const TDesC& aSectName, const TInt aIntervalNumber, TTimeIntervalMinutes& aOffset, TTimeIntervalSeconds& aDuration); |
|
53 TBool GetIntervalCountFromConfig(const TDesC& aSectName, TInt& aResult); |
|
54 protected: |
|
55 RASCliSession iSession; // Alarm Server |
|
56 RProcess iAlertServerProcess; // ConsoleAlarmAlertServer |
|
57 RANTestClient iCAASClient; // |
|
58 TInt iMaxAlarms; // |
|
59 }; |
|
60 |
|
61 #endif // __TEALARMTESTSTEPBASE_H__ |