29 #ifndef PT_REMOTING_ACTIVEPROCEDURE_H
30 #define PT_REMOTING_ACTIVEPROCEDURE_H
32 #include <Pt/Remoting/Api.h>
33 #include <Pt/Remoting/ServiceProcedure.h>
34 #include <Pt/System/EventLoop.h>
35 #include <Pt/Decomposer.h>
36 #include <Pt/Composer.h>
45 template <
typename R,
74 , _a1(&resp.context())
75 , _a2(&resp.context())
76 , _a3(&resp.context())
77 , _a4(&resp.context())
78 , _a5(&resp.context())
79 , _a6(&resp.context())
80 , _a7(&resp.context())
81 , _a8(&resp.context())
82 , _a9(&resp.context())
83 , _a10(&resp.context())
118 onInvoke(loop, _v1, _v2, _v3, _v4, _v5, _v6, _v7, _v8, _v9, _v10);
130 const A1& a1,
const A2& a2,
131 const A3& a3,
const A4& a4,
132 const A5& a5,
const A6& a6,
133 const A7& a7,
const A8& a8,
134 const A9& a9,
const A10& a10) = 0;
165 template <
typename R,
175 class ActiveProcedure<R, A1, A2, A3, A4, A5, A6, A7, A8, A9,
194 , _a1(&resp.context())
195 , _a2(&resp.context())
196 , _a3(&resp.context())
197 , _a4(&resp.context())
198 , _a5(&resp.context())
199 , _a6(&resp.context())
200 , _a7(&resp.context())
201 , _a8(&resp.context())
202 , _a9(&resp.context())
203 , _r(&resp.context())
235 onInvoke(loop, _v1, _v2, _v3, _v4, _v5, _v6, _v7, _v8, _v9);
247 const A1& a1,
const A2& a2,
248 const A3& a3,
const A4& a4,
249 const A5& a5,
const A6& a6,
250 const A7& a7,
const A8& a8,
280 template <
typename R,
309 , _a1(&resp.context())
310 , _a2(&resp.context())
311 , _a3(&resp.context())
312 , _a4(&resp.context())
313 , _a5(&resp.context())
314 , _a6(&resp.context())
315 , _a7(&resp.context())
316 , _a8(&resp.context())
317 , _r(&resp.context())
347 onInvoke(loop, _v1, _v2, _v3, _v4, _v5, _v6, _v7, _v8);
359 const A1& a1,
const A2& a2,
360 const A3& a3,
const A4& a4,
361 const A5& a5,
const A6& a6,
362 const A7& a7,
const A8& a8) = 0;
389 template <
typename R,
418 , _a1(&resp.context())
419 , _a2(&resp.context())
420 , _a3(&resp.context())
421 , _a4(&resp.context())
422 , _a5(&resp.context())
423 , _a6(&resp.context())
424 , _a7(&resp.context())
425 , _r(&resp.context())
453 onInvoke(loop, _v1, _v2, _v3, _v4, _v5, _v6, _v7);
465 const A1& a1,
const A2& a2,
466 const A3& a3,
const A4& a4,
467 const A5& a5,
const A6& a6,
493 template <
typename R,
522 , _a1(&resp.context())
523 , _a2(&resp.context())
524 , _a3(&resp.context())
525 , _a4(&resp.context())
526 , _a5(&resp.context())
527 , _a6(&resp.context())
528 , _r(&resp.context())
554 onInvoke(loop, _v1, _v2, _v3, _v4, _v5, _v6);
566 const A1& a1,
const A2& a2,
567 const A3& a3,
const A4& a4,
568 const A5& a5,
const A6& a6) = 0;
591 template <
typename R,
620 , _a1(&resp.context())
621 , _a2(&resp.context())
622 , _a3(&resp.context())
623 , _a4(&resp.context())
624 , _a5(&resp.context())
625 , _r(&resp.context())
679 onInvoke(loop, _v1, _v2, _v3, _v4, _v5);
691 const A1& a1,
const A2& a2,
692 const A3& a3,
const A4& a4,
714 template <
typename R,
743 , _a1(&resp.context())
744 , _a2(&resp.context())
745 , _a3(&resp.context())
746 , _a4(&resp.context())
747 , _r(&resp.context())
805 const A1& a1,
const A2& a2,
806 const A3& a3,
const A4& a4) = 0;
825 template <
typename R,
854 , _a1(&resp.context())
855 , _a2(&resp.context())
856 , _a3(&resp.context())
857 , _r(&resp.context())
908 const A1& a1,
const A2& a2,
926 template <
typename R,
955 , _a1(&resp.context())
956 , _a2(&resp.context())
957 , _r(&resp.context())
999 const A1& a1,
const A2& a2) = 0;
1014 template <
typename R,
1043 , _a1(&resp.context())
1044 , _r(&resp.context())
1053 const A1& a1()
const
1088 template <
typename R>
1117 , _r( &resp.context() )
1151 template <
typename CallT>
1152 class ActiveProcedureDef :
public ServiceProcedureDef
1161 ~ActiveProcedureDef()
1169 typedef typename CallT::ReturnT R;
1170 typedef typename CallT::Arg1T A1;
1171 typedef typename CallT::Arg2T A2;
1172 typedef typename CallT::Arg3T A3;
1173 typedef typename CallT::Arg4T A4;
1174 typedef typename CallT::Arg5T A5;
1175 typedef typename CallT::Arg6T A6;
1176 typedef typename CallT::Arg7T A7;
1177 typedef typename CallT::Arg8T A8;
1178 typedef typename CallT::Arg9T A9;
1179 typedef typename CallT::Arg10T A10;
1181 ActiveProcedure<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>* proc = _cb->call(resp);
1193 #endif // PT_REMOTING_ACTIVEPROCEDURE_H
XML-RPC service procedure.
Definition: ServiceProcedure.h:44
Asynchronous service procedure.
Definition: ActiveProcedure.h:29
ServiceProcedure(Responder &r)
Constructor.
Definition: ServiceProcedure.h:72
Composes types during serialization.
Definition: Composer.h:42
An interface for all callable entities.
Definition: Callable.h:13
virtual const R & onResult()=0
Return result of the asynchronous procedure.
Thread-safe event loop supporting I/O multiplexing and Timers.
Definition: EventLoop.h:72
void begin(const T &type, const char *name)
Begin decomposing a type.
Definition: Decomposer.h:123
Void type.
Definition: Void.h:43
ActiveProcedure(Responder &resp)
Constructs with Responder.
Dispatches requests to a service procedure.
Definition: Responder.h:49
Manages the decomposition of types during serialization.
Definition: Decomposer.h:43
void begin(T &type)
Begin composing a type.
Definition: Composer.h:279
virtual void onInvoke(System::EventLoop &loop, const ARGS...&args)=0
Start an asynchronous procedure.
virtual Callable * clone() const =0
Returns a copy of this instance.