Add description into CAPIs 23/234323/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 25 May 2020 11:14:48 +0000 (20:14 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 25 May 2020 11:15:10 +0000 (20:15 +0900)
Change-Id: I8ea6edec564a8a289c6c1120466c2509f65b0ae9
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/theme/api/theme.h
src/theme/api/theme_error.h
src/theme/api/theme_loader.h

index f10c77d..d2fa310 100644 (file)
 extern "C" {
 #endif
 
+/**
+ * @file theme.h
+ */
+
+/**
+ * @addtogroup CAPI_THEME_MODULE
+ * @{
+ */
+
+/**
+ * @brief The theme information handle.
+ * @since_tizen 6.0
+ */
 typedef void *theme_h;
 
+/**
+ * @brief Gets the theme ID.
+ * @since_tizen 6.0
+ * @remarks You must release @a id using free().
+ * @param[in]  handle     The theme information
+ * @param[out] id         The theme ID
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_id(theme_h handle, char **id);
 
+/**
+ * @brief Gets the version of theme.
+ * @since_tizen 6.0
+ * @remarks You must release @a ver using free().
+ * @param[in]  handle     The theme information
+ * @param[out] ver        The theme version
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_version(theme_h handle, char **ver);
 
+/**
+ * @brief Gets the version of tool used to make theme.
+ * @since_tizen 6.0
+ * @remarks You must release @a ver using free().
+ * @param[in]  handle     The theme information
+ * @param[out] ver        The theme version
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_tool_version(theme_h handle, char **ver);
 
+/**
+ * @brief Gets the title of theme.
+ * @since_tizen 6.0
+ * @remarks You must release @a title using free().
+ * @param[in]  handle       The theme information
+ * @param[out] title        The title of theme
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_title(theme_h handle, char **title);
 
+/**
+ * @brief Gets the resolution of theme.
+ * @since_tizen 6.0
+ * @remarks You must release @a resolution using free().
+ * @param[in]  handle         The theme information
+ * @param[out] resolution     The resolution of theme
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_resolution(theme_h handle, char **resolution);
 
+/**
+ * @brief Gets the path of preview image for theme.
+ * @since_tizen 6.0
+ * @remarks You must release @a preview using free().
+ * @param[in]  handle         The theme information
+ * @param[out] preview        The path of preview image for theme
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_preview(theme_h handle, char **preview);
 
+/**
+ * @brief Gets the description of theme.
+ * @since_tizen 6.0
+ * @remarks You must release @a description using free().
+ * @param[in]  handle             The theme information
+ * @param[out] description        The description of theme
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_description(theme_h handle, char **description);
 
+/**
+ * @brief Gets the string corresponding with given key.
+ * @since_tizen 6.0
+ * @remarks You must release @a val using free().
+ * @param[in]  handle     The theme information
+ * @param[in]  key        String key to find information
+ * @param[out] val        Value corresponding with given key
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_string(theme_h handle, const char *key, char **val);
 
+/**
+ * @brief Gets the bundle of strings corresponding with given key.
+ * @since_tizen 6.0
+ * @remarks You must release @a val using free().
+ * @param[in]  handle     The theme information
+ * @param[in]  key        String key to find information
+ * @param[out] val        Values corresponding with given key
+ * @param[out] cnt        Number of returned strings
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_get_string_array(theme_h handle, const char *key,
     char ***val, int *cnt);
 
+/**
+ * @brief Gets the integer corresponding with given key.
+ * @since_tizen 6.0
+ * @param[in]  handle     The theme information
+ * @param[in]  key        String key to find information
+ * @param[out] val        Value corresponding with given key
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
 int theme_get_int(theme_h handle, const char *key, int *val);
 
+/**
+ * @brief Gets the float corresponding with given key.
+ * @since_tizen 6.0
+ * @param[in]  handle     The theme information
+ * @param[in]  key        String key to find information
+ * @param[out] val        Value corresponding with given key
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
 int theme_get_float(theme_h handle, const char *key, float *val);
 
+/**
+ * @brief Gets the boolean corresponding with given key.
+ * @since_tizen 6.0
+ * @param[in]  handle     The theme information
+ * @param[in]  key        String key to find information
+ * @param[out] val        Value corresponding with given key
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
 int theme_get_bool(theme_h handle, const char *key, bool *val);
 
+/**
+ * @brief Clones the given theme information.
+ * @since_tizen 6.0
+ * @remarks You must release @a new_handle using theme_destroy().
+ * @param[in]  handle         The theme information to be cloned
+ * @param[out] new_handle     Cloned theme information
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ */
 int theme_clone(theme_h handle, theme_h *new_handle);
 
+/**
+ * @brief Destroys the theme information.
+ * @since_tizen 6.0
+ * @param[in]  handle         The theme information to be destroyed
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
 int theme_destroy(theme_h handle);
 
 #ifdef __cplusplus
index c2ce53c..50bb97e 100644 (file)
@@ -28,7 +28,7 @@
 
 
 /**
- * @addtogroup THEME_MANAGER_MODULE
+ * @addtogroup CAPI_THEME_MODULE
  * @{
  */
 
index 319ea06..183522f 100644 (file)
 extern "C" {
 #endif
 
+/**
+ * @file theme_loader.h
+ */
+
+/**
+ * @addtogroup CAPI_THEME_MODULE
+ * @{
+ */
+
+/**
+ * @brief Called to get the loaded theme information.
+ * @since_tizen 6.0
+ * @param[in] handle    The loaded theme information.
+ * @param[in] data      The user data passed from add event function.
+ * @return @c 0 on success,
+ *         otherwise a negative value.
+ * @pre theme_loader_add_event() will invoke this callback.
+ * @see theme_loader_add_event()
+ */
 typedef int (*theme_loader_loaded_cb) (theme_h handle, void *data);
 
+/**
+ * @brief Called to get the unloaded theme ID.
+ * @since_tizen 6.0
+ * @param[in] id        The ID of unloaded theme.
+ * @param[in] data      The user data passed from add event function.
+ * @return @c 0 on success,
+ *         otherwise a negative value.
+ * @pre theme_loader_add_event() will invoke this callback.
+ * @see theme_loader_add_event()
+ */
 typedef int (*theme_loader_unloaded_cb) (const char *id, void *data);
 
+/**
+ * @brief The theme loader handle.
+ * @since_tizen 6.0
+ */
 typedef void *theme_loader_h;
 
+/**
+ * @brief The theme loader event handle.
+ * @since_tizen 6.0
+ */
 typedef void *theme_loader_event_h;
 
+/**
+ * @brief Creates the theme laoder handle.
+ * @since_tizen 6.0
+ * @remarks You must release @handle id using theme_loader_destroy().
+ * @param[out]  handle     The theme loader information
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ * @see theme_loader_destroy()
+ */
 int theme_loader_create(theme_loader_h *handle);
 
+/**
+ * @brief Destroys the theme laoder handle.
+ * @since_tizen 6.0
+ * @param[in]  handle     The theme loader information
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see theme_loader_create()
+ */
 int theme_loader_destroy(theme_loader_h handle);
 
+/**
+ * @brief Registers a callback function to be invoked when the theme is being loaded or unloaded.
+ * @since_tizen 6.0
+ * @param[in] handle    The theme loader handle
+ * @param[in] loaded   The callback function to be registered for theme load event
+ * @param[in] unloaded   The callback function to be registered for theme unload event
+ * @param[in] data  The user data to be passed to the callback function
+ * @param[out] event_h  The theme event handle
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_OUT_OF_MEMORY           Out of memory
+ * @see theme_loader_remove_event()
+*/
 int theme_loader_add_event(theme_loader_h handle,
     theme_loader_loaded_cb loaded, theme_loader_unloaded_cb unloaded,
     void *data, theme_loader_event_h* event_h);
 
+/**
+ * @brief Unregisters a callback function.
+ * @since_tizen 6.0
+ * @param[in] handle         The theme loader handle
+ * @param[in] event_handle   The theme event handle
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see theme_loader_add_event()
+*/
 int theme_loader_remove_event(theme_loader_h handle,
     theme_loader_event_h event_handle);
 
+/**
+ * @brief Loads current theme information.
+ * @since_tizen 6.0
+ * @param[in]  handle         The theme loader handle
+ * @param[out] cur_theme      The information of current theme
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+*/
 int theme_loader_load_current(theme_loader_h handle, theme_h *cur_theme);
 
+/**
+ * @brief Loads information of given theme ID.
+ * @since_tizen 6.0
+ * @param[in]  handle         The theme loader handle
+ * @param[in]  id             The theme ID
+ * @param[out] theme          The theme information
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+*/
 int theme_loader_load(theme_loader_h handle, const char *id, theme_h *theme);
 
+/**
+ * @brief Gets bundle of theme IDs.
+ * @since_tizen 6.0
+ * @param[in]  handle         The theme loader handle
+ * @param[out] ids            The theme IDs
+ * @param[out] count          The number of IDs
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #THEME_MANAGER_ERROR_NONE              Successful
+ * @retval #THEME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #THEME_MANAGER_OUT_OF_MEMORY           Out of memory
+*/
 int theme_loader_query_id(theme_loader_h handle, char ***ids, int *count);
 
 #ifdef __cplusplus