[rygel] core: HTTPItemURI gets HTTPServer reference



commit b0eed0be1d94b1bddbeece9494748391f8f76bf7
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Jan 25 18:28:00 2010 +0200

    core: HTTPItemURI gets HTTPServer reference
    
    HTTPItemURI gets reference to associated HTTPServer instance.

 src/rygel/rygel-http-item-uri.vala |    9 ++++++---
 src/rygel/rygel-http-server.vala   |    5 ++++-
 2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/rygel/rygel-http-item-uri.vala b/src/rygel/rygel-http-item-uri.vala
index 1e8e798..3569d8a 100644
--- a/src/rygel/rygel-http-item-uri.vala
+++ b/src/rygel/rygel-http-item-uri.vala
@@ -24,13 +24,16 @@ internal class Rygel.HTTPItemURI : Object {
     public string item_id;
     public int thumbnail_index;
     public string? transcode_target;
+    public HTTPServer http_server;
 
-    public HTTPItemURI (string item_id,
-                        int thumbnail_index = -1,
-                        string ? transcode_target = null) {
+    public HTTPItemURI (string     item_id,
+                        HTTPServer http_server,
+                        int        thumbnail_index = -1,
+                        string?    transcode_target = null) {
         this.item_id = item_id;
         this.thumbnail_index = thumbnail_index;
         this.transcode_target = transcode_target;
+        this.http_server = http_server;
     }
 
     public HTTPItemURI.from_string (string uri, string server_root = "") {
diff --git a/src/rygel/rygel-http-server.vala b/src/rygel/rygel-http-server.vala
index 30e6b20..aac14d9 100644
--- a/src/rygel/rygel-http-server.vala
+++ b/src/rygel/rygel-http-server.vala
@@ -125,7 +125,10 @@ internal class Rygel.HTTPServer : Rygel.TranscodeManager, Rygel.StateMachine {
     internal override string create_uri_for_item (MediaItem item,
                                                   int       thumbnail_index,
                                                   string?   transcode_target) {
-        var uri = new HTTPItemURI (item.id, thumbnail_index, transcode_target);
+        var uri = new HTTPItemURI (item.id,
+                                   this,
+                                   thumbnail_index,
+                                   transcode_target);
 
         return create_uri_for_path (uri.to_string());
     }



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