diff -rN -u -p old-rdb/podcast/rb-podcast-manager.c new-rdb/podcast/rb-podcast-manager.c
--- old-rdb/podcast/rb-podcast-manager.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/podcast/rb-podcast-manager.c	2006-02-13 22:05:57.000000000 +1000
@@ -491,7 +491,8 @@ rb_podcast_manager_update_feeds (RBPodca
 {
 	GtkTreeModel* query_model = GTK_TREE_MODEL (rhythmdb_query_model_new_empty(pd->priv->db));	
 
-	rhythmdb_do_full_query (pd->priv->db, query_model,
+	rhythmdb_do_full_query (pd->priv->db, 
+				RHYTHMDB_QUERY_RESULTS (query_model),
                                 RHYTHMDB_QUERY_PROP_EQUALS,
                                 RHYTHMDB_PROP_TYPE, RHYTHMDB_ENTRY_TYPE_PODCAST_FEED,
                                 RHYTHMDB_QUERY_END);
@@ -1307,7 +1308,8 @@ rb_podcast_manager_db_entry_deleted_cb (
 		GtkTreeModel* query_model = GTK_TREE_MODEL (rhythmdb_query_model_new_empty(pd->priv->db));	
 		GtkTreeIter iter;
 
-		rhythmdb_do_full_query (pd->priv->db, query_model,
+		rhythmdb_do_full_query (pd->priv->db, 
+					RHYTHMDB_QUERY_RESULTS (query_model),
                 	                RHYTHMDB_QUERY_PROP_EQUALS,
                         	        RHYTHMDB_PROP_TYPE, RHYTHMDB_ENTRY_TYPE_PODCAST_POST,
                 	                RHYTHMDB_QUERY_PROP_LIKE,
diff -rN -u -p old-rdb/rhythmdb/Makefile.am new-rdb/rhythmdb/Makefile.am
--- old-rdb/rhythmdb/Makefile.am	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/rhythmdb/Makefile.am	2006-02-13 22:05:57.000000000 +1000
@@ -27,7 +27,9 @@ librhythmdb_la_SOURCES =				\
 	rhythmdb-property-model.h			\
 	rhythmdb-property-model.c			\
 	rhythmdb-query-model.h				\
-	rhythmdb-query-model.c
+	rhythmdb-query-model.c				\
+	rhythmdb-query-results.h			\
+	rhythmdb-query-results.c
 
 
 if USE_TREEDB
diff -rN -u -p old-rdb/rhythmdb/rhythmdb.c new-rdb/rhythmdb/rhythmdb.c
--- old-rdb/rhythmdb/rhythmdb.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/rhythmdb/rhythmdb.c	2006-02-13 22:05:57.000000000 +1000
@@ -28,7 +28,6 @@
 #undef G_IMPLEMENT_INLINES
 
 #include "rhythmdb-private.h"
-#include "rhythmdb-query-model.h"
 #include "rhythmdb-property-model.h"
 #include "rb-metadata.h"
 #include <string.h>
@@ -126,7 +125,7 @@ typedef struct
 	RhythmDB *db;
 	GPtrArray *query;
 	guint propid;
-	GtkTreeModel *main_model;
+	RhythmDBQueryResults *results;
 	gboolean cancel;
 } RhythmDBQueryThreadData;
 
@@ -174,7 +173,7 @@ typedef struct
 	/* LOAD */
 	RBMetaData *metadata;
 	/* QUERY_COMPLETE */
-	RhythmDBQueryModel *model;
+	RhythmDBQueryResults *results;
 	/* ENTRY_SET */
 	RhythmDBEntry *entry;
 	/* ENTRY_SET */
@@ -584,7 +583,7 @@ rhythmdb_event_free (RhythmDB *db, Rhyth
 	case RHYTHMDB_EVENT_DB_SAVED:
 		break;
 	case RHYTHMDB_EVENT_QUERY_COMPLETE:
-		g_object_unref (result->model);
+		g_object_unref (result->results);
 		break;
 	case RHYTHMDB_EVENT_FILE_CREATED_OR_MODIFIED:
 		break;
@@ -3315,16 +3314,16 @@ rhythmdb_query_internal (RhythmDBQueryTh
 	rb_debug ("doing query");
 
 	klass->impl_do_full_query (data->db, data->query,
-				   data->main_model,
+				   data->results,
 				   &data->cancel);
 
 	rb_debug ("completed");
-	rhythmdb_query_model_signal_complete (RHYTHMDB_QUERY_MODEL (data->main_model));
+	rhythmdb_query_results_query_complete (data->results);
 
 	result = g_new0 (RhythmDBEvent, 1);
 	result->db = data->db;
 	result->type = RHYTHMDB_EVENT_QUERY_COMPLETE;
-	result->model = RHYTHMDB_QUERY_MODEL (data->main_model);
+	result->results = data->results;
 	g_async_queue_push (data->db->priv->event_queue, result);
 
 	rhythmdb_query_free (data->query);
@@ -3348,7 +3347,8 @@ query_thread_main (RhythmDBQueryThreadDa
 }
 
 void
-rhythmdb_do_full_query_async_parsed (RhythmDB *db, GtkTreeModel *main_model,
+rhythmdb_do_full_query_async_parsed (RhythmDB *db, 
+				     RhythmDBQueryResults *results,
 				     GPtrArray *query)
 {
 	RhythmDBQueryThreadData *data;
@@ -3356,29 +3356,30 @@ rhythmdb_do_full_query_async_parsed (Rhy
 	data = g_new0 (RhythmDBQueryThreadData, 1);
 	data->db = db;
 	data->query = rhythmdb_query_copy (query);
-	data->main_model = main_model;
+	data->results = results;
 	data->cancel = FALSE;
 
 	rhythmdb_read_enter (db);
 
-	g_object_set (G_OBJECT (RHYTHMDB_QUERY_MODEL (main_model)),
-		      "query", query, NULL);
+	rhythmdb_query_results_set_query (results, query);
 
-	g_object_ref (G_OBJECT (main_model));
+	g_object_ref (G_OBJECT (results));
 	rhythmdb_thread_create (db, (GThreadFunc) query_thread_main, data);
 }
 
 void
-rhythmdb_do_full_query_async (RhythmDB *db, GtkTreeModel *main_model, ...)
+rhythmdb_do_full_query_async (RhythmDB *db,
+			      RhythmDBQueryResults *results,
+			      ...)
 {
 	GPtrArray *query;
 	va_list args;
 
-	va_start (args, main_model);
+	va_start (args, results);
 
 	query = rhythmdb_query_parse_valist (db, args);
 
-	rhythmdb_do_full_query_async_parsed (db, main_model, query);
+	rhythmdb_do_full_query_async_parsed (db, results, query);
 
 	rhythmdb_query_free (query);
 
@@ -3386,7 +3387,8 @@ rhythmdb_do_full_query_async (RhythmDB *
 }
 
 static void
-rhythmdb_do_full_query_internal (RhythmDB *db, GtkTreeModel *main_model,
+rhythmdb_do_full_query_internal (RhythmDB *db,
+				 RhythmDBQueryResults *results,
 				 GPtrArray *query)
 {
 	RhythmDBQueryThreadData *data;
@@ -3394,37 +3396,39 @@ rhythmdb_do_full_query_internal (RhythmD
 	data = g_new0 (RhythmDBQueryThreadData, 1);
 	data->db = db;
 	data->query = rhythmdb_query_copy (query);
-	data->main_model = main_model;
+	data->results = results;
 	data->cancel = FALSE;
 
-	g_object_set (G_OBJECT (RHYTHMDB_QUERY_MODEL (main_model)),
-		      "query", query, NULL);
-
 	rhythmdb_read_enter (db);
 
-	g_object_ref (G_OBJECT (main_model));
+	rhythmdb_query_results_set_query (results, query);
+	g_object_ref (G_OBJECT (results));
+
 	rhythmdb_query_internal (data);
 	g_free (data);
 }
 
 void
-rhythmdb_do_full_query_parsed (RhythmDB *db, GtkTreeModel *main_model,
+rhythmdb_do_full_query_parsed (RhythmDB *db,
+			       RhythmDBQueryResults *results,
 			       GPtrArray *query)
 {
-	rhythmdb_do_full_query_internal (db, main_model, query);
+	rhythmdb_do_full_query_internal (db, results, query);
 }
 
 void
-rhythmdb_do_full_query (RhythmDB *db, GtkTreeModel *main_model, ...)
+rhythmdb_do_full_query (RhythmDB *db, 
+			RhythmDBQueryResults *results,
+			...)
 {
 	GPtrArray *query;
 	va_list args;
 
-	va_start (args, main_model);
+	va_start (args, results);
 
 	query = rhythmdb_query_parse_valist (db, args);
 
-	rhythmdb_do_full_query_internal (db, main_model, query);
+	rhythmdb_do_full_query_internal (db, results, query);
 
 	rhythmdb_query_free (query);
 	
diff -rN -u -p old-rdb/rhythmdb/rhythmdb.h new-rdb/rhythmdb/rhythmdb.h
--- old-rdb/rhythmdb/rhythmdb.h	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/rhythmdb/rhythmdb.h	2006-02-13 22:05:57.000000000 +1000
@@ -32,6 +32,7 @@
 
 #include "config.h"
 #include "rb-refstring.h"
+#include "rhythmdb-query-results.h"
 
 G_BEGIN_DECLS
 
@@ -220,7 +221,7 @@ typedef struct
 	void		(*impl_entry_foreach)	(RhythmDB *db, GFunc func, gpointer data);
 
 	void		(*impl_do_full_query)	(RhythmDB *db, GPtrArray *query,
-						 GtkTreeModel *main_model,
+						 RhythmDBQueryResults *results,
 						 gboolean *cancel);
 } RhythmDBClass;
 
@@ -285,19 +286,20 @@ rhythmdb_do_full_query (db,
  * Which means: artist = Pink Floyd OR (genre = Classical AND rating >= 5)
  */
 void		rhythmdb_do_full_query			(RhythmDB *db,
-							 GtkTreeModel *main_model,
+							 RhythmDBQueryResults *results,
 							 ...);
 void		rhythmdb_do_full_query_parsed		(RhythmDB *db,
-							 GtkTreeModel *main_model,
+							 RhythmDBQueryResults *results,
 							 GPtrArray *query);
 
-void		rhythmdb_do_full_query_async		(RhythmDB *db, GtkTreeModel *main_model, ...);
+void		rhythmdb_do_full_query_async		(RhythmDB *db,
+							 RhythmDBQueryResults *results,
+							 ...);
 
-void		rhythmdb_do_full_query_async_parsed	(RhythmDB *db, GtkTreeModel *main_model,
+void		rhythmdb_do_full_query_async_parsed	(RhythmDB *db,
+							 RhythmDBQueryResults *results,
 							 GPtrArray *query);
 
-void		rhythmdb_query_cancel			(RhythmDB *db, GtkTreeModel *query_model);
-
 void		rhythmdb_entry_sync_mirrored		(RhythmDB *db, RhythmDBEntry *entry, guint propid);
 
 GPtrArray *	rhythmdb_query_parse			(RhythmDB *db, ...);
diff -rN -u -p old-rdb/rhythmdb/rhythmdb-property-model.c new-rdb/rhythmdb/rhythmdb-property-model.c
--- old-rdb/rhythmdb/rhythmdb-property-model.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/rhythmdb/rhythmdb-property-model.c	2006-02-13 22:05:57.000000000 +1000
@@ -940,7 +940,8 @@ rhythmdb_property_model_drag_data_get (R
 		gtk_tree_path_free (path);
 		if (is_all) {
  			/*filter out radios*/
- 			rhythmdb_do_full_query (db, query_model,
+ 			rhythmdb_do_full_query (db, 
+						RHYTHMDB_QUERY_RESULTS (query_model),
  						RHYTHMDB_QUERY_PROP_EQUALS,
  						RHYTHMDB_PROP_TYPE, 
  						RHYTHMDB_ENTRY_TYPE_SONG,
@@ -973,7 +974,8 @@ rhythmdb_property_model_drag_data_get (R
  				g_free (name);
  			}
  			/*filter out radios*/
- 			rhythmdb_do_full_query (db, query_model,
+ 			rhythmdb_do_full_query (db,
+						RHYTHMDB_QUERY_RESULTS (query_model),
  						RHYTHMDB_QUERY_PROP_EQUALS,
  						RHYTHMDB_PROP_TYPE, 
  						RHYTHMDB_ENTRY_TYPE_SONG,
diff -rN -u -p old-rdb/rhythmdb/rhythmdb-query-model.c new-rdb/rhythmdb/rhythmdb-query-model.c
--- old-rdb/rhythmdb/rhythmdb-query-model.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/rhythmdb/rhythmdb-query-model.c	2006-02-13 22:05:57.000000000 +1000
@@ -36,11 +36,14 @@
 #include "rhythmdb-marshal.h"
 #include "rb-util.h"
 
+static void rhythmdb_query_model_query_results_init (RhythmDBQueryResultsIface *iface);
 static void rhythmdb_query_model_tree_model_init (GtkTreeModelIface *iface);
 static void rhythmdb_query_model_drag_source_init (RbTreeDragSourceIface *iface);
 static void rhythmdb_query_model_drag_dest_init (RbTreeDragDestIface *iface);
 
 G_DEFINE_TYPE_WITH_CODE(RhythmDBQueryModel, rhythmdb_query_model, G_TYPE_OBJECT,
+			G_IMPLEMENT_INTERFACE(RHYTHMDB_TYPE_QUERY_RESULTS,
+					      rhythmdb_query_model_query_results_init)
 			G_IMPLEMENT_INTERFACE(GTK_TYPE_TREE_MODEL,
 					      rhythmdb_query_model_tree_model_init)
 			G_IMPLEMENT_INTERFACE(RB_TYPE_TREE_DRAG_SOURCE,
@@ -94,6 +97,10 @@ static gboolean rhythmdb_query_model_row
 							GList *targets,
 							GtkTreeViewDropPosition *pos);
 
+static void rhythmdb_query_model_set_query (RhythmDBQueryResults *results, GPtrArray *query);
+static void rhythmdb_query_model_add_results (RhythmDBQueryResults *results, GPtrArray *entries);
+static void rhythmdb_query_model_query_complete (RhythmDBQueryResults *results);
+
 static GtkTreeModelFlags rhythmdb_query_model_get_flags (GtkTreeModel *model);
 static gint rhythmdb_query_model_get_n_columns (GtkTreeModel *tree_model);
 static GType rhythmdb_query_model_get_column_type (GtkTreeModel *tree_model, int index);
@@ -353,6 +360,14 @@ rhythmdb_query_model_class_init (RhythmD
 }
 
 static void
+rhythmdb_query_model_query_results_init (RhythmDBQueryResultsIface *iface)
+{
+	iface->set_query = rhythmdb_query_model_set_query;
+	iface->add_results = rhythmdb_query_model_add_results;
+	iface->query_complete = rhythmdb_query_model_query_complete;
+}
+
+static void
 rhythmdb_query_model_tree_model_init (GtkTreeModelIface *iface)
 {
 	iface->get_flags = rhythmdb_query_model_get_flags;
@@ -669,19 +684,6 @@ rhythmdb_query_model_new_empty (RhythmDB
 			     "db", db, NULL);
 }
 
-void
-rhythmdb_query_model_signal_complete (RhythmDBQueryModel *model)
-{
-	struct RhythmDBQueryModelUpdate *update;
-
-	update = g_new0 (struct RhythmDBQueryModelUpdate, 1);
-	update->type = RHYTHMDB_QUERY_MODEL_UPDATE_QUERY_COMPLETE;
-	update->model = model;
-	g_object_ref (G_OBJECT (model));
-
-	rhythmdb_query_model_process_update (update);
-}
-
 gboolean
 rhythmdb_query_model_has_pending_changes (RhythmDBQueryModel *model)
 {
@@ -843,29 +845,6 @@ idle_process_update (struct RhythmDBQuer
 	return FALSE;
 }
 
-/* Threading: Called from the database query thread for async queries,
- *  from the main thread for synchronous queries.
- */
-void
-rhythmdb_query_model_add_entries (RhythmDBQueryModel *model, GPtrArray *entries)
-{
-	struct RhythmDBQueryModelUpdate *update;
-	guint i;
-
-	rb_debug ("adding %d entries", entries->len);
-
-	update = g_new (struct RhythmDBQueryModelUpdate, 1);
-	update->type = RHYTHMDB_QUERY_MODEL_UPDATE_ROWS_INSERTED;
-	update->entries = entries;
-	update->model = model;
-	g_object_ref (G_OBJECT (model));
-
-	for (i = 0; i < update->entries->len; i++)
-		rhythmdb_entry_ref (model->priv->db, g_ptr_array_index (update->entries, i));
-
-	rhythmdb_query_model_process_update (update);
-}
-
 void
 rhythmdb_query_model_add_entry (RhythmDBQueryModel *model, RhythmDBEntry *entry, gint index)
 {
@@ -1571,6 +1550,51 @@ rhythmdb_query_model_row_drop_position (
 	return TRUE;
 }
 
+static void
+rhythmdb_query_model_set_query (RhythmDBQueryResults *results, GPtrArray *query)
+{
+	g_object_set (G_OBJECT (results), "query", query, NULL);
+}
+
+/* Threading: Called from the database query thread for async queries,
+ *  from the main thread for synchronous queries.
+ */
+static void
+rhythmdb_query_model_add_results (RhythmDBQueryResults *results, GPtrArray *entries)
+{
+	RhythmDBQueryModel *model = RHYTHMDB_QUERY_MODEL (results);
+	struct RhythmDBQueryModelUpdate *update;
+	guint i;
+
+	rb_debug ("adding %d entries", entries->len);
+
+	update = g_new (struct RhythmDBQueryModelUpdate, 1);
+	update->type = RHYTHMDB_QUERY_MODEL_UPDATE_ROWS_INSERTED;
+	update->entries = entries;
+	update->model = model;
+	g_object_ref (G_OBJECT (model));
+
+	for (i = 0; i < update->entries->len; i++)
+		rhythmdb_entry_ref (model->priv->db, g_ptr_array_index (update->entries, i));
+
+	rhythmdb_query_model_process_update (update);
+}
+
+static void
+rhythmdb_query_model_query_complete (RhythmDBQueryResults *results)
+{
+	RhythmDBQueryModel *model = RHYTHMDB_QUERY_MODEL (results);
+	struct RhythmDBQueryModelUpdate *update;
+
+	update = g_new0 (struct RhythmDBQueryModelUpdate, 1);
+	update->type = RHYTHMDB_QUERY_MODEL_UPDATE_QUERY_COMPLETE;
+	update->model = model;
+	g_object_ref (G_OBJECT (model));
+
+	rhythmdb_query_model_process_update (update);
+}
+
+
 static GtkTreeModelFlags
 rhythmdb_query_model_get_flags (GtkTreeModel *model)
 {
diff -rN -u -p old-rdb/rhythmdb/rhythmdb-query-model.h new-rdb/rhythmdb/rhythmdb-query-model.h
--- old-rdb/rhythmdb/rhythmdb-query-model.h	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/rhythmdb/rhythmdb-query-model.h	2006-02-13 22:05:57.000000000 +1000
@@ -71,14 +71,11 @@ RhythmDBQueryModel *	rhythmdb_query_mode
 RhythmDBQueryModel *	rhythmdb_query_model_new_empty	(RhythmDB *db);
 
 void			rhythmdb_query_model_add_entry	(RhythmDBQueryModel *model, RhythmDBEntry *entry, gint index);
-void			rhythmdb_query_model_add_entries(RhythmDBQueryModel *model, GPtrArray *entries);
 
 gboolean		rhythmdb_query_model_remove_entry	(RhythmDBQueryModel *model, RhythmDBEntry *entry);
 
 void			rhythmdb_query_model_move_entry (RhythmDBQueryModel *model, RhythmDBEntry *entry, gint index);
 
-void			rhythmdb_query_model_signal_complete	(RhythmDBQueryModel *model);
-
 GnomeVFSFileSize	rhythmdb_query_model_get_size	(RhythmDBQueryModel *model);
 
 long			rhythmdb_query_model_get_duration(RhythmDBQueryModel *model);
diff -rN -u -p old-rdb/rhythmdb/rhythmdb-query-results.c new-rdb/rhythmdb/rhythmdb-query-results.c
--- old-rdb/rhythmdb/rhythmdb-query-results.c	1970-01-01 10:00:00.000000000 +1000
+++ new-rdb/rhythmdb/rhythmdb-query-results.c	2006-02-13 22:05:57.000000000 +1000
@@ -0,0 +1,74 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ *  Copyright (C) 2006  Jonathan Matthew  <jonathan@kaolin.wh9.net>
+ *
+ *  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 "rhythmdb-query-results.h"
+
+GType
+rhythmdb_query_results_get_type (void)
+{
+	static GType our_type = 0;
+
+	if (!our_type) {
+		static const GTypeInfo our_info = {
+			sizeof (RhythmDBQueryResultsIface),
+			NULL,	/* base_init */
+			NULL,	/* base_finalize */
+			NULL,
+			NULL,	/* class_finalize */
+			NULL,	/* class_data */
+			0,
+			0,
+			NULL
+		};
+
+		our_type = g_type_register_static (G_TYPE_INTERFACE, "RhythmDBQueryResults", &our_info, 0);
+	}
+
+	return our_type;
+}
+
+void
+rhythmdb_query_results_set_query (RhythmDBQueryResults *results,
+				  GPtrArray *query)
+{
+	RhythmDBQueryResultsIface *iface = RHYTHMDB_QUERY_RESULTS_GET_IFACE (results);
+	if (iface->set_query)
+		iface->set_query (results, query);
+}
+
+void
+rhythmdb_query_results_add_results (RhythmDBQueryResults *results,
+				    GPtrArray *entries)
+{
+	RhythmDBQueryResultsIface *iface = RHYTHMDB_QUERY_RESULTS_GET_IFACE (results);
+	if (iface->add_results)
+		iface->add_results (results, entries);
+}
+
+void
+rhythmdb_query_results_query_complete (RhythmDBQueryResults *results)
+{
+	RhythmDBQueryResultsIface *iface = RHYTHMDB_QUERY_RESULTS_GET_IFACE (results);
+	if (iface->query_complete)
+		iface->query_complete (results);
+}
+
diff -rN -u -p old-rdb/rhythmdb/rhythmdb-query-results.h new-rdb/rhythmdb/rhythmdb-query-results.h
--- old-rdb/rhythmdb/rhythmdb-query-results.h	1970-01-01 10:00:00.000000000 +1000
+++ new-rdb/rhythmdb/rhythmdb-query-results.h	2006-02-13 22:05:57.000000000 +1000
@@ -0,0 +1,67 @@
+ /*
+ *  Copyright (C) 2006  Jonathan Matthew  <jonathan@kaolin.wh9.net>
+ *
+ *  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 RHYTHMDB_QUERY_RESULTS_H
+#define RHYTHMDB_QUERY_RESULTS_H
+
+/*
+ * Interface for objects that can handle query results from RhythmDB.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define RHYTHMDB_TYPE_QUERY_RESULTS		(rhythmdb_query_results_get_type ())
+#define RHYTHMDB_QUERY_RESULTS(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), RHYTHMDB_TYPE_QUERY_RESULTS, RhythmDBQueryResults))
+#define RHYTHMDB_IS_QUERY_RESULTS(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), RHYTHMDB_TYPE_QUERY_RESULTS))
+#define RHYTHMDB_QUERY_RESULTS_GET_IFACE(obj)	(G_TYPE_INSTANCE_GET_INTERFACE ((obj), RHYTHMDB_TYPE_QUERY_RESULTS, RhythmDBQueryResultsIface))
+
+typedef struct _RhythmDBQueryResults RhythmDBQueryResults;
+typedef struct _RhythmDBQueryResultsIface RhythmDBQueryResultsIface;
+
+struct _RhythmDBQueryResultsIface
+{
+	GTypeInterface g_iface;
+
+	/* vtable */
+	void	(*set_query)		(RhythmDBQueryResults *results,
+				 	 GPtrArray *query);
+
+	void	(*add_results)		(RhythmDBQueryResults *results,
+				 	 GPtrArray *entries);
+
+	void 	(*query_complete)	(RhythmDBQueryResults *results);
+}; 
+
+GType	rhythmdb_query_results_get_type	(void);
+
+void	rhythmdb_query_results_set_query (RhythmDBQueryResults *results,
+					  GPtrArray *query);
+
+void	rhythmdb_query_results_add_results (RhythmDBQueryResults *results,
+					    GPtrArray *entries);
+
+void	rhythmdb_query_results_query_complete (RhythmDBQueryResults *results);
+
+G_END_DECLS
+
+#endif /* RHYTHMDB_QUERY_RESULTS_H */
+
diff -rN -u -p old-rdb/rhythmdb/rhythmdb-tree.c new-rdb/rhythmdb/rhythmdb-tree.c
--- old-rdb/rhythmdb/rhythmdb-tree.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/rhythmdb/rhythmdb-tree.c	2006-02-13 22:05:57.000000000 +1000
@@ -42,7 +42,6 @@
 
 #include "rhythmdb-private.h"
 #include "rhythmdb-tree.h"
-#include "rhythmdb-query-model.h"
 #include "rhythmdb-property-model.h"
 #include "rb-debug.h"
 #include "rb-util.h"
@@ -75,7 +74,8 @@ static void rhythmdb_tree_entry_delete_b
 static RhythmDBEntry * rhythmdb_tree_entry_lookup_by_location (RhythmDB *db, const char *uri);
 static void rhythmdb_tree_entry_foreach (RhythmDB *adb, GFunc func, gpointer user_data);
 static void rhythmdb_tree_do_full_query (RhythmDB *db, GPtrArray *query,
-					 GtkTreeModel *main_model, gboolean *cancel);
+					 RhythmDBQueryResults *results,
+					 gboolean *cancel);
 static gboolean rhythmdb_tree_evaluate_query (RhythmDB *adb, GPtrArray *query,
 				       RhythmDBEntry *aentry);
 
@@ -1813,7 +1813,7 @@ struct RhythmDBTreeQueryGatheringData
 	RhythmDBTree *db;
 	GPtrArray *queue;
 	GHashTable *entries;
-	RhythmDBQueryModel *main_model;
+	RhythmDBQueryResults *results;
 };
 
 static void
@@ -1861,7 +1861,7 @@ handle_entry_match (RhythmDB *db, Rhythm
 
 	g_ptr_array_add (data->queue, entry);
 	if (data->queue->len > RHYTHMDB_QUERY_MODEL_SUGGESTED_UPDATE_CHUNK) {
-		rhythmdb_query_model_add_entries (data->main_model, data->queue);
+		rhythmdb_query_results_add_results (data->results, data->queue);
 		data->queue = g_ptr_array_new ();
 	}
 }
@@ -1869,18 +1869,18 @@ handle_entry_match (RhythmDB *db, Rhythm
 static void
 rhythmdb_tree_do_full_query (RhythmDB *adb,
 			     GPtrArray *query,
-			     GtkTreeModel *main_model,
+			     RhythmDBQueryResults *results,
 			     gboolean *cancel)
 {
 	RhythmDBTree *db = RHYTHMDB_TREE (adb);
 	struct RhythmDBTreeQueryGatheringData *data = g_new0 (struct RhythmDBTreeQueryGatheringData, 1);
 
-	data->main_model = RHYTHMDB_QUERY_MODEL (main_model);
+	data->results = results;
 	data->queue = g_ptr_array_new ();
 
 	do_query_recurse (db, query, (RhythmDBTreeTraversalFunc) handle_entry_match, data, cancel);
 
-	rhythmdb_query_model_add_entries (data->main_model, data->queue);
+	rhythmdb_query_results_add_results (data->results, data->queue);
 
 	g_free (data);
 }
diff -rN -u -p old-rdb/sources/rb-auto-playlist-source.c new-rdb/sources/rb-auto-playlist-source.c
--- old-rdb/sources/rb-auto-playlist-source.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/sources/rb-auto-playlist-source.c	2006-02-13 22:05:57.000000000 +1000
@@ -495,7 +495,9 @@ rb_auto_playlist_source_do_query (RBAuto
 					    NULL);
 
 		query = construct_query_from_selection (source);
-		rhythmdb_do_full_query_async_parsed (db, GTK_TREE_MODEL (query_model), query);
+		rhythmdb_do_full_query_async_parsed (db, 
+						     RHYTHMDB_QUERY_RESULTS (query_model), 
+						     query);
 		rhythmdb_query_free (query);
 	}
 
@@ -539,7 +541,9 @@ rb_auto_playlist_source_set_query (RBAut
 					      "max-size", priv->limit_mb,
 					      "max-time", priv->limit_time, 
 					      NULL);
-	rhythmdb_do_full_query_async_parsed (db, GTK_TREE_MODEL (priv->cached_all_query), query);
+	rhythmdb_do_full_query_async_parsed (db, 
+					     RHYTHMDB_QUERY_RESULTS (priv->cached_all_query), 
+					     query);
 
 	rb_auto_playlist_source_do_query (source);
 	rb_library_browser_set_model (priv->browser, priv->cached_all_query);
diff -rN -u -p old-rdb/sources/rb-iradio-source.c new-rdb/sources/rb-iradio-source.c
--- old-rdb/sources/rb-iradio-source.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/sources/rb-iradio-source.c	2006-02-13 22:05:57.000000000 +1000
@@ -732,7 +732,9 @@ rb_iradio_source_do_query (RBIRadioSourc
 	rb_entry_view_set_model (source->priv->stations, RHYTHMDB_QUERY_MODEL (query_model));
 	g_object_set (G_OBJECT (source), "query-model", query_model, NULL);
 
-	rhythmdb_do_full_query_parsed (source->priv->db, model, query);
+	rhythmdb_do_full_query_parsed (source->priv->db, 
+				       RHYTHMDB_QUERY_RESULTS (model), 
+				       query);
 
 	rhythmdb_query_free (query);
 
diff -rN -u -p old-rdb/sources/rb-library-source.c new-rdb/sources/rb-library-source.c
--- old-rdb/sources/rb-library-source.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/sources/rb-library-source.c	2006-02-13 22:05:57.000000000 +1000
@@ -503,7 +503,7 @@ rb_library_source_constructor (GType typ
 
 	source->priv->cached_all_query = rhythmdb_query_model_new_empty (source->priv->db);
 	rhythmdb_do_full_query_async (source->priv->db,
-				      GTK_TREE_MODEL (source->priv->cached_all_query),
+				      RHYTHMDB_QUERY_RESULTS (source->priv->cached_all_query),
 				      RHYTHMDB_QUERY_PROP_EQUALS, RHYTHMDB_PROP_TYPE, source->priv->entry_type,
 				      RHYTHMDB_QUERY_END);
 	rb_library_browser_set_model (source->priv->browser, source->priv->cached_all_query);
@@ -1095,7 +1095,9 @@ rb_library_source_do_query (RBLibrarySou
 		query_model = rhythmdb_query_model_new_empty (source->priv->db);
 
 		query = construct_query_from_selection (source);
-		rhythmdb_do_full_query_async_parsed (source->priv->db, GTK_TREE_MODEL (query_model), query);
+		rhythmdb_do_full_query_async_parsed (source->priv->db, 
+						     RHYTHMDB_QUERY_RESULTS (query_model), 
+						     query);
 		rhythmdb_query_free (query);
 	}
 
diff -rN -u -p old-rdb/sources/rb-podcast-source.c new-rdb/sources/rb-podcast-source.c
--- old-rdb/sources/rb-podcast-source.c	2006-02-13 22:05:56.000000000 +1000
+++ new-rdb/sources/rb-podcast-source.c	2006-02-13 22:05:57.000000000 +1000
@@ -613,7 +613,9 @@ rb_podcast_source_constructor (GType typ
 				      RHYTHMDB_PROP_TYPE,
 				      RHYTHMDB_ENTRY_TYPE_PODCAST_FEED,
 				      RHYTHMDB_QUERY_END);
-	rhythmdb_do_full_query_parsed (source->priv->db, GTK_TREE_MODEL (query_model), query);
+	rhythmdb_do_full_query_parsed (source->priv->db, 
+				       RHYTHMDB_QUERY_RESULTS (query_model), 
+				       query);
 
 	rhythmdb_query_free (query);
 	
@@ -1120,7 +1122,7 @@ rb_podcast_source_do_query (RBPodcastSou
 	rb_debug ("doing query");
 	query = construct_query_from_selection (source);
 	rhythmdb_do_full_query_async_parsed (source->priv->db,
-					     GTK_TREE_MODEL (query_model),
+					     RHYTHMDB_QUERY_RESULTS (query_model),
 					     query);
 		
 	rhythmdb_query_free (query);

