a5840f42b4bf740cedeee601079f3f9747b8b0b7
[framework/appfw/aul-1.git] / am_daemon / amd_appinfo.h
1 #ifndef __AUL_AMD_APPINFO_H_
2 #define __AUL_AMD_APPINFO_H_
3
4 struct appinfomgr;
5 struct appinfo;
6
7 enum appinfo_type {
8         AIT_NAME,
9         AIT_COMP,
10         AIT_EXEC,
11         AIT_TYPE,
12         AIT_ONBOOT, /* start on boot: boolean */
13         AIT_RESTART, /* auto restart: boolean */
14         AIT_MULTI,
15         AIT_HWACC,
16 };
17
18 int appinfo_init(struct appinfomgr **cf);
19 void appinfo_fini(struct appinfomgr **cf);
20
21 const struct appinfo *appinfo_insert(struct appinfomgr *cf, const char *filename);
22 void appinfo_delete(struct appinfomgr *cf, const char *filename);
23
24 const struct appinfo *appinfo_find(struct appinfomgr *cf, const char *filename);
25 const char *appinfo_get_value(const struct appinfo *c, enum appinfo_type type);
26 const char *appinfo_get_filename(const struct appinfo *c);
27 int appinfo_get_boolean(const struct appinfo *c, enum appinfo_type type);
28
29 typedef void (*appinfo_iter_callback)(void *user_data,
30                 const char *filename, const struct appinfo *c);
31 void appinfo_foreach(struct appinfomgr *cf, appinfo_iter_callback cb, void *user_data);
32
33 #endif /* __AUL_AMD_APPINFO_H_ */