Network disconnect reference count
[Policy modules]


Defines

#define POLICY_NW_DISCONNECT_USER_REFCOUNT_GCONF_PATH
#define POLICY_NW_DISCONNECT_CANCELS_ALWAYS_ONLINE_GCONF_PATH

Functions

void icd_policy_init (struct icd_policy_api *policy_api, icd_policy_nw_add_fn add_network, icd_policy_request_merge_fn merge_requests)
static gboolean policy_nw_disconnect_user_refcount (void)
static gboolean policy_nw_disconnect_cancel_always_online (void)
static void policy_nw_disconnect_unset_always_online (void)
static enum icd_policy_status policy_nw_disconnect (struct icd_policy_request *network, gint reference_count, GSList *existing_connections, gpointer *private)

Define Documentation

#define POLICY_NW_DISCONNECT_CANCELS_ALWAYS_ONLINE_GCONF_PATH

Value:

ICD_GCONF_SETTINGS \
                     "/policy/policy_nw_disconnect/cancel_always_online"
Knob to cancel always online when disconnecting

Referenced by policy_nw_disconnect_cancel_always_online().

#define POLICY_NW_DISCONNECT_USER_REFCOUNT_GCONF_PATH

Value:

ICD_GCONF_SETTINGS \
                     "/policy/policy_nw_disconnect/user_refcount"
Knob to enable D-Bus api user reference counting whereby the last user disconnects the connection

Referenced by policy_nw_disconnect_user_refcount().


Function Documentation

void icd_policy_init ( struct icd_policy_api policy_api,
icd_policy_nw_add_fn  add_network,
icd_policy_request_merge_fn  merge_requests 
)

Policy module initialization function.

Parameters:
policy_api policy API structure to be filled in by the module
add_network function to add a network in response to a policy
merge_requests function to merge requests

static enum icd_policy_status policy_nw_disconnect ( struct icd_policy_request network,
gint  reference_count,
GSList *  existing_connections,
gpointer *  private 
) [static]

Network disconnection reference counting

Parameters:
network the network to disconnect
reference_count the number of applications using this connection or -1 on forced disconnect from the Connectivity UI
existing_connections existing network connections
private not used
Todo:
other piece of information needed to make a decision

References ICD_POLICY_ACCEPTED, ICD_POLICY_REJECTED, ILOG_INFO, policy_nw_disconnect_cancel_always_online(), policy_nw_disconnect_unset_always_online(), and policy_nw_disconnect_user_refcount().

static gboolean policy_nw_disconnect_cancel_always_online ( void   )  [static]

Check whether disconnecting means turning off always online

Returns:
whether "Disconnect" turns off always online

References ILOG_DEBUG, and POLICY_NW_DISCONNECT_CANCELS_ALWAYS_ONLINE_GCONF_PATH.

Referenced by policy_nw_disconnect().

static void policy_nw_disconnect_unset_always_online ( void   )  [static]

Turn off always online by setting search interval to zero

References ILOG_DEBUG.

Referenced by policy_nw_disconnect().

static gboolean policy_nw_disconnect_user_refcount ( void   )  [static]

Read the reference counting boolean value from gconf

Returns:
whether reference counting has been enabled

References ILOG_DEBUG, and POLICY_NW_DISCONNECT_USER_REFCOUNT_GCONF_PATH.

Referenced by policy_nw_disconnect().


Generated on Thu Mar 11 09:04:50 2010 for ICd2 by  doxygen 1.5.6