56
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 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 |
#ifndef C_CBCTESTDOMAIWCASE_H
|
|
19 |
#define C_CBCTESTDOMAIWCASE_H
|
|
20 |
|
|
21 |
#include "bctestcase.h"
|
|
22 |
|
|
23 |
|
|
24 |
class CBCTestDomAiwAknContainer;
|
|
25 |
class CCoeControl;
|
|
26 |
class CEikonEnv;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* test case for various classes.
|
|
30 |
*
|
|
31 |
*
|
|
32 |
* @code
|
|
33 |
*
|
|
34 |
* @endcode
|
|
35 |
*
|
|
36 |
* @lib
|
|
37 |
* @since S60 v5.0
|
|
38 |
*/
|
|
39 |
class CBCTestDomAiwCase:
|
|
40 |
public CBCTestCase
|
|
41 |
,public MEikMenuObserver
|
|
42 |
{
|
|
43 |
public:
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Symbian 2nd static constructor
|
|
47 |
*/
|
|
48 |
static CBCTestDomAiwCase* NewL( CBCTestDomAiwAknContainer* aContainer );
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Destructor.
|
|
52 |
*
|
|
53 |
*/
|
|
54 |
virtual ~CBCTestDomAiwCase();
|
|
55 |
|
|
56 |
|
|
57 |
// from base class CBCTestCase
|
|
58 |
|
|
59 |
/**
|
|
60 |
* From CBCTestCase.
|
|
61 |
* Execute corresponding test functions for UI command.
|
|
62 |
*
|
|
63 |
* Derived classes must provide an implementation of this function which
|
|
64 |
* responds to user commands appropriately based on a user-defined ID for
|
|
65 |
* the command.
|
|
66 |
*
|
|
67 |
* @since S60 v5.0
|
|
68 |
* @param aCmd, UI command
|
|
69 |
*/
|
|
70 |
|
|
71 |
void RunL( TInt aCmd );
|
|
72 |
|
|
73 |
|
|
74 |
// from base class MEikMenuObserver
|
|
75 |
|
|
76 |
/**
|
|
77 |
* From MEikMenuObserver.
|
|
78 |
* Processes user commands.
|
|
79 |
*
|
|
80 |
* Derived classes must provide an implementation of this function which
|
|
81 |
* responds to user commands appropriately based on a user-defined ID for
|
|
82 |
* the command.
|
|
83 |
*
|
|
84 |
* @since S60 v5.0
|
|
85 |
* @param aCommandId ID of the command to respond to.
|
|
86 |
*/
|
|
87 |
virtual void ProcessCommandL(TInt aCommandId) ;
|
|
88 |
|
|
89 |
/**
|
|
90 |
* From MEikMenuObserver.
|
|
91 |
* Called by the Uikon framework to handle the emphasising or de-emphasising of
|
|
92 |
* a menu window.
|
|
93 |
*
|
|
94 |
* CEikMenuBar objects call this on their observer to emphasise
|
|
95 |
* themselves when they are displayed, and de-emphasise themselves when they
|
|
96 |
* stop displaying.
|
|
97 |
*
|
|
98 |
* @since S60 v5.0
|
|
99 |
* @param aMenuControl The menu control.
|
|
100 |
* @param aEmphasis ETrue to emphasize the menu, EFalse otherwise.
|
|
101 |
*/
|
|
102 |
virtual void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis);
|
|
103 |
|
|
104 |
protected:
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Build autotest script.
|
|
108 |
*
|
|
109 |
* @since S60 v5.0
|
|
110 |
*/
|
|
111 |
void BuildScriptL();
|
|
112 |
|
|
113 |
/**
|
|
114 |
* Test functions.
|
|
115 |
*
|
|
116 |
* @since S60 v5.0
|
|
117 |
*/
|
|
118 |
void TestAiwMenu();
|
|
119 |
|
|
120 |
/**
|
|
121 |
* Test functions.
|
|
122 |
*
|
|
123 |
* @since S60 v5.0
|
|
124 |
*/
|
|
125 |
void TestAiwServiceIfMenu();
|
|
126 |
|
|
127 |
|
|
128 |
private:
|
|
129 |
|
|
130 |
/**
|
|
131 |
* C++ default constructor
|
|
132 |
*/
|
|
133 |
CBCTestDomAiwCase( CBCTestDomAiwAknContainer* aContainer );
|
|
134 |
|
|
135 |
/**
|
|
136 |
* Symbian 2nd constructor
|
|
137 |
*/
|
|
138 |
void ConstructL();
|
|
139 |
|
|
140 |
private: // data
|
|
141 |
|
|
142 |
/**
|
|
143 |
* Pointer to a control, maybe you need one in your test
|
|
144 |
* own
|
|
145 |
*/
|
|
146 |
CCoeControl* iControl;
|
|
147 |
|
|
148 |
/**
|
|
149 |
* Pointer to container.
|
|
150 |
* not own
|
|
151 |
*/
|
|
152 |
CBCTestDomAiwAknContainer* iContainer;
|
|
153 |
|
|
154 |
};
|
|
155 |
|
|
156 |
#endif // C_CBCTESTDOMAIWCASE_H |