* 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.
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.
-
/* The running engine process. */
EngineObject engine;
- /* Level of verbosity to use. */
- int verbosity;
int use_armor;
int use_textmode;
int keylist_mode;
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);
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);
_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:
_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)
? _gpgme_encrypt_sym_status_handler
: _gpgme_encrypt_status_handler,
ctx);
- _gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
/* Check the supplied data */
if (!plain)
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,
gpgsm_set_status_handler,
NULL, /* set_command_handler */
gpgsm_set_colon_line_handler,
- NULL, /* set_verbosity */
gpgsm_decrypt,
gpgsm_delete,
NULL, /* edit */
}
-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)
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,
}
_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);
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);
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;
}
_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);
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);
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);
}
-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
gpg_set_status_handler,
gpg_set_command_handler,
gpg_set_colon_line_handler,
- gpg_set_verbosity,
gpg_decrypt,
gpg_delete,
gpg_edit,
_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,
_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)