diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-06-09 10:24:07 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-06-09 10:24:07 +0200 |
commit | 4bb63ced295ddd64a019ae49cfae191524a34f07 (patch) | |
tree | 56068eda0aa8d9e7b55dc847c247faa93a70e870 /p11-kit/util.c | |
parent | d6463e70eeb0ad3d93788a3e0f13e2007be54c50 (diff) |
Complete documentation for message functionality.
Diffstat (limited to 'p11-kit/util.c')
-rw-r--r-- | p11-kit/util.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/p11-kit/util.c b/p11-kit/util.c index dda4703..fdf434b 100644 --- a/p11-kit/util.c +++ b/p11-kit/util.c @@ -46,6 +46,16 @@ #include <stdio.h> #include <string.h> +/** + * SECTION:p11-kit-future + * @title: Future + * @short_description: Future Unstable API + * + * API that is not yet stable enough to be enabled by default. In all likelyhood + * this will be included in the next release. To use this API you must define a + * MACRO. See the p11-kit.h header for more details. + */ + #define MAX_MESSAGE 512 static pthread_once_t key_once = PTHREAD_ONCE_INIT; static pthread_key_t message_buffer_key = 0; @@ -180,6 +190,12 @@ _p11_message (const char* msg, ...) store_message_buffer (buffer, length); } +/** + * p11_kit_be_quiet: + * + * Once this function is called, the p11-kit library will no longer print + * failure or warning messages to stderr. + */ void p11_kit_be_quiet (void) { @@ -188,6 +204,19 @@ p11_kit_be_quiet (void) _p11_unlock (); } +/** + * p11_kit_message: + * + * Gets the failure message for a recently called p11-kit function, which + * returned a failure code on this thread. Not all functions set this message. + * Each function that does so, will note it in its documentation. + * + * If the most recent p11-kit function did not fail, then this will return NULL. + * The string is owned by the p11-kit library and is only valid on the same + * thread that the failed function executed on. + * + * Returns: The last failure message, or %NULL. + */ const char* p11_kit_message (void) { |