2003-04-24 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Thu, 24 Apr 2003 15:58:49 +0000 (15:58 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Thu, 24 Apr 2003 15:58:49 +0000 (15:58 +0000)
* 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.

19 files changed:
gpgme/ChangeLog
gpgme/context.h
gpgme/decrypt.c
gpgme/delete.c
gpgme/edit.c
gpgme/encrypt-sign.c
gpgme/encrypt.c
gpgme/engine-backend.h
gpgme/engine-gpgsm.c
gpgme/engine.c
gpgme/engine.h
gpgme/export.c
gpgme/genkey.c
gpgme/gpgme.c
gpgme/import.c
gpgme/keylist.c
gpgme/rungpg.c
gpgme/sign.c
gpgme/verify.c

index 1b4d0b5..af28e5a 100644 (file)
@@ -1,5 +1,27 @@
 2003-04-24  Marcus Brinkmann  <marcus@g10code.de>
        
+       * 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.
  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.
-       
index 41f25c6..748dd2e 100644 (file)
@@ -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;
index 40ae932..a27e156 100644 (file)
@@ -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);
 
index 1bed6d5..9e8ebe9 100644 (file)
@@ -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);
 
index e46f42b..f729196 100644 (file)
@@ -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:
index b20f2b3..2ed1b1c 100644 (file)
@@ -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)
index 7679d74..86de371 100644 (file)
@@ -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)
index 2a832b3..0262ad6 100644 (file)
@@ -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,
index 3f78ef9..a09d234 100644 (file)
@@ -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 */
index f5891b9..c3b70c2 100644 (file)
@@ -207,17 +207,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)
 {
index 25870ba..7546402 100644 (file)
@@ -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,
index 4031986..3fda602 100644 (file)
@@ -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);
 
index 1d078b0..caca6cb 100644 (file)
@@ -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);
index 6deb627..5f62b59 100644 (file)
@@ -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;
index 30138bc..3c050b1 100644 (file)
@@ -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);
 
index 29e2459..85f1ff3 100644 (file)
@@ -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);
 
index d55fbc6..e25336a 100644 (file)
@@ -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,
index f45879a..68f6855 100644 (file)
@@ -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,
index 190418f..3b63491 100644 (file)
@@ -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)