Tizen Native API
5.5
|
The Network Monitoring API provides functions for getting connections.
#include <inm.h>
This set of functions is used to get network state, get connection handles. To use This kind of APIs, You should create a inm handle using inm_initialize(). You should destroy the created inm handle if you do not need it anymore.
This API is related with the following features:
Functions | |
int | inm_set_cellular_state_changed_cb (inm_h inm, inm_cellular_state_changed_cb callback, void *user_data) |
Sets a callback called when the cellular state is changed. | |
int | inm_unset_cellular_state_changed_cb (inm_h inm) |
Unsets the callback called when the cellular state is changed. | |
int | inm_get_cellular_state (inm_h inm, inm_cellular_state_e *state) |
Gets the state of the cellular connection. | |
int | inm_set_wifi_state_changed_cb (inm_h inm, inm_wifi_state_changed_cb callback, void *user_data) |
Sets a callback called when the Wi-Fi state is changed. | |
int | inm_unset_wifi_state_changed_cb (inm_h inm) |
Unsets the callback called when the Wi-Fi state is changed. | |
int | inm_get_wifi_state (inm_h inm, inm_wifi_state_e *state) |
Gets the state of the Wi-Fi. | |
int | inm_set_ethernet_state_changed_cb (inm_h inm, inm_ethernet_state_changed_cb callback, void *user_data) |
Sets a callback called when the ethernet state is changed. | |
int | inm_unset_ethernet_state_changed_cb (inm_h inm) |
Unsets the callback called when the ethernet state is changed. | |
int | inm_get_ethernet_state (inm_h inm, inm_ethernet_state_e *state) |
Gets the state of the ethernet. | |
int | inm_get_current_connection (inm_h inm, inm_connection_h *connection) |
Gets the handle of the default connection. | |
int | inm_connection_destroy (inm_connection_h *connection) |
Destroys a connection handle. | |
int | inm_connection_clone (inm_connection_h *cloned, inm_connection_h origin) |
Clones a connection handle. | |
int | inm_get_connection_iterator (inm_h inm, inm_connection_iterator_h *connection_iterator) |
Gets a connections iterator. | |
int | inm_connection_iterator_next (inm_connection_iterator_h connection_iterator, inm_connection_h *connection) |
Moves the connection iterator to the next position and gets a connection handle. | |
int | inm_destroy_connection_iterator (inm_connection_iterator_h connection_iterator) |
Destroys a connections iterator. | |
int | inm_foreach_link (inm_h inm, inm_link_cb callback, void *user_data) |
Gets handles of the link. | |
int | inm_refresh_links (inm_h inm) |
Refreshes link information held by a handle. | |
int | inm_arp_request_set_packet_interval (inm_h inm, int seconds) |
Sets the ARP packet interval which is used to find targets IP on local network. | |
int | inm_arp_request_get_packet_interval (inm_h inm, int *seconds) |
Gets the ARP packet interval which is used to find targets IP on local network. | |
int | inm_arp_request_start (inm_h inm, const char *target_ip, inm_arp_request_ip_found_cb callback, void *user_data) |
Starts to send ARP packets to find a target_ip. | |
int | inm_arp_request_stop (inm_h inm, const char *target_ip) |
Stops sending ARP packets. | |
int | inm_default_gateway_start_checking (inm_h inm, int timeout, inm_default_gateway_found_cb callback, void *user_data) |
Starts to send ARP packets to find gateway during timeout, in seconds. | |
int | inm_default_gateway_stop_checking (inm_h inm) |
Stops sending ARP packets to check default gateway. | |
int | inm_default_dns_lookup_check (inm_h inm, inm_default_dns_lookup_result_cb callback, void *user_data) |
Checks DNS lookup of the target to check whether DNS server is valid or not. | |
int | inm_reachable_urls_add_url_to_check (inm_h inm, const char *url) |
Adds URL to check reachability by inm_start_checking_reachable_urls() with type INM_URL_LIST_TYPE_USER. | |
int | inm_reachable_urls_remove_url_to_check (inm_h inm, const char *url) |
Removes URL to check reachability by inm_start_checking_reachable_urls() with type INM_URL_LIST_TYPE_USER. | |
int | inm_reachable_urls_start_checking (inm_h inm, inm_url_list_type_e type, inm_reachable_urls_check_result_cb callback, void *user_data) |
Starts to send HTTP GET requests with curl to check reachability of URLs of the given type. | |
int | inm_reachable_urls_stop_checking (inm_h inm, inm_url_list_type_e type) |
Stops sending HTTP GET requests with curl to check reachability of URLs of the given type. | |
int | inm_reachable_urls_is_check_running (inm_h inm, inm_url_list_type_e type, bool *is_running) |
Gets whether the reachable URLs check is running or not. | |
Typedefs | |
typedef void(* | inm_cellular_state_changed_cb )(inm_cellular_state_e state, void *user_data) |
Called when the cellular state is changed. | |
typedef void(* | inm_wifi_state_changed_cb )(inm_wifi_state_e state, void *user_data) |
Called when the Wi-Fi state is changed. | |
typedef void(* | inm_ethernet_state_changed_cb )(inm_ethernet_state_e state, void *user_data) |
Called when the ethernet state is changed. | |
typedef bool(* | inm_link_cb )(inm_link_h link, void *user_data) |
Called with a link handle. | |
typedef void(* | inm_arp_request_ip_found_cb )(bool found, const char *ip, void *user_data) |
Called when the IP is found on a local network. | |
typedef void(* | inm_default_gateway_found_cb )(bool found, const char *gateway_ip, void *user_data) |
Called when the gateway IP is found on a local network by sending ARP packets. | |
typedef void(* | inm_default_dns_lookup_result_cb )(bool found, void *user_data) |
Called when the DNS lookup result is received. | |
typedef void(* | inm_reachable_urls_check_result_cb )(inm_reachable_urls_check_result_e result, const char *url, void *user_data) |
Called when the URL responds to HTTP GET generated by curl. |
typedef void(* inm_arp_request_ip_found_cb)(bool found, const char *ip, void *user_data) |
Called when the IP is found on a local network.
[in] | found | true if IP is found, false if ip IP not found |
[in] | ip | The IP address found on a local network |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* inm_cellular_state_changed_cb)(inm_cellular_state_e state, void *user_data) |
Called when the cellular state is changed.
[in] | state | The cellular state |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* inm_default_dns_lookup_result_cb)(bool found, void *user_data) |
Called when the DNS lookup result is received.
[in] | found | true if DNS lookup succeeded, false if DNS lookup failed |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* inm_default_gateway_found_cb)(bool found, const char *gateway_ip, void *user_data) |
Called when the gateway IP is found on a local network by sending ARP packets.
[in] | found | true if gateway IP address is found, false if gateway IP address isn't found after timeout |
[in] | gateway_ip | The gateway IP address found on a local network |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* inm_ethernet_state_changed_cb)(inm_ethernet_state_e state, void *user_data) |
Called when the ethernet state is changed.
[in] | state | The ethernet state |
[in] | user_data | The user data passed from the callback registration function |
typedef bool(* inm_link_cb)(inm_link_h link, void *user_data) |
Called with a link handle.
[in] | link | The link handle |
[in] | user_data | The user data passed from foreach function |
true
to continue with the next iteration of the loop, false
to break out of the loop typedef void(* inm_reachable_urls_check_result_cb)(inm_reachable_urls_check_result_e result, const char *url, void *user_data) |
Called when the URL responds to HTTP GET generated by curl.
[in] | result | The enumeration value to describe the result. |
[in] | url | The URL responses to HTTP GET generated by curl |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* inm_wifi_state_changed_cb)(inm_wifi_state_e state, void *user_data) |
Called when the Wi-Fi state is changed.
[in] | state | The Wi-Fi state |
[in] | user_data | The user data passed from the callback registration function |
enum inm_cellular_state_e |
enum inm_ethernet_state_e |
Enumeration for result of checking URL callback.
enum inm_url_list_type_e |
enum inm_wifi_state_e |
int inm_arp_request_get_packet_interval | ( | inm_h | inm, |
int * | seconds | ||
) |
Gets the ARP packet interval which is used to find targets IP on local network.
[in] | inm | The monitoring handle |
[out] | seconds | The ARP packet interval value in seconds |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_arp_request_set_packet_interval | ( | inm_h | inm, |
int | seconds | ||
) |
Sets the ARP packet interval which is used to find targets IP on local network.
[in] | inm | The monitoring handle |
[in] | seconds | The ARP packet interval value in seconds |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
INM_ERROR_NOW_IN_PROGRESS | Now in progress |
int inm_arp_request_start | ( | inm_h | inm, |
const char * | target_ip, | ||
inm_arp_request_ip_found_cb | callback, | ||
void * | user_data | ||
) |
Starts to send ARP packets to find a target_ip.
User should set callback to get results by inm_arp_request_ip_found_cb()
[in] | inm | The monitoring handle |
[in] | target_ip | IP address to find |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
INM_ERROR_NOW_IN_PROGRESS | Now in progress |
int inm_arp_request_stop | ( | inm_h | inm, |
const char * | target_ip | ||
) |
Stops sending ARP packets.
[in] | inm | The monitoring handle |
[in] | target_ip | IP address to stop finding |
INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
INM_ERROR_NOW_IN_PROGRESS | Now in progress |
int inm_connection_clone | ( | inm_connection_h * | cloned, |
inm_connection_h | origin | ||
) |
Clones a connection handle.
[out] | cloned | The handle of the cloned connection |
[in] | origin | The handle of the origin connection |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_OUT_OF_MEMORY | Out of memory |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_connection_destroy | ( | inm_connection_h * | connection | ) |
Destroys a connection handle.
[out] | connection | The connection handle |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_connection_iterator_next | ( | inm_connection_iterator_h | connection_iterator, |
inm_connection_h * | connection | ||
) |
Moves the connection iterator to the next position and gets a connection handle.
[in] | connection_iterator | The connection iterator |
[out] | connection | The connection handle |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_default_dns_lookup_check | ( | inm_h | inm, |
inm_default_dns_lookup_result_cb | callback, | ||
void * | user_data | ||
) |
Checks DNS lookup of the target to check whether DNS server is valid or not.
[in] | inm | The monitoring handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
INM_ERROR_NOW_IN_PROGRESS | Now in progress |
int inm_default_gateway_start_checking | ( | inm_h | inm, |
int | timeout, | ||
inm_default_gateway_found_cb | callback, | ||
void * | user_data | ||
) |
Starts to send ARP packets to find gateway during timeout, in seconds.
[in] | inm | The monitoring handle |
[in] | timeout | Specifies the duration of discovery period, in seconds. If 0 , then there is no limit on how long the discovery takes. |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
INM_ERROR_NOW_IN_PROGRESS | Now in progress |
int inm_default_gateway_stop_checking | ( | inm_h | inm | ) |
Stops sending ARP packets to check default gateway.
[in] | inm | The monitoring handle |
INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
INM_ERROR_NOW_IN_PROGRESS | Now in progress |
int inm_destroy_connection_iterator | ( | inm_connection_iterator_h | connection_iterator | ) |
Destroys a connections iterator.
[in] | connection_iterator | The connection iterator |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
int inm_foreach_link | ( | inm_h | inm, |
inm_link_cb | callback, | ||
void * | user_data | ||
) |
Gets handles of the link.
[in] | inm | The inm handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_OUT_OF_MEMORY | Out of memory |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_get_cellular_state | ( | inm_h | inm, |
inm_cellular_state_e * | state | ||
) |
Gets the state of the cellular connection.
The returned state is for the cellular connection state.
[in] | inm | The inm handle |
[out] | state | The state of the cellular connection |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_get_connection_iterator | ( | inm_h | inm, |
inm_connection_iterator_h * | connection_iterator | ||
) |
Gets a connections iterator.
[in] | inm | The inm handle |
[out] | connection_iterator | The iterator of connection |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_OUT_OF_MEMORY | Out of memory |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_get_current_connection | ( | inm_h | inm, |
inm_connection_h * | connection | ||
) |
Gets the handle of the default connection.
[in] | inm | The inm handle |
[out] | connection | The connection handle |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_OUT_OF_MEMORY | Out of memory |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_get_ethernet_state | ( | inm_h | inm, |
inm_ethernet_state_e * | state | ||
) |
Gets the state of the ethernet.
The returned state is for the ethernet connection state.
[in] | inm | The inm handle |
[out] | state | The state of ethernet connection |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_get_wifi_state | ( | inm_h | inm, |
inm_wifi_state_e * | state | ||
) |
Gets the state of the Wi-Fi.
The returned state is for the Wi-Fi connection state.
[in] | inm | The inm handle |
[out] | state | The state of Wi-Fi connection |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_reachable_urls_add_url_to_check | ( | inm_h | inm, |
const char * | url | ||
) |
Adds URL to check reachability by inm_start_checking_reachable_urls() with type INM_URL_LIST_TYPE_USER.
[in] | inm | The monitoring handle |
[in] | url | The URL to check reachability |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_reachable_urls_is_check_running | ( | inm_h | inm, |
inm_url_list_type_e | type, | ||
bool * | is_running | ||
) |
Gets whether the reachable URLs check is running or not.
[in] | inm | The monitoring handle |
[in] | type | URL type to check |
[out] | is_running | checking URL is running or not |
INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_reachable_urls_remove_url_to_check | ( | inm_h | inm, |
const char * | url | ||
) |
Removes URL to check reachability by inm_start_checking_reachable_urls() with type INM_URL_LIST_TYPE_USER.
[in] | inm | The monitoring handle |
[in] | url | The URL to check reachability |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_reachable_urls_start_checking | ( | inm_h | inm, |
inm_url_list_type_e | type, | ||
inm_reachable_urls_check_result_cb | callback, | ||
void * | user_data | ||
) |
Starts to send HTTP GET requests with curl to check reachability of URLs of the given type.
This function just checks if URLs in the list can be reachable once. If you want to check again, you need to call this function again with the target URL list.
[in] | inm | The monitoring handle |
[in] | type | URL type to check. For INM_URL_LIST_TYPE_DEFAULT, the platform checks the reachability of "tizen.org". For INM_URL_LIST_TYPE_USER, the platform checks the reachability of URLs added by inm_add_url_to_check() |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
INM_ERROR_NOW_IN_PROGRESS | Now in progress |
int inm_reachable_urls_stop_checking | ( | inm_h | inm, |
inm_url_list_type_e | type | ||
) |
Stops sending HTTP GET requests with curl to check reachability of URLs of the given type.
[in] | inm | The monitoring handle |
[in] | type | The URL type to check |
INM_ERROR_NONE | Successful |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_refresh_links | ( | inm_h | inm | ) |
Refreshes link information held by a handle.
[in] | inm | The inm handle |
0
on success, otherwise a negative error value INM_ERROR_NONE | Successful |
INM_ERROR_OUT_OF_MEMORY | Out of memory |
INM_ERROR_PERMISSION_DENIED | Permission Denied |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_set_cellular_state_changed_cb | ( | inm_h | inm, |
inm_cellular_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback called when the cellular state is changed.
[in] | inm | The monitor handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
0
on success, otherwise negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_set_ethernet_state_changed_cb | ( | inm_h | inm, |
inm_ethernet_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback called when the ethernet state is changed.
[in] | inm | The monitor handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
0
on success, otherwise negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_set_wifi_state_changed_cb | ( | inm_h | inm, |
inm_wifi_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback called when the Wi-Fi state is changed.
[in] | inm | The monitor handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
0
on success, otherwise negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_unset_cellular_state_changed_cb | ( | inm_h | inm | ) |
Unsets the callback called when the cellular state is changed.
[in] | inm | The monitor handle |
0
on success, otherwise negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_unset_ethernet_state_changed_cb | ( | inm_h | inm | ) |
Unsets the callback called when the ethernet state is changed.
[in] | inm | The monitor handle |
0
on success, otherwise negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |
int inm_unset_wifi_state_changed_cb | ( | inm_h | inm | ) |
Unsets the callback called when the Wi-Fi state is changed.
[in] | inm | The monitor handle |
0
on success, otherwise negative error value INM_ERROR_NONE | Successful |
INM_ERROR_INVALID_PARAMETER | Invalid parameter |
INM_ERROR_NOT_SUPPORTED | Not supported |
INM_ERROR_NOT_INITIALIZED | Not initialized |
INM_ERROR_OPERATION_FAILED | Operation failed |