diff options
author | Marcus Brinkmann <[email protected]> | 2003-02-06 20:09:24 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2003-02-06 20:09:24 +0000 |
commit | 5a37051361cd2d8c47c49f7ac3c4ae6fd0e0c206 (patch) | |
tree | ae288a94cdbbc1d5b36583ed3130a16df35ee017 /doc | |
parent | 2003-01-30 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-5a37051361cd2d8c47c49f7ac3c4ae6fd0e0c206.tar.gz gpgme-5a37051361cd2d8c47c49f7ac3c4ae6fd0e0c206.zip |
doc/
2003-02-06 Marcus Brinkmann <[email protected]>
* gpgme.texi (Cancelling an Operation): Removed.
(Passphrase Callback): Document new type for GpgmePassphraseCb.
gpgme/
2003-02-06 Marcus Brinkmann <[email protected]>
* gpgme.h (GpgmePassphraseCb): Change type to return GpgmeError,
and add argument for returning the result string.
(gpgme_cancel): Remove prototype.
* gpgme.c (gpgme_cancel): Remove function.
* context.h (struct gpgme_context_s): Remove member cancel.
* passphrase.c (_gpgme_passphrase_command_handler): Call the
passphrase callback in the new way.
tests/
2003-02-06 Marcus Brinkmann <[email protected]>
* gpg/t-decrypt.c (passphrase_cb): Fix to new prototype.
* gpg/t-decrypt-verify.c (passphrase_cb): Likewise.
* gpg/t-edit.c (passphrase_cb): Likewise.
* gpg/t-encrypt-sign.c (passphrase_cb): Likewise.
* gpg/t-encrypt-sym.c (passphrase_cb): Likewise.
* gpg/t-sign.c (passphrase_cb): Likewise.
* gpg/t-signers.c (passphrase_cb): Likewise.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gpgme.texi | 25 |
2 files changed, 12 insertions, 18 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 4b695d71..37a7f086 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2003-02-06 Marcus Brinkmann <[email protected]> + + * gpgme.texi (Cancelling an Operation): Removed. + (Passphrase Callback): Document new type for GpgmePassphraseCb. + 2003-01-30 Marcus Brinkmann <[email protected]> * gpgme.texi (Engine Information): Rename member part to diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 88472cc3..95e615cd 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -1537,20 +1537,25 @@ current mode otherwise. Note that 0 is not a valid mode value. @cindex callback, passphrase @cindex passphrase callback -@deftp {Data type} {const char *(*GpgmePassphraseCb)(void *@var{hook}, const char *@var{desc}, void **@var{r_hd})} +@deftp {Data type} {GpgmeError (*GpgmePassphraseCb)(void *@var{hook}, const char *@var{desc}, void **@var{r_hd}, const char **@var{result})} @tindex GpgmePassphraseCb The @code{GpgmePassphraseCb} type is the type of functions usable as passphrase callback function. The string @var{desc} contains a text usable to be displayed to the user of the application. The function should return a passphrase for -the context when invoked with @var{desc} not being @code{NULL}. +the context when invoked with @var{desc} not being @code{NULL} in +*@var{result}. The user may store information about the resources associated with the returned passphrase in @var{*r_hd}. When the passphrase is no longer needed by @acronym{GPGME}, the passphrase callback function will be called with @var{desc} being @var{NULL}, and @var{r_hd} being the same as at the first invocation. + +If an error occurs, return the corresponding @code{GpgmeError} value. +You can use @code{GPGME_Canceled} to abort the operation. Otherwise, +return @code{0}. @end deftp @deftypefun void gpgme_set_passphrase_cb (@w{GpgmeCtx @var{ctx}}, @w{GpgmePassphraseCb @var{passfunc}}, @w{void *@var{hook_value}}) @@ -3113,22 +3118,6 @@ error occurs, @code{NULL} is returned and the error is returned in @end deftypefun -@node Cancelling an Operation -@subsection Cancelling an Operation -@cindex cancellation -@cindex cryptographic operation, cancel - -@deftypefun void gpgme_cancel (@w{GpgmeCtx @var{ctx}}) -The function @code{gpgme_cancel} tries to cancel the pending -operation. A running synchronous operation in the context or the -function @code{gpgme_wait} with this context as its @var{ctx} argument -might notice the cancellation flag and return. It is currently not -guaranteed to work under all circumstances. Its current primary -purpose is to prevent asking for a passphrase again in the passphrase -callback. -@end deftypefun - - @node Using External Event Loops @subsection Using External Event Loops @cindex event loop, external |