f54d807526468e69a53a01e5068035669bcb2a0c
[src/app-framework-main.git] / src / af-db.h
1 /*
2  Copyright 2015 IoT.bzh
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8      http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16
17 struct af_db;
18
19 extern struct af_db *af_db_create();
20 extern void af_db_addref(struct af_db *afdb);
21 extern void af_db_unref(struct af_db *afdb);
22
23 extern int af_db_add_root(struct af_db *afdb, const char *path);
24 extern int af_db_update_applications(struct af_db *afdb);
25 extern int af_db_ensure_applications(struct af_db *afdb);
26
27 extern struct json_object *af_db_application_list(struct af_db *afdb);
28 extern struct json_object *af_db_get_application(struct af_db *afdb, const char *id);
29 extern struct json_object *af_db_get_application_public(struct af_db *afdb, const char *id);
30