[rygel] core: Cleaner code by use of 'using' statement



commit c4594bc54f484f9572aa67eae0f516c754e5f0e0
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Apr 1 16:37:26 2011 +0300

    core: Cleaner code by use of 'using' statement

 src/rygel/rygel-http-gst-response.vala |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/rygel/rygel-http-gst-response.vala b/src/rygel/rygel-http-gst-response.vala
index eea56de..5698beb 100644
--- a/src/rygel/rygel-http-gst-response.vala
+++ b/src/rygel/rygel-http-gst-response.vala
@@ -23,6 +23,7 @@
  */
 
 using Gst;
+using Soup;
 
 internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
     private Pipeline pipeline;
@@ -46,10 +47,9 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
         this.seek = request.seek;
 
         if (this.seek != null && this.seek is HTTPByteSeek) {
-            this.msg.response_headers.set_encoding
-                                        (Soup.Encoding.CONTENT_LENGTH);
+            this.msg.response_headers.set_encoding (Encoding.CONTENT_LENGTH);
         } else {
-            this.msg.response_headers.set_encoding (Soup.Encoding.EOF);
+            this.msg.response_headers.set_encoding (Encoding.EOF);
         }
     }
 
@@ -120,7 +120,7 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
                 critical (_("Failed to link %s to %s"),
                           depay.name,
                           sink.name);
-                this.end (false, Soup.KnownStatusCode.NONE);
+                this.end (false, KnownStatusCode.NONE);
                 return;
             }
 
@@ -133,7 +133,7 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
             critical (_("Failed to link pad %s to %s"),
                       src_pad.name,
                       sink_pad.name);
-            this.end (false, Soup.KnownStatusCode.NONE);
+            this.end (false, KnownStatusCode.NONE);
             return;
         }
 
@@ -188,7 +188,7 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
 
         if (!ret) {
                 Idle.add_full (this.priority, () => {
-                    this.end (false, Soup.KnownStatusCode.NONE);
+                    this.end (false, KnownStatusCode.NONE);
 
                     return false;
                 });
@@ -222,8 +222,7 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
                                  this.seek.stop)) {
             warning (_("Failed to seek to offset %lld"), this.seek.start);
 
-            this.end (false,
-                      Soup.KnownStatusCode.REQUESTED_RANGE_NOT_SATISFIABLE);
+            this.end (false, KnownStatusCode.REQUESTED_RANGE_NOT_SATISFIABLE);
 
             return false;
         }



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