Soletta™ Framework
|
Routines to manage connections. More...
#include <stdbool.h>
#include <stdint.h>
#include <sol-network.h>
#include <sol-buffer.h>
#include <sol-vector.h>
Go to the source code of this file.
Data Structures | |
struct | sol_netctl_agent |
agent callback functions More... | |
struct | sol_netctl_agent_input |
agent input struct More... | |
struct | sol_netctl_ethernet |
struct to represent a network ethernet. More... | |
struct | sol_netctl_network_params |
network params More... | |
struct | sol_netctl_provider |
struct to represent a network provider. More... | |
struct | sol_netctl_proxy |
struct to represent a network proxy. More... | |
Macros | |
#define | SOL_NETCTL_AGENT_API_VERSION (1) |
#define | SOL_NETCTL_AGENT_IDENTITY "Identity" |
the agent input identity type string More... | |
#define | SOL_NETCTL_AGENT_INPUT_API_VERSION (1) |
#define | SOL_NETCTL_AGENT_NAME "Name" |
the agent input name type string More... | |
#define | SOL_NETCTL_AGENT_PASSPHRASE "Passphrase" |
the agent input passphrase type string More... | |
#define | SOL_NETCTL_AGENT_PASSWORD "Password" |
the agent input password type string More... | |
#define | SOL_NETCTL_AGENT_USERNAME "Username" |
the agent input username type string More... | |
#define | SOL_NETCTL_AGENT_WPS "WPS" |
the agent input WPS type string More... | |
#define | SOL_NETCTL_ETHERNET_API_VERSION (1) |
#define | SOL_NETCTL_NETWORK_PARAMS_API_VERSION (1) |
#define | SOL_NETCTL_PROVIDER_API_VERSION (1) |
#define | SOL_NETCTL_PROXY_API_VERSION (1) |
#define | SOL_NETCTL_SERVICE_TYPE_BLUETOOTH "bluetooth" |
bluetooth service type string More... | |
#define | SOL_NETCTL_SERVICE_TYPE_CELLULAR "cellular" |
bluetooth service type string More... | |
#define | SOL_NETCTL_SERVICE_TYPE_ETHERNET "ethernet" |
ethernet service type string More... | |
#define | SOL_NETCTL_SERVICE_TYPE_GADGET "gadget" |
gadget service type string More... | |
#define | SOL_NETCTL_SERVICE_TYPE_GPS "gps" |
gps service type string More... | |
#define | SOL_NETCTL_SERVICE_TYPE_P2P "p2p" |
p2p service type string More... | |
#define | SOL_NETCTL_SERVICE_TYPE_VPN "vpn" |
vpn service type string More... | |
#define | SOL_NETCTL_SERVICE_TYPE_WIFI "wifi" |
wifi service type string More... | |
Typedefs | |
typedef struct sol_netctl_agent | sol_netctl_agent |
agent callback functions More... | |
typedef struct sol_netctl_agent_input | sol_netctl_agent_input |
agent input struct More... | |
typedef void(* | sol_netctl_error_monitor_cb )(void *data, const struct sol_netctl_service *service, unsigned int error) |
error monitor callback used to inform a call result More... | |
typedef struct sol_netctl_ethernet | sol_netctl_ethernet |
struct to represent a network ethernet. More... | |
typedef void(* | sol_netctl_manager_monitor_cb )(void *data) |
Manager monitor callback used to inform a manager updated. More... | |
typedef struct sol_netctl_network_params | sol_netctl_network_params |
network params More... | |
typedef struct sol_netctl_provider | sol_netctl_provider |
struct to represent a network provider. More... | |
typedef struct sol_netctl_proxy | sol_netctl_proxy |
struct to represent a network proxy. More... | |
typedef struct sol_netctl_service | sol_netctl_service |
service struct More... | |
typedef void(* | sol_netctl_service_monitor_cb )(void *data, const struct sol_netctl_service *service) |
Service monitor callback used to inform a service changed. More... | |
Enumerations | |
enum | sol_netctl_proxy_method { SOL_NETCTL_PROXY_METHOD_DIRECT, SOL_NETCTL_PROXY_METHOD_AUTO, SOL_NETCTL_PROXY_METHOD_MANUAL } |
method of proxy generated for a network link. More... | |
enum | sol_netctl_service_state { SOL_NETCTL_SERVICE_STATE_UNKNOWN = 0, SOL_NETCTL_SERVICE_STATE_IDLE, SOL_NETCTL_SERVICE_STATE_ASSOCIATION, SOL_NETCTL_SERVICE_STATE_CONFIGURATION, SOL_NETCTL_SERVICE_STATE_READY, SOL_NETCTL_SERVICE_STATE_ONLINE, SOL_NETCTL_SERVICE_STATE_DISCONNECT, SOL_NETCTL_SERVICE_STATE_FAILURE, SOL_NETCTL_SERVICE_STATE_REMOVE } |
service state More... | |
enum | sol_netctl_state { SOL_NETCTL_STATE_UNKNOWN = 0, SOL_NETCTL_STATE_IDLE, SOL_NETCTL_STATE_READY, SOL_NETCTL_STATE_ONLINE, SOL_NETCTL_STATE_OFFLINE } |
the global connection state of system More... | |
Functions | |
int | sol_netctl_add_error_monitor (sol_netctl_error_monitor_cb cb, const void *data) |
Adds a monitor for the call error happens. More... | |
int | sol_netctl_add_manager_monitor (sol_netctl_manager_monitor_cb cb, const void *data) |
Adds a monitor for the updated netctl manager properties. More... | |
int | sol_netctl_add_service_monitor (sol_netctl_service_monitor_cb cb, const void *data) |
Adds a monitor for the updated netctl services. More... | |
int | sol_netctl_del_error_monitor (sol_netctl_error_monitor_cb cb, const void *data) |
Dels a monitor for the call error happens. More... | |
int | sol_netctl_del_manager_monitor (sol_netctl_manager_monitor_cb cb, const void *data) |
Dels a monitor for the updated netctl manager properties. More... | |
int | sol_netctl_del_service_monitor (sol_netctl_service_monitor_cb cb, const void *data) |
Dels a monitor for the updated netctl services. More... | |
static struct sol_netctl_service * | sol_netctl_find_service_by_name (const char *service_name) |
get so_netctl_service struct from serivce name. More... | |
bool | sol_netctl_get_radios_offline (void) |
Gets the global connection state of offline. More... | |
const struct sol_ptr_vector * | sol_netctl_get_services (void) |
Gets the netctl services. More... | |
enum sol_netctl_state | sol_netctl_get_state (void) |
Gets the global connection state of system. More... | |
int | sol_netctl_register_agent (const struct sol_netctl_agent *agent, const void *data) |
register a agent for network connection More... | |
int | sol_netctl_request_input (struct sol_netctl_service *service, const struct sol_ptr_vector *inputs) |
request the login input to connection More... | |
int | sol_netctl_request_retry (struct sol_netctl_service *service, bool retry) |
request retry the connection or not when error type is reported More... | |
int | sol_netctl_scan (void) |
request scan the surrounding devices More... | |
int | sol_netctl_service_connect (struct sol_netctl_service *service) |
Connect the service. More... | |
int | sol_netctl_service_disconnect (struct sol_netctl_service *service) |
Disconnect the service. More... | |
const struct sol_ptr_vector * | sol_netctl_service_get_domains (const struct sol_netctl_service *service) |
Gets the service domains. More... | |
const char * | sol_netctl_service_get_error (const struct sol_netctl_service *service) |
Gets the service error. More... | |
const struct sol_netctl_ethernet * | sol_netctl_service_get_ethernet (const struct sol_netctl_service *service) |
Gets the service ethernet. More... | |
const char * | sol_netctl_service_get_name (const struct sol_netctl_service *service) |
Gets the service name. More... | |
const struct sol_ptr_vector * | sol_netctl_service_get_nameservers (const struct sol_netctl_service *service) |
Gets the service nameservers. More... | |
int | sol_netctl_service_get_network_address (const struct sol_netctl_service *service, struct sol_network_link **link) |
Gets the service network address. More... | |
const struct sol_netctl_provider * | sol_netctl_service_get_provider (const struct sol_netctl_service *service) |
Gets the service provider. More... | |
const struct sol_netctl_proxy * | sol_netctl_service_get_proxy (const struct sol_netctl_service *service) |
Gets the service proxy. More... | |
const struct sol_ptr_vector * | sol_netctl_service_get_security (const struct sol_netctl_service *service) |
Gets the service security methods. More... | |
enum sol_netctl_service_state | sol_netctl_service_get_state (const struct sol_netctl_service *service) |
Gets the service state. More... | |
int32_t | sol_netctl_service_get_strength (const struct sol_netctl_service *service) |
Gets the service strength. More... | |
const struct sol_ptr_vector * | sol_netctl_service_get_timeservers (const struct sol_netctl_service *service) |
Gets the service timeservers. More... | |
const char * | sol_netctl_service_get_type (const struct sol_netctl_service *service) |
Gets the service type. More... | |
bool | sol_netctl_service_is_autoconnect (const struct sol_netctl_service *service) |
Checks whether the service is autoconnect or not. More... | |
bool | sol_netctl_service_is_favorite (const struct sol_netctl_service *service) |
Checks whether the service is favorite or not. More... | |
bool | sol_netctl_service_is_immutable (const struct sol_netctl_service *service) |
Checks whether the service is immutable or not. More... | |
bool | sol_netctl_service_is_roaming (const struct sol_netctl_service *service) |
Checks whether the service is roaming or not. More... | |
enum sol_netctl_service_state | sol_netctl_service_state_from_str (const char *state) |
Converts a string service state to sol_netctl_service_state. More... | |
const char * | sol_netctl_service_state_to_str (enum sol_netctl_service_state state) |
Converts sol_netctl_service_state to a string name. More... | |
int | sol_netctl_set_radios_offline (bool enabled) |
Sets the global connection state to offline. More... | |
int | sol_netctl_unregister_agent (void) |
unregister a agent for network connection More... | |
Routines to manage connections.
#define SOL_NETCTL_AGENT_API_VERSION (1) |
Referenced by startup().
#define SOL_NETCTL_AGENT_INPUT_API_VERSION (1) |
Referenced by request_input().
#define SOL_NETCTL_ETHERNET_API_VERSION (1) |
#define SOL_NETCTL_NETWORK_PARAMS_API_VERSION (1) |
#define SOL_NETCTL_PROVIDER_API_VERSION (1) |
#define SOL_NETCTL_PROXY_API_VERSION (1) |