|
|
|
@ -1,60 +1,64 @@
|
|
|
|
|
diff -ur gnome-vfs-2.12.1.1.avahi/configure.in gnome-vfs-2.12.1.1/configure.in
|
|
|
|
|
--- gnome-vfs-2.12.1.1.avahi/configure.in 2005-10-05 10:52:41.000000000 +0200
|
|
|
|
|
+++ gnome-vfs-2.12.1.1/configure.in 2005-11-22 12:02:42.000000000 +0100
|
|
|
|
|
@@ -651,12 +651,26 @@
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
dnl ****************************
|
|
|
|
|
-dnl Howl
|
|
|
|
|
+dnl DNS-SD implementations
|
|
|
|
|
dnl ****************************
|
|
|
|
|
-msg_howl=no
|
|
|
|
|
+AM_CONDITIONAL(HAVE_AVAHI, false)
|
|
|
|
|
AM_CONDITIONAL(HAVE_HOWL, false)
|
|
|
|
|
+
|
|
|
|
|
+AC_ARG_ENABLE(avahi, [ --disable-avahi build without avahi support])
|
|
|
|
|
+msg_avahi=no
|
|
|
|
|
+if test "x$enable_avahi" != "xno"; then
|
|
|
|
|
+ PKG_CHECK_MODULES(AVAHI, avahi-glib >= 0.6 avahi-client >= 0.6,
|
|
|
|
|
+ [AM_CONDITIONAL(HAVE_AVAHI, true)
|
|
|
|
|
+ AC_DEFINE(HAVE_AVAHI, [], [Set if we can use avahi])]
|
|
|
|
|
+ msg_avahi=yes,
|
|
|
|
|
+ [AM_CONDITIONAL(HAVE_AVAHI, false)])
|
|
|
|
|
+ AC_SUBST(AVAHI_CFLAGS)
|
|
|
|
|
+ AC_SUBST(AVAHI_LIBS)
|
|
|
|
|
+fi
|
|
|
|
|
+
|
|
|
|
|
AC_ARG_ENABLE(howl, [ --disable-howl build without howl support])
|
|
|
|
|
-if test "x$enable_howl" != "xno"; then
|
|
|
|
|
+msg_howl=no
|
|
|
|
|
+if test "x$msg_avahi" = "xno" -a "x$enable_howl" != "xno"; then
|
|
|
|
|
PKG_CHECK_MODULES(HOWL, howl >= 0.9.6,
|
|
|
|
|
[AM_CONDITIONAL(HAVE_HOWL, true)
|
|
|
|
|
AC_DEFINE(HAVE_HOWL, [], [Set if we can use howl])]
|
|
|
|
|
@@ -969,8 +983,8 @@
|
|
|
|
|
dnl ==============================================================================
|
|
|
|
|
--- gnome-vfs-2.13.1/modules/dns-sd-method.c.avahi 2005-12-02 13:32:54.000000000 -0500
|
|
|
|
|
+++ gnome-vfs-2.13.1/modules/dns-sd-method.c 2005-12-02 13:33:07.000000000 -0500
|
|
|
|
|
@@ -31,7 +31,9 @@
|
|
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(LIBGNOMEVFS, glib-2.0 >= $GLIB_REQUIRED gmodule-no-export-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED libbonobo-2.0 >= $BONOBO_REQUIRED ORBit-2.0 >= $ORBIT_REQUIRED libxml-2.0 >= $XML_REQUIRED gnome-mime-data-2.0)
|
|
|
|
|
-LIBGNOMEVFS_CFLAGS="$LIBGNOMEVFS_CFLAGS $OPENSSL_CFLAGS $LIBGNUTLS_CFLAGS $HOWL_CFLAGS"
|
|
|
|
|
-LIBGNOMEVFS_LIBS="$LIBGNOMEVFS_LIBS $OPENSSL_LIBS $LIBGNUTLS_LIBS $HOWL_LIBS $RESOLVER_LIBS"
|
|
|
|
|
+LIBGNOMEVFS_CFLAGS="$LIBGNOMEVFS_CFLAGS $OPENSSL_CFLAGS $LIBGNUTLS_CFLAGS $HOWL_CFLAGS $AVAHI_CFLAGS"
|
|
|
|
|
+LIBGNOMEVFS_LIBS="$LIBGNOMEVFS_LIBS $OPENSSL_LIBS $LIBGNUTLS_LIBS $HOWL_LIBS $AVAHI_LIBS $RESOLVER_LIBS"
|
|
|
|
|
AC_SUBST(LIBGNOMEVFS_CFLAGS)
|
|
|
|
|
AC_SUBST(LIBGNOMEVFS_LIBS)
|
|
|
|
|
#ifdef HAVE_AVAHI
|
|
|
|
|
#include <avahi-client/client.h>
|
|
|
|
|
+#include <avahi-client/lookup.h>
|
|
|
|
|
#include <avahi-common/error.h>
|
|
|
|
|
+#include <avahi-common/timeval.h>
|
|
|
|
|
#include <avahi-common/simple-watch.h>
|
|
|
|
|
#include <avahi-glib/glib-watch.h>
|
|
|
|
|
#endif
|
|
|
|
|
@@ -320,7 +322,7 @@
|
|
|
|
|
AvahiSimplePoll *poll;
|
|
|
|
|
|
|
|
|
|
poll = user_data;
|
|
|
|
|
- if (state == AVAHI_CLIENT_DISCONNECTED) {
|
|
|
|
|
+ if (state == AVAHI_CLIENT_FAILURE) {
|
|
|
|
|
avahi_simple_poll_quit (poll);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -333,12 +335,18 @@
|
|
|
|
|
const char *name,
|
|
|
|
|
const char *type,
|
|
|
|
|
const char *domain,
|
|
|
|
|
+ AvahiLookupResultFlags flags,
|
|
|
|
|
void *user_data)
|
|
|
|
|
{
|
|
|
|
|
+ AvahiSimplePoll *poll = user_data;
|
|
|
|
|
+
|
|
|
|
|
if (event == AVAHI_BROWSER_NEW)
|
|
|
|
|
local_browse (TRUE, name, type, domain);
|
|
|
|
|
else if (event == AVAHI_BROWSER_REMOVE)
|
|
|
|
|
local_browse (FALSE, name, type, domain);
|
|
|
|
|
+ else if (event == AVAHI_BROWSER_ALL_FOR_NOW)
|
|
|
|
|
+ avahi_simple_poll_quit (poll);
|
|
|
|
|
+
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
@@ -385,7 +393,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1136,6 +1150,7 @@
|
|
|
|
|
echo "Gnome VFS configuration summary:"
|
|
|
|
|
echo "
|
|
|
|
|
IPv6 support: $have_ipv6
|
|
|
|
|
+ Avahi support: $msg_avahi
|
|
|
|
|
Howl support: $msg_howl
|
|
|
|
|
HAL support: $msg_hal
|
|
|
|
|
Gtk Doc: $enable_gtk_doc
|
|
|
|
|
Only in gnome-vfs-2.12.1.1: configure.in.orig
|
|
|
|
|
Only in gnome-vfs-2.12.1.1: configure.in.rej
|
|
|
|
|
diff -ur gnome-vfs-2.12.1.1.avahi/libgnomevfs/gnome-vfs-dns-sd.c gnome-vfs-2.12.1.1/libgnomevfs/gnome-vfs-dns-sd.c
|
|
|
|
|
--- gnome-vfs-2.12.1.1.avahi/libgnomevfs/gnome-vfs-dns-sd.c 2005-07-14 09:47:53.000000000 +0200
|
|
|
|
|
+++ gnome-vfs-2.12.1.1/libgnomevfs/gnome-vfs-dns-sd.c 2005-11-22 12:08:19.000000000 +0100
|
|
|
|
|
poll = avahi_simple_poll_get (simple_poll);
|
|
|
|
|
- client = avahi_client_new (poll,
|
|
|
|
|
+ client = avahi_client_new (poll, 0,
|
|
|
|
|
avahi_client_callback, simple_poll, &error);
|
|
|
|
|
|
|
|
|
|
/* Check wether creating the client object succeeded */
|
|
|
|
|
@@ -400,7 +408,8 @@
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (dns_sd_types); i++) {
|
|
|
|
|
sb[i] = avahi_service_browser_new (client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC,
|
|
|
|
|
dns_sd_types[i].type, "local",
|
|
|
|
|
- local_browse_callback_sync, NULL);
|
|
|
|
|
+ AVAHI_LOOKUP_USE_MULTICAST,
|
|
|
|
|
+ local_browse_callback_sync, simple_poll);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--- gnome-vfs-2.13.1/libgnomevfs/gnome-vfs-dns-sd.c.avahi 2005-12-02 13:32:36.000000000 -0500
|
|
|
|
|
+++ gnome-vfs-2.13.1/libgnomevfs/gnome-vfs-dns-sd.c 2005-12-02 13:33:21.000000000 -0500
|
|
|
|
|
@@ -36,6 +36,15 @@
|
|
|
|
|
#include <gconf/gconf-client.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
@ -112,7 +116,7 @@ diff -ur gnome-vfs-2.12.1.1.avahi/libgnomevfs/gnome-vfs-dns-sd.c gnome-vfs-2.12.
|
|
|
|
|
+ global_client = avahi_client_new (avahi_glib_poll_get (glib_poll),
|
|
|
|
|
+ AVAHI_CLIENT_NO_FAIL,
|
|
|
|
|
+ avahi_client_callback,
|
|
|
|
|
+ NULL,
|
|
|
|
|
+ glib_poll,
|
|
|
|
|
+ &error);
|
|
|
|
|
+
|
|
|
|
|
+ if (global_client == NULL) {
|
|
|
|
@ -644,315 +648,14 @@ diff -ur gnome-vfs-2.12.1.1.avahi/libgnomevfs/gnome-vfs-dns-sd.c gnome-vfs-2.12.
|
|
|
|
|
sw_discovery session;
|
|
|
|
|
sw_salt salt;
|
|
|
|
|
sw_result res;
|
|
|
|
|
diff -ur gnome-vfs-2.12.1.1.avahi/modules/dns-sd-method.c gnome-vfs-2.12.1.1/modules/dns-sd-method.c
|
|
|
|
|
--- gnome-vfs-2.12.1.1.avahi/modules/dns-sd-method.c 2005-05-08 15:04:05.000000000 +0200
|
|
|
|
|
+++ gnome-vfs-2.12.1.1/modules/dns-sd-method.c 2005-11-22 12:09:19.000000000 +0100
|
|
|
|
|
@@ -29,6 +29,15 @@
|
|
|
|
|
#include <time.h>
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
|
|
+#ifdef HAVE_AVAHI
|
|
|
|
|
+#include <avahi-client/client.h>
|
|
|
|
|
+#include <avahi-client/lookup.h>
|
|
|
|
|
+#include <avahi-common/error.h>
|
|
|
|
|
+#include <avahi-common/timeval.h>
|
|
|
|
|
+#include <avahi-common/simple-watch.h>
|
|
|
|
|
+#include <avahi-glib/glib-watch.h>
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
#ifdef HAVE_HOWL
|
|
|
|
|
/* Need to work around howl exporting its config file... */
|
|
|
|
|
#undef PACKAGE
|
|
|
|
|
@@ -58,15 +67,16 @@
|
|
|
|
|
} dns_sd_types[] = {
|
|
|
|
|
{"_ftp._tcp", "ftp", "gnome-fs-ftp"},
|
|
|
|
|
{"_webdav._tcp", "dav", "gnome-fs-share"},
|
|
|
|
|
+ {"_webdavs._tcp", "davs", "gnome-fs-share"},
|
|
|
|
|
{"_sftp-ssh._tcp", "sftp", "gnome-fs-ssh"},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
-#ifdef HAVE_HOWL
|
|
|
|
|
+#if defined (HAVE_HOWL) || defined (HAVE_AVAHI)
|
|
|
|
|
G_LOCK_DEFINE_STATIC (local);
|
|
|
|
|
static gboolean started_local = FALSE;
|
|
|
|
|
static GList *local_files = NULL;
|
|
|
|
|
static GList *local_monitors = NULL;
|
|
|
|
|
-#endif /* HAVE_HOWL */
|
|
|
|
|
+#endif /* HAVE_HOWL || HAVE_AVAHI */
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
char *data;
|
|
|
|
|
@@ -216,8 +226,7 @@
|
|
|
|
|
return g_string_free (string, FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-#ifdef HAVE_HOWL
|
|
|
|
|
-
|
|
|
|
|
+#if defined (HAVE_HOWL) || defined (HAVE_AVAHI)
|
|
|
|
|
static void
|
|
|
|
|
call_monitors (gboolean add, char *filename)
|
|
|
|
|
{
|
|
|
|
|
@@ -240,7 +249,6 @@
|
|
|
|
|
gnome_vfs_uri_unref (info_uri);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
static void
|
|
|
|
|
local_browse (gboolean add,
|
|
|
|
|
const char *name,
|
|
|
|
|
@@ -291,6 +299,144 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+static void
|
|
|
|
|
+local_browse_callback (GnomeVFSDNSSDBrowseHandle *handle,
|
|
|
|
|
+ GnomeVFSDNSSDServiceStatus status,
|
|
|
|
|
+ const GnomeVFSDNSSDService *service,
|
|
|
|
|
+ gpointer callback_data)
|
|
|
|
|
+{
|
|
|
|
|
+ G_LOCK (local);
|
|
|
|
|
+
|
|
|
|
|
+ local_browse (status == GNOME_VFS_DNS_SD_SERVICE_ADDED,
|
|
|
|
|
+ service->name, service->type, service->domain);
|
|
|
|
|
+
|
|
|
|
|
+ G_UNLOCK (local);
|
|
|
|
|
+}
|
|
|
|
|
+#endif /* HAVE_HOWL || HAVE_AVAHI */
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+#ifdef HAVE_AVAHI
|
|
|
|
|
+static void
|
|
|
|
|
+avahi_client_callback (AvahiClient *client, AvahiClientState state, void *user_data)
|
|
|
|
|
+{
|
|
|
|
|
+ AvahiSimplePoll *poll;
|
|
|
|
|
+
|
|
|
|
|
+ poll = user_data;
|
|
|
|
|
+ if (state == AVAHI_CLIENT_FAILURE) {
|
|
|
|
|
+ avahi_simple_poll_quit (poll);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+static void
|
|
|
|
|
+local_browse_callback_sync (AvahiServiceBrowser *b,
|
|
|
|
|
+ AvahiIfIndex interface,
|
|
|
|
|
+ AvahiProtocol protocol,
|
|
|
|
|
+ AvahiBrowserEvent event,
|
|
|
|
|
+ const char *name,
|
|
|
|
|
+ const char *type,
|
|
|
|
|
+ const char *domain,
|
|
|
|
|
+ AvahiLookupResultFlags flags,
|
|
|
|
|
+ void *user_data)
|
|
|
|
|
+{
|
|
|
|
|
+ AvahiSimplePoll *poll = user_data;
|
|
|
|
|
+
|
|
|
|
|
+ if (event == AVAHI_BROWSER_NEW)
|
|
|
|
|
+ local_browse (TRUE, name, type, domain);
|
|
|
|
|
+ else if (event == AVAHI_BROWSER_REMOVE)
|
|
|
|
|
+ local_browse (FALSE, name, type, domain);
|
|
|
|
|
+ else if (event == AVAHI_BROWSER_ALL_FOR_NOW)
|
|
|
|
|
+ avahi_simple_poll_quit (poll);
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+static void
|
|
|
|
|
+stop_poll_timeout (AvahiTimeout *timeout, void *user_data)
|
|
|
|
|
+{
|
|
|
|
|
+ AvahiSimplePoll *poll = user_data;
|
|
|
|
|
+
|
|
|
|
|
+ avahi_simple_poll_quit (poll);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+static void
|
|
|
|
|
+init_local (void)
|
|
|
|
|
+{
|
|
|
|
|
+ int i;
|
|
|
|
|
+ GnomeVFSResult res;
|
|
|
|
|
+
|
|
|
|
|
+ if (!started_local) {
|
|
|
|
|
+ AvahiSimplePoll *simple_poll;
|
|
|
|
|
+ const AvahiPoll *poll;
|
|
|
|
|
+ AvahiClient *client = NULL;
|
|
|
|
|
+ AvahiServiceBrowser **sb;
|
|
|
|
|
+ struct timeval tv;
|
|
|
|
|
+ int error;
|
|
|
|
|
+
|
|
|
|
|
+ started_local = TRUE;
|
|
|
|
|
+
|
|
|
|
|
+ for (i = 0; i < G_N_ELEMENTS (dns_sd_types); i++) {
|
|
|
|
|
+ GnomeVFSDNSSDBrowseHandle *handle;
|
|
|
|
|
+ res = gnome_vfs_dns_sd_browse (&handle,
|
|
|
|
|
+ "local",
|
|
|
|
|
+ dns_sd_types[i].type,
|
|
|
|
|
+ local_browse_callback,
|
|
|
|
|
+ NULL, NULL);
|
|
|
|
|
+ if (res == GNOME_VFS_OK) {
|
|
|
|
|
+ dns_sd_types[i].handle = handle;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ simple_poll = avahi_simple_poll_new ();
|
|
|
|
|
+ if (simple_poll == NULL) {
|
|
|
|
|
+ g_warning ("Failed to create simple poll object");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ poll = avahi_simple_poll_get (simple_poll);
|
|
|
|
|
+ client = avahi_client_new (poll, 0,
|
|
|
|
|
+ avahi_client_callback, simple_poll, &error);
|
|
|
|
|
+
|
|
|
|
|
+ /* Check wether creating the client object succeeded */
|
|
|
|
|
+ if (client == NULL) {
|
|
|
|
|
+ g_warning ("Failed to create client: %s\n", avahi_strerror (error));
|
|
|
|
|
+ avahi_simple_poll_free (simple_poll);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ sb = g_new0 (AvahiServiceBrowser *, G_N_ELEMENTS (dns_sd_types));
|
|
|
|
|
+
|
|
|
|
|
+ for (i = 0; i < G_N_ELEMENTS (dns_sd_types); i++) {
|
|
|
|
|
+ sb[i] = avahi_service_browser_new (client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC,
|
|
|
|
|
+ dns_sd_types[i].type, "local",
|
|
|
|
|
+ AVAHI_LOOKUP_USE_MULTICAST,
|
|
|
|
|
+ local_browse_callback_sync, simple_poll);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ avahi_elapse_time (&tv, LOCAL_SYNC_BROWSE_DELAY_MSEC, 0);
|
|
|
|
|
+ poll->timeout_new (poll, &tv, stop_poll_timeout,
|
|
|
|
|
+ (void *)simple_poll);
|
|
|
|
|
+
|
|
|
|
|
+ /* Run the main loop util reply or timeout */
|
|
|
|
|
+ for (;;)
|
|
|
|
|
+ if (avahi_simple_poll_iterate (simple_poll, -1) != 0)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ for (i = 0; i < G_N_ELEMENTS (dns_sd_types); i++) {
|
|
|
|
|
+ if (sb[i] != NULL) {
|
|
|
|
|
+ avahi_service_browser_free (sb[i]);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ avahi_client_free (client);
|
|
|
|
|
+ avahi_simple_poll_free (simple_poll);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+#endif /* HAVE_AVAHI */
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+#ifdef HAVE_HOWL
|
|
|
|
|
static sw_result
|
|
|
|
|
local_browse_callback_sync (sw_discovery discovery,
|
|
|
|
|
sw_discovery_oid id,
|
|
|
|
|
@@ -309,19 +455,6 @@
|
|
|
|
|
return SW_OKAY;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-static void
|
|
|
|
|
-local_browse_callback (GnomeVFSDNSSDBrowseHandle *handle,
|
|
|
|
|
- GnomeVFSDNSSDServiceStatus status,
|
|
|
|
|
- const GnomeVFSDNSSDService *service,
|
|
|
|
|
- gpointer callback_data)
|
|
|
|
|
-{
|
|
|
|
|
- G_LOCK (local);
|
|
|
|
|
-
|
|
|
|
|
- local_browse (status == GNOME_VFS_DNS_SD_SERVICE_ADDED,
|
|
|
|
|
- service->name, service->type, service->domain);
|
|
|
|
|
-
|
|
|
|
|
- G_UNLOCK (local);
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
init_local (void)
|
|
|
|
|
@@ -694,7 +827,7 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-#ifdef HAVE_HOWL
|
|
|
|
|
+#if defined (HAVE_HOWL) || defined (HAVE_AVAHI)
|
|
|
|
|
static void
|
|
|
|
|
directory_handle_add_filenames (DirectoryHandle *dir_handle, GList *files)
|
|
|
|
|
{
|
|
|
|
|
@@ -703,7 +836,7 @@
|
|
|
|
|
files = files->next;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
-#endif
|
|
|
|
|
+#endif /* HAVE_HOWL || HAVE_AVAHI */
|
|
|
|
|
|
|
|
|
|
static GnomeVFSResult
|
|
|
|
|
do_open_directory (GnomeVFSMethod *method,
|
|
|
|
|
@@ -733,14 +866,14 @@
|
|
|
|
|
dir_handle = directory_handle_new (options);
|
|
|
|
|
|
|
|
|
|
if (strcmp (domain, "local") == 0) {
|
|
|
|
|
-#ifdef HAVE_HOWL
|
|
|
|
|
+#if defined (HAVE_HOWL) || defined (HAVE_AVAHI)
|
|
|
|
|
G_LOCK (local);
|
|
|
|
|
init_local ();
|
|
|
|
|
|
|
|
|
|
directory_handle_add_filenames (dir_handle, local_files);
|
|
|
|
|
|
|
|
|
|
G_UNLOCK (local);
|
|
|
|
|
-#endif /* HAVE_HOWL */
|
|
|
|
|
+#endif /* HAVE_HOWL || HAVE_AVAHI */
|
|
|
|
|
} else {
|
|
|
|
|
for (i=0; i < G_N_ELEMENTS (dns_sd_types); i++) {
|
|
|
|
|
int n_services;
|
|
|
|
|
@@ -1007,7 +1140,7 @@
|
|
|
|
|
return GNOME_VFS_ERROR_NOT_SUPPORTED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-#ifdef HAVE_HOWL
|
|
|
|
|
+#if defined (HAVE_HOWL) || defined (HAVE_AVAHI)
|
|
|
|
|
if (strcmp (uri->text, "") == 0 ||
|
|
|
|
|
strcmp (uri->text, "/") == 0) {
|
|
|
|
|
int *handle;
|
|
|
|
|
@@ -1025,7 +1158,7 @@
|
|
|
|
|
|
|
|
|
|
return GNOME_VFS_OK;
|
|
|
|
|
} else
|
|
|
|
|
-#endif /* HAVE_HOWL */
|
|
|
|
|
+#endif /* HAVE_HOWL || HAVE_AVAHI */
|
|
|
|
|
return GNOME_VFS_ERROR_NOT_SUPPORTED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1033,7 +1166,7 @@
|
|
|
|
|
do_monitor_cancel (GnomeVFSMethod *method,
|
|
|
|
|
GnomeVFSMethodHandle *method_handle)
|
|
|
|
|
{
|
|
|
|
|
-#ifdef HAVE_HOWL
|
|
|
|
|
+#if defined (HAVE_HOWL) || defined (HAVE_AVAHI)
|
|
|
|
|
G_LOCK (local);
|
|
|
|
|
|
|
|
|
|
local_monitors = g_list_remove (local_monitors, method_handle);
|
|
|
|
|
@@ -1044,7 +1177,7 @@
|
|
|
|
|
return GNOME_VFS_OK;
|
|
|
|
|
#else
|
|
|
|
|
return GNOME_VFS_ERROR_NOT_SUPPORTED;
|
|
|
|
|
-#endif /* HAVE_HOWL */
|
|
|
|
|
+#endif /* HAVE_HOWL || HAVE_AVAHI */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff -ur gnome-vfs-2.12.1.1.avahi/modules/Makefile.am gnome-vfs-2.12.1.1/modules/Makefile.am
|
|
|
|
|
--- gnome-vfs-2.12.1.1.avahi/modules/Makefile.am 2005-04-14 20:48:29.000000000 +0200
|
|
|
|
|
+++ gnome-vfs-2.12.1.1/modules/Makefile.am 2005-11-22 12:02:34.000000000 +0100
|
|
|
|
|
@@ -7,6 +7,7 @@
|
|
|
|
|
$(MODULES_XML_GCONF_CFLAGS) \
|
|
|
|
|
$(MODULES_FILE_CFLAGS) \
|
|
|
|
|
$(HOWL_CFLAGS) \
|
|
|
|
|
+ $(AVAHI_CFLAGS) \
|
|
|
|
|
$(LIBEFS_CFLAGS) \
|
|
|
|
|
$(SAMBA_CFLAGS) \
|
|
|
|
|
$(GSSAPI_CFLAGS) \
|
|
|
|
|
@@ -103,7 +104,7 @@
|
|
|
|
|
|
|
|
|
|
libdns_sd_la_SOURCES = dns-sd-method.c
|
|
|
|
|
libdns_sd_la_LDFLAGS = $(module_flags)
|
|
|
|
|
-libdns_sd_la_LIBADD = $(MODULES_LIBS) $(HOWL_LIBS) ../libgnomevfs/libgnomevfs-2.la
|
|
|
|
|
+libdns_sd_la_LIBADD = $(MODULES_LIBS) $(HOWL_LIBS) $(AVAHI_LIBS) ../libgnomevfs/libgnomevfs-2.la
|
|
|
|
|
|
|
|
|
|
### `file' method
|
|
|
|
|
|
|
|
|
|
--- gnome-vfs-2.13.1/configure.in.avahi 2005-12-02 13:34:02.000000000 -0500
|
|
|
|
|
+++ gnome-vfs-2.13.1/configure.in 2005-12-02 13:34:27.000000000 -0500
|
|
|
|
|
@@ -662,7 +662,7 @@
|
|
|
|
|
AC_ARG_ENABLE(avahi, [ --disable-avahi build without avahi support])
|
|
|
|
|
msg_avahi=no
|
|
|
|
|
if test "x$enable_avahi" != "xno"; then
|
|
|
|
|
- PKG_CHECK_MODULES(AVAHI, avahi-glib avahi-client,
|
|
|
|
|
+ PKG_CHECK_MODULES(AVAHI, avahi-glib >= 0.6 avahi-client >= 0.6,
|
|
|
|
|
[AM_CONDITIONAL(HAVE_AVAHI, true)
|
|
|
|
|
AC_DEFINE(HAVE_AVAHI, [], [Set if we can use avahi])]
|
|
|
|
|
msg_avahi=yes,
|
|
|
|
|