Add new APIs related to application component
[platform/core/api/app-manager.git] / include / app_info.h
index 765514a..190db03 100644 (file)
@@ -77,6 +77,33 @@ extern "C" {
 #define   PACKAGE_INFO_PROP_APP_DISABLED    "PACKAGE_INFO_PROP_APP_DISABLED"
 
 /**
+ * @brief Definition for string property for filtering based on app info: String property for
+ *        filtering with the application component type.
+ *        Value related with this property should be one of "uiapp", "svcapp", "widgetapp"
+ *        and "watchapp".
+ * @since_tizen 4.0
+ * @see app_info_app_component_e
+ * @see app_info_get_app_component_type()
+ */
+#define   PACKAGE_INFO_PROP_APP_COMPONENT_TYPE    "PACKAGE_INFO_PROP_APP_COMPONENT_TYPE"
+
+/**
+ * @brief Enumeration for application component type.
+ * @since_tizen 4.0
+ * @details A component is an application considered as a part of a package.
+ *          The application component type indicates what type of
+ *          a component an application is in a package.
+ * @see PACKAGE_INFO_PROP_APP_COMPONENT_TYPE
+ * @see app_info_get_app_component_type()
+ */
+typedef enum {
+        APP_INFO_APP_COMPONENT_TYPE_UI_APP,       /**< UI application */
+        APP_INFO_APP_COMPONENT_TYPE_SERVICE_APP,  /**< Service application */
+        APP_INFO_APP_COMPONENT_TYPE_WIDGET_APP,   /**< Widget application */
+        APP_INFO_APP_COMPONENT_TYPE_WATCH_APP,    /**< Watch application */
+} app_info_app_component_type_e;
+
+/**
  * @brief Application information handle.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
@@ -262,6 +289,21 @@ int app_info_get_package(app_info_h app_info, char **package);
 int app_info_get_type(app_info_h app_info, char **type);
 
 /**
+ * @brief  Gets the application component type.
+ * @since_tizen 4.0
+ * @param[in]   app_info   The application information
+ * @param[out]  component  The application component type
+ * @return      @c 0 on success,
+ *              otherwise a negative error value
+ * @retval  #APP_MANAGER_ERROR_NONE               Successful
+ * @retval  #APP_MANAGER_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval  #APP_MANAGER_ERROR_IO_ERROR           I/O error
+ * @see PACKAGE_INFO_PROP_APP_COMPONENT_TYPE
+ * @see app_info_app_component_type_e
+ */
+int app_info_get_app_component_type(app_info_h app_info, app_info_app_component_type_e *type);
+
+/**
  * @brief  Gets the list of metadata for a particular application.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  * @param[in]  app_info   The application information