|
1 /* |
|
2 * Copyright (c) 2002 - 2007 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef BTAPITEST_H |
|
21 #define BTAPITEST_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <StifLogger.h> |
|
25 #include <TestScripterInternal.h> |
|
26 #include <StifTestModule.h> |
|
27 #include <atextpluginbase.h> |
|
28 #include "atextpluginobserver.h" |
|
29 #include "bttestlogger.h" |
|
30 |
|
31 // CONSTANTS |
|
32 //const ?type ?constant_var = ?constant; |
|
33 |
|
34 // MACROS |
|
35 //#define ?macro ?macro_def |
|
36 // Logging path |
|
37 // Log file |
|
38 |
|
39 // FUNCTION PROTOTYPES |
|
40 //?type ?function_name(?arg_list); |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 |
|
44 // DATA TYPES |
|
45 //enum ?declaration |
|
46 //typedef ?declaration |
|
47 //extern ?data_type; |
|
48 |
|
49 // CLASS DECLARATION |
|
50 |
|
51 /** |
|
52 * CCAtExtPluginApiTest test class for STIF Test Framework TestScripter. |
|
53 * ?other_description_lines |
|
54 * |
|
55 * @lib ?library |
|
56 * @since ?Series60_version |
|
57 */ |
|
58 NONSHARABLE_CLASS(CAtExtPluginApiTest) : public CScriptBase, public MATExtPluginObserver |
|
59 { |
|
60 public: // Constructors and destructor |
|
61 |
|
62 /** |
|
63 * Two-phased constructor. |
|
64 */ |
|
65 static CAtExtPluginApiTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 */ |
|
70 virtual ~CAtExtPluginApiTest(); |
|
71 |
|
72 public: // New functions |
|
73 |
|
74 /** |
|
75 * ?member_description. |
|
76 * @since ?Series60_version |
|
77 * @param ?arg1 ?description |
|
78 * @return ?description |
|
79 */ |
|
80 //?type ?member_function( ?type ?arg1 ); |
|
81 |
|
82 public: // Functions from base classes |
|
83 |
|
84 /** |
|
85 * From CScriptBase Runs a script line. |
|
86 * @since ?Series60_version |
|
87 * @param aItem Script line containing method name and parameters |
|
88 * @return Symbian OS error code |
|
89 */ |
|
90 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
91 |
|
92 private: // From MATExtPluginObserver |
|
93 |
|
94 TInt SendUnsolicitedResult(CATExtPluginBase& aPlugin, const TDesC8& aAT); |
|
95 |
|
96 void HandleCommandCompleted(CATExtPluginBase& aPlugin, TInt aErr); |
|
97 |
|
98 void ATExtPluginClosed(CATExtPluginBase& aPlugin); |
|
99 |
|
100 private: |
|
101 |
|
102 /** |
|
103 * C++ default constructor. |
|
104 */ |
|
105 CAtExtPluginApiTest( CTestModuleIf& aTestModuleIf ); |
|
106 |
|
107 /** |
|
108 * By default Symbian 2nd phase constructor is private. |
|
109 */ |
|
110 void ConstructL(); |
|
111 |
|
112 // Prohibit copy constructor if not deriving from CBase. |
|
113 // ?classname( const ?classname& ); |
|
114 // Prohibit assigment operator if not deriving from CBase. |
|
115 // ?classname& operator=( const ?classname& ); |
|
116 |
|
117 /** |
|
118 * Frees all resources allocated from test methods. |
|
119 * @since ?Series60_version |
|
120 */ |
|
121 void Delete(); |
|
122 |
|
123 /** |
|
124 * Test methods are listed below. |
|
125 */ |
|
126 |
|
127 /** |
|
128 * Test methods. |
|
129 * @since ?Series60_version |
|
130 * @param aItem Script line containing parameters. |
|
131 * @return Symbian OS error code. |
|
132 */ |
|
133 TInt TestPluginStub ( CStifItemParser& aItem ); |
|
134 |
|
135 void LoadPluginStubL(); |
|
136 |
|
137 private: // Data |
|
138 |
|
139 CATExtPluginBase* iPlugin; |
|
140 RBuf8 iCmdBuf; |
|
141 CBtTestLogger* iLogger; |
|
142 }; |
|
143 |
|
144 #endif // BTAPITEST_H |
|
145 |
|
146 // End of File |