[rygel] core: HTTPServer.is_http_uri() -> need_proxy()
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: HTTPServer.is_http_uri() -> need_proxy()
- Date: Wed, 25 Aug 2010 14:45:19 +0000 (UTC)
commit 8dcac7ee69f5487a40c1e42da1ac6d1f8778d8e1
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Aug 25 14:41:45 2010 +0300
core: HTTPServer.is_http_uri() -> need_proxy()
Replace HTTPServer.is_http_uri() with need_proxy() that does the opposite
and is public.
src/rygel/rygel-http-server.vala | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/rygel/rygel-http-server.vala b/src/rygel/rygel-http-server.vala
index 2d06383..419e195 100644
--- a/src/rygel/rygel-http-server.vala
+++ b/src/rygel/rygel-http-server.vala
@@ -68,7 +68,7 @@ internal class Rygel.HTTPServer : Rygel.TranscodeManager, Rygel.StateMachine {
throws Error {
// Subtitles first
foreach (var subtitle in item.subtitles) {
- if (!is_http_uri (subtitle.uri)) {
+ if (this.need_proxy (subtitle.uri)) {
var uri = subtitle.uri; // Save the original URI
var index = item.subtitles.index_of (subtitle);
@@ -91,7 +91,7 @@ internal class Rygel.HTTPServer : Rygel.TranscodeManager, Rygel.StateMachine {
// Thumbnails comes in the end
foreach (var thumbnail in item.thumbnails) {
- if (!is_http_uri (thumbnail.uri)) {
+ if (this.need_proxy (thumbnail.uri)) {
var uri = thumbnail.uri; // Save the original URI
var index = item.thumbnails.index_of (thumbnail);
@@ -118,11 +118,15 @@ internal class Rygel.HTTPServer : Rygel.TranscodeManager, Rygel.StateMachine {
uri.to_string ());
}
+ public bool need_proxy (string uri) {
+ return Uri.parse_scheme (uri) != "http";
+ }
+
private bool http_uri_present (MediaItem item) {
bool present = false;
foreach (var uri in item.uris) {
- if (this.is_http_uri (uri)) {
+ if (!this.need_proxy (uri)) {
present = true;
break;
@@ -132,10 +136,6 @@ internal class Rygel.HTTPServer : Rygel.TranscodeManager, Rygel.StateMachine {
return present;
}
- private bool is_http_uri (string uri) {
- return Uri.parse_scheme (uri) == "http";
- }
-
private void on_cancelled (Cancellable cancellable) {
// Cancel all state machines
this.cancellable.cancel ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]