Fix API documentation errors
authorsaerome.kim <saerome.kim@samsung.com>
Mon, 3 Jul 2017 06:43:44 +0000 (15:43 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Mon, 17 Jul 2017 02:09:10 +0000 (11:09 +0900)
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
include/mesh.h
src/mesh_dbus.c
test/main.c

index 1ac380c..54032b0 100644 (file)
@@ -62,6 +62,7 @@ typedef enum {
        MESH_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,         /**< Not Supported */
        MESH_ERROR_OPERATION_FAILED = TIZEN_ERROR_MESH | 0x01,        /**< Operation failed */
        MESH_ERROR_OPERATION_ABORTED = TIZEN_ERROR_MESH | 0x02,       /**< Operation is aborted */
+       MESH_ERROR_ALREADY_INITIALIZED = TIZEN_ERROR_MESH | 0x03,     /**< Mesh Already Initialized */
 } mesh_error_e;
 
 /**
@@ -120,14 +121,18 @@ typedef enum {
  * @since_tizen 4.0
  */
 typedef enum {
-       MESH_MESH_ENABLED_EVENT = 0x00, /**< This event is received after enabling mesh network */
-       MESH_SCAN_DONE_EVENT = 0x01, /**< This event comes after scanning operation completed */
-       MESH_CONNECTION_STATE_EVENT = 0x02, /**< This event takes place when mesh network connection state is changed */
-       MESH_STATION_JOIN_EVENT = 0x03, /**< This event takes place when new station joined */
-       MESH_STATION_LEFT_EVENT = 0x04, /**< This event takes place when existing station left */
+       MESH_EVENT_ENABLED = 0x00, /**< This event is received after enabling mesh network */
+       MESH_EVENT_SCAN_DONE = 0x01, /**< This event comes after scanning operation completed */
+       MESH_EVENT_CONNECTION_STATE = 0x02, /**< This event takes place when mesh network connection state is changed */
+       MESH_EVENT_STATION_JOIN = 0x03, /**< This event takes place when new station joined */
+       MESH_EVENT_STATION_LEFT = 0x04, /**< This event takes place when existing station left */
 } mesh_event_e;
 
-
+/**
+ * @brief The HWMP type for mesh_hwmp_root_mode_e
+ *
+ * @since_tizen 4.0
+ */
 typedef enum {
        MESH_HWMP_ROOT_REACTIVE_MODE = 0, /**< Disable Proative Mode */
        MESH_HWMP_ROOT_SIMPLE_PROACTIVE_MODE = 2, /**< Enable the Proactive PREQ with no PREP */
@@ -139,7 +144,7 @@ typedef enum {
 } mesh_hwmp_root_mode_e;
 
 /**
- * @brief The structure type for the MESH_MESH_ENABLED_EVENT callback data.
+ * @brief The structure type for the MESH_EVENT_ENABLED callback data.
  * @details The result of creating or joining mesh network.
  *
  * @since_tizen 4.0
@@ -149,7 +154,7 @@ typedef struct {
 } mesh_mesh_enabled_event_s;
 
 /**
- * @brief The structure type for the MESH_STATION_JOIN_EVENT or MESH_STATION_LEFT_EVENT callback data.
+ * @brief The structure type for the MESH_EVENT_STATION_JOIN or MESH_EVENT_STATION_LEFT callback data.
  * @details Result of join or left event of other station.
  *
  * @since_tizen 4.0
@@ -159,7 +164,7 @@ typedef struct {
 } mesh_other_station_event_s;
 
 /**
- * @brief The structure type for the MESH_CONNECTION_STATE_EVENT callback data.
+ * @brief The structure type for the MESH_EVENT_CONNECTION_STATE callback data.
  * @details The state of mesh network connection.
  *
  * @since_tizen 4.0
@@ -432,7 +437,7 @@ int mesh_network_set_channel(mesh_network_h network, int channel);
  *
  * @since_tizen 4.0
  *
- * @param[in] netowrk The mesh network information handle.
+ * @param[in] network The mesh network information handle.
  * @param[out] rssi The received signal strength indicator.
  *
  * @return 0 on success, otherwise a negative error value.
@@ -594,7 +599,7 @@ int mesh_peer_get_address(mesh_peer_h peer, char **address);
  * @param[out] handle The mesh handle
  * @return @c 0 on success, otherwise negative error value
  * @retval #MESH_ERROR_NONE  Successful
- * @retval #WIFI_MANAGER_ERROR_ALREADY_INITIALIZED  Already initialized
+ * @retval #MESH_ERROR_ALREADY_INITIALIZED  Already initialized
  * @retval #MESH_ERROR_INVALID_PARAMETER       Invalid parameter
  * @retval #MESH_ERROR_INVALID_OPERATION       Invalid operation
  * @retval #MESH_ERROR_OPERATION_FAILED        Operation failed
@@ -607,13 +612,13 @@ int mesh_initialize(mesh_h *handle);
 /**
  * @brief Deinitializes Mesh network.
  * @since_tizen 4.0
- * @param[in] mesh     The mesh handle
+ * @param[in] handle The mesh handle
  * @return 0 on success, otherwise negative error value
- * @retval #WIFI_MANAGER_ERROR_NONE  Successful
- * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER  Invalid parameter
- * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION  Invalid operation
- * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED  Operation failed
- * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED   Not supported
+ * @retval #MESH_ERROR_NONE  Successful
+ * @retval #MESH_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #MESH_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #MESH_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #MESH_ERROR_NOT_SUPPORTED   Not supported
  */
 int mesh_deinitialize(mesh_h handle);
 
@@ -627,8 +632,8 @@ int mesh_deinitialize(mesh_h handle);
  * @remarks You can receive below events.
  * @see #MESH_EVENT_ENABLED
  * @see #MESH_EVENT_SCAN_DONE
- * @see #MESH_EVENT_STATION_JOINED
- * @see #MESH_EVENT_STATION_DISJOINED
+ * @see #MESH_EVENT_STATION_JOIN
+ * @see #MESH_EVENT_STATION_LEFT
  *
  * @param[out] event_type The event identification
  * @param[out] event parameter data pointer
@@ -911,7 +916,7 @@ int mesh_is_joined(mesh_h handle, bool* is_joined);
  * @since_tizen 4.0
  *
  * @param[in] handle The mesh handle
- * @param[in] is_joined The state of mesh network connection.
+ * @param[out] network Mesh bss information handle
  *
  *
  * @return 0 on success, otherwise a negative error value.
index 229a66f..be8cebc 100644 (file)
@@ -305,10 +305,10 @@ static void _mesh_signal_handler(GDBusConnection *connection,
                RETM_IF(NULL == ev.data.mesh_enable, "Failed to memory allocation !");
                ev.data.mesh_enable->result = __convert_service_error_type(result);
 
-               h->event_handler(MESH_MESH_ENABLED_EVENT, &ev);
+               h->event_handler(MESH_EVENT_ENABLED, &ev);
                free(ev.data.mesh_enable);
        } else if (0 == g_strcmp0(signal_name, "scan_done")) {
-               h->event_handler(MESH_SCAN_DONE_EVENT, NULL);
+               h->event_handler(MESH_EVENT_SCAN_DONE, NULL);
        } else if (0 == g_strcmp0(signal_name, "connection_state")) {
                char *mesh_id = NULL;
                char *bssid = NULL;
@@ -328,7 +328,7 @@ static void _mesh_signal_handler(GDBusConnection *connection,
                ev.data.connection_state->security = (mesh_security_type_e)security;
                ev.data.connection_state->state = (mesh_connection_state_e)state;
 
-               h->event_handler(MESH_CONNECTION_STATE_EVENT, &ev);
+               h->event_handler(MESH_EVENT_CONNECTION_STATE, &ev);
                free(ev.data.connection_state);
        } else if (0 == g_strcmp0(signal_name, "sta_joined")) {
                char *bssid = NULL;
@@ -337,7 +337,7 @@ static void _mesh_signal_handler(GDBusConnection *connection,
                RETM_IF(NULL == ev.data.sta_info, "Failed to memory allocation !");
                g_variant_get(parameters, "(s)", &bssid);
                memcpy(ev.data.sta_info->bssid, bssid, MAX_BSSID_LEN);
-               h->event_handler(MESH_STATION_JOIN_EVENT, &ev);
+               h->event_handler(MESH_EVENT_STATION_JOIN, &ev);
                free(ev.data.sta_info);
        } else if (0 == g_strcmp0(signal_name, "sta_left")) {
                char *bssid = NULL;
@@ -346,7 +346,7 @@ static void _mesh_signal_handler(GDBusConnection *connection,
                RETM_IF(NULL == ev.data.sta_info, "Failed to memory allocation !");
                g_variant_get(parameters, "(s)", &bssid);
                memcpy(ev.data.sta_info->bssid, bssid, MAX_BSSID_LEN);
-               h->event_handler(MESH_STATION_LEFT_EVENT, &ev);
+               h->event_handler(MESH_EVENT_STATION_LEFT, &ev);
                free(ev.data.sta_info);
        }
 }
index f6256fc..d7be69c 100644 (file)
@@ -62,11 +62,11 @@ static const char* _mesh_event_to_string(mesh_event_e e)
 {
        switch (e) {
        /* CHECK: List all enum values here */
-       CASE_TO_STR(MESH_MESH_ENABLED_EVENT)
-       CASE_TO_STR(MESH_SCAN_DONE_EVENT)
-       CASE_TO_STR(MESH_CONNECTION_STATE_EVENT)
-       CASE_TO_STR(MESH_STATION_JOIN_EVENT)
-       CASE_TO_STR(MESH_STATION_LEFT_EVENT)
+       CASE_TO_STR(MESH_EVENT_ENABLED)
+       CASE_TO_STR(MESH_EVENT_SCAN_DONE)
+       CASE_TO_STR(MESH_EVENT_CONNECTION_STATE)
+       CASE_TO_STR(MESH_EVENT_STATION_JOIN)
+       CASE_TO_STR(MESH_EVENT_STATION_LEFT)
        default :
                return "MESH_EVENT_UNKNOWN";
        }
@@ -91,13 +91,13 @@ void event_cb(mesh_event_e event_type, mesh_event_data_s* event)
        msgp("Event received [%s]", _mesh_event_to_string(event_type));
 
        switch (event_type) {
-       case MESH_MESH_ENABLED_EVENT: {
+       case MESH_EVENT_ENABLED: {
                msgp("  Mesh Network Enabled Result = %d", event->data.mesh_enable->result);
        } break;
-       case MESH_SCAN_DONE_EVENT: {
+       case MESH_EVENT_SCAN_DONE: {
                msgp("  Mesh Scan Done");
        } break;
-       case MESH_CONNECTION_STATE_EVENT:{
+       case MESH_EVENT_CONNECTION_STATE:{
                msgp("  Connection state changed [%s]",
                        _mesh_connection_event_to_string(event->data.connection_state->state));
                msgp("  From Mesh ID[%-10s] BSSID[%s] Channel[%d] Security[%4s]",
@@ -106,10 +106,10 @@ void event_cb(mesh_event_e event_type, mesh_event_data_s* event)
                        event->data.connection_state->channel,
                        (MESH_SECURITY_SAE == event->data.connection_state->security) ? "SAE" : "NONE");
        } break;
-       case MESH_STATION_JOIN_EVENT: {
+       case MESH_EVENT_STATION_JOIN: {
                msgp("  New Station Joined = %s", event->data.sta_info->bssid);
        } break;
-       case MESH_STATION_LEFT_EVENT: {
+       case MESH_EVENT_STATION_LEFT: {
                msgp("  A Station Left = %s", event->data.sta_info->bssid);
        } break;
        default: