From 9ef936a92b45b60ba3d9573269c411e34b9f25bf Mon Sep 17 00:00:00 2001 From: Kim Kibum Date: Sun, 29 Apr 2012 16:58:23 +0900 Subject: upload tizen1.0 source --- include/net_connection.h | 527 ++++++++++++++++++++--------------------------- 1 file changed, 220 insertions(+), 307 deletions(-) (limited to 'include/net_connection.h') diff --git a/include/net_connection.h b/include/net_connection.h index 0a9ee73..6159cfa 100755 --- a/include/net_connection.h +++ b/include/net_connection.h @@ -11,427 +11,340 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License. */ #ifndef __NET_CONNECTION_INTF_H__ /* To prevent inclusion of a header file twice */ #define __NET_CONNECTION_INTF_H__ -#include -#include -#include -#include - +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#ifndef DEPRECATED -#define DEPRECATED __attribute__((deprecated)) -#endif - - - -/** - * @addtogroup CAPI_NETWORK_FRAMEWORK - * @{ -*/ /** * @addtogroup CAPI_NETWORK_CONNECTION_MODULE * @{ -*/ - -#include + */ /** -* @enum connection_error_e -* @brief Enumerations of network API errors. -*/ + * @brief Enumerations of connection errors. + */ typedef enum { - CONNECTION_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - CONNECTION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - CONNECTION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory error */ - CONNECTION_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid Operation */ - + CONNECTION_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + CONNECTION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + CONNECTION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory error */ + CONNECTION_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid Operation */ + CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED, /**< Address family not supported */ }connection_error_e; /** -* @enum connection_network_status_e -* @brief Enumerations of network status. -*/ -typedef enum + * @brief Enumerations of network status. + */ +typedef enum { - - /** Not connected / Suspended / Idle / Connecting / Disconnecting */ - CONNECTION_STATUS_UNAVAILABLE, - - /** Active */ - CONNECTION_STATUS_AVAILABLE, - - /** Service unknown */ - CONNECTION_STATUS_UNKNOWN, - -}connection_network_status_e; + CONNECTION_NETWORK_STATE_DISCONNECTED = 0, /**< Disconnected */ + CONNECTION_NETWORK_STATE_WIFI = 1, /**< Wi-Fi is used for default connection */ + CONNECTION_NETWORK_STATE_CELLULAR = 2, /**< Cellular is used for default connection */ +}connection_network_state_e; /** -* @enum connection_network_type_e -* @brief Enumerations of network connection type. -*/ -typedef enum{ - /** Default type \n - The automatic connection is established. \n - WiFi connection has higher priority than 3G connection. \n - If Wifi connection is established by user selection or auto joining,\n - 3G connection will be automatically moved to WiFi connection in NET_DEFAULT_TYPE case. */ - CONNECTION_DEFAULT_TYPE = 0x00, - - /** Mobile Type \n - Network connection is established in 3G network \n - */ - CONNECTION_MOBILE_TYPE = 0x01, - - /** WiFi Type \n - Network connection is established in WiFi network \n - */ - CONNECTION_WIFI_TYPE = 0x02, - -}connection_network_type_e; - - + * @brief Enumerations of Address type + */ +typedef enum +{ + CONNECTION_ADDRESS_FAMILY_IPV4 = 0, /**< IPV4 Address type */ + CONNECTION_ADDRESS_FAMILY_IPV6 = 1, /**< IPV6 Address type */ +} connection_address_family_e; /** -* @enum connection_network_param_e -* @brief Enumerations of changed network parameter. -* These are received as param in #connection_cb. -*/ -typedef enum{ - /** Network Status has changed. \n - */ - CONNECTION_NETWORK_STATUS = 0x00, - - /** IP Address has changed. \n - */ - CONNECTION_IP_ADDRESS = 0x01, - - /** Proxy Address has changed. \n - */ - CONNECTION_PROXY_ADDRESS = 0x02, - -}connection_network_param_e; + * @brief Enumerations of cellular network state. + */ +typedef enum +{ + CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE = 0, /**< Out of service */ + CONNECTION_CELLULAR_STATE_FLIGHT_MODE = 1, /**< Flight mode */ + CONNECTION_CELLULAR_STATE_ROAMING_OFF = 2, /**< Roaming is turned off */ + CONNECTION_CELLULAR_STATE_CALL_ONLY_AVAILABLE = 3, /**< Call is only available. */ + CONNECTION_CELLULAR_STATE_AVAILABLE = 4, /**< Available */ +}connection_cellular_state_e; +/** + * @brief This enumeration defines the Wi-Fi state. + */ +typedef enum +{ + CONNECTION_WIFI_STATE_DEACTIVATED = 0, /**< Deactivated state */ + CONNECTION_WIFI_STATE_DISCONNECTED = 1, /**< disconnected state */ + CONNECTION_WIFI_STATE_CONNECTED = 2, /**< Connected state */ +} connection_wifi_state_e; /** * @brief The connection handle for all connection functions. */ typedef struct connection_handle_s * connection_h; - - /** - * @brief Called when a connection event occurs. - * @param[in] param The enum of the parameter that changed. #connection_network_param_e + * @brief Called when the state of network is changed. + * @param[in] connection_network_state_e The state of current network connection * @param[in] user_data The user data passed from the callback registration function - * @pre Register this function using connection_set_cb(). - * @see connection_set_cb() - * @see connection_unset_cb() - * -*/ -typedef void (*connection_cb) (const connection_network_param_e param, void *user_data); + * @see connection_set_network_status_changed_cb() + * @see connection_unset_network_status_changed_cb() + */ +typedef void(*connection_network_state_changed_cb)(connection_network_state_e state, void* user_data); +/** + * @brief Called when the address is changed. + * @param[in] ipv4_address The ipv4 address of current network connection + * @param[in] ipv6_address The ipv6 address of current network connection + * @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() + * @see connection_unset_proxy_address_changed_cb() + */ +typedef void(*connection_address_changed_cb)(const char* ipv4_address, const char* ipv6_address, void* user_data); /** * @brief Creates a handle for managing data connections. - * - * @remarks @a handle must be released with connection_destroy(). \n - * - * @param[out] handle The handle to the connection + * @remarks @a handle must be released with connection_destroy(). + * @param[out] connection The handle to the connection * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory error + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory * @see connection_destroy() - * - * -******************************************************************************************/ -int connection_create(connection_h * handle); + */ +int connection_create(connection_h* connection); -/*****************************************************************************************/ /** - * @brief Destroys the connection handle. - * - * @param[in] handle The handle to the connection - * + * @brief Destroys the connection handle. + * @param[in] connection The handle to the connection * @return 0 on success, otherwise negative error value. * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter * @see connection_create() - * - * -******************************************************************************************/ -int connection_destroy(connection_h handle); + */ +int connection_destroy(connection_h connection); -/*****************************************************************************************/ /** - * @brief Registers a callback function to be invoked when connection event occurs. - * @param[in] handle The handle to the connection - * @param[in] callback The callback function to register - * @param[in] user_data The user data to be passed to the callback function + * @brief Gets the network state. + * @details The returned status is for the current connection. + * @param[in] connection The handle to the connection + * @param[out] state The state of network * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * @post connection_cb() will be invoked. - * @see connection_create() - * @see connection_cb() - * @see connection_unset_cb() - * -******************************************************************************************/ -int connection_set_cb(connection_h handle, connection_cb callback, void *user_data); + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the state due to internal error + */ +int connection_get_network_state(connection_h connection, connection_network_state_e* state); -/*****************************************************************************************/ /** - * @brief Unregisters the callback function. - * @param[in] handle The handle to the connection + * @brief Gets the IP address of the current connection. + * @remarks @a ip_address must be released with free() by you. + * @param[in] connection The handle to the connection + * @param[in] address_family The address family + * @param[out] ip_address The pointer to IP address string. * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * @see connection_cb() - * @see connection_set_cb() -******************************************************************************************/ -int connection_unset_cb(connection_h handle); - -/*****************************************************************************************/ + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the ip address due to internal error + */ +int connection_get_ip_address(connection_h connection, connection_address_family_e address_family, char** ip_address); + /** - * @brief Gets the IP address of an existing connection. - * - * @remarks @a ip_address must be released with free() by you. - * @param[in] handle The handle to the connection - * @param[out] ip_address The pointer to IP address string. + * @brief Gets the proxy address of the current connection. + * @remarks @a proxy must be released with free() by you. + * @param[in] connection The handle to the connection + * @param[in] address_family The address family + * @param[out] proxy The proxy address * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * -******************************************************************************************/ -int connection_get_ip_address(connection_h handle, char **ip_address); - + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the proxy due to internal error + */ +int connection_get_proxy(connection_h connection, connection_address_family_e address_family, char** proxy); -/*****************************************************************************************/ /** - * @brief Gets the proxy address of the current connection. - * - * @remarks @a proxy must be released with free() by you. - * - * @param[in] handle The handle to the connection - * @param[out] proxy The proxy address + * @brief Gets the state of celluar connection. + * @details The returned state is for the cellular connection state. + * @param[in] connection The handle of connection + * @param[out] state The state of cellular connection * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * -******************************************************************************************/ -int connection_get_proxy(connection_h handle, char **proxy); + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the state due to internal error + */ +int connection_get_cellular_state(connection_h connection, connection_cellular_state_e* state); -/*****************************************************************************************/ /** - * @brief Gets the network status. - * - * @details The returned status is for the overall connection of the phone, not per application. - * - * @param[in] network_type The network type - * @param[out] network_status The status of network + * @brief Gets the state of Wi-Fi. + * @details The returned state is for the Wi-Fi connection state. + * @param[in] connection The handle of connection + * @param[out] state The state of Wi-Fi connection * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the status due to internal error - * - * -******************************************************************************************/ -int connection_get_network_status(connection_network_type_e network_type, connection_network_status_e* network_status); + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the state due to internal error + */ +int connection_get_wifi_state(connection_h connection, connection_wifi_state_e* state); +/** + * @brief Registers the callback called when the state of current connection is changed. + * @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 0 on success, otherwise negative error value. + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + */ +int connection_set_network_state_changed_cb(connection_h connection, connection_network_state_changed_cb callback, void* user_data); -/*****************************************************************************************/ /** - * @brief Gets the duration of the last cellular packet data connection. - * - * @param[in] handle The handle to the connection - * @param[out] last_datacall_duration The time duration of the last cellular packet data connection ( seconds ) + * @brief Unregisters the callback called when the state of current connection is changed. + * @param[in] connection The handle of connection * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_NONE Successful * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - ******************************************************************************************/ -int connection_get_last_datacall_duration(connection_h handle, int *last_datacall_duration); + */ +int connection_unset_network_state_changed_cb(connection_h connection); -/*****************************************************************************************/ /** - * @brief Gets the received data size of the last cellular packet data connection. - * - * @param[in] handle The handle to the connection - * @param[out] last_recv_data_size The received data size of the last cellular packet data connection ( bytes ) + * @brief Registers the callback called when the ip address is changed. + * @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 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_NONE Successful * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - ******************************************************************************************/ -int connection_get_last_received_data_size(connection_h handle, int * last_recv_data_size); + */ +int connection_set_ip_address_changed_cb(connection_h connection, connection_address_changed_cb callback, void* user_data); -/*****************************************************************************************/ /** - * @brief Gets the sent data size of the last cellular packet data connection. - * - * @param[in] handle The handle to the connection - * @param[out] last_sent_data_size the sent data size of the last cellular packet data connection. + * @brief Unregisters the callback called when the ip address is changed. + * @param[in] connection The handle of connection * @return 0 on success, otherwise negative error value. * @retval #CONNECTION_ERROR_NONE Successful * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * - ******************************************************************************************/ -int connection_get_last_sent_data_size(connection_h handle, int * last_sent_data_size); + */ +int connection_unset_ip_address_changed_cb(connection_h connection); -/*****************************************************************************************/ /** - * @brief Gets the total time duration of all cellular packet data connections. - * - * @param[in] handle The handle to the connection - * @param[out] total_datacall_duration The total time duration of all cellular packet data connections ( seconds ) + * @brief Registers the callback called when the proxy address is changed. + * @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 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * - ******************************************************************************************/ -int connection_get_total_datacall_duration(connection_h handle, int * total_datacall_duration); + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + */ +int connection_set_proxy_address_changed_cb(connection_h connection, connection_address_changed_cb callback, void* user_data); -/*****************************************************************************************/ /** - * @brief Gets the total received data size of all cellular packet data connections. - * - * @param[in] handle The handle to the connection - * @param[out] total_recv_data_size The total received data size of all cellular packet data connections (bytes) + * @brief Unregisters the callback called when the proxy address is changed. + * @param[in] connection The handle of connection * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_NONE Successful * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * - ******************************************************************************************/ -int connection_get_total_received_data_size (connection_h handle, int * total_recv_data_size); + */ +int connection_unset_proxy_address_changed_cb(connection_h connection); -/*****************************************************************************************/ /** - * @brief Gets the total sent data size of all cellular packet data connections. - * - * @param[in] handle The handle to the connection - * @param[out] total_sent_data_size The total sent data size of all cellular packet data connections (bytes) + * @brief Gets the received data size of the last cellular packet data connection. + * @param[in] connection The handle to the connection + * @param[out] size The received data size of the last cellular packet data connection ( bytes ) * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * - ******************************************************************************************/ -int connection_get_total_sent_data_size (connection_h handle, int * total_sent_data_size); + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the size due to internal error + */ +int connection_get_last_received_data_size(connection_h connection, int* size); -/*****************************************************************************************/ /** - * @brief Indicates connection status. - * - * @return Return @c true if connection is connected, otherwise @c false - * - * -******************************************************************************************/ -bool connection_is_connected(void); + * @brief Gets the sent data size of the last cellular packet data connection. + * @param[in] connection The handle to the connection + * @param[out] size The sent data size of the last cellular packet data connection. + * @return 0 on success, otherwise negative error value. + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the size due to internal error + */ +int connection_get_last_sent_data_size(connection_h connection, int* size); -/*****************************************************************************************/ /** - * @brief Gets the duration of the last WiFi packet data connection. - * - * @param[in] handle The handle to the connection - * @param[out] wifi_last_datacall_duration The time duration of the last WiFi packet data connection ( seconds ) + * @brief Gets the total received data size of all cellular packet data connections. + * @param[in] connection The handle to the connection + * @param[out] size The total received data size of all cellular packet data connections (bytes) * @return 0 on success, otherwise negative error value. * @retval #CONNECTION_ERROR_NONE Successful * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - ******************************************************************************************/ -int connection_get_wifi_last_datacall_duration(connection_h handle, int *wifi_last_datacall_duration); + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the size due to internal error + */ +int connection_get_total_received_data_size (connection_h connection, int* size); -/*****************************************************************************************/ /** - * @brief Gets the received data size of the last WiFi packet data connection. - * - * @param[in] handle The handle to the connection - * @param[out] wifi_last_recv_data_size The received data size of the last WiFi packet data connection ( bytes ) + * @brief Gets the total sent data size of all cellular packet data connections. + * @param[in] connection The handle to the connection + * @param[out] size The total sent data size of all cellular packet data connections (bytes) * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_NONE Successful * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - ******************************************************************************************/ -int connection_get_wifi_last_received_data_size(connection_h handle, int * wifi_last_recv_data_size); + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the size due to internal error + */ +int connection_get_total_sent_data_size (connection_h connection, int* size); -/*****************************************************************************************/ /** - * @brief Gets the sent data size of the last WiFi packet data connection. - * - * @param[in] handle The handle to the connection - * @param[out] wifi_last_sent_data_size the sent data size of the last WiFi packet data connection. + * @brief Gets the received data size of the last Wi-Fi packet data connection. + * @param[in] connection The handle to the connection + * @param[out] size The received data size of the last Wi-Fi packet data connection ( bytes ) * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_NONE Successful * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * - ******************************************************************************************/ -int connection_get_wifi_last_sent_data_size(connection_h handle, int * wifi_last_sent_data_size); + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the size due to internal error + */ +int connection_get_wifi_last_received_data_size(connection_h connection, int* size); -/*****************************************************************************************/ /** - * @brief Gets the total time duration of all WiFi packet data connections. - * - * @param[in] handle The handle to the connection - * @param[out] wifi_total_datacall_duration The total time duration of all WiFi packet data connections ( seconds ) + * @brief Gets the sent data size of the last Wi-Fi packet data connection. + * @param[in] connection The handle to the connection + * @param[out] size The sent data size of the last Wi-Fi packet data connection. * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * - ******************************************************************************************/ -int connection_get_wifi_total_datacall_duration(connection_h handle, int * wifi_total_datacall_duration); + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the size due to internal error + */ +int connection_get_wifi_last_sent_data_size(connection_h connection, int* size); -/*****************************************************************************************/ /** - * @brief Gets the total received data size of all WiFi packet data connections. - * - * @param[in] handle The handle to the connection - * @param[out] wifi_total_recv_data_size The total received data size of all WiFi packet data connections (bytes) + * @brief Gets the total received data size of all Wi-Fi packet data connections. + * @param[in] connection The handle to the connection + * @param[out] size The total received data size of all Wi-Fi packet data connections (bytes) * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_NONE Successful * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * - ******************************************************************************************/ -int connection_get_wifi_total_received_data_size (connection_h handle, int * wifi_total_recv_data_size); + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the size due to internal error + */ +int connection_get_wifi_total_received_data_size (connection_h connection, int* size); -/*****************************************************************************************/ /** - * @brief Gets the total sent data size of all WiFi packet data connections. - * - * @param[in] handle The handle to the connection - * @param[out] wifi_total_sent_data_size The total sent data size of all WiFi packet data connections (bytes) + * @brief Gets the total sent data size of all Wi-Fi packet data connections. + * @param[in] connection The handle to the connection + * @param[out] size The total sent data size of all Wi-Fi packet data connections (bytes) * @return 0 on success, otherwise negative error value. - * @retval #CONNECTION_ERROR_NONE Successful - * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - * - * - ******************************************************************************************/ -int connection_get_wifi_total_sent_data_size (connection_h handle, int *wifi_total_sent_data_size); + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_INVALID_OPERATION Cannot retrieve the size due to internal error + */ +int connection_get_wifi_total_sent_data_size (connection_h connection, int* size); + /** * @} -*/ -/** - * @} */ -- cgit v1.2.3