[rygel] core: Indentation/coding style fixes for last commit
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] core: Indentation/coding style fixes for last commit
- Date: Tue, 28 Jul 2009 19:16:48 +0000 (UTC)
commit fe5a9efd2ab70e83b6dab263d2e87a7dba2dc805
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jul 29 00:26:24 2009 +0300
core: Indentation/coding style fixes for last commit
src/rygel/rygel-connection-manager.vala | 34 +++++++++++++++++-------------
src/rygel/rygel-transcode-manager.vala | 7 +++--
2 files changed, 23 insertions(+), 18 deletions(-)
---
diff --git a/src/rygel/rygel-connection-manager.vala b/src/rygel/rygel-connection-manager.vala
index 91e7a0b..2b2bdbe 100644
--- a/src/rygel/rygel-connection-manager.vala
+++ b/src/rygel/rygel-connection-manager.vala
@@ -37,27 +37,15 @@ public class Rygel.ConnectionManager : Service {
protected string sink_protocol_info;
protected string connection_ids;
- private TranscodeManager? get_transcode_manager () {
- var root_device = (Rygel.RootDevice) this.root_device;
-
- // Find the ContentDirectory service attached to this root device.
- foreach (var service in root_device.services) {
- if (service.get_type().is_a (typeof (Rygel.ContentDirectory))) {
- var content_directory = (Rygel.ContentDirectory) service;
- return (TranscodeManager) content_directory.http_server;
- }
- }
- return null;
- }
-
protected string source_protocol_info {
owned get {
- string protocol_info = "http-get:*:*:*";
+ var protocol_info = "http-get:*:*:*";
TranscodeManager tm = get_transcode_manager ();
if (tm != null) {
- protocol_info += tm.get_transcoder_protocol_info ();
+ protocol_info += tm.get_protocol_info ();
}
+
return protocol_info;
}
}
@@ -137,4 +125,20 @@ public class Rygel.ConnectionManager : Service {
action.return ();
}
+
+ private TranscodeManager? get_transcode_manager () {
+ TranscodeManager manager = null;
+
+ var root_device = (Rygel.RootDevice) this.root_device;
+
+ // Find the ContentDirectory service attached to this root device.
+ foreach (var service in root_device.services) {
+ if (service.get_type().is_a (typeof (Rygel.ContentDirectory))) {
+ var content_directory = (Rygel.ContentDirectory) service;
+ manager = (TranscodeManager) content_directory.http_server;
+ }
+ }
+
+ return manager;
+ }
}
diff --git a/src/rygel/rygel-transcode-manager.vala b/src/rygel/rygel-transcode-manager.vala
index 126bea5..c376d2b 100644
--- a/src/rygel/rygel-transcode-manager.vala
+++ b/src/rygel/rygel-transcode-manager.vala
@@ -99,13 +99,14 @@ internal abstract class Rygel.TranscodeManager : GLib.Object {
return transcoder;
}
- public string get_transcoder_protocol_info () {
+ public string get_protocol_info () {
string protocol_info = "";
foreach (var transcoder in this.transcoders) {
- protocol_info += ",http-get:*:%s:DLNA.ORG_PN=%s".printf (
- transcoder.mime_type, transcoder.dlna_profile);
+ protocol_info += ",http-get:*:" + transcoder.mime_type +
+ ":DLNA.ORG_PN=" + transcoder.dlna_profile;
}
+
return protocol_info;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]