Adds doxygen and remove needless apis 02/226602/6
authorInkyun Kil <inkyun.kil@samsung.com>
Wed, 4 Mar 2020 05:55:49 +0000 (14:55 +0900)
committerInkyun Kil <inkyun.kil@samsung.com>
Thu, 5 Mar 2020 03:20:44 +0000 (03:20 +0000)
Change-Id: I5894df1adc0470a06dc85303ade3f4ff3c333480
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
ambient-viewer/include/ambient_viewer.h
ambient-viewer/include/ambient_viewer_common.h
ambient-viewer/include/ambient_viewer_surface.h
watch-holder/api/watch_holder.cc
watch-holder/api/watch_holder.h

index 447ae5f..45556ce 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __TIZEN_WIDGET_VEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_H__
-#define __TIZEN_WIDGET_VEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_H__
+#ifndef __TIZEN_WIDGET_VIEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_H__
+#define __TIZEN_WIDGET_VIEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_H__
 
 #include <stdbool.h>
 #include <bundle.h>
index 3ca45ba..3cc1dee 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __TIZEN_WIDGET_VEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_COMMON_H__
-#define __TIZEN_WIDGET_VEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_COMMON_H__
+#ifndef __TIZEN_WIDGET_VIEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_COMMON_H__
+#define __TIZEN_WIDGET_VIEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_COMMON_H__
 
 #include <tizen.h>
 
index 4267e09..4573938 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __TIZEN_WIDGET_VEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_SURFACE_H__
-#define __TIZEN_WIDGET_VEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_SURFACE_H__
+#ifndef __TIZEN_WIDGET_VIEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_SURFACE_H__
+#define __TIZEN_WIDGET_VIEWER_AMBIENT_VIEWER_INCLUDE_AMBIENT_VIEWER_SURFACE_H__
 
 #include <Evas.h>
 
index 4598524..f0128c8 100644 (file)
@@ -100,24 +100,6 @@ C_EXPORT int watch_holder_launch(watch_holder_h handle, bool background, const c
   return handle->Launch(std::string(appid), background, extra);
 }
 
