Merge a new request with an already existing one
[Policy modules]


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_merge_string_equal (const gchar *a, const gchar *b)
static void policy_merge_request (struct icd_policy_request *new_request, const GSList *existing_requests, icd_policy_request_new_cb_fn policy_done_cb, gpointer policy_token, gpointer *private)

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 void policy_merge_request ( struct icd_policy_request new_request,
const GSList *  existing_requests,
icd_policy_request_new_cb_fn  policy_done_cb,
gpointer  policy_token,
gpointer *  private 
) [static]

Merge a new request with an already existing one

Parameters:
new_request the new connection request
existing_requests currently existing requests
policy_done_cb callback to call when policy has been decided
policy_token token to pass to the callback
private the private memeber of the icd_request_api structure

References icd_policy_request::attrs, ICD_NW_ATTR_LOCALMASK, ICD_POLICY_ACCEPTED, ICD_POLICY_ATTRIBUTE_ALWAYS_ONLINE_CHANGE, ICD_POLICY_ATTRIBUTE_BACKGROUND, ICD_POLICY_ATTRIBUTE_HAS_CONNECTIONS, ICD_POLICY_MERGED, ICD_POLICY_REJECTED, ILOG_DEBUG, ILOG_INFO, icd_policy_request::network_attrs, icd_policy_request::network_id, icd_policy_request::network_type, policy_merge_string_equal(), and icd_policy_request::request_token.

static gboolean policy_merge_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

Parameters:
a string A
b string B
Returns:
TRUE if equal, FALSE if unequal

Referenced by policy_merge_request().


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