2 * Copyright (C) 2016-2019 "IoT.bzh"
3 * Author: José Bollo <jose.bollo@iot.bzh>
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
29 /******************************************************************************/
32 struct afb_export *export,
35 struct json_object *args,
36 void (*callback)(void*, struct json_object*, const char *error, const char *info, struct afb_api_x3*),
40 int afb_calls_call_sync(
41 struct afb_export *export,
44 struct json_object *args,
45 struct json_object **object,
50 void afb_calls_subcall(
51 struct afb_xreq *xreq,
54 struct json_object *args,
56 void (*callback)(void *closure, struct json_object *object, const char *error, const char * info, struct afb_req_x2 *req),
60 int afb_calls_subcall_sync(
61 struct afb_xreq *xreq,
64 struct json_object *args,
66 struct json_object **object,
70 /******************************************************************************/
74 void afb_calls_hooked_call(
75 struct afb_export *export,
78 struct json_object *args,
79 void (*callback)(void*, struct json_object*, const char *error, const char *info, struct afb_api_x3*),
83 int afb_calls_hooked_call_sync(
84 struct afb_export *export,
87 struct json_object *args,
88 struct json_object **object,
93 void afb_calls_hooked_subcall(
94 struct afb_xreq *xreq,
97 struct json_object *args,
99 void (*callback)(void *closure, struct json_object *object, const char *error, const char * info, struct afb_req_x2 *req),
103 int afb_calls_hooked_subcall_sync(
104 struct afb_xreq *xreq,
107 struct json_object *args,
109 struct json_object **object,
113 #endif /* WITH_AFB_HOOK */
114 /******************************************************************************/
117 void afb_calls_legacy_call_v12(
118 struct afb_export *export,
121 struct json_object *args,
122 void (*callback)(void*, int, struct json_object*),
126 void afb_calls_legacy_call_v3(
127 struct afb_export *export,
130 struct json_object *args,
131 void (*callback)(void*, int, struct json_object*, struct afb_api_x3 *),
135 int afb_calls_legacy_call_sync(
136 struct afb_export *export,
139 struct json_object *args,
140 struct json_object **result);
142 /******************************************************************************/
146 void afb_calls_legacy_hooked_call_v12(
147 struct afb_export *export,
150 struct json_object *args,
151 void (*callback)(void*, int, struct json_object*),
155 void afb_calls_legacy_hooked_call_v3(
156 struct afb_export *export,
159 struct json_object *args,
160 void (*callback)(void*, int, struct json_object*, struct afb_api_x3 *),
164 int afb_calls_legacy_hooked_call_sync(
165 struct afb_export *export,
168 struct json_object *args,
169 struct json_object **result);
171 #endif /* WITH_AFB_HOOK */
172 /******************************************************************************/
175 void afb_calls_legacy_subcall_v1(
176 struct afb_xreq *caller,
179 struct json_object *args,
180 void (*callback)(void*, int, struct json_object*),
184 void afb_calls_legacy_subcall_v2(
185 struct afb_xreq *caller,
188 struct json_object *args,
189 void (*callback)(void*, int, struct json_object*, struct afb_req_x1),
193 void afb_calls_legacy_subcall_v3(
194 struct afb_xreq *caller,
197 struct json_object *args,
198 void (*callback)(void*, int, struct json_object*, struct afb_req_x2 *),
202 int afb_calls_legacy_subcall_sync(
203 struct afb_xreq *caller,
206 struct json_object *args,
207 struct json_object **result);
209 /******************************************************************************/
213 void afb_calls_legacy_hooked_subcall_v1(
214 struct afb_xreq *caller,
217 struct json_object *args,
218 void (*callback)(void*, int, struct json_object*),
222 void afb_calls_legacy_hooked_subcall_v2(
223 struct afb_xreq *caller,
226 struct json_object *args,
227 void (*callback)(void*, int, struct json_object*, struct afb_req_x1),
231 void afb_calls_legacy_hooked_subcall_v3(
232 struct afb_xreq *caller,
235 struct json_object *args,
236 void (*callback)(void*, int, struct json_object*, struct afb_req_x2 *),
240 int afb_calls_legacy_hooked_subcall_sync(
241 struct afb_xreq *caller,
244 struct json_object *args,
245 struct json_object **result);
247 #endif /* WITH_AFB_HOOK */
248 /******************************************************************************/