From: Marcus Brinkmann Date: Thu, 24 Apr 2003 15:58:49 +0000 (+0000) Subject: 2003-04-24 Marcus Brinkmann X-Git-Tag: gpgme-0-4-1~88 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e927e5c617629c54cf41d5b99b740b6ab94db47b;p=gpgme.git 2003-04-24 Marcus Brinkmann * context.h (struct gpgme_context_s): Remove member verbosity. * gpgme.c (gpgme_new): Do not set member verbosity. * engine.h (_gpgme_engine_set_verbosity): Remove prototype. * engine.c (_gpgme_engine_set_verbosity): Remove function. * engine-backend.h (struct engine_ops): Remove set_verbosity. * engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Remove set_verbosity member. * rungpg.c (_gpgme_engine_ops_gpg): Likewise. (gpg_set_verbosity): Remove function. * decrypt.c (_gpgme_decrypt_start): Don't call _gpgme_engine_set_verbosity. * delete.c (_gpgme_op_delete_start): Likewise. * edit.c (_gpgme_op_edit_start): Likewise. * encrypt.c (_gpgme_op_encrypt_start): Likewise. * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise. * export.c (_gpgme_op_export_start): Likewise. * genkey.c (_gpgme_op_genkey_start): Likewise. * import.c (_gpgme_op_import_start): Likewise. * keylist.c (gpgme_op_keylist_start): Likewise. (gpgme_op_keylist_ext_start): Likewise. * sign.c (_gpgme_op_sign_start): Likewise. * verify.c (_gpgme_op_verify_start): Likewise. --- diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 1b4d0b5..af28e5a 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,5 +1,27 @@ 2003-04-24 Marcus Brinkmann + * context.h (struct gpgme_context_s): Remove member verbosity. + * gpgme.c (gpgme_new): Do not set member verbosity. + * engine.h (_gpgme_engine_set_verbosity): Remove prototype. + * engine.c (_gpgme_engine_set_verbosity): Remove function. + * engine-backend.h (struct engine_ops): Remove set_verbosity. + * engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Remove set_verbosity member. + * rungpg.c (_gpgme_engine_ops_gpg): Likewise. + (gpg_set_verbosity): Remove function. + * decrypt.c (_gpgme_decrypt_start): Don't call + _gpgme_engine_set_verbosity. + * delete.c (_gpgme_op_delete_start): Likewise. + * edit.c (_gpgme_op_edit_start): Likewise. + * encrypt.c (_gpgme_op_encrypt_start): Likewise. + * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise. + * export.c (_gpgme_op_export_start): Likewise. + * genkey.c (_gpgme_op_genkey_start): Likewise. + * import.c (_gpgme_op_import_start): Likewise. + * keylist.c (gpgme_op_keylist_start): Likewise. + (gpgme_op_keylist_ext_start): Likewise. + * sign.c (_gpgme_op_sign_start): Likewise. + * verify.c (_gpgme_op_verify_start): Likewise. + * Makefile.am (libgpgme_la_SOURCES): Add key-cache.c. * key.c (key_cache_initialized, key_cache_size, key_cache_max_chain_length, ): Removed. @@ -3294,4 +3316,3 @@ This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - diff --git a/gpgme/context.h b/gpgme/context.h index 41f25c6..748dd2e 100644 --- a/gpgme/context.h +++ b/gpgme/context.h @@ -81,8 +81,6 @@ struct gpgme_context_s /* The running engine process. */ EngineObject engine; - /* Level of verbosity to use. */ - int verbosity; int use_armor; int use_textmode; int keylist_mode; diff --git a/gpgme/decrypt.c b/gpgme/decrypt.c index 40ae932..a27e156 100644 --- a/gpgme/decrypt.c +++ b/gpgme/decrypt.c @@ -188,7 +188,6 @@ _gpgme_decrypt_start (GpgmeCtx ctx, int synchronous, goto leave; _gpgme_engine_set_status_handler (ctx->engine, status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); err = _gpgme_engine_op_decrypt (ctx->engine, ciph, plain); diff --git a/gpgme/delete.c b/gpgme/delete.c index 1bed6d5..9e8ebe9 100644 --- a/gpgme/delete.c +++ b/gpgme/delete.c @@ -75,7 +75,6 @@ _gpgme_op_delete_start (GpgmeCtx ctx, int synchronous, goto leave; _gpgme_engine_set_status_handler (ctx->engine, delete_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); err = _gpgme_engine_op_delete (ctx->engine, key, allow_secret); diff --git a/gpgme/edit.c b/gpgme/edit.c index e46f42b..f729196 100644 --- a/gpgme/edit.c +++ b/gpgme/edit.c @@ -121,8 +121,6 @@ _gpgme_op_edit_start (GpgmeCtx ctx, int synchronous, _gpgme_engine_set_status_handler (ctx->engine, edit_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); - err = _gpgme_engine_op_edit (ctx->engine, key, out, ctx); leave: diff --git a/gpgme/encrypt-sign.c b/gpgme/encrypt-sign.c index b20f2b3..2ed1b1c 100644 --- a/gpgme/encrypt-sign.c +++ b/gpgme/encrypt-sign.c @@ -59,7 +59,6 @@ _gpgme_op_encrypt_sign_start (GpgmeCtx ctx, int synchronous, _gpgme_engine_set_status_handler (ctx->engine, encrypt_sign_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); /* Check the supplied data */ if (!plain) diff --git a/gpgme/encrypt.c b/gpgme/encrypt.c index 7679d74..86de371 100644 --- a/gpgme/encrypt.c +++ b/gpgme/encrypt.c @@ -188,7 +188,6 @@ _gpgme_op_encrypt_start (GpgmeCtx ctx, int synchronous, ? _gpgme_encrypt_sym_status_handler : _gpgme_encrypt_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); /* Check the supplied data */ if (!plain) diff --git a/gpgme/engine-backend.h b/gpgme/engine-backend.h index 2a832b3..0262ad6 100644 --- a/gpgme/engine-backend.h +++ b/gpgme/engine-backend.h @@ -44,7 +44,6 @@ struct engine_ops GpgmeError (*set_colon_line_handler) (void *engine, EngineColonLineHandler fnc, void *fnc_value); - GpgmeError (*set_verbosity) (void *engine, int verbosity); GpgmeError (*decrypt) (void *engine, GpgmeData ciph, GpgmeData plain); GpgmeError (*delete) (void *engine, GpgmeKey key, int allow_secret); GpgmeError (*edit) (void *engine, GpgmeKey key, GpgmeData out, diff --git a/gpgme/engine-gpgsm.c b/gpgme/engine-gpgsm.c index 3f78ef9..a09d234 100644 --- a/gpgme/engine-gpgsm.c +++ b/gpgme/engine-gpgsm.c @@ -1439,7 +1439,6 @@ struct engine_ops _gpgme_engine_ops_gpgsm = gpgsm_set_status_handler, NULL, /* set_command_handler */ gpgsm_set_colon_line_handler, - NULL, /* set_verbosity */ gpgsm_decrypt, gpgsm_delete, NULL, /* edit */ diff --git a/gpgme/engine.c b/gpgme/engine.c index f5891b9..c3b70c2 100644 --- a/gpgme/engine.c +++ b/gpgme/engine.c @@ -206,17 +206,6 @@ _gpgme_engine_release (EngineObject engine) } -void -_gpgme_engine_set_verbosity (EngineObject engine, int verbosity) -{ - if (!engine) - return; - - if (engine->ops->set_verbosity) - (*engine->ops->set_verbosity) (engine->engine, verbosity); -} - - void _gpgme_engine_set_status_handler (EngineObject engine, EngineStatusHandler fnc, void *fnc_value) diff --git a/gpgme/engine.h b/gpgme/engine.h index 25870ba..7546402 100644 --- a/gpgme/engine.h +++ b/gpgme/engine.h @@ -45,7 +45,6 @@ GpgmeError _gpgme_engine_set_command_handler (EngineObject engine, GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine, EngineColonLineHandler fnc, void *fnc_value); -void _gpgme_engine_set_verbosity (EngineObject engine, int verbosity); GpgmeError _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph, GpgmeData plain); GpgmeError _gpgme_engine_op_delete (EngineObject engine, GpgmeKey key, diff --git a/gpgme/export.c b/gpgme/export.c index 4031986..3fda602 100644 --- a/gpgme/export.c +++ b/gpgme/export.c @@ -54,7 +54,6 @@ _gpgme_op_export_start (GpgmeCtx ctx, int synchronous, } _gpgme_engine_set_status_handler (ctx->engine, export_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); err = _gpgme_engine_op_export (ctx->engine, recp, keydata, ctx->use_armor); diff --git a/gpgme/genkey.c b/gpgme/genkey.c index 1d078b0..caca6cb 100644 --- a/gpgme/genkey.c +++ b/gpgme/genkey.c @@ -127,7 +127,6 @@ _gpgme_op_genkey_start (GpgmeCtx ctx, int synchronous, const char *parms, goto leave; _gpgme_engine_set_status_handler (ctx->engine, genkey_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); err = _gpgme_engine_op_genkey (ctx->engine, ctx->help_data_1, ctx->use_armor, pubkey, seckey); diff --git a/gpgme/gpgme.c b/gpgme/gpgme.c index 6deb627..5f62b59 100644 --- a/gpgme/gpgme.c +++ b/gpgme/gpgme.c @@ -52,7 +52,6 @@ gpgme_new (GpgmeCtx *r_ctx) if (!ctx) return GPGME_Out_Of_Core; ctx->keylist_mode = GPGME_KEYLIST_MODE_LOCAL; - ctx->verbosity = 1; ctx->include_certs = 1; _gpgme_fd_table_init (&ctx->fdt); *r_ctx = ctx; diff --git a/gpgme/import.c b/gpgme/import.c index 30138bc..3c050b1 100644 --- a/gpgme/import.c +++ b/gpgme/import.c @@ -197,7 +197,6 @@ _gpgme_op_import_start (GpgmeCtx ctx, int synchronous, GpgmeData keydata) } _gpgme_engine_set_status_handler (ctx->engine, import_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); err = _gpgme_engine_op_import (ctx->engine, keydata); diff --git a/gpgme/keylist.c b/gpgme/keylist.c index 29e2459..85f1ff3 100644 --- a/gpgme/keylist.c +++ b/gpgme/keylist.c @@ -744,11 +744,6 @@ gpgme_op_keylist_start (GpgmeCtx ctx, const char *pattern, int secret_only) if (err) goto leave; - /* We don't want to use the verbose mode as this will also print the - key signatures which is in most cases not needed and furthermore - we just ignore those lines - This should speed up things. */ - _gpgme_engine_set_verbosity (ctx->engine, 0); - err = _gpgme_engine_op_keylist (ctx->engine, pattern, secret_only, ctx->keylist_mode); @@ -794,11 +789,6 @@ gpgme_op_keylist_ext_start (GpgmeCtx ctx, const char *pattern[], if (err) goto leave; - /* We don't want to use the verbose mode as this will also print the - key signatures which is in most cases not needed and furthermore - we just ignore those lines - This should speed up things. */ - _gpgme_engine_set_verbosity (ctx->engine, 0); - err = _gpgme_engine_op_keylist_ext (ctx->engine, pattern, secret_only, reserved, ctx->keylist_mode); diff --git a/gpgme/rungpg.c b/gpgme/rungpg.c index d55fbc6..e25336a 100644 --- a/gpgme/rungpg.c +++ b/gpgme/rungpg.c @@ -394,17 +394,6 @@ gpg_new (void **engine) } -static GpgmeError -gpg_set_verbosity (void *engine, int verbosity) -{ - GpgObject gpg = engine; - - GpgmeError err = 0; - while (!err && verbosity-- > 0) - err = add_arg (gpg, "--verbose"); - return err; -} - /* Note, that the status_handler is allowed to modifiy the args value. */ static void @@ -1660,7 +1649,6 @@ struct engine_ops _gpgme_engine_ops_gpg = gpg_set_status_handler, gpg_set_command_handler, gpg_set_colon_line_handler, - gpg_set_verbosity, gpg_decrypt, gpg_delete, gpg_edit, diff --git a/gpgme/sign.c b/gpgme/sign.c index f45879a..68f6855 100644 --- a/gpgme/sign.c +++ b/gpgme/sign.c @@ -214,7 +214,6 @@ _gpgme_op_sign_start (GpgmeCtx ctx, int synchronous, _gpgme_engine_set_status_handler (ctx->engine, _gpgme_sign_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); err = _gpgme_engine_op_sign (ctx->engine, in, out, mode, ctx->use_armor, ctx->use_textmode, ctx->include_certs, diff --git a/gpgme/verify.c b/gpgme/verify.c index 190418f..3b63491 100644 --- a/gpgme/verify.c +++ b/gpgme/verify.c @@ -382,7 +382,6 @@ _gpgme_op_verify_start (GpgmeCtx ctx, int synchronous, _gpgme_engine_set_status_handler (ctx->engine, _gpgme_verify_status_handler, ctx); - _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity); /* Check the supplied data. */ if (!sig)