|
|
|
@ -41,15 +41,12 @@ typedef int (*fn_put_file)(gfsec_scheme_t,
|
|
|
|
|
unsigned char *, |
|
|
|
|
size_t); |
|
|
|
|
|
|
|
|
|
typedef void (*fn_lst_auth)(FILE *); |
|
|
|
|
|
|
|
|
|
typedef int (*fn_get_supp)(gfsec_supports_list_t *); |
|
|
|
|
|
|
|
|
|
typedef struct module { |
|
|
|
|
int present; |
|
|
|
|
fn_get_file get_file; |
|
|
|
|
fn_put_file put_file; |
|
|
|
|
fn_lst_auth lst_auth; |
|
|
|
|
fn_get_supp get_supp; |
|
|
|
|
} module_t; |
|
|
|
|
|
|
|
|
@ -68,7 +65,6 @@ gfsec_scheme_module_init(void)
|
|
|
|
|
|
|
|
|
|
mods[n].get_file = gfsec_scheme_file_get_file; |
|
|
|
|
mods[n].put_file = gfsec_scheme_file_put_file; |
|
|
|
|
mods[n].lst_auth = gfsec_scheme_file_lst_auth; |
|
|
|
|
mods[n].get_supp = gfsec_scheme_file_get_supports; |
|
|
|
|
mods[n++].present = 1; |
|
|
|
|
|
|
|
|
@ -76,7 +72,6 @@ gfsec_scheme_module_init(void)
|
|
|
|
|
LIBMTP_Init(); |
|
|
|
|
mods[n].get_file = gfsec_scheme_libmtp_get_file; |
|
|
|
|
mods[n].put_file = gfsec_scheme_libmtp_put_file; |
|
|
|
|
mods[n].lst_auth = gfsec_scheme_libmtp_lst_auth; |
|
|
|
|
mods[n].get_supp = gfsec_scheme_libmtp_get_supports; |
|
|
|
|
mods[n++].present = 1; |
|
|
|
|
#endif |
|
|
|
@ -84,7 +79,6 @@ gfsec_scheme_module_init(void)
|
|
|
|
|
#ifdef HAVE_GIO |
|
|
|
|
mods[n].get_file = gfsec_scheme_gio_get_file; |
|
|
|
|
mods[n].put_file = gfsec_scheme_gio_put_file; |
|
|
|
|
mods[n].lst_auth = gfsec_scheme_gio_lst_auth; |
|
|
|
|
mods[n].get_supp = gfsec_scheme_gio_get_supports; |
|
|
|
|
mods[n++].present = 1; |
|
|
|
|
#endif |
|
|
|
@ -172,22 +166,6 @@ gfsec_scheme_module_put_file(gfsec_scheme_t scheme,
|
|
|
|
|
return rc; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List currently available authorities reported by all modules. |
|
|
|
|
* |
|
|
|
|
* @param f The stream to write into. |
|
|
|
|
*/ |
|
|
|
|
void |
|
|
|
|
gfsec_scheme_module_list_authorities(FILE *f) |
|
|
|
|
{ |
|
|
|
|
module_t *mod; |
|
|
|
|
|
|
|
|
|
for ( mod = modules; mod->present; mod++ ) { |
|
|
|
|
if ( mod->lst_auth ) |
|
|
|
|
mod->lst_auth(f); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get a list of currently available supports. |
|
|
|
|
* |
|
|
|
|