2019-04-10 12:32:51 +03:00
|
|
|
|
/* WirePlumber
|
|
|
|
|
|
*
|
|
|
|
|
|
* Copyright © 2019 Collabora Ltd.
|
|
|
|
|
|
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
|
|
|
|
|
|
*
|
2019-05-31 12:13:01 +03:00
|
|
|
|
* SPDX-License-Identifier: MIT
|
2019-04-12 12:53:54 +03:00
|
|
|
|
*/
|
2019-04-10 12:32:51 +03:00
|
|
|
|
|
|
|
|
|
|
#ifndef __WP_ERROR_H__
|
|
|
|
|
|
#define __WP_ERROR_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <glib.h>
|
2020-01-16 18:50:07 +02:00
|
|
|
|
#include "defs.h"
|
2019-04-10 12:32:51 +03:00
|
|
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
2020-02-17 15:39:19 +02:00
|
|
|
|
/**
|
|
|
|
|
|
* WP_DOMAIN_LIBRARY:
|
|
|
|
|
|
*
|
2021-05-13 17:54:58 +03:00
|
|
|
|
* @file error.c
|
|
|
|
|
|
* @struct ErrorCodes
|
|
|
|
|
|
* @section error_section Error codes
|
|
|
|
|
|
*
|
|
|
|
|
|
* @brief Error domain and codes for <a href="https://developer.gnome.org/glib/stable/glib-Error-Reporting.html#GError">
|
|
|
|
|
|
* GError</a>
|
|
|
|
|
|
*
|
|
|
|
|
|
* @b wp_domain_library_quark
|
|
|
|
|
|
*
|
|
|
|
|
|
* @code
|
|
|
|
|
|
* GQuark wp_domain_library_quark ()
|
|
|
|
|
|
* @endcode
|
|
|
|
|
|
*
|
|
|
|
|
|
* @subsection error_enum_subsection Enumerations
|
|
|
|
|
|
*
|
|
|
|
|
|
* @subsubsection error_enum_subsubsection WpLibraryErrorEnum:
|
|
|
|
|
|
*
|
|
|
|
|
|
* @brief Error codes that can appear in a
|
|
|
|
|
|
* <a href="https://developer.gnome.org/glib/stable/glib-Error-Reporting.html#GError">GError</a>
|
|
|
|
|
|
* when the error domain is [WP_DOMAIN_LIBRARY](@ref error_constants_subsection)
|
|
|
|
|
|
*
|
|
|
|
|
|
* @b Members:
|
|
|
|
|
|
*
|
|
|
|
|
|
* @arg `WP_LIBRARY_ERROR_INVARIANT (0) – an invariant check failed; this most likely indicates a programming error`
|
|
|
|
|
|
* @arg `WP_LIBRARY_ERROR_INVALID_ARGUMENT (1) – an unexpected/invalid argument was given`
|
|
|
|
|
|
* @arg `WP_LIBRARY_ERROR_OPERATION_FAILED (2) – an operation failed`
|
|
|
|
|
|
*
|
|
|
|
|
|
* @subsection error_constants_subsection Constants
|
|
|
|
|
|
*
|
|
|
|
|
|
* @b WP_DOMAIN_LIBRARY:
|
|
|
|
|
|
*
|
|
|
|
|
|
* A <a href="https://developer.gnome.org/glib/stable/glib-Error-Reporting.html#GError">
|
|
|
|
|
|
* GError</a> domain for errors that occurred within the context of the
|
2020-02-17 15:39:19 +02:00
|
|
|
|
* WirePlumber library.
|
2021-05-13 17:54:58 +03:00
|
|
|
|
*
|
|
|
|
|
|
* @code
|
|
|
|
|
|
* #define WP_DOMAIN_LIBRARY (wp_domain_library_quark ())
|
|
|
|
|
|
* @endcode
|
2020-02-17 15:39:19 +02:00
|
|
|
|
*/
|
|
|
|
|
|
#define WP_DOMAIN_LIBRARY (wp_domain_library_quark ())
|
2020-01-16 18:50:07 +02:00
|
|
|
|
WP_API
|
2019-04-10 12:32:51 +03:00
|
|
|
|
GQuark wp_domain_library_quark (void);
|
|
|
|
|
|
|
2021-05-13 17:54:58 +03:00
|
|
|
|
/*!
|
|
|
|
|
|
* @em WP_LIBRARY_ERROR_INVARIANT: an invariant check failed; this most likely
|
2020-02-17 15:39:19 +02:00
|
|
|
|
* indicates a programming error
|
2021-05-13 17:54:58 +03:00
|
|
|
|
* @em WP_LIBRARY_ERROR_INVALID_ARGUMENT: an unexpected/invalid argument was given
|
|
|
|
|
|
* @em WP_LIBRARY_ERROR_OPERATION_FAILED: an operation failed
|
2020-02-17 15:39:19 +02:00
|
|
|
|
*
|
2021-05-13 17:54:58 +03:00
|
|
|
|
* Error codes that can appear in a
|
|
|
|
|
|
* <a href="https://developer.gnome.org/glib/stable/glib-Error-Reporting.html#GError">
|
|
|
|
|
|
* GError</a> when the error domain
|
2020-02-17 15:39:19 +02:00
|
|
|
|
* is %WP_DOMAIN_LIBRARY
|
|
|
|
|
|
*/
|
2019-04-10 12:32:51 +03:00
|
|
|
|
typedef enum {
|
|
|
|
|
|
WP_LIBRARY_ERROR_INVARIANT,
|
2019-05-17 13:08:45 +03:00
|
|
|
|
WP_LIBRARY_ERROR_INVALID_ARGUMENT,
|
|
|
|
|
|
WP_LIBRARY_ERROR_OPERATION_FAILED,
|
2019-04-10 12:32:51 +03:00
|
|
|
|
} WpLibraryErrorEnum;
|
|
|
|
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|