diff -rN -u -p old-daap/backends/gstreamer/Makefile.am new-daap/backends/gstreamer/Makefile.am
--- old-daap/backends/gstreamer/Makefile.am	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/backends/gstreamer/Makefile.am	2006-11-02 21:24:57.000000000 +1000
@@ -30,7 +30,3 @@ librbbackendsgstreamer_la_SOURCES +=	\
 	rb-encoder-gst.c
 endif
 
-if USE_DAAP
-INCLUDES += -I$(top_srcdir)/daapsharing			
-endif
-
diff -rN -u -p old-daap/backends/gstreamer/rb-player-gst.c new-daap/backends/gstreamer/rb-player-gst.c
--- old-daap/backends/gstreamer/rb-player-gst.c	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/backends/gstreamer/rb-player-gst.c	2006-11-02 21:24:57.000000000 +1000
@@ -41,10 +41,6 @@
 #include "rb-debug.h"
 #include "rb-marshal.h"
 
-#if defined(HAVE_GSTREAMER_0_8) && defined(WITH_DAAP_SUPPORT)
-#include "rb-daap-src.h"
-#endif
-
 static void rb_player_init (RBPlayerIface *iface);
 static void rb_player_gst_finalize (GObject *object);
 
@@ -1053,24 +1049,6 @@ rb_player_gst_set_time (RBPlayer *player
 	}
 #endif
 
