Classes | |
struct | icd_dbus_api_listeners |
struct | icd_dbus_api_scan_helper |
struct | icd_dbus_api_foreach_data |
struct | icd_dbus_api_statistics_data |
struct | icd_dbus_api_addrinfo_data |
Typedefs | |
typedef gboolean(* | icd_dbus_api_foreach_send_fn )(struct icd_iap *iap, struct icd_dbus_api_foreach_data *foreach_data) |
Functions | |
static void | icd_dbus_api_scan_result (enum icd_scan_status status, const struct icd_scan_srv_provider *srv_provider, const struct icd_scan_cache *cache_entry, gpointer user_data) |
static gboolean | icd_dbus_api_scan_append (gchar *network_type, struct icd_dbus_api_scan_helper *scan_start) |
static gboolean | icd_dbus_api_scan_all_types (struct icd_network_module *module, gpointer user_data) |
static gboolean | icd_dbus_api_scan_sender_exists (GSList *sender_list, const gchar *sender) |
static struct icd_dbus_api_listeners ** | icd_dbus_api_listeners_get (void) |
static DBusHandlerResult | icd_dbus_api_scan_req (DBusConnection *conn, DBusMessage *msg, void *user_data) |
static DBusHandlerResult | icd_dbus_api_scan_cancel (DBusConnection *conn, DBusMessage *msg, void *user_data) |
static gboolean | icd_dbus_api_send_connect_sig (enum icd_connect_status status, const gchar *sender, struct icd_iap *iap) |
void | icd_dbus_api_send_ack (GSList *tracklist, struct icd_iap *iap) |
void | icd_dbus_api_send_nack (GSList *tracklist, struct icd_iap *iap) |
static DBusHandlerResult | icd_dbus_api_connect_req (DBusConnection *conn, DBusMessage *msg, void *user_data) |
static DBusHandlerResult | icd_dbus_api_select_req (DBusConnection *conn, DBusMessage *msg, void *user_data) |
static gboolean | icd_dbus_api_disconnect_last (struct icd_iap *iap, gpointer user_data) |
static DBusHandlerResult | icd_dbus_api_disconnect_req (DBusConnection *conn, DBusMessage *msg, void *user_data) |
gboolean | icd_dbus_api_update_state (struct icd_iap *iap, const gchar *destination, const enum icd_connection_state state) |
gboolean | icd_dbus_api_update_search (const gchar *network_type, const gchar *destination, const enum icd_connection_state state) |
static gboolean | icd_dbus_api_foreach_iap_all (struct icd_iap *iap, gpointer user_data) |
static gboolean | icd_dbus_api_foreach_iap_req (struct DBusMessage *msg, struct icd_dbus_api_foreach_data *foreach_data) |
static enum icd_connection_state | icd_dbus_api_state_get (struct icd_iap *iap) |
static gboolean | icd_dbus_api_state_send (struct icd_iap *iap, struct icd_dbus_api_foreach_data *foreach_data) |
static gboolean | icd_dbus_api_state_scan_send (const gchar *network_type, struct icd_dbus_api_foreach_data *foreach_data) |
static gboolean | icd_dbus_api_state_scanning (struct icd_network_module *module, gpointer user_data) |
static DBusHandlerResult | icd_dbus_api_state_req (DBusConnection *conn, DBusMessage *msg, void *user_data) |
static void | icd_dbus_api_statistics_data_free (struct icd_dbus_api_statistics_data *stats) |
static void | icd_dbus_api_statistics_ip_cb (const gpointer ip_stats_cb_token, const gchar *network_type, const guint network_attrs, const gchar *network_id, guint time_active, guint rx_bytes, guint tx_bytes) |
static void | icd_dbus_api_statistics_link_post_cb (const gpointer link_post_stats_cb_token, const gchar *network_type, const guint network_attrs, const gchar *network_id, guint time_active, guint rx_bytes, guint tx_bytes) |
static void | icd_dbus_api_statistics_link_cb (const gpointer link_stats_cb_token, const gchar *network_type, const guint network_attrs, const gchar *network_id, guint time_active, gint signal, gchar *station_id, gint dB, guint rx_bytes, guint tx_bytes) |
static gboolean | icd_dbus_api_statistics_send (struct icd_iap *iap, struct icd_dbus_api_foreach_data *foreach_data) |
static DBusHandlerResult | icd_dbus_api_statistics_req (DBusConnection *conn, DBusMessage *msg, void *user_data) |
static void | icd_dbus_api_addrinfo_cb (const gpointer addr_info_cb_token, const gchar *network_type, const guint network_attrs, const gchar *network_id, gchar *ip_address, gchar *ip_netmask, gchar *ip_gateway, gchar *ip_dns1, gchar *ip_dns2, gchar *ip_dns3) |
static gboolean | icd_dbus_api_addrinfo_send (struct icd_iap *iap, struct icd_dbus_api_foreach_data *foreach_data) |
static DBusHandlerResult | icd_dbus_api_addrinfo_req (DBusConnection *conn, DBusMessage *msg, void *user_data) |
static DBusObjectPathMessageFunction | icd_dbus_api_find_handler (DBusMessage *message, struct icd_dbus_mcall_table *table) |
static DBusHandlerResult | icd_dbus_api_request (DBusConnection *connection, DBusMessage *message, void *user_data) |
gboolean | icd_dbus_api_app_exit (const gchar *dbus_dest) |
void | icd_dbus_api_deinit (void) |
gboolean | icd_dbus_api_init (void) |
Variables | |
struct icd_dbus_mcall_table | icd_dbus_api_mcalls [] |
struct icd_dbus_sig_table | icd_dbus_api_signals [] |
typedef gboolean(* icd_dbus_api_foreach_send_fn)(struct icd_iap *iap, struct icd_dbus_api_foreach_data *foreach_data) |
Template for the D-Bus data sending function
iap | the IAP | |
foreach_data | foreach data structure |
static void icd_dbus_api_addrinfo_cb | ( | const gpointer | addr_info_cb_token, | |
const gchar * | network_type, | |||
const guint | network_attrs, | |||
const gchar * | network_id, | |||
gchar * | ip_address, | |||
gchar * | ip_netmask, | |||
gchar * | ip_gateway, | |||
gchar * | ip_dns1, | |||
gchar * | ip_dns2, | |||
gchar * | ip_dns3 | |||
) | [static] |
Receive IP address configuration information based on network type, attributes and id.
addr_info_cb_token | token passed to the request function | |
network_type | network type | |
network_attrs | attributes, such as type of network_id, security, etc. | |
network_id | IAP name or local id, e.g. SSID | |
private | a reference to the icd_nw_api private memeber | |
ip_address | IP address string or NULL if no such value | |
ip_netmask | IP netmask string which or NULL if no such value | |
ip_gateway | IP gateway string which or NULL if no such value | |
ip_dns1 | DNS server IP address string or NULL if no such value | |
ip_dns2 | DNS server IP address string or NULL if no such value | |
ip_dns3 | DNS server IP address string or NULL if no such value |
References icd_dbus_send_system_msg(), and ILOG_DEBUG.
Referenced by icd_dbus_api_addrinfo_send().
static DBusHandlerResult icd_dbus_api_addrinfo_req | ( | DBusConnection * | conn, | |
DBusMessage * | msg, | |||
void * | user_data | |||
) | [static] |
Handle addrinfo requests
conn | D-Bus connection | |
msg | D-Bus message | |
user_data | dbus client data |
References icd_dbus_api_foreach_data::connections, icd_dbus_api_addrinfo_send(), icd_dbus_send_system_msg(), ILOG_ERR, icd_dbus_api_foreach_data::send_fn, and icd_dbus_api_foreach_data::sender.
static gboolean icd_dbus_api_addrinfo_send | ( | struct icd_iap * | iap, | |
struct icd_dbus_api_foreach_data * | foreach_data | |||
) | [static] |
Function for sending address info data to listeners
iap | the IAP | |
foreach_data | foreach data structure |
References icd_iap::connection, icd_dbus_api_addrinfo_cb(), ICD_DBUS_API_ADDRINFO_SIG, ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, icd_dbus_send_system_msg(), icd_iap_get_ipinfo(), ILOG_DEBUG, ILOG_ERR, icd_policy_request::network_attrs, icd_policy_request::network_id, icd_policy_request::network_type, icd_dbus_api_foreach_data::sender, icd_policy_request::service_attrs, icd_policy_request::service_id, and icd_policy_request::service_type.
Referenced by icd_dbus_api_addrinfo_req().
gboolean icd_dbus_api_app_exit | ( | const gchar * | dbus_dest | ) |
Notify ICd2 D-Bus API when an app goes away
dbus_dest | D-Bus sender id | |
TRUE | if D-Bus sender was removed, FALSE otherwise |
References icd_dbus_api_listeners_get(), icd_dbus_api_scan_result(), icd_name_owner_remove_filter(), icd_scan_results_unregister(), and ILOG_INFO.
Referenced by icd_dbus_api_scan_cancel(), and icd_name_owner_filter().
static DBusHandlerResult icd_dbus_api_connect_req | ( | DBusConnection * | conn, | |
DBusMessage * | msg, | |||
void * | user_data | |||
) | [static] |
Handle connect requests
conn | D-Bus connection | |
msg | D-Bus message | |
user_data | dbus client data |
References ICD_CONNECTION_FLAG_APPLICATION_EVENT, ICD_CONNECTION_FLAG_NONE, ICD_CONNECTION_FLAG_UI_EVENT, icd_dbus_send_system_msg(), ICD_POLICY_ATTRIBUTE_BACKGROUND, ICD_POLICY_ATTRIBUTE_CONN_UI, ICD_POLICY_ATTRIBUTE_NO_INTERACTION, icd_request_add_iap(), icd_request_find(), icd_request_make(), icd_request_merge(), icd_request_new(), icd_request_tracking_info_add(), ICD_TRACKING_INFO_ICD2, icd_tracking_info_new(), ILOG_DEBUG, ILOG_ERR, and icd_tracking_info::sender.
void icd_dbus_api_deinit | ( | void | ) |
Unregister ICD2_DBUS_API
References ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, and icd_dbus_unregister_system_service().
Referenced by icd_exec_shutdown().
static gboolean icd_dbus_api_disconnect_last | ( | struct icd_iap * | iap, | |
gpointer | user_data | |||
) | [static] |
Stop iterating at the first IAP
iap | the IAP struct | |
user_data | user data |
Referenced by icd_dbus_api_disconnect_req().
static DBusHandlerResult icd_dbus_api_disconnect_req | ( | DBusConnection * | conn, | |
DBusMessage * | msg, | |||
void * | user_data | |||
) | [static] |
Handle disconnect requests
conn | D-Bus connection | |
msg | D-Bus message | |
user_data | dbus client data |
References ICD_CONNECTION_FLAG_APPLICATION_EVENT, ICD_CONNECTION_FLAG_NONE, ICD_CONNECTION_FLAG_UI_EVENT, icd_dbus_api_disconnect_last(), icd_dbus_send_system_msg(), icd_gconf_get_iap_string(), ICD_GCONF_IAP_TYPE, icd_iap_find(), icd_iap_foreach(), ICD_NW_ATTR_IAPNAME, ICD_POLICY_ATTRIBUTE_BACKGROUND, ICD_POLICY_ATTRIBUTE_CONN_UI, icd_request_cancel(), icd_request_find_by_iap(), icd_iap::id, ILOG_DEBUG, ILOG_ERR, and ILOG_INFO.
static DBusObjectPathMessageFunction icd_dbus_api_find_handler | ( | DBusMessage * | message, | |
struct icd_dbus_mcall_table * | table | |||
) | [static] |
Find the handler function for the method call
message | D-Bus message | |
table | method call table |
References icd_dbus_mcall_table::handler_fn, icd_dbus_mcall_table::mcall_sig, and icd_dbus_mcall_table::name.
Referenced by icd_dbus_api_request().
static gboolean icd_dbus_api_foreach_iap_all | ( | struct icd_iap * | iap, | |
gpointer | user_data | |||
) | [static] |
Iterator function calling the given send function
iap | the IAP | |
user_data | foreach data | |
TRUE | to go through all IAPs |
References icd_dbus_api_foreach_data::connections, and icd_dbus_api_foreach_data::send_fn.
gboolean icd_dbus_api_init | ( | void | ) |
Register ICD2_DBUS_API
References ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, icd_dbus_api_request(), icd_dbus_api_update_state(), icd_dbus_register_system_service(), and ICD_STATE_DISCONNECTED.
Referenced by main().
static struct icd_dbus_api_listeners** icd_dbus_api_listeners_get | ( | void | ) | [static, read] |
Get the dbus api data structure
Referenced by icd_dbus_api_app_exit(), and icd_dbus_api_scan_req().
static DBusHandlerResult icd_dbus_api_request | ( | DBusConnection * | connection, | |
DBusMessage * | message, | |||
void * | user_data | |||
) | [static] |
Receive registered method calls and find a handler for them
connection | D-Bus connection | |
message | D-Bus message | |
user_data | dbus api data structure |
References icd_dbus_api_find_handler(), ICD_DBUS_API_INTERFACE, icd_dbus_send_system_msg(), and ILOG_INFO.
Referenced by icd_dbus_api_init().
static gboolean icd_dbus_api_scan_all_types | ( | struct icd_network_module * | module, | |
gpointer | user_data | |||
) | [static] |
Start scan for each each given network module
module | network module | |
user_data | scan helper structure |
References icd_dbus_api_scan_append(), icd_network_module::network_types, icd_network_module::nw, and icd_nw_api::start_search.
Referenced by icd_dbus_api_scan_req().
static gboolean icd_dbus_api_scan_append | ( | gchar * | network_type, | |
struct icd_dbus_api_scan_helper * | scan_start | |||
) | [static] |
Append a the network type of the successfully started network scan to the iterator position
network_type | network type to start scan for | |
str_iter | scan helper structure |
References icd_dbus_api_scan_helper::dbus_dest, icd_dbus_api_scan_result(), ICD_NW_SEARCH_SCOPE_ALL, ICD_NW_SEARCH_SCOPE_SAVED, ICD_SCAN_REQUEST_ACTIVE_SAVED, icd_scan_results_request(), ILOG_INFO, icd_dbus_api_scan_helper::reply_str_iter, and icd_dbus_api_scan_helper::scan_type.
Referenced by icd_dbus_api_scan_all_types(), and icd_dbus_api_scan_req().
static DBusHandlerResult icd_dbus_api_scan_cancel | ( | DBusConnection * | conn, | |
DBusMessage * | msg, | |||
void * | user_data | |||
) | [static] |
Handle cancelling of scans
conn | D-Bus connection | |
msg | D-Bus message | |
user_data | not used |
References icd_dbus_api_scan_helper::dbus_dest, icd_dbus_api_app_exit(), and icd_dbus_send_system_msg().
static DBusHandlerResult icd_dbus_api_scan_req | ( | DBusConnection * | conn, | |
DBusMessage * | msg, | |||
void * | user_data | |||
) | [static] |
Handle scan requests
conn | D-Bus connection | |
msg | D-Bus message | |
user_data | dbus client data |
References icd_dbus_api_scan_helper::dbus_dest, icd_context_get(), icd_dbus_api_listeners_get(), icd_dbus_api_scan_all_types(), icd_dbus_api_scan_append(), icd_dbus_api_scan_sender_exists(), icd_dbus_send_system_msg(), icd_name_owner_add_filter(), icd_network_api_foreach_module(), icd_dbus_api_scan_helper::reply_str_iter, and icd_dbus_api_scan_helper::scan_type.
static void icd_dbus_api_scan_result | ( | enum icd_scan_status | status, | |
const struct icd_scan_srv_provider * | srv_provider, | |||
const struct icd_scan_cache * | cache_entry, | |||
gpointer | user_data | |||
) | [static] |
Receive scan results and send them via D-Bus
status | status of this network | |
srv_provider | service provider entry; guaranteed to exist only for the lifetime of this callback function | |
cache_entry | scan results; guaranteed to exist only for the lifetime of this callback function | |
user_data | D-Bus app that requested the scan |
References icd_scan_cache::dB, ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, ICD_DBUS_API_SCAN_SIG, icd_dbus_send_system_msg(), ILOG_CRIT, icd_scan_cache::last_seen, icd_scan_cache::network_attrs, icd_scan_cache::network_id, icd_scan_cache::network_name, icd_scan_cache::network_priority, icd_scan_cache::network_type, icd_scan_srv_provider::service_attrs, icd_scan_srv_provider::service_id, icd_scan_srv_provider::service_name, icd_scan_srv_provider::service_priority, icd_scan_srv_provider::service_type, icd_scan_cache::signal, and icd_scan_cache::station_id.
Referenced by icd_dbus_api_app_exit(), and icd_dbus_api_scan_append().
static gboolean icd_dbus_api_scan_sender_exists | ( | GSList * | sender_list, | |
const gchar * | sender | |||
) | [static] |
Check wheter a sender already exists in the sender list
sender_list | list to examine | |
sender | sender to look for |
References ILOG_WARN.
Referenced by icd_dbus_api_scan_req().
static DBusHandlerResult icd_dbus_api_select_req | ( | DBusConnection * | conn, | |
DBusMessage * | msg, | |||
void * | user_data | |||
) | [static] |
Handle select connection requests
conn | D-Bus connection | |
msg | D-Bus message | |
user_data | dbus client data |
References ICD_CONNECTION_FLAG_APPLICATION_EVENT, ICD_CONNECTION_FLAG_NONE, ICD_CONNECTION_FLAG_UI_EVENT, icd_dbus_send_system_msg(), ICD_POLICY_ATTRIBUTE_BACKGROUND, ICD_POLICY_ATTRIBUTE_CONN_UI, icd_request_make(), icd_request_new(), icd_request_tracking_info_add(), ICD_TRACKING_INFO_ICD2, icd_tracking_info_new(), and ILOG_ERR.
void icd_dbus_api_send_ack | ( | GSList * | tracklist, | |
struct icd_iap * | iap | |||
) |
Send an ACK on successful connection creation to D-Bus applications
tracklist | the list of tracked applications | |
iap | IAP that got connected |
References ICD_CONNECTION_SUCCESSFUL, icd_dbus_api_send_connect_sig(), ICD_TRACKING_INFO_ICD2, icd_tracking_info::interface, and icd_tracking_info::sender.
Referenced by icd_request_send_ack().
static gboolean icd_dbus_api_send_connect_sig | ( | enum icd_connect_status | status, | |
const gchar * | sender, | |||
struct icd_iap * | iap | |||
) | [static] |
Create and send an (N)ACK to a listener
status | status | |
sender | D-Bus sender id | |
iap | IAP in question or NULL if none |
References icd_iap::connection, ICD_DBUS_API_CONNECT_SIG, ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, icd_dbus_send_system_msg(), ILOG_ERR, icd_policy_request::network_attrs, icd_policy_request::network_id, icd_policy_request::network_type, icd_policy_request::service_attrs, icd_policy_request::service_id, and icd_policy_request::service_type.
Referenced by icd_dbus_api_send_ack(), and icd_dbus_api_send_nack().
void icd_dbus_api_send_nack | ( | GSList * | tracklist, | |
struct icd_iap * | iap | |||
) |
Send a NACK on disconnect or unsuccessful connection creation to D-Bus applications; free tracking info
tracklist | the list of tracked applications | |
iap | if non-NULL send ICD_CONNECTION_DISCONNECTED; if NULL send ICD_CONNECTION_NOT_CONNECTED |
References ICD_CONNECTION_DISCONNECTED, ICD_CONNECTION_NOT_CONNECTED, icd_dbus_api_send_connect_sig(), ICD_TRACKING_INFO_ICD2, icd_tracking_info::interface, icd_tracking_info::request, and icd_tracking_info::sender.
Referenced by icd_request_send_ack(), and icd_request_send_nack().
static enum icd_connection_state icd_dbus_api_state_get | ( | struct icd_iap * | iap | ) | [static] |
Get the state sent to D-Bus applications as a function of the IAP state
iap | the IAP |
References ICD_IAP_STATE_CONNECTED, ICD_IAP_STATE_CONNECTED_DOWN, ICD_IAP_STATE_DISCONNECTED, ICD_IAP_STATE_IP_DOWN, ICD_IAP_STATE_IP_UP, ICD_IAP_STATE_LINK_DOWN, ICD_IAP_STATE_LINK_POST_UP, ICD_IAP_STATE_LINK_PRE_DOWN, ICD_IAP_STATE_LINK_UP, ICD_IAP_STATE_SAVING, ICD_IAP_STATE_SCRIPT_POST_DOWN, ICD_IAP_STATE_SCRIPT_POST_UP, ICD_IAP_STATE_SCRIPT_PRE_UP, ICD_IAP_STATE_SRV_DOWN, ICD_IAP_STATE_SRV_UP, ICD_STATE_CONNECTED, ICD_STATE_CONNECTING, ICD_STATE_DISCONNECTED, ICD_STATE_DISCONNECTING, ICD_STATE_LIMITED_CONN_ENABLED, icd_iap::limited_conn, and icd_iap::state.
Referenced by icd_dbus_api_state_send().
static DBusHandlerResult icd_dbus_api_state_req | ( | DBusConnection * | conn, | |
DBusMessage * | msg, | |||
void * | user_data | |||
) | [static] |
Handle state requests
conn | D-Bus connection | |
msg | D-Bus message | |
user_data | dbus client data |
References icd_dbus_api_foreach_data::connections, icd_context_get(), icd_dbus_api_state_scanning(), icd_dbus_api_state_send(), icd_dbus_send_system_msg(), icd_network_api_foreach_module(), ILOG_ERR, icd_dbus_api_foreach_data::send_fn, and icd_dbus_api_foreach_data::sender.
static gboolean icd_dbus_api_state_scan_send | ( | const gchar * | network_type, | |
struct icd_dbus_api_foreach_data * | foreach_data | |||
) | [static] |
Send network scan status
network_type | network type | |
foreach_data | foreach data structure |
References ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, ICD_DBUS_API_STATE_SIG, icd_dbus_send_system_msg(), ICD_STATE_SEARCH_START, ILOG_ERR, and icd_dbus_api_foreach_data::sender.
Referenced by icd_dbus_api_state_scanning().
static gboolean icd_dbus_api_state_scanning | ( | struct icd_network_module * | module, | |
gpointer | user_data | |||
) | [static] |
Network module callback function for scanning status
module | the network module | |
user_data | foreach data structure |
References icd_dbus_api_foreach_data::connections, icd_dbus_api_state_scan_send(), icd_network_module::network_types, and icd_network_module::scan_progress.
Referenced by icd_dbus_api_state_req().
static gboolean icd_dbus_api_state_send | ( | struct icd_iap * | iap, | |
struct icd_dbus_api_foreach_data * | foreach_data | |||
) | [static] |
Function for sending state data to listeners
iap | the IAP | |
foreach_data | foreach data structure |
References icd_dbus_api_state_get(), icd_dbus_api_update_state(), and icd_dbus_api_foreach_data::sender.
Referenced by icd_dbus_api_state_req().
static void icd_dbus_api_statistics_data_free | ( | struct icd_dbus_api_statistics_data * | stats | ) | [static] |
Free a statistics data structure
stats | the statistics data structure |
References icd_dbus_api_statistics_data::sender, and icd_dbus_api_statistics_data::station_id.
Referenced by icd_dbus_api_statistics_ip_cb(), icd_dbus_api_statistics_link_cb(), and icd_dbus_api_statistics_link_post_cb().
static void icd_dbus_api_statistics_ip_cb | ( | const gpointer | ip_stats_cb_token, | |
const gchar * | network_type, | |||
const guint | network_attrs, | |||
const gchar * | network_id, | |||
guint | time_active, | |||
guint | rx_bytes, | |||
guint | tx_bytes | |||
) | [static] |
Receive ip statistics based on network type, attributes and id. Values are set to zero or NULL if statistics are not available or applicable
ip_stats_cb_token | token passed to the request function | |
network_type | network type | |
network_attrs | attributes, such as type of network_id, security, etc. | |
network_id | network id | |
time_active | time active, if applicable | |
signal | signal level | |
station_id | base station id, e.g. WLAN access point MAC address | |
dB | raw signal strength; depends on the type of network | |
rx_bytes | bytes received on the link, if applicable | |
tx_bytes | bytes sent on the link, if applicable | |
private | a reference to the icd_nw_api private memeber |
References icd_iap::connection, ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, icd_dbus_api_statistics_data_free(), ICD_DBUS_API_STATISTICS_SIG, icd_dbus_send_system_msg(), icd_iap_find(), ILOG_ERR, ILOG_WARN, icd_policy_request::network_attrs, icd_policy_request::network_id, icd_policy_request::network_type, icd_dbus_api_statistics_data::rx_bytes, icd_dbus_api_statistics_data::sender, icd_policy_request::service_attrs, icd_policy_request::service_id, icd_policy_request::service_type, icd_dbus_api_statistics_data::signal, icd_dbus_api_statistics_data::time_active, and icd_dbus_api_statistics_data::tx_bytes.
Referenced by icd_dbus_api_statistics_link_post_cb().
static void icd_dbus_api_statistics_link_cb | ( | const gpointer | link_stats_cb_token, | |
const gchar * | network_type, | |||
const guint | network_attrs, | |||
const gchar * | network_id, | |||
guint | time_active, | |||
gint | signal, | |||
gchar * | station_id, | |||
gint | dB, | |||
guint | rx_bytes, | |||
guint | tx_bytes | |||
) | [static] |
Receive link statistics based on network type, attributes and id. Values are set to zero or NULL if statistics are not available or applicable
link_stats_cb_token | token passed to the request function | |
network_type | network type | |
network_attrs | attributes, such as type of network_id, security, etc. | |
network_id | network id | |
time_active | time active, if applicable | |
signal | signal level | |
station_id | base station id, e.g. WLAN access point MAC address | |
dB | raw signal strength; depends on the type of network | |
rx_bytes | bytes received on the link, if applicable | |
tx_bytes | bytes sent on the link, if applicable | |
private | a reference to the icd_nw_api private memeber |
References icd_dbus_api_statistics_data::dB, icd_dbus_api_statistics_data_free(), icd_dbus_api_statistics_link_post_cb(), icd_iap_find(), icd_iap_get_link_post_stats(), ILOG_ERR, ILOG_WARN, icd_dbus_api_statistics_data::rx_bytes, icd_dbus_api_statistics_data::signal, icd_dbus_api_statistics_data::station_id, icd_dbus_api_statistics_data::time_active, and icd_dbus_api_statistics_data::tx_bytes.
Referenced by icd_dbus_api_statistics_send().
static void icd_dbus_api_statistics_link_post_cb | ( | const gpointer | link_post_stats_cb_token, | |
const gchar * | network_type, | |||
const guint | network_attrs, | |||
const gchar * | network_id, | |||
guint | time_active, | |||
guint | rx_bytes, | |||
guint | tx_bytes | |||
) | [static] |
Receive link post up statistics based on network type, attributes and id. Values are set to zero or NULL if statistics are not available or applicable
link_post_stats_cb_token | token passed to the request function | |
network_type | network type | |
network_attrs | attributes, such as type of network_id, security, etc. | |
network_id | network id | |
time_active | time active, if applicable | |
rx_bytes | bytes received on the link, if applicable | |
tx_bytes | bytes sent on the link, if applicable | |
private | a reference to the icd_nw_api private memeber |
References icd_dbus_api_statistics_data_free(), icd_dbus_api_statistics_ip_cb(), icd_iap_find(), icd_iap_get_ip_stats(), ILOG_ERR, ILOG_WARN, icd_dbus_api_statistics_data::rx_bytes, icd_dbus_api_statistics_data::time_active, and icd_dbus_api_statistics_data::tx_bytes.
Referenced by icd_dbus_api_statistics_link_cb().
static DBusHandlerResult icd_dbus_api_statistics_req | ( | DBusConnection * | conn, | |
DBusMessage * | msg, | |||
void * | user_data | |||
) | [static] |
Handle statistics requests
conn | D-Bus connection | |
msg | D-Bus message | |
user_data | dbus client data |
References icd_dbus_api_foreach_data::connections, icd_dbus_api_statistics_send(), icd_dbus_send_system_msg(), ILOG_ERR, icd_dbus_api_foreach_data::send_fn, and icd_dbus_api_foreach_data::sender.
static gboolean icd_dbus_api_statistics_send | ( | struct icd_iap * | iap, | |
struct icd_dbus_api_foreach_data * | foreach_data | |||
) | [static] |
Function for sending statistics data to listeners
iap | the IAP | |
foreach_data | foreach data structure |
References icd_dbus_api_statistics_link_cb(), icd_iap_get_link_stats(), ILOG_ERR, icd_dbus_api_foreach_data::sender, and icd_dbus_api_statistics_data::sender.
Referenced by icd_dbus_api_statistics_req().
gboolean icd_dbus_api_update_search | ( | const gchar * | network_type, | |
const gchar * | destination, | |||
const enum icd_connection_state | state | |||
) |
Send network type search start/stop
iap | the network type | |
destination | D-Bus destination or NULL if broadcasted to all | |
state | the state to send |
References ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, ICD_DBUS_API_STATE_SIG, icd_dbus_send_system_msg(), and ILOG_ERR.
Referenced by icd_status_scan_start(), and icd_status_scan_stop().
gboolean icd_dbus_api_update_state | ( | struct icd_iap * | iap, | |
const gchar * | destination, | |||
const enum icd_connection_state | state | |||
) |
Send IAP state change signal
iap | the IAP or NULL if no state | |
destination | D-Bus destination or NULL if broadcasted to all | |
state | the state to send |
References icd_iap::connection, icd_iap::err_str, ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, ICD_DBUS_API_STATE_SIG, icd_dbus_send_system_msg(), ILOG_ERR, icd_policy_request::network_attrs, icd_policy_request::network_id, icd_policy_request::network_type, icd_policy_request::service_attrs, icd_policy_request::service_id, and icd_policy_request::service_type.
Referenced by icd_dbus_api_init(), icd_dbus_api_state_send(), icd_iap_module_next(), icd_status_connect(), icd_status_connected(), icd_status_disconnect(), icd_status_disconnected(), and icd_status_limited_conn().
struct icd_dbus_mcall_table icd_dbus_api_mcalls[] |
Initial value:
{ {ICD_DBUS_API_SCAN_REQ, "u", "as", icd_dbus_api_scan_req}, {ICD_DBUS_API_SCAN_REQ, "uas", "as", icd_dbus_api_scan_req}, {ICD_DBUS_API_SCAN_CANCEL, "", "", icd_dbus_api_scan_cancel}, {ICD_DBUS_API_CONNECT_REQ, "u", "", icd_dbus_api_connect_req}, {ICD_DBUS_API_CONNECT_REQ, "ua(sussuay)", "", icd_dbus_api_connect_req}, {ICD_DBUS_API_SELECT_REQ, "u", "", icd_dbus_api_select_req}, {ICD_DBUS_API_DISCONNECT_REQ, "usussuay", "", icd_dbus_api_disconnect_req}, {ICD_DBUS_API_DISCONNECT_REQ, "u", "", icd_dbus_api_disconnect_req}, {ICD_DBUS_API_STATE_REQ, "sussuay", "u", icd_dbus_api_state_req}, {ICD_DBUS_API_STATE_REQ, "", "u", icd_dbus_api_state_req}, {ICD_DBUS_API_STATISTICS_REQ, "sussuay", "u", icd_dbus_api_statistics_req}, {ICD_DBUS_API_STATISTICS_REQ, "", "u", icd_dbus_api_statistics_req}, {ICD_DBUS_API_ADDRINFO_REQ, "sussuay", "u", icd_dbus_api_addrinfo_req}, {ICD_DBUS_API_ADDRINFO_REQ, "", "u", icd_dbus_api_addrinfo_req}, {NULL} }
struct icd_dbus_sig_table icd_dbus_api_signals[] |
Initial value:
{ {ICD_DBUS_API_SCAN_SIG, "uussusissuayiisi"}, {ICD_DBUS_API_CONNECT_SIG, "sussuayu"}, {ICD_DBUS_API_STATE_SIG, "sussuaysu"}, {ICD_DBUS_API_STATE_SIG, "u"}, {ICD_DBUS_API_STATE_SIG, "su"}, {ICD_DBUS_API_STATISTICS_SIG, "sussuayuiuu"}, {ICD_DBUS_API_ADDRINFO_SIG, "sussuaya(sssssss)"}, {NULL} }