[rygel] server: Add MediaResource.dup () function



commit 7cb3ed08fe902ee799e27659bfe51ac22ffbc485
Author: Jens Georg <mail jensge org>
Date:   Thu Nov 20 07:34:39 2014 +0100

    server: Add MediaResource.dup () function
    
    Shorthand for new MediaResource.from_resource (resource.get_name (), resource);
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/librygel-server/rygel-media-resource.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-media-resource.vala b/src/librygel-server/rygel-media-resource.vala
index 0520734..c0986bf 100644
--- a/src/librygel-server/rygel-media-resource.vala
+++ b/src/librygel-server/rygel-media-resource.vala
@@ -113,6 +113,10 @@ public class Rygel.MediaResource : GLib.Object {
         return new_speeds;
     }
 
+    public MediaResource dup () {
+        return new MediaResource.from_resource (this.get_name (), this);
+    }
+
     public string get_name () {
         return this.name;
     }


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