X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fconnection.c;h=0cf553217061abc7cc607672c1ef57a24da8bda9;hb=f41b9421acd4a9924081cf4a1ef4e8e6200a6edb;hp=d09cb007bee08bdc5847fdd043be4e90f1e4ac9d;hpb=082e6f5cdfb422169161998e2848003ede9fc9ec;p=platform%2Fcore%2Fapi%2Fconnection.git diff --git a/src/connection.c b/src/connection.c index d09cb00..0cf5532 100755 --- a/src/connection.c +++ b/src/connection.c @@ -375,7 +375,7 @@ static int __connection_set_proxy_changed_callback(connection_h connection, } static int __connection_set_ethernet_cable_state_changed_cb(connection_h connection, - connection_ethernet_cable_state_chaged_cb callback, void *user_data) + connection_ethernet_cable_state_changed_cb callback, void *user_data) { connection_handle_s *local_handle = (connection_handle_s *)connection; @@ -763,6 +763,7 @@ EXPORT_API int connection_get_ethernet_cable_state(connection_h connection, conn EXPORT_API int connection_set_ethernet_cable_state_chaged_cb(connection_h connection, connection_ethernet_cable_state_chaged_cb callback, void *user_data) { + DEPRECATED_LOG(__FUNCTION__, "connection_set_ethernet_cable_state_changed_cb"); CHECK_FEATURE_SUPPORTED(ETHERNET_FEATURE); if (callback == NULL || !(__connection_check_handle_validity(connection))) { @@ -770,12 +771,43 @@ EXPORT_API int connection_set_ethernet_cable_state_chaged_cb(connection_h connec return CONNECTION_ERROR_INVALID_PARAMETER; } + DEPRECATED_LOG("connection_ethernet_cable_state_chaged_cb", + "connection_ethernet_cable_state_changed_cb"); + return __connection_set_ethernet_cable_state_changed_cb(connection, - callback, user_data); + (connection_ethernet_cable_state_changed_cb)callback, user_data); } EXPORT_API int connection_unset_ethernet_cable_state_chaged_cb(connection_h connection) { + DEPRECATED_LOG(__FUNCTION__, "connection_unset_ethernet_cable_state_changed_cb"); + CHECK_FEATURE_SUPPORTED(ETHERNET_FEATURE); + + if (!(__connection_check_handle_validity(connection))) { + CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter"); + return CONNECTION_ERROR_INVALID_PARAMETER; + } + + return __connection_set_ethernet_cable_state_changed_cb(connection, + NULL, NULL); +} + +EXPORT_API int connection_set_ethernet_cable_state_changed_cb(connection_h connection, + connection_ethernet_cable_state_changed_cb callback, void *user_data) +{ + CHECK_FEATURE_SUPPORTED(ETHERNET_FEATURE); + + if (callback == NULL || !(__connection_check_handle_validity(connection))) { + CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter"); + return CONNECTION_ERROR_INVALID_PARAMETER; + } + + return __connection_set_ethernet_cable_state_changed_cb(connection, + callback, user_data); +} + +EXPORT_API int connection_unset_ethernet_cable_state_changed_cb(connection_h connection) +{ CHECK_FEATURE_SUPPORTED(ETHERNET_FEATURE); if (!(__connection_check_handle_validity(connection))) {