Add new elements for component-based application
[platform/core/appfw/pkgmgr-info.git] / include / pkgmgrinfo_type.h
index e138d14..5b7ee08 100644 (file)
@@ -110,7 +110,9 @@ typedef enum {
        PMINFO_PKGINFO_GET_AUTHOR = 0x0008,
        PMINFO_PKGINFO_GET_DESCRIPTION = 0x0010,
        PMINFO_PKGINFO_GET_PRIVILEGE = 0x0020,
-       PMINFO_PKGINFO_GET_ALL = 0x003F
+       PMINFO_PKGINFO_GET_APPDEFINED_PRIVILEGE = 0x0040,
+       PMINFO_PKGINFO_GET_DEPENDENCY = 0x0080,
+       PMINFO_PKGINFO_GET_ALL = 0x00FF
 } pkgmgrinfo_pkginfo_get_option;
 
 /**
@@ -223,6 +225,11 @@ typedef void *pkgmgrinfo_appcontrol_h;
 typedef void *pkgmgrinfo_archiveinfo_h;
 
 /**
+ * @brief A handle to get component information
+ */
+typedef void *pkgmgrinfo_compinfo_h;
+
+/**
  * @brief type definition.
  */
 typedef void pkgmgrinfo_client;
@@ -306,6 +313,60 @@ typedef int (*pkgmgrinfo_pkg_privilege_list_cb) (const char *privilege_name,
                                                        void *user_data);
 
 /**
+ * @fn int (*pkgmgrinfo_pkg_appdefined_privilege_list_cb) (const char *privilege_name, const char *license_path, void *user_data)
+ *
+ * @brief Specifies the type of function passed to pkgmgrinfo_pkginfo_foreach_appdefined_privilege()
+ *
+ * @param[in] privilege_name the name of the privilege
+ * @param[in] license_path the path of the license
+ * @param[in] user_data user data passed to pkgmgrinfo_pkginfo_foreach_appdefined_privilege()
+ *
+ * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
+ *
+ * @see  pkgmgrinfo_pkginfo_foreach_appdefined_privilege()
+ */
+typedef int (*pkgmgrinfo_pkg_appdefined_privilege_list_cb) (const char *privilege_name,
+                                                       const char *license_path,
+                                                       void *user_data);
+/**
+ * @fn int (*pkgmgrinfo_pkg_dependency_list_cb) (const char *pkgid, const char *type, const char *required_version, void *user_data)
+ *
+ * @brief Specifies the dependency info of given package passed to pkgmgrinfo_pkginfo_foreach_dependency() or pkgmgrinfo_pkginfo_foreach_required_by()
+ *
+ * @param[in] pkgid the pkgid which has dependency with given package
+ * @param[in] type type of dependency
+ * @param[in] required_version required version of dependency
+ * @param[in] user_data user data passed
+ *
+ * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
+ *
+ * @see  pkgmgrinfo_pkginfo_foreach_dependency()
+ * @see  pkgmgrinfo_pkginfo_foreach_required_by()
+ */
+typedef int (*pkgmgrinfo_pkg_dependency_list_cb) (const char *pkgid,
+               const char *type, const char *required_version,
+               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()
+ *
+ * @param[in] pkgid the name of the package
+ * @param[in] appid the name of the application
+ * @param[in] plugin_type the type of the executed plugin
+ * @param[in] plugin_name the name of the executed plugin
+ * @param[in] user_data user data passed to pkgmgrinfo_plugininfo_foreach_plugininfo()
+ *
+ * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
+ *
+ * @see  pkgmgrinfo_plugininfo_foreach_plugininfo()
+ */
+typedef int (*pkgmgrinfo_plugin_list_cb) (const char *pkgid, const char *appid,
+               const char *plugin_type, const char *plugin_name,
+               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()
@@ -335,6 +396,24 @@ typedef int (*pkgmgrinfo_app_metadata_list_cb) (const char *metadata_key,
  */
 typedef int (*pkgmgrinfo_app_control_list_cb) (const char *operation, const char *uri, const char *mime,
                                                        void *user_data);
+/**
+ * @fn int (*pkgmgrinfo_app_control_list_cb_v2) (const char *operation, const char *uri, const char *mime, const char *id, void *user_data)
+ *
+ * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_appcontrol_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] id        The ID of the app-control
+ * @param[in] user_data The user data passed from pkgmgrinfo_appinfo_foreach_appcontrol_v2()
+ *
+ * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
+ *
+ * @see  pkgmgrinfo_appinfo_foreach_appcontrol_v2()
+ */
+typedef int (*pkgmgrinfo_app_control_list_cb_v2) (const char *operation,
+               const char *uri, const char *mime, const char *id,
+               void *user_data);
 
 /**
  * @fn int (*pkgmgrinfo_app_background_category_list_cb) (const char *category_name, void *user_data)
@@ -375,6 +454,21 @@ typedef int (*pkgmgrinfo_app_splash_screen_list_cb)(const char *src,
                const char *color_depth, void *user_data);
 
 /**
+ * @fn int (*pkgmgrinfo_component_info_list_cb)(
+ *              const pkgmgrinfo_compinfo_h handle, void *user_data);
+ * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_component_info()
+ *
+ * @param[in]   handle          The handle of the component info
+ * @param[in]   user_data       The user data passed from pkgmgrinfo_appinfo_foreach_component_info()
+ *
+ * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
+ *
+ * @see pkgmgrinfo_appinfo_foreach_component_info()
+ */
+typedef int (*pkgmgrinfo_component_info_list_cb)(
+               const pkgmgrinfo_compinfo_h handle, void *user_data);
+
+/**
  * @brief Install Location Types
  */
 typedef enum {
@@ -387,11 +481,12 @@ typedef enum {
  * @brief Application Component Types
  */
 typedef enum {
-       PMINFO_ALL_APP = 0,     /**< All Application*/
-       PMINFO_UI_APP,          /**< UI Application*/
-       PMINFO_SVC_APP,         /**< Service Application*/
-       PMINFO_WIDGET_APP,      /**< Widget Application*/
-       PMINFO_WATCH_APP,  /**< Watch Application*/
+       PMINFO_ALL_APP = 0,             /**< All Application*/
+       PMINFO_UI_APP,                  /**< UI Application*/
+       PMINFO_SVC_APP,                 /**< Service Application*/
+       PMINFO_WIDGET_APP,              /**< Widget Application*/
+       PMINFO_WATCH_APP,               /**< Watch Application*/
+       PMINFO_COMPONENT_BASED_APP,     /**< Component-based Application (Since 5.5)*/
 } pkgmgrinfo_app_component;
 
 /**
@@ -433,6 +528,7 @@ typedef enum {
 typedef enum {
        INSTALL_INTERNAL = 0,           /**< Internal Installation*/
        INSTALL_EXTERNAL,               /**< External Installation*/
+       INSTALL_EXTENDED,               /**< Extended Installation*/
 } INSTALL_LOCATION;
 
 /**