0a18b82a36240befa1afd15f3cd099a2943a19d3
[platform/core/appfw/pkgmgr-info.git] / include / pkgmgr-info-internal.h
1 /*
2  * pkgmgr-info
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7  * Jaeho Lee <jaeho81.lee@samsung.com>, Shobhit Srivastava <shobhit.s@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22
23
24 #ifndef __PKGMGR_INFO_INTERNAL_H__
25 #define __PKGMGR_INFO_INTERNAL_H__
26
27 #include <dlog.h>
28
29 #ifndef DEPRECATED
30 #define DEPRECATED      __attribute__ ((__deprecated__))
31 #endif
32
33 #ifndef API
34 #define API __attribute__ ((visibility("default")))
35 #endif
36
37 #define LOG_TAG         "PKGMGR_INFO"
38 #define _LOGE(fmt, arg...) LOGE(fmt, ##arg)
39 #define _LOGD(fmt, arg...) LOGD(fmt, ##arg)
40
41
42 /*String properties for filtering based on package info*/
43 typedef enum _pkgmgrinfo_pkginfo_filter_prop_str {
44         E_PMINFO_PKGINFO_PROP_PACKAGE_MIN_STR = 101,
45         E_PMINFO_PKGINFO_PROP_PACKAGE_ID = E_PMINFO_PKGINFO_PROP_PACKAGE_MIN_STR,
46         E_PMINFO_PKGINFO_PROP_PACKAGE_TYPE,
47         E_PMINFO_PKGINFO_PROP_PACKAGE_VERSION,
48         E_PMINFO_PKGINFO_PROP_PACKAGE_INSTALL_LOCATION,
49         E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_NAME,
50         E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_EMAIL,
51         E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_HREF,
52         E_PMINFO_PKGINFO_PROP_PACKAGE_MAX_STR = E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_HREF
53 } pkgmgrinfo_pkginfo_filter_prop_str;
54
55 /*Boolean properties for filtering based on package info*/
56 typedef enum _pkgmgrinfo_pkginfo_filter_prop_bool {
57         E_PMINFO_PKGINFO_PROP_PACKAGE_MIN_BOOL = 201,
58         E_PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE = E_PMINFO_PKGINFO_PROP_PACKAGE_MIN_BOOL,
59         E_PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD,
60         E_PMINFO_PKGINFO_PROP_PACKAGE_READONLY,
61         E_PMINFO_PKGINFO_PROP_PACKAGE_MAX_BOOL = E_PMINFO_PKGINFO_PROP_PACKAGE_READONLY
62 } pkgmgrinfo_pkginfo_filter_prop_bool;
63
64 /*Integer properties for filtering based on package info*/
65 typedef enum _pkgmgrinfo_pkginfo_filter_prop_int {
66         E_PMINFO_PKGINFO_PROP_PACKAGE_MIN_INT = 301,
67         E_PMINFO_PKGINFO_PROP_PACKAGE_SIZE = E_PMINFO_PKGINFO_PROP_PACKAGE_MIN_INT,
68         E_PMINFO_PKGINFO_PROP_PACKAGE_MAX_INT = E_PMINFO_PKGINFO_PROP_PACKAGE_SIZE
69 } pkgmgrinfo_pkginfo_filter_prop_int;
70
71 /*String properties for filtering based on app info*/
72 typedef enum _pkgmgrinfo_appinfo_filter_prop_str {
73         E_PMINFO_APPINFO_PROP_APP_MIN_STR = 401,
74         E_PMINFO_APPINFO_PROP_APP_ID = E_PMINFO_APPINFO_PROP_APP_MIN_STR,
75         E_PMINFO_APPINFO_PROP_APP_COMPONENT,
76         E_PMINFO_APPINFO_PROP_APP_EXEC,
77         E_PMINFO_APPINFO_PROP_APP_ICON,
78         E_PMINFO_APPINFO_PROP_APP_TYPE,
79         E_PMINFO_APPINFO_PROP_APP_OPERATION,
80         E_PMINFO_APPINFO_PROP_APP_URI,
81         E_PMINFO_APPINFO_PROP_APP_MIME,
82         E_PMINFO_APPINFO_PROP_APP_HWACCELERATION,
83         E_PMINFO_APPINFO_PROP_APP_CATEGORY,
84         E_PMINFO_APPINFO_PROP_APP_MAX_STR = E_PMINFO_APPINFO_PROP_APP_CATEGORY
85 } pkgmgrinfo_appinfo_filter_prop_str;
86
87 /*Boolean properties for filtering based on app info*/
88 typedef enum _pkgmgrinfo_appinfo_filter_prop_bool {
89         E_PMINFO_APPINFO_PROP_APP_MIN_BOOL = 501,
90         E_PMINFO_APPINFO_PROP_APP_NODISPLAY = E_PMINFO_APPINFO_PROP_APP_MIN_BOOL,
91         E_PMINFO_APPINFO_PROP_APP_MULTIPLE,
92         E_PMINFO_APPINFO_PROP_APP_ONBOOT,
93         E_PMINFO_APPINFO_PROP_APP_AUTORESTART,
94         E_PMINFO_APPINFO_PROP_APP_TASKMANAGE,
95         E_PMINFO_APPINFO_PROP_APP_MAX_BOOL = E_PMINFO_APPINFO_PROP_APP_TASKMANAGE
96 } pkgmgrinfo_appinfo_filter_prop_bool;
97
98 /*Integer properties for filtering based on app info*/
99 typedef enum _pkgmgrinfo_appinfo_filter_prop_int {
100         /*Currently No Fields*/
101         E_PMINFO_APPINFO_PROP_APP_MIN_INT = 601,
102         E_PMINFO_APPINFO_PROP_APP_MAX_INT = E_PMINFO_APPINFO_PROP_APP_MIN_INT
103 } pkgmgrinfo_appinfo_filter_prop_int;
104
105 pkgmgrinfo_pkginfo_filter_prop_str _pminfo_pkginfo_convert_to_prop_str(const char *property);
106 pkgmgrinfo_pkginfo_filter_prop_int _pminfo_pkginfo_convert_to_prop_int(const char *property);
107 pkgmgrinfo_pkginfo_filter_prop_bool _pminfo_pkginfo_convert_to_prop_bool(const char *property);
108
109 pkgmgrinfo_appinfo_filter_prop_str _pminfo_appinfo_convert_to_prop_str(const char *property);
110 pkgmgrinfo_appinfo_filter_prop_int _pminfo_appinfo_convert_to_prop_int(const char *property);
111 pkgmgrinfo_appinfo_filter_prop_bool _pminfo_appinfo_convert_to_prop_bool(const char *property);
112
113 #endif  /* __PKGMGR_INFO_INTERNAL_H__ */