Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdbuserror.h
Go to the documentation of this file.
1/* GDBus - GLib D-Bus Library
2 *
3 * Copyright (C) 2008-2010 Red Hat, Inc.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 *
20 * Author: David Zeuthen <davidz@redhat.com>
21 */
22
23#ifndef __G_DBUS_ERROR_H__
24#define __G_DBUS_ERROR_H__
25
26#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27#error "Only <gio/gio.h> can be included directly."
28#endif
29
30#include <gio/giotypes.h>
31
33
34/**
35 * G_DBUS_ERROR:
36 *
37 * Error domain for errors generated by a remote message bus. Errors
38 * in this domain will be from the #GDBusError enumeration. See
39 * #GError for more information on error domains.
40 *
41 * Note that this error domain is intended only for
42 * returning errors from a remote message bus process. Errors
43 * generated locally in-process by e.g. #GDBusConnection should use the
44 * %G_IO_ERROR domain.
45 *
46 * Since: 2.26
47 */
48#define G_DBUS_ERROR g_dbus_error_quark()
49
52
53/* Used by applications to check, get and strip the D-Bus error name */
60
61/**
62 * GDBusErrorEntry:
63 * @error_code: An error code.
64 * @dbus_error_name: The D-Bus error name to associate with @error_code.
65 *
66 * Struct used in g_dbus_error_register_error_domain().
67 *
68 * Since: 2.26
69 */
75
78 gint error_code,
79 const gchar *dbus_error_name);
82 gint error_code,
83 const gchar *dbus_error_name);
85void g_dbus_error_register_error_domain (const gchar *error_domain_quark_name,
86 volatile gsize *quark_volatile,
87 const GDBusErrorEntry *entries,
88 guint num_entries);
89
90/* Only used by object mappings to map back and forth to GError */
92GError *g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name,
93 const gchar *dbus_error_message);
96 const gchar *dbus_error_name,
97 const gchar *dbus_error_message,
98 const gchar *format,
99 ...) G_GNUC_PRINTF(4, 5);
102 const gchar *dbus_error_name,
103 const gchar *dbus_error_message,
104 const gchar *format,
105 va_list var_args) G_GNUC_PRINTF(4, 0);
108
110
111#endif /* __G_DBUS_ERROR_H__ */
GIO_AVAILABLE_IN_ALL gboolean g_dbus_error_register_error(GQuark error_domain, gint error_code, const gchar *dbus_error_name)
GIO_AVAILABLE_IN_ALL GError * g_dbus_error_new_for_dbus_error(const gchar *dbus_error_name, const gchar *dbus_error_message)
GIO_AVAILABLE_IN_ALL gboolean g_dbus_error_strip_remote_error(GError *error)
GIO_AVAILABLE_IN_ALL void g_dbus_error_set_dbus_error(GError **error, const gchar *dbus_error_name, const gchar *dbus_error_message, const gchar *format,...) G_GNUC_PRINTF(4
GIO_AVAILABLE_IN_ALL void g_dbus_error_register_error_domain(const gchar *error_domain_quark_name, volatile gsize *quark_volatile, const GDBusErrorEntry *entries, guint num_entries)
GIO_AVAILABLE_IN_ALL gboolean g_dbus_error_unregister_error(GQuark error_domain, gint error_code, const gchar *dbus_error_name)
GIO_AVAILABLE_IN_ALL gboolean g_dbus_error_is_remote_error(const GError *error)
GIO_AVAILABLE_IN_ALL GQuark g_dbus_error_quark(void)
GIO_AVAILABLE_IN_ALL void GIO_AVAILABLE_IN_ALL void g_dbus_error_set_dbus_error_valist(GError **error, const gchar *dbus_error_name, const gchar *dbus_error_message, const gchar *format, va_list var_args) G_GNUC_PRINTF(4
GIO_AVAILABLE_IN_ALL void GIO_AVAILABLE_IN_ALL void GIO_AVAILABLE_IN_ALL gchar * g_dbus_error_encode_gerror(const GError *error)
GIO_AVAILABLE_IN_ALL gchar * g_dbus_error_get_remote_error(const GError *error)
#define GIO_AVAILABLE_IN_ALL
unsigned long gsize
Definition glibconfig.h:83
#define G_END_DECLS
Definition gmacros.h:910
#define G_GNUC_PRINTF(format_idx, arg_idx)
Definition gmacros.h:608
#define G_BEGIN_DECLS
Definition gmacros.h:909
G_BEGIN_DECLS typedef guint32 GQuark
Definition gquark.h:38
gint gboolean
Definition gtypes.h:56
G_BEGIN_DECLS typedef char gchar
Definition gtypes.h:52
int gint
Definition gtypes.h:55
unsigned int guint
Definition gtypes.h:61
json_t format(printf, 1, 2)))
static void error(LoadState *S, const char *why)
const gchar * dbus_error_name
Definition gdbuserror.h:73