summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJunghyun Yeon <jungh.yeon@samsung.com>2017-04-06 15:30:09 +0900
committerJunghyun Yeon <jungh.yeon@samsung.com>2017-04-12 16:51:28 +0900
commit2d1119045203366fc3623554e0da4d960fa8859c (patch)
tree5ff58c9e99b19c53ebc87b391da150f93d05ed19 /include
parent8bbb692f89d39b44f095719c9331c2329d46d300 (diff)
downloadapp-manager-2d1119045203366fc3623554e0da4d960fa8859c.tar.gz
app-manager-2d1119045203366fc3623554e0da4d960fa8859c.tar.bz2
app-manager-2d1119045203366fc3623554e0da4d960fa8859c.zip
Add app_info_foreach_category CAPI
Change-Id: Ib06b7a0ea63793e65344f4ae4dff22605c69ec17 Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/app_info.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/app_info.h b/include/app_info.h
index 14c65c1..8125341 100644
--- a/include/app_info.h
+++ b/include/app_info.h
@@ -114,6 +114,20 @@ typedef bool (*app_info_filter_cb) (app_info_h app_info, void *user_data);
typedef bool (*app_info_metadata_cb) (const char *metadata_key, const char *metadata_value, void *user_data);
/**
+ * @brief Called for each application category in app_info_foreach_category().
+ * @since_tizen 4.0
+ * @remarks @a category will be freed when the application information handle is destroyed
+ * using app_info_destroy()
+ * @param[in] category The name of the category
+ * @param[in] user_data The user data passed to app_info_foreach_category()
+ * @return @c true to continue with the next iteration of the loop, \n
+ * otherwise @c false to break out of the loop
+ * @pre app_info_foreach_category() will invoke this callback.
+ * @see app_info_foreach_category()
+ */
+typedef bool (*app_info_category_cb) (const char *category, void *user_data);
+
+/**
* @brief Creates the application information handle.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] app_id The application ID
@@ -336,6 +350,24 @@ int app_info_is_preload(app_info_h app_info, bool *preload);
int app_info_clone(app_info_h *clone, app_info_h app_info);
/**
+ * @brief Runs a callback for each category which the given application belongs to.
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/packagemanager.admin
+ * @param[in] app_info The application information
+ * @param[in] callback The callback function
+ * @param[in] user_data The user data to be passed to the callback function
+ * @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
+ * @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied
+ * @see app_info_create()
+ */
+int app_info_foreach_category(app_info_h app_info, app_info_category_cb callback, void *user_data);
+
+/**
* @brief Creates the application information filter handle from DB.
* All filter properties will be ANDed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif