From: saerome.kim Date: Mon, 26 Jun 2017 09:51:15 +0000 (+0900) Subject: Fix API documentations errors X-Git-Tag: submit/tizen/20170828.225740~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f826b6d1bb4a9dd91c3d792d5daae36cb6159c52;p=platform%2Fcore%2Fapi%2Fwifi-mesh.git Fix API documentations errors Signed-off-by: saerome.kim --- diff --git a/include/mesh.h b/include/mesh.h index a827ac2..5a98307 100644 --- a/include/mesh.h +++ b/include/mesh.h @@ -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 | 0x09 /**< Already Iinitialized */ } mesh_error_e; /** @@ -120,11 +121,11 @@ 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_JOINED = 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; /** @@ -138,7 +139,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_JOINED or MESH_EVENT_STATION_LEFT callback data. * @details Result of join or left event of other station. * * @since_tizen 4.0 @@ -148,7 +149,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 @@ -421,7 +422,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. @@ -583,7 +584,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 @@ -596,13 +597,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); @@ -617,7 +618,7 @@ int mesh_deinitialize(mesh_h handle); * @see #MESH_EVENT_ENABLED * @see #MESH_EVENT_SCAN_DONE * @see #MESH_EVENT_STATION_JOINED - * @see #MESH_EVENT_STATION_DISJOINED + * @see #MESH_EVENT_STATION_LEFT * * @param[out] event_type The event identification * @param[out] event parameter data pointer @@ -900,7 +901,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 Joined mesh network connection handle. * * * @return 0 on success, otherwise a negative error value. diff --git a/src/mesh_dbus.c b/src/mesh_dbus.c index 0bd95b1..09b02fd 100644 --- a/src/mesh_dbus.c +++ b/src/mesh_dbus.c @@ -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_JOINED, &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); } } diff --git a/test/main.c b/test/main.c index f6256fc..a28ffa5 100644 --- a/test/main.c +++ b/test/main.c @@ -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_JOINED) + 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_JOINED: { 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: