TizenRefApp-9495 [App Shortcut Widget] Add doxygen to public headers of Edit application 64/153964/3
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Thu, 28 Sep 2017 11:05:47 +0000 (14:05 +0300)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 4 Oct 2017 08:31:03 +0000 (11:31 +0300)
Change-Id: Ia287669e8531fb2853c862f8029fe62a4f00c4f7

apptray-widget-app/inc/apptray_wgt_app_item_info.h
apptray-widget-app/inc/apptray_wgt_app_key_event_provider.h
apptray-widget-app/inc/apptray_wgt_app_utils.h
apptray-widget-app/src/apptray_wgt_app_item_info.c

index 9ac91b02af98924b8d8227d0ed7b0d0a47b46f44..dfb872b3d029bde19c663d8980ceffa1d781c99e 100755 (executable)
 
 #include <Elementary.h>
 
+/**
+ * @brief Item info structure
+ */
 typedef struct {
-       char *pkgid;
-       char *appid;
-       char *name;
-       char *icon;
-       Eina_Bool is_selected;
-       Elm_Object_Item *gl_item;
+       char *pkgid;                   /**< Application package id */
+       char *appid;                   /**< Application id */
+       char *name;                    /**< Name to display */
+       char *icon;                    /**< Icon path */
+       Eina_Bool is_selected;         /**< Item selected status */
+       Elm_Object_Item *gl_item;      /**< Genlist item */
 } apptray_wgt_app_item_info_s;
 
+/**
+ * @brief Creates item info instance
+ * @param[in] appid Application id in accordance to item
+ * @return New instance of item info on success, otherwise NULL on failure
+ */
 apptray_wgt_app_item_info_s *apptray_wgt_app_item_info_create(
                const char *appid);
 
+/**
+ * @brief Destroys item info instance
+ * @param[in] item_info Item info instance to destroy
+ */
 void apptray_wgt_app_item_info_destroy(apptray_wgt_app_item_info_s *item_info);
 
 #endif /* __APPTRAY_WGT_APP_ITEM_INFO_H__*/
index 6d128073b77f59d6a717d550e24738ec6fae462f..d2c24410b25335bcfed07871c939f33dba199fae 100755 (executable)
 
 #include <stdbool.h>
 
+/**
+ * Enumeration for key types that are available for handling
+ */
 typedef enum {
-       APPTRAY_WGT_APP_KEY_TYPE_BACK = 0,
-       APPTRAY_WGT_APP_KEY_TYPE_POWER,
-       APPTRAY_WGT_APP_KEY_TYPE_MAX
+       APPTRAY_WGT_APP_KEY_TYPE_BACK = 0, /**< Back key */
+       APPTRAY_WGT_APP_KEY_TYPE_POWER,    /**< Power key */
+
+       APPTRAY_WGT_APP_KEY_TYPE_MAX       /**< Total keys count */
 } apptray_wgt_app_key_type_e;
 
+/**
+ * @brief Key event callback prototype
+ */
 typedef bool (*apptray_wgt_app_key_event_cb)(void *);
 
+/**
+ * @brief Initializes Key event provider
+ */
 void apptray_wgt_app_key_event_provider_init(void);
 
+/**
+ * @brief Deinitializes Key event provider
+ */
 void apptray_wgt_app_key_event_provider_deinit(void);
 
+/**
+ * @brief Adds key event handler
+ * @param[in] type Key type to handle
+ * @param[in] result_cb Result callback function
+ * @param[in] result_data Result callback data
+ * @return bool on success, false otherwise
+ */
 bool apptray_wgt_app_key_event_provider_add_handler(
                apptray_wgt_app_key_type_e type,
                apptray_wgt_app_key_event_cb result_cb,
                void *result_data);
 
+/**
+ * @brief Deletes key event handler
+ * @param[in] type Key type that was handled
+ * @param[in] result_cb Result callback function that was set
+ */
 void apptray_wgt_app_key_event_provider_del_handler(
                apptray_wgt_app_key_type_e type,
                apptray_wgt_app_key_event_cb result_cb);
index 51bfd56ac8bf2a2368edeec784a092cac5dff0f7..da17ea173b2e201375d1b16ddabeec0cf5f04ff7 100755 (executable)
 #ifndef __APPTRAY_WGT_APP_UTIL_H__
 #define __APPTRAY_WGT_APP_UTIL_H__
 
+/**
+ * @brief Gets full path to edje files directory
+ * @return Path to edje files directory
+ */
 const char *apptray_wgt_app_utils_get_edje_path();
 
+/**
+ * @brief Gets full path to locale files directory
+ * @return Path to locale files directory
+ */
 const char *apptray_wgt_app_utils_get_locale_path();
 
+/**
+ * @brief Gets full path to default application icon resource
+ * @return Path to default application icon
+ */
 const char *apptray_wgt_app_utils_get_default_app_icon_path();
 
 #endif /* __APPTRAY_WGT_APP_UTIL_H__ */
index 9a9699e6f7cfbe1a4bf4e8a744f5b6236d970bb8..84b053a00eecaddee065ba88a7e1e8e44a5e04fb 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "apptray_wgt_app_item_info.h"
 
-#include <stdlib.h>
 #include <app.h>
 #include <app_info.h>
 #include <app_manager.h>
@@ -40,9 +39,7 @@ apptray_wgt_app_item_info_s *apptray_wgt_app_item_info_create(const char *appid)
        retv_if(!appid, NULL);
 
        item_info = calloc(1, sizeof(apptray_wgt_app_item_info_s));
-       if (NULL == item_info) {
-               return NULL;
-       }
+       retv_if(!item_info, NULL);
 
        int error = app_info_create(appid, &appinfo_h);
        _D("AppTrayError Error = %d, AppID=%s", error, appid);
@@ -129,5 +126,6 @@ void apptray_wgt_app_item_info_destroy(apptray_wgt_app_item_info_s *item_info)
        free(item_info->appid);
        free(item_info->name);
        free(item_info->icon);
+
        free(item_info);
 }