ICd policy API implementation
[ICd internal functions]


Classes

struct  icd_policy_api_async_data
struct  icd_policy_api_request_data
struct  icd_policy_scan_data
struct  icd_policy_module

Defines

#define ICD_POLICY_API_PREFIX   "libicd_policy_"
#define ICD_POLICY_INIT   "icd_policy_init"

Typedefs

typedef gboolean(* icd_policy_api_async_call_fn )(struct icd_policy_module *module, struct icd_policy_request *request, struct icd_policy_api_async_data *async_data)
typedef void(* icd_policy_api_request_cb_fn )(enum icd_policy_status status, struct icd_policy_request *req)

Functions

static void icd_policy_api_add_iap (struct icd_policy_request *req, gchar *service_type, guint service_attrs, gchar *service_id, gchar *network_type, guint network_attrs, gchar *network_id, gint network_priority)
static GSList * icd_policy_api_existing_requests_get (struct icd_request *new_request)
static void icd_policy_api_merge_requests (struct icd_policy_request *request_to_merge, struct icd_policy_request *existing_request)
static void icd_policy_api_make_request (guint policy_attrs, gchar *service_type, guint service_attrs, gchar *service_id, gchar *network_type, guint network_attrs, gchar *network_id)
static void icd_policy_api_async_data_free (struct icd_policy_api_async_data *data)
static gboolean icd_policy_api_run_async_next (struct icd_policy_request *req, struct icd_policy_api_async_data *async_data)
static gboolean icd_policy_api_run_async (struct icd_policy_request *req, icd_policy_api_async_call_fn call_policy, gpointer user_data)
static void icd_policy_api_request_cb (enum icd_policy_status status, struct icd_policy_request *req, gpointer policy_token)
static gboolean icd_policy_api_request_call (struct icd_policy_module *module, struct icd_policy_request *request, struct icd_policy_api_async_data *async_data)
void icd_policy_api_new_request (struct icd_policy_request *req, icd_policy_api_request_cb_fn cb, gpointer user_data)
static enum icd_policy_status icd_policy_api_run (icd_policy_api_run_module_fn policy_fn, struct icd_policy_request *request, gpointer user_data)
static enum icd_policy_status icd_policy_api_request_cancel_iter (struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)
void icd_policy_api_request_cancel (struct icd_policy_request *req)
static gboolean icd_policy_api_existing_conn_foreach (struct icd_iap *iap, gpointer user_data)
static GSList * icd_policy_api_existing_conn_get (void)
static enum icd_policy_status icd_policy_api_iap_connect_iter (struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)
enum icd_policy_status icd_policy_api_iap_connect (struct icd_policy_request *connection)
static enum icd_policy_status icd_policy_api_iap_restart_iter (struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)
enum icd_policy_status icd_policy_api_iap_restart (struct icd_policy_request *connection, guint restart_count)
static enum icd_policy_status icd_policy_api_iap_succeeded_iter (struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)
void icd_policy_api_iap_succeeded (struct icd_policy_request *connection)
static enum icd_policy_status icd_policy_api_iap_disconnect_iter (struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)
enum icd_policy_status icd_policy_api_iap_disconnect (struct icd_policy_request *connection, gint refcount)
static enum icd_policy_status icd_policy_api_iap_disconnected_iter (struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)
void icd_policy_api_iap_disconnected (struct icd_policy_request *connection, const gchar *err_str)
static enum icd_policy_status icd_policy_api_scan_stop_status_iter (struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)
void icd_policy_api_scan_stop_status (const gchar *network_type)
static enum icd_policy_status icd_policy_api_scan_start_status_iter (struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)
void icd_policy_api_scan_start_status (const gchar *network_type)
static GSList ** icd_policy_api_scan_list_get (void)
static struct
icd_policy_scan_data
icd_policy_api_scan_find (icd_policy_scan_cb_fn cb, gpointer user_data)
static void icd_policy_api_scan_result (enum icd_scan_status status, const struct icd_scan_srv_provider *srv_provider, const struct icd_scan_cache *cache_entry, gpointer user_data)
static void icd_policy_api_scan_start (const gchar *type, const guint scope, icd_policy_scan_cb_fn cb, gpointer user_data)
static void icd_policy_api_scan_stop (icd_policy_scan_cb_fn cb, gpointer user_data)
static void icd_policy_api_disconnect_iap (struct icd_policy_request *network)
static gboolean icd_policy_api_init_cb (const gchar *module_name, void *handle, gpointer init_function, gpointer data)
gboolean icd_policy_api_load_modules (struct icd_context *icd_ctx)
void icd_policy_api_unload_modules (struct icd_context *icd_ctx)

