00001 #ifndef ICD_SRV_PROVIDER_H 00002 #define ICD_SRV_PROVIDER_H 00003 00012 #include <glib.h> 00013 00014 #include "icd_context.h" 00015 #include "icd_network_api.h" 00016 #include "icd_scan.h" 00017 #include "icd_iap.h" 00018 #include "srv_provider_api.h" 00019 00025 struct icd_srv_module { 00027 void *handle; 00029 gchar *name; 00030 00032 GSList *pid_list; 00034 struct icd_srv_api srv; 00035 00036 }; 00037 00045 typedef gboolean 00046 (*icd_srv_provider_foreach_module_fn) (struct icd_srv_module* module, 00047 gpointer user_data); 00048 00056 struct icd_srv_module * 00057 icd_srv_provider_foreach_module (struct icd_context *icd_ctx, 00058 icd_srv_provider_foreach_module_fn foreach_fn, 00059 gpointer user_data); 00060 00066 typedef void (*icd_srv_provider_connect_cb_fn) (enum icd_srv_status status, 00067 const gchar *err_str, 00068 gpointer user_data); 00069 00074 typedef void (*icd_srv_provider_disconnect_cb_fn) (enum icd_srv_status status, 00075 gpointer user_data); 00076 00083 gboolean icd_srv_provider_disconnect (struct icd_iap *iap, 00084 icd_srv_provider_disconnect_cb_fn cb, 00085 gpointer user_data); 00086 00091 gboolean icd_srv_provider_has_next (struct icd_iap *iap); 00092 00099 gboolean icd_srv_provider_connect (struct icd_iap *iap, 00100 icd_srv_provider_connect_cb_fn cb, 00101 gpointer user_data); 00102 00108 gboolean icd_srv_provider_identify (struct icd_network_module *nw_module, 00109 struct icd_scan_cache *cache_entry, 00110 enum icd_scan_status status); 00111 00119 gboolean icd_srv_provider_notify_pid (struct icd_context *icd_ctx, 00120 const pid_t pid, 00121 const gint exit_value); 00122 00127 gboolean icd_srv_provider_load_modules (struct icd_context *icd_ctx); 00128 00132 void icd_srv_provider_unload_modules (struct icd_context *icd_ctx); 00133 00138 gboolean icd_srv_provider_check (const gchar *network_type); 00139 00142 #endif