Debian Codegraph @

lib/wp/error.h

raw
1 /* WirePlumber
2 *
3 * Copyright © 2019 Collabora Ltd.
4 * @author George Kiagiadakis <[email protected]>
5 *
6 * SPDX-License-Identifier: MIT
7 */
8
9 #ifndef __WP_ERROR_H__
10 #define __WP_ERROR_H__
11
12 #include <glib.h>
13 #include "defs.h"
14
15 G_BEGIN_DECLS
16
17 /*!
18 * \brief A GError domain for errors that occurred within the context of the
19 * WirePlumber library.
20 * \ingroup wperror
21 */
22 #define WP_DOMAIN_LIBRARY (wp_domain_library_quark ())
23 WP_API
24 GQuark wp_domain_library_quark (void);
25
26 /*!
27 * \brief Error codes that can appear in a GError when the error domain
28 * is WP_DOMAIN_LIBRARY
29 * \ingroup wperror
30 */
31 typedef enum {
32 /*! an invariant check failed; this most likely
33 * indicates a programming error */
34 WP_LIBRARY_ERROR_INVARIANT,
35 /*! an unexpected/invalid argument was given */
36 WP_LIBRARY_ERROR_INVALID_ARGUMENT,
37 /*! an operation failed */
38 WP_LIBRARY_ERROR_OPERATION_FAILED,
39 /*! a required external service was unavailable */
40 WP_LIBRARY_ERROR_SERVICE_UNAVAILABLE,
41 } WpLibraryErrorEnum;
42
43 G_END_DECLS
44
45 #endif