-#if defined(HAVE_GSTREAMER_0_8) && defined(WITH_DAAP_SUPPORT)
-	/* FIXME?
-	 * This is sorta hack/sorta best way to do it.
-	 * If we set up the daapsrc to do regular GStreamer seeking,
-	 * GStreamer goes ape-shit and tries to seek all over the
-	 * place (typefinding), which can cause iTunes to return errors
-	 * (probably cause we're requesting the same file too often)
- 	 *
-	 * So, we do it this way.  Doesn't that suck?
-	 */
-	if (mp->priv->uri && g_strncasecmp (mp->priv->uri, "daap://", 7) == 0) {
-		GstElement *src;
-
-		g_object_get (G_OBJECT (mp->priv->playbin), "source", &src, NULL);
-		if (src)
-			rb_daap_src_set_time (src, time);
-	} else {
-#endif
 #ifdef HAVE_GSTREAMER_0_8
 	gst_element_seek (mp->priv->playbin,
 			  GST_FORMAT_TIME
@@ -1084,9 +1062,6 @@ rb_player_gst_set_time (RBPlayer *player
 			  GST_SEEK_TYPE_NONE, -1);
 #endif
 
-#if defined(HAVE_GSTREAMER_0_8) && defined(WITH_DAAP_SUPPORT)
-	}
-#endif
 	if (mp->priv->playing) {
 		gst_element_set_state (mp->priv->playbin, GST_STATE_PLAYING);
 	}
@@ -1109,15 +1084,6 @@ rb_player_gst_get_time (RBPlayer *player
 		if (position != -1)
 			position /= GST_SECOND;
 
-#if defined(HAVE_GSTREAMER_0_8) && defined(WITH_DAAP_SUPPORT)
-		if (mp->priv->uri && g_strncasecmp (mp->priv->uri, "daap://", 7) == 0) {
-			GstElement *src;
-			g_object_get (G_OBJECT (mp->priv->playbin), "source", &src, NULL);
-			if (src)
-				position += rb_daap_src_get_time (src);
-		}
-#endif
-
 		return (long) position;
 	} else
 		return -1;
diff -rN -u -p old-daap/configure.ac new-daap/configure.ac
--- old-daap/configure.ac	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/configure.ac	2006-11-02 21:24:57.000000000 +1000
@@ -485,6 +485,11 @@ if test "x$enable_daap" != "xno"; then
 			AC_MSG_ERROR([DAAP support explicitly requested, but no mDNS implementation found.  Install Howl or Avahi])
 		fi
 		enable_daap=no
+	elif test x"$with_playback" = xgstreamer_0_8; then
+		if test "x$enable_daap" = "xyes"; then
+			AC_MSG_ERROR([DAAP support explicitly requested, but not supported with GStreamer 0.8])
+		fi
+		enable_daap=no
 	else
 		AC_DEFINE(WITH_DAAP_SUPPORT, 1, [Define if DAAP should be enabled])
 		enable_daap="yes"
@@ -937,6 +942,7 @@ plugins/sample/Makefile
 plugins/audiocd/Makefile
 plugins/audioscrobbler/Makefile
 plugins/cd-recorder/Makefile
+plugins/daap/Makefile
 plugins/ipod/Makefile
 plugins/iradio/Makefile
 plugins/lirc/Makefile
diff -rN -u -p old-daap/CVS-SURGERY new-daap/CVS-SURGERY
--- old-daap/CVS-SURGERY	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/CVS-SURGERY	2006-11-02 21:24:57.000000000 +1000
@@ -27,4 +27,9 @@ CVS surgery patient waiting list:
  iradio/rb-station-properties-dialog.h -> plugins/iradio/
  iradio/rb-station-properties-dialog.c -> plugins/iradio/
 
-
+ sources/rb-daap-source.c -> plugins/daap/
+ sources/rb-daap-source.h -> plugins/daap/
+ data/ui/daap-ui.xml -> plugins/daap/
+ data/glade/daap-prefs.glade -> plugins/daap/
+ daapsharing/* -> plugins/daap/
+ (possibly with the exception of the mdns stuff?)
diff -rN -u -p old-daap/daapsharing/Makefile.am new-daap/daapsharing/Makefile.am
--- old-daap/daapsharing/Makefile.am	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/daapsharing/Makefile.am	2006-11-02 21:24:57.000000000 +1000
@@ -44,14 +44,13 @@ INCLUDES =						\
 	-I$(top_srcdir) 				\
 	-I$(top_srcdir)/lib 				\
 	-I$(top_builddir)/lib 				\
-	-I$(top_srcdir)/corba 				\
-	-I$(top_builddir)/corba				\
 	-I$(top_srcdir)/rhythmdb			\
 	-I$(top_srcdir)/library 			\
 	-I$(top_srcdir)/iradio				\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_srcdir)/shell				\
 	-I$(top_srcdir)/sources				\
+	-I$(top_srcdir)/plugins				\
 	-DPIXMAP_DIR=\""$(datadir)/pixmaps"\"		\
 	-DSHARE_DIR=\"$(pkgdatadir)\"                   \
 	-DDATADIR=\""$(datadir)"\"			\
diff -rN -u -p old-daap/data/glade/Makefile.am new-daap/data/glade/Makefile.am
--- old-daap/data/glade/Makefile.am	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/data/glade/Makefile.am	2006-11-02 21:24:57.000000000 +1000
@@ -13,7 +13,6 @@ glade_DATA =	general-prefs.glade	  	\
 		create-playlist.glade		\
 		druid.glade			\
 		recorder.glade			\
-		daap-prefs.glade		\
 		uri.glade			\
 		plugins.glade			\
 		audioscrobbler-prefs.glade	\
diff -rN -u -p old-daap/data/rhythmbox.schemas new-daap/data/rhythmbox.schemas
--- old-daap/data/rhythmbox.schemas	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/data/rhythmbox.schemas	2006-11-02 21:24:57.000000000 +1000
@@ -1011,5 +1011,27 @@
 	<long>The size of the browser.</long>
         </locale>
       </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/daap/active</key>
+        <applyto>/apps/rhythmbox/plugins/daap/active</applyto>
+        <owner>rhythmbox</owner>
+        <type>bool</type>
+        <default>TRUE</default>
+        <locale name="C">
+        <short>True if the DAAP plugin is enabled.</short>
+	<long>True if the DAAP plugin is enabled.</long>
+	</locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/daap/hidden</key>
+        <applyto>/apps/rhythmbox/plugins/daap/hidden</applyto>
+        <owner>rhythmbox</owner>
+        <type>bool</type>
+        <default>TRUE</default>
+        <locale name="C">
+        <short>True if the DAAP plugin is hidden.</short>
+	<long>True if the DAAP plugin is hidden.</long>
+	</locale>
+      </schema>
     </schemalist>
 </gconfschemafile>
diff -rN -u -p old-daap/data/ui/Makefile.am new-daap/data/ui/Makefile.am
--- old-daap/data/ui/Makefile.am	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/data/ui/Makefile.am	2006-11-02 21:24:57.000000000 +1000
@@ -1,7 +1,7 @@
 ## arch-tag: Automake rules for XML user interface definition stuff
 
 uixmldir = $(pkgdatadir)
-uixml_DATA = rhythmbox-ui.xml ipod-ui.xml daap-ui.xml generic-player-ui.xml
+uixml_DATA = rhythmbox-ui.xml ipod-ui.xml generic-player-ui.xml
 
-EXTRA_DIST = rhythmbox-ui.xml ipod-ui.xml daap-ui.xml generic-player-ui.xml
+EXTRA_DIST = rhythmbox-ui.xml ipod-ui.xml generic-player-ui.xml
 
diff -rN -u -p old-daap/plugins/daap/daap.rb-plugin.desktop.in new-daap/plugins/daap/daap.rb-plugin.desktop.in
--- old-daap/plugins/daap/daap.rb-plugin.desktop.in	1970-01-01 10:00:00.000000000 +1000
+++ new-daap/plugins/daap/daap.rb-plugin.desktop.in	2006-11-02 21:24:57.000000000 +1000
@@ -0,0 +1,8 @@
+[RB Plugin]
+Module=daap
+IAge=1
+_Name=DAAP Music Sharing
+_Description=Share music and play shared music on your local network
+Authors=Charles Schmidt  <cschmidt2@emich.edu>, the Rhythmbox Developers
+Copyright=Copyright © 2005-2006 Charles Schmidt, the Rhythmbox Developers
+Website=http://www.rhythmbox.org
diff -rN -u -p old-daap/plugins/daap/Makefile.am new-daap/plugins/daap/Makefile.am
--- old-daap/plugins/daap/Makefile.am	1970-01-01 10:00:00.000000000 +1000
+++ new-daap/plugins/daap/Makefile.am	2006-11-02 21:24:57.000000000 +1000
@@ -0,0 +1,73 @@
+NULL =
+
+plugindir = $(PLUGINDIR)/daap
+plugin_LTLIBRARIES = libdaap.la
+
+libdaap_la_SOURCES = \
+	rb-daap-plugin.c			\
+	$(top_srcdir)/sources/rb-daap-source.c	\
+	$(top_srcdir)/sources/rb-daap-source.h
+
+libdaap_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+libdaap_la_LIBADD = 				\
+	$(top_builddir)/lib/librb.la			\
+	$(top_builddir)/daapsharing/libdaapsharing.la	\
+	$(SOUP_LIBS)					\
+	$(MDNS_LIBS)
+
+INCLUDES = 						\
+        -DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
+	-DG_LOG_DOMAIN=\"Rhythmbox\"		 	\
+	-I$(top_srcdir) 				\
+	-I$(top_srcdir)/lib                        	\
+	-I$(top_srcdir)/metadata                       	\
+	-I$(top_srcdir)/player                       	\
+	-I$(top_srcdir)/rhythmdb                       	\
+	-I$(top_srcdir)/widgets                    	\
+	-I$(top_srcdir)/sources                    	\
+	-I$(top_srcdir)/iradio                    	\
+	-I$(top_srcdir)/podcast                    	\
+	-I$(top_srcdir)/remote				\
+	-I$(top_builddir)/remote			\
+	-I$(top_srcdir)/plugins				\
+	-I$(top_srcdir)/shell				\
+	-I$(top_srcdir)/daapsharing			\
+	-I$(top_srcdir)/plugins				\
+	-DPIXMAP_DIR=\""$(datadir)/pixmaps"\"		\
+	-DSHARE_DIR=\"$(pkgdatadir)\"                   \
+	-DDATADIR=\""$(datadir)"\"			\
+	$(SOUP_CFLAGS)					\
+	$(MDNS_CFLAGS)					\
+	$(RHYTHMBOX_CFLAGS)				\
+	$(WARN_CFLAGS)					\
+	-D_XOPEN_SOURCE -D_BSD_SOURCE
+
+gladedir = $(datadir)/rhythmbox/glade
+glade_DATA = ../../data/glade/daap-prefs.glade
+
+plugin_in_files = daap.rb-plugin.desktop.in
+
+%.rb-plugin: %.rb-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+BUILT_SOURCES =							\
+	$(plugin_in_files:.rb-plugin.desktop.in=.rb-plugin) 	\
+	$(NULL)
+
+plugin_DATA = 			\
+	$(BUILT_SOURCES)	\
+	$(NULL)
+
+EXTRA_DIST = 			\
+	$(glade_DATA)		\
+	$(plugin_in_files)	\
+	../../data/ui/daap-ui.xml \
+	$(NULL)
+
+CLEANFILES = 			\
+	$(BUILT_SOURCES)	\
+	$(NULL)
+
+DISTCLEANFILES =		\
+	$(BUILT_SOURCES)	\
+	$(NULL)
+
diff -rN -u -p old-daap/plugins/daap/rb-daap-plugin.c new-daap/plugins/daap/rb-daap-plugin.c
--- old-daap/plugins/daap/rb-daap-plugin.c	1970-01-01 10:00:00.000000000 +1000
+++ new-daap/plugins/daap/rb-daap-plugin.c	2006-11-02 21:24:57.000000000 +1000
@@ -0,0 +1,324 @@
+/*
+ * rb-daap-plugin.c
+ *
+ * Copyright (C) 2006 James Livingston <jrl@ids.org.au>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <gmodule.h>
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include "rb-plugin.h"
+#include "rb-debug.h"
+#include "rb-shell.h"
+#include "rb-dialog.h"
+#include "rb-glade-helpers.h"
+#include "eel-gconf-extensions.h"
+#include "rb-daap-source.h"
+#include "rb-daap-sharing.h"
+
+
+#define RB_TYPE_DAAP_PLUGIN		(rb_daap_plugin_get_type ())
+#define RB_DAAP_PLUGIN(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_DAAP_PLUGIN, RBDaapPlugin))
+#define RB_DAAP_PLUGIN_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_DAAP_PLUGIN, RBDaapPluginClass))
+#define RB_IS_DAAP_PLUGIN(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_DAAP_PLUGIN))
+#define RB_IS_DAAP_PLUGIN_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_DAAP_PLUGIN))
+#define RB_DAAP_PLUGIN_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_DAAP_PLUGIN, RBDaapPluginClass))
+
+typedef struct
+{
+	RBPlugin parent;
+
+	GtkWidget *preferences;
+	gboolean sharing;
+} RBDaapPlugin;
+
+typedef struct
+{
+	RBPluginClass parent_class;
+} RBDaapPluginClass;
+
+
+G_MODULE_EXPORT GType register_rb_plugin (GTypeModule *module);
+GType	rb_daap_plugin_get_type		(void) G_GNUC_CONST;
+
+
+
+static void rb_daap_plugin_init (RBDaapPlugin *plugin);
+static void rb_daap_plugin_finalize (GObject *object);
+static void impl_activate (RBPlugin *plugin, RBShell *shell);
+static void impl_deactivate (RBPlugin *plugin, RBShell *shell);
+static GtkWidget* impl_create_configure_dialog (RBPlugin *plugin);
+
+RB_PLUGIN_REGISTER(RBDaapPlugin, rb_daap_plugin)
+
+static void
+rb_daap_plugin_class_init (RBDaapPluginClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	RBPluginClass *plugin_class = RB_PLUGIN_CLASS (klass);
+
+	object_class->finalize = rb_daap_plugin_finalize;
+
+	plugin_class->activate = impl_activate;
+	plugin_class->deactivate = impl_deactivate;
+	plugin_class->create_configure_dialog = impl_create_configure_dialog;
+}
+
+static void
+rb_daap_plugin_init (RBDaapPlugin *plugin)
+{
+	rb_debug ("RBDaapPlugin initialising");
+}
+
+static void
+rb_daap_plugin_finalize (GObject *object)
+{
+	RBDaapPlugin *plugin = RB_DAAP_PLUGIN (object);
+
+	rb_debug ("RBDaapPlugin finalising");
+
+	if (plugin->preferences)
+		gtk_widget_destroy (plugin->preferences);
+
+	G_OBJECT_CLASS (rb_daap_plugin_parent_class)->finalize (object);
+}
+
+
+
+static void
+impl_activate (RBPlugin *bplugin,
+	       RBShell *shell)
+{
+	RBDaapPlugin *plugin = RB_DAAP_PLUGIN (bplugin);
+	gboolean no_registration;
+
+	rb_daap_sources_init (bplugin, shell);
+
+	/*
+	 * Don't use daap when the no-registration flag is set.
+	 * This flag is only used to run multiple instances at the same time, and
+	 * sharing from two instances would be silly
+	 */
+	g_object_get (G_OBJECT (shell),
+		      "no-registration", &no_registration,
+		      NULL);
+	plugin->sharing = !no_registration;
+	if (plugin->sharing)
+		rb_daap_sharing_init (shell);
+}
+
+static void
+impl_deactivate	(RBPlugin *bplugin,
+		 RBShell *shell)
+{
+	RBDaapPlugin *plugin = RB_DAAP_PLUGIN (bplugin);
+
+	if (plugin->sharing)
+		rb_daap_sharing_shutdown (shell);
+
+	rb_daap_sources_shutdown (shell);
+}
+
+
+static void
+preferences_response_cb (GtkWidget *dialog, gint response, RBPlugin *plugin)
+{
+	gtk_widget_hide (dialog);
+}
+
+static void
+share_check_button_toggled_cb (GtkToggleButton *button,
+			       GtkWidget *widget)
+{
+	gboolean b;
+
+	b = gtk_toggle_button_get_active (button);
+
+	eel_gconf_set_boolean (CONF_DAAP_ENABLE_SHARING, b);
+
+	gtk_widget_set_sensitive (widget, b);
+}
+
+static void
+password_check_button_toggled_cb (GtkToggleButton *button,
+				  GtkWidget *widget)
+{
+	gboolean b;
+
+	b = gtk_toggle_button_get_active (button);
+
+	eel_gconf_set_boolean (CONF_DAAP_REQUIRE_PASSWORD, b);
+
+	gtk_widget_set_sensitive (widget, b);
+}
+
+static gboolean
+share_name_entry_focus_out_event_cb (GtkEntry *entry,
+				     GdkEventFocus *event,
+				     gpointer data)
+{
+	gboolean    changed;
+	const char *name;
+	char       *old_name;
+
+	name = gtk_entry_get_text (entry);
+	old_name = eel_gconf_get_string (CONF_DAAP_SHARE_NAME);
+
+	if (name == NULL && old_name == NULL) {
+		changed = FALSE;
+	} else if (name == NULL || old_name == NULL) {
+		changed = TRUE;
+	} else if (strcmp (name, old_name) != 0) {
+		changed = TRUE;
+	} else {
+		changed = FALSE;
+	}
+
+	if (changed)
+		eel_gconf_set_string (CONF_DAAP_SHARE_NAME, name);
+
+	g_free (old_name);
+
+	return FALSE;
+}
+
+static gboolean
+share_password_entry_focus_out_event_cb (GtkEntry *entry,
+					 GdkEventFocus *event,
+					 gpointer data)
+{
+	gboolean    changed;
+	const char *pw;
+	char       *old_pw;
+
+	pw = gtk_entry_get_text (entry);
+	old_pw = eel_gconf_get_string (CONF_DAAP_SHARE_PASSWORD);
+
+	if (pw == NULL && old_pw == NULL) {
+		changed = FALSE;
+	} else if (pw == NULL || old_pw == NULL) {
+		changed = TRUE;
+	} else if (strcmp (pw, old_pw) != 0) {
+		changed = TRUE;
+	} else {
+		changed = FALSE;
+	}
+
+	if (changed)
+		eel_gconf_set_string (CONF_DAAP_SHARE_PASSWORD, pw);
+
+	g_free (old_pw);
+
+	return FALSE;
+}
+
+static GtkWidget *
+make_config_widget (RBPlugin *plugin)
+{
+	GladeXML *xml;
+	GtkWidget *check;
+	GtkWidget *name_entry;
+	GtkWidget *password_entry;
+	GtkWidget *password_check;
+	GtkWidget *box;
+	gboolean sharing_enabled;
+	gboolean require_password;
+
+	char *name;
+	char *password;
+	char *gladefile;
+
+	gladefile = rb_plugin_find_file (plugin, "daap-prefs.glade");
+	if (gladefile == NULL) {
+		return NULL;
+	}
+
+	xml = rb_glade_xml_new (gladefile,
+				"daap_vbox",
+				NULL);
+	g_free (gladefile);
+
+	check = glade_xml_get_widget (xml, "daap_enable_check");
+	password_check = glade_xml_get_widget (xml, "daap_password_check");
+	name_entry = glade_xml_get_widget (xml, "daap_name_entry");
+	password_entry = glade_xml_get_widget (xml, "daap_password_entry");
+	box = glade_xml_get_widget (xml, "daap_box");
+
+	sharing_enabled = eel_gconf_get_boolean (CONF_DAAP_ENABLE_SHARING);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), sharing_enabled);
+	g_signal_connect (check, "toggled", G_CALLBACK (share_check_button_toggled_cb), box);
+
+	require_password = eel_gconf_get_boolean (CONF_DAAP_REQUIRE_PASSWORD);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (password_check), require_password);
+	g_signal_connect (password_check, "toggled", G_CALLBACK (password_check_button_toggled_cb), password_entry);
+
+	name = eel_gconf_get_string (CONF_DAAP_SHARE_NAME);
+	if (name != NULL)
+		gtk_entry_set_text (GTK_ENTRY (name_entry), name);
+	g_free (name);
+	g_signal_connect (name_entry, "focus-out-event",
+			  G_CALLBACK (share_name_entry_focus_out_event_cb), NULL);
+
+	password = eel_gconf_get_string (CONF_DAAP_SHARE_PASSWORD);
+	if (password != NULL)
+		gtk_entry_set_text (GTK_ENTRY (password_entry), password);
+	g_free (password);
+	g_signal_connect (password_entry, "focus-out-event",
+			  G_CALLBACK (share_password_entry_focus_out_event_cb), NULL);
+
+	gtk_widget_set_sensitive (box, sharing_enabled);
+	gtk_widget_set_sensitive (password_entry, require_password);
+
+	return glade_xml_get_widget (xml, "daap_vbox");
+}
+
+static GtkWidget*
+impl_create_configure_dialog (RBPlugin *bplugin)
+{
+	RBDaapPlugin *plugin = RB_DAAP_PLUGIN (bplugin);
+
+	if (plugin->preferences == NULL) {
+		GtkWidget *widget;
+
+		widget =  make_config_widget (bplugin);
+
+		plugin->preferences = gtk_dialog_new_with_buttons (_("DAAP Music Sharing Preferences"),
+								   NULL,
+								   GTK_DIALOG_DESTROY_WITH_PARENT,
+								   GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+								   NULL);
+		g_signal_connect (G_OBJECT (plugin->preferences),
+				  "response",
+				  G_CALLBACK (preferences_response_cb),
+				  plugin);
+		gtk_widget_hide_on_delete (plugin->preferences);
+
+		gtk_container_add (GTK_CONTAINER (GTK_DIALOG (plugin->preferences)->vbox), widget);
+	}
+
+	gtk_widget_show_all (plugin->preferences);
+	return plugin->preferences;
+}
+
diff -rN -u -p old-daap/plugins/Makefile.am new-daap/plugins/Makefile.am
--- old-daap/plugins/Makefile.am	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/plugins/Makefile.am	2006-11-02 21:24:57.000000000 +1000
@@ -38,6 +38,10 @@ if WITH_DBUS
 SUBDIRS += power-manager
 endif
 
