1 #ifndef __PKGMGR_INFO_BASIC_H__
2 #define __PKGMGR_INFO_BASIC_H__
5 * @brief List definitions.
6 * All lists are doubly-linked, the last element is stored to list pointer,
7 * which means that lists must be looped using the prev pointer, or by
8 * calling LISTHEAD first to go to start in order to use the next pointer.
12 * @brief Convinience Macro to add node in list
15 #define LISTADD(list, node) \
17 (node)->prev = (list); \
18 if (list) (node)->next = (list)->next; \
19 else (node)->next = NULL; \
20 if (list) (list)->next = (node); \
25 * @brief Convinience Macro to add one node to another node
27 #define NODEADD(node1, node2) \
29 (node2)->prev = (node1); \
30 (node2)->next = (node1)->next; \
31 if ((node1)->next) (node1)->next->prev = (node2); \
32 (node1)->next = (node2); \
36 * @brief Convinience Macro to concatenate two lists
38 #define LISTCAT(list, first, last) \
39 if ((first) && (last)) { \
40 (first)->prev = (list); \
45 * @brief Convinience Macro to delete node from list
47 #define LISTDEL(list, node) \
49 if ((node)->prev) (node)->prev->next = (node)->next; \
50 if ((node)->next) (node)->next->prev = (node)->prev; \
51 if (!((node)->prev) && !((node)->next)) (list) = NULL; \
55 * @brief Convinience Macro to get list head
57 #define LISTHEAD(list, node) \
58 for ((node) = (list); (node)->prev; (node) = (node)->prev)
61 * @brief Convinience Macro to get list tail
63 #define LISTTAIL(list, node) \
64 for ((node) = (list); (node)->next; (node) = (node)->next)
66 typedef struct metadata_x {
69 struct metadata_x *prev;
70 struct metadata_x *next;
73 typedef struct privilege_x {
75 struct privilege_x *prev;
76 struct privilege_x *next;
79 typedef struct privileges_x {
80 struct privilege_x *privilege;
81 struct privileges_x *prev;
82 struct privileges_x *next;
85 typedef struct permission_x {
88 struct permission_x *prev;
89 struct permission_x *next;
92 typedef struct icon_x {
98 const char *resolution;
103 typedef struct image_x {
108 struct image_x *prev;
109 struct image_x *next;
112 typedef struct allowed_x {
115 struct allowed_x *prev;
116 struct allowed_x *next;
119 typedef struct request_x {
121 struct request_x *prev;
122 struct request_x *next;
125 typedef struct define_x {
127 struct allowed_x *allowed;
128 struct request_x *request;
129 struct define_x *prev;
130 struct define_x *next;
133 typedef struct datashare_x {
134 struct define_x *define;
135 struct request_x *request;
136 struct datashare_x *prev;
137 struct datashare_x *next;
140 typedef struct description_x {
144 struct description_x *prev;
145 struct description_x *next;
148 typedef struct registry_x {
151 struct registry_x *prev;
152 struct registry_x *next;
155 typedef struct database_x {
158 struct database_x *prev;
159 struct database_x *next;
162 typedef struct layout_x {
165 struct layout_x *prev;
166 struct layout_x *next;
169 typedef struct label_x {
173 struct label_x *prev;
174 struct label_x *next;
177 typedef struct author_x {
182 struct author_x *prev;
183 struct author_x *next;
186 typedef struct license_x {
189 struct license_x *prev;
190 struct license_x *next;
193 typedef struct operation_x {
196 struct operation_x *prev;
197 struct operation_x *next;
200 typedef struct uri_x {
207 typedef struct mime_x {
214 typedef struct subapp_x {
217 struct subapp_x *prev;
218 struct subapp_x *next;
221 typedef struct condition_x {
224 struct condition_x *prev;
225 struct condition_x *next;
228 typedef struct notification_x {
231 struct notification_x *prev;
232 struct notification_x *next;
235 typedef struct appsvc_x {
237 struct operation_x *operation;
240 struct subapp_x *subapp;
241 struct appsvc_x *prev;
242 struct appsvc_x *next;
245 typedef struct appcontrol_x {
246 const char *operation;
249 struct appcontrol_x *prev;
250 struct appcontrol_x *next;
253 typedef struct category_x{
255 struct category_x *prev;
256 struct category_x *next;
259 typedef struct launchconditions_x {
261 struct condition_x *condition;
262 struct launchconditions_x *prev;
263 struct launchconditions_x *next;
264 } launchconditions_x;
266 typedef struct compatibility_x {
269 struct compatibility_x *prev;
270 struct compatibility_x *next;
273 typedef struct deviceprofile_x {
276 struct deviceprofile_x *prev;
277 struct deviceprofile_x *next;
280 typedef struct datacontrol_x {
281 const char *providerid;
284 struct datacontrol_x *prev;
285 struct datacontrol_x *next;
288 typedef struct application_x {
290 const char *component;
292 const char *nodisplay;
295 const char *multiple;
296 const char *autorestart;
297 const char *taskmanage;
299 const char *categories;
301 const char *hwacceleration;
302 const char *screenreader;
304 const char *recentimage;
305 const char *launchcondition;
306 const char *indicatordisplay;
307 const char *portraitimg;
308 const char *landscapeimg;
309 const char *guestmode_visibility;
310 const char *permission_type;
313 const char *submode_mainid;
314 const char *launch_mode;
315 const char *ui_gadget;
316 const char *support_disable;
317 const char *component_type;
319 struct label_x *label;
321 struct image_x *image;
322 struct appsvc_x *appsvc;
323 struct appcontrol_x *appcontrol;
324 struct category_x *category;
325 struct metadata_x *metadata;
326 struct permission_x *permission;
327 struct launchconditions_x *launchconditions;
328 struct notification_x *notification;
329 struct datashare_x *datashare;
330 struct datacontrol_x *datacontrol;
331 struct application_x *prev;
332 struct application_x *next;
335 typedef struct daemon_x {
338 struct daemon_x *prev;
339 struct daemon_x *next;
342 typedef struct theme_x {
345 struct theme_x *prev;
346 struct theme_x *next;
349 typedef struct font_x {
356 typedef struct ime_x {
363 typedef struct package_x {
364 const char *for_all_users; /**< Flag that indicates if the package is available for everyone or for current user only*/
365 const char *package; /**< package name*/
366 const char *version; /**< package version*/
367 const char *installlocation; /**< package install location*/
368 const char *ns; /**<name space*/
369 const char *removable; /**< package removable flag*/
370 const char *preload; /**< package preload flag*/
371 const char *readonly; /**< package readonly flag*/
372 const char *update; /**< package update flag*/
373 const char *appsetting; /**< package app setting flag*/
374 const char *system; /**< package system flag*/
375 const char *type; /**< package type*/
376 const char *package_size; /**< package size for external installation*/
377 const char *installed_time; /**< installed time after finishing of installation*/
378 const char *installed_storage; /**< package currently installed storage*/
379 const char *storeclient_id; /**< id of store client for installed package*/
380 const char *mainapp_id; /**< app id of main application*/
381 const char *package_url; /**< app id of main application*/
382 const char *root_path; /**< package root path*/
383 const char *csc_path; /**< package csc path*/
384 const char *nodisplay_setting; /**< package no display setting menu*/
385 const char *api_version; /**< minimum version of API package using*/
386 const char *support_disable; /**< package support disable flag*/
387 struct icon_x *icon; /**< package icon*/
388 struct label_x *label; /**< package label*/
389 struct author_x *author; /**< package author*/
390 struct description_x *description; /**< package description*/
391 struct license_x *license; /**< package license*/
392 struct privileges_x *privileges; /**< package privileges*/
393 struct application_x *application; /**< package's application*/
394 struct daemon_x *daemon; /**< package daemon*/
395 struct theme_x *theme; /**< package theme*/
396 struct font_x *font; /**< package font*/
397 struct ime_x *ime; /**< package ime*/
398 struct compatibility_x *compatibility; /**< package compatibility*/
399 struct deviceprofile_x *deviceprofile; /**< package device profile*/
402 typedef struct package_x manifest_x;
404 void pkgmgrinfo_basic_free_application(application_x *application);
405 void pkgmgrinfo_basic_free_package(package_x *package);