-C_EXPORT int watch_holder_enable_rendering(watch_holder_h handle) {
-  if (handle == nullptr)
-    return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
-
-  handle->EnableRendering();
-
-  return WATCH_HOLDER_ERROR_NONE;
-}
-
-C_EXPORT int watch_holder_disable_rendering(watch_holder_h handle, int timeout) {
-  if (handle == nullptr)
-    return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
-
-  handle->DisableRendering(timeout);
-
-  return WATCH_HOLDER_ERROR_NONE;
-}
-
 C_EXPORT int watch_holder_get_current(watch_holder_h handle, watch_h *watch) {
   if (handle == nullptr)
     return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
@@ -128,6 +110,9 @@ C_EXPORT int watch_holder_get_current(watch_holder_h handle, watch_h *watch) {
 }
 
 C_EXPORT int watch_holder_foreach_watch(watch_holder_h handle, watch_holder_foreach_cb callback, void *user_data) {
+  if (handle == nullptr || callback == nullptr)
+    return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
+
   std::list<std::shared_ptr<Watch>> list = handle->GetStack();
   for (std::shared_ptr<Watch> wptr : list) {
     callback(reinterpret_cast<watch_h>(wptr.get()), user_data);
@@ -135,12 +120,3 @@ C_EXPORT int watch_holder_foreach_watch(watch_holder_h handle, watch_holder_fore
 
   return WATCH_HOLDER_ERROR_NONE;
 }
-
-C_EXPORT int watch_holder_monitor(watch_holder_h handle) {
-  return WATCH_HOLDER_ERROR_NONE;
-}
-
-C_EXPORT int watch_holder_unmonitor(watch_holder_h handle) {
-  return WATCH_HOLDER_ERROR_NONE;
-}
-
index b72681d..2f8d967 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __WATCH_HOLDER_H__
-#define __WATCH_HOLDER_H__
+#ifndef __TIZEN_WIDGET_VIEWER_WATCH_HOLDER_H__
+#define __TIZEN_WIDGET_VIEWER_WATCH_HOLDER_H__
 
 #include <app_control.h>
 #include <bundle.h>
 extern "C" {
 #endif
 
+/**
+ * @brief The watch holder handle.
+ * @remarks This handle only for internal applications.
+ */
 typedef struct watch_holder_s *watch_holder_h;
 
+/**
+ * @brief The structure type containing the set of callback functions for watch events handle.
+ * @remarks This structure only for internal applications.
+ */
 typedef struct {
-       void (*watch_holder_lifecycle_launched_cb)(watch_h watch, void *data);
-       void (*watch_holder_lifecycle_dead_cb)(watch_h watch, bool is_faulted, void *data);
-       void (*watch_holder_lifecycle_added_cb)(watch_h watch, void *data);
-       void (*watch_holder_lifecycle_removed_cb)(watch_h watch, void *data);
-       void (*watch_holder_lifecycle_updated_cb)(watch_h watch, Evas_Object *image, void *data);
-       void (*watch_holder_lifecycle_bound_cb)(watch_h watch, void *data);
-       void (*watch_holder_lifecycle_ambient_changed_cb)(bool enter, bundle *extra, void *data);
+       void (*watch_holder_lifecycle_launched_cb)(watch_h watch, void *data); /**< This callback function is called after the watch is launched. */
+       void (*watch_holder_lifecycle_dead_cb)(watch_h watch, bool is_faulted, void *data); /**< This callback function is called after the watch is dead. */
+       void (*watch_holder_lifecycle_added_cb)(watch_h watch, void *data); /**< This callback function is called after the watch is added. */
+       void (*watch_holder_lifecycle_removed_cb)(watch_h watch, void *data); /**< This callback function is called after the watch is removed. */
+       void (*watch_holder_lifecycle_updated_cb)(watch_h watch, Evas_Object *image, void *data); /**< This callback function is called after the watch is updated. */
+       void (*watch_holder_lifecycle_bound_cb)(watch_h watch, void *data); /**< This callback function is called after the watch is bound. */
+       void (*watch_holder_lifecycle_ambient_changed_cb)(bool enter, bundle *extra, void *data); /**< This callback function is called when the device enters or exits ambient mode. */
 } watch_holder_lifecycle_st;
 
-typedef void (*watch_holder_foreach_cb)(watch_h watch, void *data);
+/**
+ * @brief Retrieves all watchs of added to watch holder.
+ * @remarks This function only for internal applications.
+ *
+ * @param[in] watch The watch handle
+ * @param[in] user_data The user data
+ */
+typedef void (*watch_holder_foreach_cb)(watch_h watch, void *user_data);
 
 /**
- * @brief
- * @details
- * @since_tizen 5.5
- * @return @c 0 on success, otherwise a negative error value
+ * @brief Creates the watch holder handle.
+ * @remarks This function only for internal applications.
+ * @remarks @a handle must be released using watch_holder_destroy().
+ * @param[in] viewer_win The Evas Object
+ * @param[in] lifecycle The set of callback functions to handle watch events
+ * @param[in] user_data The user data
+ * @param[out] handle The watch holder handle
+ * @return #WATCH_HOLDER_ERROR_NONE on success, otherwise a negative error value
+ * @retval #WATCH_HOLDER_ERROR_NONE Success
+ * @retval #WATCH_HOLDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WATCH_HOLDER_ERROR_OUT_OF_MEMORY Out of memory
+ * @see watch_holder_destroy()
  */
 int watch_holder_create(Evas_Object *viewer_win, watch_holder_lifecycle_st lifecycle, void *user_data, watch_holder_h *handle);
 
+/**
+ * @brief Destroys the watch handle.
+ * @remarks This function only for internal applications.
+ * @param[in] handle The watch holder handle
+ * @return #WATCH_HOLDER_ERROR_NONE on success, otherwise a negative error value
+ * @retval #WATCH_HOLDER_ERROR_NONE Success
+ * @retval #WATCH_HOLDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see watch_holder_create()
+ */
 int watch_holder_destroy(watch_holder_h handle);
 
+/**
+ * @brief Launches the watch application.
+ * @remarks This function only for internal applications.
+ * @param[in] handle The watch holder handle
+ * @param[in] background Whether launch in background or not
+ * @param[in] appid The application id of the watch
+ * @param[in] extra The extra data
+ * @return #WATCH_HOLDER_ERROR_NONE on success, otherwise a negative error value
+ * @retval #WATCH_HOLDER_ERROR_NONE Success
+ * @retval #WATCH_HOLDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WATCH_HOLDER_ERROR_OUT_OF_MEMORY Out of memory
+ */
 int watch_holder_launch(watch_holder_h handle, bool background, const char *appid, bundle *extra);
 
-int watch_holder_enable_rendering(watch_holder_h handle);
-
-int watch_holder_disable_rendering(watch_holder_h handle, int timeout);
-
+/**
+ * @brief Gets current watch.
+ * @remarks This function only for internal applications.
+ * @param[in] handle The watch holder handle
+ * @param[out] watch The watch handle
+ * @return #WATCH_HOLDER_ERROR_NONE on success, otherwise a negative error value
+ * @retval #WATCH_HOLDER_ERROR_NONE Success
+ * @retval #WATCH_HOLDER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
 int watch_holder_get_current(watch_holder_h handle, watch_h *watch);
 
+/**
+ * @brief Retrieves all watch applications held by the holder.
+ * @remarks This function only for internal applications.
+ * @param[in] handle The watch holder handle
+ * @param[in] cb The callback function
+ * @param[in] user_data The user data
+ * @return #WATCH_HOLDER_ERROR_NONE on success, otherwise a negative error value
+ * @retval #WATCH_HOLDER_ERROR_NONE Success
+ * @retval #WATCH_HOLDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see watch_holder_foreach_cb()
+ */
 int watch_holder_foreach_watch(watch_holder_h handle, watch_holder_foreach_cb cb, void *user_data);
 
-int watch_holder_monitor(watch_holder_h handle);
-
-int watch_holder_unmonitor(watch_holder_h handle);
-
 #ifdef __cplusplus
 }
 #endif
 
-#endif
+#endif /* __TIZEN_WIDGET_VIEWER_WATCH_HOLDER_H__ */