From 3f9738bdd477bc09d8f643816636bbfbd432d329 Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval R Date: Sat, 5 Feb 2022 21:09:39 +0100 Subject: [PATCH] docs: Document errors --- libsecret/meson.build | 1 + libsecret/secret-util.c | 43 +++++++++++++++++------------------------ 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/libsecret/meson.build b/libsecret/meson.build index 0b37328..97e0222 100644 --- a/libsecret/meson.build +++ b/libsecret/meson.build @@ -132,6 +132,7 @@ if get_option('introspection') 'secret-types.h', 'secret-value.c', 'secret-value.h', + 'secret-util.c', ] libsecret_gir_sources += version_h libsecret_gir_sources += _enums_generated diff --git a/libsecret/secret-util.c b/libsecret/secret-util.c index 3b601bc..4e6f2bb 100644 --- a/libsecret/secret-util.c +++ b/libsecret/secret-util.c @@ -19,37 +19,23 @@ #include -/** - * SecretError - * - * libsecret errors - * - * Various errors reported by the libsecret library. No error returned from - * the libsecret API is suitable for direct display to the user. It is up - * to the application to handle them appropriately. - * - * Stability: Stable - */ - -/** - * SECRET_ERROR: - * - * The error domain quark which denotes libsecret specific errors from the - * #SecretError enumeration. - */ - /** * SecretError: * @SECRET_ERROR_PROTOCOL: received an invalid data or message from the Secret - * Service + * Service * @SECRET_ERROR_IS_LOCKED: the item or collection is locked and the operation - * cannot be performed - * @SECRET_ERROR_NO_SUCH_OBJECT: no such item or collection found in the - * Secret Service + * cannot be performed + * @SECRET_ERROR_NO_SUCH_OBJECT: no such item or collection found in the Secret + * Service * @SECRET_ERROR_ALREADY_EXISTS: a relevant item or collection already exists + * @SECRET_ERROR_INVALID_FILE_FORMAT: the file format is not valid * - * Errors returned by the Secret Service. None of the errors are appropriate - * for display to the user. + * Errors returned by the Secret Service. + * + * None of the errors are appropriate for display to the user. It is up to the + * application to handle them appropriately. + * + * Stability: Stable */ static void @@ -86,6 +72,13 @@ _secret_list_get_type (void) } +/** + * secret_error_get_quark: + * + * Get the error quark. + * + * Returns: the quark + */ GQuark secret_error_get_quark (void) {