Release version 0.24.9
[platform/core/appfw/pkgmgr-info.git] / include / pkgmgrinfo_type.h
index f65ad48..7f83f16 100644 (file)
@@ -100,7 +100,8 @@ typedef enum {
        PMINFO_APPINFO_GET_APP_CONTROL = 0x0010,
        PMINFO_APPINFO_GET_METADATA = 0x0020,
        PMINFO_APPINFO_GET_SPLASH_SCREEN = 0x0040,
-       PMINFO_APPINFO_GET_ALL = 0x007F
+       PMINFO_APPINFO_GET_RES_CONTROL = 0x0080,
+       PMINFO_APPINFO_GET_ALL = 0x00FF
 } pkgmgrinfo_appinfo_get_option;
 
 typedef enum {
@@ -112,7 +113,9 @@ typedef enum {
        PMINFO_PKGINFO_GET_PRIVILEGE = 0x0020,
        PMINFO_PKGINFO_GET_APPDEFINED_PRIVILEGE = 0x0040,
        PMINFO_PKGINFO_GET_DEPENDENCY = 0x0080,
-       PMINFO_PKGINFO_GET_ALL = 0x00FF
+       PMINFO_PKGINFO_GET_RES_INFO = 0x0100,
+       PMINFO_PKGINFO_GET_METADATA = 0x0200,
+       PMINFO_PKGINFO_GET_ALL = 0x03FF
 } pkgmgrinfo_pkginfo_get_option;
 
 /**
@@ -200,6 +203,11 @@ typedef void *pkgmgrinfo_certinfo_h;
 typedef void *pkgmgrinfo_pkginfo_filter_h;
 
 /**
+ * @brief A handle to filter package metadata information
+ */
+typedef void *pkgmgrinfo_pkginfo_metadata_filter_h;
+
+/**
  * @brief A handle to get/set package update information
  */
 typedef void *pkgmgrinfo_updateinfo_h;
@@ -215,14 +223,14 @@ typedef void *pkgmgrinfo_appinfo_filter_h;
 typedef void *pkgmgrinfo_appinfo_metadata_filter_h;
 
 /**
- * @brief A handle to get appcontrol information
+ * @brief A handle to get package archive information
  */
-typedef void *pkgmgrinfo_appcontrol_h;
+typedef void *pkgmgrinfo_archiveinfo_h;
 
 /**
- * @brief A handle to get package archive information
+ * @brief A handle to get allowed package required privilege
  */
-typedef void *pkgmgrinfo_archiveinfo_h;
+typedef void *required_privilege_h;
 
 /**
  * @brief type definition.
@@ -344,6 +352,22 @@ typedef int (*pkgmgrinfo_pkg_dependency_list_cb) (const char *from, const char *
                void *user_data);
 
 /**
+ * @fn int (*pkgmgrinfo_pkg_metadata_list_cb) (const char *metadata_key, const char *metadata_value, void *user_data)
+ *
+ * @brief Specifies the type of function passed to pkgmgrinfo_pkginfo_foreach_metadata()
+ *
+ * @param[in] metadata_name the name of the metadata
+ * @param[in] metadata_value the value of the metadata
+ * @param[in] user_data user data passed to pkgmgrinfo_pkginfo_foreach_metadata()
+ *
+ * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
+ *
+ * @see  pkgmgrinfo_pkginfo_foreach_metadata()
+ */
+typedef int (*pkgmgrinfo_pkg_metadata_list_cb) (const char *metadata_key,
+                                                       const char *metadata_value, void *user_data);
+
+/**
  * @fn int (*pkgmgrinfo_plugin_list_cb) (const char *pkgid, const char *appid, const char *plugin_type, const char *plugin_name, void *user_data);
  *
  * @brief Specifies the type of function passed to pkgmgrinfo_plugininfo_foreach_plugininfo()
@@ -363,6 +387,25 @@ typedef int (*pkgmgrinfo_plugin_list_cb) (const char *pkgid, const char *appid,
                void *user_data);
 
 /**
+ * @fn int (*pkgmgrinfo_res_allowed_package_list_cb) (
+               const char *allowed_package,
+               required_privilege_h privilege_handle, void *user_data);
+ *
+ * @brief Specifies the type of function passed to pkgmgrinfo_pkginfo_foreach_res_allowed_package()
+ *
+ * @param[in] allowed_package the name of the package
+ * @param[in] privilege_handle the required privilege handle of the package
+ * @param[in] user_data user data passed to pkgmgrinfo_pkginfo_foreach_res_allowed_package()
+ *
+ * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
+ *
+ * @see  pkgmgrinfo_pkginfo_foreach_res_allowed_package()
+ */
+typedef int (*pkgmgrinfo_res_allowed_package_list_cb) (
+               const char *allowed_package,
+               required_privilege_h privilege_handle, void *user_data);
+
+/**
  * @fn int (*pkgmgrinfo_app_metadata_list_cb) (const char *metadata_key, const char *metadata_value, void *user_data)
  *
  * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_metadata()
@@ -379,11 +422,13 @@ typedef int (*pkgmgrinfo_app_metadata_list_cb) (const char *metadata_key,
                                                        const char *metadata_value, void *user_data);
 
 /**
- * @fn int (*pkgmgrinfo_app_control_list_cb) (pkgmgrinfo_appcontrol_h handle, void *user_data)
+ * @fn int (*pkgmgrinfo_app_control_list_cb) (const char *operation, const char *uri, const char *mime, void *user_data);
  *
  * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_appcontrol()
  *
- * @param[in] handle the appcontrol handle to be used to get operation, uri and mime info
+ * @param[in] operation The operation of the app-control
+ * @param[in] uri       The URI of the app-control
+ * @param[in] mime      The MIME-Type of the app-control
  * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_appcontrol()
  *
  * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
@@ -449,6 +494,27 @@ typedef int (*pkgmgrinfo_app_splash_screen_list_cb)(const char *src,
                const char *indicatordisplay, const char *operation,
                const char *color_depth, void *user_data);
 
+/**
+ * @fn int (*pkgmgrinfo_app_res_control_list_cb) (const char *res_type,
+               const char *min_res_version, const char *max_res_version,
+               const char *auto_close, void *user_data);
+ * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_res_control()
+ *
+ * @param[in] res_type the resource type of the res_control
+ * @param[in] min_res_version the minimum resource version of the res_control
+ * @param[in] max_res_version the maximum resource version of the res_control
+ * @param[in] auto_close the auto close of the res_control
+ * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_res_control()
+ *
+ * @return 0 if success, negative value(<0) if fail, Callback is not called if return value is negative.\n
+ *
+ * @see        pkgmgrinfo_appinfo_foreach_res_control()
+ */
+
+typedef int (*pkgmgrinfo_app_res_control_list_cb) (const char *res_type,
+               const char *min_res_version, const char *max_res_version,
+               const char *auto_close, void *user_data);
+
 
 
 /**