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

#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


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

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

static void policy_nw_disconnect_unset_always_online ( void   )  [static]

Turn off always online by setting search interval to zero

static gboolean policy_nw_disconnect_user_refcount ( void   )  [static]

Read the reference counting boolean value from gconf

Returns:
whether reference counting has been enabled


Generated on Tue Feb 24 16:21:36 2009 for ICd2 by  doxygen 1.5.1