2 * Network Client Library
4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.1 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.tizenopensource.org/license
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __NETWORK_CM_INTF_H__
21 #define __NETWORK_CM_INTF_H__
24 #include "network-pm-intf.h"
28 #endif /* __cplusplus */
31 #define DEPRECATED __attribute__((deprecated))
35 * @file network-cm-intf.h
36 * @brief This file defines the interface of Connection Manager with the application.
40 * \addtogroup common_basic
44 /*==================================================================================================
46 ==================================================================================================*/
48 /*==================================================================================================
50 ==================================================================================================*/
58 /** Open Connection Response Event*/
61 /** Close Connection Response Event*/
64 /** Open connection Indication (auto join) */
67 /** Connection Close Indication Event */
70 /** Network service(profile) state changed Indication Event*/
71 NET_EVENT_NET_STATE_IND,
73 /** Network IP change Indication Event\n
74 * This is deprecated Event and maintained only for compatibility */
75 NET_EVENT_IP_CHANGE_IND,
77 /** Profile modify indication Event\n
78 * This is deprecated Event and maintained only for compatibility */
79 NET_EVENT_PROFILE_MODIFY_IND,
81 /** Network configuration changed Event\n
82 * This is deprecated Event and maintained only for compatibility */
83 NET_EVENT_NET_CONFIGURE_RSP,
85 /* Wi-Fi Specific events */
87 /** Wi-Fi interface Scan Response Event */
88 NET_EVENT_WIFI_SCAN_RSP,
90 /** Wi-Fi interface Scan Indication Event(BG scan) */
91 NET_EVENT_WIFI_SCAN_IND,
93 /** Wi-Fi interface MAC changed Event\n
94 * This is deprecated Event and maintained only for compatibility */
95 NET_EVENT_WIFI_MAC_ID_IND,
97 /** Wi-Fi interface Power On/Off Response Event */
98 NET_EVENT_WIFI_POWER_RSP,
100 /** Specific Scan Response Event */
101 NET_EVENT_SPECIFIC_SCAN_RSP,
103 /** Wi-Fi interface Scan Indication Event(Specific scan) */
104 NET_EVENT_SPECIFIC_SCAN_IND,
106 /** Wi-Fi interface Power On/Off Indication Event */
107 NET_EVENT_WIFI_POWER_IND,
109 /** Wi-Fi interface WPS Response Event */
110 NET_EVENT_WIFI_WPS_RSP,
112 /** Set default cellular profile Response Event */
113 NET_EVENT_CELLULAR_SET_DEFAULT_RSP,
115 /** Reset default cellular profile Response Event */
116 NET_EVENT_CELLULAR_RESET_DEFAULT_RSP,
118 /** Wi-Fi interface Scanning Indication Event */
119 NET_EVENT_WIFI_SCANNING_IND,
121 /** Ethernet Cable Attached Event */
122 NET_EVENT_ETHERNET_CABLE_ATTACHED,
124 /** Ethernet Cable Detached Event */
125 NET_EVENT_ETHERNET_CABLE_DETACHED,
127 /** Network Type Changed Event */
128 NET_EVENT_NETWORK_TYPE_CHANGED,
130 /** IPv4 Address Changed Event */
131 NET_EVENT_IPV4_ADDRESS_CHANGED,
133 /** IPv6 Address Changed Event */
134 NET_EVENT_IPV6_ADDRESS_CHANGED,
136 /** Proxy Address Changed Event */
137 NET_EVENT_PROXY_ADDRESS_CHANGED,
139 /** Internet State Changed Event(Online) */
140 NET_EVENT_INTERNET_ONLINE_IND,
142 /** Internet State Changed Event(Offline) */
143 NET_EVENT_INTERNET_OFFLINE_IND,
151 * \addtogroup common_info
156 * @enum net_cm_network_status_t
157 * This enum indicates network status
160 /** Service unknown */
162 /** Not connected / Suspended / Idle / Connecting/ Disconnecting/ Killing*/
163 NET_STATUS_UNAVAILABLE,
165 NET_STATUS_AVAILABLE,
166 } net_cm_network_status_t;
169 * @brief Enumerations of statistics type.
172 NET_STATISTICS_TYPE_LAST_RECEIVED_DATA = 0, /**< Last received data */
173 NET_STATISTICS_TYPE_LAST_SENT_DATA = 1, /**< Last sent data */
174 NET_STATISTICS_TYPE_TOTAL_RECEIVED_DATA = 2, /**< Total received data */
175 NET_STATISTICS_TYPE_TOTAL_SENT_DATA = 3, /**< Total sent data */
176 } net_statistics_type_e;
183 * \addtogroup common_basic
187 /*==================================================================================================
188 STRUCTURES AND OTHER TYPEDEFS
189 ==================================================================================================*/
192 * Event Info with Event on callback
196 /** CM Asynchronous event */
198 /** Profile Identifier corresponding to the event */
199 char profile_name[NET_PROFILE_NAME_LEN_MAX+1];
202 /** Event data length */
204 /** Event data: Depending on the event, Event Data will be
205 type-casted to the appropriate event info data structure */
210 * Technology properties
216 /** connected state */
221 /*****************************************************************************************/
222 /* Callback function prototype
223 * typedef void (*net_event_cb_t)(const net_event_info_t* net_event, void* user_data);
227 * \brief callback function: used to notify client application about Asynchronous events.
228 * This callback function will be called in the Network Client Library(NCL) context.
230 * \par Important Notes:
231 * NCL will allocate the memory for event data.
232 * Once Context will return from callback then NCL will free the memory allocated to event data.
233 * Application is not supposed to free the memory pointed by net_event
235 * \param[out] net_event Pointer to net_event_info_t structure
236 * \param[out] user_data User can transfer the user specific data in callback
238 * \par Description of each event type(net_event->Event) :
240 * - NET_EVENT_OPEN_RSP \n
241 * Response event for (net_open_connection_with_profile(), net_open_connection_with_preference(), net_open_connection_with_wifi_info())
242 * to notify the result of open connection request.
243 * - net_event->profile_name : Profile Identifier corresponding to the event
244 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
245 * - net_event->Data : Pointer to net_profile_info_t (valid at NET_ERR_NONE, NET_ERR_ACTIVE_CONNECTION_EXISTS)
246 * - If the connection open successfully or already exists for the given profile name,\n
247 * application can get the connected profile information \n
248 * If the connection is failed to establish, net_profile_info_t also contains NULL value
250 * - NET_EVENT_CLOSE_RSP \n
251 * Response event for net_close_connection() to notify the result of close connection request.
252 * - net_event->profile_name : Profile Identifier corresponding to the event
253 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
254 * - net_event->Data : NULL (not used in this event)
256 * - NET_EVENT_OPEN_IND \n
257 * Indication to notify the activation of a connection by any other application or auto-connection.
258 * - net_event->profile_name : Profile Identifier corresponding to the event
259 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
260 * - net_event->Data : Pointer to net_profile_info_t
261 * - If NCL can't get profile info from ConnMan, net_profile_info_t contains NULL value
263 * - NET_EVENT_CLOSE_IND \n
264 * Indication to notify the closure of an active connection due to network initiated termination or any other transport connectivity loss.
265 * - net_event->profile_name : Profile Identifier corresponding to the event
266 * - net_event->Error : Its value will be NET_ERR_NONE always
267 * - net_event->Data : NULL (not used in this event)
269 * - NET_EVENT_NET_STATE_IND \n
270 * Indication to notify that state of each serivce(profile) changed.\n
271 * You can use this event to get more detailed state, but should be used carefully.\n
272 * This event comes from ConnMan daemon via NCL, so you have to understand ConnMan's state.\n
273 * There is no need to handle this event except under special circumstances.
274 * - net_event->profile_name : Profile Identifier corresponding to the event
275 * - net_event->Error : Its value will be NET_ERR_NONE always
276 * - net_event->Data : Pointer to net_state_type_t
278 * - NET_EVENT_WIFI_SCAN_RSP \n
279 * Response event for net_scan_wifi() to notify the result of scan request.
280 * - net_event->profile_name : NULL (not used in this event)
281 * - net_event->Error : NET_ERR_NONE on success, negative values for errors
282 * - net_event->Data : NULL (not used in this event)
284 * - NET_EVENT_WIFI_SCAN_IND \n
285 * Indication to notify that BG scan has been completed.
286 * - net_event->profile_name : NULL (not used in this event)
287 * - net_event->Error : NET_ERR_NONE on success, negative values for errors
288 * - net_event->Data : NULL (not used in this event)
290 * - NET_EVENT_WIFI_POWER_RSP \n
291 * Response event for (net_wifi_power_on(), net_wifi_power_off()) to notify the result of Wi-Fi power on request.
292 * - net_event->profile_name : NULL (not used in this event)
293 * - net_event->Error : NET_ERR_NONE on success, negative values for errors
294 * - net_event->Data : Pointer to net_wifi_state_t (only WIFI_OFF/WIFI_ON/WIFI_UNKNOWN will be set)
296 * - NET_EVENT_WIFI_POWER_IND \n
297 * Indication to notify that Wi-Fi power state has been changed.
298 * - net_event->profile_name : NULL (not used in this event)
299 * - net_event->Error : NET_ERR_NONE on success, negative values for errors
300 * - net_event->Data : Pointer to net_wifi_state_t (only WIFI_OFF/WIFI_ON/WIFI_UNKNOWN will be set)
302 * - NET_EVENT_WIFI_WPS_RSP \n
303 * Response event for net_wifi_enroll_wps() to notify the result of enroll wps request.
304 * - net_event->profile_name : Profile Identifier corresponding to the event
305 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
306 * - net_event->Data : Pointer to net_profile_info_t
307 * - If the connection open successfully, application can get the connected profile information \n
308 * If the connection is failed to establish, net_profile_info_t also contains NULL value
310 * - NET_EVENT_SPECIFIC_SCAN_IND \n
311 * Response event for net_specific_scan_wifi() to notify the BSSs which are found.
312 * - net_event->profile_name : NULL (not used in this event)
313 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
314 * - net_event->Data : Pointer to GSList of struct ssid_scan_bss_info_t
315 * - net_event->Datalength : The number of BSSs which are found
316 * - Do not delete and modify Data and Datalength and they are destroyed automatically
320 typedef void (*net_event_cb_t)(const net_event_info_t* net_event, void* user_data);
322 /*==================================================================================================
324 ==================================================================================================*/
326 /*****************************************************************************************/
327 /* net_open_connection_with_profile API function prototype
328 * int net_open_connection_with_profile(const char *profile_name);
332 * \brief This API will establish a data connection with specific profile name
334 * \par Sync (or) Async:
335 * This is an Asynchronous API.
337 * \par Important Notes:
338 * This API is a Non-Blocking API. Return value only implies whether the request is sent successfully or not. \n
339 * Return value Success does not imply that the connection is established successfully. \n
340 * If application needs to make a connection with specific profile name, it can make a connection with this api. \n
341 * Get the profile name is referred to net_get_profile_list(). \n
342 * If Connection is already existed, this API will share the active connection with the calling application. \n
343 * If Connection is already existed, and same application is trying to open connection, this API will return error.
347 * ConnMan requests transport plug-in interface to open a new connection only if connection is not already established. \n
348 * If there is already a connection , then same connection will be shared.
353 * \param [in] profile_name specific profile name
355 * \par Async Response Message:
356 * NET_EVENT_OPEN_RSP: Connection Establishment response will be sent asynchronously to the App in the callback function registered.\n
357 * refer to net_event_cb_t()
360 * Application must already be registered with the ConnMan.
362 * \return Return Type (int) \n
363 * - NET_ERR_NONE - indicating that the operation has completed successfully. \n
364 * - NET_ERR_APP_NOT_REGISTERED -indicating that client is not registered with CM and it cannot use CM services.\n
365 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
366 * - NET_ERR_INVALID_OPERATION - indicating that open connection operation is not allowed in the current state.\n
367 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
370 * \par Prospective Clients:
373 * \par Example Program:
377 * result = net_open_connection_with_profile(profile_name);
379 * if(result == NET_ERR_NONE)......
383 ******************************************************************************************/
384 int net_open_connection_with_profile(void *handle, const char *profile_name);
386 /*****************************************************************************************/
387 /* net_open_mesh_connection_with_profile API function prototype
388 * int net_open_mesh_connection_with_profile(const char *profile_name);
392 * \brief This API will establish a data connection with specific profile name
394 * \par Sync (or) Async:
395 * This is an Asynchronous API.
397 * \par Important Notes:
398 * This API is a Non-Blocking API. Return value only implies whether the request is sent successfully or not. \n
399 * Return value Success does not imply that the connection is established successfully. \n
400 * If application needs to make a connection with specific profile name, it can make a connection with this api. \n
401 * Get the profile name is referred to net_get_profile_list(). \n
402 * If Connection is already existed, this API will share the active connection with the calling application. \n
403 * If Connection is already existed, and same application is trying to open connection, this API will return error.
407 * ConnMan requests transport plug-in interface to open a new connection only if connection is not already established. \n
408 * If there is already a connection , then same connection will be shared.
413 * \param [in] profile_name specific profile name
415 * \par Async Response Message:
416 * NET_EVENT_OPEN_RSP: Connection Establishment response will be sent asynchronously to the App in the callback function registered.\n
417 * refer to net_event_cb_t()
420 * Application must already be registered with the ConnMan.
422 * \return Return Type (int) \n
423 * - NET_ERR_NONE - indicating that the operation has completed successfully. \n
424 * - NET_ERR_APP_NOT_REGISTERED -indicating that client is not registered with CM and it cannot use CM services.\n
425 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
426 * - NET_ERR_INVALID_OPERATION - indicating that open connection operation is not allowed in the current state.\n
427 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
430 * \par Prospective Clients:
433 * \par Example Program:
437 * result = net_open_mesh_connection_with_profile(profile_name);
439 * if(result == NET_ERR_NONE)......
443 ******************************************************************************************/
444 int net_open_mesh_connection_with_profile(void *handle, const char *profile_name);
446 /*****************************************************************************************/
447 /* net_close_connection API function prototype
448 * int net_close_connection(const char *profile_name);
452 * \brief This API will terminate the connection. This API can also be used to abort a connection in progress.
454 * \par Sync (or) Async:
455 * This is an Asynchronous API.
457 * \par Important Notes:
458 * This API is an Asynchronous API. Return value only implies whether the request is sent successfully or not. Return value Success doesn't imply that the connection is disconnected successfully.\n
464 * Application must be already registered with the ConnMan. \n
466 * \param [in] profile_name specific profile name
468 * \par Async Response Message:
469 * NET_EVENT_CLOSE_RSP: Connection Close response will be sent asynchronously to the App in the callback function registered\n
470 * refer to net_event_cb_t()
473 * Application must have an active data connection
475 * \return Return Type (int) \n
476 * - NET_ERR_NONE - indicating that the operation has completed successfully. \n
477 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
478 * - NET_ERR_INVALID_OPERATION - indicating that close connection operation is not allowed in the current state.\n
479 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
481 * \par Prospective Clients:
484 * \par Example Program:
488 * result = net_close_connection(profile_name);
490 * if(result == NET_ERR_NONE).........
494 ******************************************************************************************/
495 int net_close_connection(void *handle, const char *profile_name);
497 /*****************************************************************************************/
498 /* net_close_mesh_connection API function prototype
499 * int net_close_mesh_connection(const char *profile_name);
503 * \brief This API will terminate the connection. This API can also be used to abort a connection in progress.
505 * \par Sync (or) Async:
506 * This is an Asynchronous API.
508 * \par Important Notes:
509 * This API is an Asynchronous API. Return value only implies whether the request is sent successfully or not. Return value Success doesn't imply that the connection is disconnected successfully.\n
515 * Application must be already registered with the ConnMan. \n
517 * \param [in] profile_name specific profile name
519 * \par Async Response Message:
520 * NET_EVENT_CLOSE_RSP: Connection Close response will be sent asynchronously to the App in the callback function registered\n
521 * refer to net_event_cb_t()
524 * Application must have an active data connection
526 * \return Return Type (int) \n
527 * - NET_ERR_NONE - indicating that the operation has completed successfully. \n
528 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
529 * - NET_ERR_INVALID_OPERATION - indicating that close connection operation is not allowed in the current state.\n
530 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
532 * \par Prospective Clients:
535 * \par Example Program:
539 * result = net_close_mesh_connection(profile_name);
541 * if(result == NET_ERR_NONE).........
545 ******************************************************************************************/
546 int net_close_mesh_connection(void *handle, const char *profile_name);
553 * \addtogroup common_info
557 /*****************************************************************************************/
558 /* net_get_active_net_info API function prototype
559 * int net_get_active_net_info(net_profile_info_t *active_profile_info);
563 * \brief This API returns the information of active(default) network profile.
565 * \par Sync (or) Async:
566 * This is a Synchronous API.
568 * \par Important Notes:
569 * On success, profile information shall be copied to active_profile_info parameter in net_profile_info_t format.
577 * \param[out] active_profile_info The information of active(default) network profile.
579 * \par Async Response Message:
583 * Application must already be registered with the CM server.
585 * \return Return Type (int) \n
586 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
587 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
588 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
589 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
590 * - NET_ERR_NO_SERVICE - indicating that there is no active network.\n
592 * \par Prospective Clients:
595 * \par Example Program:
597 * net_profile_info_t active_profile_info;
599 * int result = net_get_active_net_info(&active_profile_info);
601 * if(result == NET_ERR_NONE)......
605 ******************************************************************************************/
606 int net_get_active_net_info(void *handle, net_profile_info_t *active_profile_info);
608 /*****************************************************************************************/
609 /* net_get_network_status API function prototype
610 * int net_get_network_status(net_device_t device_type, net_cm_network_status_t* network_status);
614 * \brief This API returns The status of a specific network interface passed as a parameter.
616 * \par Sync (or) Async:
617 * This is a Synchronous API.
619 * \par Important Notes:
628 * \param[in] device_type Queried network interface.
629 * \param[out] network_status The status of Queried network interface.
631 * \par Async Response Message:
635 * Application must already be registered with the CM server.
637 * \return Return Type (int) \n
638 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
639 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
640 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
641 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
643 * \par Prospective Clients:
646 * \par Example Program:
648 * net_cm_network_status_t status;
650 * int result = net_get_network_status(NET_MOBILE_TYPE, &status);
652 * if(result == TRUE)......
656 ******************************************************************************************/
657 int net_get_network_status(void *handle, net_device_t device_type, net_cm_network_status_t* network_status);
664 * \addtogroup pdp_specific
673 * \addtogroup common_extended
678 * \brief This API is only for Connection/Wi-Fi CAPI. Don't use this.
680 * \param[in] event_cb Application Callback function pointer to receive ConnMan events
681 * \param[in] client_type NET_DEVICE_DEFAULT : Connection CAPI, NET_DEVICE_WIFI : Wi-Fi CAPI
682 * \param[in] user_data user data
684 ******************************************************************************************/
685 int net_register_client(void **handle, net_event_cb_t event_cb, void *user_data);
688 * \brief This API is only for Connection/Wi-Fi CAPI. Don't use this.
690 * \param[in] client_type NET_DEVICE_DEFAULT : Connection CAPI, NET_DEVICE_WIFI : Wi-Fi CAPI
692 ******************************************************************************************/
693 void net_deregister_client(void *handle);
696 * \brief This API is only for Connection CAPI. Don't use this.
698 * \param[in] ip_addr ip address to route.
699 * \param[in] interface interface name.
700 * \param[in] address_family address family of ip address.
702 ******************************************************************************************/
703 int net_add_route(void *handle, const char *ip_addr, const char *interface, int address_family);
706 * \brief This API is only for Connection CAPI. Don't use this.
708 * \param[in] ip_addr ip address to route.
709 * \param[in] interface interface name.
710 * \param[in] address_family address family of ip address.
712 ******************************************************************************************/
713 int net_remove_route(void *handle, const char *ip_addr, const char *interface, int address_family);
716 * \brief This API is only for Connection CAPI. Don't use this.
718 * \param[in] ip_addr ip address to route.
719 * \param[in] interface interface name.
720 * \param[in] address_family address family of ip address.
721 * \param[in] gateway The gateway address.
723 ******************************************************************************************/
724 int net_add_route_entry(void *handle, const char *ip_addr,
725 const char *interface, int address_family, const char *gateway);
728 * \brief This API is only for Connection CAPI. Don't use this.
730 * \param[in] ip_addr ip address to route.
731 * \param[in] interface interface name.
732 * \param[in] address_family address family of ip address.
733 * \param[in] gateway The gateway address.
735 ******************************************************************************************/
736 int net_remove_route_entry(void *handle, const char *ip_addr,
737 const char *interface, int address_family, const char *gateway);
740 * \brief This API is only for Connection CAPI. Don't use this.
742 * \param[in] ip_addr ipv6 address to route.
743 * \param[in] interface interface name.
744 * \param[in] address_family address family of ip address.
745 * \param[in] gateway gateway address.
747 ******************************************************************************************/
748 int net_add_route_ipv6(void *handle, const char *ip_addr,
749 const char *interface, int address_family, const char *gateway);
752 * \brief This API is only for Connection CAPI. Don't use this.
754 * \param[in] ip_addr ipv6 address to route.
755 * \param[in] interface interface name.
756 * \param[in] address_family address family of ip address.
757 * \param[in] gateway gateway address.
759 ******************************************************************************************/
760 int net_remove_route_ipv6(void *handle, const char *ip_addr,
761 const char *interface, int address_family, const char *gateway);
764 * \brief This API is only for Connection CAPI. Don't use this.
766 * \param[in] tid TID in C#.
768 ******************************************************************************************/
769 void net_set_cs_tid(int tid, void *handle);
772 * \brief This API is only for Connection CAPI. Don't use this.
774 * \param[in] tid TID in C#.
776 ******************************************************************************************/
777 void net_unset_cs_tid(int tid, void *handle);
779 /*****************************************************************************************/
780 /* net_get_ethernet_cable_state API function prototype
781 * int net_get_ethernet_cable_state(int *state);
785 * \brief This API returns the ethernet cable status, 1 = Attached, 0 = Deatached.
787 * \param[out] state - Specifies the State of ethernet cable
789 * \par Sync (or) Async:
790 * This is a Synchronous API.
792 * \par Important Notes:
802 * \par Async Response Message:
805 * \return Return Type (int) \n
806 * - NET_ERR_NONE - indicating that the status of ethernet plug in/out retrieved successfully.\n
807 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
808 * - NET_ERR_INVALID_OPERATION - indicating that the API failed to retrieve the status of ethernet plug.\n
810 * \par Prospective Clients:
814 ******************************************************************************************/
815 int net_get_ethernet_cable_state(void *handle, int *state);
818 * \brief This API is only for Connection CAPI. Don't use this.
820 * \param[out] state Indicating whether the default connection is metered.
822 ******************************************************************************************/
823 int net_get_metered_state(void *handle, int *state);
826 * \brief This API is only for Connection CAPI. Don't use this.
828 * \param[in] handle The network info handle.
829 * \param[out] state Indicating whether time is updated by NTP or not.
831 ******************************************************************************************/
832 int net_get_clock_update_info(void *handle, bool *state);
835 * \brief This API is only for Connection CAPI. Don't use this.
837 * \param[in] enable Enable EAP over Ethernet network.
838 * \param[in] pofilename Profile name of ethernet.
840 ******************************************************************************************/
841 int net_ethernet_eap_enable(gboolean enable, const char *profilename);
844 * \brief This API is only for Connection CAPI. Don't use this.
846 * \param[in] pofilename Profile name of ethernet.
847 * \param[out] enabled Indicating whether the EAP over Ethernet is enabled.
849 ******************************************************************************************/
850 int net_ethernet_eap_enabled(const char *profilename, gboolean *enabled);
853 * \brief This API is only for Connection CAPI. Don't use this.
855 * \param[in] net_info Ethernet device information.
857 ******************************************************************************************/
858 int net_save_ethernet_eap_config(void *handle, net_dev_info_t *net_info);
865 * \addtogroup common_info
870 * \brief Gets the statistics information.
872 * \param[in] device_type specific device type(cellular/wifi).
873 * \param[in] statistics_type specific statistics type.
874 * \param[out] size statistics value requested.
876 ******************************************************************************************/
877 int net_get_statistics(void *handle, net_device_t device_type,
878 net_statistics_type_e statistics_type, unsigned long long *size);
881 * \brief Resets the statistics information.
883 * \param[in] device_type specific device type(cellular/wifi).
884 * \param[in] statistics_type specific statistics type.
886 ******************************************************************************************/
887 int net_set_statistics(void *handle, net_device_t device_type,
888 net_statistics_type_e statistics_type);
891 * \brief Start TCP dump.
894 ******************************************************************************************/
895 int net_start_tcpdump(void *handle);
898 * \brief Stop TCP dump.
901 ******************************************************************************************/
902 int net_stop_tcpdump(void *handle);
905 * \brief Get TCP dump running status.
907 * \param[out] is_tcpdump_running True or false boolean, tcpdump is in progress or not running
909 ******************************************************************************************/
910 gboolean net_get_tcpdump_state(void *handle, gboolean *is_tcpdump_running);
913 * \brief Get vconf value via dbus.
915 * \param[in] handle libnet-client handle.
916 * \param[in] key Vconf key.
917 * \param[in] type Vconf data type(string, int, bool).
918 * \param[out] ret Return value.
919 * \param[out] int_value Vconf value for int or bool type.
920 * \param[out] str_value Vconf value for string type.
922 ******************************************************************************************/
923 int net_get_vconf_value(void *handle, const char *key, const char *type,
924 int *ret, int *int_value, char **str_value);
932 #endif /* __cplusplus */