|
1 /* |
|
2 * Copyright (c) 2003-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __HWRMLightTestB_APPUI_H__ |
|
22 #define __HWRMLightTestB_APPUI_H__ |
|
23 |
|
24 #include <eikappui.h> |
|
25 //#include <hwrmlight.h> |
|
26 //#include <hwrmvibra.h> |
|
27 #include "TestScheduler.h" |
|
28 #include "tc_log.h" |
|
29 //#include "McFramework.h" |
|
30 #include <centralrepository.h> |
|
31 //#include <hwrmvibrasdkcrkeys.h> |
|
32 #include "testcasecontroller.h" |
|
33 |
|
34 class CHWRMLightTestBAppView; |
|
35 |
|
36 /*! |
|
37 @class CHWRMLightTestBAppUi |
|
38 |
|
39 @discussion An instance of class CHWRMLightTestBAppUi is the UserInterface part of the AVKON |
|
40 application framework for the HWRMLightTestB example application |
|
41 * * Nokia Core OS * |
|
42 */ |
|
43 class CHWRMLightTestBAppUi : public CEikAppUi, public MHwrmTestCaseObserver |
|
44 { |
|
45 public: |
|
46 ~CHWRMLightTestBAppUi(); |
|
47 CHWRMLightTestBAppUi(); |
|
48 |
|
49 private: |
|
50 void ConstructL(); |
|
51 |
|
52 private: // from CAknAppUi |
|
53 void HandleCommandL(TInt aCommand); |
|
54 |
|
55 //void LightStatusChanged(TInt aTarget, CHWRMLight::TLightStatus aStatus); |
|
56 |
|
57 //void VibraStatusChanged( CHWRMVibra::TVibraStatus aStatus); |
|
58 |
|
59 //void VibraModeChanged( CHWRMVibra::TVibraModeState aStatus); |
|
60 |
|
61 //CRepository* iSession; |
|
62 |
|
63 private: // from MHwrmTestCaseObserver |
|
64 void InfoMessage(const TDesC& aMessage); |
|
65 void LogMessage(const TDesC& aMessage); |
|
66 void DebugMessage(const TDesC& aMessage); |
|
67 |
|
68 private: |
|
69 CHwrmTestCaseController* iTestCaseController; |
|
70 |
|
71 CHWRMLightTestBAppView* iAppView; |
|
72 |
|
73 //TInt iMyTarget; |
|
74 |
|
75 //CHWRMLight::TLightStatus iMyStatus; |
|
76 |
|
77 //CHWRMLight* iMyLight; |
|
78 |
|
79 //TInt iErrVal; |
|
80 |
|
81 Log iLog; |
|
82 |
|
83 void InitStatus(); |
|
84 |
|
85 // void RunTestCases(TInt aCasesFrom, TInt aCasesTo); |
|
86 void LogResult(const TDesC& aTestCase, TInt aErrorCode); |
|
87 |
|
88 /* TeK -> */ |
|
89 // CMcFramework* iMcFramework; |
|
90 // CHWRMVibra* iVibra; |
|
91 // CHWRMVibra::TVibraStatus iVibraStatus; |
|
92 // CHWRMVibra::TVibraModeState iVibraMode; |
|
93 |
|
94 /* |
|
95 void RunSlaveMode(); |
|
96 TInt MC_Primary_display_light_S(); |
|
97 TInt MC_Display_on_and_keyboard_blink_S(); |
|
98 TInt MC_Display_on_and_keyboard_reserved_S(); |
|
99 TInt MC_Display_and_keyboard_blink_S(); |
|
100 TInt MC_Vibra_Basic_Usage_S(); |
|
101 TInt MC_FmTx_Basic_Usage_S(); |
|
102 TInt MC_Combined_light_and_vibra_usage_S(); |
|
103 TInt MC_Combined_light_and_vibra_usage_2_S(); |
|
104 TInt TestLightOn(TInt aTarget, TInt aDur, TInt aIntens, TBool aFadeIn); |
|
105 TInt TestLightOn(TInt aTarget); |
|
106 TInt TestLightOff(TInt aTarget, TInt aDuration, TBool aFadeOut); |
|
107 TInt TestLightOff(TInt aTarget); |
|
108 TInt TestLightBlink(TInt aTarget,TInt aDuration,TInt aOnDuration,TInt aOffDuration,TInt aIntensity); |
|
109 TInt TestLightBlink(TInt aTarget,TInt aDuration); |
|
110 TInt TestLightBlink(TInt aTarget); |
|
111 TInt Verify_MCFramework_S(); |
|
112 TInt RunTestVibra(TInt howLong, TInt whatIntensity); |
|
113 TInt RunTestVibra(TInt howLong); |
|
114 TInt StopTestVibra(); |
|
115 */ |
|
116 //TEST CASES |
|
117 /* |
|
118 TInt LightTargetDisplayTest(); |
|
119 TInt LightTargetKeyboardTest(); |
|
120 TInt LightOnDurationTest(); |
|
121 TInt LightOffDurationTest(); |
|
122 TInt LightIntensityTest(); |
|
123 TInt LightBlinkTargetTest( ); |
|
124 TInt LightBlinkDurationTest( ); |
|
125 TInt LightBlinkOnOff(); |
|
126 TInt LightWithDifferentTargets(); |
|
127 TInt LightWithInvalidDuration(); |
|
128 |
|
129 //TInt LightWithInvalidTarget(); |
|
130 */ |
|
131 }; |
|
132 |
|
133 |
|
134 #endif // __HWRMLightTestB_APPUI_H__ |
|
135 |