Add new APIs for ethernet cable and deprecate wrong APIs
[platform/core/api/connection.git] / include / net_connection.h
index 59198ac..930cfd3 100755 (executable)
@@ -419,6 +419,7 @@ int connection_get_ethernet_cable_state(connection_h connection, connection_ethe
 
 
 /**
+ * @deprecated Deprecated since 4.0. Use connection_ethernet_cable_state_changed_cb instead.
  * @brief Called when ethernet cable is plugged [in/out].
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  * @param[in] state The ethernet cable state (connection_ethernet_cable_state_e)
@@ -428,6 +429,7 @@ typedef void(*connection_ethernet_cable_state_chaged_cb)(connection_ethernet_cab
 
 
 /**
+ * @deprecated Deprecated since 4.0. Use connection_set_ethernet_cable_state_changed_cb() instead.
  * @brief Registers callback for ethernet cable is plugged [in/out] event.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  * @param[in] connection  The handle of connection
@@ -440,10 +442,11 @@ typedef void(*connection_ethernet_cable_state_chaged_cb)(connection_ethernet_cab
  * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
  * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
  */
-int connection_set_ethernet_cable_state_chaged_cb(connection_h connection, connection_ethernet_cable_state_chaged_cb callback, void *user_data);
+int connection_set_ethernet_cable_state_chaged_cb(connection_h connection, connection_ethernet_cable_state_chaged_cb callback, void *user_data) TIZEN_DEPRECATED_API;
 
 
 /**
+ * @deprecated Deprecated since 4.0. Use connection_unset_ethernet_cable_state_changed_cb() instead.
  * @brief Unregisters callback for ethernet cable is plugged [in/out] event.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  * @param[in] connection The handle of connection
@@ -454,7 +457,45 @@ int connection_set_ethernet_cable_state_chaged_cb(connection_h connection, conne
  * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
  * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
  */
-int connection_unset_ethernet_cable_state_chaged_cb(connection_h connection);
+int connection_unset_ethernet_cable_state_chaged_cb(connection_h connection) TIZEN_DEPRECATED_API;
+
+/**
+ * @brief Called when ethernet cable is plugged [in/out].
+ * @since_tizen 4.0
+ * @param[in] state The ethernet cable state (connection_ethernet_cable_state_e)
+ * @param[in] user_data The user data passed to callback registration function
+ */
+typedef void(*connection_ethernet_cable_state_changed_cb)(connection_ethernet_cable_state_e state, void* user_data);
+
+
+/**
+ * @brief Registers callback for ethernet cable is plugged [in/out] event.
+ * @since_tizen 4.0
+ * @param[in] connection  The handle of connection
+ * @param[in] callback  The callback function to be called
+ * @param[in] user_data The user data passed to the callback function
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
+ * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ */
+int connection_set_ethernet_cable_state_changed_cb(connection_h connection, connection_ethernet_cable_state_changed_cb callback, void *user_data);
+
+
+/**
+ * @brief Unregisters callback for ethernet cable is plugged [in/out] event.
+ * @since_tizen 4.0
+ * @param[in] connection The handle of connection
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
+ * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ */
+int connection_unset_ethernet_cable_state_changed_cb(connection_h connection);
 
 
 /**