1 | | |
2 | | |
3 | | |
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
14 | | |
15 | | |
16 | | |
17 | | |
18 | | |
19 | | |
20 | | |
21 | | |
22 | | |
23 | | |
24 | | |
25 | | |
26 | | |
27 | | |
28 | | |
29 | | |
30 | | |
31 | | |
32 | | |
33 | | |
34 | | |
35 | | |
36 | | |
37 | | |
38 | | |
39 | | |
40 | | |
41 | | |
42 | | |
43 | | |
44 | | |
45 | | |
46 | | |
47 | | |
48 | | |
49 | | |
50 | | |
51 | | |
52 | | |
53 | | |
54 | | |
55 | | |
56 | | |
57 | | |
58 | | |
59 | | |
60 | | |
61 | | |
62 | | |
| #pike __REAL_VERSION__ | | | #include "remote.h" | | constant is_remote_call = 1; | | string objectid; | string name; | object con; | object ctx; | int _async; | | mixed `() (mixed ... args) | { | mixed data = ctx->encode_call(objectid, name, args, | _async ? CTX_CALL_ASYNC : CTX_CALL_SYNC); | if (_async) | con->call_async(data); | else | return con->call_sync(data); | return 0; | } | | mixed sync(mixed ... args) | { | mixed data = ctx->encode_call(objectid, name, args, CTX_CALL_SYNC); | return con->call_sync(data); | } | | void async(mixed ... args) | { | mixed data = ctx->encode_call(objectid, name, args, CTX_CALL_ASYNC); | con->call_async(data); | } | | int exists() | { | mixed data = ctx->encode_call(objectid, name, ({}), CTX_EXISTS); | return con->call_sync(data); | } | | int is_async() | { | return _async; | } | | void set_async(int a) | { | _async = a; | } | | void create(string oid, string n, object cn, object ct, int a) | { | objectid = oid; | name = n; | con = cn; | ctx = ct; | _async = a; | } | | |
|