|
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: |
|
15 * |
|
16 */ |
|
17 // INCLUDE FILES |
|
18 #include <e32svr.h> |
|
19 #include <StifParser.h> |
|
20 #include <Stiftestinterface.h> |
|
21 #include "ahpluginapitest.h" |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CClientServiceTester::NewL |
|
27 // Two-phased constructor. |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 CAHPluginApiTest::CAHPluginApiTest( |
|
31 CTestModuleIf& aTestModuleIf ): |
|
32 CScriptBase( aTestModuleIf ) |
|
33 { |
|
34 TestModuleIf().SetBehavior( CTestModuleIf::ETestLeaksMem ); |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CClientServiceTester::ConstructL |
|
39 // Symbian 2nd phase constructor can leave. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 void CAHPluginApiTest::ConstructL() |
|
43 { |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CClientServiceTester::NewL |
|
48 // Two-phased constructor. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CAHPluginApiTest* CAHPluginApiTest::NewL( |
|
52 CTestModuleIf& aTestModuleIf ) |
|
53 { |
|
54 CAHPluginApiTest* self = new (ELeave) CAHPluginApiTest( aTestModuleIf ); |
|
55 |
|
56 CleanupStack::PushL( self ); |
|
57 self->ConstructL(); |
|
58 CleanupStack::Pop(); |
|
59 |
|
60 return self; |
|
61 } |
|
62 |
|
63 // Destructor |
|
64 CAHPluginApiTest::~CAHPluginApiTest() |
|
65 { |
|
66 } |
|
67 |
|
68 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // LibEntryL is a polymorphic Dll entry point. |
|
72 // Returns: CScriptBase: New CScriptBase derived object |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 EXPORT_C CScriptBase* LibEntryL( |
|
76 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
77 { |
|
78 |
|
79 return ( CScriptBase* ) CAHPluginApiTest::NewL( aTestModuleIf ); |
|
80 |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // E32Dll is a DLL entry point function. |
|
85 // Returns: KErrNone |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 #ifndef EKA2 // Hide Dll entry point to EKA2 |
|
89 GLDEF_C TInt E32Dll( |
|
90 TDllReason /*aReason*/) // Reason code |
|
91 { |
|
92 return(KErrNone); |
|
93 |
|
94 } |
|
95 #endif // EKA2 |
|
96 |
|
97 // ----------------------------------------------------------------------------- |
|
98 // CMCSAPITest::RunMethodL |
|
99 // Run specified method. Contains also table of test mothods and their names. |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 TInt CAHPluginApiTest::RunMethodL( |
|
103 CStifItemParser& aItem ) |
|
104 { |
|
105 |
|
106 static TStifFunctionInfo const KFunctions[] = |
|
107 { |
|
108 |
|
109 ENTRY( "Test_CAHPluginExecuteActionL", CAHPluginApiTest::Test_CAHPluginExecuteActionL ), |
|
110 }; |
|
111 |
|
112 const TInt count = sizeof( KFunctions ) / |
|
113 sizeof( TStifFunctionInfo ); |
|
114 |
|
115 return RunInternalL( KFunctions, count, aItem ); |
|
116 |
|
117 } |
|
118 |
|
119 // End of File |