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