1 /* |
|
2 * Copyright (c) 2005-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 * @file |
|
16 * This contains CTEFIntegrationTestWrapper |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @test |
|
24 @internalComponent |
|
25 */ |
|
26 |
|
27 #if (!defined __TE_REG_BLOCKTEST_WRAPPER_H__) |
|
28 #define __TE_REG_BLOCKTEST_WRAPPER_H__ |
|
29 |
|
30 |
|
31 #include <test/datawrapper.h> |
|
32 |
|
33 class CTe_RegBlockTestWrapper : public CDataWrapper |
|
34 { |
|
35 public: |
|
36 CTe_RegBlockTestWrapper(); |
|
37 ~CTe_RegBlockTestWrapper(); |
|
38 |
|
39 static CTe_RegBlockTestWrapper* NewL(); |
|
40 |
|
41 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); |
|
42 virtual TAny* GetObject() { return iObject; } |
|
43 inline virtual void SetObjectL(TAny* aObject) |
|
44 { |
|
45 DestroyData(); |
|
46 iObject = static_cast<TInt*> (aObject); |
|
47 } |
|
48 |
|
49 inline virtual void DisownObjectL() |
|
50 { |
|
51 iObject = NULL; |
|
52 } |
|
53 |
|
54 void DestroyData() |
|
55 { |
|
56 delete iObject; |
|
57 iObject=NULL; |
|
58 } |
|
59 |
|
60 inline virtual TCleanupOperation CleanupOperation() |
|
61 { |
|
62 return CleanupOperation; |
|
63 } |
|
64 |
|
65 void RunL(CActive* aActive, TInt aIndex); |
|
66 protected: |
|
67 void ConstructL(); |
|
68 private: |
|
69 static void CleanupOperation(TAny* aAny) |
|
70 { |
|
71 TInt* number = static_cast<TInt*>(aAny); |
|
72 delete number; |
|
73 } |
|
74 |
|
75 // commands |
|
76 inline void DoCmdNewL(const TDesC& aEntry); |
|
77 inline void DoCmdModify(const TDesC& aEntry); |
|
78 inline void DoCmdModifyByName(const TDesC& aEntry); |
|
79 inline void DoCmdSetBlockResult(const TDesC& aSection); |
|
80 inline void DoCmdStartTimer(); |
|
81 inline void DoCmdCheckTimer(const TDesC& aSection); |
|
82 inline void DoCmdSetError(const TDesC& aSection); |
|
83 inline void DoCmdPanickingFunction(const TDesC& aSection); |
|
84 inline void DoCmdGetDataWrapper(const TDesC& aSection); |
|
85 inline void DoCmdSetDataObject(const TTEFSectionName& aSection); |
|
86 inline void DoCmdGetDataObject(const TDesC& aSection); |
|
87 inline void DoCmdDummyFunction(); |
|
88 inline void DoCmdIncreaseObjectValue(); |
|
89 inline void DoCmdAddActiveObjectToScheduler(); |
|
90 inline void DoCmdActivateActiveObject(const TDesC& aSection, const TInt aAsyncErrorIndex); |
|
91 inline void DoCmdCheckActiveObjectWorkIsComplete(const TDesC& aSection); |
|
92 inline void DoCmdCancelActiveObject(); |
|
93 inline void DoCmdCallMeFirstMkDir(const TDesC& aSection); |
|
94 inline void DoCmdCallMeSecondRmDir(const TDesC& aSection); |
|
95 inline void DoCmdWriteIntToConfig(const TTEFSectionName& aSection); |
|
96 inline void DoCmdWriteBoolToConfig(const TTEFSectionName& aSection); |
|
97 inline void DoCmdWriteHexToConfig(const TTEFSectionName& aSection); |
|
98 inline void DoCmdWriteStringToConfig(const TTEFSectionName& aSection); |
|
99 inline void DoCmdWriteSharedData(); |
|
100 inline void DoCmdReadSharedData(); |
|
101 inline void DoCmdTestNullController(const TTEFSectionName& aSection); |
|
102 inline void DoCmdLeaveFunction(const TDesC& aSection); |
|
103 // utilities |
|
104 TBool GetVerdictFromConfig(const TDesC& aSection, const TDesC& aParameterName, TVerdict& aVerdict); |
|
105 |
|
106 protected: |
|
107 CActiveCallback* iActiveCallback; |
|
108 TInt* iObject; |
|
109 RTimer* iActiveObject; |
|
110 private: |
|
111 TTime iTimerStart; |
|
112 }; |
|
113 |
|
114 #endif /* __TE_REG_BLOCKTEST_WRAPPER_H__ */ |
|
115 |
|