diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-09-19 10:14:04 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-10-09 14:08:28 +0200 |
commit | 33e615ea0cc26131532f4615ef4a2034488fa48e (patch) | |
tree | 73f0e661862ffc41cf50e7cd62af872398b30e40 /src/afb-export.h | |
parent | 8be63ed03413ee79bb3aa3900950f695eb511960 (diff) |
afb-export: refactor of binder interface
The interfaces of the binder called afb_ditf and
afb_svc are merged together to create the afb_export
structure.
Change-Id: I841ba04d7b2f94bfc19f691ec746d0bd221f164d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-export.h')
-rw-r--r-- | src/afb-export.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/afb-export.h b/src/afb-export.h new file mode 100644 index 00000000..96ccb938 --- /dev/null +++ b/src/afb-export.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2016, 2017 "IoT.bzh" + * Author: José Bollo <jose.bollo@iot.bzh> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +struct afb_export; +struct afb_apiset; + +struct afb_service; +struct afb_binding_data_v2; +struct afb_binding_interface_v1; + +extern struct afb_export *afb_export_create_v1(const char *apiname); +extern struct afb_export *afb_export_create_v2(const char *apiname, struct afb_binding_data_v2 *data); +extern void afb_export_destroy(struct afb_export *export); + +extern const char *afb_export_apiname(const struct afb_export *export); +extern void afb_export_rename(struct afb_export *export, const char *apiname); +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 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*)); +extern int afb_export_start_v1(struct afb_export *export, int (*start)(struct afb_service)); +extern int afb_export_start_v2(struct afb_export *export, int (*start)()); + +extern int afb_export_handle_events(struct afb_export *export, void (*on_event)(const char *event, struct json_object *object)); + +extern int afb_export_verbosity_get(const struct afb_export *export); +extern void afb_export_verbosity_set(struct afb_export *export, int level); + |