X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=parser%2Fpkgmgr_parser.h;h=3df85a73cf823f9589cefa676de15af8f50b77e7;hb=b26a2dc608639e5a7a2be4b9e665cece2baef04f;hp=a0daef17a3350f28a084d2d271215d384caa5b80;hpb=b1f317ae9e21cac980b8559a805ecdb3a4b043f2;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git diff --git a/parser/pkgmgr_parser.h b/parser/pkgmgr_parser.h old mode 100755 new mode 100644 index a0daef1..3df85a7 --- a/parser/pkgmgr_parser.h +++ b/parser/pkgmgr_parser.h @@ -43,443 +43,31 @@ #include +/* For multi-user support */ +#include +#include "pkgmgrinfo_basic.h" + #ifdef __cplusplus extern "C" { #endif #define DEFAULT_LOCALE "No Locale" #define PKG_PARSERLIB "parserlib:" -#define PKG_PARSER_CONF_PATH "/usr/etc/package-manager/parser_path.conf" +#define PKG_PARSER_CONF_PATH SYSCONFDIR "/package-manager/parser_path.conf" #define PKG_STRING_LEN_MAX 1024 -/** - * @brief List definitions. - * All lists are doubly-linked, the last element is stored to list pointer, - * which means that lists must be looped using the prev pointer, or by - * calling LISTHEAD first to go to start in order to use the next pointer. - */ - - /** - * @brief Convinience Macro to add node in list - */ - -#define LISTADD(list, node) \ - do { \ - (node)->prev = (list); \ - if (list) (node)->next = (list)->next; \ - else (node)->next = NULL; \ - if (list) (list)->next = (node); \ - (list) = (node); \ - } while (0); +#define PKGMGR_PARSER_EMPTY_STR "" +#define GLOBAL_USER tzplatform_getuid(TZ_SYS_GLOBALAPP_USER) - /** - * @brief Convinience Macro to add one node to another node - */ -#define NODEADD(node1, node2) \ - do { \ - (node2)->prev = (node1); \ - (node2)->next = (node1)->next; \ - if ((node1)->next) (node1)->next->prev = (node2); \ - (node1)->next = (node2); \ - } while (0); - - /** - * @brief Convinience Macro to concatenate two lists - */ -#define LISTCAT(list, first, last) \ - if ((first) && (last)) { \ - (first)->prev = (list); \ - (list) = (last); \ - } - - /** - * @brief Convinience Macro to delete node from list - */ -#define LISTDEL(list, node) \ - do { \ - if ((node)->prev) (node)->prev->next = (node)->next; \ - if ((node)->next) (node)->next->prev = (node)->prev; \ - if (!((node)->prev) && !((node)->next)) (list) = NULL; \ - } while (0); - - /** - * @brief Convinience Macro to get list head - */ -#define LISTHEAD(list, node) \ - for ((node) = (list); (node)->prev; (node) = (node)->prev) - - /** - * @brief Convinience Macro to get list tail +/** + * @brief API return values */ -#define LISTTAIL(list, node) \ - for ((node) = (list); (node)->next; (node) = (node)->next) - -typedef struct metadata_x { - const char *key; - const char *value; - struct metadata_x *prev; - struct metadata_x *next; -} metadata_x; - -typedef struct privilege_x { - const char *text; - struct privilege_x *prev; - struct privilege_x *next; -} privilege_x; - -typedef struct privileges_x { - struct privilege_x *privilege; - struct privileges_x *prev; - struct privileges_x *next; -} privileges_x; - -typedef struct permission_x { - const char *type; - const char *value; - struct permission_x *prev; - struct permission_x *next; -} permission_x; - -typedef struct icon_x { - const char *name; - const char *text; - const char *lang; - const char *section; - const char *size; - const char *resolution; - struct icon_x *prev; - struct icon_x *next; -} icon_x; - -typedef struct image_x { - const char *name; - const char *text; - const char *lang; - const char *section; - struct image_x *prev; - struct image_x *next; -} image_x; - -typedef struct allowed_x { - const char *name; - const char *text; - struct allowed_x *prev; - struct allowed_x *next; -} allowed_x; - -typedef struct request_x { - const char *text; - struct request_x *prev; - struct request_x *next; -} request_x; - -typedef struct define_x { - const char *path; - struct allowed_x *allowed; - struct request_x *request; - struct define_x *prev; - struct define_x *next; -} define_x; - -typedef struct datashare_x { - struct define_x *define; - struct request_x *request; - struct datashare_x *prev; - struct datashare_x *next; -} datashare_x; - -typedef struct description_x { - const char *name; - const char *text; - const char *lang; - struct description_x *prev; - struct description_x *next; -} description_x; - -typedef struct registry_x { - const char *name; - const char *text; - struct registry_x *prev; - struct registry_x *next; -} registry_x; - -typedef struct database_x { - const char *name; - const char *text; - struct database_x *prev; - struct database_x *next; -} database_x; - -typedef struct layout_x { - const char *name; - const char *text; - struct layout_x *prev; - struct layout_x *next; -} layout_x; - -typedef struct label_x { - const char *name; - const char *text; - const char *lang; - struct label_x *prev; - struct label_x *next; -} label_x; - -typedef struct author_x { - const char *email; - const char *href; - const char *text; - const char *lang; - struct author_x *prev; - struct author_x *next; -} author_x; - -typedef struct license_x { - const char *text; - const char *lang; - struct license_x *prev; - struct license_x *next; -} license_x; - -typedef struct operation_x { - const char *name; - const char *text; - struct operation_x *prev; - struct operation_x *next; -} operation_x; - -typedef struct uri_x { - const char *name; - const char *text; - struct uri_x *prev; - struct uri_x *next; -} uri_x; - -typedef struct mime_x { - const char *name; - const char *text; - struct mime_x *prev; - struct mime_x *next; -} mime_x; - -typedef struct subapp_x { - const char *name; - const char *text; - struct subapp_x *prev; - struct subapp_x *next; -} subapp_x; - -typedef struct condition_x { - const char *name; - const char *text; - struct condition_x *prev; - struct condition_x *next; -} condition_x; - -typedef struct notification_x { - const char *name; - const char *text; - struct notification_x *prev; - struct notification_x *next; -} notification_x; - -typedef struct appsvc_x { - const char *text; - struct operation_x *operation; - struct uri_x *uri; - struct mime_x *mime; - struct subapp_x *subapp; - struct appsvc_x *prev; - struct appsvc_x *next; -} appsvc_x; - -typedef struct appcontrol_x { - const char *text; - struct operation_x *operation; - struct uri_x *uri; - struct mime_x *mime; - struct subapp_x *subapp; - struct appcontrol_x *prev; - struct appcontrol_x *next; -} appcontrol_x; - -typedef struct category_x{ - const char *name; - struct category_x *prev; - struct category_x *next; -} category_x; - -typedef struct launchconditions_x { - const char *text; - struct condition_x *condition; - struct launchconditions_x *prev; - struct launchconditions_x *next; -} launchconditions_x; - -typedef struct compatibility_x { - const char *name; - const char *text; - struct compatibility_x *prev; - struct compatibility_x *next; -}compatibility_x; - -typedef struct deviceprofile_x { - const char *name; - const char *text; - struct deviceprofile_x *prev; - struct deviceprofile_x *next; -}deviceprofile_x; - -typedef struct resolution_x { - const char *mimetype; - const char *urischeme; - struct resolution_x *prev; - struct resolution_x *next; -} resolution_x; - -typedef struct capability_x { - const char *operationid; - const char *access; - struct resolution_x *resolution; - struct capability_x *prev; - struct capability_x *next; -} capability_x; - -typedef struct datacontrol_x { - const char *providerid; - struct capability_x *capability; - struct datacontrol_x *prev; - struct datacontrol_x *next; -} datacontrol_x; - -typedef struct uiapplication_x { - const char *appid; - const char *exec; - const char *nodisplay; - const char *multiple; - const char *taskmanage; - const char *enabled; - const char *type; - const char *categories; - const char *extraid; - const char *hwacceleration; - const char *mainapp; - const char *package; - const char *recentimage; - const char *launchcondition; - const char *indicatordisplay; - const char *portraitimg; - const char *landscapeimg; - const char *guestmode_visibility; - const char *app_component; - const char *permission_type; - const char *component_type; - const char *preload; - const char *submode; - const char *submode_mainid; - struct label_x *label; - struct icon_x *icon; - struct image_x *image; - struct appsvc_x *appsvc; - struct appcontrol_x *appcontrol; - struct category_x *category; - struct metadata_x *metadata; - struct permission_x *permission; - struct launchconditions_x *launchconditions; - struct notification_x *notification; - struct datashare_x *datashare; - struct uiapplication_x *prev; - struct uiapplication_x *next; -} uiapplication_x; - -typedef struct serviceapplication_x { - const char *appid; - const char *exec; - const char *onboot; - const char *autorestart; - const char *enabled; - const char *type; - const char *package; - const char *permission_type; - struct label_x *label; - struct icon_x *icon; - struct appsvc_x *appsvc; - struct appcontrol_x *appcontrol; - struct category_x *category; - struct metadata_x *metadata; - struct permission_x *permission; - struct datacontrol_x *datacontrol; - struct launchconditions_x *launchconditions; - struct notification_x *notification; - struct datashare_x *datashare; - struct serviceapplication_x *prev; - struct serviceapplication_x *next; -} serviceapplication_x; - -typedef struct daemon_x { - const char *name; - const char *text; - struct daemon_x *prev; - struct daemon_x *next; -} daemon_x; - -typedef struct theme_x { - const char *name; - const char *text; - struct theme_x *prev; - struct theme_x *next; -} theme_x; - -typedef struct font_x { - const char *name; - const char *text; - struct font_x *prev; - struct font_x *next; -} font_x; - -typedef struct ime_x { - const char *name; - const char *text; - struct ime_x *prev; - struct ime_x *next; -} ime_x; - -typedef struct manifest_x { - const char *package; /**< package name*/ - const char *version; /**< package version*/ - const char *installlocation; /**< package install location*/ - const char *ns; /**