From 58ee9d8c85293eefa1e901c660fb30bf2b9122c8 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Sun, 28 Oct 2007 18:41:43 +0000 Subject: [PATCH] Rename GA's error to GA_ERROR for more consistency with other glib bindings git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1566 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-gobject/Makefile.am | 4 ++-- avahi-gobject/ga-client.c | 4 ++-- avahi-gobject/ga-entry-group.c | 14 +++++++------- avahi-gobject/{ga-errors.c => ga-error.c} | 8 ++++---- avahi-gobject/{ga-errors.h => ga-error.h} | 12 ++++++------ avahi-gobject/ga-record-browser.c | 6 +++--- avahi-gobject/ga-service-browser.c | 6 +++--- avahi-gobject/ga-service-resolver.c | 6 +++--- 8 files changed, 30 insertions(+), 30 deletions(-) rename avahi-gobject/{ga-errors.c => ga-error.c} (85%) rename avahi-gobject/{ga-errors.h => ga-error.h} (82%) diff --git a/avahi-gobject/Makefile.am b/avahi-gobject/Makefile.am index c9f442c..1b50fdd 100644 --- a/avahi-gobject/Makefile.am +++ b/avahi-gobject/Makefile.am @@ -30,7 +30,7 @@ avahigobjectinclude_HEADERS = \ ga-client.h \ ga-entry-group.h \ ga-enums.h \ - ga-errors.h \ + ga-error.h \ ga-record-browser.h \ ga-service-browser.h \ ga-service-resolver.h @@ -53,7 +53,7 @@ CORE_SOURCES = \ ga-client.c ga-client.h \ ga-entry-group.c ga-entry-group.h \ ga-enums.h \ - ga-errors.c ga-errors.h \ + ga-error.c ga-error.h \ ga-record-browser.c ga-record-browser.h \ ga-service-browser.c ga-service-browser.h \ ga-service-resolver.c ga-service-resolver.h diff --git a/avahi-gobject/ga-client.c b/avahi-gobject/ga-client.c index d34933f..1625bac 100644 --- a/avahi-gobject/ga-client.c +++ b/avahi-gobject/ga-client.c @@ -27,7 +27,7 @@ #include "ga-client.h" #include "ga-client-enumtypes.h" -#include "ga-errors.h" +#include "ga-error.h" /* FIXME what to do about glib-malloc ? */ #include @@ -245,7 +245,7 @@ gboolean ga_client_start(GaClient * client, GError ** error) { _avahi_client_cb, client, &aerror); if (aclient == NULL) { if (error != NULL) { - *error = g_error_new(GA_ERRORS, aerror, + *error = g_error_new(GA_ERROR, aerror, "Failed to create avahi client: %s", avahi_strerror(aerror)); } diff --git a/avahi-gobject/ga-entry-group.c b/avahi-gobject/ga-entry-group.c index 9b79e83..1a17fd4 100644 --- a/avahi-gobject/ga-entry-group.c +++ b/avahi-gobject/ga-entry-group.c @@ -27,7 +27,7 @@ #include #include -#include "ga-errors.h" +#include "ga-error.h" #include "ga-entry-group.h" #include "ga-entry-group-enumtypes.h" @@ -386,7 +386,7 @@ GaEntryGroupService *ga_entry_group_add_service_full_strlist(GaEntryGroup * domain, host, port, txt); if (ret) { if (error != NULL) { - *error = g_error_new(GA_ERRORS, ret, + *error = g_error_new(GA_ERROR, ret, "Adding service to group failed: %s", avahi_strerror(ret)); } @@ -492,7 +492,7 @@ gboolean ga_entry_group_add_record_full(GaEntryGroup * group, size); if (ret) { if (error != NULL) { - *error = g_error_new(GA_ERRORS, ret, + *error = g_error_new(GA_ERROR, ret, "Setting raw record failed: %s", avahi_strerror(ret)); } @@ -519,7 +519,7 @@ gboolean ga_entry_group_service_thaw(GaEntryGroupService * service, GError ** er service->name, service->type, service->domain, txt); if (ret) { if (error != NULL) { - *error = g_error_new(GA_ERRORS, ret, + *error = g_error_new(GA_ERROR, ret, "Updating txt record failed: %s", avahi_strerror(ret)); } @@ -581,7 +581,7 @@ gboolean ga_entry_group_attach(GaEntryGroup * group, if (priv->group == NULL) { if (error != NULL) { int aerrno = avahi_client_errno(client->avahi_client); - *error = g_error_new(GA_ERRORS, aerrno, + *error = g_error_new(GA_ERROR, aerrno, "Attaching group failed: %s", avahi_strerror(aerrno)); } @@ -596,7 +596,7 @@ gboolean ga_entry_group_commit(GaEntryGroup * group, GError ** error) { ret = avahi_entry_group_commit(priv->group); if (ret) { if (error != NULL) { - *error = g_error_new(GA_ERRORS, ret, + *error = g_error_new(GA_ERROR, ret, "Committing group failed: %s", avahi_strerror(ret)); } @@ -611,7 +611,7 @@ gboolean ga_entry_group_reset(GaEntryGroup * group, GError ** error) { ret = avahi_entry_group_reset(priv->group); if (ret) { if (error != NULL) { - *error = g_error_new(GA_ERRORS, ret, + *error = g_error_new(GA_ERROR, ret, "Resetting group failed: %s", avahi_strerror(ret)); } diff --git a/avahi-gobject/ga-errors.c b/avahi-gobject/ga-error.c similarity index 85% rename from avahi-gobject/ga-errors.c rename to avahi-gobject/ga-error.c index 5abe36a..f6ea9ae 100644 --- a/avahi-gobject/ga-errors.c +++ b/avahi-gobject/ga-error.c @@ -1,5 +1,5 @@ /* - * ga-errors.c - Source for error types used + * ga-error.c - Source for error types used * Copyright (C) 2006 Collabora Ltd. * * This library is free software; you can redistribute it and/or @@ -22,11 +22,11 @@ #endif #include -#include "ga-errors.h" +#include "ga-error.h" -GQuark ga_errors_quark(void) { +GQuark ga_error_quark(void) { static GQuark quark = 0; if (!quark) - quark = g_quark_from_static_string("ga_errors"); + quark = g_quark_from_static_string("ga_error"); return quark; } diff --git a/avahi-gobject/ga-errors.h b/avahi-gobject/ga-error.h similarity index 82% rename from avahi-gobject/ga-errors.h rename to avahi-gobject/ga-error.h index 9ed10e0..cb15050 100644 --- a/avahi-gobject/ga-errors.h +++ b/avahi-gobject/ga-error.h @@ -1,5 +1,5 @@ /* - * ga-errors.h - Header for Avahi error types + * ga-error.h - Header for Avahi error types * Copyright (C) 2005 Collabora Ltd. * Copyright (C) 2005 Nokia Corporation * @@ -18,17 +18,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __GA_ERRORS_H__ -#define __GA_ERRORS_H__ +#ifndef __GA_ERROR_H__ +#define __GA_ERROR_H__ #include G_BEGIN_DECLS #include -GQuark ga_errors_quark(void); +GQuark ga_error_quark(void); -#define GA_ERRORS ga_errors_quark() +#define GA_ERROR ga_error_quark() G_END_DECLS -#endif /* #ifndef __GA_ERRORS_H__ */ +#endif /* #ifndef __GA_ERROR_H__ */ diff --git a/avahi-gobject/ga-record-browser.c b/avahi-gobject/ga-record-browser.c index f6747cd..2fe536c 100644 --- a/avahi-gobject/ga-record-browser.c +++ b/avahi-gobject/ga-record-browser.c @@ -27,7 +27,7 @@ #include "ga-record-browser.h" #include "signals-marshal.h" -#include "ga-errors.h" +#include "ga-error.h" #include "ga-enums-enumtypes.h" G_DEFINE_TYPE(GaRecordBrowser, ga_record_browser, G_TYPE_OBJECT) @@ -344,7 +344,7 @@ static void _avahi_record_browser_cb(AVAHI_GCC_UNUSED AvahiRecordBrowser * r, Av case AVAHI_BROWSER_FAILURE:{ GError *error; int aerrno = avahi_client_errno(priv->client->avahi_client); - error = g_error_new(GA_ERRORS, aerrno, + error = g_error_new(GA_ERROR, aerrno, "Browsing failed: %s", avahi_strerror(aerrno)); g_signal_emit(self, signals[FAILURE], 0, error); @@ -371,7 +371,7 @@ gboolean ga_record_browser_attach(GaRecordBrowser * browser, if (priv->browser == NULL) { if (error != NULL) { int aerrno = avahi_client_errno(client->avahi_client); - *error = g_error_new(GA_ERRORS, aerrno, + *error = g_error_new(GA_ERROR, aerrno, "Attaching record browser failed: %s", avahi_strerror(aerrno)); } diff --git a/avahi-gobject/ga-service-browser.c b/avahi-gobject/ga-service-browser.c index f694ca5..2f4295c 100644 --- a/avahi-gobject/ga-service-browser.c +++ b/avahi-gobject/ga-service-browser.c @@ -30,7 +30,7 @@ #include "ga-service-browser.h" #include "signals-marshal.h" -#include "ga-errors.h" +#include "ga-error.h" #include "ga-enums-enumtypes.h" G_DEFINE_TYPE(GaServiceBrowser, ga_service_browser, G_TYPE_OBJECT) @@ -320,7 +320,7 @@ static void _avahi_service_browser_cb(AvahiServiceBrowser * b, AvahiIfIndex inte case AVAHI_BROWSER_FAILURE:{ GError *error; int aerrno = avahi_client_errno(priv->client->avahi_client); - error = g_error_new(GA_ERRORS, aerrno, + error = g_error_new(GA_ERROR, aerrno, "Browsing failed: %s", avahi_strerror(aerrno)); g_signal_emit(self, signals[FAILURE], 0, error); @@ -362,7 +362,7 @@ gboolean ga_service_browser_attach(GaServiceBrowser * browser, if (priv->browser == NULL) { if (error != NULL) { int aerrno = avahi_client_errno(client->avahi_client); - *error = g_error_new(GA_ERRORS, aerrno, + *error = g_error_new(GA_ERROR, aerrno, "Attaching group failed: %s", avahi_strerror(aerrno)); } diff --git a/avahi-gobject/ga-service-resolver.c b/avahi-gobject/ga-service-resolver.c index 380e0a5..6ba90cd 100644 --- a/avahi-gobject/ga-service-resolver.c +++ b/avahi-gobject/ga-service-resolver.c @@ -27,7 +27,7 @@ #include "ga-service-resolver.h" #include "signals-marshal.h" -#include "ga-errors.h" +#include "ga-error.h" #include "ga-enums.h" #include "ga-enums-enumtypes.h" @@ -332,7 +332,7 @@ static void _avahi_service_resolver_cb(AVAHI_GCC_UNUSED AvahiServiceResolver * r case AVAHI_RESOLVER_FAILURE:{ GError *error; int aerrno = avahi_client_errno(priv->client->avahi_client); - error = g_error_new(GA_ERRORS, aerrno, + error = g_error_new(GA_ERROR, aerrno, "Resolving failed: %s", avahi_strerror(aerrno)); g_signal_emit(self, signals[FAILURE], 0, error); @@ -378,7 +378,7 @@ gboolean ga_service_resolver_attach(GaServiceResolver * resolver, if (priv->resolver == NULL) { if (error != NULL) { int aerrno = avahi_client_errno(client->avahi_client); - *error = g_error_new(GA_ERRORS, aerrno, + *error = g_error_new(GA_ERROR, aerrno, "Attaching group failed: %s", avahi_strerror(aerrno)); } -- 2.39.5