Merge "Fix build failure" into tizen
[platform/core/api/connection.git] / include / net_connection.h
index 9f90859..fd5c96d 100755 (executable)
  */
 
 
-#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
@@ -129,8 +129,16 @@ typedef enum {
  * @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;
 
 
@@ -155,12 +163,12 @@ typedef enum {
        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,
 
@@ -170,12 +178,12 @@ typedef enum {
        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
+        * Operation failed
         */
        CONNECTION_ERROR_OPERATION_FAILED = TIZEN_ERROR_CONNECTION|0x0401,
 
@@ -220,14 +228,24 @@ typedef enum {
        CONNECTION_ERROR_NO_REPLY = TIZEN_ERROR_CONNECTION|0x0408,
 
        /**
-        *     Permission denied
+        * Permission denied
         */
        CONNECTION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,
 
        /**
-        *         Not supported
+        * Not supported
+        */
+       CONNECTION_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,
+
+       /**
+        * Already initialized (Since 5.0)
         */
-       CONNECTION_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED
+       CONNECTION_ERROR_ALREADY_INITIALIZED = TIZEN_ERROR_CONNECTION|0x0409,
+
+       /**
+        * Not initialized (Sinece 5.0)
+        */
+       CONNECTION_ERROR_NOT_INITIALIZED = TIZEN_ERROR_CONNECTION|0x040A,
 
 } connection_error_e;
 
@@ -267,16 +285,21 @@ typedef enum {
 
 /**
  * @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);
@@ -289,6 +312,7 @@ 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()
  */
@@ -299,7 +323,7 @@ int connection_destroy(connection_h connection);
  * @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()
  */
@@ -309,9 +333,12 @@ typedef void(*connection_type_changed_cb)(connection_type_e type, void* user_dat
 /**
  * @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()
@@ -331,13 +358,15 @@ typedef void(*connection_address_changed_cb)(const char* ipv4_address,
 */
 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
+ * @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()
  */
@@ -351,6 +380,7 @@ 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
  */
@@ -363,10 +393,11 @@ int connection_get_type(connection_h connection, connection_type_e* type);
  * @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
@@ -381,10 +412,11 @@ int connection_get_ip_address(connection_h connection,
  * @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
@@ -403,6 +435,7 @@ int connection_get_proxy(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
  * @retval #CONNECTION_ERROR_INVALID_OPERATION     Invalid operation
  * @retval #CONNECTION_ERROR_OPERATION_FAILED      Operation failed
@@ -414,6 +447,25 @@ int connection_get_mac_address(connection_h connection,
 
 
 /**
+ * @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
@@ -422,6 +474,7 @@ int connection_get_mac_address(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
  * @retval #CONNECTION_ERROR_OPERATION_FAILED      Operation failed
  * @retval #CONNECTION_ERROR_NOT_SUPPORTED         Not supported
@@ -440,10 +493,11 @@ int connection_get_cellular_state(connection_h connection, connection_cellular_s
  * @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);
 
@@ -459,6 +513,7 @@ int connection_get_wifi_state(connection_h connection, connection_wifi_state_e*
  * @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
@@ -478,6 +533,7 @@ int connection_get_ethernet_state(connection_h connection, connection_ethernet_s
  * @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
@@ -500,7 +556,7 @@ typedef void(*connection_ethernet_cable_state_chaged_cb)
 
 /**
  * @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] callback          The callback function to be called
@@ -508,6 +564,7 @@ typedef void(*connection_ethernet_cable_state_chaged_cb)
  * @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
@@ -518,12 +575,13 @@ int connection_set_ethernet_cable_state_chaged_cb(connection_h connection,
 
 /**
  * @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
  * @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
@@ -541,7 +599,7 @@ typedef void(*connection_ethernet_cable_state_changed_cb)(
 
 
 /**
- * @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] callback          The callback function to be called
@@ -549,6 +607,7 @@ typedef void(*connection_ethernet_cable_state_changed_cb)(
  * @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
@@ -558,12 +617,13 @@ int connection_set_ethernet_cable_state_changed_cb(connection_h connection,
 
 
 /**
- * @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
  * @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
@@ -582,6 +642,7 @@ int connection_unset_ethernet_cable_state_changed_cb(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
  * @retval #CONNECTION_ERROR_OPERATION_FAILED      Operation failed
  * @retval #CONNECTION_ERROR_PERMISSION_DENIED     Permission denied
@@ -591,7 +652,7 @@ int connection_get_bt_state(connection_h connection, connection_bt_state_e* stat
 
 
 /**
- * @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
@@ -599,6 +660,7 @@ int connection_get_bt_state(connection_h connection, connection_bt_state_e* stat
  * @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
  */
@@ -607,12 +669,13 @@ int connection_set_type_changed_cb(connection_h connection,
 
 
 /**
- * @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
  */
@@ -620,7 +683,7 @@ int connection_unset_type_changed_cb(connection_h connection);
 
 
 /**
- * @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
@@ -628,6 +691,7 @@ int connection_unset_type_changed_cb(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
  * @retval #CONNECTION_ERROR_OPERATION_FAILED      Operation failed
  */
@@ -636,12 +700,13 @@ int connection_set_ip_address_changed_cb(connection_h connection,
 
 
 /**
- * @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
  */
@@ -649,14 +714,15 @@ int connection_unset_ip_address_changed_cb(connection_h connection);
 
 
 /**
- * @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
  */
@@ -665,12 +731,13 @@ int connection_set_proxy_address_changed_cb(connection_h connection,
 
 
 /**
- * @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
  */
@@ -688,6 +755,7 @@ int connection_unset_proxy_address_changed_cb(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
  * @retval #CONNECTION_ERROR_OPERATION_FAILED      Operation failed
  * @retval #CONNECTION_ERROR_PERMISSION_DENIED     Permission denied
@@ -702,12 +770,13 @@ int connection_add_profile(connection_h connection, 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] 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
@@ -718,19 +787,22 @@ int connection_remove_profile(connection_h connection, connection_profile_h prof
 
 /**
  * @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
@@ -752,6 +824,7 @@ int connection_update_profile(connection_h connection, connection_profile_h prof
  * @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
@@ -769,6 +842,7 @@ int connection_get_profile_iterator(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
  * @retval #CONNECTION_ERROR_ITERATOR_END          End of iteration
  */
@@ -779,10 +853,15 @@ int connection_profile_iterator_next(connection_profile_iterator_h profile_itera
 /**
  * @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);
 
@@ -794,6 +873,7 @@ bool connection_profile_iterator_has_next(connection_profile_iterator_h profile_
  * @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);
@@ -810,6 +890,7 @@ int connection_destroy_profile_iterator(connection_profile_iterator_h profile_it
  * @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
@@ -827,11 +908,12 @@ int connection_get_current_profile(connection_h connection, connection_profile_h
  * @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
@@ -847,20 +929,21 @@ int connection_get_default_cellular_service_profile(connection_h connection,
  * @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);
@@ -872,16 +955,18 @@ int connection_set_default_cellular_service_profile(connection_h connection,
  * @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
@@ -930,8 +1015,8 @@ typedef void(*connection_reset_cb)(connection_error_e result, void* user_data);
  * @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
@@ -939,6 +1024,7 @@ typedef void(*connection_reset_cb)(connection_error_e result, 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
  * @retval #CONNECTION_ERROR_PERMISSION_DENIED     Permission denied
@@ -965,6 +1051,7 @@ int connection_open_profile(connection_h connection, connection_profile_h profil
  * @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
@@ -985,19 +1072,21 @@ int connection_close_profile(connection_h connection, connection_profile_h profi
  * @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,
@@ -1007,7 +1096,8 @@ int connection_reset_profile(connection_h connection, connection_reset_option_e
 /**
  * @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
@@ -1017,6 +1107,7 @@ int connection_reset_profile(connection_h connection, connection_reset_option_e
  * @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
@@ -1030,7 +1121,8 @@ int connection_add_route(connection_h connection, const char* 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
@@ -1040,6 +1132,7 @@ int connection_add_route(connection_h connection, const char* interface_name,
  * @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
@@ -1052,7 +1145,8 @@ int connection_remove_route(connection_h connection, const char* interface_name,
 /**
  * @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
@@ -1063,6 +1157,7 @@ int connection_remove_route(connection_h connection, const char* interface_name,
  * @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
@@ -1076,7 +1171,8 @@ int connection_add_route_ipv6(connection_h connection, const char *interface_nam
 /**
  * @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
@@ -1087,6 +1183,7 @@ int connection_add_route_ipv6(connection_h connection, const char *interface_nam
  * @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
@@ -1112,6 +1209,7 @@ int connection_remove_route_ipv6(connection_h connection, const char *interface_
  * @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
@@ -1139,6 +1237,7 @@ int connection_add_route_entry(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
  * @retval #CONNECTION_ERROR_OPERATION_FAILED      Operation failed
  * @retval #CONNECTION_ERROR_PERMISSION_DENIED     Permission denied
@@ -1148,18 +1247,19 @@ int connection_remove_route_entry(connection_h connection,
                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);
@@ -1181,14 +1281,17 @@ int connection_foreach_ipv6_address(connection_h connection, connection_type_e c
  * @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
  * @retval #CONNECTION_ERROR_NOT_SUPPORTED         Not supported
  */
 int connection_get_statistics(connection_h connection, connection_type_e connection_type,
@@ -1200,13 +1303,14 @@ int connection_get_statistics(connection_h connection, connection_type_e connect
  * @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
@@ -1224,4 +1328,4 @@ int connection_reset_statistics(connection_h connection, connection_type_e conne
 #endif /* __cplusplus */
 
 
-#endif
+#endif /* __TIZEN_NETWORK_NET_CONNECTION_H__ */