diff options
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 |