Variables

const gchar const * icd_policy_api_state []
enum icd_policy_status(* icd_policy_api_run_module_fn )(struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)

Detailed Description

The data structure of the list of requests in icd_context and the existing request list passed to icd_policy_request_new_fn usable with e.g. icd_policy_merge_requests_fn looks like the following:
 +-icd_context-+    +-GSList-------+
 |             |--->| request_list |
 +-------------+    +--------------+
                         |                    +-icd_policy_request-+
                         +---->icd_request--->| req                |<---+
                         |                    +--------------------+    |
                         |                                              |
                         |                    +-icd_policy_request-+    |
                         +---->icd_request--->| req                |<---+
                         |                    +--------------------+    |

                        ...                                            ...

                         |                    +-icd_policy_request-+    |
                         +---->icd_request--->| req                |<---+
                                              +--------------------+    |
                                                                        |
                                                        +-GSList------------+
                                                        | existing_requests |
                                                        +-------------------+
 
A policy module can make a request to wait for an external event such as UI dialog appearing by returning ICD_POLICY_WAITING. Policy processing will stop, whereby a new request is needed to clean up the waiting request. On cancelling a request, the request_cancel will be called for all policy modules to clean up an pending calls or timers left behind.

Define Documentation

#define ICD_POLICY_API_PREFIX   "libicd_policy_"

prefix for the ICd policy API modules

#define ICD_POLICY_INIT   "icd_policy_init"

name of the policy API init function

Referenced by icd_policy_api_load_modules().


Typedef Documentation

typedef gboolean(* icd_policy_api_async_call_fn)(struct icd_policy_module *module, struct icd_policy_request *request, struct icd_policy_api_async_data *async_data)

Function prototype for calling the actual asynchronous policy function

Parameters:
module the policy module
request the requested connection
async_data data for the asynchronous function call
Returns:
TRUE if the module has a policy function that will cause the callback to be called; FALSE if no policy function is called

typedef void(* icd_policy_api_request_cb_fn)(enum icd_policy_status status, struct icd_policy_request *req)

Callback for the new_connection policy request

Parameters:
status status of the policy request
policy_request the policy request structure


Function Documentation

static void icd_policy_api_add_iap ( struct icd_policy_request req,
gchar *  service_type,
guint  service_attrs,
gchar *  service_id,
gchar *  network_type,
guint  network_attrs,
gchar *  network_id,
gint  network_priority 
) [static]

Add a network connection to try in response to the policy decision. Any policy module using this function must be compatible with the corresponding network module in order to set correct *_type and *_id.

Parameters:
req 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

References icd_request_add_iap(), and icd_policy_request::request_token.

Referenced by icd_policy_api_init_cb().

static void icd_policy_api_async_data_free ( struct icd_policy_api_async_data data  )  [static]

Free async policy api data

Parameters:
data the data to free

Referenced by icd_policy_api_request_cb().

static void icd_policy_api_disconnect_iap ( struct icd_policy_request network  )  [static]

Disconnect an active IAP

Parameters:
network the network to disconnect

References ICD_POLICY_ATTRIBUTE_CONN_UI, icd_request_cancel(), ILOG_CRIT, icd_request::req, and icd_policy_request::request_token.

Referenced by icd_policy_api_init_cb().

static gboolean icd_policy_api_existing_conn_foreach ( struct icd_iap iap,
gpointer  user_data 
) [static]

Go through all connections and add them to the list in reverse order

Parameters:
iap current iap
user_data connection list
Returns:
TRUE to iterate over all connections

References icd_iap::connection.

