Tizen 2.4 SDK Rev6 Release
[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         AIT_PERM,
17         AIT_PKGID,
18         AIT_TASKMANAGE,
19         AIT_PRELOAD,
20         AIT_INDICATOR_DISP,
21         AIT_EFFECTIMAGEPORT,
22         AIT_EFFECTIMAGELAND,
23 #ifdef _APPFW_FEATURE_CHANGEABLE_COLOR
24         AIT_EFFECTTYPE,
25 #endif
26         AIT_STATUS,
27 #ifdef _APPFW_FEATURE_PROCESS_POOL
28         AIT_POOL,
29 #endif
30         AIT_COMPTYPE,
31 #ifdef _APPFW_FEATURE_MULTI_INSTANCE
32         AIT_MULTI_INSTANCE,
33         AIT_MULTI_INSTANCE_MAINID,
34         AIT_TOGGLE_ORDER,
35 #endif
36 #ifdef _APPFW_FEATURE_TTS_MODE
37         AIT_TTS,
38 #endif
39 #ifdef _APPFW_FEATURE_ULTRA_POWER_SAVING_MODE
40         AIT_UPS,
41 #endif
42 #ifdef _APPFW_FEATURE_COOLDOWN_MODE_SUPPORT
43         AIT_COOLDOWN,
44 #endif
45 #ifdef _APPFW_FEATURE_EXPANSION_PKG_INSTALL
46         AIT_TEP,
47         AIT_STORAGE_TYPE,
48 #endif
49         AIT_ALLOWED_BG,
50         AIT_API_VER,
51         AIT_LAUNCH_MODE,
52 #ifdef _APPFW_FEATURE_EFFECTIVE_APPID
53         AIT_EFFECTIVE_APPID,
54 #endif
55 #ifdef _APPFW_FEATURE_PRIVATE_SERVICE
56         AIT_VISIBILITY,
57 #endif
58         AIT_MAX
59 };
60
61 #define APP_TYPE_SERVICE        "svcapp"
62 #define APP_TYPE_UI                     "uiapp"
63 #define APP_TYPE_WIDGET         "widgetapp"
64 #define APP_TYPE_WATCH          "watchapp"
65
66 int appinfo_init(struct appinfomgr **cf);
67 void appinfo_fini(struct appinfomgr **cf);
68
69 const struct appinfomgr *appinfo_insert(struct appinfomgr *cf, const char *filename);
70 void appinfo_delete(struct appinfomgr *cf, const char *filename);
71
72 const struct appinfo *appinfo_find(struct appinfomgr *cf, const char *filename);
73 const char *appinfo_get_value(const struct appinfo *c, enum appinfo_type type);
74 const char *appinfo_set_value(struct appinfo *c, enum appinfo_type type, const char* val);
75 const char *appinfo_get_filename(const struct appinfo *c);
76 int appinfo_get_boolean(const struct appinfo *c, enum appinfo_type type);
77
78 typedef void (*appinfo_iter_callback)(void *user_data,
79                 const char *filename, const struct appinfo *c);
80 void appinfo_foreach(struct appinfomgr *cf, appinfo_iter_callback cb, void *user_data);
81
82 #endif /* __AUL_AMD_APPINFO_H_ */