+if USE_DAAP
+SUBDIRS += daap
+endif
+
 noinst_LTLIBRARIES = librbplugins.la
 
 librbplugins_la_SOURCES =				\
diff -rN -u -p old-daap/shell/Makefile.am new-daap/shell/Makefile.am
--- old-daap/shell/Makefile.am	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/shell/Makefile.am	2006-11-02 21:24:57.000000000 +1000
@@ -104,16 +104,6 @@ rhythmbox_LDADD =					\
 	$(top_builddir)/plugins/librbplugins.la		\
 	$(top_builddir)/lib/librb.la
 
-if USE_DAAP
-INCLUDES += -I$(top_srcdir)/daapsharing
-
-rhythmbox_LDADD += $(MDNS_LIBS) \
-		   $(top_builddir)/daapsharing/libdaapsharing.la
-if USE_GNOME_KEYRING
-rhythmbox_LDADD += $(GNOME_KEYRING_LIBS)
-endif
-endif
-
 if USE_LIBSOUP
 rhythmbox_LDADD += $(SOUP_LIBS)
 INCLUDES += $(SOUP_CFLAGS)
diff -rN -u -p old-daap/shell/rb-shell.c new-daap/shell/rb-shell.c
--- old-daap/shell/rb-shell.c	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/shell/rb-shell.c	2006-11-02 21:24:57.000000000 +1000
@@ -72,10 +72,6 @@
 #include "rb-library-source.h"
 #include "rb-podcast-source.h"
 #include "totem-pl-parser.h"