Referenced by icd_policy_api_existing_conn_get().

static GSList* icd_policy_api_existing_conn_get ( void   )  [static]

Get the list of existing connections

Returns:
list of connections; the caller needs to free only the GSList.

References icd_iap_foreach(), and icd_policy_api_existing_conn_foreach().

Referenced by icd_policy_api_iap_connect_iter(), icd_policy_api_iap_disconnect_iter(), icd_policy_api_iap_disconnected_iter(), and icd_policy_api_iap_succeeded_iter().

static GSList* icd_policy_api_existing_requests_get ( struct icd_request new_request  )  [static]

Create the list of existing requests the current request not to add to the list

Returns:
list of requests; the caller needs to free only the GSList.

References icd_iap::connection, icd_context_get(), icd_ctx, ICD_REQUEST_DENIED, ICD_REQUEST_DISCONNECTED, icd_request::req, icd_context::request_list, icd_request::state, and icd_request::try_iaps.

Referenced by icd_policy_api_new_request(), and icd_policy_api_request_cb().

enum icd_policy_status icd_policy_api_iap_connect ( struct icd_policy_request connection  ) 

Connect policy called when ICd attempts to connect to a network

Parameters:
connection the connection that is to be tried

References icd_policy_api_iap_connect_iter(), and icd_policy_api_run().

Referenced by icd_request_try_iap().

