2af76d2803722413cd4079469bed8e6504f5dcaa
[src/app-framework-binder.git] / src / afb-ditf.h
1 /*
2  * Copyright (C) 2016, 2017 "IoT.bzh"
3  * Author José Bollo <jose.bollo@iot.bzh>
4  *
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
8  *
9  *   http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17
18 #define _GNU_SOURCE
19 #define AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO
20
21 #include <string.h>
22 #include <dlfcn.h>
23 #include <assert.h>
24
25 #include <afb/afb-binding.h>
26
27 #include "afb-svc.h"
28 #include "afb-evt.h"
29 #include "afb-common.h"
30 #include "afb-context.h"
31 #include "afb-api-so.h"
32 #include "afb-xreq.h"
33 #include "verbose.h"
34
35
36 struct afb_ditf
37 {
38         int version;
39         const char *prefix;
40         union {
41                 struct afb_binding_interface_v1 interface;
42                 struct afb_daemon daemon;
43         };
44 };
45
46 extern void afb_ditf_init_v1(struct afb_ditf *ditf, const char *prefix);
47 extern void afb_ditf_init_v2(struct afb_ditf *ditf, const char *prefix);
48 extern void afb_ditf_rename(struct afb_ditf *ditf, const char *prefix);
49 extern void afb_ditf_update_hook(struct afb_ditf *ditf);
50