mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Print export statistics to the status-fd.
* common/status.h (STATUS_EXPORT_RES): New. * g10/main.h (export_stats_t): New. * g10/export.c (export_stats_s): New. (export_new_stats, export_release_stats): New. (export_print_stats): New. (export_pubkeys, export_seckeys, export_secsubkeys) (export_pubkey_buffer, do_export): Add arg "stats". (do_export_stream): Add arg stats and update it. * g10/gpg.c (main) <aExport, aExportSecret, aExportSecretSub>: Create, pass, and print a stats object to the export function calls. * g10/export.c (export_pubkeys_stream): Remove unused function. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
a3b26d6c08
commit
e3c48335f9
9 changed files with 172 additions and 51 deletions
19
g10/main.h
19
g10/main.h
|
@ -339,16 +339,25 @@ int collapse_uids( KBNODE *keyblock );
|
|||
|
||||
|
||||
/*-- export.c --*/
|
||||
struct export_stats_s;
|
||||
typedef struct export_stats_s *export_stats_t;
|
||||
|
||||
export_stats_t export_new_stats (void);
|
||||
void export_release_stats (export_stats_t stats);
|
||||
void export_print_stats (export_stats_t stats);
|
||||
|
||||
int parse_export_options(char *str,unsigned int *options,int noisy);
|
||||
int export_pubkeys (ctrl_t ctrl, strlist_t users, unsigned int options );
|
||||
int export_pubkeys_stream (ctrl_t ctrl, iobuf_t out, strlist_t users,
|
||||
kbnode_t *keyblock_out, unsigned int options );
|
||||
|
||||
int export_pubkeys (ctrl_t ctrl, strlist_t users, unsigned int options,
|
||||
export_stats_t stats);
|
||||
int export_seckeys (ctrl_t ctrl, strlist_t users, export_stats_t stats);
|
||||
int export_secsubkeys (ctrl_t ctrl, strlist_t users, export_stats_t stats);
|
||||
|
||||
gpg_error_t export_pubkey_buffer (ctrl_t ctrl, const char *keyspec,
|
||||
unsigned int options,
|
||||
export_stats_t stats,
|
||||
kbnode_t *r_keyblock,
|
||||
void **r_data, size_t *r_datalen);
|
||||
int export_seckeys (ctrl_t ctrl, strlist_t users);
|
||||
int export_secsubkeys (ctrl_t ctrl, strlist_t users);
|
||||
|
||||
/*-- dearmor.c --*/
|
||||
int dearmor_file( const char *fname );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue