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
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
#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>
_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));
}
#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"
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
--- /dev/null
+/*
+ * 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;
+}
--- /dev/null
+/*
+ * 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__ */
+++ /dev/null
-/*
- * 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;
-}
+++ /dev/null
-/*
- * 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__ */
#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)
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);
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));
}
#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)
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);
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));
}
#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"
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);
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));
}