summaryrefslogtreecommitdiff
path: root/doc/gpgme.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gpgme.texi')
-rw-r--r--doc/gpgme.texi33
1 files changed, 29 insertions, 4 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 61cdb37..af2e163 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -14,7 +14,7 @@
@copying
Copyright @copyright{} 2002, 2003, 2004, 2005, 2006, 2007,
-2008, 2010 g10 Code GmbH.
+2008, 2010, 2012, 2013 g10 Code GmbH.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -616,6 +616,30 @@ does not return a detailed error code).
@end deftypefun
+@deftypefun {int} gpgme_set_global_flag @
+ (@w{const char *@var{name}}, @
+ @w{const char *@var{value}})
+
+On some systems it is not easy to set environment variables and thus
+hard to use @acronym{GPGME}'s internal trace facility for debugging.
+This function has been introduced as an alternative way to enable
+debugging. It is important to assure that only one thread accesses
+@acronym{GPGME} functions between a call to this function and after
+the return from the call to @code{gpgme_check_version}.
+
+To enable debugging, you need to call this function as early as
+possible --- even before @code{gpgme_check_version} --- with the
+string ``debug'' for @var{name} and @var{value} identical to the value
+used with the environment variable @code{GPGME_DEBUG}.
+
+This function returns @code{0} on success. In contrast to other
+functions the non-zero return value on failure does not convey any
+error code. For setting ``debug'' the only possible error cause is an
+out of memory condition; which would exhibit itself later anyway.
+Thus the return value may be ignored.
+@end deftypefun
+
+
After initializing @acronym{GPGME}, you should set the locale
information to the locale required for your output terminal. This
locale information is needed for example for the curses and Gtk
@@ -2350,9 +2374,10 @@ previous attempts failed, then @var{prev_was_bad} is 1, otherwise it
will be 0.
The user must write the passphrase, followed by a newline character,
-to the file descriptor @var{fd}. If the user returns 0 indicating
-success, the user must at least write a newline character before
-returning from the callback.
+to the file descriptor @var{fd}. The function @code{gpgme_io_writen}
+should be used for the write operation. Note that if the user returns
+0 to indicate success, the user must at least write a newline
+character before returning from the callback.
If an error occurs, return the corresponding @code{gpgme_error_t}
value. You can use the error code @code{GPG_ERR_CANCELED} to abort