Classes | |
| struct | icd_srv_provider_cb_data |
| struct | icd_srv_identify |
| struct | pid_notify |
| struct | icd_srv_module |
Defines | |
| #define | ICD_SRV_PROVIDER_MODULE_NAME "/module" |
| #define | ICD_SRV_PROVIDER_NETWORK_TYPES "/network_type" |
Typedefs | |
| typedef gboolean(* | icd_srv_provider_foreach_module_fn )(struct icd_srv_module *module, gpointer user_data) |
| typedef void(* | icd_srv_provider_connect_cb_fn )(enum icd_srv_status status, const gchar *err_str, gpointer user_data) |
| typedef void(* | icd_srv_provider_disconnect_cb_fn )(enum icd_srv_status status, gpointer user_data) |
Functions | |
| static gboolean | string_equal (const gchar *a, const gchar *b) |
| struct icd_srv_module * | icd_srv_provider_foreach_module (struct icd_context *icd_ctx, icd_srv_provider_foreach_module_fn foreach_fn, gpointer user_data) |
| static void | icd_srv_provider_disconnect_cb (enum icd_srv_status status, gpointer disconnect_cb_token) |
| gboolean | icd_srv_provider_disconnect (struct icd_iap *iap, icd_srv_provider_disconnect_cb_fn cb, gpointer user_data) |
| gboolean | icd_srv_provider_has_next (struct icd_iap *iap) |
| static void | icd_srv_provider_connect_cb (enum icd_srv_status status, const gchar *err_str, gpointer connect_cb_token) |
| gboolean | icd_srv_provider_connect (struct icd_iap *iap, icd_srv_provider_connect_cb_fn cb, gpointer user_data) |
| static void | icd_srv_provider_identify_cb (const enum icd_srv_identify_status status, const gchar *service_type, const gchar *service_name, const guint service_attrs, const gchar *service_id, const gint service_priority, const gchar *network_type, const guint network_attrs, const gchar *network_id, gpointer identify_cb_token) |
| gboolean | icd_srv_provider_identify (struct icd_network_module *nw_module, struct icd_scan_cache *cache_entry, enum icd_scan_status status) |
| static gboolean | icd_srv_provider_foreach_module_pid (struct icd_srv_module *srv_module, gpointer user_data) |
| gboolean | icd_srv_provider_notify_pid (struct icd_context *icd_ctx, const pid_t pid, const gint exit_value) |
| static void | icd_srv_provider_watch_pid (const pid_t pid, gpointer watch_cb_token) |
| static void | icd_srv_provider_close (enum icd_srv_status status, const gchar *err_str, const gchar *service_type, const guint service_attrs, const gchar *service_id, const gchar *network_type, const guint network_attrs, const gchar *network_id) |
| static void | icd_srv_provider_limited_conn (const enum icd_srv_limited_conn_status conn_status, const gchar *service_type, const guint service_attrs, const gchar *service_id, const gchar *network_type, const guint network_attrs, const gchar *network_id) |
| static gboolean | icd_srv_provider_init (const gchar *module_name, void *handle, gpointer init_function, gpointer cb_data) |
| static void | icd_srv_provider_free_list (gpointer key, gpointer value, gpointer user_data) |
| gboolean | icd_srv_provider_load_modules (struct icd_context *icd_ctx) |
| void | icd_srv_provider_unload_modules (struct icd_context *icd_ctx) |
| gboolean | icd_srv_provider_check (const gchar *network_type) |
| #define ICD_SRV_PROVIDER_MODULE_NAME "/module" |
service provider entry for the module name
Referenced by icd_srv_provider_load_modules().
| #define ICD_SRV_PROVIDER_NETWORK_TYPES "/network_type" |
service provider entry for supported network types
Referenced by icd_srv_provider_load_modules().
| typedef void(* icd_srv_provider_connect_cb_fn)(enum icd_srv_status status, const gchar *err_str, gpointer user_data) |
Service provider connect callback function
| status | status of the connect | |
| err_str | error string or NULL on success | |
| user_data | user data |
| typedef void(* icd_srv_provider_disconnect_cb_fn)(enum icd_srv_status status, gpointer user_data) |
Service provider disconnect callback function
| status | status of the connect | |
| user_data | user data |
| typedef gboolean(* icd_srv_provider_foreach_module_fn)(struct icd_srv_module *module, gpointer user_data) |
Service provider api callback for going through every service provider module
| module | the service provider module | |
| user_data | user data passed to icd_srv_provider_foreach_module |
| gboolean icd_srv_provider_check | ( | const gchar * | network_type | ) |
Check if there is a service module for a given type. If type is not given then return TRUE if there is any service module found.
| network_type | network_type to search, can be NULL |
References icd_context_get(), icd_ctx, icd_context::nw_type_to_srv_module, and icd_context::srv_module_list.
Referenced by icd_policy_api_init_cb().
| static void icd_srv_provider_close | ( | enum icd_srv_status | status, | |
| const gchar * | err_str, | |||
| const gchar * | service_type, | |||
| const guint | service_attrs, | |||
| const gchar * | service_id, | |||
| const gchar * | network_type, | |||
| const guint | network_attrs, | |||
| const gchar * | network_id | |||
| ) | [static] |
Function to request closing down a connection due to internal or external events.
| status | reason for closing; ICD_SRV_RESTART if the connection needs to be restarted, success or error will both close the network connection | |
| err_str | NULL if the service provisioning was disconnected normally or any ICD_DBUS_ERROR_* from osso-ic-dbus.h on error | |
| service_type | the service type; currently ignored | |
| service_attrs | attributes; currently ignored | |
| service_id | internal service id; currently ignored | |
| network_type | the network type | |
| network_attrs | network attributes | |
| network_id | network id |
References icd_iap_disconnect(), icd_iap_find(), icd_iap_restart(), ICD_NW_LAYER_ALL, ICD_SRV_ERROR, ICD_SRV_RESTART, icd_status_disconnect(), ILOG_INFO, and ILOG_WARN.
Referenced by icd_srv_provider_init().
| gboolean icd_srv_provider_connect | ( | struct icd_iap * | iap, | |
| icd_srv_provider_connect_cb_fn | cb, | |||
| gpointer | user_data | |||
| ) |
Run the service module, if any
| iap | the IAP | |
| cb | callback function | |
| user_data | user data for the callback function |
References icd_srv_api::connect, icd_iap::connection, icd_context_get(), icd_ctx, icd_srv_provider_connect_cb(), icd_srv_provider_has_next(), ILOG_ERR, ILOG_INFO, icd_iap::interface_name, icd_policy_request::network_attrs, icd_policy_request::network_id, icd_policy_request::network_type, icd_srv_api::private, icd_policy_request::service_attrs, icd_policy_request::service_id, icd_policy_request::service_type, icd_srv_module::srv, icd_iap::srv_connect_cb, icd_iap::srv_connect_cb_user_data, and icd_context::srv_type_to_srv_module.
Referenced by icd_iap_module_next().
| static void icd_srv_provider_connect_cb | ( | enum icd_srv_status | status, | |
| const gchar * | err_str, | |||
| gpointer | connect_cb_token | |||
| ) | [static] |
Connect callback for the service provider module
| status | status of the connect attempt; with ICD_SRV_RESTART the IAP will be disconnected and reconnected again | |
| connect_cb_token | token passed to the connect function |
References ILOG_ERR, icd_iap::srv_connect_cb, and icd_iap::srv_connect_cb_user_data.
Referenced by icd_srv_provider_connect().
| gboolean icd_srv_provider_disconnect | ( | struct icd_iap * | iap, | |
| icd_srv_provider_disconnect_cb_fn | cb, | |||
| gpointer | user_data | |||
| ) |
Disconnect the service module
| iap | the IAP | |
| cb | callback function | |
| user_data | user data for the callback function |
References icd_iap::connection, icd_srv_api::disconnect, icd_context_get(), icd_ctx, icd_srv_provider_disconnect_cb(), ILOG_DEBUG, ILOG_ERR, ILOG_INFO, icd_iap::interface_name, icd_policy_request::network_attrs, icd_policy_request::network_id, icd_policy_request::network_type, icd_srv_api::private, icd_policy_request::service_attrs, icd_policy_request::service_id, icd_policy_request::service_type, icd_srv_module::srv, icd_iap::srv_disconnect_cb, icd_iap::srv_disconnect_cb_user_data, and icd_context::srv_type_to_srv_module.
Referenced by icd_iap_disconnect(), and icd_iap_disconnect_module().
| static void icd_srv_provider_disconnect_cb | ( | enum icd_srv_status | status, | |
| gpointer | disconnect_cb_token | |||
| ) | [static] |
Disconnect callback for the service provider module
| status | status of the disconnect, ignored for now | |
| disconnect_cb_token | token passed to the disconnect function |
References ILOG_ERR, icd_iap::srv_disconnect_cb, and icd_iap::srv_disconnect_cb_user_data.
Referenced by icd_srv_provider_disconnect().
| struct icd_srv_module * icd_srv_provider_foreach_module | ( | struct icd_context * | icd_ctx, | |
| icd_srv_provider_foreach_module_fn | foreach_fn, | |||
| gpointer | user_data | |||
| ) | [read] |
Iterate over all service provider modules
| icd_ctx | icd context | |
| foreach_fn | the function to call for each module | |
| user_data | user data to pass to the function |
References ILOG_ERR, ILOG_WARN, and icd_context::srv_module_list.
Referenced by icd_srv_provider_notify_pid().
| static gboolean icd_srv_provider_foreach_module_pid | ( | struct icd_srv_module * | srv_module, | |
| gpointer | user_data | |||
| ) | [static] |
Find the srv provider module that is watching a child process exit
| module | the srv provider module to examine | |
| user_data | the pid notify structure |
References icd_srv_api::child_exit, pid_notify::exit_value, ILOG_INFO, ILOG_WARN, icd_srv_module::name, pid_notify::pid, icd_srv_module::pid_list, icd_srv_api::private, and icd_srv_module::srv.
Referenced by icd_srv_provider_notify_pid().
| static void icd_srv_provider_free_list | ( | gpointer | key, | |
| gpointer | value, | |||
| gpointer | user_data | |||
| ) | [static] |
Wrapper function for removing a list that is a hash table value when stepping through a hash table
| key | key; ignored | |
| value | the list | |
| user_data | user data; ignored |
Referenced by icd_srv_provider_unload_modules().
| gboolean icd_srv_provider_has_next | ( | struct icd_iap * | iap | ) |
Check wheter there is a service module to run
| iap | the IAP |
References icd_iap::connection, ILOG_DEBUG, icd_policy_request::service_id, icd_policy_request::service_type, and icd_iap::srv_connect_cb.
Referenced by icd_iap_module_next(), and icd_srv_provider_connect().
| gboolean icd_srv_provider_identify | ( | struct icd_network_module * | nw_module, | |
| struct icd_scan_cache * | cache_entry, | |||
| enum icd_scan_status | status | |||
| ) |
Send a network to be identified by possible service providers
| cache_entry | scan cache entry containing the data so far | |
| status | scan status |
References icd_scan_cache::dB, icd_context_get(), icd_ctx, icd_srv_provider_identify_cb(), icd_srv_api::identify, ILOG_WARN, icd_srv_identify::module, 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_context::nw_type_to_srv_module, icd_srv_api::private, icd_scan_cache::signal, icd_srv_identify::signal, icd_srv_module::srv, and icd_scan_cache::station_id.
Referenced by icd_scan_cb().
| static void icd_srv_provider_identify_cb | ( | const enum icd_srv_identify_status | status, | |
| const gchar * | service_type, | |||
| const gchar * | service_name, | |||
| const guint | service_attrs, | |||
| const gchar * | service_id, | |||
| const gint | service_priority, | |||
| const gchar * | network_type, | |||
| const guint | network_attrs, | |||
| const gchar * | network_id, | |||
| gpointer | identify_cb_token | |||
| ) | [static] |
Service identification callback.
| status | status of the identification procedure | |
| service_type | service type | |
| service_name | name of the service provider displayable to the user/UI | |
| service_attrs | service attributes | |
| service_id | internal service id | |
| service_priority | priority within a service type | |
| network_type | network type | |
| network_attrs | network attributes | |
| network_id | network_id | |
| identify_cb_token | the token passed to the identification function |
References icd_network_priority_get(), ICD_NW_ATTR_SRV_PROVIDER, icd_scan_cache_entry_add(), icd_scan_cache_entry_find(), icd_scan_cache_list_lookup(), icd_scan_listener_notify(), ICD_SCAN_NEW, ICD_SCAN_NOTIFY, ICD_SCAN_UPDATE, ICD_SRV_CONTINUE, ICD_SRV_UNKNOWN, ILOG_DEBUG, ILOG_ERR, ILOG_WARN, icd_scan_cache::last_seen, icd_srv_identify::module, icd_scan_cache::network_attrs, icd_scan_cache::network_id, 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_srv_identify::signal, icd_scan_cache::signal, icd_scan_cache::srv_provider_list, and string_equal().
Referenced by icd_srv_provider_identify().
| static gboolean icd_srv_provider_init | ( | const gchar * | module_name, | |
| void * | handle, | |||
| gpointer | init_function, | |||
| gpointer | cb_data | |||
| ) | [static] |
Service provider plugin initialization callback function
| module_name | the moduel filename | |
| handle | module handle to pass unloading function | |
| init_function | a pointer to the plugin init function | |
| cb_data | user data passed to icd_plugin_load_all |
References icd_srv_api::connect, icd_srv_module::handle, icd_srv_provider_cb_data::icd_ctx, icd_plugin_unload_module(), icd_srv_provider_close(), icd_srv_provider_limited_conn(), icd_srv_provider_watch_pid(), icd_version_compare(), icd_srv_api::identify, ILOG_DEBUG, ILOG_ERR, ILOG_INFO, ILOG_WARN, icd_srv_module::name, icd_srv_provider_cb_data::network_types, icd_context::nw_type_to_srv_module, icd_srv_api::private, icd_srv_provider_cb_data::service_type, icd_srv_module::srv, icd_srv_api::srv_destruct, icd_context::srv_module_list, icd_context::srv_type_to_srv_module, and icd_srv_api::version.
Referenced by icd_srv_provider_load_modules().
| static void icd_srv_provider_limited_conn | ( | const enum icd_srv_limited_conn_status | conn_status, | |
| const gchar * | service_type, | |||
| const guint | service_attrs, | |||
| const gchar * | service_id, | |||
| const gchar * | network_type, | |||
| const guint | network_attrs, | |||
| const gchar * | network_id | |||
| ) | [static] |
Limited connectivity enabling and disabling.
| service_type | the service type | |
| service_attrs | attributes | |
| service_id | internal service id | |
| network_type | the network type | |
| network_attrs | network attributes | |
| network_id | network id |
References icd_iap_find(), ICD_IAP_STATE_SRV_UP, ICD_SRV_LIMITED_CONN_ENABLED, icd_status_limited_conn(), ILOG_WARN, icd_iap::limited_conn, and icd_iap::state.
Referenced by icd_srv_provider_init().
| gboolean icd_srv_provider_load_modules | ( | struct icd_context * | icd_ctx | ) |
Load service provider modueles
| icd_ctx | icd context |
References icd_srv_provider_cb_data::icd_ctx, icd_plugin_load(), icd_srv_provider_init(), ICD_SRV_PROVIDER_MODULE_NAME, ICD_SRV_PROVIDER_NETWORK_TYPES, ILOG_INFO, ILOG_WARN, icd_srv_provider_cb_data::network_types, icd_context::nw_type_to_srv_module, icd_srv_provider_cb_data::service_type, and icd_context::srv_type_to_srv_module.
Referenced by main().
| gboolean icd_srv_provider_notify_pid | ( | struct icd_context * | icd_ctx, | |
| const pid_t | pid, | |||
| const gint | exit_value | |||
| ) |
Notify a srv provider module that its child process has exited
| icd_ctx | the context | |
| pid | the process id | |
| exit_value | exit value |
References pid_notify::exit_value, icd_srv_provider_foreach_module(), icd_srv_provider_foreach_module_pid(), and pid_notify::pid.
Referenced by icd_exec_signal_cb().
| void icd_srv_provider_unload_modules | ( | struct icd_context * | icd_ctx | ) |
Unload all network modules
| icd_ctx | icd context |
References icd_srv_module::handle, icd_plugin_unload_module(), icd_srv_provider_free_list(), ILOG_DEBUG, ILOG_ERR, icd_srv_module::name, icd_context::nw_type_to_srv_module, icd_srv_module::pid_list, icd_srv_api::private, icd_srv_module::srv, icd_srv_api::srv_destruct, icd_context::srv_module_list, and icd_context::srv_type_to_srv_module.
Referenced by main().
| static void icd_srv_provider_watch_pid | ( | const pid_t | pid, | |
| gpointer | watch_cb_token | |||
| ) | [static] |
Function for notifying ICd that a child process has been started. The srv provider destruction function will not be called before all child processes have exited.
| pid | process id | |
| watch_cb_token | the watch callback token given on initialization |
References ILOG_DEBUG, ILOG_ERR, icd_srv_module::name, and icd_srv_module::pid_list.
Referenced by icd_srv_provider_init().
| static gboolean string_equal | ( | const gchar * | a, | |
| const gchar * | b | |||
| ) | [static] |
Helper function for comparing two strings where a NULL string is equal to another NULL string
| a | string A | |
| b | string B |
1.5.6