X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgdbuserror.h;h=c6bc75473d8d8a9f32b72b5949930e08fb36dd46;hb=7e5e3e142f856ac80e83a9a5110b51aa4b5b0821;hp=73c97aa83dae01d4ac710be478311dce9c47f1b1;hpb=0fd6498cd89888023fb2161bfdde9339a4346986;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gdbuserror.h b/gio/gdbuserror.h index 73c97aa..c6bc754 100644 --- a/gio/gdbuserror.h +++ b/gio/gdbuserror.h @@ -1,6 +1,6 @@ /* GDBus - GLib D-Bus Library * - * Copyright (C) 2008-2009 Red Hat, Inc. + * Copyright (C) 2008-2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -13,9 +13,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. + * Public License along with this library; if not, see . * * Author: David Zeuthen */ @@ -23,6 +21,10 @@ #ifndef __G_DBUS_ERROR_H__ #define __G_DBUS_ERROR_H__ +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + #include G_BEGIN_DECLS @@ -43,11 +45,15 @@ G_BEGIN_DECLS */ #define G_DBUS_ERROR g_dbus_error_quark() +GLIB_AVAILABLE_IN_ALL GQuark g_dbus_error_quark (void); /* Used by applications to check, get and strip the D-Bus error name */ +GLIB_AVAILABLE_IN_ALL gboolean g_dbus_error_is_remote_error (const GError *error); +GLIB_AVAILABLE_IN_ALL gchar *g_dbus_error_get_remote_error (const GError *error); +GLIB_AVAILABLE_IN_ALL gboolean g_dbus_error_strip_remote_error (GError *error); /** @@ -65,30 +71,37 @@ struct _GDBusErrorEntry const gchar *dbus_error_name; }; +GLIB_AVAILABLE_IN_ALL gboolean g_dbus_error_register_error (GQuark error_domain, gint error_code, const gchar *dbus_error_name); +GLIB_AVAILABLE_IN_ALL gboolean g_dbus_error_unregister_error (GQuark error_domain, gint error_code, const gchar *dbus_error_name); +GLIB_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); /* Only used by object mappings to map back and forth to GError */ +GLIB_AVAILABLE_IN_ALL GError *g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name, const gchar *dbus_error_message); +GLIB_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, 5); +GLIB_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); + va_list var_args) G_GNUC_PRINTF(4, 0); +GLIB_AVAILABLE_IN_ALL gchar *g_dbus_error_encode_gerror (const GError *error); G_END_DECLS