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;
/**
* @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;
/**
} 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
} 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
*
* @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.
* @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
/**
* @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);
* @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
* @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.
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;
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;
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;
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);
}
}
{
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";
}
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]",
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: