Release version 0.24.0
[platform/core/appfw/pkgmgr-info.git] / include / pkgmgrinfo_type.h
index 2fe0274..7f83f16 100644 (file)
@@ -114,7 +114,8 @@ typedef enum {
        PMINFO_PKGINFO_GET_APPDEFINED_PRIVILEGE = 0x0040,
        PMINFO_PKGINFO_GET_DEPENDENCY = 0x0080,
        PMINFO_PKGINFO_GET_RES_INFO = 0x0100,
-       PMINFO_PKGINFO_GET_ALL = 0x01FF
+       PMINFO_PKGINFO_GET_METADATA = 0x0200,
+       PMINFO_PKGINFO_GET_ALL = 0x03FF
 } pkgmgrinfo_pkginfo_get_option;
 
 /**
@@ -202,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;
@@ -346,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()