|
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 @file |
|
22 */ |
|
23 |
|
24 |
|
25 #ifndef __CMTF_TEST_ACTION_NAME_PAIR_H__ |
|
26 #define __CMTF_TEST_ACTION_NAME_PAIR_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 class CMtfTestCase; |
|
30 class CMtfTestAction; |
|
31 class CMtfTestActionParameters; |
|
32 |
|
33 typedef CMtfTestAction* (*ActionNewL)(CMtfTestCase&,CMtfTestActionParameters*); |
|
34 |
|
35 /** Represents a pair consisting of a test action name and a function pointer. |
|
36 Used by the framework to maintain a mapping between action names and functions that |
|
37 can be used to create an instance of the corresponding action. */ |
|
38 class CMtfTestActionNamePair : public CBase |
|
39 { |
|
40 public: |
|
41 static CMtfTestActionNamePair* NewL(const TDesC& aActionName, |
|
42 ActionNewL aFunctionPointer); |
|
43 virtual ~CMtfTestActionNamePair(); |
|
44 const TDesC& Name() const; |
|
45 |
|
46 /** Creates a new test action object. The specific derived test action class instance is |
|
47 created. Ownership of aActionParameters is taken at the end. */ |
|
48 CMtfTestAction* CreateTestActionL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) const; |
|
49 |
|
50 private: |
|
51 void ConstructL(const TDesC& aStepName, ActionNewL aFunctionPointer); |
|
52 |
|
53 private: |
|
54 HBufC* iName; |
|
55 ActionNewL iFunctionPointer; |
|
56 }; |
|
57 |
|
58 |
|
59 #endif |