00001 #ifndef ICD_POLICY_API_H 00002 #define ICD_POLICY_API_H 00003 00012 #include <glib.h> 00013 00014 #include "icd_context.h" 00015 #include "policy_api.h" 00016 00022 struct icd_policy_module { 00024 gpointer handle; 00026 gchar *name; 00028 struct icd_policy_api policy; 00029 }; 00030 00035 typedef void 00036 (*icd_policy_api_request_cb_fn) (enum icd_policy_status status, 00037 struct icd_policy_request *req); 00038 00039 void icd_policy_api_new_request (struct icd_policy_request *request, 00040 icd_policy_api_request_cb_fn cb, 00041 gpointer user_data); 00042 void icd_policy_api_request_cancel (struct icd_policy_request *req); 00043 00044 enum icd_policy_status 00045 icd_policy_api_iap_connect (struct icd_policy_request *req); 00046 enum icd_policy_status 00047 icd_policy_api_iap_restart (struct icd_policy_request *request, 00048 guint restart_count); 00049 void icd_policy_api_iap_succeeded (struct icd_policy_request *req); 00050 enum icd_policy_status 00051 icd_policy_api_iap_disconnect (struct icd_policy_request *connection, 00052 gint refcount); 00053 void icd_policy_api_iap_disconnected (struct icd_policy_request *req, 00054 const gchar *err_str); 00055 00056 void icd_policy_api_scan_stop_status (const gchar *network_type); 00057 void icd_policy_api_scan_start_status (const gchar *network_type); 00058 00059 gboolean icd_policy_api_load_modules (struct icd_context *icd_ctx); 00060 void icd_policy_api_unload_modules (struct icd_context *icd_ctx); 00061 00064 #endif