Add special cmd: AMD_RELOAD_APPINFO
[platform/core/appfw/aul-1.git] / am_daemon / amd_appinfo.h
1 #ifndef __AUL_AMD_APPINFO_H_
2 #define __AUL_AMD_APPINFO_H_
3
4 #include <sys/types.h>
5
6 struct appinfomgr;
7 struct appinfo;
8
9 enum appinfo_type {
10         AIT_NAME,
11         AIT_COMP,
12         AIT_EXEC,
13         AIT_TYPE,
14         AIT_ONBOOT, /* start on boot: boolean */
15         AIT_RESTART, /* auto restart: boolean */
16         AIT_MULTI,
17         AIT_HWACC,
18         AIT_PERM,
19         AIT_PKGID,
20         AIT_PRELOAD,
21         AIT_STATUS,
22 };
23
24 int appinfo_init(void);
25 void appinfo_fini(void);
26
27 int appinfo_insert(uid_t uid, const char *pkgid);
28
29 const struct appinfo *appinfo_find(uid_t caller_uid, const char *appid);
30 const char *appinfo_get_value(const struct appinfo *c, enum appinfo_type type);
31 const char *appinfo_get_filename(const struct appinfo *c);
32 int appinfo_get_boolean(const struct appinfo *c, enum appinfo_type type);
33
34 typedef void (*appinfo_iter_callback)(void *user_data,
35                 const char *filename, struct appinfo *c);
36 void appinfo_foreach(uid_t uid, appinfo_iter_callback cb, void *user_data);
37 void appinfo_reload(void);
38
39 #endif /* __AUL_AMD_APPINFO_H_ */