]> git.meshlink.io Git - catta/commitdiff
Rename GA's error to GA_ERROR for more consistency with other glib bindings
authorSjoerd Simons <sjoerd@debian.org>
Sun, 28 Oct 2007 18:41:43 +0000 (18:41 +0000)
committerSjoerd Simons <sjoerd@debian.org>
Sun, 28 Oct 2007 18:41:43 +0000 (18:41 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1566 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-gobject/Makefile.am
avahi-gobject/ga-client.c
avahi-gobject/ga-entry-group.c
avahi-gobject/ga-error.c [new file with mode: 0644]
avahi-gobject/ga-error.h [new file with mode: 0644]
avahi-gobject/ga-errors.c [deleted file]
avahi-gobject/ga-errors.h [deleted file]
avahi-gobject/ga-record-browser.c
avahi-gobject/ga-service-browser.c
avahi-gobject/ga-service-resolver.c

index c9f442ced3dbb4ac1bc1c28758d91fee33a5264c..1b50fddc93837866d16ef30c9f7cb52e25c5cba6 100644 (file)
@@ -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
index d34933f7f96b43cd9a30f0ad6a333ce4a3c33ec9..1625bacf5d580a1f4b55ce6c44f1860e7203d09d 100644 (file)
@@ -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 <avahi-glib/glib-watch.h>
@@ -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));
         }
index 9b79e8366c545aced37a9827e8eec2cc815b2593..1a17fd42f4a36d53fc2c25b9372f93407f9bf9de 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <avahi-common/malloc.h>
 
-#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-error.c b/avahi-gobject/ga-error.c
new file mode 100644 (file)
index 0000000..f6ea9ae
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * ga-error.c - Source for error types used
+ * Copyright (C) 2006 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include "ga-error.h"
+
+GQuark ga_error_quark(void) {
+    static GQuark quark = 0;
+    if (!quark)
+        quark = g_quark_from_static_string("ga_error");
+    return quark;
+}
diff --git a/avahi-gobject/ga-error.h b/avahi-gobject/ga-error.h
new file mode 100644 (file)
index 0000000..cb15050
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * ga-error.h - Header for Avahi error types
+ * Copyright (C) 2005 Collabora Ltd.
+ * Copyright (C) 2005 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef __GA_ERROR_H__
+#define __GA_ERROR_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+#include <avahi-common/error.h>
+
+GQuark ga_error_quark(void);
+
+#define GA_ERROR ga_error_quark()
+
+G_END_DECLS
+#endif /* #ifndef __GA_ERROR_H__ */
diff --git a/avahi-gobject/ga-errors.c b/avahi-gobject/ga-errors.c
deleted file mode 100644 (file)
index 5abe36a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ga-errors.c - Source for error types used
- * Copyright (C) 2006 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include "ga-errors.h"
-
-GQuark ga_errors_quark(void) {
-    static GQuark quark = 0;
-    if (!quark)
-        quark = g_quark_from_static_string("ga_errors");
-    return quark;
-}
diff --git a/avahi-gobject/ga-errors.h b/avahi-gobject/ga-errors.h
deleted file mode 100644 (file)
index 9ed10e0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * ga-errors.h - Header for Avahi error types
- * Copyright (C) 2005 Collabora Ltd.
- * Copyright (C) 2005 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __GA_ERRORS_H__
-#define __GA_ERRORS_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-#include <avahi-common/error.h>
-
-GQuark ga_errors_quark(void);
-
-#define GA_ERRORS ga_errors_quark()
-
-G_END_DECLS
-#endif /* #ifndef __GA_ERRORS_H__ */
index f6747cdb183078da0ad8a75be42c557d6566c948..2fe536c11866e4eee23f3d45300f57de704cccb0 100644 (file)
@@ -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));
         }
index f694ca5fd6468a810357a762bef93892ccb46255..2f4295c02424cefc9ead1a1d7923e62cf5d61859 100644 (file)
@@ -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));
         }
index 380e0a588ac36f8fa541508d35e0ffd2ee55eca1..6ba90cd02345c328587412dd551adb33f235f3f3 100644 (file)
@@ -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));
         }