2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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 __NETWORK_CM_INTF_H__ /* To prevent inclusion of a header file twice */
19 #define __NETWORK_CM_INTF_H__
24 #endif /* __cplusplus */
27 * @file network-cm-intf.h
28 * @brief This file defines the interface of Connection Manager with the application.
32 * \addtogroup common_basic
36 /*==================================================================================================
38 ==================================================================================================*/
42 #include <sys/types.h>
46 #include <arpa/inet.h>
47 #include <sys/socket.h>
52 #include <netinet/in.h>
62 #include <semaphore.h>
63 #include <linux/unistd.h>
65 #include "network-pm-intf.h"
66 #include "network-cm-error.h"
69 #define DEPRECATED __attribute__((deprecated))
72 /*==================================================================================================
74 ==================================================================================================*/
76 /*==================================================================================================
78 ==================================================================================================*/
87 /** Open Connection Response Event*/
90 /** Close Connection Response Event*/
93 /** Open connection Indication (auto join) */
96 /** Connection Close Indication Event */
99 /** Network service(profile) state changed Indication Event*/
100 NET_EVENT_NET_STATE_IND,
102 /** Network IP change Indication Event\n
103 * This is deprecated Event and maintained only for compatibility */
104 NET_EVENT_IP_CHANGE_IND,
106 /** Profile modify indication Event\n
107 * This is deprecated Event and maintained only for compatibility */
108 NET_EVENT_PROFILE_MODIFY_IND,
110 /** Network configuration changed Event\n
111 * This is deprecated Event and maintained only for compatibility */
112 NET_EVENT_NET_CONFIGURE_RSP,
114 /* Wi-Fi Specific events */
116 /** Wi-Fi interface Scan Response Event */
117 NET_EVENT_WIFI_SCAN_RSP,
119 /** Wi-Fi interface Scan Indication Event(BG scan) */
120 NET_EVENT_WIFI_SCAN_IND,
122 /** Wi-Fi interface MAC changed Event\n
123 * This is deprecated Event and maintained only for compatibility */
124 NET_EVENT_WIFI_MAC_ID_IND,
126 /** Wi-Fi interface Power On/Off Response Event */
127 NET_EVENT_WIFI_POWER_RSP,
129 /** Wi-Fi interface Power On/Off Indication Event */
130 NET_EVENT_WIFI_POWER_IND,
132 /** Wi-Fi interface WPS Response Event */
133 NET_EVENT_WIFI_WPS_RSP,
142 * \addtogroup common_info
147 * @enum net_cm_network_status_t
148 * This enum indicates network status
152 /** Service unknown */
154 /** Not connected / Suspended / Idle / Connecting/ Disconnecting/ Killing*/
155 NET_STATUS_UNAVAILABLE,
157 NET_STATUS_AVAILABLE,
158 } net_cm_network_status_t;
165 * \addtogroup common_basic
169 /*==================================================================================================
170 STRUCTURES AND OTHER TYPEDEFS
171 ==================================================================================================*/
174 * Event Info with Event on callback
179 /** CM Asynchronous event */
181 /** Profile Identifier corresponding to the event */
182 char ProfileName[NET_PROFILE_NAME_LEN_MAX+1];
185 /** Event data length */
187 /** Event data: Depending on the event, Event Data will be
188 type-casted to the appropriate event info data structure */
192 /*****************************************************************************************/
193 /* Callback function prototype
194 * typedef void (*net_event_cb_t ) ( const net_event_info_t* net_event, void* user_data);
198 * \brief callback function: used to notify client application about Asynchronous events.
199 * This callback function will be called in the Network Client Library(NCL) context.
201 * \par Important Notes:
202 * NCL will allocate the memory for event data.
203 * Once Context will return from callback then NCL will free the memory allocated to event data.
204 * Application is not supposed to free the memory pointed by net_event
206 * \param[out] net_event Pointer to net_event_info_t structure
207 * \param[out] user_data User can transfer the user specific data in callback
209 * \par Description of each event type(net_event->Event) :
211 * - NET_EVENT_OPEN_RSP \n
212 * Response event for (net_open_connection_with_profile(), net_open_connection_with_preference(), net_open_connection_with_wifi_info())
213 * to notify the result of open connection request.
214 * - net_event->ProfileName : Profile Identifier corresponding to the event
215 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
216 * - net_event->Data : Pointer to net_profile_info_t (valid at NET_ERR_NONE, NET_ERR_ACTIVE_CONNECTION_EXISTS)
217 * - If the connection open successfully or already exists for the given profile name,\n
218 * application can get the connected profile information \n
219 * If the connection is failed to establish, net_profile_info_t also contains NULL value
221 * - NET_EVENT_CLOSE_RSP \n
222 * Response event for net_close_connection() to notify the result of close connection request.
223 * - net_event->ProfileName : Profile Identifier corresponding to the event
224 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
225 * - net_event->Data : NULL (not used in this event)
227 * - NET_EVENT_OPEN_IND \n
228 * Indication to notify the activation of a connection by any other application or auto-connection.
229 * - net_event->ProfileName : Profile Identifier corresponding to the event
230 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
231 * - net_event->Data : Pointer to net_profile_info_t
232 * - If NCL can't get profile info from ConnMan, net_profile_info_t contains NULL value
234 * - NET_EVENT_CLOSE_IND \n
235 * Indication to notify the closure of an active connection due to network initiated termination or any other transport connectivity loss.
236 * - net_event->ProfileName : Profile Identifier corresponding to the event
237 * - net_event->Error : Its value will be NET_ERR_NONE always
238 * - net_event->Data : NULL (not used in this event)
240 * - NET_EVENT_NET_STATE_IND \n
241 * Indication to notify that state of each serivce(profile) changed.\n
242 * You can use this event to get more detailed state, but should be used carefully.\n
243 * This event comes from ConnMan daemon via NCL, so you have to understand ConnMan's state.\n
244 * There is no need to handle this event except under special circumstances.
245 * - net_event->ProfileName : Profile Identifier corresponding to the event
246 * - net_event->Error : Its value will be NET_ERR_NONE always
247 * - net_event->Data : Pointer to net_state_type_t
249 * - NET_EVENT_WIFI_SCAN_RSP \n
250 * Response event for net_scan_wifi() to notify the result of scan request.
251 * - net_event->ProfileName : NULL (not used in this event)
252 * - net_event->Error : NET_ERR_NONE on success, negative values for errors
253 * - net_event->Data : NULL (not used in this event)
255 * - NET_EVENT_WIFI_SCAN_IND \n
256 * Indication to notify that BG scan has been completed.
257 * - net_event->ProfileName : NULL (not used in this event)
258 * - net_event->Error : NET_ERR_NONE on success, negative values for errors
259 * - net_event->Data : NULL (not used in this event)
261 * - NET_EVENT_WIFI_POWER_RSP \n
262 * Response event for (net_wifi_power_on(), net_wifi_power_off()) to notify the result of Wi-Fi power on request.
263 * - net_event->ProfileName : NULL (not used in this event)
264 * - net_event->Error : NET_ERR_NONE on success, negative values for errors
265 * - net_event->Data : Pointer to net_wifi_state_t (only WIFI_OFF/WIFI_ON/WIFI_UNKNOWN will be set)
267 * - NET_EVENT_WIFI_POWER_IND \n
268 * Indication to notify that Wi-Fi power state has been changed.
269 * - net_event->ProfileName : NULL (not used in this event)
270 * - net_event->Error : NET_ERR_NONE on success, negative values for errors
271 * - net_event->Data : Pointer to net_wifi_state_t (only WIFI_OFF/WIFI_ON/WIFI_UNKNOWN will be set)
273 * - NET_EVENT_WIFI_WPS_RSP \n
274 * Response event for net_wifi_enroll_wps() to notify the result of enroll wps request.
275 * - net_event->ProfileName : Profile Identifier corresponding to the event
276 * - net_event->Error : Its value will be NET_ERR_NONE in case of success and error cause in case of failure
277 * - net_event->Data : Pointer to net_profile_info_t
278 * - If the connection open successfully, application can get the connected profile information \n
279 * If the connection is failed to establish, net_profile_info_t also contains NULL value
283 typedef void (*net_event_cb_t ) ( const net_event_info_t* net_event, void* user_data);
285 /*==================================================================================================
287 ==================================================================================================*/
289 /*****************************************************************************************/
290 /* net_register_client API function prototype
291 * int net_register_client(net_event_cb_t event_cb, void *user_data);
295 * \brief This API shall register the client application with the ConnMan.
297 * \par Sync (or) Async:
298 * This is a Synchronous API.
300 * \par Important Notes:
301 * It is mandatory for the client application to register with ConnMan with this API before using any of its services.\n
302 * The value of event_cb cannot be NULL. Otherwise, error NET_ERR_INVALID_PARAM will be returned by the API.\n
303 * All the Asynchronous Events from ConnMan will be sent to the client App through the callback function (event_cb) registered with this API.
308 * \param[in] event_cb Application Callback function pointer to receive ConnMan events
309 * \param[in] user_data user data
311 * \par Async Response Message:
316 * \return Return Type (int) \n
317 * - NET_ERR_NONE - indicating that the operation has completed successfully.\n
318 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
319 * - NET_ERR_APP_ALREADY_REGISTERED - indicating that client application is already registered,it can't be registered again.\n
320 * - NET_ERR_UNKNOWN - indicating that registration has failed.\n
322 * \par Prospective Clients:
325 * \par Example Program:
329 * result = net_register_client(event_cb , user_data);
331 * if(result == NET_ERR_NONE).........
335 ******************************************************************************************/
336 int net_register_client(net_event_cb_t event_cb, void *user_data);
338 /*****************************************************************************************/
339 /* net_deregister_client API function prototype
340 * int net_deregister_client(void);
344 * \brief This API shall deregister the client application with the ConnMan.
346 * \par Sync (or) Async:
347 * This is a Synchronous API.
349 * \par Important Notes:
350 * After deregistration, Application will be restricted from using other ConnMan APIs/Services.\n
351 * De-register is not allowed when any connection is in active or transition state (activation or deactivation in progress).
357 * \par Async Response Message:
361 * Application must already be registered with the ConnMan.
363 * \return Return Type (int) \n
364 * - NET_ERR_NONE - indicating that the operation has completed successfully. \n
365 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
366 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
369 * \par Prospective Clients:
372 * \par Example Program:
376 * result = net_deregister_client();
378 * if(result == NET_ERR_NONE).........
382 ******************************************************************************************/
383 int net_deregister_client(void);
385 /*****************************************************************************************/
386 /* net_open_connection_with_profile API function prototype
387 * int net_open_connection_with_profile(const char *profile_name);
391 * \brief This API will establish a data connection with specific profile name
393 * \par Sync (or) Async:
394 * This is an Asynchronous API.
396 * \par Important Notes:
397 * This API is a Non-Blocking API. Return value only implies whether the request is sent successfully or not. \n
398 * Return value Success does not imply that the connection is established successfully. \n
399 * If application needs to make a connection with specific profile name, it can make a connection with this api. \n
400 * Get the profile name is referred to net_get_profile_list(). \n
401 * If Connection is already existed, this API will share the active connection with the calling application. \n
402 * If Connection is already existed, and same application is trying to open connection, this API will return error.
406 * ConnMan requests transport plug-in interface to open a new connection only if connection is not already established. \n
407 * If there is already a connection , then same connection will be shared.
412 * \param [in] profile_name specific profile name
414 * \par Async Response Message:
415 * NET_EVENT_OPEN_RSP: Connection Establishment response will be sent asynchronously to the App in the callback function registered.\n
416 * refer to net_event_cb_t()
419 * Application must already be registered with the ConnMan.
421 * \return Return Type (int) \n
422 * - NET_ERR_NONE - indicating that the operation has completed successfully. \n
423 * - NET_ERR_APP_NOT_REGISTERED -indicating that client is not registered with CM and it cannot use CM services.\n
424 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
425 * - NET_ERR_INVALID_OPERATION - indicating that open connection operation is not allowed in the current state.\n
426 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
429 * \par Prospective Clients:
432 * \par Example Program:
436 * result = net_open_connection_with_profile(profile_name);
438 * if(result == NET_ERR_NONE)......
442 ******************************************************************************************/
443 int net_open_connection_with_profile(const char *profile_name);
445 /*****************************************************************************************/
446 /* net_open_connection_with_preference API function prototype
447 * int net_open_connection_with_preference(net_service_type_t service_type);
451 * \brief This API will establish a data connection with specific service type
453 * \par Sync (or) Async:
454 * This is an Asynchronous API.
456 * \par Important Notes:
457 * This API is a Non-Blocking API. Return value only implies whether the request is sent successfully or not. \n
458 * Return value Success does not imply that the connection is established successfully. \n
459 * If application needs to make a connection with specific service type, it can make a connection with this api. \n
460 * If Connection is already existed, this API will share the active connection with the calling application. \n
461 * If Connection is already exited, and same application is trying to open connection, this API will return error.
465 * ConnMan requests transport plug-in interface to open a new connection only if connection is not already established. \n
466 * If there is already a connection , then same connection will be shared.
471 * \param [in] service_type specific service type
473 * \par Async Response Message:
474 * NET_EVENT_OPEN_RSP: Connection Establishment response will be sent asynchronously to the App in the callback function registered.\n
475 * refer to net_event_cb_t()
478 * Application must already be registered with the ConnMan.
480 * \return Return Type (int) \n
481 * - NET_ERR_NONE - indicating that the operation has completed successfully. \n
482 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
483 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
484 * - NET_ERR_INVALID_OPERATION - indicating that open connection operation is not allowed in the current state.\n
485 * - NET_ERR_NO_SERVICE - indicating that service is not found.\n
486 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
489 * \par Prospective Clients:
492 * \par Example Program:
496 * result = net_open_connection_with_preference(service_type);
498 * if(result == NET_ERR_NONE)......
502 ******************************************************************************************/
503 int net_open_connection_with_preference(net_service_type_t service_type);
505 /*****************************************************************************************/
506 /* net_close_connection API function prototype
507 * int net_close_connection(const char *profile_name);
511 * \brief This API will terminate the connection. This API can also be used to abort a connection in progress.
513 * \par Sync (or) Async:
514 * This is an Asynchronous API.
516 * \par Important Notes:
517 * 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
523 * Application must be already registered with the ConnMan. \n
525 * \param [in] profile_name specific profile name
527 * \par Async Response Message:
528 * NET_EVENT_CLOSE_RSP: Connection Close response will be sent asynchronously to the App in the callback function registered\n
529 * refer to net_event_cb_t()
532 * Application must have an active data connection
534 * \return Return Type (int) \n
535 * - NET_ERR_NONE - indicating that the operation has completed successfully. \n
536 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
537 * - NET_ERR_INVALID_OPERATION - indicating that close connection operation is not allowed in the current state.\n
538 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
540 * \par Prospective Clients:
543 * \par Example Program:
547 * result = net_close_connection(profile_name);
549 * if(result == NET_ERR_NONE).........
553 ******************************************************************************************/
554 int net_close_connection(const char *profile_name);
561 * \addtogroup common_info
565 /*****************************************************************************************/
566 /* net_get_active_net_info API function prototype
567 * int net_get_active_net_info(net_profile_info_t *active_profile_info);
571 * \brief This API returns the information of active(default) network profile.
573 * \par Sync (or) Async:
574 * This is a Synchronous API.
576 * \par Important Notes:
577 * On success, profile information shall be copied to active_profile_info parameter in net_profile_info_t format.
585 * \param[out] active_profile_info The information of active(default) network profile.
587 * \par Async Response Message:
591 * Application must already be registered with the CM server.
593 * \return Return Type (int) \n
594 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
595 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
596 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
597 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
598 * - NET_ERR_NO_SERVICE - indicating that there is no active network.\n
600 * \par Prospective Clients:
603 * \par Example Program:
605 * net_profile_info_t active_profile_info;
607 * int result = net_get_active_net_info(&active_profile_info);
609 * if(result == NET_ERR_NONE)......
613 ******************************************************************************************/
614 int net_get_active_net_info(net_profile_info_t *active_profile_info);
616 /*****************************************************************************************/
618 * \brief This API returns ip address of active(default) network profile.
620 * \par Sync (or) Async:
621 * These is a Synchronous API.
623 * \par Important Notes:
624 * On success, the information shall be copied to the parameter in each format.
626 * \param[out] ip_address ip address of active(default) network profile.
629 * Application must already be registered with the CM server.
631 * \return Return Type (int) \n
632 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
633 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
634 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
635 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
636 * - NET_ERR_NO_SERVICE - indicating that there is no active network.\n
638 * \par Prospective Clients:
641 * \par Example Program:
643 * net_addr_t ip_address;
645 * int result = net_get_active_ipaddress(&ip_address);
647 * if(result == NET_ERR_NONE)......
649 ******************************************************************************************/
650 int net_get_active_ipaddress(net_addr_t *ip_address);
652 /*****************************************************************************************/
654 * \brief This API returns netmask address of active(default) network profile.
656 * \par Sync (or) Async:
657 * These is a Synchronous API.
659 * \par Important Notes:
660 * On success, the information shall be copied to the parameter in each format.
662 * \param[out] netmask netmask address of active(default) network profile.
665 * Application must already be registered with the CM server.
667 * \return Return Type (int) \n
668 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
669 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
670 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
671 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
672 * - NET_ERR_NO_SERVICE - indicating that there is no active network.\n
674 * \par Prospective Clients:
677 * \par Example Program:
679 * net_addr_t netmask;
681 * int result = net_get_active_netmask(&netmask);
683 * if(result == NET_ERR_NONE)......
685 ******************************************************************************************/
686 int net_get_active_netmask(net_addr_t *netmask);
688 /*****************************************************************************************/
690 * \brief This API returns gateway address of active(default) network profile.
692 * \par Sync (or) Async:
693 * These is a Synchronous API.
695 * \par Important Notes:
696 * On success, the information shall be copied to the parameter in each format.
698 * \param[out] gateway gateway address of active(default) network profile.
701 * Application must already be registered with the CM server.
703 * \return Return Type (int) \n
704 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
705 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
706 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
707 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
708 * - NET_ERR_NO_SERVICE - indicating that there is no active network.\n
710 * \par Prospective Clients:
713 * \par Example Program:
715 * net_addr_t gateway;
717 * int result = net_get_active_gateway(&gateway);
719 * if(result == NET_ERR_NONE)......
721 ******************************************************************************************/
722 int net_get_active_gateway(net_addr_t *gateway);
724 /*****************************************************************************************/
726 * \brief This API returns DNS address of active(default) network profile.
728 * \par Sync (or) Async:
729 * These is a Synchronous API.
731 * \par Important Notes:
732 * On success, the information shall be copied to the parameter in each format.
734 * \param[out] dns DNS address of active(default) network profile.
737 * Application must already be registered with the CM server.
739 * \return Return Type (int) \n
740 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
741 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
742 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
743 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
744 * - NET_ERR_NO_SERVICE - indicating that there is no active network.\n
746 * \par Prospective Clients:
749 * \par Example Program:
753 * int result = net_get_active_dns(&dns);
755 * if(result == NET_ERR_NONE)......
757 ******************************************************************************************/
758 int net_get_active_dns(net_addr_t *dns);
760 /*****************************************************************************************/
762 * \brief This API returns ESSID of active(default) network profile.
764 * \par Sync (or) Async:
765 * These is a Synchronous API.
767 * \par Important Notes:
768 * On success, the information shall be copied to the parameter in each format.
770 * \param[out] essid ESSID of active(default) network profile.
773 * Application must already be registered with the CM server and wifi is connected.
775 * \return Return Type (int) \n
776 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
777 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
778 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
779 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
780 * - NET_ERR_NO_SERVICE - indicating that there is no active network.\n
782 * \par Prospective Clients:
785 * \par Example Program:
789 * int result = net_get_active_essid(&essid);
791 * if(result == NET_ERR_NONE)......
793 ******************************************************************************************/
794 int net_get_active_essid(net_essid_t *essid);
796 /*****************************************************************************************/
798 * \brief This API returns proxy string of active(default) network profile.
800 * \par Sync (or) Async:
801 * These is a Synchronous API.
803 * \par Important Notes:
804 * On success, the information shall be copied to the parameter in each format.
806 * \param[out] proxy proxy string of active(default) network profile.
809 * Application must already be registered with the CM server.
811 * \return Return Type (int) \n
812 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
813 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
814 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
815 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
816 * - NET_ERR_NO_SERVICE - indicating that there is no active network.\n
818 * \par Prospective Clients:
821 * \par Example Program:
825 * int result = net_get_active_proxy(&proxy);
827 * if(result == NET_ERR_NONE)......
829 ******************************************************************************************/
830 int net_get_active_proxy(net_proxy_t *proxy);
832 /*****************************************************************************************/
833 /* net_get_network_status API function prototype
834 * int net_get_network_status(net_device_t device_type, net_cm_network_status_t* network_status);
838 * \brief This API returns The status of a specific network interface passed as a parameter.
840 * \par Sync (or) Async:
841 * This is a Synchronous API.
843 * \par Important Notes:
852 * \param[in] device_type Queried network interface.
853 * \param[out] network_status The status of Queried network interface.
855 * \par Async Response Message:
859 * Application must already be registered with the CM server.
861 * \return Return Type (int) \n
862 * - NET_ERR_NONE - indicating that the status of queried network interface is retrieved. \n
863 * - NET_ERR_APP_NOT_REGISTERED - indicating that client is not registered with CM and it cannot use CM services.\n
864 * - NET_ERR_UNKNOWN - indicating that an unknown error has occurred.\n
865 * - NET_ERR_INVALID_PARAM - indicating that API parameter value is invalid.\n
867 * \par Prospective Clients:
870 * \par Example Program:
872 * net_cm_network_status_t status;
874 * int result = net_get_network_status(NET_MOBILE_TYPE, &status);
876 * if(result == TRUE)......
880 ******************************************************************************************/
881 int net_get_network_status(net_device_t device_type, net_cm_network_status_t* network_status);
883 /*****************************************************************************************/
884 /* net_is_connected API function prototype
885 * int net_is_connected(void);
889 * \brief This API returns the connection status of process
891 * \par Sync (or) Async:
892 * This is a Synchronous API.
894 * \par Important Notes:
904 * \par Async Response Message:
908 * Application must already be registered with the CM server.
910 * \return Return Type (int) \n
912 * - 0 - not connected
914 * \par Prospective Clients:
917 * \par Example Program:
919 * int result = net_is_connected();
921 * if(result == 1)......
925 ******************************************************************************************/
926 int net_is_connected(void);
934 #endif /* __cplusplus */