2 * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __NET_CONNECTION_INTF_H__
19 #define __NET_CONNECTION_INTF_H__
22 #include "connection_profile.h"
27 #endif /* __cplusplus */
31 * @file net_connection.h
36 * @addtogroup CAPI_NETWORK_CONNECTION_MANAGER_MODULE
42 * @brief The connection handle.
43 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
45 typedef void* connection_h;
49 * @brief The profiles iterator handle.
50 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
52 typedef void* connection_profile_iterator_h;
56 * @brief Enumeration for connection type.
57 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
60 CONNECTION_TYPE_DISCONNECTED = 0, /**< Disconnected */
61 CONNECTION_TYPE_WIFI = 1, /**< Wi-Fi type */
62 CONNECTION_TYPE_CELLULAR = 2, /**< Cellular type */
63 CONNECTION_TYPE_ETHERNET = 3, /**< Ethernet type */
64 CONNECTION_TYPE_BT = 4, /**< Bluetooth type */
65 CONNECTION_TYPE_NET_PROXY, /**< Proxy type for internet connection (Since 3.0) */
70 * @brief Enumeration for cellular network state.
71 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
74 CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE = 0, /**< Out of service */
75 CONNECTION_CELLULAR_STATE_FLIGHT_MODE = 1, /**< Flight mode */
76 CONNECTION_CELLULAR_STATE_ROAMING_OFF = 2, /**< Roaming is turned off */
77 CONNECTION_CELLULAR_STATE_CALL_ONLY_AVAILABLE = 3, /**< Call is only available */
78 CONNECTION_CELLULAR_STATE_AVAILABLE = 4, /**< Available but not connected yet */
79 CONNECTION_CELLULAR_STATE_CONNECTED = 5, /**< Connected */
80 } connection_cellular_state_e;
84 * @brief Enumeration for Wi-Fi state.
85 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
88 CONNECTION_WIFI_STATE_DEACTIVATED = 0, /**< Wi-Fi is deactivated */
89 CONNECTION_WIFI_STATE_DISCONNECTED = 1, /**< Disconnected */
90 CONNECTION_WIFI_STATE_CONNECTED = 2, /**< Connected */
91 } connection_wifi_state_e;
95 * @brief Enumeration for ethernet state.
96 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
99 CONNECTION_ETHERNET_STATE_DEACTIVATED = 0, /**< There is no Ethernet profile to open */
100 CONNECTION_ETHERNET_STATE_DISCONNECTED = 1, /**< Disconnected */
101 CONNECTION_ETHERNET_STATE_CONNECTED = 2, /**< Connected */
102 } connection_ethernet_state_e;
106 * @brief Enumeration for Bluetooth state.
107 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
110 CONNECTION_BT_STATE_DEACTIVATED = 0, /**< There is no Bluetooth profile to open */
111 CONNECTION_BT_STATE_DISCONNECTED = 1, /**< Disconnected */
112 CONNECTION_BT_STATE_CONNECTED = 2, /**< Connected */
113 } connection_bt_state_e;
117 * @brief Enumeration for connection iterator type.
118 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
121 CONNECTION_ITERATOR_TYPE_REGISTERED = 0, /**< The iterator of the registered profile */
122 CONNECTION_ITERATOR_TYPE_CONNECTED = 1, /**< The iterator of the connected profile */
123 CONNECTION_ITERATOR_TYPE_DEFAULT = 2, /**< The iterator of the default profile */
124 } connection_iterator_type_e;
128 * @brief Enumeration for reset profile type.
129 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
132 CONNECTION_RESET_DEFAULT_PROFILE = 0, /**< Initialized with the default profile defined by csc */
133 CONNECTION_RESET_CLEAR_PROFILE = 1, /**< Remove all profiles */
134 } connection_reset_option_e;
138 * @brief Enumeration for the attached or detached state of ethernet cable.
139 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
142 CONNECTION_ETHERNET_CABLE_DETACHED = 0, /**< Ethernet cable is detached */
143 CONNECTION_ETHERNET_CABLE_ATTACHED = 1, /**< Ethernet cable is attached */
144 } connection_ethernet_cable_state_e;
148 * @brief Enumeration for connection errors.
149 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
152 CONNECTION_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
153 CONNECTION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
154 CONNECTION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory error */
155 CONNECTION_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid Operation */
156 CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED, /**< Address family not supported */
157 CONNECTION_ERROR_OPERATION_FAILED = TIZEN_ERROR_CONNECTION|0x0401, /**< Operation failed */
158 CONNECTION_ERROR_ITERATOR_END = TIZEN_ERROR_CONNECTION|0x0402, /**< End of iteration */
159 CONNECTION_ERROR_NO_CONNECTION = TIZEN_ERROR_CONNECTION|0x0403, /**< There is no connection */
160 CONNECTION_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /** Now in progress */
161 CONNECTION_ERROR_ALREADY_EXISTS = TIZEN_ERROR_CONNECTION|0x0404, /**< Already exists */
162 CONNECTION_ERROR_OPERATION_ABORTED = TIZEN_ERROR_CONNECTION|0x0405, /**< Operation is aborted */
163 CONNECTION_ERROR_DHCP_FAILED = TIZEN_ERROR_CONNECTION|0x0406, /**< DHCP failed */
164 CONNECTION_ERROR_INVALID_KEY = TIZEN_ERROR_CONNECTION|0x0407, /**< Invalid key */
165 CONNECTION_ERROR_NO_REPLY = TIZEN_ERROR_CONNECTION|0x0408, /**< No reply */
166 CONNECTION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
167 CONNECTION_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED /**< Not Supported */
168 } connection_error_e;
176 * @addtogroup CAPI_NETWORK_CONNECTION_STATISTICS_MODULE
182 * @brief Enumeration for statistics type.
183 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
186 CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA = 0, /**< Last received data */
187 CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA = 1, /**< Last sent data */
188 CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA = 2, /**< Total received data */
189 CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA = 3, /**< Total sent data */
190 } connection_statistics_type_e;
199 * @addtogroup CAPI_NETWORK_CONNECTION_MANAGER_MODULE
205 * @brief Creates a handle for managing data connections.
206 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
208 * @privilege %http://tizen.org/privilege/network.get
209 * @remarks You must release @a handle using connection_destroy().
210 * @param[out] connection The connection handle
211 * @return @c 0 on success,
212 * otherwise a negative error value
213 * @retval #CONNECTION_ERROR_NONE Successful
214 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
215 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
216 * @see connection_destroy()
218 int connection_create(connection_h* connection);
222 * @brief Destroys the connection handle.
223 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
224 * @param[in] connection The connection handle
225 * @return @c 0 on success,
226 * otherwise a negative error value
227 * @retval #CONNECTION_ERROR_NONE Successful
228 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
229 * @see connection_create()
231 int connection_destroy(connection_h connection);
235 * @brief Called when the type of a connection is changed.
236 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
237 * @param[in] type The type of the current network connection
238 * @param[in] user_data The user data passed from the callback registration function
239 * @see connection_set_type_changed_cb()
240 * @see connection_unset_type_changed_cb()
242 typedef void(*connection_type_changed_cb)(connection_type_e type, void* user_data);
246 * @brief Called when the address is changed.
247 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
248 * @param[in] ipv4_address The IP address for IPv4
249 * @param[in] ipv6_address The IP address for IPv6
250 * @param[in] user_data The user data passed from the callback registration function
251 * @see connection_set_ip_address_changed_cb()
252 * @see connection_unset_ip_address_changed_cb()
253 * @see connection_set_proxy_address_changed_cb()
254 * @see connection_unset_proxy_address_changed_cb()
256 typedef void(*connection_address_changed_cb)(const char* ipv4_address, const char* ipv6_address, void* user_data);
260 * @brief Called when connection_set_default_cellular_service_profile_async() finishes.
261 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
262 * @param[in] result The result
263 * @param[in] user_data The user data passed from connection_open_profile()
264 * @pre connection_set_default_cellular_service_profile_async() will invoke this callback function.
265 * @see connection_set_default_cellular_service_profile_async()
267 typedef void(*connection_set_default_cb)(connection_error_e result, void* user_data);
269 /* @brief Called with an IPv6 address.
271 * @remarks If @a ipv6_address is needed outside the callback, a copy should be made. \n
272 * @a ipv6_address will be freed automatically after the execution of this callback.
273 * @param[in] ipv6_address The IPv6 address
274 * @param[in] user_data The user data passed from the foreach function
275 * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
276 * @pre connection_foreach_ipv6_addresses() will invoke this callback.
277 * @see connection_foreach_ipv6_addresses()
279 typedef bool(*connection_ipv6_address_cb)(char *ipv6_address, void *user_data);
282 * @brief Gets the type of the current profile for data connection.
283 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
284 * @param[in] connection The connection handle
285 * @param[out] type The type of the network
286 * @return @c 0 on success,
287 * otherwise a negative error value
288 * @retval #CONNECTION_ERROR_NONE Successful
289 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
290 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
292 int connection_get_type(connection_h connection, connection_type_e* type);
296 * @brief Gets the IP address of the current connection.
297 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
298 * @remarks You must release @a ip_address using free().
299 * @param[in] connection The connection handle
300 * @param[in] address_family The address family
301 * @param[out] ip_address The pointer to the IP address string
302 * @return @c 0 on success,
303 * otherwise a negative error value
304 * @retval #CONNECTION_ERROR_NONE Successful
305 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
306 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
307 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
309 int connection_get_ip_address(connection_h connection, connection_address_family_e address_family, char** ip_address);
313 * @brief Gets the proxy address of the current connection.
314 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
315 * @remarks You must release @a proxy using free().
316 * @param[in] connection The connection handle
317 * @param[in] address_family The address family
318 * @param[out] proxy The proxy address
319 * @return @c 0 on success,
320 * otherwise a negative error value
321 * @retval #CONNECTION_ERROR_NONE Successful
322 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
323 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
324 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
326 int connection_get_proxy(connection_h connection, connection_address_family_e address_family, char** proxy);
330 * @brief Gets the MAC address of the Wi-Fi or ethernet.
331 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
332 * @remarks @a mac_addr must be released with free() by you.
333 * @param[in] connection The handle of the connection
334 * @param[in] type The type of current network connection
335 * @param[out] mac_addr The MAC address
336 * @return @c 0 on success,
337 * otherwise a negative error value
338 * @retval #CONNECTION_ERROR_NONE Successful
339 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
340 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
341 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
342 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
343 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
345 int connection_get_mac_address(connection_h connection, connection_type_e type, char** mac_addr);
349 * @brief Gets the state of cellular connection.
350 * @details The returned state is for the cellular connection state.
351 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
352 * @param[in] connection The connection handle
353 * @param[out] state The state of the cellular connection
354 * @return @c 0 on success,
355 * otherwise a negative error value
356 * @retval #CONNECTION_ERROR_NONE Successful
357 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
358 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
359 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
361 int connection_get_cellular_state(connection_h connection, connection_cellular_state_e* state);
365 * @brief Gets the state of the Wi-Fi.
366 * @details The returned state is for the Wi-Fi connection state.
367 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
369 * @privilege %http://tizen.org/privilege/network.get
370 * @param[in] connection The connection handle
371 * @param[out] state The state of Wi-Fi connection
372 * @return @c 0 on success,
373 * otherwise a negative error value
374 * @retval #CONNECTION_ERROR_NONE Successful
375 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
376 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
377 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
378 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
380 int connection_get_wifi_state(connection_h connection, connection_wifi_state_e* state);
384 * @brief Gets the state of the Ethernet.
385 * @details The returned state is for the Ethernet connection state.
386 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
388 * @privilege %http://tizen.org/privilege/network.get
389 * @param[in] connection The connection handle
390 * @param[out] state The state of Ethernet connection
391 * @return @c 0 on success,
392 * otherwise a negative error value
393 * @retval #CONNECTION_ERROR_NONE Successful
394 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
395 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
396 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
397 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
399 int connection_get_ethernet_state(connection_h connection, connection_ethernet_state_e* state);
403 * @brief Checks for ethernet cable is attached or not.
404 * @details The returned state is for the ethernet cable state.
405 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
407 * @privilege %http://tizen.org/privilege/network.get
408 * @param[in] connection The handle of the connection
409 * @param[in] state - Enum connection_ethernet_cable_state_e
410 * @return @c 0 on success,
411 * otherwise a negative error value
412 * @retval #CONNECTION_ERROR_NONE Successful
413 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
414 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
415 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
416 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
418 int connection_get_ethernet_cable_state(connection_h connection, connection_ethernet_cable_state_e *state);
422 * @deprecated Deprecated since 4.0. Use connection_ethernet_cable_state_changed_cb instead.
423 * @brief Called when ethernet cable is plugged [in/out].
424 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
425 * @param[in] state The ethernet cable state (connection_ethernet_cable_state_e)
426 * @param[in] user_data The user data passed to callback registration function
428 typedef void(*connection_ethernet_cable_state_chaged_cb)(connection_ethernet_cable_state_e state, void* user_data);
432 * @deprecated Deprecated since 4.0. Use connection_set_ethernet_cable_state_changed_cb() instead.
433 * @brief Registers callback for ethernet cable is plugged [in/out] event.
434 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
435 * @param[in] connection The handle of connection
436 * @param[in] callback The callback function to be called
437 * @param[in] user_data The user data passed to the callback function
438 * @return @c 0 on success,
439 * otherwise a negative error value
440 * @retval #CONNECTION_ERROR_NONE Successful
441 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
442 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
443 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
445 int connection_set_ethernet_cable_state_chaged_cb(connection_h connection, connection_ethernet_cable_state_chaged_cb callback, void *user_data) TIZEN_DEPRECATED_API;
449 * @deprecated Deprecated since 4.0. Use connection_unset_ethernet_cable_state_changed_cb() instead.
450 * @brief Unregisters callback for ethernet cable is plugged [in/out] event.
451 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
452 * @param[in] connection The handle of connection
453 * @return @c 0 on success,
454 * otherwise a negative error value
455 * @retval #CONNECTION_ERROR_NONE Successful
456 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
457 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
458 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
460 int connection_unset_ethernet_cable_state_chaged_cb(connection_h connection) TIZEN_DEPRECATED_API;
463 * @brief Called when ethernet cable is plugged [in/out].
465 * @param[in] state The ethernet cable state (connection_ethernet_cable_state_e)
466 * @param[in] user_data The user data passed to callback registration function
468 typedef void(*connection_ethernet_cable_state_changed_cb)(connection_ethernet_cable_state_e state, void* user_data);
472 * @brief Registers callback for ethernet cable is plugged [in/out] event.
474 * @param[in] connection The handle of connection
475 * @param[in] callback The callback function to be called
476 * @param[in] user_data The user data passed to the callback function
477 * @return @c 0 on success,
478 * otherwise a negative error value
479 * @retval #CONNECTION_ERROR_NONE Successful
480 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
481 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
482 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
484 int connection_set_ethernet_cable_state_changed_cb(connection_h connection, connection_ethernet_cable_state_changed_cb callback, void *user_data);
488 * @brief Unregisters callback for ethernet cable is plugged [in/out] event.
490 * @param[in] connection The handle of connection
491 * @return @c 0 on success,
492 * otherwise a negative error value
493 * @retval #CONNECTION_ERROR_NONE Successful
494 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
495 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
496 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
498 int connection_unset_ethernet_cable_state_changed_cb(connection_h connection);
502 * @brief Gets the state of the Bluetooth.
503 * @details The returned state is for the Bluetooth connection state.
504 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
506 * @privilege %http://tizen.org/privilege/network.get
507 * @param[in] connection The connection handle
508 * @param[out] state The state of the Bluetooth connection
509 * @return @c 0 on success,
510 * otherwise a negative error value
511 * @retval #CONNECTION_ERROR_NONE Successful
512 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
513 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
514 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
515 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
517 int connection_get_bt_state(connection_h connection, connection_bt_state_e* state);
521 * @brief Registers the callback that is called when the type of the current connection is changed.
522 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
523 * @param[in] connection The connection handle
524 * @param[in] callback The callback function to be called
525 * @param[in] user_data The user data passed to the callback function
526 * @return @c 0 on success,
527 * otherwise a negative error value
528 * @retval #CONNECTION_ERROR_NONE Successful
529 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
530 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
532 int connection_set_type_changed_cb(connection_h connection, connection_type_changed_cb callback, void* user_data);
536 * @brief Unregisters the callback that is called when the type of current connection is changed.
537 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
538 * @param[in] connection The connection handle
539 * @return @c 0 on success,
540 * otherwise a negative error value
541 * @retval #CONNECTION_ERROR_NONE Successful
542 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
543 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
545 int connection_unset_type_changed_cb(connection_h connection);
549 * @brief Registers the callback that is called when the IP address is changed.
550 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
551 * @param[in] connection The connection handle
552 * @param[in] callback The callback function to be called
553 * @param[in] user_data The user data passed to the callback function
554 * @return @c 0 on success,
555 * otherwise a negative error value
556 * @retval #CONNECTION_ERROR_NONE Successful
557 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
558 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
560 int connection_set_ip_address_changed_cb(connection_h connection, connection_address_changed_cb callback, void* user_data);
564 * @brief Unregisters the callback that is called when the IP address is changed.
565 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
566 * @param[in] connection The connection handle
567 * @return @c 0 on success,
568 * otherwise a negative error value
569 * @retval #CONNECTION_ERROR_NONE Successful
570 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
571 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
573 int connection_unset_ip_address_changed_cb(connection_h connection);
577 * @brief Registers the callback that is called when the proxy address is changed.
578 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
579 * @param[in] connection The connection handle
580 * @param[in] callback The callback function to be called
581 * @param[in] user_data The user data passed to the callback function
582 * @return @c 0 on success,
583 * otherwise a negative error value
584 * @retval #CONNECTION_ERROR_NONE Successful
585 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
586 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
588 int connection_set_proxy_address_changed_cb(connection_h connection, connection_address_changed_cb callback, void* user_data);
592 * @brief Unregisters the callback that is called when the proxy address is changed.
593 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
594 * @param[in] connection The connection handle
595 * @return @c 0 on success,
596 * otherwise a negative error value
597 * @retval #CONNECTION_ERROR_NONE Successful
598 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
599 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
601 int connection_unset_proxy_address_changed_cb(connection_h connection);
605 * @brief Adds a new profile which is created by connection_profile_create().
606 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
608 * @privilege %http://tizen.org/privilege/network.profile
609 * @remarks You can only add a profile of the cellular type.
610 * @param[in] connection The connection handle
611 * @param[in] profile The profile handle
612 * @return @c 0 on success,
613 * otherwise a negative error value
614 * @retval #CONNECTION_ERROR_NONE Successful
615 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
616 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
617 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
618 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
620 int connection_add_profile(connection_h connection, connection_profile_h profile);
624 * @brief Removes an existing profile.
625 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
627 * @privilege %http://tizen.org/privilege/network.profile \n
628 * %http://tizen.org/privilege/network.get
629 * @remarks This API needs both privileges.
630 * @param[in] connection The connection handle
631 * @param[in] profile The profile handle
632 * @return @c 0 on success,
633 * otherwise a negative error value
634 * @retval #CONNECTION_ERROR_NONE Successful
635 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
636 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
637 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
638 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
640 int connection_remove_profile(connection_h connection, connection_profile_h profile);
644 * @brief Updates an existing profile.
645 * @details When a profile is changed, these changes will be not applied to the Connection Manager immediately.
646 * When you call this function, your changes affect the Connection Manager and the existing profile is updated.
647 * In addition, the existing profile will be updated if you call connection_open_profile().
648 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
650 * @privilege %http://tizen.org/privilege/network.profile \n
651 * %http://tizen.org/privilege/network.get
652 * @remarks This API needs both privileges.
653 * @param[in] connection The connection handle
654 * @param[in] profile The profile handle
655 * @return @c 0 on success,
656 * otherwise a negative error value
657 * @retval #CONNECTION_ERROR_NONE Successful
658 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
659 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
660 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
661 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
662 * @see connection_open_profile()
664 int connection_update_profile(connection_h connection, connection_profile_h profile);
668 * @brief Gets a profiles iterator.
669 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
671 * @privilege %http://tizen.org/privilege/network.get
672 * @remarks You must release @a profile_iterator using connection_destroy().
673 * @param[in] connection The connection handle
674 * @param[in] type The type of the connection iterator
675 * @param[out] profile_iterator The iterator of profile
676 * @return @c 0 on success,
677 * otherwise a negative error value
678 * @retval #CONNECTION_ERROR_NONE Successful
679 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
680 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
681 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
682 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
684 int connection_get_profile_iterator(connection_h connection, connection_iterator_type_e type, connection_profile_iterator_h* profile_iterator);
688 * @brief Moves the profile iterator to the next position and gets a profile handle.
689 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
690 * @param[in] profile_iterator The iterator of profile
691 * @param[out] profile The profile handle
692 * @return @c 0 on success,
693 * otherwise a negative error value
694 * @retval #CONNECTION_ERROR_NONE Successful
695 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
696 * @retval #CONNECTION_ERROR_ITERATOR_END End of iteration
698 int connection_profile_iterator_next(connection_profile_iterator_h profile_iterator, connection_profile_h* profile);
702 * @brief Checks whether the next element of a profile iterator exists or not.
703 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
704 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
705 * @param[in] profile_iterator The iterator of profile
706 * @return @c true if next element exists,
707 * otherwise @c false if next element doesn't exist
709 bool connection_profile_iterator_has_next(connection_profile_iterator_h profile_iterator);
713 * @brief Destroys a profiles iterator.
714 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
715 * @param[in] profile_iterator The iterator of the profile
716 * @return @c 0 on success,
717 * otherwise a negative error value
718 * @retval #CONNECTION_ERROR_NONE Successful
719 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
721 int connection_destroy_profile_iterator(connection_profile_iterator_h profile_iterator);
725 * @brief Gets the name of the default profile.
726 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
728 * @privilege %http://tizen.org/privilege/network.get
729 * @remarks You must release @a profile using connection_profile_destroy().
730 * @param[in] connection The connection handle
731 * @param[out] profile The profile handle
732 * @return @c 0 on success,
733 * otherwise a negative error value
734 * @retval #CONNECTION_ERROR_NONE Successful
735 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
736 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
737 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
738 * @retval #CONNECTION_ERROR_NO_CONNECTION There is no connection
739 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
741 int connection_get_current_profile(connection_h connection, connection_profile_h* profile);
745 * @brief Gets the default profile which provides the given cellular service.
746 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
748 * @privilege %http://tizen.org/privilege/network.get
749 * @remarks You must release @a profile using connection_profile_destroy().
750 * @param[in] connection The connection handle
751 * @param[in] type The type of cellular service \n
752 * #CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION is not permitted
753 * @param[out] profile The profile handle
754 * @return @c 0 on success,
755 * otherwise a negative error value
756 * @retval #CONNECTION_ERROR_NONE Successful
757 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
758 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
759 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
760 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
761 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
763 int connection_get_default_cellular_service_profile(connection_h connection, connection_cellular_service_type_e type, connection_profile_h* profile);
767 * @brief Sets the default profile which provides the given cellular service.
768 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
770 * @privilege %http://tizen.org/privilege/network.profile \n
771 * %http://tizen.org/privilege/network.get
772 * @remarks This API needs both privileges.
773 * @param[in] connection The connection handle
774 * @param[in] type The type of cellular service \n
775 * only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted
776 * @param[in] profile The profile handle
777 * @return @c 0 on success,
778 * otherwise a negative error value
779 * @retval #CONNECTION_ERROR_NONE Successful
780 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
781 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
782 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
783 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
785 int connection_set_default_cellular_service_profile(connection_h connection, connection_cellular_service_type_e type, connection_profile_h profile);
789 * @brief Sets the default profile which provides the given cellular service, asynchronously.
790 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
792 * @privilege %http://tizen.org/privilege/network.profile \n
793 * %http://tizen.org/privilege/network.get
794 * @remarks This API needs both privileges.
795 * @param[in] connection The connection handle
796 * @param[in] type The type of cellular service (only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted)
797 * @param[in] profile The profile handle
798 * @param[in] callback The callback function to be called
799 * @param[in] user_data The user data passed to the callback function
800 * @return @c 0 on success,
801 * otherwise a negative error value
802 * @retval #CONNECTION_ERROR_NONE Successful
803 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
804 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
805 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
806 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
808 int connection_set_default_cellular_service_profile_async(connection_h connection,
809 connection_cellular_service_type_e type, connection_profile_h profile, connection_set_default_cb callback, void* user_data);
813 * @brief Called after connection_open_profile() is finished.
814 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
815 * @param[in] result The result
816 * @param[in] user_data The user data passed from connection_open_profile()
817 * @pre connection_open_profile() will invoke this callback function.
818 * @see connection_open_profile()
820 typedef void(*connection_opened_cb)(connection_error_e result, void* user_data);
824 * @brief Called after connection_close_profile() is finished.
825 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
826 * @param[in] result The result
827 * @param[in] user_data The user data passed from connection_close_profile()
828 * @pre connection_close_profile() will invoke this callback function.
829 * @see connection_close_profile()
831 typedef void(*connection_closed_cb)(connection_error_e result, void* user_data);
835 * @brief Called after connection_reset_profile() is finished.
836 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
837 * @param[in] result The result
838 * @param[in] user_data The user data passed from connection_reset_profile()
839 * @pre connection_reset_profile() will invoke this callback function.
840 * @see connection_reset_profile()
842 typedef void(*connection_reset_cb)(connection_error_e result, void* user_data);
846 * @brief Opens a connection of profile, asynchronously.
847 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
849 * @privilege %http://tizen.org/privilege/network.set \n
850 * %http://tizen.org/privilege/network.get
851 * @remarks This API needs both privileges.
852 * @param[in] connection The connection handle
853 * @param[in] profile The profile handle
854 * @param[in] callback The callback function to be called
855 * @param[in] user_data The user data passed to the callback function
856 * @return @c 0 on success,
857 * otherwise a negative error value
858 * @retval #CONNECTION_ERROR_NONE Successful
859 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
860 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
861 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
862 * @post connection_opened_cb() will be invoked.
863 * @see connection_opened_cb()
864 * @see connection_close_profile()
865 * @see connection_profile_set_state_changed_cb()
866 * @see connection_profile_unset_state_changed_cb()
867 * @see connection_profile_state_changed_cb()
869 int connection_open_profile(connection_h connection, connection_profile_h profile, connection_opened_cb callback, void* user_data);
873 * @brief Closes a connection of profile.
874 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
876 * @privilege %http://tizen.org/privilege/network.set
877 * @param[in] connection The connection handle
878 * @param[in] profile The profile handle
879 * @param[in] callback The callback function to be called
880 * @param[in] user_data The user data passed to the callback function
881 * @return @c 0 on success,
882 * otherwise a negative error value
883 * @retval #CONNECTION_ERROR_NONE Successful
884 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
885 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
886 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
887 * @post connection_closed_cb() will be invoked.
888 * @see connection_closed_cb()
889 * @see connection_open_profile()
890 * @see connection_profile_set_state_changed_cb()
891 * @see connection_profile_unset_state_changed_cb()
892 * @see connection_profile_state_changed_cb()
894 int connection_close_profile(connection_h connection, connection_profile_h profile, connection_closed_cb callback, void* user_data);
898 * @brief Resets the cellular profile.
899 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
901 * @privilege %http://tizen.org/privilege/network.profile \n
902 * %http://tizen.org/privilege/network.get
903 * @remarks This API needs both privileges.
904 * @param[in] connection The connection handle
905 * @param[in] type The type of reset
906 * @param[in] id The subscriber identity module ID to reset (The sim index starts from 0.)
907 * @param[in] callback The callback function to be called
908 * @param[in] user_data The user data passed to the callback function
909 * @return @c 0 on success,
910 * otherwise a negative error value
911 * @retval #CONNECTION_ERROR_NONE Successful
912 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
913 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
914 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
915 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
916 * @post connection_reset_cb() will be invoked.
918 int connection_reset_profile(connection_h connection, connection_reset_option_e type, int id, connection_reset_cb callback, void *user_data);
922 * @brief Adds a IPv4 route to the routing table.
923 * @details You can get the @a interface_name from connection_profile_get_network_interface_name() of opened profile.
924 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
926 * @privilege %http://tizen.org/privilege/network.set
927 * @param[in] connection The connection handle
928 * @param[in] interface_name The name of network interface
929 * @param[in] host_address The IP address of the host
930 * @return @c 0 on success,
931 * otherwise a negative error value
932 * @retval #CONNECTION_ERROR_NONE Successful
933 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
934 * @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists
935 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
936 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
937 * @see connection_profile_get_network_interface_name()
939 int connection_add_route(connection_h connection, const char* interface_name, const char* host_address);
943 * @brief Removes a IPv4 route from the routing table.
944 * @details You can get the @a interface_name from connection_profile_get_network_interface_name() of opened profile.
945 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
947 * @privilege %http://tizen.org/privilege/network.set
948 * @param[in] connection The connection handle
949 * @param[in] interface_name The name of network interface
950 * @param[in] host_address The IP address of the host
951 * @return @c 0 on success,
952 * otherwise a negative error value
953 * @retval #CONNECTION_ERROR_NONE Successful
954 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
955 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
956 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
957 * @see connection_profile_get_network_interface_name()
959 int connection_remove_route(connection_h connection, const char* interface_name, const char* host_address);
963 * @brief Adds a IPv6 route to the routing table.
964 * @details You can get the @a interface_name from connection_profile_get_network_interface_name() of opened profile.
967 * @privilege %http://tizen.org/privilege/network.set
968 * @param[in] connection The connection handle
969 * @param[in] interface_name The name of network interface
970 * @param[in] host_address The IP address of the host
971 * @param[in] gateway The gateway address
972 * @return @c 0 on success,
973 * otherwise a negative error value
974 * @retval #CONNECTION_ERROR_NONE Successful
975 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
976 * @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists
977 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
978 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
979 * @see connection_profile_get_network_interface_name()
981 int connection_add_route_ipv6(connection_h connection, const char *interface_name, const char *host_address, const char * gateway);
985 * @brief Removes a IPV6 route from the routing table.
986 * @details You can get the @a interface_name from connection_profile_get_network_interface_name() of opened profile.
989 * @privilege %http://tizen.org/privilege/network.set
990 * @param[in] connection The connection handle
991 * @param[in] interface_name The name of network interface
992 * @param[in] host_address The IP address of the host
993 * @param[in] gateway The gateway address
994 * @return @c 0 on success,
995 * otherwise a negative error value
996 * @retval #CONNECTION_ERROR_NONE Successful
997 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
998 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
999 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
1000 * @see connection_profile_get_network_interface_name()
1002 int connection_remove_route_ipv6(connection_h connection, const char *interface_name, const char *host_address, const char * gateway);
1005 * @brief Gets all IPv6 addresses assigned to the network interface.
1007 * @param[in] connection The connection handle
1008 * @param[in] connection_type The connection type
1009 * @param[in] callback The callback to be called for each IPv6 address
1010 * @param[in] user_data The user data passed to the callback function
1011 * @return 0 on success, otherwise negative error value.
1012 * @retval #CONNECTION_ERROR_NONE Successful
1013 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1014 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1015 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1017 int connection_foreach_ipv6_address(connection_h connection, connection_type_e connection_type,
1018 connection_ipv6_address_cb callback, void *user_data);
1026 * @addtogroup CAPI_NETWORK_CONNECTION_STATISTICS_MODULE
1032 * @brief Gets the statistics information.
1033 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1035 * @privilege %http://tizen.org/privilege/network.get
1036 * @param[in] connection The connection handle
1037 * @param[in] connection_type The type of connection (only CONNECTION_TYPE_WIFI and CONNECTION_TYPE_CELLULAR are supported)
1038 * @param[in] statistics_type The type of statistics
1039 * @param[out] size The received data size of the last cellular packet data connection (bytes)
1040 * @return @c 0 on success,
1041 * otherwise a negative error value
1042 * @retval #CONNECTION_ERROR_NONE Successful
1043 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1044 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1045 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
1047 int connection_get_statistics(connection_h connection, connection_type_e connection_type, connection_statistics_type_e statistics_type, long long* size);
1051 * @brief Resets the statistics information.
1052 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1054 * @privilege %http://tizen.org/privilege/network.set
1055 * @remarks This API needs both privileges.
1056 * @param[in] connection The connection handle
1057 * @param[in] connection_type The type of connection (only CONNECTION_TYPE_WIFI and CONNECTION_TYPE_CELLULAR are supported)
1058 * @param[in] statistics_type The type of statistics
1059 * @return @c 0 on success,
1060 * otherwise a negative error value
1061 * @retval #CONNECTION_ERROR_NONE Successful
1062 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1063 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1064 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
1065 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not Supported
1067 int connection_reset_statistics(connection_h connection, connection_type_e connection_type, connection_statistics_type_e statistics_type);
1076 #endif /* __cplusplus */