|
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: This file contains kernel testclass implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "TemplateKernelScriptXXX.h" |
|
20 |
|
21 // EXTERNAL DATA STRUCTURES |
|
22 //extern ?external_data; |
|
23 |
|
24 // EXTERNAL FUNCTION PROTOTYPES |
|
25 //extern ?external_function( ?arg_type,?arg_type ); |
|
26 |
|
27 // CONSTANTS |
|
28 //const ?type ?constant_var = ?constant; |
|
29 |
|
30 // MACROS |
|
31 //#define ?macro ?macro_def |
|
32 |
|
33 // LOCAL CONSTANTS AND MACROS |
|
34 //const ?type ?constant_var = ?constant; |
|
35 //#define ?macro_name ?macro_def |
|
36 |
|
37 // MODULE DATA STRUCTURES |
|
38 //enum ?declaration |
|
39 //typedef ?declaration |
|
40 |
|
41 // LOCAL FUNCTION PROTOTYPES |
|
42 //?type ?function_name( ?arg_type, ?arg_type ); |
|
43 |
|
44 // FORWARD DECLARATIONS |
|
45 //class ?FORWARD_CLASSNAME; |
|
46 |
|
47 // ============================= LOCAL FUNCTIONS =============================== |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // ?function_name ?description. |
|
51 // ?description |
|
52 // Returns: ?value_1: ?description |
|
53 // ?value_n: ?description_line1 |
|
54 // ?description_line2 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 /* |
|
58 ?type ?function_name( |
|
59 ?arg_type arg, // ?description |
|
60 ?arg_type arg) // ?description |
|
61 { |
|
62 |
|
63 ?code // ?comment |
|
64 |
|
65 // ?comment |
|
66 ?code |
|
67 } |
|
68 */ |
|
69 |
|
70 // ============================ MEMBER FUNCTIONS =============================== |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // DTemplateKernelScriptXXX::Delete |
|
74 // Delete here all resources allocated and opened from test methods. |
|
75 // Called from destructor. |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 void DTemplateKernelScriptXXX::Delete() |
|
79 { |
|
80 |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // DTemplateKernelScriptXXX::RunMethodL |
|
85 // Run specified method. Contains also table of test mothods and their names. |
|
86 // |
|
87 // Note that in EKA2 methods cannot leave and therefore RunMethodL isn't leaving |
|
88 // function dispite of its name! |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 TInt DTemplateKernelScriptXXX::RunMethodL( |
|
92 const TDesC& aMethod, |
|
93 const TDesC& aParams ) |
|
94 { |
|
95 |
|
96 static TStifFunctionInfo const KFunctions[] = |
|
97 { |
|
98 // Copy this line for every implemented function. |
|
99 // First string is the function name used in TestScripter script file. |
|
100 // Second is the actual implementation member function. |
|
101 ENTRY( "Example", DTemplateKernelScriptXXX::ExampleL ), |
|
102 |
|
103 }; |
|
104 |
|
105 const TInt count = sizeof( KFunctions ) / |
|
106 sizeof( TStifFunctionInfo ); |
|
107 |
|
108 return RunInternalL( KFunctions, count, aMethod, aParams ); |
|
109 |
|
110 } |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // DTemplateKernelScriptXXX::ExampleL |
|
114 // Example test method function. |
|
115 // (other items were commented in a header). |
|
116 // ----------------------------------------------------------------------------- |
|
117 // |
|
118 TInt DTemplateKernelScriptXXX::ExampleL( |
|
119 const TDesC& aParams ) |
|
120 { |
|
121 Kern::Printf( ("DTemplateKernelScriptXXX::ExampleL(%S)"), &aParams ); |
|
122 |
|
123 return KErrNone; |
|
124 |
|
125 } |
|
126 |
|
127 // ----------------------------------------------------------------------------- |
|
128 // DTemplateKernelScriptXXX::?member_function |
|
129 // ?implementation_description |
|
130 // (other items were commented in a header). |
|
131 // ----------------------------------------------------------------------------- |
|
132 // |
|
133 /* |
|
134 TInt DTemplateKernelScriptXXX::?member_function( |
|
135 const TDesC& aParams ) |
|
136 { |
|
137 |
|
138 ?code |
|
139 |
|
140 } |
|
141 */ |
|
142 |
|
143 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
144 // None |
|
145 |
|
146 // End of File |