[banshee/moblin: 8/11] make it pass 'make dist'
- From: Michael Meeks <michael src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee/moblin: 8/11] make it pass 'make dist'
- Date: Mon, 10 Aug 2009 20:35:27 +0000 (UTC)
commit fb657c4b4454d7f4a89c66ddb25548a1e7b438aa
Author: Michael Meeks <michael meeks novell com>
Date: Mon Aug 10 10:21:15 2009 +0100
make it pass 'make dist'
.../Banshee.MoblinBackend/MoblinBognor.cs | 51 ++++++++++++++------
src/Extensions/Makefile.am | 1 +
2 files changed, 37 insertions(+), 15 deletions(-)
---
diff --git a/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/MoblinBognor.cs b/src/Backends/Banshee.Moblin/Banshee.MoblinBackend/MoblinBognor.cs
index 4f2c1f8..5264247 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.Playlist;
using Banshee.PlayQueue;
using Banshee.Collection;
using Banshee.MediaEngine;
@@ -81,12 +82,17 @@ namespace Banshee.MoblinBackend.BognorRegis
{
string serviceName;
QueueManager mgr;
+ PlayQueueSource queue;
public LocalQueue (QueueManager _mgr, string name)
{
serviceName = name;
mgr = _mgr;
ServiceManager.DBusServiceManager.RegisterObject (this);
+ foreach (var q in ServiceManager.SourceManager.FindSources<PlayQueueSource>()) {
+ queue = q;
+ break;
+ }
}
IDBusExportable IDBusExportable.Parent {
@@ -118,30 +124,45 @@ namespace Banshee.MoblinBackend.BognorRegis
return ServiceManager.PlayerEngine.IsPlaying();
}
- public double GetPosition (int type) { return 0.0; }
- public void SetPosition (int type, double position) {}
+ /* seeking */
+ public double GetPosition (int type)
+ {
+ return ((double) ServiceManager.PlayerEngine.Position /
+ ServiceManager.PlayerEngine.Length);
+ }
+ public void SetPosition (int type, double position)
+ {
+ ServiceManager.PlayerEngine.Position =
+ (uint) (ServiceManager.PlayerEngine.Length * position);
+ }
public void PlayUri (string uri, string mimeType)
{
Console.WriteLine ("Play URI " + uri + " type " + mimeType);
ServiceManager.PlayerEngine.OpenPlay (new SafeUri (uri));
}
- public void AddUri (string uri, string mimeType) {}
- public void InsertUri (string uri, string mimeType, int pos) {}
-
- public void Remove (int index) {}
- public void Clear () {}
+ public void AddUri (string uri, string mimeType)
+ {
+ queue.EnqueueUri (uri);
+ }
+ public void InsertUri (string uri, string mimeType, int pos)
+ {
+// 'int pos' is hardish - cf. PlayQueueSource.cs ...
+ }
+ public void Remove (int index)
+ {
+// RemoveTrackRange (DatabaseTrackModel, new Hyena.Collections.RangeCollection.Range (0, Count));
+ }
+ public void Clear ()
+ {
+ queue.Clear();
+ }
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());
+ var model = queue.TrackModel;
+ for (int i = 0; i < model.Count; i++)
+ uris.Add (model[i].Uri.AbsoluteUri);
return uris.ToArray();
}
// public string,string GetNowPlaying (); - mangling ?
diff --git a/src/Extensions/Makefile.am b/src/Extensions/Makefile.am
index caef9f9..80b813c 100644
--- a/src/Extensions/Makefile.am
+++ b/src/Extensions/Makefile.am
@@ -9,6 +9,7 @@ SUBDIRS = \
Banshee.InternetRadio \
Banshee.Lastfm \
Banshee.MiniMode \
+ Banshee.MediaWeb \
Banshee.MultimediaKeys \
Banshee.NotificationArea \
Banshee.NowPlaying \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]