diff -u -u -r1.232 configure.ac
--- configure.ac	17 Apr 2006 14:35:24 -0000	1.232
+++ configure.ac	20 Apr 2006 02:55:12 -0000
@@ -113,6 +113,44 @@
 fi			  
 AM_CONDITIONAL(USE_IPOD, test x"$use_ipod" = xyes)
 
+dnl iFP support
+
+AC_ARG_WITH(ifp,
+            AC_HELP_STRING([--with-ifp],
+			   [Enable iFP device support]),,
+	      with_ifp=auto)
+if test "x$with_ifp" != "xno"; then
+
+	have_libifp=no
+	AC_MSG_CHECKING(for iFP support library)
+	AC_COMPILE_IFELSE([
+			#include <ifp.h>
+		int main(int argc,char **argv) {
+		  return 0;
+		}
+	], have_libifp=yes)
+	AC_MSG_RESULT($have_libifp)
+	if test "x$have_libifp" = "xno" -a "x$with_ifp" = "xyes"; then
+	  AC_MSG_ERROR([iFP device support explicitly requested but libifp couldn't be found])
+	fi
+	if test "x$have_libifp" = "xyes"; then
+          if test "x$with_hal" = xyes && test "x$enable_hal05" = xno; then
+	     AC_MSG_ERROR([iFP device supprt explicitly requested but HAL not found or too old])	   
+	  fi
+          if test "x$enable_hal05" = xyes; then
+	     AC_DEFINE(WITH_IFP_SUPPORT, 1, [Define if iFP support is enabled])
+	     use_ifp=yes
+	  fi
+
+	  IFP_CFLAGS=""
+	  IFP_LIBS="-lifp"
+	  AC_SUBST(IFP_CFLAGS)
+	  AC_SUBST(IFP_LIBS)
+	fi
+fi			  
+AM_CONDITIONAL(USE_IFP, test x"$use_ifp" = xyes)
+
+
 dnl Database
 AC_ARG_WITH(database,
               AC_HELP_STRING([--with-database=tree|libgda],
@@ -912,6 +950,7 @@
 plugins/Makefile
 plugins/sample/Makefile
 plugins/audioscrobbler/Makefile
+plugins/ifp-support/Makefile
 plugins/ipod/Makefile
 plugins/lirc/Makefile
 plugins/sample-python/Makefile
@@ -973,6 +1012,11 @@
 	AC_MSG_NOTICE([** iPod integration enabled])
 else
 	AC_MSG_NOTICE([   iPod integration disabled])
+fi
+if test x"$use_ifp" = xyes; then
+	AC_MSG_NOTICE([** iFP device support enabled])
+else
+	AC_MSG_NOTICE([   iFP device support disabled])
 fi
 if test x"$enable_daap" = xyes; then
 	AC_MSG_NOTICE([** DAAP (music sharing) support is enabled])
diff -u -u -r1.4 Makefile.am
--- plugins/Makefile.am	17 Apr 2006 14:35:24 -0000	1.4
+++ plugins/Makefile.am	20 Apr 2006 02:55:12 -0000
@@ -18,6 +18,10 @@
 SUBDIRS += ipod
 endif
 
+if USE_IFP
+SUBDIRS += ifp-support
+endif
+
 noinst_LTLIBRARIES = librbplugins.la
 
 librbplugins_la_SOURCES =				\
--- /dev/null	2006-04-04 03:40:38.000000000 +1000
+++ plugins/ifp-support/rb-ifp-source.c	2006-04-20 12:52:03.000000000 +1000
@@ -0,0 +1,270 @@
+/*
+ *  arch-tag: Implementation of ifp source object
+ *
+ *  Copyright (C) 2004 Christophe Fergeau  <teuf@gnome.org>
+ *
+ *  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 of the License, 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.
+ *
+ */
+
+#include <config.h>
+
+
+#include <gtk/gtktreeview.h>
+#include <string.h>
+#include "rhythmdb.h"
+#include <libgnome/gnome-i18n.h>
+#include <libhal.h>
+#include <dbus/dbus.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
+#include <libgnomevfs/gnome-vfs-volume.h>
+#include <libgnomevfs/gnome-vfs-volume-monitor.h>
+#include <ifp.h>
+#include "eel-gconf-extensions.h"
+#include "rb-ifp-source.h"
+#include "rb-debug.h"
+#include "rb-file-helpers.h"
+#include "rb-plugin.h"
+#include "rb-removable-media-manager.h"
+#include "rb-static-playlist-source.h"
+#include "rb-util.h"
+#include "rhythmdb.h"
+
+static GObject *rb_ifp_source_constructor (GType type, 
+					    guint n_construct_properties,
+					    GObjectConstructParam *construct_properties);
+static void rb_ifp_source_dispose (GObject *object);
+
+static GObject *rb_ifp_source_constructor (GType type, guint n_construct_properties,
+			       GObjectConstructParam *construct_properties);
+static void rb_ifp_source_dispose (GObject *object);
+
+static void rb_ifp_load_songs (RBIfpSource *source);
+static gchar *rb_ifp_get_mount_path (GnomeVFSVolume *volume);
+static GList* impl_get_ui_actions (RBSource *source);
+static gboolean hal_udi_is_ifp (const char *udi);
+
+
+typedef struct
+{
+	char *mount_path;
+} RBIfpSourcePrivate;
+
+
+RB_PLUGIN_DEFINE_TYPE(RBIfpSource, 
+		      rb_ifp_source, 
+		      RB_TYPE_REMOVABLE_MEDIA_SOURCE)
+
+#define IFP_SOURCE_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_IFP_SOURCE, RBIfpSourcePrivate))
+
+
+static void
+rb_ifp_source_class_init (RBIfpSourceClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	RBSourceClass *source_class = RB_SOURCE_CLASS (klass);
+
+	object_class->constructor = rb_ifp_source_constructor;
+	object_class->dispose = rb_ifp_source_dispose;
+
+	source_class->impl_get_ui_actions = impl_get_ui_actions;
+
+	g_type_class_add_private (klass, sizeof (RBIfpSourcePrivate));
+}
+
+static void
+rb_ifp_source_init (RBIfpSource *source)
+{
+	
+}
+
+static GObject *
+rb_ifp_source_constructor (GType type, guint n_construct_properties,
+			    GObjectConstructParam *construct_properties)
+{
+	RBIfpSource *source;
+
+	source = RB_IFP_SOURCE (G_OBJECT_CLASS (rb_ifp_source_parent_class)->
+			constructor (type, n_construct_properties, construct_properties));
+
+	rb_ifp_load_songs (source);
+
+	return G_OBJECT (source);
+}
+
+static void 
+rb_ifp_source_dispose (GObject *object)
+{
+	RBIfpSourcePrivate *priv = IFP_SOURCE_GET_PRIVATE (object);
+
+	g_free (priv->mount_path);
+	priv->mount_path = NULL;
+
+	G_OBJECT_CLASS (rb_ifp_source_parent_class)->dispose (object);
+}
+
+RBRemovableMediaSource *
+rb_ifp_source_new (RBShell *shell, GnomeVFSVolume *volume)
+{
+	RBIfpSource *source;
+	RhythmDBEntryType entry_type;
+
+	g_assert (rb_ifp_is_volume_ifp (volume));
+
+	entry_type =  rhythmdb_entry_register_type ();
+
+	source = RB_IFP_SOURCE (g_object_new (RB_TYPE_IFP_SOURCE,
+					  "entry-type", entry_type,
+					  "volume", volume,
+					  "shell", shell,
+					  NULL));
+
+	rb_shell_register_entry_type_for_source (shell, RB_SOURCE (source), entry_type);
+
+	return RB_REMOVABLE_MEDIA_SOURCE (source);
+}
+
+static gboolean
+load_ifp_db_idle_cb (RBIfpSource *source)
+{
+	RBShell *shell;
+	RhythmDB *db;
+  
+  	g_object_get (G_OBJECT (source), "shell", &shell, NULL);
+  	g_object_get (G_OBJECT (shell), "db", &db, NULL);
+  	g_object_unref (G_OBJECT (shell));
+  
+	/* load tracks and playlists */
+
+	g_object_unref (G_OBJECT (db));
+	return FALSE;
+}
+
+static void
+rb_ifp_load_songs (RBIfpSource *source)
+{
+	RBIfpSourcePrivate *priv = IFP_SOURCE_GET_PRIVATE (source);
+	GnomeVFSVolume *volume;
+
+	g_object_get (G_OBJECT (source), "volume", &volume, NULL);
+	priv->mount_path = rb_ifp_get_mount_path (volume);
+
+	g_idle_add ((GSourceFunc)load_ifp_db_idle_cb, source);
+}
+
+static gchar *
+rb_ifp_get_mount_path (GnomeVFSVolume *volume)
+{
+	gchar *path;
+	gchar *uri;
+
+	uri = gnome_vfs_volume_get_activation_uri (volume);
+	path = g_filename_from_uri (uri, NULL, NULL);
+	g_assert (path != NULL);
+	g_free (uri);
+
+	return path;
+}
+
+gboolean
+rb_ifp_is_volume_ifp (GnomeVFSVolume *volume)
+{
+	gchar *udi;
+	
+	if (gnome_vfs_volume_get_volume_type (volume) != GNOME_VFS_VOLUME_TYPE_MOUNTPOINT) {
+		return FALSE;
+	}
+
+	udi = gnome_vfs_volume_get_hal_udi (volume);
+	if (udi != NULL) {
+		gboolean result;
+
+		result = hal_udi_is_ifp (udi);
+		g_free (udi);
+
+		return result;
+	}
+	
+	return FALSE;
+}
+
+static gboolean
+hal_udi_is_ifp (const char *udi)
+{
+	LibHalContext *ctx;
+	DBusConnection *conn;
+	char *parent_udi, *parent_name;
+	gboolean result;
+	DBusError error;
+
+	result = FALSE;
+	dbus_error_init (&error);
+	
+	conn = NULL;
+	ctx = libhal_ctx_new ();
+	if (ctx == NULL) {
+		rb_debug ("cannot connect to HAL");
+		goto end;
+	}
+	conn = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
+	if (conn == NULL || dbus_error_is_set (&error))
+		goto end;
+
+	libhal_ctx_set_dbus_connection (ctx, conn);
+	if (!libhal_ctx_init (ctx, &error) || dbus_error_is_set (&error))
+		goto end;
+
+	parent_udi = libhal_device_get_property_string (ctx, udi,
+			"info.parent", &error);
+	if (parent_udi == NULL || dbus_error_is_set (&error))
+		goto end;
+		
+	parent_name = libhal_device_get_property_string (ctx, parent_udi,
+			"storage.model", &error);
+	g_free (parent_udi);
+	if (parent_name == NULL || dbus_error_is_set (&error))
+		goto end;
+
+	if (strcmp (parent_name, "MK2004GAL") == 0)
+		result = TRUE;
+
+	g_free (parent_name);
+end:
+	if (dbus_error_is_set (&error)) {
+		rb_debug ("Error: %s\n", error.message);
+		dbus_error_free (&error);
+		dbus_error_init (&error);
+	}
+
+	if (ctx) {
+		libhal_ctx_shutdown (ctx, &error);
+		libhal_ctx_free(ctx);
+	}
+
+	dbus_error_free (&error);
+
+	return result;
+}
+
+static GList*
+impl_get_ui_actions (RBSource *source)
+{
+	GList *actions = NULL;
+ 
+	actions = g_list_prepend (actions, g_strdup ("RemovableSourceEject"));
+ 
+	return actions;
+}
+
--- /dev/null	2006-04-04 03:40:38.000000000 +1000
+++ plugins/ifp-support/rb-ifp-source.h	2006-04-20 12:48:52.000000000 +1000
@@ -0,0 +1,56 @@
+/*
+ *  arch-tag: Header for Ifp source object
+ *
+ *  Copyright (C) 2004 Christophe Fergeau  <teuf@gnome.org>
+ *
+ *  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 of the License, 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.
+ *
+ */
+
+#ifndef __RB_IFP_SOURCE_H
+#define __RB_IFP_SOURCE_H
+
+#include "rb-shell.h"
+#include "rb-removable-media-source.h"
+#include "rhythmdb.h"
+
+G_BEGIN_DECLS
+
+#define RB_TYPE_IFP_SOURCE         (rb_ifp_source_get_type ())
+#define RB_IFP_SOURCE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_IFP_SOURCE, RBIfpSource))
+#define RB_IFP_SOURCE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_IFP_SOURCE, RBIfpSourceClass))
+#define RB_IS_IFP_SOURCE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_IFP_SOURCE))
+#define RB_IS_IFP_SOURCE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_IFP_SOURCE))
+#define RB_IFP_SOURCE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_IFP_SOURCE, RBIfpSourceClass))
+
+typedef struct
+{
+	RBRemovableMediaSource parent;
+} RBIfpSource;
+
+typedef struct
+{
+	RBRemovableMediaSourceClass parent;
+} RBIfpSourceClass;
+
+RBRemovableMediaSource *	rb_ifp_source_new		(RBShell *shell, GnomeVFSVolume *volume);
+GType			rb_ifp_source_get_type		(void);
+GType                   rb_ifp_source_register_type    (GTypeModule *module);
+
+gboolean		rb_ifp_is_volume_ifp		(GnomeVFSVolume *volume);
+
+G_END_DECLS
+
+#endif /* __RB_IFP_SOURCE_H */
--- /dev/null	2006-04-04 03:40:38.000000000 +1000
+++ plugins/ifp-support/rb-ifp-plugin.c	2006-04-20 12:19:21.000000000 +1000
@@ -0,0 +1,206 @@
+/*
+ * rb-ifp-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 <glib/gi18n-lib.h>
+#include <gmodule.h>
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <libgnomevfs/gnome-vfs.h>
+
+#include "rb-removable-media-manager.h"
+#include "rb-source.h"
+#include "rb-ifp-source.h"
+#include "rb-plugin.h"
+#include "rb-debug.h"
+#include "rb-file-helpers.h"
+#include "rb-util.h"
+#include "rb-shell.h"
+
+
+#define RB_TYPE_IFP_PLUGIN		(rb_ifp_plugin_get_type ())
+#define RB_IFP_PLUGIN(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_IFP_PLUGIN, RBIfpPlugin))
+#define RB_IFP_PLUGIN_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_IFP_PLUGIN, RBIfpPluginClass))
+#define RB_IS_IFP_PLUGIN(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_IFP_PLUGIN))
+#define RB_IS_IFP_PLUGIN_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_IFP_PLUGIN))
+#define RB_IFP_PLUGIN_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_IFP_PLUGIN, RBIfpPluginClass))
+
+typedef struct
+{
+	RBPlugin parent;
+
+	RBShell *shell;
+	GtkActionGroup *action_group;
+	guint ui_merge_id;
+
+	GList *ifp_sources;
+} RBIfpPlugin;
+
+typedef struct
+{
+	RBPluginClass parent_class;
+} RBIfpPluginClass;
+
+
+G_MODULE_EXPORT GType register_rb_plugin (GTypeModule *module);
+GType	rb_ifp_plugin_get_type		(void) G_GNUC_CONST;
+
+static void rb_ifp_plugin_init (RBIfpPlugin *plugin);
+static void rb_ifp_plugin_finalize (GObject *object);
+static void impl_activate (RBPlugin *plugin, RBShell *shell);
+static void impl_deactivate (RBPlugin *plugin, RBShell *shell);
+
+static RBSource * create_source_cb (RBRemovableMediaManager *rmm,
+				    GnomeVFSVolume *volume,
+				    RBIfpPlugin *plugin);
+
+RB_PLUGIN_REGISTER(RBIfpPlugin, rb_ifp_plugin)
+
+
+static GtkActionEntry rb_ifp_plugin_actions [] =
+{
+	/*{ "IfpSourceRename", NULL, N_("_Rename"), NULL,
+	  N_("Rename player"),
+	  G_CALLBACK (rb_ifp_plugin_cmd_rename) }*/
+};
+
+
+static void
+rb_ifp_plugin_class_init (RBIfpPluginClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	RBPluginClass *plugin_class = RB_PLUGIN_CLASS (klass);
+
+	object_class->finalize = rb_ifp_plugin_finalize;
+	
+	plugin_class->activate = impl_activate;
+	plugin_class->deactivate = impl_deactivate;
+
+	/* register types used by the plugin */
+	RB_PLUGIN_REGISTER_TYPE(rb_ifp_source);
+}
+
+static void
+rb_ifp_plugin_init (RBIfpPlugin *plugin)
+{
+	rb_debug ("RBIfpPlugin initialising");
+}
+
+static void
+rb_ifp_plugin_finalize (GObject *object)
+{
+	/*RBIfpPlugin *plugin = RB_IFP_PLUGIN (object);*/
+
+	rb_debug ("RBIfpPlugin finalising");
+
+	G_OBJECT_CLASS (rb_ifp_plugin_parent_class)->finalize (object);
+}
+
+static void
+impl_activate (RBPlugin *bplugin,
+	       RBShell *shell)
+{
+	RBIfpPlugin *plugin = RB_IFP_PLUGIN (bplugin);
+	RBRemovableMediaManager *rmm = NULL;
+	GtkUIManager *uimanager = NULL;
+
+	plugin->shell = shell;
+
+	g_object_get (G_OBJECT (shell),
+		      "removable-media-manager", &rmm,
+		      "ui-manager", &uimanager, 
+		      NULL);
+
+	/* add ifp UI */
+	plugin->action_group = gtk_action_group_new ("IfpActions");
+	gtk_action_group_set_translation_domain (plugin->action_group,
+						 GETTEXT_PACKAGE);
+	gtk_action_group_add_actions (plugin->action_group,
+				      rb_ifp_plugin_actions, G_N_ELEMENTS (rb_ifp_plugin_actions),
+				      plugin);
+	gtk_ui_manager_insert_action_group (uimanager, plugin->action_group, 0);
+	/*plugin->ui_merge_id = gtk_ui_manager_add_ui_from_file (uimanager,
+							       rb_file ("ifp-ui.xml"),
+							       NULL);*/
+
+	/* watch for new removable media, and cause a rescan */
+	g_signal_connect (G_OBJECT (rmm),
+			  "create-source", G_CALLBACK (create_source_cb),
+			  plugin);
+	rb_removable_media_manager_scan (rmm);
+
+	g_object_unref (G_OBJECT (rmm));
+	g_object_unref (G_OBJECT (uimanager));
+}
+
+static void
+impl_deactivate	(RBPlugin *bplugin,
+		 RBShell *shell)
+{
+	RBIfpPlugin *plugin = RB_IFP_PLUGIN (bplugin);
+	RBRemovableMediaManager *rmm = NULL;
+	GtkUIManager *uimanager = NULL;
+
+	g_object_get (G_OBJECT (shell),
+		      "removable-media-manager", &rmm,
+		      "ui-manager", &uimanager, 
+		      NULL);
+
+	gtk_ui_manager_remove_ui (uimanager, plugin->ui_merge_id);
+	gtk_ui_manager_remove_action_group (uimanager, plugin->action_group);
+	
+	g_signal_handlers_disconnect_by_func (G_OBJECT (rmm), create_source_cb, plugin);
+
+	g_list_foreach (plugin->ifp_sources, (GFunc)rb_source_delete_thyself, NULL);
+	g_list_free (plugin->ifp_sources);
+	plugin->ifp_sources = NULL;
+
+	g_object_unref (G_OBJECT (uimanager));
+	g_object_unref (G_OBJECT (rmm));
+}
+
+static void
+rb_ifp_plugin_source_deleted (RBIfpSource *source, RBIfpPlugin *plugin)
+{
+	plugin->ifp_sources = g_list_remove (plugin->ifp_sources, source);
+}
+
+static RBSource *
+create_source_cb (RBRemovableMediaManager *rmm, GnomeVFSVolume *volume, RBIfpPlugin *plugin)
+{
+	if (rb_ifp_is_volume_ifp (volume)) {
+		RBSource *src;
+		src = RB_SOURCE (rb_ifp_source_new (plugin->shell, volume));
+
+		plugin->ifp_sources = g_list_prepend (plugin->ifp_sources, src);
+		g_signal_connect_object (G_OBJECT (src),
+					 "deleted", G_CALLBACK (rb_ifp_plugin_source_deleted),
+					 plugin, 0);
+		
+		return src;
+	}
+
+	return NULL;
+}
+
--- /dev/null	2006-04-04 03:40:38.000000000 +1000
+++ plugins/ifp-support/ifp-support.rb-plugin.desktop.in	2006-04-20 11:39:07.000000000 +1000
@@ -0,0 +1,8 @@
+[RB Plugin]
+Module=ifp-support
+IAge=1
+_Name=iFP device support
+_Description=Adds support for iFP audio players to Rhythmbox
+Authors=James Livingston
+Copyright=(C) 2006 James Livingston
+Website=http://www.rhythmbox.org
--- /dev/null	2006-04-04 03:40:38.000000000 +1000
+++ plugins/ifp-support/Makefile.am	2006-04-20 12:59:12.000000000 +1000
@@ -0,0 +1,47 @@
+plugindir = $(PLUGINDIR)
+plugin_LTLIBRARIES = libifp-support.la
+
+libifp_support_la_SOURCES = \
+	rb-ifp-plugin.c			\
+	rb-ifp-source.c			\
+	rb-ifp-source.h
+	
+libifp_support_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+libifp_support_la_LIBADD = 					\
+	$(top_builddir)/lib/librb.la			\
+	$(HAL_LIBS)					\
+	$(IFP_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				\
+	-DPIXMAP_DIR=\""$(datadir)/pixmaps"\"		\
+	-DSHARE_DIR=\"$(pkgdatadir)\"                   \
+	-DDATADIR=\""$(datadir)"\"			\
+	$(RHYTHMBOX_CFLAGS)				\
+	$(WARN_CFLAGS)					\
+	$(HAL_CFLAGS)					\
+	$(IFP_CFLAGS)					\
+	-D_XOPEN_SOURCE -D_BSD_SOURCE
+
+plugin_in_files = ifp-support.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
+
+plugin_DATA = $(plugin_in_files:.rb-plugin.desktop.in=.rb-plugin)
+
+CLEANFILES = $(plugin_DATA)
+DISTCLEANFILES = $(plugin_DATA)