-#ifdef WITH_DAAP_SUPPORT
-#include "rb-daap-source.h"
-#include "rb-daap-sharing.h"
-#endif /* WITH_DAAP_SUPPORT */
 #include "rb-shell-preferences.h"
 #include "rb-playlist-source.h"
 #include "rb-static-playlist-source.h"
@@ -1188,12 +1184,6 @@ construct_sources (RBShell *shell)
 	g_signal_connect_object (G_OBJECT (shell->priv->playlist_manager), "playlist_created",
 				 G_CALLBACK (rb_shell_playlist_created_cb), shell, 0);
 
-#ifdef WITH_DAAP_SUPPORT
-	rb_daap_sources_init (shell);
-	if (!shell->priv->no_registration)
-		rb_daap_sharing_init (shell);
-#endif
-
 	/* Initialize removable media manager */
 	rb_debug ("shell: creating removable media manager");
 	shell->priv->removable_media_manager = rb_removable_media_manager_new (shell,
@@ -2398,11 +2388,6 @@ rb_shell_quit (RBShell *shell,
 
 	rb_podcast_source_shutdown (shell->priv->podcast_source);
 
-#ifdef WITH_DAAP_SUPPORT
-	rb_daap_sources_shutdown (shell);
-	if (!shell->priv->no_registration)
-		rb_daap_sharing_shutdown (shell);
-#endif /* WITH_DAAP_SUPPORT */
 	rb_shell_shutdown (shell);
 	rb_shell_sync_state (shell);
 	g_object_unref (G_OBJECT (shell));
diff -rN -u -p old-daap/shell/rb-shell-preferences.c new-daap/shell/rb-shell-preferences.c
--- old-daap/shell/rb-shell-preferences.c	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/shell/rb-shell-preferences.c	2006-11-02 21:24:57.000000000 +1000
@@ -269,158 +269,6 @@ rb_shell_preferences_append_view_page (R
 	rb_shell_preferences_append_page (prefs, name, widget);
 }
 
-#ifdef WITH_DAAP_SUPPORT
-
-static void
-share_check_button_toggled_cb (GtkToggleButton *button,
-			       GtkWidget *widget)
-{
-	gboolean b;
-
-	b = gtk_toggle_button_get_active (button);
-
-	eel_gconf_set_boolean (CONF_DAAP_ENABLE_SHARING, b);
-
-	gtk_widget_set_sensitive (widget, b);
-
-	return;
-}
-
-static void
-password_check_button_toggled_cb (GtkToggleButton *button,
-				  GtkWidget *widget)
-{
-	gboolean b;
-
-	b = gtk_toggle_button_get_active (button);
-
-	eel_gconf_set_boolean (CONF_DAAP_REQUIRE_PASSWORD, b);
-
-	gtk_widget_set_sensitive (widget, b);
-
-	return;
-}
-
-static gboolean
-share_name_entry_focus_out_event_cb (GtkEntry *entry,
-				     GdkEventFocus *event,
-				     gpointer data)
-{
-	gboolean    changed;
-	const char *name;
-	char       *old_name;
-
-	name = gtk_entry_get_text (entry);
-	old_name = eel_gconf_get_string (CONF_DAAP_SHARE_NAME);
-
-	if (name == NULL && old_name == NULL) {
-		changed = FALSE;
-	} else if (name == NULL || old_name == NULL) {
-		changed = TRUE;
-	} else if (strcmp (name, old_name) != 0) {
-		changed = TRUE;
-	} else {
-		changed = FALSE;
-	}
-
-	if (changed) {
-		eel_gconf_set_string (CONF_DAAP_SHARE_NAME, name);
-	}
-
-	g_free (old_name);
-
-	return FALSE;
-}
-
-static gboolean
-share_password_entry_focus_out_event_cb (GtkEntry *entry,
-					 GdkEventFocus *event,
-					 gpointer data)
-{
-	gboolean    changed;
-	const char *pw;
-	char       *old_pw;
-
-	pw = gtk_entry_get_text (entry);
-	old_pw = eel_gconf_get_string (CONF_DAAP_SHARE_PASSWORD);
-
-	if (pw == NULL && old_pw == NULL) {
-		changed = FALSE;
-	} else if (pw == NULL || old_pw == NULL) {
-		changed = TRUE;
-	} else if (strcmp (pw, old_pw) != 0) {
-		changed = TRUE;
-	} else {
-		changed = FALSE;
-	}
-
-	if (changed) {
-		eel_gconf_set_string (CONF_DAAP_SHARE_PASSWORD, pw);
-	}
-
-	g_free (old_pw);
-
-	return FALSE;
-}
-
-static void
-add_daap_preferences (RBShellPreferences *shell_preferences)
-{
-	GladeXML *xml;
-	GtkWidget *check;
-	GtkWidget *name_entry;
-	GtkWidget *password_entry;
-	GtkWidget *password_check;
-	GtkWidget *box;
-	gboolean sharing_enabled;
-	gboolean require_password;
-
-	char *name;
-	char *password;
-
-	xml = rb_glade_xml_new ("daap-prefs.glade",
-				"daap_vbox",
-				shell_preferences);
-
-	check = glade_xml_get_widget (xml, "daap_enable_check");
-	password_check = glade_xml_get_widget (xml, "daap_password_check");
-	name_entry = glade_xml_get_widget (xml, "daap_name_entry");
-	password_entry = glade_xml_get_widget (xml, "daap_password_entry");
-	box = glade_xml_get_widget (xml, "daap_box");
-
-	sharing_enabled = eel_gconf_get_boolean (CONF_DAAP_ENABLE_SHARING);
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), sharing_enabled);
-	g_signal_connect (check, "toggled", G_CALLBACK (share_check_button_toggled_cb), box);
-
-	require_password = eel_gconf_get_boolean (CONF_DAAP_REQUIRE_PASSWORD);
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (password_check), require_password);
-	g_signal_connect (password_check, "toggled", G_CALLBACK (password_check_button_toggled_cb), password_entry);
-
-	name = eel_gconf_get_string (CONF_DAAP_SHARE_NAME);
-	if (name != NULL) {
-		gtk_entry_set_text (GTK_ENTRY (name_entry), name);
-	}
-	g_free (name);
-	g_signal_connect (name_entry, "focus-out-event",
-			  G_CALLBACK (share_name_entry_focus_out_event_cb), NULL);
-
-	password = eel_gconf_get_string (CONF_DAAP_SHARE_PASSWORD);
-	if (password != NULL) {
-		gtk_entry_set_text (GTK_ENTRY (password_entry), password);
-	}
-	g_free (password);
-	g_signal_connect (password_entry, "focus-out-event",
-			  G_CALLBACK (share_password_entry_focus_out_event_cb), NULL);
-
-	gtk_widget_set_sensitive (box, sharing_enabled);
-	gtk_widget_set_sensitive (password_entry, require_password);
-
-	gtk_notebook_append_page (GTK_NOTEBOOK (shell_preferences->priv->notebook),
-				  glade_xml_get_widget (xml, "daap_vbox"),
-				  gtk_label_new (_("Sharing")));
-}
-#endif /* WITH_DAAP_SUPPORT */
-
 GtkWidget *
 rb_shell_preferences_new (GList *views)
 {
@@ -442,10 +290,6 @@ rb_shell_preferences_new (GList *views)
 		g_free (name);
 	}
 
