summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-20 13:30:19 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-10-09 14:08:31 +0200
commitaab152c28e471cff7c35361a417e3d82850bbcc2 (patch)
tree9215263b7706abe1cae8eacd60d58885e40513e5
parent770ca7e254bba07bb7d1ade4fa95afed7a7f7693 (diff)
afb-export: getter for the apiset
Change-Id: I6cb5bb0f19a6427bcc6532152863b67bc70dced4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-export.c10
-rw-r--r--src/afb-export.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/src/afb-export.c b/src/afb-export.c
index dc9cbd96..75fb1b17 100644
--- a/src/afb-export.c
+++ b/src/afb-export.c
@@ -74,7 +74,7 @@ struct afb_export
/* hooking flags */
int hookditf;
int hooksvc;
-
+
/* session for service */
struct afb_session *session;
@@ -792,7 +792,12 @@ void afb_export_set_apiset(struct afb_export *export, struct afb_apiset *apiset)
export->apiset = afb_apiset_addref(apiset);
afb_apiset_unref(prvset);
}
-
+
+struct afb_apiset *afb_export_get_apiset(struct afb_export *export)
+{
+ return export->apiset;
+}
+
/*
* Creates a new service
*/
@@ -826,7 +831,6 @@ int afb_export_is_started(const struct afb_export *export)
struct afb_binding_v1 *afb_export_register_v1(struct afb_export *export, struct afb_binding_v1 *(*regfun)(const struct afb_binding_interface_v1*))
{
return regfun(&export->export.v1);
-
}
int afb_export_start_v1(struct afb_export *export, int (*start)(struct afb_service))
diff --git a/src/afb-export.h b/src/afb-export.h
index 96ccb938..8016c6fc 100644
--- a/src/afb-export.h
+++ b/src/afb-export.h
@@ -34,6 +34,7 @@ extern void afb_export_update_hook(struct afb_export *export);
extern int afb_export_unshare_session(struct afb_export *export);
extern void afb_export_set_apiset(struct afb_export *export, struct afb_apiset *apiset);
+extern struct afb_apiset *afb_export_get_apiset(struct afb_export *export);
extern int afb_export_is_started(const struct afb_export *export);
extern struct afb_binding_v1 *afb_export_register_v1(struct afb_export *export, struct afb_binding_v1 *(*regfun)(const struct afb_binding_interface_v1*));