static enum icd_policy_status icd_policy_api_iap_connect_iter ( struct icd_policy_module module,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Iterator for the connect policy

Parameters:
module the policy module
request the request to apply policy to
user_data not used

References connect, ICD_POLICY_ACCEPTED, icd_policy_api_existing_conn_get(), ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, and private.

Referenced by icd_policy_api_iap_connect().

enum icd_policy_status icd_policy_api_iap_disconnect ( struct icd_policy_request connection,
gint  refcount 
)

Disconnect policy called when ICd attempts to disconnect from a network

Parameters:
connection the connection that is to be tried
refcount a reference count on the number of applications using this connection or -1 if disconnect forced by Connectivity UI

References icd_policy_api_iap_disconnect_iter(), and icd_policy_api_run().

Referenced by icd_request_cancel().

static enum icd_policy_status icd_policy_api_iap_disconnect_iter ( struct icd_policy_module module,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Iterator for the disconnect policy

Parameters:
module the policy module
request the request to apply policy to
user_data reference count

References disconnect, ICD_POLICY_ACCEPTED, icd_policy_api_existing_conn_get(), ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, and private.

Referenced by icd_policy_api_iap_disconnect().

void icd_policy_api_iap_disconnected ( struct icd_policy_request connection,
const gchar *  err_str 
)

Informational policy to call when a network connection has been disconnected

Parameters:
connection the connection that was disconnected
err_str reason for disconnect; NULL on success

References icd_policy_api_iap_disconnected_iter(), and icd_policy_api_run().

Referenced by icd_request_try_iap_cb().

static enum icd_policy_status icd_policy_api_iap_disconnected_iter ( struct icd_policy_module module,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Iterator for the disconnected informational policy

Parameters:
module the policy module
request the request to apply policy to
user_data reason for disconnect; NULL on success
Returns:
ICD_POLICY_ACCEPTED

References disconnected, ICD_POLICY_ACCEPTED, icd_policy_api_existing_conn_get(), ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, and private.

Referenced by icd_policy_api_iap_disconnected().

enum icd_policy_status icd_policy_api_iap_restart ( struct icd_policy_request connection,
guint  restart_count 
)

Restart policy

Parameters:
connection the IAP network connection that is restarting
restart_count restart count
Returns:
ICD_POLICY_REJECTED if the limit has been exceded, ICD_POLICY_ACCEPTED otherwise

References icd_policy_api_iap_restart_iter(), and icd_policy_api_run().

Referenced by icd_iap_run_restart().

static enum icd_policy_status icd_policy_api_iap_restart_iter ( struct icd_policy_module module,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Iterator for the restart policy

Parameters:
module the policy module
request the request to apply policy to
user_data user data to pass to the module

References ICD_POLICY_ACCEPTED, ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, private, and restart.

Referenced by icd_policy_api_iap_restart().

void icd_policy_api_iap_succeeded ( struct icd_policy_request connection  ) 

Informational policy to call when a network connection has been established

Parameters:
connection the connection that was connected

References icd_policy_api_iap_succeeded_iter(), and icd_policy_api_run().

Referenced by icd_request_try_iap_cb().

static enum icd_policy_status icd_policy_api_iap_succeeded_iter ( struct icd_policy_module module,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Iterator for the connection succeeded informational policy

Parameters:
module the policy module
request the request to apply policy to
user_data not used
Returns:
ICD_POLICY_ACCEPTED

References connected, ICD_POLICY_ACCEPTED, icd_policy_api_existing_conn_get(), ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, and private.

Referenced by icd_policy_api_iap_succeeded().

static gboolean icd_policy_api_init_cb ( const gchar *  module_name,
void *  handle,
gpointer  init_function,
gpointer  data 
) [static]

Initialize the loaded module

Parameters:
module_name module filename without path
handle module handle; used for unloading
init_function module init function
data icd context
Returns:
TRUE on success, FALSE on failure

Todo:
make init return TRUE on success and FALSE on failure whereby the module is unloaded

References icd_policy_module::handle, icd_ctx, icd_network_priority(), icd_policy_api_add_iap(), icd_policy_api_disconnect_iap(), icd_policy_api_make_request(), icd_policy_api_merge_requests(), icd_policy_api_scan_start(), icd_policy_api_scan_stop(), icd_srv_provider_check(), icd_policy_module::name, icd_policy_module::policy, and icd_context::policy_module_list.

Referenced by icd_policy_api_load_modules().

gboolean icd_policy_api_load_modules ( struct icd_context icd_ctx  ) 

Load all policy API modules

Parameters:
icd_ctx icd context
Returns:
the status from icd_plugin_load_all

References icd_plugin_load_list(), icd_policy_api_init_cb(), ICD_POLICY_INIT, and icd_policy_modules_get().

Referenced by main().

static void icd_policy_api_make_request ( guint  policy_attrs,
gchar *  service_type,
guint  service_attrs,
gchar *  service_id,
gchar *  network_type,
guint  network_attrs,
gchar *  network_id 
) [static]

Function to create a new request

Parameters:
policy_attrs ICD_POLICY_ATTRIBUTE_* attributes
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

References icd_request_make(), and icd_request_new().

Referenced by icd_policy_api_init_cb().

static void icd_policy_api_merge_requests ( struct icd_policy_request request_to_merge,
struct icd_policy_request existing_request 
) [static]

Merge two request together and free the request_to_merge structure.

Parameters:
request_to_merge the request that will be joined with the existing one. The structure will also be freed and may point to anything after that.
existing_request the request that continues to exists after a merge

References icd_request_merge(), ILOG_CRIT, and icd_policy_request::request_token.

Referenced by icd_policy_api_init_cb().

void icd_policy_api_new_request ( struct icd_policy_request req,
icd_policy_api_request_cb_fn  cb,
gpointer  user_data 
)

New request policy

Parameters:
req the new request
cb the callback to call with the policy decision
user_data user data to pass to the callback

References icd_policy_api_request_data::cb, icd_policy_api_request_data::existing_requests, ICD_POLICY_ACCEPTED, icd_policy_api_existing_requests_get(), icd_policy_api_request_call(), icd_policy_api_run_async(), ILOG_INFO, icd_policy_request::request_token, and icd_policy_api_request_data::user_data.

Referenced by icd_request_make().

static gboolean icd_policy_api_request_call ( struct icd_policy_module module,
struct icd_policy_request request,
struct icd_policy_api_async_data async_data 
) [static]

Function that calls the new_request policy module function

Parameters:
module the policy module
request the requested network
async_data policy structure to pass as the policy_token to the policy module funcion
Returns:
TRUE if the module has a policy function that will cause the callback to be called; FALSE if no policy function is called

References icd_policy_api_request_data::existing_requests, icd_policy_api_request_cb(), ILOG_INFO, icd_policy_module::name, new_request, icd_policy_module::policy, private, and icd_policy_api_async_data::user_data.

Referenced by icd_policy_api_new_request().

void icd_policy_api_request_cancel ( struct icd_policy_request req  ) 

Cancel a request that is in ICD_POLICY_WAITING state by informing each policy module.

Parameters:
req the policy request structure

References icd_policy_api_request_cancel_iter(), icd_policy_api_run(), ICD_REQUEST_POLICY_PENDING, ICD_REQUEST_WAITING, ILOG_ERR, icd_policy_request::request_token, and icd_request::state.

Referenced by icd_request_cancel(), and icd_request_merge().

static enum icd_policy_status icd_policy_api_request_cancel_iter ( struct icd_policy_module module,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Module iterator for the 'cancel_request' function.

Parameters:
module the policy module
request the request to cancel
user_data user data; not used
Returns:
ICD_POLICY_ACCEPTED to iterate through all policy modules

References cancel_request, ICD_POLICY_ACCEPTED, ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, and private.

Referenced by icd_policy_api_request_cancel().

static void icd_policy_api_request_cb ( enum icd_policy_status  status,
struct icd_policy_request req,
gpointer  policy_token 
) [static]

Status callback for the new request policy function

Parameters:
status status of the new request function
req the policy request
policy_token data for the async policy function call

References icd_policy_api_request_data::cb, icd_policy_api_request_data::existing_requests, ICD_POLICY_ACCEPTED, icd_policy_api_async_data_free(), icd_policy_api_existing_requests_get(), icd_policy_api_run_async_next(), ICD_POLICY_MERGED, ILOG_DEBUG, ILOG_INFO, icd_policy_request::request_token, and icd_policy_api_async_data::user_data.

Referenced by icd_policy_api_request_call().

static enum icd_policy_status icd_policy_api_run ( icd_policy_api_run_module_fn  policy_fn,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Iterate over all the modules and call the policy callback function for each of them.

Parameters:
policy_fn the policy callback function call for each module
request the request to apply policy to
user_data user data to pass to the function
Returns:
enum icd_policy_status

References icd_context_get(), icd_ctx, ICD_POLICY_ACCEPTED, ICD_POLICY_REJECTED, ILOG_ERR, ILOG_WARN, and icd_context::policy_module_list.

Referenced by icd_policy_api_iap_connect(), icd_policy_api_iap_disconnect(), icd_policy_api_iap_disconnected(), icd_policy_api_iap_restart(), icd_policy_api_iap_succeeded(), icd_policy_api_request_cancel(), icd_policy_api_scan_start_status(), and icd_policy_api_scan_stop_status().

static gboolean icd_policy_api_run_async ( struct icd_policy_request req,
icd_policy_api_async_call_fn  call_policy,
gpointer  user_data 
) [static]

Initialize the asynchronous policy module function data and start running the policy modules one by one

Parameters:
req the request
call_policy the function that calls the policy module function with correct parameters
user_data user data for the function
Returns:
TRUE if an asynchronous policy module function got called, FALSE if no policy module contained any suitable functions

References icd_policy_api_async_data::call_policy, icd_context_get(), icd_ctx, icd_policy_api_run_async_next(), ILOG_DEBUG, icd_policy_api_async_data::module_list, icd_context::policy_module_list, and icd_policy_api_async_data::user_data.

Referenced by icd_policy_api_new_request().

static gboolean icd_policy_api_run_async_next ( struct icd_policy_request req,
struct icd_policy_api_async_data async_data 
) [static]

Call an asynchronous policy module function

Parameters:
req the request
async_data policy data
Returns:
TRUE if a module was called; FALSE if there were no more modules to call

References icd_policy_api_async_data::call_policy, and icd_policy_api_async_data::module_list.

Referenced by icd_policy_api_request_cb(), and icd_policy_api_run_async().

static struct icd_policy_scan_data* icd_policy_api_scan_find ( icd_policy_scan_cb_fn  cb,
gpointer  user_data 
) [static, read]

Find callback and user data

Parameters:
cb callback
user_data user_data

References icd_policy_scan_data::cb, icd_policy_api_scan_list_get(), and icd_policy_scan_data::user_data.

Referenced by icd_policy_api_scan_stop().

static GSList** icd_policy_api_scan_list_get ( void   )  [static]

Get the callback and user data list

Returns:
the list

Referenced by icd_policy_api_scan_find(), icd_policy_api_scan_start(), and icd_policy_api_scan_stop().

static void icd_policy_api_scan_result ( enum icd_scan_status  status,
const struct icd_scan_srv_provider srv_provider,
const struct icd_scan_cache cache_entry,
gpointer  user_data 
) [static]

static void icd_policy_api_scan_start ( const gchar *  type,
const guint  scope,
icd_policy_scan_cb_fn  cb,
gpointer  user_data 
) [static]

Function for a module to request a network scan. icd_policy_api_scan_stop() has to be called as many times as this function is called even if the same callback and user_data pair are added.

Parameters:
type network type
scope scan scope
cb callback function to call with scan results
user_data user data to pass to the callback function

References icd_policy_scan_data::cb, ICD_NW_LEVEL_NONE, icd_policy_api_scan_list_get(), icd_policy_api_scan_result(), ICD_POLICY_SCAN_DONE, icd_scan_results_request(), ILOG_CRIT, ILOG_DEBUG, and icd_policy_scan_data::user_data.

Referenced by icd_policy_api_init_cb().

void icd_policy_api_scan_start_status ( const gchar *  network_type  ) 

Start scan informational policy

Parameters:
network_type network type to start scan for

References icd_policy_api_run(), and icd_policy_api_scan_start_status_iter().

static enum icd_policy_status icd_policy_api_scan_start_status_iter ( struct icd_policy_module module,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Start scan iterator function

Parameters:
module the policy module
request NULL
user_data network type
Returns:
ICD_POLICY_ACCEPTED

References ICD_POLICY_ACCEPTED, ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, private, and scan_start.

Referenced by icd_policy_api_scan_start_status().

static void icd_policy_api_scan_stop ( icd_policy_scan_cb_fn  cb,
gpointer  user_data 
) [static]

Stop returning scan results for the given callback and user data

Parameters:
cb scan callback
user_data user_data given in icd_policy_api_scan_start()

References icd_policy_api_scan_find(), icd_policy_api_scan_list_get(), icd_policy_api_scan_result(), icd_scan_results_unregister(), and ILOG_ERR.

Referenced by icd_policy_api_init_cb().

void icd_policy_api_scan_stop_status ( const gchar *  network_type  ) 

Stop scan informational policy

Parameters:
network_type network type to start scan for

References icd_policy_api_run(), and icd_policy_api_scan_stop_status_iter().

static enum icd_policy_status icd_policy_api_scan_stop_status_iter ( struct icd_policy_module module,
struct icd_policy_request request,
gpointer  user_data 
) [static]

Stop scan iterator function

Parameters:
module the policy module
request NULL
user_data network type
Returns:
ICD_POLICY_ACCEPTED

References ICD_POLICY_ACCEPTED, ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, private, and scan_stop.

Referenced by icd_policy_api_scan_stop_status().

void icd_policy_api_unload_modules ( struct icd_context icd_ctx  ) 

Unload all policy modules

Parameters:
icd_ctx icd context

References destruct, icd_policy_module::handle, icd_plugin_unload_module(), ILOG_INFO, icd_policy_module::name, icd_policy_module::policy, icd_context::policy_module_list, and private.

Referenced by main().


Variable Documentation

enum icd_policy_status(* icd_policy_api_run_module_fn)(struct icd_policy_module *module, struct icd_policy_request *request, gpointer user_data)

Policy module function that will be called once for each policy module until ICD_POLICY_REJECTED is returned

Parameters:
module the policy module
request the request to apply policy to
user_data user data to pass to the module
Returns:
ICD_POLICY_REJECTED if the policy got rejected, ICD_POLICY_ACCEPTED otherwise

const gchar const* icd_policy_api_state[]

Initial value:

 {
  "ICD_POLICY_ACCEPTED",
  "ICD_POLICY_MERGED",
  "ICD_POLICY_WAITING",
  "ICD_POLICY_REJECTED"
}


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