From e3501efeb4eebd79fd10695b3685de4bbfa5c82e Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Fri, 14 Jan 2011 23:31:20 +0200 Subject: [PATCH] core,tests,i18n: Prefix SeekableResponse with 'HTTP' --- po/POTFILES.in | 2 +- po/POTFILES.skip | 4 +-- src/rygel/Makefile.am | 2 +- src/rygel/rygel-http-identity-handler.vala | 36 +++++++++++----------- ...onse.vala => rygel-http-seekable-response.vala} | 16 +++++----- tests/Makefile.am | 8 ++--- ...vala => rygel-http-seekable-response-test.vala} | 26 ++++++++-------- tests/rygel-http-seekable-response.vala | 1 + tests/rygel-seekable-response.vala | 1 - 9 files changed, 48 insertions(+), 48 deletions(-) rename src/rygel/{rygel-seekable-response.vala => rygel-http-seekable-response.vala} (92%) rename tests/{rygel-seekable-response-test.vala => rygel-http-seekable-response-test.vala} (75%) create mode 120000 tests/rygel-http-seekable-response.vala delete mode 120000 tests/rygel-seekable-response.vala diff --git a/po/POTFILES.in b/po/POTFILES.in index a169d54..9aece2a 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -128,7 +128,7 @@ src/rygel/rygel-root-device.vala src/rygel/rygel-search-criteria-parser.vala src/rygel/rygel-search-expression.vala src/rygel/rygel-search.vala -src/rygel/rygel-seekable-response.vala +src/rygel/rygel-http-seekable-response.vala src/rygel/rygel-simple-container.vala src/rygel/rygel-source-connection-manager.vala src/rygel/rygel-sink-connection-manager.vala diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 2fba594..8be934d 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -77,7 +77,7 @@ src/rygel/rygel-mp3-transcoder-bin.c src/rygel/rygel-plugin-loader.c src/rygel/rygel-root-device-factory.c src/rygel/rygel-search.c -src/rygel/rygel-seekable-response.c +src/rygel/rygel-http-seekable-response.c src/rygel/rygel-subtitle-manager.c src/rygel/rygel-thumbnailer.c src/rygel/rygel-transcode-manager.c @@ -102,7 +102,7 @@ tests/rygel-http-byte-seek.c tests/rygel-http-item-uri.c tests/rygel-http-time-seek.c tests/rygel-http-gst-response.c -tests/rygel-seekable-response.c +tests/rygel-http-seekable-response.c tests/rygel-http-byte-seek_http-get.c tests/rygel-http-get.c tests/rygel-http-item-uri_http-get.c diff --git a/src/rygel/Makefile.am b/src/rygel/Makefile.am index 769419f..22fc921 100644 --- a/src/rygel/Makefile.am +++ b/src/rygel/Makefile.am @@ -70,7 +70,7 @@ VAPI_SOURCE_FILES = rygel-configuration.vala \ rygel-http-time-seek.vala \ rygel-http-response.vala \ rygel-http-gst-response.vala \ - rygel-seekable-response.vala \ + rygel-http-seekable-response.vala \ rygel-resource-info.vala \ rygel-icon-info.vala \ rygel-plugin.vala \ diff --git a/src/rygel/rygel-http-identity-handler.vala b/src/rygel/rygel-http-identity-handler.vala index 1ba10f8..aa5df4c 100644 --- a/src/rygel/rygel-http-identity-handler.vala +++ b/src/rygel/rygel-http-identity-handler.vala @@ -74,19 +74,19 @@ internal class Rygel.HTTPIdentityHandler : Rygel.HTTPGetHandler { private HTTPResponse render_body_real (HTTPGet request) throws Error { if (request.subtitle != null) { - return new SeekableResponse (request.server, - request.msg, - request.subtitle.uri, - request.seek, - request.subtitle.size, - this.cancellable); + return new HTTPSeekableResponse (request.server, + request.msg, + request.subtitle.uri, + request.seek, + request.subtitle.size, + this.cancellable); } else if (request.thumbnail != null) { - return new SeekableResponse (request.server, - request.msg, - request.thumbnail.uri, - request.seek, - request.thumbnail.size, - this.cancellable); + return new HTTPSeekableResponse (request.server, + request.msg, + request.thumbnail.uri, + request.seek, + request.thumbnail.size, + this.cancellable); } var item = request.item; @@ -110,12 +110,12 @@ internal class Rygel.HTTPIdentityHandler : Rygel.HTTPGetHandler { item.id); } - return new SeekableResponse (request.server, - request.msg, - item.uris.get (0), - request.seek, - item.size, - this.cancellable); + return new HTTPSeekableResponse (request.server, + request.msg, + item.uris.get (0), + request.seek, + item.size, + this.cancellable); } } } diff --git a/src/rygel/rygel-seekable-response.vala b/src/rygel/rygel-http-seekable-response.vala similarity index 92% rename from src/rygel/rygel-seekable-response.vala rename to src/rygel/rygel-http-seekable-response.vala index 93ed748..e538f17 100644 --- a/src/rygel/rygel-seekable-response.vala +++ b/src/rygel/rygel-http-seekable-response.vala @@ -24,7 +24,7 @@ using GUPnP; -internal class Rygel.SeekableResponse : Rygel.HTTPResponse { +internal class Rygel.HTTPSeekableResponse : Rygel.HTTPResponse { private const size_t BUFFER_LENGTH = 65536; private HTTPSeek seek; @@ -36,12 +36,12 @@ internal class Rygel.SeekableResponse : Rygel.HTTPResponse { int priority; - public SeekableResponse (Soup.Server server, - Soup.Message msg, - string uri, - HTTPSeek seek, - int64 file_length, - Cancellable? cancellable) { + public HTTPSeekableResponse (Soup.Server server, + Soup.Message msg, + string uri, + HTTPSeek seek, + int64 file_length, + Cancellable? cancellable) { var partial = seek.length < file_length; base (server, msg, partial, cancellable); @@ -50,7 +50,7 @@ internal class Rygel.SeekableResponse : Rygel.HTTPResponse { this.priority = this.get_requested_priority (); this.total_length = (size_t) seek.length; - this.buffer = new uint8[SeekableResponse.BUFFER_LENGTH]; + this.buffer = new uint8[HTTPSeekableResponse.BUFFER_LENGTH]; this.file = File.new_for_uri (uri); } diff --git a/tests/Makefile.am b/tests/Makefile.am index 152f0ea..a95edf9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -27,7 +27,7 @@ AM_VALAFLAGS = --disable-warnings --thread \ check_PROGRAMS = rygel-http-item-uri-test \ rygel-http-gst-response-test \ - rygel-seekable-response-test \ + rygel-http-seekable-response-test \ rygel-http-byte-seek-test \ rygel-http-time-seek-test \ rygel-http-get-test \ @@ -47,9 +47,9 @@ rygel_http_gst_response_test_SOURCES = rygel-http-gst-response-test.vala \ rygel-http-seek_live-response.vala \ rygel-gst-utils.vala -rygel_seekable_response_test_SOURCES = \ - rygel-seekable-response-test.vala \ - rygel-seekable-response.vala \ +rygel_http_seekable_response_test_SOURCES = \ + rygel-http-seekable-response-test.vala \ + rygel-http-seekable-response.vala \ rygel-http-response-test_seekable-response.vala \ rygel-http-response_seekable-response.vala \ rygel-state-machine_seekable-response.vala diff --git a/tests/rygel-seekable-response-test.vala b/tests/rygel-http-seekable-response-test.vala similarity index 75% rename from tests/rygel-seekable-response-test.vala rename to tests/rygel-http-seekable-response-test.vala index 2308e2c..64f91ea 100644 --- a/tests/rygel-seekable-response-test.vala +++ b/tests/rygel-http-seekable-response-test.vala @@ -37,17 +37,17 @@ public class Rygel.HTTPSeek : GLib.Object { } } -public class Rygel.SeekableResponseTest : Rygel.HTTPResponseTest { +public class Rygel.HTTPSeekableResponseTest : Rygel.HTTPResponseTest { private static string URI = "file:///tmp/rygel-dummy-test-file"; private File dummy_file; public static int main (string[] args) { try { - var test = new SeekableResponseTest.complete (); + var test = new HTTPSeekableResponseTest.complete (); test.run (); - test = new SeekableResponseTest.abort (); + test = new HTTPSeekableResponseTest.abort (); test.run (); } catch (TestError.SKIP error) { return error.code; @@ -60,16 +60,16 @@ public class Rygel.SeekableResponseTest : Rygel.HTTPResponseTest { return 0; } - private SeekableResponseTest (Cancellable? cancellable = null) - throws Error { + private HTTPSeekableResponseTest (Cancellable? cancellable = null) + throws Error { base (cancellable); } - private SeekableResponseTest.complete () throws Error { + private HTTPSeekableResponseTest.complete () throws Error { base.complete (); } - private SeekableResponseTest.abort () throws Error { + private HTTPSeekableResponseTest.abort () throws Error { base.abort (); } @@ -93,11 +93,11 @@ public class Rygel.SeekableResponseTest : Rygel.HTTPResponseTest { throws Error { var seek = new HTTPSeek (0, 1025); - return new SeekableResponse (this.server.context.server, - msg, - this.dummy_file.get_uri (), - seek, - 1024, - this.cancellable); + return new HTTPSeekableResponse (this.server.context.server, + msg, + this.dummy_file.get_uri (), + seek, + 1024, + this.cancellable); } } diff --git a/tests/rygel-http-seekable-response.vala b/tests/rygel-http-seekable-response.vala new file mode 120000 index 0000000..5eaf9da --- /dev/null +++ b/tests/rygel-http-seekable-response.vala @@ -0,0 +1 @@ +../src/rygel/rygel-http-seekable-response.vala \ No newline at end of file diff --git a/tests/rygel-seekable-response.vala b/tests/rygel-seekable-response.vala deleted file mode 120000 index 320233a..0000000 --- a/tests/rygel-seekable-response.vala +++ /dev/null @@ -1 +0,0 @@ -../src/rygel/rygel-seekable-response.vala \ No newline at end of file -- 2.7.4