*/
-#ifndef __NET_CONNECTION_INTF_H__
-#define __NET_CONNECTION_INTF_H__
+#ifndef __TIZEN_NETWORK_NET_CONNECTION_H__
+#define __TIZEN_NETWORK_NET_CONNECTION_H__
-#include "connection_profile.h"
+#include <connection_profile.h>
#ifdef __cplusplus
CONNECTION_TYPE_CELLULAR = 2, /**< Cellular type */
CONNECTION_TYPE_ETHERNET = 3, /**< Ethernet type */
CONNECTION_TYPE_BT = 4, /**< Bluetooth type */
- CONNECTION_TYPE_NET_PROXY, /**< Proxy type for internet connection (Since 3.0) */
+ CONNECTION_TYPE_NET_PROXY, /**< Proxy type for Internet connection (Since 3.0) */
} connection_type_e;
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
- CONNECTION_RESET_DEFAULT_PROFILE = 0, /**< Initialized with the default profile defined by csc */
- CONNECTION_RESET_CLEAR_PROFILE = 1, /**< Remove all profiles */
+ /**
+ * Initialized with the default profile defined by csc
+ */
+ CONNECTION_RESET_DEFAULT_PROFILE = 0,
+
+ /**
+ * Remove all profiles
+ */
+ CONNECTION_RESET_CLEAR_PROFILE = 1,
+
} connection_reset_option_e;
CONNECTION_ERROR_NONE = TIZEN_ERROR_NONE,
/**
- *Invalid parameter
+ * Invalid parameter
*/
CONNECTION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,
/**
- * Out of memory error
+ * Out of memory error
*/
CONNECTION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,
CONNECTION_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,
/**
- * Address family Not supported
+ * Address family not supported
*/
CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED,
/**
- * Operation failed
+ * Now inprogress
+ */
+ CONNECTION_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS,
+
+ /**
+ * Permission denied
+ */
+ CONNECTION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,
+
+ /**
+ * Not supported
+ */
+ CONNECTION_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,
+
+ /**
+ * Operation failed
*/
CONNECTION_ERROR_OPERATION_FAILED = TIZEN_ERROR_CONNECTION|0x0401,
CONNECTION_ERROR_NO_CONNECTION = TIZEN_ERROR_CONNECTION|0x0403,
/**
- * Now inprogress
- */
- CONNECTION_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS,
-
- /**
* Already exists
*/
CONNECTION_ERROR_ALREADY_EXISTS = TIZEN_ERROR_CONNECTION|0x0404,
CONNECTION_ERROR_NO_REPLY = TIZEN_ERROR_CONNECTION|0x0408,
/**
- * Permission denied
+ * Already initialized (Since 5.0)
*/
- CONNECTION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,
+ CONNECTION_ERROR_ALREADY_INITIALIZED = TIZEN_ERROR_CONNECTION|0x0409,
/**
- * Not supported
+ * Not initialized (Since 5.0)
*/
- CONNECTION_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED
+ CONNECTION_ERROR_NOT_INITIALIZED = TIZEN_ERROR_CONNECTION|0x040A,
} connection_error_e;
/**
* @brief Creates a handle for managing data connections.
+ * @details If you do not use this function and use other functions,
+ * you will get the #CONNECTION_ERROR_NOT_INITIALIZED error.
+ * If you put an invalid handle, you will get the #CONNECTION_ERROR_INVALID_PARAMETER error.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/network.get
- * @remarks You must release @a handle using connection_destroy().
+ * @remarks You must release @a connection using connection_destroy().
* @param[out] connection The connection handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_ALREADY_INITIALIZED Already initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @see connection_destroy()
*/
int connection_create(connection_h* connection);
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @see connection_create()
*/
* @brief Called when the type of a connection is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] type The type of the current network connection
- * @param[in] user_data The user data passed from the callback registration function
+ * @param[in] user_data The user data passed from the callback registration function
* @see connection_set_type_changed_cb()
* @see connection_unset_type_changed_cb()
*/
/**
* @brief Called when the address is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @remarks @a ipv4_address @a ipv6_address should not be freed.
+ * @a ipv4_address @a ipv6_address is available only in the callback.
+ * To use outside the callback, make a copy.
* @param[in] ipv4_address The IP address for IPv4
* @param[in] ipv6_address The IP address for IPv6
- * @param[in] user_data The user data passed from the callback registration function
+ * @param[in] user_data The user data passed from the callback registration function
* @see connection_set_ip_address_changed_cb()
* @see connection_unset_ip_address_changed_cb()
* @see connection_set_proxy_address_changed_cb()
*/
typedef void(*connection_set_default_cb)(connection_error_e result, void* user_data);
-/* @brief Called with an IPv6 address.
+/**
+ * @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()
+ * @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_address() will invoke this callback.
+ * @see connection_foreach_ipv6_address()
*/
typedef bool(*connection_ipv6_address_cb)(char *ipv6_address, void *user_data);
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
*/
* @remarks You must release @a ip_address using free().
* @param[in] connection The connection handle
* @param[in] address_family The address family
- * @param[out] ip_address The pointer to the IP address string
+ * @param[out] ip_address The pointer to the IP address string
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
* @remarks You must release @a proxy using free().
* @param[in] connection The connection handle
* @param[in] address_family The address family
- * @param[out] proxy The proxy address
+ * @param[out] proxy The proxy address
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
/**
+ * @brief Gets if the current connection is metered.
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @param[in] connection The connection handle
+ * @param[out] is_metered The value indicating whether it is metered
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
+ * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ */
+int connection_is_metered_network(connection_h connection, bool* is_metered);
+
+
+/**
* @brief Gets the state of cellular connection.
* @details The returned state is for the cellular connection state.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
*/
int connection_get_wifi_state(connection_h connection, connection_wifi_state_e* state);
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
*/
int connection_get_ethernet_state(connection_h connection, connection_ethernet_state_e* state);
+/**
+ * @brief Called when the Internet state of the current connection is changed.
+ * @since_tizen 5.5
+ * @param[in] state The Internet state of current connection
+ * @param[in] user_data The user data passed to callback registration function
+ */
+typedef void(*connection_internet_state_changed_cb)(
+ connection_internet_state_e state, void* user_data);
+
+/**
+ * @brief Sets the callback that is called when the Internet availability over the current connection is changed.
+ * @since_tizen 5.5
+ * @param[in] connection The connection handle
+ * @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_NOT_INITIALIZED Not initialized
+ * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
+ * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ */
+int connection_set_internet_state_changed_cb(connection_h connection,
+ connection_internet_state_changed_cb callback, void *user_data);
+
+
+/**
+ * @brief Unsets the callback that is called when the Internet state of the current connection is changed.
+ * @since_tizen 5.5
+ * @param[in] connection The connection handle
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
+ * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ */
+int connection_unset_internet_state_changed_cb(connection_h connection);
/**
* @brief Checks for ethernet cable is attached or not.
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
/**
* @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.
+ * @brief Sets 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
+ * @param[in] connection The connection handle
* @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_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
/**
* @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.
+ * @brief Unsets 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
+ * @param[in] connection The connection handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
/**
- * @brief Registers callback for ethernet cable is plugged [in/out] event.
+ * @brief Sets callback for ethernet cable is plugged [in/out] event.
* @since_tizen 4.0
- * @param[in] connection The handle of connection
+ * @param[in] connection The connection handle
* @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_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
/**
- * @brief Unregisters callback for ethernet cable is plugged [in/out] event.
+ * @brief Unsets callback for ethernet cable is plugged [in/out] event.
* @since_tizen 4.0
- * @param[in] connection The handle of connection
+ * @param[in] connection The connection handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
/**
- * @brief Registers the callback that is called when the type of the current connection is changed.
+ * @brief Sets the callback that is called when the type of the current connection is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] connection The connection handle
* @param[in] callback The callback function to be called
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
*/
/**
- * @brief Unregisters the callback that is called when the type of current connection is changed.
+ * @brief Unsets the callback that is called when the type of current connection is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] connection The connection handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
*/
/**
- * @brief Registers the callback that is called when the IP address is changed.
+ * @brief Sets the callback that is called when the IP address is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] connection The connection handle
* @param[in] callback The callback function to be called
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
*/
/**
- * @brief Unregisters the callback that is called when the IP address is changed.
+ * @brief Unsets the callback that is called when the IP address is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] connection The connection handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
*/
/**
- * @brief Registers the callback that is called when the proxy address is changed.
+ * @brief Sets the callback that is called when the proxy address is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] connection The connection handle
- * @param[in] callback The callback function to be called
- * @param[in] user_data The user data passed to the callback function
+ * @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_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
*/
/**
- * @brief Unregisters the callback that is called when the proxy address is changed.
+ * @brief Unsets the callback that is called when the proxy address is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] connection The connection handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
*/
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @privlevel public
* @privilege %http://tizen.org/privilege/network.profile \n
* %http://tizen.org/privilege/network.get
- * @remarks This API needs both privileges.
+ * @remarks This function needs both privileges.
* @param[in] connection The connection handle
* @param[in] profile The profile handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
/**
* @brief Updates an existing profile.
- * @details When a profile is changed, these changes will be not applied to the Connection Manager immediately.
- * When you call this function, your changes affect the Connection Manager and the existing profile is updated.
+ * @details When a profile is changed, these changes will be not applied to the
+ * Connection Manager immediately.
+ * When you call this function, your changes affect the Connection Manager
+ * and the existing profile is updated.
* In addition, the existing profile will be updated if you call connection_open_profile().
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/network.profile \n
* %http://tizen.org/privilege/network.get
- * @remarks This API needs both privileges.
+ * @remarks This function needs both privileges.
* @param[in] connection The connection handle
* @param[in] profile The profile handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_ITERATOR_END End of iteration
*/
/**
* @brief Checks whether the next element of a profile iterator exists or not.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
* @param[in] profile_iterator The iterator of profile
* @return @c true if next element exists,
* otherwise @c false if next element doesn't exist
+ * @exception #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
+ * @exception #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ * @see get_last_result()
*/
bool connection_profile_iterator_has_next(connection_profile_iterator_h profile_iterator);
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
*/
int connection_destroy_profile_iterator(connection_profile_iterator_h profile_iterator);
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @remarks You must release @a profile using connection_profile_destroy().
* @param[in] connection The connection handle
* @param[in] type The type of cellular service \n
- * #CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION is not permitted
+ * #CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION is not permitted
* @param[out] profile The profile handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/network.profile \n
- * %http://tizen.org/privilege/network.get
- * @remarks This API needs both privileges.
+ * %http://tizen.org/privilege/network.get
+ * @remarks This function needs both privileges.
* @param[in] connection The connection handle
* @param[in] type The type of cellular service \n
- * only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and \n
- * #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted
+ * Only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and
+ * #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted
* @param[in] profile The profile handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
*/
int connection_set_default_cellular_service_profile(connection_h connection,
connection_cellular_service_type_e type, connection_profile_h profile);
* @privlevel public
* @privilege %http://tizen.org/privilege/network.profile \n
* %http://tizen.org/privilege/network.get
- * @remarks This API needs both privileges.
+ * @remarks This function needs both privileges.
* @param[in] connection The connection handle
- * @param[in] type The type of cellular service (only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET \n
- * and #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted)
+ * @param[in] type The type of cellular service \n
+ * Only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and
+ * #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted
* @param[in] profile The profile handle
* @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_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/network.set \n
- * %http://tizen.org/privilege/network.get
- * @remarks This API needs both privileges.
+ * %http://tizen.org/privilege/network.get
+ * @remarks This function needs both privileges.
* @param[in] connection The connection handle
* @param[in] profile The profile handle
* @param[in] callback The callback function to be called
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @privlevel public
* @privilege %http://tizen.org/privilege/network.profile \n
* %http://tizen.org/privilege/network.get
- * @remarks This API needs both privileges.
+ * @remarks This function needs both privileges.
* @param[in] connection The connection handle
* @param[in] type The type of reset
- * @param[in] id The subscriber identity module ID to reset (The sim index starts from 0.)
+ * @param[in] id The subscriber identity module ID to reset
+ * (The sim index starts from 0.)
* @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_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
* @post connection_reset_cb() will be invoked.
*/
int connection_reset_profile(connection_h connection, connection_reset_option_e type,
/**
* @deprecated Deprecated since 4.0. Use connection_add_route_entry() instead.
* @brief Adds a IPv4 route to the routing table.
- * @details You can get the @a interface_name from connection_profile_get_network_interface_name() of opened profile.
+ * @details You can get the @a interface_name from
+ * connection_profile_get_network_interface_name() of opened profile.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/network.set
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @see connection_profile_get_network_interface_name()
/**
* @deprecated Deprecated since 4.0. Use connection_remove_route_entry() instead.
* @brief Removes a IPv4 route from the routing table.
- * @details You can get the @a interface_name from connection_profile_get_network_interface_name() of opened profile.
+ * @details You can get the @a interface_name from
+ * connection_profile_get_network_interface_name() of opened profile.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/network.set
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
/**
* @deprecated Deprecated since 4.0. Use connection_add_route_entry() instead.
* @brief Adds a IPv6 route to the routing table.
- * @details You can get the @a interface_name from connection_profile_get_network_interface_name() of opened profile.
+ * @details You can get the @a interface_name from
+ * connection_profile_get_network_interface_name() of opened profile.
* @since_tizen 2.3.1
* @privlevel public
* @privilege %http://tizen.org/privilege/network.set
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
/**
* @deprecated Deprecated since 4.0. Use connection_remove_route_entry() instead.
* @brief Removes a IPV6 route from the routing table.
- * @details You can get the @a interface_name from connection_profile_get_network_interface_name() of opened profile.
+ * @details You can get the @a interface_name from
+ * connection_profile_get_network_interface_name() of opened profile.
* @since_tizen 2.3.1
* @privlevel public
* @privilege %http://tizen.org/privilege/network.set
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
connection_address_family_e address_family, 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
+ * @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
+ * @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
+ * @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);
* @privlevel public
* @privilege %http://tizen.org/privilege/network.get
* @param[in] connection The connection handle
- * @param[in] connection_type The type of connection (only CONNECTION_TYPE_WIFI and CONNECTION_TYPE_CELLULAR are supported)
+ * @param[in] connection_type The type of connection \n
+ * Only #CONNECTION_TYPE_WIFI and #CONNECTION_TYPE_CELLULAR are supported
* @param[in] statistics_type The type of statistics
* @param[out] size The received data size of the last cellular packet data connection (bytes)
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/network.set
- * @remarks This API needs both privileges.
* @param[in] connection The connection handle
- * @param[in] connection_type The type of connection (only CONNECTION_TYPE_WIFI and CONNECTION_TYPE_CELLULAR are supported)
+ * @param[in] connection_type The type of connection \n
+ * Only #CONNECTION_TYPE_WIFI and #CONNECTION_TYPE_CELLULAR are supported
* @param[in] statistics_type The type of statistics
* @return @c 0 on success,
* otherwise a negative error value
* @retval #CONNECTION_ERROR_NONE Successful
+ * @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized
* @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
* @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
#endif /* __cplusplus */
-#endif
+#endif /* __TIZEN_NETWORK_NET_CONNECTION_H__ */