* keylist.c (gpgme_op_keylist_end): New function.
* gpgme.h (gpgme_op_keylist_end): New prototype.
* engine.h (gpgme_engine_check_version): Move prototype to ...
* gpgme.h (gpgme_engine_check_version): ... here.
* genkey.c (gpgme_op_genkey_start): Remove unused variable.
* New operation gpgme_op_decrypt_verify() to decrypt and verify
signatures simultaneously.
+ * The new interface gpgme_op_keylist_end() terminates a pending
+ keylist operation. A keylist operation is also terminated when
+ gpgme_op_keylist_next() returns GPGME_EOF.
+
* GPGME can be compiled without GnuPG being installed (`--with-gpg=PATH'),
cross-compiled, or even compiled without support for GnuPG
(`--without-gpg').
gpgme_engine_check_version NEW
gpgme_decrypt_verify_start NEW
gpgme_decrypt_verify NEW
+gpgme_op_keylist_next NEW
gpgme_set_protocol NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+2001-12-18 Marcus Brinkmann <marcus@g10code.de>
+
+ * keylist.c (gpgme_op_keylist_end): New function.
+ * gpgme.h (gpgme_op_keylist_end): New prototype.
+
+ * engine.h (gpgme_engine_check_version): Move prototype to ...
+ * gpgme.h (gpgme_engine_check_version): ... here.
+
+ * genkey.c (gpgme_op_genkey_start): Remove unused variable.
+
2001-12-18 Marcus Brinkmann <marcus@g10code.de>
* version.c (gpgme_get_engine_info): Reimplemented.
const char *_gpgme_engine_get_path (GpgmeProtocol proto);
const char *_gpgme_engine_get_version (GpgmeProtocol proto);
-GpgmeError gpgme_engine_check_version (GpgmeProtocol proto);
const char * _gpgme_engine_get_info (GpgmeProtocol proto);
GpgmeError _gpgme_engine_new (GpgmeProtocol proto, EngineObject *r_engine);
void _gpgme_engine_release (EngineObject engine);
GpgmeData pubkey, GpgmeData seckey)
{
int err = 0;
- int i;
const char *s, *s2, *sx;
fail_on_pending_request (ctx);
const char *what,
int type, int current, int total );
-
/* Context management */
GpgmeError gpgme_new (GpgmeCtx *r_ctx);
void gpgme_release (GpgmeCtx c);
/* Key management functions */
-GpgmeError gpgme_op_keylist_start ( GpgmeCtx c,
- const char *pattern, int secret_only );
-GpgmeError gpgme_op_keylist_next ( GpgmeCtx c, GpgmeKey *r_key );
-GpgmeError gpgme_op_trustlist_start ( GpgmeCtx c,
- const char *pattern, int max_level );
-GpgmeError gpgme_op_trustlist_next ( GpgmeCtx c, GpgmeTrustItem *r_item );
+GpgmeError gpgme_op_keylist_start (GpgmeCtx ctx,
+ const char *pattern, int secret_only);
+GpgmeError gpgme_op_keylist_next (GpgmeCtx ctx, GpgmeKey *r_key);
+GpgmeError gpgme_op_keylist_end (GpgmeCtx ctx);
+GpgmeError gpgme_op_trustlist_start (GpgmeCtx ctx,
+ const char *pattern, int max_level);
+GpgmeError gpgme_op_trustlist_next (GpgmeCtx ctx, GpgmeTrustItem *r_item);
const char *gpgme_strerror (GpgmeError err);
void gpgme_register_idle (void (*fnc)(void));
+/* Engine support functions. */
+GpgmeError gpgme_engine_check_version (GpgmeProtocol proto);
#ifdef __cplusplus
}
return mk_error (EOF);
}
ctx->key_cond = 0;
- assert (ctx->key_queue);
+ assert (ctx->key_queue);
}
queue_item = ctx->key_queue;
ctx->key_queue = queue_item->next;
xfree (queue_item);
return 0;
}
+
+/**
+ * gpgme_op_keylist_end:
+ * @c: Context
+ *
+ * Ends the keylist operation and allows to use the context for some
+ * other operation next.
+ **/
+GpgmeError
+gpgme_op_keylist_end (GpgmeCtx ctx)
+{
+ if (!ctx)
+ return mk_error (Invalid_Value);
+ if (!ctx->pending )
+ return mk_error (No_Request);
+ if (ctx->out_of_core)
+ return mk_error (Out_Of_Core);
+
+ ctx->pending = 0;
+ return 0;
+}