56 |
|
|
57 |
/* Keycache refresh context. */ |
/* Keycache refresh context. */ |
58 |
struct refresh_cache_s { |
struct refresh_cache_s { |
59 |
int kr_reload; |
int kring_update; /* update the keyring cache. */ |
60 |
int kr_update; |
int sig_update; /* update the signature cache. */ |
|
int tr_update; |
|
61 |
}; |
}; |
62 |
|
|
63 |
|
|
90 |
char* get_gnupg_default_key (void); |
char* get_gnupg_default_key (void); |
91 |
int set_gnupg_default_key (const char *key); |
int set_gnupg_default_key (const char *key); |
92 |
char* get_gnupg_config (void); |
char* get_gnupg_config (void); |
|
char* get_gnupg_keyring_from_options (const char *fname, int pub); |
|
93 |
int check_gnupg_config (const char *fname, int *secrings, int *pubrings); |
int check_gnupg_config (const char *fname, int *secrings, int *pubrings); |
94 |
char* get_gnupg_path (void); |
char* get_gnupg_path (void); |
95 |
int check_gnupg_prog (void); |
int check_gnupg_prog (void); |
153 |
typedef struct conf_option_s *conf_option_t; |
typedef struct conf_option_s *conf_option_t; |
154 |
|
|
155 |
struct conf_member_s { |
struct conf_member_s { |
156 |
struct conf_member_s *next; |
struct conf_member_s * next; |
157 |
char *name; |
char *name; |
158 |
unsigned int used:1; |
unsigned int used:1; |
159 |
}; |
}; |
168 |
typedef struct conf_group_s *conf_group_t; |
typedef struct conf_group_s *conf_group_t; |
169 |
|
|
170 |
struct conf_file_s { |
struct conf_file_s { |
171 |
struct conf_option_s *list; |
conf_option_t list; |
172 |
struct conf_group_s *grp; |
conf_group_t grp; |
173 |
}; |
}; |
174 |
typedef struct conf_file_s *config_file_t; |
typedef struct conf_file_s *config_file_t; |
175 |
|
|
176 |
/* find */ |
/* find/delete/add */ |
177 |
conf_group_t conf_find_group( config_file_t opt, const char *str ); |
conf_group_t conf_find_group (config_file_t opt, const char *str); |
178 |
conf_option_t conf_find_option( config_file_t opt, const char *str ); |
conf_option_t conf_find_option (config_file_t opt, const char *str); |
179 |
conf_member_t conf_find_member( config_file_t opt, const char *grp, const char *str ); |
conf_member_t conf_find_member (config_file_t opt, |
180 |
/* delete */ |
const char *grp, const char *str); |
181 |
int conf_delete_group( config_file_t opt, const char *str ); |
int conf_delete_group (config_file_t opt, const char *str); |
182 |
int conf_delete_member( config_file_t opt, const char *grp, const char *str ); |
int conf_delete_member (config_file_t opt, const char *grp, const char *str); |
183 |
int conf_delete_option( config_file_t opt, const char *str ); |
int conf_delete_option (config_file_t opt, const char *str); |
184 |
/* add */ |
int conf_modify_entry (config_file_t opt, int type, const char *name, const char *val); |
185 |
int conf_modify_entry( config_file_t opt, int type, const char *name, const char *val ); |
int conf_add_entry (config_file_t opt, int type, const char *name, const char *val); |
|
int conf_add_entry( config_file_t opt, int type, const char *name, const char *val ); |
|
186 |
int conf_add_entry_int (config_file_t opt, int type, const char *name, int val); |
int conf_add_entry_int (config_file_t opt, int type, const char *name, int val); |
187 |
int conf_add_member( config_file_t opt, const char *grp, const char *str ); |
int conf_add_member (config_file_t opt, const char *grp, const char *str); |
188 |
int conf_add_group( config_file_t opt, const char *str ); |
int conf_add_group (config_file_t opt, const char *str); |
189 |
/* high-level */ |
/* high-level */ |
190 |
void new_config (config_file_t *r_opt); |
void new_config (config_file_t *r_opt); |
191 |
int parse_config (const char *file, config_file_t *r_opt); |
int parse_config (const char *file, config_file_t *r_opt); |
192 |
int commit_config (const char *file, config_file_t opt); |
int commit_config (const char *file, config_file_t opt); |
193 |
void release_config (config_file_t opt); |
void release_config (config_file_t opt); |
194 |
/* memory */ |
void release_group (conf_group_t grp); |
|
void release_group( conf_group_t grp ); |
|
195 |
|
|
196 |
/*-- wptPassphraseCB.cpp --*/ |
/*-- wptPassphraseCB.cpp --*/ |
197 |
enum passdlg_t { |
enum passdlg_t { |
198 |
PASSDLG_REPEAT = 0, |
PASSDLG_REPEAT = 0, /* indicate the dialig is in the 'repeat passwd' state. */ |
199 |
PASSDLG_INIT = 1, |
PASSDLG_INIT = 1, |
200 |
PASSDLG_STRICT = 2, |
PASSDLG_STRICT = 2, |
201 |
PASSDLG_NOTEMPTY= 4, |
PASSDLG_NOTEMPTY= 4, |
202 |
PASSDLG_WARN_UTF8=8, |
PASSDLG_WARN_UTF8=8, |
250 |
gpgme_error_t gpg_get_recipients (const char *file, gpgme_recipient_t *r_list); |
gpgme_error_t gpg_get_recipients (const char *file, gpgme_recipient_t *r_list); |
251 |
gpgme_error_t gpg_find_key_subpacket (const char *key, int subpktid, |
gpgme_error_t gpg_find_key_subpacket (const char *key, int subpktid, |
252 |
char **value); |
char **value); |
253 |
|
int gpg_check_return_code (const char *args); |
254 |
|
|
255 |
#endif /* WPT_GPG_H */ |
#endif /* WPT_GPG_H */ |