2 * Copyright (C) 2016, 2017, 2018 "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 /******************************************************************************/
33 struct afb_export *export,
36 struct json_object *args,
37 void (*callback)(void*, struct json_object*, const char *error, const char *info, struct afb_api_x3*),
41 void afb_calls_hooked_call(
42 struct afb_export *export,
45 struct json_object *args,
46 void (*callback)(void*, struct json_object*, const char *error, const char *info, struct afb_api_x3*),
50 int afb_calls_call_sync(
51 struct afb_export *export,
54 struct json_object *args,
55 struct json_object **object,
60 int afb_calls_hooked_call_sync(
61 struct afb_export *export,
64 struct json_object *args,
65 struct json_object **object,
70 void afb_calls_subcall(
71 struct afb_xreq *xreq,
74 struct json_object *args,
76 void (*callback)(void *closure, struct json_object *object, const char *error, const char * info, struct afb_req_x2 *req),
80 void afb_calls_hooked_subcall(
81 struct afb_xreq *xreq,
84 struct json_object *args,
86 void (*callback)(void *closure, struct json_object *object, const char *error, const char * info, struct afb_req_x2 *req),
90 int afb_calls_subcall_sync(
91 struct afb_xreq *xreq,
94 struct json_object *args,
96 struct json_object **object,
101 int afb_calls_hooked_subcall_sync(
102 struct afb_xreq *xreq,
105 struct json_object *args,
107 struct json_object **object,
111 /******************************************************************************/
114 void afb_calls_legacy_call_v12(
115 struct afb_export *export,
118 struct json_object *args,
119 void (*callback)(void*, int, struct json_object*),
123 void afb_calls_legacy_hooked_call_v12(
124 struct afb_export *export,
127 struct json_object *args,
128 void (*callback)(void*, int, struct json_object*),
132 void afb_calls_legacy_call_v3(
133 struct afb_export *export,
136 struct json_object *args,
137 void (*callback)(void*, int, struct json_object*, struct afb_api_x3 *),
141 void afb_calls_legacy_hooked_call_v3(
142 struct afb_export *export,
145 struct json_object *args,
146 void (*callback)(void*, int, struct json_object*, struct afb_api_x3 *),
150 int afb_calls_legacy_call_sync(
151 struct afb_export *export,
154 struct json_object *args,
155 struct json_object **result);
158 int afb_calls_legacy_hooked_call_sync(
159 struct afb_export *export,
162 struct json_object *args,
163 struct json_object **result);
165 /******************************************************************************/
168 void afb_calls_legacy_subcall_v1(
169 struct afb_xreq *caller,
172 struct json_object *args,
173 void (*callback)(void*, int, struct json_object*),
177 void afb_calls_legacy_hooked_subcall_v1(
178 struct afb_xreq *caller,
181 struct json_object *args,
182 void (*callback)(void*, int, struct json_object*),
186 void afb_calls_legacy_subcall_v2(
187 struct afb_xreq *caller,
190 struct json_object *args,
191 void (*callback)(void*, int, struct json_object*, struct afb_req_x1),
195 void afb_calls_legacy_hooked_subcall_v2(
196 struct afb_xreq *caller,
199 struct json_object *args,
200 void (*callback)(void*, int, struct json_object*, struct afb_req_x1),
204 void afb_calls_legacy_subcall_v3(
205 struct afb_xreq *caller,
208 struct json_object *args,
209 void (*callback)(void*, int, struct json_object*, struct afb_req_x2 *),
213 void afb_calls_legacy_hooked_subcall_v3(
214 struct afb_xreq *caller,
217 struct json_object *args,
218 void (*callback)(void*, int, struct json_object*, struct afb_req_x2 *),
222 int afb_calls_legacy_subcall_sync(
223 struct afb_xreq *caller,
226 struct json_object *args,
227 struct json_object **result);
230 int afb_calls_legacy_hooked_subcall_sync(
231 struct afb_xreq *caller,
234 struct json_object *args,
235 struct json_object **result);