-#ifdef WITH_DAAP_SUPPORT
-	add_daap_preferences (shell_preferences);
-#endif /* WITH_DAAP_SUPPORT */
-
 	return GTK_WIDGET (shell_preferences);
 }
 
diff -rN -u -p old-daap/sources/rb-daap-source.c new-daap/sources/rb-daap-source.c
--- old-daap/sources/rb-daap-source.c	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/sources/rb-daap-source.c	2006-11-02 21:24:57.000000000 +1000
@@ -588,12 +588,13 @@ destroy_pixbufs (void)
 }
 
 RBSource *
-rb_daap_sources_init (RBShell *shell)
+rb_daap_sources_init (RBPlugin *plugin, RBShell *shell)
 {
 	gboolean enabled = TRUE;
 	GConfValue *value;
 	GConfClient *client = eel_gconf_client_get_global ();
 	GtkUIManager *uimanager = NULL;
+	char *uifile;
 
 	value = gconf_client_get_without_default (client,
 						  CONF_ENABLE_BROWSING, NULL);
@@ -626,9 +627,15 @@ rb_daap_sources_init (RBShell *shell)
 				      rb_daap_source_actions, G_N_ELEMENTS (rb_daap_source_actions),
 				      shell);
 	gtk_ui_manager_insert_action_group (uimanager, daap_action_group, 0);
