CONNECTION_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED /**< Not Supported */
} connection_error_e;
-
/**
* @}
*/
*/
typedef void(*connection_set_default_cb)(connection_error_e result, void* user_data);
+/* @brief Called with an IPv6 address.
+ * @since_tizen 4.0
+ * @remarks If @a ipv6_address is needed outside the callback, a copy should be made. \n
+ * @a ipv6_address will be freed automatically after the execution of this callback.
+ * @param[in] ipv6_address The IPv6 address
+ * @param[in] user_data The user data passed from the foreach function
+ * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
+ * @pre connection_foreach_ipv6_addresses() will invoke this callback.
+ * @see connection_foreach_ipv6_addresses()
+ */
+typedef bool(*connection_ipv6_address_cb)(char *ipv6_address, void *user_data);
/**
* @brief Gets the type of the current profile for data connection.
/**
+ * @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)
/**
+ * @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
* @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
* @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);
/**
* @privilege %http://tizen.org/privilege/network.get
* @remarks You must release @a profile_iterator using connection_destroy().
* @param[in] connection The connection handle
- * @param[in] type The type of the connetion iterator
+ * @param[in] type The type of the connection iterator
* @param[out] profile_iterator The iterator of profile
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
- * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denieda
+ * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
* @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
*/
int connection_get_default_cellular_service_profile(connection_h connection, connection_cellular_service_type_e type, connection_profile_h* profile);
*/
int connection_remove_route_ipv6(connection_h connection, const char *interface_name, const char *host_address, const char * gateway);
+/*
+ * @brief Gets all IPv6 addresses assigned to the network interface.
+ * @since_tizen 4.0
+ * @param[in] connection The connection handle
+ * @param[in] connection_type The connection type
+ * @param[in] callback The callback to be called for each IPv6 address
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise 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_foreach_ipv6_address(connection_h connection, connection_type_e connection_type,
+ connection_ipv6_address_cb callback, void *user_data);
/**
* @}
*/
int connection_reset_statistics(connection_h connection, connection_type_e connection_type, connection_statistics_type_e statistics_type);
-
/**
* @}
*/