3b94c0532e18991e3b3d8dea71a060ccfd943c8d
[src/app-framework-main.git] / src / afm-db.h
1 /*
2  Copyright 2015, 2016 IoT.bzh
3
4  author: José Bollo <jose.bollo@iot.bzh>
5
6  Licensed under the Apache License, Version 2.0 (the "License");
7  you may not use this file except in compliance with the License.
8  You may obtain a copy of the License at
9
10      http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17 */
18
19 struct afm_db;
20
21 extern struct afm_db *afm_db_create();
22 extern void afm_db_addref(struct afm_db *afdb);
23 extern void afm_db_unref(struct afm_db *afdb);
24
25 extern int afm_db_add_root(struct afm_db *afdb, const char *path);
26 extern int afm_db_add_application(struct afm_db *afdb, const char *path);
27
28 extern int afm_db_update_applications(struct afm_db *afdb);
29 extern int afm_db_ensure_applications(struct afm_db *afdb);
30
31 extern struct json_object *afm_db_application_list(struct afm_db *afdb);
32 extern struct json_object *afm_db_get_application(struct afm_db *afdb, const char *id);
33 extern struct json_object *afm_db_get_application_public(struct afm_db *afdb, const char *id);
34