|
1 /* |
|
2 * Copyright (c) 2008 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 #ifndef LEGACYEVENTSERVERWRAPPER_H |
|
20 #define LEGACYEVENTSERVERWRAPPER_H |
|
21 |
|
22 #include "functionserver.h" |
|
23 #include "fs_methodcall.h" |
|
24 #include "logger.h" |
|
25 |
|
26 #pragma warning(disable: 4786) // Truncated browser info for long mangled names |
|
27 |
|
28 class LegacyEventServerWrapper : public CBase |
|
29 { |
|
30 public: |
|
31 virtual java::util::FunctionServer* getFunctionServer() const = 0; |
|
32 |
|
33 |
|
34 //*****Execute****** |
|
35 template <class R, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9> |
|
36 inline R Execute(R(*func)(T1,T2,T3,T4,T5,T6,T7,T8,T9), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) |
|
37 { |
|
38 JELOG2(EUtils); |
|
39 return CallMethod(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, getFunctionServer()); |
|
40 } |
|
41 |
|
42 template <class R, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8> |
|
43 inline R Execute(R(*func)(T1,T2,T3,T4,T5,T6,T7,T8), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) |
|
44 { |
|
45 JELOG2(EUtils); |
|
46 return CallMethod(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, getFunctionServer()); |
|
47 } |
|
48 |
|
49 template <class R, class T1, class T2, class T3, class T4, class T5, class T6, class T7> |
|
50 inline R Execute(R(*func)(T1,T2,T3,T4,T5,T6,T7), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) |
|
51 { |
|
52 JELOG2(EUtils); |
|
53 return CallMethod(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, getFunctionServer()); |
|
54 } |
|
55 |
|
56 template <class R, class T1, class T2, class T3, class T4, class T5, class T6> |
|
57 inline R Execute(R(*func)(T1,T2,T3,T4,T5,T6), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) |
|
58 { |
|
59 JELOG2(EUtils); |
|
60 return CallMethod(func, arg1, arg2, arg3, arg4, arg5, arg6, getFunctionServer()); |
|
61 } |
|
62 |
|
63 template <class R, class T1, class T2, class T3, class T4, class T5> |
|
64 inline R Execute(R(*func)(T1,T2,T3,T4,T5), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) |
|
65 { |
|
66 JELOG2(EUtils); |
|
67 return CallMethod(func, arg1, arg2, arg3, arg4, arg5, getFunctionServer()); |
|
68 } |
|
69 |
|
70 template <class R, class T1, class T2, class T3, class T4> |
|
71 inline R Execute(R(*func)(T1,T2,T3,T4), T1 arg1, T2 arg2, T3 arg3, T4 arg4) |
|
72 { |
|
73 JELOG2(EUtils); |
|
74 return CallMethod(func, arg1, arg2, arg3, arg4, getFunctionServer()); |
|
75 } |
|
76 |
|
77 template <class R, class T1, class T2, class T3> |
|
78 inline R Execute(R(*func)(T1,T2,T3), T1 arg1, T2 arg2, T3 arg3) |
|
79 { |
|
80 JELOG2(EUtils); |
|
81 return CallMethod(func, arg1, arg2, arg3, getFunctionServer()); |
|
82 } |
|
83 |
|
84 template <class R, class T1, class T2> |
|
85 inline R Execute(R(*func)(T1,T2), T1 arg1, T2 arg2) |
|
86 { |
|
87 JELOG2(EUtils); |
|
88 return CallMethod(func, arg1, arg2, getFunctionServer()); |
|
89 } |
|
90 |
|
91 template <class R, class T1> |
|
92 inline R Execute(R(*func)(T1), T1 arg1) |
|
93 { |
|
94 JELOG2(EUtils); |
|
95 return CallMethod(func, arg1, getFunctionServer()); |
|
96 } |
|
97 |
|
98 template <class R> |
|
99 inline R Execute(R(*func)()) |
|
100 { |
|
101 JELOG2(EUtils); |
|
102 return CallMethod(func, getFunctionServer()); |
|
103 } |
|
104 |
|
105 |
|
106 //*****ExecuteV****** |
|
107 |
|
108 template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9> |
|
109 inline void ExecuteV(void (*func)(T1,T2,T3,T4,T5,T6,T7,T8,T9), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) |
|
110 { |
|
111 JELOG2(EUtils); |
|
112 CallMethod(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, getFunctionServer()); |
|
113 } |
|
114 |
|
115 template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8> |
|
116 inline void ExecuteV(void (*func)(T1,T2,T3,T4,T5,T6,T7,T8), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) |
|
117 { |
|
118 JELOG2(EUtils); |
|
119 CallMethod(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, getFunctionServer()); |
|
120 } |
|
121 |
|
122 template <class T1, class T2, class T3, class T4, class T5, class T6, class T7> |
|
123 inline void ExecuteV(void (*func)(T1,T2,T3,T4,T5,T6,T7), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) |
|
124 { |
|
125 JELOG2(EUtils); |
|
126 CallMethod(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, getFunctionServer()); |
|
127 } |
|
128 |
|
129 template <class T1, class T2, class T3, class T4, class T5, class T6> |
|
130 inline void ExecuteV(void (*func)(T1,T2,T3,T4,T5,T6), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) |
|
131 { |
|
132 JELOG2(EUtils); |
|
133 CallMethod(func, arg1, arg2, arg3, arg4, arg5, arg6, getFunctionServer()); |
|
134 } |
|
135 |
|
136 template <class T1, class T2, class T3, class T4, class T5> |
|
137 inline void ExecuteV(void (*func)(T1,T2,T3,T4,T5), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) |
|
138 { |
|
139 JELOG2(EUtils); |
|
140 CallMethod(func, arg1, arg2, arg3, arg4, arg5, getFunctionServer()); |
|
141 } |
|
142 |
|
143 template <class T1, class T2, class T3, class T4> |
|
144 inline void ExecuteV(void (*func)(T1,T2,T3,T4), T1 arg1, T2 arg2, T3 arg3, T4 arg4) |
|
145 { |
|
146 JELOG2(EUtils); |
|
147 CallMethod(func, arg1, arg2, arg3, arg4, getFunctionServer()); |
|
148 } |
|
149 |
|
150 template <class T1, class T2, class T3> |
|
151 inline void ExecuteV(void (*func)(T1,T2,T3), T1 arg1, T2 arg2, T3 arg3) |
|
152 { |
|
153 JELOG2(EUtils); |
|
154 CallMethod(func, arg1, arg2, arg3, getFunctionServer()); |
|
155 } |
|
156 |
|
157 template <class T1, class T2> |
|
158 inline void ExecuteV(void (*func)(T1,T2), T1 arg1, T2 arg2) |
|
159 { |
|
160 JELOG2(EUtils); |
|
161 CallMethod(func, arg1, arg2, getFunctionServer()); |
|
162 } |
|
163 |
|
164 template <class T1> |
|
165 inline void ExecuteV(void (*func)(T1), T1 arg1) |
|
166 { |
|
167 JELOG2(EUtils); |
|
168 CallMethod(func, arg1, getFunctionServer()); |
|
169 } |
|
170 |
|
171 inline void ExecuteV(void (*func)()) |
|
172 { |
|
173 JELOG2(EUtils); |
|
174 CallMethod(func, getFunctionServer()); |
|
175 } |
|
176 /* |
|
177 //*****ExecuteTrap****** |
|
178 |
|
179 template <class R, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9> |
|
180 inline void ExecuteTrap(void (*func)(T1,T2,T3,T4,T5,T6,T7,T8,T9), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) |
|
181 { |
|
182 JELOG2(EUtils); |
|
183 return CallMethodTrap(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, getFunctionServer()); |
|
184 } |
|
185 */ |
|
186 |
|
187 template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9> |
|
188 inline int ExecuteTrap(void (*func)(T1,T2,T3,T4,T5,T6,T7,T8,T9), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) |
|
189 { |
|
190 JELOG2(EUtils); |
|
191 return CallMethodTrap(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, getFunctionServer()); |
|
192 } |
|
193 |
|
194 template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8> |
|
195 inline int ExecuteTrap(void (*func)(T1,T2,T3,T4,T5,T6,T7,T8), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) |
|
196 { |
|
197 JELOG2(EUtils); |
|
198 return CallMethodTrap(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, getFunctionServer()); |
|
199 } |
|
200 |
|
201 template <class T1, class T2, class T3, class T4, class T5, class T6, class T7> |
|
202 inline int ExecuteTrap(void (*func)(T1,T2,T3,T4,T5,T6,T7), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) |
|
203 { |
|
204 JELOG2(EUtils); |
|
205 return CallMethodTrap(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, getFunctionServer()); |
|
206 } |
|
207 |
|
208 template <class T1, class T2, class T3, class T4, class T5, class T6> |
|
209 inline int ExecuteTrap(void (*func)(T1,T2,T3,T4,T5,T6), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) |
|
210 { |
|
211 JELOG2(EUtils); |
|
212 return CallMethodTrap(func, arg1, arg2, arg3, arg4, arg5, arg6, getFunctionServer()); |
|
213 } |
|
214 |
|
215 template <class T1, class T2, class T3, class T4, class T5> |
|
216 inline int ExecuteTrap(void (*func)(T1,T2,T3,T4,T5), T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) |
|
217 { |
|
218 JELOG2(EUtils); |
|
219 return CallMethodTrap(func, arg1, arg2, arg3, arg4, arg5, getFunctionServer()); |
|
220 } |
|
221 |
|
222 template <class T1, class T2, class T3, class T4> |
|
223 inline int ExecuteTrap(void (*func)(T1,T2,T3,T4), T1 arg1, T2 arg2, T3 arg3, T4 arg4) |
|
224 { |
|
225 JELOG2(EUtils); |
|
226 return CallMethodTrap(func, arg1, arg2, arg3, arg4, getFunctionServer()); |
|
227 } |
|
228 |
|
229 template <class T1, class T2, class T3> |
|
230 inline int ExecuteTrap(void (*func)(T1,T2,T3), T1 arg1, T2 arg2, T3 arg3) |
|
231 { |
|
232 JELOG2(EUtils); |
|
233 return CallMethodTrap(func, arg1, arg2, arg3, getFunctionServer()); |
|
234 } |
|
235 |
|
236 template <class T1, class T2> |
|
237 inline int ExecuteTrap(void (*func)(T1,T2), T1 arg1, T2 arg2) |
|
238 { |
|
239 JELOG2(EUtils); |
|
240 return CallMethodTrap(func, arg1, arg2, getFunctionServer()); |
|
241 } |
|
242 |
|
243 template <class T1> |
|
244 inline int ExecuteTrap(void (*func)(T1), T1 arg1) |
|
245 { |
|
246 JELOG2(EUtils); |
|
247 return CallMethodTrap(func, arg1, getFunctionServer()); |
|
248 } |
|
249 |
|
250 inline int ExecuteTrap(void (*func)()) |
|
251 { |
|
252 JELOG2(EUtils); |
|
253 return CallMethodTrap(func, getFunctionServer()); |
|
254 } |
|
255 |
|
256 /* |
|
257 template <class T1,class T2> |
|
258 inline int ExecuteTrap(void (*func)(T1,T2),T1 arg1,T2 arg2) |
|
259 { |
|
260 JELOG2(EUtils); |
|
261 return CallMethodTrap(func, arg1, arg2, getFunctionServer()); |
|
262 } |
|
263 inline int ExecuteTrap(void (*func)()) |
|
264 { |
|
265 JELOG2(EUtils); |
|
266 return CallMethodTrap(func, getFunctionServer()); |
|
267 } |
|
268 */ |
|
269 }; |
|
270 #pragma warning(default: 4786) |
|
271 |
|
272 #endif // LEGACYEVENTSERVERWRAPPER_H |
|
273 |