jobs: Switch back to sd_event
[src/app-framework-binder.git] / include / afb / afb-request-itf.h
index 9e55a36..44066c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 "IoT.bzh"
+ * Copyright (C) 2016, 2017, 2018 "IoT.bzh"
  * Author: José Bollo <jose.bollo@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,6 +28,7 @@ struct json_object;
 struct afb_req;
 struct afb_event;
 struct afb_eventid;
+struct afb_dynapi;
 struct afb_stored_req;
 
 /*
@@ -42,9 +43,26 @@ struct afb_arg
                                /* when the request is finalized this file is removed */
 };
 
+/*
+ * structure for the request
+ */
 struct afb_request
 {
+       /* interface for the request */
        const struct afb_request_itf *itf;
+
+       /* current dynapi (if any) */
+       struct afb_dynapi *dynapi;
+
+       /* closure associated with the callback processing the verb of the request
+        * as given at its declaration */
+       void *vcbdata;
+
+       /* the name of the called verb */
+       const char *api;
+
+       /* the name of the called verb */
+       const char *verb;
 };
 
 /*
@@ -180,5 +198,8 @@ struct afb_request_itf
                        void (*callback)(void*, int, struct json_object*, struct afb_request *request),
                        void *cb_closure);
 
+       int (*get_uid)(
+                       struct afb_request *request);
+
 };