3e0d1b7813b9b2788a8cdb7c6a259a56a9fda55c
[src/app-framework-main.git] / src / appfwk.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 appfwk;
18
19 extern struct appfwk *appfwk_create();
20 extern void appfwk_addref(struct appfwk *appfwk);
21 extern void appfwk_unref(struct appfwk *appfwk);
22
23 extern int appfwk_add_root(struct appfwk *appfwk, const char *path);
24 extern int appfwk_update_applications(struct appfwk *af);
25 extern int appfwk_ensure_applications(struct appfwk *af);
26
27 extern struct json_object *appfwk_application_list(struct appfwk *af);
28 extern struct json_object *appfwk_get_application(struct appfwk *af, const char *id);
29 extern struct json_object *appfwk_get_application_public(struct appfwk *af, const char *id);
30
31 extern const char *appfwk_start(struct appfwk *af, const char *appid);
32 extern int appfwk_stop(struct appfwk *af, const char *runid);
33 extern int appfwk_suspend(struct appfwk *af, const char *runid);
34 extern int appfwk_resume(struct appfwk *af, const char *runid);
35 extern struct json_object *appfwk_running_list(struct appfwk *af);
36 extern struct json_object *appfwk_state(struct appfwk *af, const char *runid);