Update date of copyright notices
[src/app-framework-binder.git] / src / afb-apiset.h
1 /*
2  * Copyright (C) 2016, 2017, 2018 "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 #pragma once
19
20 struct afb_api;
21 struct afb_apiset;
22 struct json_object;
23
24 extern struct afb_apiset *afb_apiset_addref(struct afb_apiset *set);
25 extern void afb_apiset_unref(struct afb_apiset *set);
26 extern struct afb_apiset *afb_apiset_create(const char *name, int timeout);
27 extern const char *afb_apiset_name(struct afb_apiset *set);
28 extern int afb_apiset_timeout_get(struct afb_apiset *set);
29 extern void afb_apiset_timeout_set(struct afb_apiset *set, int to);
30 extern void afb_apiset_subset_set(struct afb_apiset *set, struct afb_apiset *subset);
31 extern struct afb_apiset *afb_apiset_subset_get(struct afb_apiset *set);
32 extern int afb_apiset_add(struct afb_apiset *set, const char *name, struct afb_api api);
33 extern int afb_apiset_del(struct afb_apiset *set, const char *name);
34 extern const struct afb_api *afb_apiset_lookup(struct afb_apiset *set, const char *name, int rec);
35 extern const struct afb_api *afb_apiset_lookup_started(struct afb_apiset *set, const char *name, int rec);
36 extern int afb_apiset_start_service(struct afb_apiset *set, const char *name, int share_session, int onneed);
37 extern int afb_apiset_start_all_services(struct afb_apiset *set, int share_session);
38 extern void afb_apiset_update_hooks(struct afb_apiset *set, const char *name);
39 extern void afb_apiset_set_verbosity(struct afb_apiset *set, const char *name, int level);
40 extern int afb_apiset_get_verbosity(struct afb_apiset *set, const char *name);
41 extern struct json_object *afb_apiset_describe(struct afb_apiset *set, const char *name);
42 extern const char **afb_apiset_get_names(struct afb_apiset *set);
43 extern void afb_apiset_enum(struct afb_apiset *set, int rec, void (*callback)(struct afb_apiset *set, const char *name, void *closure), void *closure);
44