[banshee/moblin: 7/11] get the URI listing right



commit 3b959c423e862ae7d9714183f985addbb63089f7
Author: Michael Meeks <michael meeks novell com>
Date:   Fri Aug 7 21:20:03 2009 +0100

    get the URI listing right

 .../Banshee.MoblinBackend/BognorInterface.cs       |    4 ++--
 .../Banshee.MoblinBackend/MoblinBognor.cs          |   19 ++++++++++++++++---
 src/Backends/Banshee.Moblin/Makefile.am            |    2 +-
 3 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/BognorInterface.cs b/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/BognorInterface.cs
index 6b08083..be2846d 100644
--- a/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/BognorInterface.cs
+++ b/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/BognorInterface.cs
@@ -48,7 +48,7 @@ namespace org.moblin.BognorRegis
 
 		void Remove (int index);
 		void Clear ();
-		List<string> ListUris ();
+		string[] ListUris ();
 //		string,string GetNowPlaying (); - mangling ?
 
 		// signals
@@ -66,7 +66,7 @@ namespace org.moblin.BognorRegis
 	public interface IQueueManager
 	{
 		// returns dbus queue paths
-		List<string> ListQueues();
+		string[] ListQueues();
 		event QueueHandler QueueCreated;
 		event QueueHandler QueueDestroyed;
 	}
diff --git a/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/MoblinBognor.cs b/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/MoblinBognor.cs
index a5444db..4f2c1f8 100644
--- a/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/MoblinBognor.cs
+++ b/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/MoblinBognor.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
 
 using Banshee.Web;
 using Banshee.Base;
+using Banshee.PlayQueue;
 using Banshee.Collection;
 using Banshee.MediaEngine;
 using Banshee.ServiceStack;
@@ -65,11 +66,11 @@ namespace Banshee.MoblinBackend.BognorRegis
 			local_queue.Dispose();
 			local_queue = null;
 		}
-		public List<string> ListQueues()
+		public string[] ListQueues()
 		{
 			var list = new List<string>();
 			list.Add ("local_queue");
-			return list;
+			return list.ToArray();
 		}
 		public event QueueHandler QueueCreated;
 		public event QueueHandler QueueDestroyed;
@@ -130,7 +131,19 @@ namespace Banshee.MoblinBackend.BognorRegis
 
 		public void Remove (int index) {}
 		public void Clear () {}
-		public List<string> ListUris () { return new List<string>(); }
+		public string[] ListUris ()
+		{
+			var uris = new List<string>();
+			foreach (var queue in ServiceManager.SourceManager.FindSources<PlayQueueSource>()) {
+				var model = queue.TrackModel;
+				for (int i = 0; i < model.Count; i++) {
+					uris.Add (model[i].Uri.AbsoluteUri);
+					Console.WriteLine ("add URI " + model[i].Uri.AbsoluteUri);
+				}
+			}
+			Console.WriteLine ("List URIs returns : " + uris.ToString());
+			return uris.ToArray();
+		}
 //		public string,string GetNowPlaying (); - mangling ?
 
 		// signals
diff --git a/src/Backends/Banshee.Moblin/Makefile.am b/src/Backends/Banshee.Moblin/Makefile.am
index a32df88..3c08135 100644
--- a/src/Backends/Banshee.Moblin/Makefile.am
+++ b/src/Backends/Banshee.Moblin/Makefile.am
@@ -1,6 +1,6 @@
 ASSEMBLY = Banshee.Moblin
 TARGET = library
-LINK = $(REF_BACKEND_GNOME)
+LINK = $(REF_BACKEND_GNOME) $(LINK_EXTENSION_PLAYQUEUE_DEPS)
 INSTALL_DIR = $(BACKENDS_INSTALL_DIR)
 
 SOURCES =  \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]