modify resource manager source.
[platform/core/appfw/pkgmgr-info.git] / parser / pkgmgr_parser_resource.h
1 #ifndef __PKGMGR_PARSER_RESOURCE_H_
2 #define __PKGMGR_PARSER_RESOURCE_H_
3
4 #include <bundle.h>
5 #include <glib.h>
6 #include "pkgmgr_parser.h"
7 #include "pkgmgrinfo_resource.h"
8
9 #define PKGMGR_RSC_GROUP_TYPE_IMAGE "image"
10 #define PKGMGR_RSC_GROUP_TYPE_LAYOUT "layout"
11 #define PKGMGR_RSC_GROUP_TYPE_SOUND "sound"
12 #define PKGMGR_RSC_GROUP_TYPE_BIN "bin"
13
14 #define RSC_NODE_ATTR_SCREEN_DPI "screen-dpi"
15 #define RSC_NODE_ATTR_SCREEN_DPI_RANGE "screen-dpi-range"
16 #define RSC_NODE_ATTR_SCREEN_WIDTH_RANGE "screen-width-range"
17 #define RSC_NODE_ATTR_SCREEN_LARGE "screen-large"
18 #define RSC_NODE_ATTR_SCREEN_BPP "screen-bpp"
19 #define RSC_NODE_ATTR_PLATFORM_VER "platform-version"
20 #define RSC_NODE_ATTR_LANGUAGE "language"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * @fn int *pkgmgr_resource_parser_open(const char *fname, resource_data_t **data)
28  * @brief       This API initialize parses res.xml which identified by fname and package and put it into data.
29  *
30  * @par         This API is for package-manager installer backends.
31  * @par Sync (or) Async : Synchronous API
32  *
33  * @param[in]   fname           pointer to xml filename
34  * @param[out]data              pointer of      pointer to resource_data type structure.
35  * @return      0 on succeed and -1 on failure, -2 on invalid parameter
36  */
37 API int pkgmgr_resource_parser_open(const char *fname, resource_data_t **data);
38
39 /**
40  * @fn int pkgmgr_resource_parser_close(resource_data_t data)
41  * @brief       This API frees given data and its own variables
42  *
43  * @par         This API is for package-manager installer backends.
44  * @par Sync (or) Async : Synchronous API
45  *
46  * @param[in]   data    structure of resource_data_t
47  * @return      0 on succeed and -1 on failure, -2 on invalid parameter
48  */
49 API int pkgmgr_resource_parser_close(resource_data_t *data);
50
51 /**
52  * @fn int pkgmgr_resource_parser_check_xml_validation(const char *xmlfile)
53  * @brief       This API will validates given resource manifest file
54  *
55  * @par         This API is for package-manager installer backends.
56  * @par Sync (or) Async : Synchronous API
57  *
58  * @param[in]   manifest        manifest filepath to be validated
59  * @return      0 on succeed and -1 on failure, -2 on invalid parameter
60  */
61 API int pkgmgr_resource_parser_check_xml_validation(const char *xmlfile);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif
68