core,gst-renderer: Introducing Player interface
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sat, 31 Jul 2010 10:07:19 +0000 (13:07 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sat, 31 Jul 2010 10:12:34 +0000 (13:12 +0300)
src/plugins/gst-renderer/rygel-gst-renderer-player.vala
src/rygel/Makefile.am
src/rygel/rygel-player.vala [new file with mode: 0644]

index 17dfcef..40ff145 100644 (file)
@@ -23,7 +23,7 @@
 
 using Gst;
 
-public class Rygel.GstRenderer.Player : GLib.Object {
+public class Rygel.GstRenderer.Player : GLib.Object, Rygel.Player {
     private static Player player;
 
     private dynamic Element playbin;
index 43b22f3..8a747d3 100644 (file)
@@ -106,6 +106,7 @@ VAPI_SOURCE_FILES = rygel-configuration.vala \
                    rygel-gst-utils.vala \
                    rygel-media-receiver-registrar.vala \
                    rygel-log-handler.vala \
+                   rygel-player.vala \
                    rygel-changelog.vala
 
 rygel_VALAFLAGS = \
diff --git a/src/rygel/rygel-player.vala b/src/rygel/rygel-player.vala
new file mode 100644 (file)
index 0000000..1033e45
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2008 OpenedHand Ltd.
+ * Copyright (C) 2009 Nokia Corporation.
+ *
+ * Author: Jorn Baayen <jorn@openedhand.com>
+ *         Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
+ *                               <zeeshan.ali@nokia.com>
+ *
+ * Rygel is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Rygel 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+public interface Rygel.Player : GLib.Object {
+    public abstract string playback_state { get; set; }
+    public abstract string uri { get; set; }
+    public abstract double volume { get; set; }
+    public abstract string duration { owned get; }
+    public abstract string position { owned get; }
+
+    public abstract bool seek (string time);
+}