Allow dynamic creation of APIs
[src/app-framework-binder.git] / include / afb / afb-request.h
index acfb7ea..678922b 100644 (file)
@@ -19,8 +19,6 @@
 
 #include "afb-request-itf.h"
 
-typedef struct afb_request afb_request;
-
 /*
  * Gets from the request 'request' the argument of 'name'.
  * Returns a PLAIN structure of type 'struct afb_arg'.
@@ -274,9 +272,9 @@ static inline int afb_request_unsubscribe(struct afb_request *request, struct af
  *  - 'afb_request_subcall_req' that is convenient to keep request alive automatically.
  *  - 'afb_request_subcall_sync' the synchronous version
  */
-static inline void afb_request_subcall(struct afb_request *request, const char *api, const char *verb, struct json_object *args, void (*callback)(void *closure, int iserror, struct json_object *result), void *closure)
+static inline void afb_request_subcall(struct afb_request *request, const char *api, const char *verb, struct json_object *args, void (*callback)(void *closure, int iserror, struct json_object *result, struct afb_request *request), void *closure)
 {
-       request->itf->subcall(request, api, verb, args, callback, closure);
+       request->itf->subcall_request(request, api, verb, args, callback, closure);
 }
 
 /*