[rygel] server: Remove obsolete function



commit a58008ef4e7b8afdfe088273ac51d05782615567
Author: Jens Georg <mail jensge org>
Date:   Wed Feb 11 20:25:07 2015 +0100

    server: Remove obsolete function
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/librygel-server/rygel-http-get-handler.vala    |   22 --------------------
 .../rygel-http-identity-handler.vala               |    9 --------
 .../rygel-http-resource-handler.vala               |    7 ------
 .../rygel-http-subtitle-handler.vala               |    7 ------
 .../rygel-http-thumbnail-handler.vala              |    7 ------
 5 files changed, 0 insertions(+), 52 deletions(-)
---
diff --git a/src/librygel-server/rygel-http-get-handler.vala b/src/librygel-server/rygel-http-get-handler.vala
index 180058e..37e1aa0 100644
--- a/src/librygel-server/rygel-http-get-handler.vala
+++ b/src/librygel-server/rygel-http-get-handler.vala
@@ -44,24 +44,6 @@ internal abstract class Rygel.HTTPGetHandler: GLib.Object {
                                               throws HTTPRequestError {
         var mode = request.msg.request_headers.get_one (TRANSFER_MODE_HEADER);
 
-        // Yes, I know this is not the ideal code to just get a specific
-        // string for an HTTP header but if you think you can come-up with
-        // something better, be my guest and provide a patch.
-        var didl_writer = new GUPnP.DIDLLiteWriter (null);
-        var didl_item = didl_writer.add_item ();
-        try {
-            var resource = this.add_resource (didl_item, request);
-            if (resource != null) {
-                var tokens = resource.protocol_info.to_string ().split (":", 4);
-                assert (tokens.length == 4);
-
-                request.msg.response_headers.append ("contentFeatures.dlna.org",
-                                                     tokens[3]);
-            }
-        } catch (Error err) {
-            warning ("Received request for 'contentFeatures.dlna.org' but " +
-                       "failed to provide the value in response headers");
-        }
         // Per DLNA 7.5.4.3.2.33.2, if the transferMode header is empty it
         // must be treated as Streaming mode or Interactive, depending upon the content
         if (mode == null) {
@@ -100,8 +82,4 @@ internal abstract class Rygel.HTTPGetHandler: GLib.Object {
     public abstract HTTPResponse render_body (HTTPGet request)
                                               throws HTTPRequestError;
 
-    protected abstract DIDLLiteResource add_resource (DIDLLiteObject didl_object,
-                                                      HTTPGet      request)
-                                                      throws Error;
-
 }
diff --git a/src/librygel-server/rygel-http-identity-handler.vala 
b/src/librygel-server/rygel-http-identity-handler.vala
index 0e3dcd9..19e8a21 100644
--- a/src/librygel-server/rygel-http-identity-handler.vala
+++ b/src/librygel-server/rygel-http-identity-handler.vala
@@ -70,15 +70,6 @@ internal class Rygel.HTTPIdentityHandler : Rygel.HTTPGetHandler {
         return -1;
     }
 
-    protected override DIDLLiteResource add_resource
-                                        (DIDLLiteObject didl_object,
-                                         HTTPGet      request)
-                                        throws Error {
-        var protocol = request.http_server.get_protocol ();
-
-        return request.object.add_resource (didl_object, null, protocol);
-    }
-
     private HTTPResponse render_body_real (HTTPGet request) throws Error {
         var src = (request.object as MediaFileItem).create_stream_source
                                         (request.http_server.context.host_ip);
diff --git a/src/librygel-server/rygel-http-resource-handler.vala 
b/src/librygel-server/rygel-http-resource-handler.vala
index eae7246..965ab64 100644
--- a/src/librygel-server/rygel-http-resource-handler.vala
+++ b/src/librygel-server/rygel-http-resource-handler.vala
@@ -93,11 +93,4 @@ internal class Rygel.HTTPMediaResourceHandler : HTTPGetHandler {
     public override int64 get_resource_size () {
         return media_resource.size;
     }
-
-    protected override DIDLLiteResource add_resource (DIDLLiteObject didl_object,
-                                                      HTTPGet      request)
-                                                      throws Error {
-        // Temporary. Needed for abstract base class.
-        return null as DIDLLiteResource;
-    }
 }
diff --git a/src/librygel-server/rygel-http-subtitle-handler.vala 
b/src/librygel-server/rygel-http-subtitle-handler.vala
index 383b468..d011587 100644
--- a/src/librygel-server/rygel-http-subtitle-handler.vala
+++ b/src/librygel-server/rygel-http-subtitle-handler.vala
@@ -92,11 +92,4 @@ internal class Rygel.HTTPSubtitleHandler : Rygel.HTTPGetHandler {
     public override int64 get_resource_size () {
         return subtitle.size;
     }
-
-    protected override DIDLLiteResource add_resource
-                                        (DIDLLiteObject didl_object,
-                                         HTTPGet        request)
-                                         throws Error {
-        return null as DIDLLiteResource;
-    }
 }
diff --git a/src/librygel-server/rygel-http-thumbnail-handler.vala 
b/src/librygel-server/rygel-http-thumbnail-handler.vala
index 364d127..9a4975f 100644
--- a/src/librygel-server/rygel-http-thumbnail-handler.vala
+++ b/src/librygel-server/rygel-http-thumbnail-handler.vala
@@ -93,11 +93,4 @@ internal class Rygel.HTTPThumbnailHandler : Rygel.HTTPGetHandler {
     public override int64 get_resource_size () {
         return thumbnail.size;
     }
-
-    protected override DIDLLiteResource add_resource
-                                        (DIDLLiteObject didl_object,
-                                         HTTPGet        request)
-                                         throws Error {
-        return null as DIDLLiteResource;
-    }
 }


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