20
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 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: declaration of test case
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef C_BCTESTMIX50PATCHMISC_H
|
|
20 |
#define C_BCTESTMIX50PATCHMISC_H
|
|
21 |
|
|
22 |
#include <eikcmobs.h>
|
|
23 |
#include <aknchoicelist.h>
|
|
24 |
#include <aknsinglestyletreelist.h>
|
|
25 |
#include <eikimage.h>
|
|
26 |
#include <aknpopup.h>
|
|
27 |
#include <aknsfld.h>
|
|
28 |
#include <aknvolumesettingpage.h>
|
|
29 |
#include <akntextsettingpage.h>
|
|
30 |
#include <aknslidersettingpage.h>
|
|
31 |
#include <aknradiobuttonsettingpage.h>
|
|
32 |
#include <aknpasswordsettingpage.h>
|
|
33 |
#include <aknmfnesettingpage.h>
|
|
34 |
#include <akncheckboxsettingpage.h>
|
|
35 |
#include <eiklbm.h>
|
|
36 |
#include <eiklbbut.h>
|
|
37 |
#include <aknfeppensupportinterface.h>
|
|
38 |
#include <COECOBS.H>
|
|
39 |
#include <eikfnlab.h>
|
|
40 |
#include <maknfilefilter.h>
|
|
41 |
#include <AknServerApp.h>
|
|
42 |
#include <AknsItemData.h>
|
|
43 |
#include <AknNoteDialog.h>
|
|
44 |
|
|
45 |
class CEikCommandButtonBase;
|
|
46 |
class MEikCommandObserver;
|
|
47 |
class CBCTestUIFWViewCase;
|
|
48 |
|
|
49 |
/**
|
|
50 |
* CBCTestSingleStyleListBox class
|
|
51 |
*/
|
|
52 |
class CBCTestCommandButtonBase : public CEikCommandButtonBase
|
|
53 |
{
|
|
54 |
friend class CBCTestMix50PatchControlCase;
|
|
55 |
public: // constructor and destructor
|
|
56 |
/**
|
|
57 |
* C++ constructor
|
|
58 |
*/
|
|
59 |
static CBCTestCommandButtonBase* NewL();
|
|
60 |
|
|
61 |
/**
|
|
62 |
* C++ destructor
|
|
63 |
*/
|
|
64 |
virtual ~CBCTestCommandButtonBase();
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Draw function
|
|
68 |
*/
|
|
69 |
void Draw( const TRect& aRect )const;
|
|
70 |
|
|
71 |
/**
|
|
72 |
* From CCoeControl
|
|
73 |
* Serialize the control's state. For testing
|
|
74 |
* @param aWriteStream Stream to write to.
|
|
75 |
*/
|
|
76 |
void WriteInternalStateL(RWriteStream& aWriteStream) const;
|
|
77 |
|
|
78 |
private: // constructor
|
|
79 |
|
|
80 |
/**
|
|
81 |
* default constructor
|
|
82 |
*/
|
|
83 |
CBCTestCommandButtonBase();
|
|
84 |
};
|
|
85 |
|
|
86 |
/**
|
|
87 |
* CBCTestSingleStyleListBox class
|
|
88 |
*/
|
|
89 |
class CBCTestChoiceList : public CAknChoiceList
|
|
90 |
{
|
|
91 |
friend class CBCTestMix50PatchControlCase;
|
|
92 |
};
|
|
93 |
|
|
94 |
/**
|
|
95 |
* CBCTestSingleStyleListBox class
|
|
96 |
*/
|
|
97 |
class CBCTestImage : public CEikImage
|
|
98 |
{
|
|
99 |
friend class CBCTestMix50PatchControlCase;
|
|
100 |
};
|
|
101 |
|
|
102 |
/**
|
|
103 |
* CBCTestSingleStyleListBox class
|
|
104 |
*/
|
|
105 |
class CBCTestFadedComponent : public CBase,
|
|
106 |
public MAknFadedComponent
|
|
107 |
{
|
|
108 |
};
|
|
109 |
|
|
110 |
/**
|
|
111 |
* CBCTestSingleStyleListBox class
|
|
112 |
*/
|
|
113 |
class CBCTestSearchfieldObserver : public CBase,
|
|
114 |
public MAdaptiveSearchTextObserver
|
|
115 |
{
|
|
116 |
public:
|
|
117 |
/**
|
|
118 |
* Notification and handling of an adaptive search text change.
|
|
119 |
* @param aSearchField The source search field of this message.
|
|
120 |
*/
|
|
121 |
inline void AdaptiveSearchTextChanged( CAknSearchField* )
|
|
122 |
{
|
|
123 |
}
|
|
124 |
};
|
|
125 |
|
|
126 |
/**
|
|
127 |
* CBCTestVolumeSettingPage class
|
|
128 |
*/
|
|
129 |
class CBCTestVolumeSettingPage : public CAknVolumeSettingPage
|
|
130 |
{
|
|
131 |
friend class CBCTestMix50PatchControlCase;
|
|
132 |
public:
|
|
133 |
/**
|
|
134 |
* C++ Constructor
|
|
135 |
*/
|
|
136 |
CBCTestVolumeSettingPage(TInt aResourceID, TInt& aVolume);
|
|
137 |
|
|
138 |
/**
|
|
139 |
* C++ destructor
|
|
140 |
*/
|
|
141 |
virtual ~CBCTestVolumeSettingPage(){};
|
|
142 |
};
|
|
143 |
|
|
144 |
/**
|
|
145 |
* CBCTestIntegerSettingPage class
|
|
146 |
*/
|
|
147 |
class CBCTestIntegerSettingPage : public CAknIntegerSettingPage
|
|
148 |
{
|
|
149 |
friend class CBCTestMix50PatchControlCase;
|
|
150 |
public:
|
|
151 |
/**
|
|
152 |
* C++ Constructor
|
|
153 |
*/
|
|
154 |
CBCTestIntegerSettingPage(TInt aResourceID, TInt& aValue,
|
|
155 |
TInt aTextSettingPageFlags = 0 );
|
|
156 |
|
|
157 |
/**
|
|
158 |
* Destructor
|
|
159 |
*/
|
|
160 |
virtual ~CBCTestIntegerSettingPage(){};
|
|
161 |
};
|
|
162 |
|
|
163 |
/**
|
|
164 |
* CBCTestSingleStyleListBox class
|
|
165 |
*/
|
|
166 |
class CBCTestTextSettingPage : public CAknTextSettingPage
|
|
167 |
{
|
|
168 |
friend class CBCTestMix50PatchControlCase;
|
|
169 |
public:
|
|
170 |
/**
|
|
171 |
* C++ Constructor
|
|
172 |
*/
|
|
173 |
CBCTestTextSettingPage(TInt aResourceID, TDes& aText,
|
|
174 |
TInt aTextSettingPageFlags = 0 );
|
|
175 |
|
|
176 |
/**
|
|
177 |
* Destructor
|
|
178 |
*/
|
|
179 |
virtual ~CBCTestTextSettingPage(){}
|
|
180 |
};
|
|
181 |
|
|
182 |
/**
|
|
183 |
* CBCTestSingleStyleListBox class
|
|
184 |
*/
|
|
185 |
class CBCTestSliderSettingPage : public CAknSliderSettingPage
|
|
186 |
{
|
|
187 |
friend class CBCTestMix50PatchControlCase;
|
|
188 |
public:
|
|
189 |
/**
|
|
190 |
* C++ Constructor
|
|
191 |
*/
|
|
192 |
CBCTestSliderSettingPage(TInt aResourceID, TInt& aSliderValue);
|
|
193 |
|
|
194 |
/**
|
|
195 |
* Destructor
|
|
196 |
*/
|
|
197 |
virtual ~CBCTestSliderSettingPage(){}
|
|
198 |
};
|
|
199 |
|
|
200 |
/**
|
|
201 |
* CBCTestSingleStyleListBox class
|
|
202 |
*/
|
|
203 |
class CBCTestPatchAknSettingPage: public CAknSettingPage
|
|
204 |
{
|
|
205 |
friend class CBCTestMix50PatchControlCase;
|
|
206 |
public:
|
|
207 |
/**
|
|
208 |
* C++ Constructor
|
|
209 |
*/
|
|
210 |
CBCTestPatchAknSettingPage( TInt aResourceId );
|
|
211 |
|
|
212 |
/**
|
|
213 |
* Destructor
|
|
214 |
*/
|
|
215 |
virtual ~CBCTestPatchAknSettingPage(){}
|
|
216 |
};
|
|
217 |
|
|
218 |
/**
|
|
219 |
* CBCTestSingleStyleListBox class
|
|
220 |
*/
|
|
221 |
class CBCTestRadioButtonSettingPage : public CAknRadioButtonSettingPage
|
|
222 |
{
|
|
223 |
friend class CBCTestMix50PatchControlCase;
|
|
224 |
public:
|
|
225 |
/**
|
|
226 |
* C++ Constructor
|
|
227 |
*/
|
|
228 |
CBCTestRadioButtonSettingPage(
|
|
229 |
TInt aResourceID,
|
|
230 |
TInt& aCurrentSelectionIndex,
|
|
231 |
const MDesCArray* aItemArray );
|
|
232 |
|
|
233 |
/**
|
|
234 |
* Destructor
|
|
235 |
*/
|
|
236 |
virtual ~CBCTestRadioButtonSettingPage(){}
|
|
237 |
};
|
|
238 |
|
|
239 |
/**
|
|
240 |
* CBCTestSingleStyleListBox class
|
|
241 |
*/
|
|
242 |
class CBCTestNumericPasswordSettingPage :
|
|
243 |
public CAknNumericPasswordSettingPage
|
|
244 |
{
|
|
245 |
friend class CBCTestMix50PatchControlCase;
|
|
246 |
public:
|
|
247 |
/**
|
|
248 |
* C++ Constructor
|
|
249 |
*/
|
|
250 |
CBCTestNumericPasswordSettingPage(
|
|
251 |
TInt aResourceID,
|
|
252 |
TDes& aNewPassword,
|
|
253 |
const TDesC& aOldPassword);
|
|
254 |
|
|
255 |
/**
|
|
256 |
* Destructor
|
|
257 |
*/
|
|
258 |
virtual ~CBCTestNumericPasswordSettingPage(){}
|
|
259 |
};
|
|
260 |
|
|
261 |
/**
|
|
262 |
* CBCTestSingleStyleListBox class
|
|
263 |
*/
|
|
264 |
class CBCTestAlphaPasswordSettingPage : public CAknAlphaPasswordSettingPage
|
|
265 |
{
|
|
266 |
friend class CBCTestMix50PatchControlCase;
|
|
267 |
public:
|
|
268 |
/**
|
|
269 |
* C++ Constructor
|
|
270 |
*/
|
|
271 |
CBCTestAlphaPasswordSettingPage(
|
|
272 |
TInt aResourceID,
|
|
273 |
TDes& aNewPassword,
|
|
274 |
const TDesC& aOldPassword);
|
|
275 |
|
|
276 |
/**
|
|
277 |
* Destructor
|
|
278 |
*/
|
|
279 |
virtual ~CBCTestAlphaPasswordSettingPage(){}
|
|
280 |
};
|
|
281 |
|
|
282 |
/**
|
|
283 |
* CBCTestSingleStyleListBox class
|
|
284 |
*/
|
|
285 |
class CBCTestPasswordSettingPage : public CAknPasswordSettingPage
|
|
286 |
{
|
|
287 |
friend class CBCTestMix50PatchControlCase;
|
|
288 |
public:
|
|
289 |
/**
|
|
290 |
* C++ Constructor
|
|
291 |
*/
|
|
292 |
CBCTestPasswordSettingPage(
|
|
293 |
TInt aResourceID,
|
|
294 |
TDes& aNewPassword,
|
|
295 |
const TDesC& aOldPassword);
|
|
296 |
/**
|
|
297 |
* Destrucotor
|
|
298 |
*/
|
|
299 |
virtual ~CBCTestPasswordSettingPage(){}
|
|
300 |
|
|
301 |
/**
|
|
302 |
* Update the text
|
|
303 |
*/
|
|
304 |
inline void UpdateTextL(){}
|
|
305 |
};
|
|
306 |
|
|
307 |
/**
|
|
308 |
* CBCTestSingleStyleListBox class
|
|
309 |
*/
|
|
310 |
class CBCTestIpFieldSettingPage : public CAknIpFieldSettingPage
|
|
311 |
{
|
|
312 |
friend class CBCTestMix50PatchControlCase;
|
|
313 |
public:
|
|
314 |
/**
|
|
315 |
* C++ Constructor
|
|
316 |
*/
|
|
317 |
CBCTestIpFieldSettingPage( TInt aResourceID, TInetAddr& aIpAddress );
|
|
318 |
};
|
|
319 |
|
|
320 |
|
|
321 |
/**
|
|
322 |
* CBCTestSingleStyleListBox class
|
|
323 |
*/
|
|
324 |
class CBCTestTimeOffsetSettingPage : public CAknTimeOffsetSettingPage
|
|
325 |
{
|
|
326 |
friend class CBCTestMix50PatchControlCase;
|
|
327 |
public:
|
|
328 |
/**
|
|
329 |
* C++ Constructor
|
|
330 |
*/
|
|
331 |
CBCTestTimeOffsetSettingPage( TInt aResourceID,
|
|
332 |
TTimeIntervalSeconds& aTimeOffsetValue );
|
|
333 |
};
|
|
334 |
|
|
335 |
|
|
336 |
/**
|
|
337 |
* CBCTestSingleStyleListBox class
|
|
338 |
*/
|
|
339 |
class CBCTestCheckBoxSettingPage: public CAknCheckBoxSettingPage
|
|
340 |
{
|
|
341 |
friend class CBCTestMix50PatchControlCase;
|
|
342 |
public:
|
|
343 |
/**
|
|
344 |
* C++ Constructor
|
|
345 |
*/
|
|
346 |
CBCTestCheckBoxSettingPage(TInt aResourceID,
|
|
347 |
CSelectionItemList* aItemArray );
|
|
348 |
};
|
|
349 |
|
|
350 |
|
|
351 |
/**
|
|
352 |
* CBCTestSingleStyleListBox class
|
|
353 |
*/
|
|
354 |
class CBCTestSnakingListBox : public CEikSnakingListBox
|
|
355 |
{
|
|
356 |
friend class CBCTestMix50PatchControlCase;
|
|
357 |
};
|
|
358 |
|
|
359 |
/**
|
|
360 |
* helper class for test CAknAppUi
|
|
361 |
*/
|
|
362 |
class CAknAppUiEx: public CAknAppUi
|
|
363 |
{
|
|
364 |
friend class CBCTestMix50PatchControlCase;
|
|
365 |
friend class CBCTestMix50PatchViewCase;
|
|
366 |
public:
|
|
367 |
|
|
368 |
/**
|
|
369 |
* C++ Constructor
|
|
370 |
*/
|
|
371 |
CAknAppUiEx();
|
|
372 |
|
|
373 |
/**
|
|
374 |
* Destructor
|
|
375 |
*/
|
|
376 |
virtual ~CAknAppUiEx();
|
|
377 |
|
|
378 |
protected:
|
|
379 |
/**
|
|
380 |
* Symbian second-phase constructor
|
|
381 |
*/
|
|
382 |
void Construct();
|
|
383 |
};
|
|
384 |
|
|
385 |
|
|
386 |
/**
|
|
387 |
* CBCTestSingleStyleListBox class
|
|
388 |
*/
|
|
389 |
class CBCTestMAknAliasKeyCodeResolver : public CBase,
|
|
390 |
public MAknAliasKeyCodeResolver
|
|
391 |
{
|
|
392 |
friend class CBCTestMix50PatchControlCase;
|
|
393 |
public:
|
|
394 |
/**
|
|
395 |
* Resolves keyboard layout dependent keycode for the given event
|
|
396 |
* @since S60 3.1
|
|
397 |
* @param aCode reference to variable to contain new keycode
|
|
398 |
* @param aKeyEvent reference to original, complete, event
|
|
399 |
* @param aType indicating original event type
|
|
400 |
* @return KErrNone on success, otherwise system wide error codes
|
|
401 |
*/
|
|
402 |
inline TInt GetAliasKeyCode(TUint& /* aCode */,
|
|
403 |
const TKeyEvent& /* aKeyEvent */,TEventCode /* aType */ )
|
|
404 |
{ return 0; }
|
|
405 |
};
|
|
406 |
|
|
407 |
/**
|
|
408 |
* CBCTestFepPen class
|
|
409 |
*/
|
|
410 |
class CBCTestFepPen: public CBase, public MAknFepPenSupportInterface
|
|
411 |
{
|
|
412 |
public:
|
|
413 |
/**
|
|
414 |
* Start pen input method
|
|
415 |
*
|
|
416 |
* @since S60 v3.2
|
|
417 |
* @return None
|
|
418 |
*/
|
|
419 |
inline void ActivatePenInputL(){}
|
|
420 |
|
|
421 |
/**
|
|
422 |
* Close pen input method
|
|
423 |
*
|
|
424 |
* @since S60 v3.2
|
|
425 |
* @return None
|
|
426 |
*/
|
|
427 |
inline void DeactivatePenInputL(){}
|
|
428 |
};
|
|
429 |
|
|
430 |
/**
|
|
431 |
* CBCTestEikFileNameLabel class
|
|
432 |
*/
|
|
433 |
class CBCTestEikFileNameLabel : public CEikFileNameLabel
|
|
434 |
{
|
|
435 |
friend class CBCTestMix50PatchControlCase;
|
|
436 |
};
|
|
437 |
|
|
438 |
/**
|
|
439 |
* MonkFilter
|
|
440 |
*/
|
|
441 |
struct MonkFilter: public MAknFileFilter
|
|
442 |
{
|
|
443 |
|
|
444 |
/**
|
|
445 |
* Checks if a file is accepted by the filter.
|
|
446 |
* @param aDriveAndPath Drive and full path of the file.
|
|
447 |
* @param aEntry A directory entry.
|
|
448 |
* @return Returns ETrue if filter accepts the file.
|
|
449 |
*/
|
|
450 |
TBool Accept( const TDesC& /*aDriveAndPath*/,
|
|
451 |
const TEntry& /*aEntry*/ ) const
|
|
452 |
{
|
|
453 |
return ETrue;
|
|
454 |
}
|
|
455 |
};
|
|
456 |
|
|
457 |
/**
|
|
458 |
* helper class for test CAknAppServiceBase
|
|
459 |
*/
|
|
460 |
class CBCTestAppServiceBase : public CAknAppServiceBase,
|
|
461 |
public MAknServerAppExitObserver
|
|
462 |
{
|
|
463 |
friend class CBCTestMix50PatchViewCase;
|
|
464 |
public:
|
|
465 |
/**
|
|
466 |
* Handle the exit of a connected server app.
|
|
467 |
* This implementation provides Series 60 default behavior
|
|
468 |
* for handling of the EAknCmdExit exit code. Derived classes
|
|
469 |
* should base-call this implementation if they override this
|
|
470 |
* function.
|
|
471 |
* @param aReason The reason that the server application exited.
|
|
472 |
* This will either be an error code,
|
|
473 |
* or the command id that caused
|
|
474 |
* the server app to exit.
|
|
475 |
*/
|
|
476 |
void HandleServerAppExit(TInt aReason);
|
|
477 |
|
|
478 |
protected:
|
|
479 |
/**
|
|
480 |
* Override of CSession2::CreateL().
|
|
481 |
* If further overridden, this function must be base-called.
|
|
482 |
*/
|
|
483 |
void CreateL();
|
|
484 |
|
|
485 |
/**
|
|
486 |
* Override of CSession2::ServiceL().
|
|
487 |
* If further overridden, this function must be base-called.
|
|
488 |
* @param aMessage The client message
|
|
489 |
*/
|
|
490 |
void ServiceL(const RMessage2& aMessage);
|
|
491 |
|
|
492 |
/**
|
|
493 |
* Override of CSession2::ServiceError().
|
|
494 |
* If further overridden, this function must be base-called.
|
|
495 |
* @param aMessage The client message.
|
|
496 |
* @param aError The error code to which
|
|
497 |
* occured during message servicing
|
|
498 |
*/
|
|
499 |
void ServiceError(const RMessage2& aMessage,TInt aError);
|
|
500 |
};
|
|
501 |
|
|
502 |
/**
|
|
503 |
* helper class for test CAknNoteDialog
|
|
504 |
*/
|
|
505 |
class CBCTestAknNoteDialog : public CAknNoteDialog
|
|
506 |
{
|
|
507 |
friend class CBCTestMix50PatchControlCase;
|
|
508 |
public:
|
|
509 |
/**
|
|
510 |
* C++ default constructor.
|
|
511 |
*
|
|
512 |
* @param aSelfPtr Pointer to the address of the dialog.
|
|
513 |
* @param aTone = @c ENoTone The tone.
|
|
514 |
* @param aTimeout = @c ENoTimeout The timeout (microseconds).
|
|
515 |
* @see @c TTone, @c TTimeout.
|
|
516 |
*/
|
|
517 |
IMPORT_C CBCTestAknNoteDialog(CEikDialog** aSelfPtr,
|
|
518 |
const TTone& aTone = ENoTone,
|
|
519 |
const TTimeout& aTimeout = ENoTimeout)
|
|
520 |
: CAknNoteDialog( aSelfPtr, aTone, aTimeout )
|
|
521 |
{
|
|
522 |
|
|
523 |
}
|
|
524 |
|
|
525 |
/**
|
|
526 |
* Deletes the note dialog.
|
|
527 |
*
|
|
528 |
* @see @c TTimer, @c OkToExitL(), @c ExitSleepingDialog().
|
|
529 |
* @param aThis Pointer to the dialog.
|
|
530 |
* @return Always returns @c EFalse.
|
|
531 |
*/
|
|
532 |
IMPORT_C static TInt OwnStaticDeleteL(TAny* aThis)
|
|
533 |
{
|
|
534 |
return CAknNoteDialog::StaticDeleteL( aThis );
|
|
535 |
}
|
|
536 |
};
|
|
537 |
#endif /*C_BCTESTMIX50PATCHMISC_H*/
|