Classes | |
struct | icd_request |
Typedefs | |
typedef void(*) | icd_request_cb_fn (enum icd_request_status status, gpointer user_data) |
typedef gpointer(*) | icd_request_foreach_fn (struct icd_request *request, gpointer user_data) |
Enumerations | |
enum | icd_request_status { ICD_REQUEST_POLICY_PENDING = 0, ICD_REQUEST_WAITING, ICD_REQUEST_CHANGETO, ICD_REQUEST_MERGED, ICD_REQUEST_CONNECTING_IAPS, ICD_REQUEST_SUCCEEDED, ICD_REQUEST_DENIED, ICD_REQUEST_DISCONNECTED, ICD_REQUEST_MAX } |
Functions | |
static gboolean | icd_request_try_iap (struct icd_request *request) |
static void | icd_request_connect (struct icd_request *request) |
static gboolean | icd_request_string_equal (const gchar *a, const gchar *b) |
gpointer | icd_request_foreach (icd_request_foreach_fn fn, gpointer user_data) |
void | icd_request_tracking_info_remove (struct icd_request *request, struct icd_tracking_info *track) |
static gpointer | icd_request_tracking_info_delete_foreach (struct icd_request *request, gpointer user_data) |
gboolean | icd_request_tracking_info_delete (const gchar *sender) |
void | icd_request_tracking_info_add (struct icd_request *request, struct icd_tracking_info *track) |
static void | icd_request_tracking_info_free (struct icd_request *request) |
static gpointer | icd_request_find_foreach (struct icd_request *request, gpointer user_data) |
icd_request * | icd_request_find (const gchar *network_type, const guint network_attrs, const gchar *network_id) |
icd_request * | icd_request_find_by_iap (const gchar *network_type, const guint network_attrs, const gchar *network_id) |
icd_request * | icd_request_find_by_iap_id (const gchar *iap_id, const gboolean is_local) |
static void | icd_request_update_status (enum icd_request_status status, struct icd_request *request) |
void | icd_request_free_iaps (struct icd_request *request) |
static void | icd_request_free (struct icd_request *request) |
static gboolean | icd_request_find_iap_by_module (struct icd_iap *iap, gpointer user_data) |
static gpointer | icd_request_find_changeto (struct icd_request *request, gpointer user_data) |
void | icd_request_send_ack (struct icd_request *request, struct icd_iap *iap) |
void | icd_request_send_nack (struct icd_request *request) |
static void | icd_request_retry_cb (gboolean success, gpointer user_data) |
static void | icd_request_try_iap_cb (enum icd_iap_status status, struct icd_iap *iap, gpointer user_data) |
static void | icd_request_connect_iaps (enum icd_policy_status status, struct icd_policy_request *req) |
void | icd_request_add_iap (struct icd_request *request, gchar *service_type, guint service_attrs, gchar *service_id, gchar *network_type, guint network_attrs, gchar *network_id, gint network_priority) |
icd_request * | icd_request_new (guint policy_attrs, 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 gpointer | icd_request_make_check_duplicate (struct icd_request *request, gpointer user_data) |
void | icd_request_make (struct icd_request *request) |
gboolean | icd_request_merge (struct icd_request *merge_request, struct icd_request *existing) |
void | icd_request_cancel (struct icd_request *request, guint policy_attrs) |
Variables | |
const gchar * | icd_request_status_names [ICD_REQUEST_MAX] |
typedef void(*) icd_request_cb_fn(enum icd_request_status status, gpointer user_data) |
The request status callback function
status | the outcome of the request | |
user_data | user data |
typedef gpointer(*) icd_request_foreach_fn(struct icd_request *request, gpointer user_data) |
Function called for each request structure
request | the request | |
user_data | user data passed to icd_request_foreach() |
enum icd_request_status |
status of the request
void icd_request_add_iap | ( | struct icd_request * | request, | |
gchar * | service_type, | |||
guint | service_attrs, | |||
gchar * | service_id, | |||
gchar * | network_type, | |||
guint | network_attrs, | |||
gchar * | network_id, | |||
gint | network_priority | |||
) |
Add a network connection to try.
request | the request to which the new network is added | |
service_type | service provider type, see srv_provider_api.h | |
service_attrs | service provider attributes, see srv_provider_api.h | |
service_id | service_provider id, see srv_provider_api.h | |
network_type | network type, see network_api.h | |
network_attrs | network attributes, see network_api.h | |
network_id | network id, see network_api.h | |
network_priority | network priority, default value to use is -1 |
void icd_request_cancel | ( | struct icd_request * | request, | |
guint | policy_attrs | |||
) |
Cancel a request. The request will be freed when the icd_request_try_iap_cb() callback is called at the time of IAP disconnection
request | the request | |
policy_attrs | ICD_POLICY_ATTRIBUTE_* attributes |
static void icd_request_connect | ( | struct icd_request * | request | ) | [static] |
Try to connect the request (for the first time), request UI dialog if unsuccessful
request | the request to connect |
static void icd_request_connect_iaps | ( | enum icd_policy_status | status, | |
struct icd_policy_request * | req | |||
) | [static] |
Callback for the new_connection policy request.
status | status of the policy request | |
req | the policy request structure |
struct icd_request * icd_request_find | ( | const gchar * | network_type, | |
const guint | network_attrs, | |||
const gchar * | network_id | |||
) |
Find a request
network_type | requested network type | |
network_attrs | requested network attributes | |
network_id | requesete (meta) IAP name |
struct icd_request * icd_request_find_by_iap | ( | const gchar * | network_type, | |
const guint | network_attrs, | |||
const gchar * | network_id | |||
) |
Find a request by IAP
network_type | network type | |
network_attrs | network attributes | |
network_id | network id |
struct icd_request * icd_request_find_by_iap_id | ( | const gchar * | iap_id, | |
const gboolean | is_local | |||
) |
Find a request by IAP id
iap_id | IAP id | |
is_local | TRUE if a locally generated icd2 id is requested, FALSE otherwise |
static gpointer icd_request_find_changeto | ( | struct icd_request * | request, | |
gpointer | user_data | |||
) | [static] |
Find a request to change to
request | the request | |
user_data | user data passed to icd_request_foreach() |
static gpointer icd_request_find_foreach | ( | struct icd_request * | request, | |
gpointer | user_data | |||
) | [static] |
Foreach function for network finding
request | the request | |
user_data | the network to search for |
static gboolean icd_request_find_iap_by_module | ( | struct icd_iap * | iap, | |
gpointer | user_data | |||
) | [static] |
Find an iap by module
iap | the IAP struct | |
user_data | user data |
gpointer icd_request_foreach | ( | icd_request_foreach_fn | fn, | |
gpointer | user_data | |||
) |
Iterate over all requests and call the user given function for each of them
fn | the function | |
user_data | user data to pass to the function |
static void icd_request_free | ( | struct icd_request * | request | ) | [static] |
Free an icd_request structure
request | the request |
void icd_request_free_iaps | ( | struct icd_request * | request | ) |
Free memory allocated for all IAPs in a request
request | the request |
void icd_request_make | ( | struct icd_request * | request | ) |
Make a request for a new network connection.
request | the request - do not use after calling this function, as the request may be freed without any further notice |
static gpointer icd_request_make_check_duplicate | ( | struct icd_request * | request, | |
gpointer | user_data | |||
) | [static] |
Find out wheter the request already exists in the icd context request list
request | a request from the list | |
user_data | the request to be added |
gboolean icd_request_merge | ( | struct icd_request * | merge_request, | |
struct icd_request * | existing | |||
) |
Merge two requets
merge_request | request that is to be merged and freed | |
existing | the request to merge with |
struct icd_request * icd_request_new | ( | guint | policy_attrs, | |
const gchar * | service_type, | |||
const guint | service_attrs, | |||
const gchar * | service_id, | |||
const gchar * | network_type, | |||
const guint | network_attrs, | |||
const gchar * | network_id | |||
) |
Request a connection. ICd policy will be consulted and any number of IAPs may be created in response.
policy_attrs | ICD_POLICY_ATTRIBUTE_* attributes | |
service_type | service type | |
service_attrs | service attributes | |
service_id | service id | |
network_type | network type to connect | |
network_attrs | network attributes | |
network_id | network id uniquely identifies the connection to the network module in question |
static void icd_request_retry_cb | ( | gboolean | success, | |
gpointer | user_data | |||
) | [static] |
Callback for requesting retry UI dialog
success | TRUE if the UI dialog was successfully requested, FALSE otherwise | |
user_data | the request that was retried |
void icd_request_send_ack | ( | struct icd_request * | request, | |
struct icd_iap * | iap | |||
) |
Send an ACK to all D-Bus listeners
request | the request to ack | |
iap | the IAP to ack |
void icd_request_send_nack | ( | struct icd_request * | request | ) |
Send a NACK to all D-Bus listeners
request | the request to NACK |
static gboolean icd_request_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 |
void icd_request_tracking_info_add | ( | struct icd_request * | request, | |
struct icd_tracking_info * | track | |||
) |
Add tracking info to a request
request | the request | |
track | tracking info |
gboolean icd_request_tracking_info_delete | ( | const gchar * | sender | ) |
Delete a tracked user by D-Bus id
sender | the D-Bus sender |
static gpointer icd_request_tracking_info_delete_foreach | ( | struct icd_request * | request, | |
gpointer | user_data | |||
) | [static] |
Iterator function for removal by D-Bus sender id
request | the request | |
user_data | user data passed to icd_request_tracking_info_delete(). |
static void icd_request_tracking_info_free | ( | struct icd_request * | request | ) | [static] |
Free all tracking info associated with a request
request | the request |
void icd_request_tracking_info_remove | ( | struct icd_request * | request, | |
struct icd_tracking_info * | track | |||
) |
Remove tracking info to a request
request | the request | |
track | tracking info |
static gboolean icd_request_try_iap | ( | struct icd_request * | request | ) | [static] |
Check policy and try to connect IAP
request | the request |
static void icd_request_try_iap_cb | ( | enum icd_iap_status | status, | |
struct icd_iap * | iap, | |||
gpointer | user_data | |||
) | [static] |
IAP creation callback. Adds the IAP to the iap context list on success, frees the IAP and tries with a next one if the IAP failed.
status | status of the IAP creation | |
iap | the iap that was tried; the IAP must not be freed in this callback | |
user_data | the request |
static void icd_request_update_status | ( | enum icd_request_status | status, | |
struct icd_request * | request | |||
) | [static] |
Notify the caller with the status of the request. The callback will not be called after ICD_REQUEST_DISCONNECTED or ICD_REQUEST_DENIED has been reported
status | the status of the request to pass to the callback | |
request | the request whose processing is finished |
const gchar* icd_request_status_names[ICD_REQUEST_MAX] |
Initial value:
{ "ICD_REQUEST_POLICY_PENDING", "ICD_REQUEST_WAITING", "ICD_REQUEST_CHANGETO", "ICD_REQUEST_MERGED", "ICD_REQUEST_CONNECTING_IAPS", "ICD_REQUEST_SUCCEEDED", "ICD_REQUEST_DENIED", "ICD_REQUEST_DISCONNECTED" }