1 /* |
|
2 * Copyright (c) 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: This file contains the header file of the |
|
15 * UITestServerStarter AppUi class |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef UITESTSERVERSTARTERAPPUI_H_ |
|
20 #define UITESTSERVERSTARTERAPPUI_H_ |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknViewAppUi.h> |
|
24 |
|
25 // CONSTANTS |
|
26 // None |
|
27 |
|
28 // MACROS |
|
29 // None |
|
30 |
|
31 // DATA TYPES |
|
32 // None |
|
33 |
|
34 // FUNCTION PROTOTYPES |
|
35 // None |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class CUITestServerStarterAppView; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 // DESCRIPTION |
|
43 // UITestServerStarter AppUi class |
|
44 class CUITestServerStarterAppUi : public CAknViewAppUi |
|
45 { |
|
46 public: // Enumerations |
|
47 // None |
|
48 |
|
49 private: // Enumerations |
|
50 /** |
|
51 * Currently handled event type. |
|
52 */ |
|
53 enum TEventType { |
|
54 ENone, // None |
|
55 EPressKey, // Press key event |
|
56 ETypeText, // Type text event |
|
57 EPointerEvent, // Pointer event |
|
58 }; |
|
59 |
|
60 public: // Constructors and destructor |
|
61 /** |
|
62 * C++ default constructor. This needs to be public due to |
|
63 * the way the framework constructs the AppUi |
|
64 */ |
|
65 CUITestServerStarterAppUi(); |
|
66 |
|
67 /** |
|
68 * Virtual Destructor. |
|
69 */ |
|
70 virtual ~CUITestServerStarterAppUi(); |
|
71 |
|
72 public: // New functions |
|
73 /** |
|
74 * ConstructL. |
|
75 * 2nd phase constructor. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 /** |
|
80 * Prepares AppUi to recive type text event |
|
81 */ |
|
82 virtual void PrepareToTypeText( TInt aTextLength ); |
|
83 |
|
84 /** |
|
85 * Prepares AppUi to recive key press event |
|
86 */ |
|
87 virtual void PrepareToPressKey(); |
|
88 |
|
89 /** |
|
90 * Prepares AppUi to recive pointer event |
|
91 */ |
|
92 virtual void PrepareToPointerEvent(); |
|
93 |
|
94 /** |
|
95 * Notifies that key press event was recived. |
|
96 */ |
|
97 virtual void KeyPressHandled(); |
|
98 |
|
99 /** |
|
100 * Notifies that text type event was recived. |
|
101 */ |
|
102 virtual void TextTypeHandled(); |
|
103 |
|
104 /** |
|
105 * Notifies that pointer event was recived. |
|
106 */ |
|
107 virtual void PointerEventHandled(); |
|
108 |
|
109 /** |
|
110 * Requests notification when key press event is handled. |
|
111 */ |
|
112 virtual void NotifyAboutHandledKeyPress( TRequestStatus* aStatus ); |
|
113 |
|
114 /** |
|
115 * Requests notification when text type event is handled. |
|
116 */ |
|
117 virtual void NotifyAboutHandledTextType( TRequestStatus* aStatus ); |
|
118 |
|
119 /** |
|
120 * Requests notification when pointer event is handled. |
|
121 */ |
|
122 virtual void NotifyAboutHandledPointerEvent( TRequestStatus* aStatus ); |
|
123 |
|
124 public: // Functions from base classes |
|
125 /** |
|
126 * Overwritten version of CCoeAppUi::HandleWsEventL() method. |
|
127 */ |
|
128 void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ); |
|
129 |
|
130 protected: // New functions |
|
131 // None |
|
132 |
|
133 protected: // Functions from base classes |
|
134 // None |
|
135 |
|
136 private: // New functions |
|
137 // None |
|
138 |
|
139 private: // Functions from base classes |
|
140 /** |
|
141 * From CEikAppUi, HandleCommandL. |
|
142 * Takes care of command handling. |
|
143 * @param aCommand Command to be handled. |
|
144 */ |
|
145 void HandleCommandL( TInt aCommand ); |
|
146 |
|
147 public: //Data |
|
148 // None |
|
149 |
|
150 protected: // Data |
|
151 // None |
|
152 |
|
153 private: // Data |
|
154 CUITestServerStarterAppView* iAppView; // The application view owned by CUITestServerStarterAppUi |
|
155 TRequestStatus* iEventStatus; // Pointer to request statuc which is completed when |
|
156 // selected event is handled. |
|
157 TEventType iEventType; // Currently handled event type; |
|
158 TInt iTypeTextLength; // Length of text send by typetext testscripter keyword |
|
159 |
|
160 public: // Friend classes |
|
161 // None |
|
162 |
|
163 protected: // Friend classes |
|
164 // None |
|
165 |
|
166 private: // Friend classes |
|
167 // None |
|
168 }; |
|
169 |
|
170 #endif // UITESTSERVERSTARTERAPPUI_H_ |
|
171 |
|
172 // End of File |
|