-	daap_ui_merge_id = gtk_ui_manager_add_ui_from_file (uimanager,
-							    rb_file ("daap-ui.xml"),
-							    NULL);
+
+	uifile = rb_plugin_find_file (plugin, "daap-ui.xml");
+	if (uifile != NULL) {
+		daap_ui_merge_id = gtk_ui_manager_add_ui_from_file (uimanager,
+								    uifile,
+								    NULL);
+		g_free (uifile);
+	}
+
 	g_object_unref (uimanager);
 
 	return NULL;
diff -rN -u -p old-daap/sources/rb-daap-source.h new-daap/sources/rb-daap-source.h
--- old-daap/sources/rb-daap-source.h	2006-11-02 21:24:57.000000000 +1000
+++ new-daap/sources/rb-daap-source.h	2006-11-02 21:24:57.000000000 +1000
@@ -25,6 +25,7 @@
 #include "rb-shell.h"
 #include "rb-browser-source.h"
 #include "rhythmdb.h"
+#include "rb-plugin.h"
 
 G_BEGIN_DECLS
 
@@ -48,7 +49,7 @@ typedef struct {
 } RBDAAPSourceClass;
 
 RBSource *
-rb_daap_sources_init (RBShell *shell);
+rb_daap_sources_init (RBPlugin *plugin, RBShell *shell);
 
 void
 rb_daap_sources_shutdown (RBShell *shell);

