[rygel] core: Add skeleton for GetMediaInfo_Ext



commit fc7dec29d0afad4148f824b3455c3f131300c5c0
Author: Jens Georg <mail jensge org>
Date:   Mon Dec 26 18:13:53 2011 +0100

    core: Add skeleton for GetMediaInfo_Ext

 src/rygel/rygel-av-transport.vala |   42 +++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-av-transport.vala b/src/rygel/rygel-av-transport.vala
index a3b9bbf..85511cb 100644
--- a/src/rygel/rygel-av-transport.vala
+++ b/src/rygel/rygel-av-transport.vala
@@ -143,6 +143,7 @@ internal class Rygel.AVTransport : Service {
         action_invoked["SetAVTransportURI"].connect
                                         (this.set_av_transport_uri_cb);
         action_invoked["GetMediaInfo"].connect (this.get_media_info_cb);
+        action_invoked["GetMediaInfo_Ext"].connect (this.get_media_info_ex_cb);
         action_invoked["GetTransportInfo"].connect (this.get_transport_info_cb);
         action_invoked["GetPositionInfo"].connect (this.get_position_info_cb);
         action_invoked["GetDeviceCapabilities"].connect
@@ -262,6 +263,46 @@ internal class Rygel.AVTransport : Service {
                         "NOT_IMPLEMENTED",
                     "RecordMedium",
                         typeof (string),
+                        "",
+                    "WriteStatus",
+                        typeof (string),
+                        "NOT_IMPLEMENTED");
+
+        action.return ();
+    }
+
+    private void get_media_info_ex_cb (Service             service,
+                                       owned ServiceAction action) {
+        if (!this.check_instance_id (action)) {
+            return;
+        }
+
+        action.set ("CurrentType",
+                        typeof (string),
+                        "NO_MEDIA",
+                    "NrTracks",
+                        typeof (uint),
+                        this.n_tracks,
+                    "MediaDuration",
+                        typeof (string),
+                        this.player.duration_as_str,
+                    "CurrentURI",
+                        typeof (string),
+                        this.uri,
+                    "CurrentURIMetaData",
+                        typeof (string),
+                        this.metadata,
+                    "NextURI",
+                        typeof (string),
+                        "NOT_IMPLEMENTED",
+                    "NextURIMetaData",
+                        typeof (string),
+                        "NOT_IMPLEMENTED",
+                    "PlayMedium",
+                        typeof (string),
+                        "NOT_IMPLEMENTED",
+                    "RecordMedium",
+                        typeof (string),
                         "NOT_IMPLEMENTED",
                     "WriteStatus",
                         typeof (string),
@@ -270,6 +311,7 @@ internal class Rygel.AVTransport : Service {
         action.return ();
     }
 
+
     private void get_transport_info_cb (Service             service,
                                         owned ServiceAction action) {
         if (!this.check_instance_id (action)) {



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