[rygel] core,plugins,tests: Change in coding-style
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core,plugins,tests: Change in coding-style
- Date: Sun, 28 Nov 2010 15:50:20 +0000 (UTC)
commit 34157a0df475c4d37e8289117f166ce15af010da
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sun Nov 28 17:36:38 2010 +0200
core,plugins,tests: Change in coding-style
If the first argument to a function does not fit on the same line, we now
put the opening '(' on the next line rather than having it at the end of
the first line.
src/plugins/external/rygel-external-container.vala | 84 ++++++-------
.../external/rygel-external-interfaces.vala | 28 ++--
.../external/rygel-external-item-factory.vala | 36 +++---
.../media-export/rygel-media-export-database.vala | 8 +-
.../rygel-media-export-db-container.vala | 12 +-
.../rygel-media-export-harvesting-task.vala | 28 ++--
.../rygel-media-export-media-cache.vala | 130 ++++++++++----------
.../rygel-media-export-query-container.vala | 38 +++---
.../rygel-media-export-recursive-file-monitor.vala | 16 ++--
.../rygel-media-export-root-container.vala | 24 ++--
.../mediathek/rygel-mediathek-asx-playlist.vala | 14 +-
.../mediathek/rygel-mediathek-video-item.vala | 16 ++--
.../tracker/rygel-tracker-insertion-query.vala | 8 +-
src/plugins/tracker/rygel-tracker-interfaces.vala | 4 +-
.../tracker/rygel-tracker-music-item-factory.vala | 4 +-
src/rygel/rygel-audio-item.vala | 12 +-
src/rygel/rygel-av-transport.vala | 12 +-
src/rygel/rygel-browse.vala | 19 ++--
src/rygel/rygel-connection-manager.vala | 24 ++--
src/rygel/rygel-gst-utils.vala | 12 +-
src/rygel/rygel-http-byte-seek.vala | 5 +-
src/rygel/rygel-http-get-handler.vala | 10 +-
src/rygel/rygel-http-get.vala | 32 +++---
src/rygel/rygel-http-identity-handler.vala | 6 +-
src/rygel/rygel-http-post.vala | 18 ++--
src/rygel/rygel-http-request.vala | 11 +-
src/rygel/rygel-http-time-seek.vala | 5 +-
src/rygel/rygel-image-item.vala | 12 +-
src/rygel/rygel-item-creator.vala | 49 ++++----
src/rygel/rygel-item-destroyer.vala | 26 ++--
src/rygel/rygel-l16-transcoder-bin.vala | 8 +-
src/rygel/rygel-media-item.vala | 12 +-
src/rygel/rygel-media-query-action.vala | 17 ++--
src/rygel/rygel-meta-config.vala | 52 ++++----
src/rygel/rygel-mp3-transcoder.vala | 12 +-
src/rygel/rygel-plugin-loader.vala | 10 +-
src/rygel/rygel-relational-expression.vala | 4 +-
src/rygel/rygel-search.vala | 9 +-
src/rygel/rygel-subtitle-manager.vala | 8 +-
src/rygel/rygel-thumbnailer.vala | 8 +-
src/rygel/rygel-user-config.vala | 10 +-
src/rygel/rygel-video-item.vala | 12 +-
src/ui/rygel-general-pref-section.vala | 8 +-
tests/rygel-http-time-seek-test.vala | 4 +-
44 files changed, 432 insertions(+), 445 deletions(-)
---
diff --git a/src/plugins/external/rygel-external-container.vala b/src/plugins/external/rygel-external-container.vala
index a441f09..b661e53 100644
--- a/src/plugins/external/rygel-external-container.vala
+++ b/src/plugins/external/rygel-external-container.vala
@@ -79,10 +79,8 @@ public class Rygel.External.Container : Rygel.MediaContainer {
filter += item_prop;
}
- var children_props = yield this.actual_container.list_children (
- offset,
- max_count,
- filter);
+ var children_props = yield this.actual_container.list_children
+ (offset, max_count, filter);
return yield this.create_media_objects (children_props, this);
}
@@ -116,11 +114,11 @@ public class Rygel.External.Container : Rygel.MediaContainer {
}
var ext_expression = this.translate_expression (expression);
- var result = yield this.actual_container.search_objects (
- ext_expression.to_string (),
- offset,
- max_count,
- filter);
+ var result = yield this.actual_container.search_objects
+ (ext_expression.to_string (),
+ offset,
+ max_count,
+ filter);
total_matches = result.length;
return yield this.create_media_objects (result);
@@ -159,30 +157,30 @@ public class Rygel.External.Container : Rygel.MediaContainer {
Properties props_iface = yield Bus.get_proxy
(BusType.SESSION,
- this.service_name,
- id,
- DBusProxyFlags.DO_NOT_LOAD_PROPERTIES);
+ this.service_name,
+ id,
+ DBusProxyFlags.DO_NOT_LOAD_PROPERTIES);
var props = yield props_iface.get_all (MediaItemProxy.IFACE);
// Its an item then
- media_object = yield this.item_factory.create (
- id,
- actual_object.object_type,
- actual_object.display_name,
- props,
- this.service_name,
- this.host_ip,
- parent_container);
+ media_object = yield this.item_factory.create
+ (id,
+ actual_object.object_type,
+ actual_object.display_name,
+ props,
+ this.service_name,
+ this.host_ip,
+ parent_container);
}
return media_object;
}
- private async MediaObjects create_media_objects (
- HashTable<string,Variant>[] all_props,
- MediaContainer? parent
- = null) throws GLib.Error {
+ private async MediaObjects create_media_objects
+ (HashTable<string,Variant>[] all_props,
+ MediaContainer? parent
+ = null) throws GLib.Error {
var media_objects = new MediaObjects ();
foreach (var props in all_props) {
@@ -218,14 +216,14 @@ public class Rygel.External.Container : Rygel.MediaContainer {
parent_container);
} else {
// Its an item then
- media_object = yield this.item_factory.create (
- id,
- type,
- title,
- props,
- this.service_name,
- this.host_ip,
- parent_container);
+ media_object = yield this.item_factory.create
+ (id,
+ type,
+ title,
+ props,
+ this.service_name,
+ this.host_ip,
+ parent_container);
}
}
@@ -246,10 +244,8 @@ public class Rygel.External.Container : Rygel.MediaContainer {
filter += container_prop;
}
- var children_props = yield this.actual_container.list_containers (
- 0,
- 0,
- filter);
+ var children_props = yield this.actual_container.list_containers
+ (0, 0, filter);
this.containers.clear ();
foreach (var props in children_props) {
@@ -306,14 +302,14 @@ public class Rygel.External.Container : Rygel.MediaContainer {
return target;
}
- private SearchExpression translate_expression (
- SearchExpression upnp_expression) {
+ private SearchExpression translate_expression
+ (SearchExpression upnp_expression) {
if (upnp_expression is RelationalExpression) {
var expression = upnp_expression as RelationalExpression;
var ext_expression = new RelationalExpression ();
ext_expression.op = expression.op;
- ext_expression.operand1 = this.translate_property (
- expression.operand1);
+ ext_expression.operand1 = this.translate_property
+ (expression.operand1);
ext_expression.operand2 = expression.operand2;
return ext_expression;
@@ -322,10 +318,10 @@ public class Rygel.External.Container : Rygel.MediaContainer {
var ext_expression = new LogicalExpression ();
ext_expression.op = expression.op;
- ext_expression.operand1 = this.translate_expression (
- expression.operand1);
- ext_expression.operand2 = this.translate_expression (
- expression.operand2);
+ ext_expression.operand1 = this.translate_expression
+ (expression.operand1);
+ ext_expression.operand2 = this.translate_expression
+ (expression.operand2);
return ext_expression;
}
diff --git a/src/plugins/external/rygel-external-interfaces.vala b/src/plugins/external/rygel-external-interfaces.vala
index 5b17f91..a957a85 100644
--- a/src/plugins/external/rygel-external-interfaces.vala
+++ b/src/plugins/external/rygel-external-interfaces.vala
@@ -48,22 +48,22 @@ public interface Rygel.External.MediaContainerProxy : DBusProxy,
public abstract uint container_count { get; set; }
public abstract bool searchable { get; set; }
- public abstract async HashTable<string,Variant>[] list_children (
- uint offset,
- uint max_count,
- string[] filter) throws IOError;
- public abstract async HashTable<string,Variant>[] list_containers (
- uint offset,
- uint max_count,
- string[] filter) throws IOError;
- public abstract async HashTable<string,Variant>[] list_items (
- uint offset,
- uint max_count,
- string[] filter) throws IOError;
+ public abstract async HashTable<string,Variant>[] list_children
+ (uint offset,
+ uint max_count,
+ string[] filter) throws IOError;
+ public abstract async HashTable<string,Variant>[] list_containers
+ (uint offset,
+ uint max_count,
+ string[] filter) throws IOError;
+ public abstract async HashTable<string,Variant>[] list_items
+ (uint offset,
+ uint max_count,
+ string[] filter) throws IOError;
// Optional API
- public abstract async HashTable<string,Variant>[] search_objects (
- string query,
+ public abstract async HashTable<string,Variant>[] search_objects
+ (string query,
uint offset,
uint max_count,
string[] filter) throws IOError;
diff --git a/src/plugins/external/rygel-external-item-factory.vala b/src/plugins/external/rygel-external-item-factory.vala
index afad6f8..85e53a8 100644
--- a/src/plugins/external/rygel-external-item-factory.vala
+++ b/src/plugins/external/rygel-external-item-factory.vala
@@ -78,12 +78,12 @@ public class Rygel.External.ItemFactory {
return item;
}
- private async void set_music_metadata (
- MusicItem music,
- HashTable<string,Variant> props,
- string service_name,
- string host_ip)
- throws GLib.Error {
+ private async void set_music_metadata
+ (MusicItem music,
+ HashTable<string,Variant> props,
+ string service_name,
+ string host_ip)
+ throws GLib.Error {
music.artist = this.get_string (props, "Artist");
music.album = this.get_string (props, "Album");
music.genre = this.get_string (props, "Genre");
@@ -111,12 +111,12 @@ public class Rygel.External.ItemFactory {
audio.bits_per_sample = this.get_int (props, "BitsPerSample");
}
- private async void set_visual_metadata (
- VisualItem visual,
- HashTable<string,Variant> props,
- string service_name,
- string host_ip)
- throws GLib.Error {
+ private async void set_visual_metadata
+ (VisualItem visual,
+ HashTable<string,Variant> props,
+ string service_name,
+ string host_ip)
+ throws GLib.Error {
visual.width = this.get_int (props, "Width");
visual.height = this.get_int (props, "Height");
visual.color_depth = this.get_int (props, "ColorDepth");
@@ -133,12 +133,12 @@ public class Rygel.External.ItemFactory {
}
}
- private async void set_video_metadata (
- VideoItem video,
- HashTable<string,Variant> props,
- string service_name,
- string host_ip)
- throws GLib.Error {
+ private async void set_video_metadata
+ (VideoItem video,
+ HashTable<string,Variant> props,
+ string service_name,
+ string host_ip)
+ throws GLib.Error {
yield this.set_visual_metadata (video, props, service_name, host_ip);
this.set_audio_metadata (video, props, service_name, host_ip);
}
diff --git a/src/plugins/media-export/rygel-media-export-database.vala b/src/plugins/media-export/rygel-media-export-database.vala
index cb671f8..373fa9c 100644
--- a/src/plugins/media-export/rygel-media-export-database.vala
+++ b/src/plugins/media-export/rygel-media-export-database.vala
@@ -111,10 +111,10 @@ internal class Rygel.MediaExport.Database : Object {
debug ("Using database file %s", db_file);
var rc = Sqlite.Database.open (db_file, out this.db);
if (rc != Sqlite.OK) {
- throw new DatabaseError.IO_ERROR (
- _("Failed to open database: %d (%s)"),
- rc,
- db.errmsg ());
+ throw new DatabaseError.IO_ERROR
+ (_("Failed to open database: %d (%s)"),
+ rc,
+ db.errmsg ());
}
this.db.exec ("PRAGMA cache_size = 32768");
diff --git a/src/plugins/media-export/rygel-media-export-db-container.vala b/src/plugins/media-export/rygel-media-export-db-container.vala
index 61f97a9..4357573 100644
--- a/src/plugins/media-export/rygel-media-export-db-container.vala
+++ b/src/plugins/media-export/rygel-media-export-db-container.vala
@@ -69,12 +69,12 @@ public class Rygel.MediaExport.DBContainer : MediaContainer, WritableContainer {
MediaObjects children = null;
try {
- children = this.media_db.get_objects_by_search_expression (
- expression,
- this.id,
- offset,
- max_count,
- out total_matches);
+ children = this.media_db.get_objects_by_search_expression
+ (expression,
+ this.id,
+ offset,
+ max_count,
+ out total_matches);
} catch (MediaCacheError error) {
if (error is MediaCacheError.UNSUPPORTED_SEARCH) {
children = yield base.search (expression,
diff --git a/src/plugins/media-export/rygel-media-export-harvesting-task.vala b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
index 31104f0..1dc88f1 100644
--- a/src/plugins/media-export/rygel-media-export-harvesting-task.vala
+++ b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
@@ -96,11 +96,11 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
*/
public async void run () {
try {
- var info = yield this.origin.query_info_async (
- HARVESTER_ATTRIBUTES,
- FileQueryInfoFlags.NONE,
- Priority.DEFAULT,
- this.cancellable);
+ var info = yield this.origin.query_info_async
+ (HARVESTER_ATTRIBUTES,
+ FileQueryInfoFlags.NONE,
+ Priority.DEFAULT,
+ this.cancellable);
if (this.process_file (this.origin, info, this.parent)) {
if (info.get_file_type () != FileType.DIRECTORY) {
@@ -141,8 +141,8 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
int64 size;
try {
if (this.cache.exists (file, out timestamp, out size)) {
- int64 mtime = (int64) info.get_attribute_uint64 (
- FILE_ATTRIBUTE_TIME_MODIFIED);
+ int64 mtime = (int64) info.get_attribute_uint64
+ (FILE_ATTRIBUTE_TIME_MODIFIED);
if (mtime > timestamp ||
info.get_size () != size) {
@@ -216,11 +216,11 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
private async void enumerate_directory () {
var directory = (this.containers.peek_head () as DummyContainer).file;
try {
- var enumerator = yield directory.enumerate_children_async (
- HARVESTER_ATTRIBUTES,
- FileQueryInfoFlags.NONE,
- Priority.DEFAULT,
- this.cancellable);
+ var enumerator = yield directory.enumerate_children_async
+ (HARVESTER_ATTRIBUTES,
+ FileQueryInfoFlags.NONE,
+ Priority.DEFAULT,
+ this.cancellable);
GLib.List<FileInfo> list = null;
do {
@@ -338,8 +338,8 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
string content_type = info.get_content_type ();
string mime = ContentType.get_mime_type (content_type);
uint64 size = info.get_size ();
- uint64 mtime = info.get_attribute_uint64 (
- FILE_ATTRIBUTE_TIME_MODIFIED);
+ uint64 mtime = info.get_attribute_uint64
+ (FILE_ATTRIBUTE_TIME_MODIFIED);
this.on_extracted_cb (file, null, mime, size, mtime);
} catch (Error error) {
debug ("Could not get basic file information for %s: %s." +
diff --git a/src/plugins/media-export/rygel-media-export-media-cache.vala b/src/plugins/media-export/rygel-media-export-media-cache.vala
index ff8faa4..582b354 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache.vala
@@ -98,10 +98,11 @@ public class Rygel.MediaExport.MediaCache : Object {
Database.RowCallback cb = (statement) => {
var parent_container = parent as MediaContainer;
- var object = get_object_from_statement (
- parent_container,
- statement.column_text (DetailColumn.ID),
- statement);
+ var id = statement.column_text (DetailColumn.ID);
+ var object = get_object_from_statement
+ (parent_container,
+ id,
+ statement);
object.parent_ref = parent_container;
parent = object;
@@ -117,9 +118,9 @@ public class Rygel.MediaExport.MediaCache : Object {
throws DatabaseError, MediaCacheError {
var object = get_object (item_id);
if (object != null && !(object is MediaItem)) {
- throw new MediaCacheError.INVALID_TYPE (
- _("Object %s is not an item"),
- item_id);
+ throw new MediaCacheError.INVALID_TYPE
+ (_("Object %s is not an item"),
+ item_id);
}
return object as MediaItem;
@@ -212,13 +213,13 @@ public class Rygel.MediaExport.MediaCache : Object {
}
}
- public MediaObjects get_objects_by_search_expression (
- SearchExpression? expression,
- string container_id,
- uint offset,
- uint max_count,
- out uint total_matches)
- throws Error {
+ public MediaObjects get_objects_by_search_expression
+ (SearchExpression? expression,
+ string container_id,
+ uint offset,
+ uint max_count,
+ out uint total_matches)
+ throws Error {
var args = new GLib.ValueArray (0);
var filter = this.translate_search_expression (expression, args);
@@ -243,10 +244,10 @@ public class Rygel.MediaExport.MediaCache : Object {
max_objects);
}
- public long get_object_count_by_search_expression (
- SearchExpression? expression,
- string container_id)
- throws Error {
+ public long get_object_count_by_search_expression
+ (SearchExpression? expression,
+ string container_id)
+ throws Error {
var args = new GLib.ValueArray (0);
var filter = this.translate_search_expression (expression, args);
@@ -264,11 +265,11 @@ public class Rygel.MediaExport.MediaCache : Object {
container_id);
}
- public long get_object_count_by_filter (
- string filter,
- GLib.ValueArray args,
- string container_id)
- throws Error {
+ public long get_object_count_by_filter
+ (string filter,
+ GLib.ValueArray args,
+ string container_id)
+ throws Error {
GLib.Value v = container_id;
args.prepend (v);
long count = 0;
@@ -281,8 +282,8 @@ public class Rygel.MediaExport.MediaCache : Object {
return false;
};
- unowned string sql = this.sql.make (
- SQLString.GET_OBJECT_COUNT_BY_FILTER);
+ unowned string sql = this.sql.make
+ (SQLString.GET_OBJECT_COUNT_BY_FILTER);
this.db.exec (sql.printf (filter),
args.values,
@@ -526,13 +527,11 @@ public class Rygel.MediaExport.MediaCache : Object {
Statement statement) {
MediaObject object = null;
switch (statement.column_int (DetailColumn.TYPE)) {
+ var title = statement.column_text (DetailColumn.TITLE);
+
case 0:
// this is a container
- object = factory.get_container (this,
- object_id,
- statement.column_text (
- DetailColumn.TITLE),
- 0);
+ object = factory.get_container (this, object_id, title, 0);
var container = object as MediaContainer;
var uri = statement.column_text (DetailColumn.URI);
@@ -546,8 +545,7 @@ public class Rygel.MediaExport.MediaCache : Object {
object = factory.get_item (this,
parent,
object_id,
- statement.column_text (
- DetailColumn.TITLE),
+ title,
upnp_class);
fill_item (statement, object as MediaItem);
@@ -576,18 +574,21 @@ public class Rygel.MediaExport.MediaCache : Object {
if (item is AudioItem) {
var audio_item = item as AudioItem;
- audio_item.duration = (long) statement.column_int64 (DetailColumn.DURATION);
+ audio_item.duration = (long) statement.column_int64
+ (DetailColumn.DURATION);
audio_item.bitrate = statement.column_int (DetailColumn.BITRATE);
- audio_item.sample_freq = statement.column_int (DetailColumn.SAMPLE_FREQ);
- audio_item.bits_per_sample = statement.column_int (
- DetailColumn.BITS_PER_SAMPLE);
+ audio_item.sample_freq = statement.column_int
+ (DetailColumn.SAMPLE_FREQ);
+ audio_item.bits_per_sample = statement.column_int
+ (DetailColumn.BITS_PER_SAMPLE);
audio_item.channels = statement.column_int (DetailColumn.CHANNELS);
if (item is MusicItem) {
var music_item = item as MusicItem;
music_item.artist = statement.column_text (DetailColumn.AUTHOR);
music_item.album = statement.column_text (DetailColumn.ALBUM);
music_item.genre = statement.column_text (DetailColumn.GENRE);
- music_item.track_number = statement.column_int (DetailColumn.TRACK);
+ music_item.track_number = statement.column_int
+ (DetailColumn.TRACK);
music_item.lookup_album_art ();
}
}
@@ -596,7 +597,8 @@ public class Rygel.MediaExport.MediaCache : Object {
var visual_item = item as VisualItem;
visual_item.width = statement.column_int (DetailColumn.WIDTH);
visual_item.height = statement.column_int (DetailColumn.HEIGHT);
- visual_item.color_depth = statement.column_int (DetailColumn.COLOR_DEPTH);
+ visual_item.color_depth = statement.column_int
+ (DetailColumn.COLOR_DEPTH);
if (item is VideoItem) {
var video_item = item as VideoItem;
video_item.author = statement.column_text (DetailColumn.AUTHOR);
@@ -620,11 +622,11 @@ public class Rygel.MediaExport.MediaCache : Object {
return children;
}
- private string translate_search_expression (
- SearchExpression? expression,
- ValueArray args,
- string prefix = "WHERE")
- throws Error {
+ private string translate_search_expression
+ (SearchExpression? expression,
+ ValueArray args,
+ string prefix = "WHERE")
+ throws Error {
if (expression == null) {
return "";
}
@@ -642,12 +644,12 @@ public class Rygel.MediaExport.MediaCache : Object {
}
if (expression is LogicalExpression) {
- return this.logical_expression_to_sql (expression as LogicalExpression,
- args);
+ return this.logical_expression_to_sql
+ (expression as LogicalExpression, args);
} else {
- return this.relational_expression_to_sql (
- expression as RelationalExpression,
- args);
+ return this.relational_expression_to_sql
+ (expression as RelationalExpression,
+ args);
}
}
@@ -755,10 +757,8 @@ public class Rygel.MediaExport.MediaCache : Object {
case SearchCriteriaOp.GREATER:
case SearchCriteriaOp.GEQ:
v = exp.operand2;
- operator = new SqlOperator.from_search_criteria_op (
- exp.op,
- column,
- collate);
+ operator = new SqlOperator.from_search_criteria_op
+ (exp.op, column, collate);
break;
case SearchCriteriaOp.CONTAINS:
operator = new SqlOperator ("LIKE", column);
@@ -784,13 +784,13 @@ public class Rygel.MediaExport.MediaCache : Object {
return operator.to_string ();
}
- public Gee.List<string> get_meta_data_column_by_filter (
- string column,
- string filter,
- GLib.ValueArray args,
- long offset,
- long max_count)
- throws Error {
+ public Gee.List<string> get_meta_data_column_by_filter
+ (string column,
+ string filter,
+ GLib.ValueArray args,
+ long offset,
+ long max_count)
+ throws Error {
GLib.Value v = offset;
args.append (v);
v = max_count;
@@ -811,12 +811,12 @@ public class Rygel.MediaExport.MediaCache : Object {
return data;
}
- public Gee.List<string> get_object_attribute_by_search_expression (
- string attribute,
- SearchExpression? expression,
- long offset,
- uint max_count)
- throws Error {
+ public Gee.List<string> get_object_attribute_by_search_expression
+ (string attribute,
+ SearchExpression? expression,
+ long offset,
+ uint max_count)
+ throws Error {
var args = new ValueArray (0);
var filter = this.translate_search_expression (expression,
args,
diff --git a/src/plugins/media-export/rygel-media-export-query-container.vala b/src/plugins/media-export/rygel-media-export-query-container.vala
index c159936..48c3f38 100644
--- a/src/plugins/media-export/rygel-media-export-query-container.vala
+++ b/src/plugins/media-export/rygel-media-export-query-container.vala
@@ -83,15 +83,15 @@ internal class Rygel.MediaExport.QueryContainer : DBContainer {
private int count_children () {
try {
if (this.pattern == "") {
- return (int) this.media_db.get_object_count_by_search_expression (
- this.expression,
- RootContainer.FILESYSTEM_FOLDER_ID);
+ return (int) this.media_db.get_object_count_by_search_expression
+ (this.expression,
+ RootContainer.FILESYSTEM_FOLDER_ID);
} else {
- var data = this.media_db.get_object_attribute_by_search_expression (
- this.attribute,
- this.expression,
- 0,
- -1);
+ var data = this.media_db.get_object_attribute_by_search_expression
+ (this.attribute,
+ this.expression,
+ 0,
+ -1);
return data.size;
}
@@ -121,12 +121,12 @@ internal class Rygel.MediaExport.QueryContainer : DBContainer {
}
try {
- children = this.media_db.get_objects_by_search_expression (
- combined_expression,
- RootContainer.FILESYSTEM_FOLDER_ID,
- offset,
- max_count,
- out total_matches);
+ children = this.media_db.get_objects_by_search_expression
+ (combined_expression,
+ RootContainer.FILESYSTEM_FOLDER_ID,
+ offset,
+ max_count,
+ out total_matches);
} catch (MediaCacheError error) {
if (error is MediaCacheError.UNSUPPORTED_SEARCH) {
children = new MediaObjects ();
@@ -156,11 +156,11 @@ internal class Rygel.MediaExport.QueryContainer : DBContainer {
cancellable);
} else {
children = new MediaObjects ();
- var data = this.media_db.get_object_attribute_by_search_expression (
- this.attribute,
- this.expression,
- offset,
- max_count);
+ var data = this.media_db.get_object_attribute_by_search_expression
+ (this.attribute,
+ this.expression,
+ offset,
+ max_count);
foreach (var meta_data in data) {
var new_id = Uri.escape_string (meta_data, "", true);
// pattern contains URL escaped text. This means it might
diff --git a/src/plugins/media-export/rygel-media-export-recursive-file-monitor.vala b/src/plugins/media-export/rygel-media-export-recursive-file-monitor.vala
index 341d72d..65b4469 100644
--- a/src/plugins/media-export/rygel-media-export-recursive-file-monitor.vala
+++ b/src/plugins/media-export/rygel-media-export-recursive-file-monitor.vala
@@ -61,15 +61,15 @@ public class Rygel.MediaExport.RecursiveFileMonitor : Object {
public async void add (File file) {
try {
- var info = yield file.query_info_async (
- FILE_ATTRIBUTE_STANDARD_TYPE,
- FileQueryInfoFlags.NONE,
- Priority.DEFAULT,
- null);
+ var info = yield file.query_info_async
+ (FILE_ATTRIBUTE_STANDARD_TYPE,
+ FileQueryInfoFlags.NONE,
+ Priority.DEFAULT,
+ null);
if (info.get_file_type () == FileType.DIRECTORY) {
- var file_monitor = file.monitor_directory (
- FileMonitorFlags.NONE,
- this.cancellable);
+ var file_monitor = file.monitor_directory
+ (FileMonitorFlags.NONE,
+ this.cancellable);
this.monitors.set (file, file_monitor);
file_monitor.changed.connect (this.on_monitor_changed);
}
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
index 0ccfe1b..ffea4cd 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -137,8 +137,8 @@ public class Rygel.MediaExport.RootContainer : Rygel.MediaExport.DBContainer {
if (expression is RelationalExpression) {
var relational_expression = expression as RelationalExpression;
- query_container = search_to_virtual_container (
- relational_expression);
+ query_container = search_to_virtual_container
+ (relational_expression);
upnp_class = relational_expression.operand2;
} else if (is_search_in_virtual_container (expression,
out query_container)) {
@@ -255,9 +255,8 @@ public class Rygel.MediaExport.RootContainer : Rygel.MediaExport.DBContainer {
* @note This works single level only. Enough to satisfy Xbox music
* browsing, but may need refinement
*/
- private bool is_search_in_virtual_container (
- SearchExpression expression,
- out MediaContainer container) {
+ private bool is_search_in_virtual_container (SearchExpression expression,
+ out MediaContainer container) {
RelationalExpression virtual_expression = null;
QueryContainer query_container;
@@ -289,9 +288,8 @@ public class Rygel.MediaExport.RootContainer : Rygel.MediaExport.DBContainer {
virtual_expression = right_expression;
}
- var last_argument = query_container.plaintext_id.replace (
- QueryContainer.PREFIX,
- "");
+ var last_argument = query_container.plaintext_id.replace
+ (QueryContainer.PREFIX, "");
var escaped_detail = Uri.escape_string (virtual_expression.operand2,
"",
@@ -400,11 +398,11 @@ public class Rygel.MediaExport.RootContainer : Rygel.MediaExport.DBContainer {
this.media_db.save_container (query_container);
}
- private void add_virtual_containers_for_class (
- string parent,
- string item_class,
- FolderDefinition[]? definitions = null)
- throws Error {
+ private void add_virtual_containers_for_class
+ (string parent,
+ string item_class,
+ FolderDefinition[]? definitions = null)
+ throws Error {
var container = new NullContainer ();
container.parent = this;
container.title = parent;
diff --git a/src/plugins/mediathek/rygel-mediathek-asx-playlist.vala b/src/plugins/mediathek/rygel-mediathek-asx-playlist.vala
index 17456c8..0abf5ad 100644
--- a/src/plugins/mediathek/rygel-mediathek-asx-playlist.vala
+++ b/src/plugins/mediathek/rygel-mediathek-asx-playlist.vala
@@ -89,18 +89,18 @@ public class Rygel.Mediathek.AsxPlaylist : Object {
}
}
else {
- throw new AsxPlaylistError.XML_ERROR (
- "Could not fetch XML");
+ throw new AsxPlaylistError.XML_ERROR
+ ("Could not fetch XML");
}
}
catch (RegexError error) { }
}
else {
- throw new AsxPlaylistError.NETWORK_ERROR (
- "Playlist download failed: %u (%s)",
- message.status_code,
- Soup.status_get_phrase (
- message.status_code));
+ throw new AsxPlaylistError.NETWORK_ERROR
+ ("Playlist download failed: %u (%s)",
+ message.status_code,
+ Soup.status_get_phrase
+ (message.status_code));
}
}
}
diff --git a/src/plugins/mediathek/rygel-mediathek-video-item.vala b/src/plugins/mediathek/rygel-mediathek-video-item.vala
index 4deb7bf..831b434 100644
--- a/src/plugins/mediathek/rygel-mediathek-video-item.vala
+++ b/src/plugins/mediathek/rygel-mediathek-video-item.vala
@@ -58,13 +58,13 @@ public class Rygel.Mediathek.VideoItem : Rygel.VideoItem {
}
}
else {
- throw new VideoItemError.XML_PARSE_ERROR (
- "group node has no 'url' property");
+ throw new VideoItemError.XML_PARSE_ERROR
+ ("group node has no 'url' property");
}
}
else {
- throw new VideoItemError.XML_PARSE_ERROR (
- "invalid or no namespace");
+ throw new VideoItemError.XML_PARSE_ERROR
+ ("invalid or no namespace");
}
return asx;
@@ -107,14 +107,14 @@ public class Rygel.Mediathek.VideoItem : Rygel.VideoItem {
}
if (title == null) {
- throw new VideoItemError.XML_PARSE_ERROR (
- "Could not find title");
+ throw new VideoItemError.XML_PARSE_ERROR
+ ("Could not find title");
}
if (asx == null) {
- throw new VideoItemError.XML_PARSE_ERROR (
- "Could not find URIs");
+ throw new VideoItemError.XML_PARSE_ERROR
+ ("Could not find URIs");
}
video_item = new VideoItem (parent, title);
diff --git a/src/plugins/tracker/rygel-tracker-insertion-query.vala b/src/plugins/tracker/rygel-tracker-insertion-query.vala
index 5d29a7e..27b7c1b 100644
--- a/src/plugins/tracker/rygel-tracker-insertion-query.vala
+++ b/src/plugins/tracker/rygel-tracker-insertion-query.vala
@@ -52,10 +52,10 @@ public class Rygel.Tracker.InsertionQuery : Query {
"nie:url",
"\"" + item.uris[0] + "\""));
if (item.size > 0) {
- triplets.add (new QueryTriplet (
- QUERY_ID,
- "nfo:fileSize",
- "\"" + item.size.to_string () + "\""));
+ triplets.add (new QueryTriplet
+ (QUERY_ID,
+ "nfo:fileSize",
+ "\"" + item.size.to_string () + "\""));
}
var now = TimeVal ();
diff --git a/src/plugins/tracker/rygel-tracker-interfaces.vala b/src/plugins/tracker/rygel-tracker-interfaces.vala
index 1b29bf3..0ef9745 100644
--- a/src/plugins/tracker/rygel-tracker-interfaces.vala
+++ b/src/plugins/tracker/rygel-tracker-interfaces.vala
@@ -38,8 +38,8 @@ public interface Rygel.Tracker.ResourcesIface: DBusProxy {
public abstract async string[,] sparql_query (string query)
throws IOError;
public abstract async void sparql_update (string query) throws IOError;
- public abstract async HashTable<string,string>[,] sparql_update_blank (
- string query) throws IOError;
+ public abstract async HashTable<string,string>[,] sparql_update_blank
+ (string query) throws IOError;
public signal void graph_updated (string class_name,
Event[] deletes,
diff --git a/src/plugins/tracker/rygel-tracker-music-item-factory.vala b/src/plugins/tracker/rygel-tracker-music-item-factory.vala
index 2db4f97..f6c4805 100644
--- a/src/plugins/tracker/rygel-tracker-music-item-factory.vala
+++ b/src/plugins/tracker/rygel-tracker-music-item-factory.vala
@@ -61,8 +61,8 @@ public class Rygel.Tracker.MusicItemFactory : ItemFactory {
this.key_chains[MusicMetadata.AUDIO_GENRE].add ("nfo:genre");
this.key_chains[MusicMetadata.SAMPLE_RATE].add ("nfo:sampleRate");
this.key_chains[MusicMetadata.CHANNELS].add ("nfo:channels");
- this.key_chains[MusicMetadata.BITS_PER_SAMPLE].add (
- "nfo:bitsPerSample");
+ this.key_chains[MusicMetadata.BITS_PER_SAMPLE].add
+ ("nfo:bitsPerSample");
this.key_chains[MusicMetadata.BITRATE].add ("nfo:averageBitrate");
}
diff --git a/src/rygel/rygel-audio-item.vala b/src/rygel/rygel-audio-item.vala
index 6b6f5b5..04f8709 100644
--- a/src/rygel/rygel-audio-item.vala
+++ b/src/rygel/rygel-audio-item.vala
@@ -48,12 +48,12 @@ public class Rygel.AudioItem : MediaItem {
return true;
}
- internal override DIDLLiteResource add_resource (
- DIDLLiteItem didl_item,
- string? uri,
- string protocol,
- string? import_uri = null)
- throws Error {
+ internal override DIDLLiteResource add_resource
+ (DIDLLiteItem didl_item,
+ string? uri,
+ string protocol,
+ string? import_uri = null)
+ throws Error {
var res = base.add_resource (didl_item, uri, protocol, import_uri);
res.duration = this.duration;
diff --git a/src/rygel/rygel-av-transport.vala b/src/rygel/rygel-av-transport.vala
index 944a491..4af2adf 100644
--- a/src/rygel/rygel-av-transport.vala
+++ b/src/rygel/rygel-av-transport.vala
@@ -140,15 +140,15 @@ internal class Rygel.AVTransport : Service {
query_variable["LastChange"].connect (this.query_last_change_cb);
- action_invoked["SetAVTransportURI"].connect (
- this.set_av_transport_uri_cb);
+ action_invoked["SetAVTransportURI"].connect
+ (this.set_av_transport_uri_cb);
action_invoked["GetMediaInfo"].connect (this.get_media_info_cb);
action_invoked["GetTransportInfo"].connect (this.get_transport_info_cb);
action_invoked["GetPositionInfo"].connect (this.get_position_info_cb);
- action_invoked["GetDeviceCapabilities"].connect (
- this.get_device_capabilities_cb);
- action_invoked["GetTransportSettings"].connect (
- this.get_transport_settings_cb);
+ action_invoked["GetDeviceCapabilities"].connect
+ (this.get_device_capabilities_cb);
+ action_invoked["GetTransportSettings"].connect
+ (this.get_transport_settings_cb);
action_invoked["Stop"].connect (this.stop_cb);
action_invoked["Play"].connect (this.play_cb);
action_invoked["Pause"].connect (this.pause_cb);
diff --git a/src/rygel/rygel-browse.vala b/src/rygel/rygel-browse.vala
index fe4a8a2..8384636 100644
--- a/src/rygel/rygel-browse.vala
+++ b/src/rygel/rygel-browse.vala
@@ -59,13 +59,14 @@ internal class Rygel.Browse: Rygel.MediaQueryAction {
this.browse_flag == "BrowseMetadata") {
this.fetch_metadata = true;
} else {
- throw new ContentDirectoryError.INVALID_ARGS (
- _("Invalid Arguments"));
+ throw new ContentDirectoryError.INVALID_ARGS
+ (_("Invalid Arguments"));
}
}
- protected override async MediaObjects fetch_results (
- MediaObject media_object) throws Error {
+ protected override async MediaObjects fetch_results
+ (MediaObject media_object)
+ throws Error {
if (this.fetch_metadata) {
// BrowseMetadata
return this.handle_metadata_request (media_object);
@@ -85,12 +86,12 @@ internal class Rygel.Browse: Rygel.MediaQueryAction {
return results;
}
- private async MediaObjects handle_children_request (
- MediaObject media_object)
- throws Error {
+ private async MediaObjects handle_children_request
+ (MediaObject media_object)
+ throws Error {
if (!(media_object is MediaContainer)) {
- throw new ContentDirectoryError.NO_SUCH_OBJECT (
- _("No such object"));
+ throw new ContentDirectoryError.NO_SUCH_OBJECT
+ (_("No such object"));
}
var container = (MediaContainer) media_object;
diff --git a/src/rygel/rygel-connection-manager.vala b/src/rygel/rygel-connection-manager.vala
index 2277b39..1a68c8f 100644
--- a/src/rygel/rygel-connection-manager.vala
+++ b/src/rygel/rygel-connection-manager.vala
@@ -47,19 +47,19 @@ internal class Rygel.ConnectionManager : Service {
this.source_protocol_info = "";
this.connection_ids = "0";
- this.query_variable["SourceProtocolInfo"].connect (
- this.query_source_protocol_info_cb);
- this.query_variable["SinkProtocolInfo"].connect (
- this.query_sink_protocol_info_cb);
- this.query_variable["CurrentConnectionIDs"].connect (
- this.query_current_connection_ids_cb);
-
- this.action_invoked["GetProtocolInfo"].connect (
- this.get_protocol_info_cb);
- this.action_invoked["GetCurrentConnectionIDs"].connect (
- this.get_current_connection_ids_cb);
- this.action_invoked["GetCurrentConnectionInfo"].connect (
- this.get_current_connection_info_cb);
+ this.query_variable["SourceProtocolInfo"].connect
+ (this.query_source_protocol_info_cb);
+ this.query_variable["SinkProtocolInfo"].connect
+ (this.query_sink_protocol_info_cb);
+ this.query_variable["CurrentConnectionIDs"].connect
+ (this.query_current_connection_ids_cb);
+
+ this.action_invoked["GetProtocolInfo"].connect
+ (this.get_protocol_info_cb);
+ this.action_invoked["GetCurrentConnectionIDs"].connect
+ (this.get_current_connection_ids_cb);
+ this.action_invoked["GetCurrentConnectionInfo"].connect
+ (this.get_current_connection_info_cb);
}
private void query_source_protocol_info_cb (Service cm,
diff --git a/src/rygel/rygel-gst-utils.vala b/src/rygel/rygel-gst-utils.vala
index 31c8e62..b7927f8 100644
--- a/src/rygel/rygel-gst-utils.vala
+++ b/src/rygel/rygel-gst-utils.vala
@@ -34,9 +34,9 @@ internal abstract class Rygel.GstUtils {
throws Error {
Element element = ElementFactory.make (factoryname, name);
if (element == null) {
- throw new GstError.MISSING_PLUGIN (
- _("Required element %s missing"),
- factoryname);
+ throw new GstError.MISSING_PLUGIN
+ (_("Required element %s missing"),
+ factoryname);
}
return element;
@@ -83,9 +83,9 @@ internal abstract class Rygel.GstUtils {
return structure.get_name () == "application/x-rtp";
}
- private static dynamic Element? get_best_depay (
- GLib.List<PluginFeature> features,
- Caps caps) {
+ private static dynamic Element? get_best_depay
+ (GLib.List<PluginFeature> features,
+ Caps caps) {
var relevant_factories = new GLib.List<ElementFactory> ();
// First construct a list of relevant factories
diff --git a/src/rygel/rygel-http-byte-seek.vala b/src/rygel/rygel-http-byte-seek.vala
index 86a6c47..b220a65 100644
--- a/src/rygel/rygel-http-byte-seek.vala
+++ b/src/rygel/rygel-http-byte-seek.vala
@@ -64,9 +64,8 @@ internal class Rygel.HTTPByteSeek : Rygel.HTTPSeek {
if (pos[0].isdigit ()) {
stop = pos.to_int64 ();
if (stop < start) {
- throw new HTTPSeekError.INVALID_RANGE (
- _("Invalid Range '%s'"),
- range);
+ throw new HTTPSeekError.INVALID_RANGE
+ (_("Invalid Range '%s'"), range);
}
} else if (pos != "") {
throw new HTTPSeekError.INVALID_RANGE (_("Invalid Range '%s'"),
diff --git a/src/rygel/rygel-http-get-handler.vala b/src/rygel/rygel-http-get-handler.vala
index 1061e36..36a0191 100644
--- a/src/rygel/rygel-http-get-handler.vala
+++ b/src/rygel/rygel-http-get-handler.vala
@@ -63,11 +63,11 @@ internal abstract class Rygel.HTTPGetHandler: GLib.Object {
// Handle Samsung DLNA TV proprietary subtitle headers
if (request.msg.request_headers.get_one ("getCaptionInfo.sec") != null
&& (request.item as VideoItem).subtitles.size > 0) {
- var caption_uri = request.http_server.create_uri_for_item (
- request.item,
- -1,
- 0, // FIXME: offer first subtitle only?
- null);
+ var caption_uri = request.http_server.create_uri_for_item
+ (request.item,
+ -1,
+ 0, // FIXME: offer first subtitle only?
+ null);
request.msg.response_headers.append ("CaptionInfo.sec",
caption_uri);
diff --git a/src/rygel/rygel-http-get.vala b/src/rygel/rygel-http-get.vala
index 87e152f..3fac36a 100644
--- a/src/rygel/rygel-http-get.vala
+++ b/src/rygel/rygel-http-get.vala
@@ -50,8 +50,8 @@ internal class Rygel.HTTPGet : HTTPRequest {
}
protected override async void handle () throws Error {
- var header = this.msg.request_headers.get_one (
- "getcontentFeatures.dlna.org");
+ var header = this.msg.request_headers.get_one
+ ("getcontentFeatures.dlna.org");
/* We only entertain 'HEAD' and 'GET' requests */
if ((this.msg.method != "HEAD" && this.msg.method != "GET") ||
@@ -60,8 +60,8 @@ internal class Rygel.HTTPGet : HTTPRequest {
}
if (uri.transcode_target != null) {
- var transcoder = this.http_server.get_transcoder (
- uri.transcode_target);
+ var transcoder = this.http_server.get_transcoder
+ (uri.transcode_target);
this.handler = new HTTPTranscodeHandler (transcoder,
this.cancellable);
}
@@ -91,22 +91,22 @@ internal class Rygel.HTTPGet : HTTPRequest {
} else if (this.item is VisualItem) {
var visual = this.item as VisualItem;
- this.thumbnail = visual.thumbnails.get (
- this.uri.thumbnail_index);
+ this.thumbnail = visual.thumbnails.get
+ (this.uri.thumbnail_index);
} else {
- throw new HTTPRequestError.NOT_FOUND (
- ("No Thumbnail available for item '%s"),
+ throw new HTTPRequestError.NOT_FOUND
+ ("No Thumbnail available for item '%s",
this.item.id);
}
} else if (this.uri.subtitle_index >= 0) {
if (!(this.item is VideoItem)) {
- throw new HTTPRequestError.NOT_FOUND (
- ("No subtitles available for item '%s"),
+ throw new HTTPRequestError.NOT_FOUND
+ ("No subtitles available for item '%s",
this.item.id);
}
- this.subtitle = (this.item as VideoItem).subtitles.get (
- this.uri.subtitle_index);
+ this.subtitle = (this.item as VideoItem).subtitles.get
+ (this.uri.subtitle_index);
}
}
@@ -170,10 +170,10 @@ internal class Rygel.HTTPGet : HTTPRequest {
}
if (!correct) {
- throw new HTTPRequestError.UNACCEPTABLE (
- "%s mode not supported for '%s'",
- mode,
- this.item.id);
+ throw new HTTPRequestError.UNACCEPTABLE
+ ("%s mode not supported for '%s'",
+ mode,
+ this.item.id);
}
}
}
diff --git a/src/rygel/rygel-http-identity-handler.vala b/src/rygel/rygel-http-identity-handler.vala
index e519aa4..1dc9c23 100644
--- a/src/rygel/rygel-http-identity-handler.vala
+++ b/src/rygel/rygel-http-identity-handler.vala
@@ -105,9 +105,9 @@ internal class Rygel.HTTPIdentityHandler : Rygel.HTTPGetHandler {
this.cancellable);
} else {
if (item.uris.size == 0) {
- throw new HTTPRequestError.NOT_FOUND (
- _("Item '%s' didn't provide a URI"),
- item.id);
+ throw new HTTPRequestError.NOT_FOUND
+ (_("Item '%s' didn't provide a URI"),
+ item.id);
}
return new SeekableResponse (request.server,
diff --git a/src/rygel/rygel-http-post.vala b/src/rygel/rygel-http-post.vala
index 5b6a271..9098a7a 100644
--- a/src/rygel/rygel-http-post.vala
+++ b/src/rygel/rygel-http-post.vala
@@ -65,17 +65,17 @@ internal class Rygel.HTTPPost : HTTPRequest {
this.file = yield this.item.get_writable (this.cancellable);
if (this.file == null) {
- throw new HTTPRequestError.BAD_REQUEST (
- _("No writable URI for %s available"),
- this.item.id);
+ throw new HTTPRequestError.BAD_REQUEST
+ (_("No writable URI for %s available"),
+ this.item.id);
}
- this.stream = yield this.file.replace_async (
- null,
- false,
- FileCreateFlags.REPLACE_DESTINATION,
- Priority.LOW,
- this.cancellable);
+ this.stream = yield this.file.replace_async
+ (null,
+ false,
+ FileCreateFlags.REPLACE_DESTINATION,
+ Priority.LOW,
+ this.cancellable);
this.server.unpause_message (this.msg);
this.handle_continue = this.handle.callback;
diff --git a/src/rygel/rygel-http-request.vala b/src/rygel/rygel-http-request.vala
index 3973be7..ff265d1 100644
--- a/src/rygel/rygel-http-request.vala
+++ b/src/rygel/rygel-http-request.vala
@@ -74,14 +74,13 @@ internal abstract class Rygel.HTTPRequest : GLib.Object, Rygel.StateMachine {
protected virtual async void find_item () throws Error {
// Fetch the requested item
- var media_object = yield this.root_container.find_object (
- this.uri.item_id,
- null);
+ var media_object = yield this.root_container.find_object
+ (this.uri.item_id, null);
if (media_object == null || !(media_object is MediaItem)) {
- throw new HTTPRequestError.NOT_FOUND (
- _("Requested item '%s' not found"),
- this.uri.item_id);
+ throw new HTTPRequestError.NOT_FOUND
+ (_("Requested item '%s' not found"),
+ this.uri.item_id);
}
this.item = (MediaItem) media_object;
diff --git a/src/rygel/rygel-http-time-seek.vala b/src/rygel/rygel-http-time-seek.vala
index 95c84de..ce30b13 100644
--- a/src/rygel/rygel-http-time-seek.vala
+++ b/src/rygel/rygel-http-time-seek.vala
@@ -65,9 +65,8 @@ internal class Rygel.HTTPTimeSeek : Rygel.HTTPSeek {
if (time[0].isdigit()) {
stop = (int64) (time.to_double () * SECOND);
if (stop < start) {
- throw new HTTPSeekError.INVALID_RANGE (
- _("Invalid Range '%s'"),
- range);
+ throw new HTTPSeekError.INVALID_RANGE
+ (_("Invalid Range '%s'"), range);
}
} else if (time != "") {
throw new HTTPSeekError.INVALID_RANGE (_("Invalid Range '%s'"),
diff --git a/src/rygel/rygel-image-item.vala b/src/rygel/rygel-image-item.vala
index e3626dc..3bdf9b6 100644
--- a/src/rygel/rygel-image-item.vala
+++ b/src/rygel/rygel-image-item.vala
@@ -66,12 +66,12 @@ public class Rygel.ImageItem : MediaItem, VisualItem {
this.add_thumbnail_resources (didl_item, allow_internal);
}
- internal override DIDLLiteResource add_resource (
- DIDLLiteItem didl_item,
- string? uri,
- string protocol,
- string? import_uri = null)
- throws Error {
+ internal override DIDLLiteResource add_resource
+ (DIDLLiteItem didl_item,
+ string? uri,
+ string protocol,
+ string? import_uri = null)
+ throws Error {
var res = base.add_resource (didl_item, uri, protocol, import_uri);
this.add_visual_props (res);
diff --git a/src/rygel/rygel-item-creator.vala b/src/rygel/rygel-item-creator.vala
index b569fc1..8f7d7e7 100644
--- a/src/rygel/rygel-item-creator.vala
+++ b/src/rygel/rygel-item-creator.vala
@@ -141,17 +141,17 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
"Elements", typeof (string), out this.elements);
if (this.elements == null) {
- throw new ContentDirectoryError.BAD_METADATA (
- _("'Elements' argument missing."));
+ throw new ContentDirectoryError.BAD_METADATA
+ (_("'Elements' argument missing."));
} else if (comment_pattern.match_string (this.elements)) {
- throw new ContentDirectoryError.BAD_METADATA (
- _("Comments not allowed in XML"));
+ throw new ContentDirectoryError.BAD_METADATA
+ (_("Comments not allowed in XML"));
}
if (this.container_id == null) {
// Sorry we can't do anything without ContainerID
- throw new ContentDirectoryError.NO_SUCH_OBJECT (
- _("No such object"));
+ throw new ContentDirectoryError.NO_SUCH_OBJECT
+ (_("No such object"));
}
}
@@ -166,28 +166,27 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
uint total_matches;
- var result = yield this.content_dir.root_container.search (
- expression,
- 0,
- 1,
- out total_matches,
- this.cancellable);
+ var result = yield this.content_dir.root_container.search
+ (expression,
+ 0,
+ 1,
+ out total_matches,
+ this.cancellable);
if (result.size > 0) {
media_object = result[0];
}
} else {
- media_object = yield this.content_dir.root_container.find_object (
- this.container_id,
- this.cancellable);
+ media_object = yield this.content_dir.root_container.find_object
+ (this.container_id, this.cancellable);
}
if (media_object == null) {
- throw new ContentDirectoryError.NO_SUCH_OBJECT (
- _("No such object"));
+ throw new ContentDirectoryError.NO_SUCH_OBJECT
+ (_("No such object"));
} else if (!(media_object is MediaContainer) ||
!(OCMFlags.UPLOAD in media_object.ocm_flags)) {
- throw new ContentDirectoryError.RESTRICTED_PARENT (
- _("Object creation in %s not allowed"),
+ throw new ContentDirectoryError.RESTRICTED_PARENT
+ (_("Object creation in %s not allowed"),
media_object.id);
}
@@ -246,9 +245,9 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
case MusicItem.UPNP_CLASS:
return new MusicItem (id, parent, title);
default:
- throw new ContentDirectoryError.BAD_METADATA (
- "Creation of item of class '%s' " +
- "not supported.",
+ throw new ContentDirectoryError.BAD_METADATA
+ ("Creation of item of class '%s' " +
+ "not supported.",
upnp_class);
}
}
@@ -275,9 +274,9 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
throws Error {
var dir = yield container.get_writable (this.cancellable);
if (dir == null) {
- throw new ContentDirectoryError.RESTRICTED_PARENT (
- _("Object creation in %s not allowed"),
- container.id);
+ throw new ContentDirectoryError.RESTRICTED_PARENT
+ (_("Object creation in %s not allowed"),
+ container.id);
}
var file = dir.get_child_for_display_name (title);
diff --git a/src/rygel/rygel-item-destroyer.vala b/src/rygel/rygel-item-destroyer.vala
index d29be0c..47686dd 100644
--- a/src/rygel/rygel-item-destroyer.vala
+++ b/src/rygel/rygel-item-destroyer.vala
@@ -49,8 +49,8 @@ internal class Rygel.ItemDestroyer: GLib.Object, Rygel.StateMachine {
this.action.get ("ObjectID", typeof (string), out this.object_id);
if (this.object_id == null) {
// Sorry we can't do anything without the ID
- throw new ContentDirectoryError.NO_SUCH_OBJECT (
- _("No such object"));
+ throw new ContentDirectoryError.NO_SUCH_OBJECT
+ (_("No such object"));
}
yield this.remove_object ();
@@ -91,21 +91,21 @@ internal class Rygel.ItemDestroyer: GLib.Object, Rygel.StateMachine {
}
private async MediaObject fetch_object () throws Error {
- var media_object = yield this.content_dir.root_container.find_object (
- this.object_id,
- this.cancellable);
+ var media_object = yield this.content_dir.root_container.find_object
+ (this.object_id, this.cancellable);
if (media_object == null) {
- throw new ContentDirectoryError.NO_SUCH_OBJECT (
- _("No such object"));
+ throw new ContentDirectoryError.NO_SUCH_OBJECT
+ (_("No such object"));
} else if (!(OCMFlags.DESTROYABLE in media_object.ocm_flags)) {
- throw new ContentDirectoryError.RESTRICTED_OBJECT (
- _("Removal of object %s not allowed"),
- media_object.id);
+ throw new ContentDirectoryError.RESTRICTED_OBJECT
+ (_("Removal of object %s not allowed"),
+ media_object.id);
} else if (media_object.parent.restricted) {
- throw new ContentDirectoryError.RESTRICTED_PARENT (
- _("Object removal from %s not allowed"),
- media_object.id);
+ var msg = _("Object removal from %s not allowed");
+
+ throw new ContentDirectoryError.RESTRICTED_PARENT (msg,
+ media_object.id);
}
return media_object;
diff --git a/src/rygel/rygel-l16-transcoder-bin.vala b/src/rygel/rygel-l16-transcoder-bin.vala
index 2d54a68..685ec4a 100644
--- a/src/rygel/rygel-l16-transcoder-bin.vala
+++ b/src/rygel/rygel-l16-transcoder-bin.vala
@@ -62,10 +62,10 @@ internal class Rygel.L16TranscoderBin : Gst.Bin {
if (new_pad.link (enc_pad) != PadLinkReturn.OK) {
GstUtils.post_error (this,
- new GstError.LINK (
- _("Failed to link pad %s to %s"),
- new_pad.name,
- enc_pad.name));
+ new GstError.LINK
+ (_("Failed to link pad %s to %s"),
+ new_pad.name,
+ enc_pad.name));
return;
}
}
diff --git a/src/rygel/rygel-media-item.vala b/src/rygel/rygel-media-item.vala
index ae62463..9411a31 100644
--- a/src/rygel/rygel-media-item.vala
+++ b/src/rygel/rygel-media-item.vala
@@ -134,12 +134,12 @@ public abstract class Rygel.MediaItem : MediaObject {
(int) transcoder2.get_distance (this);
}
- internal virtual DIDLLiteResource add_resource (
- DIDLLiteItem didl_item,
- string? uri,
- string protocol,
- string? import_uri = null)
- throws Error {
+ internal virtual DIDLLiteResource add_resource
+ (DIDLLiteItem didl_item,
+ string? uri,
+ string protocol,
+ string? import_uri = null)
+ throws Error {
var res = didl_item.add_resource ();
if (uri != null && !this.place_holder) {
diff --git a/src/rygel/rygel-media-query-action.vala b/src/rygel/rygel-media-query-action.vala
index 076350f..a0670c8 100644
--- a/src/rygel/rygel-media-query-action.vala
+++ b/src/rygel/rygel-media-query-action.vala
@@ -113,8 +113,8 @@ internal abstract class Rygel.MediaQueryAction : GLib.Object, StateMachine {
if (this.object_id == null) {
// Sorry we can't do anything without ObjectID
- throw new ContentDirectoryError.NO_SUCH_OBJECT (
- _("No such object"));
+ throw new ContentDirectoryError.NO_SUCH_OBJECT
+ (_("No such object"));
}
if (this.sort_criteria == null) {
@@ -126,20 +126,19 @@ internal abstract class Rygel.MediaQueryAction : GLib.Object, StateMachine {
}
}
- protected abstract async MediaObjects fetch_results (
- MediaObject media_object) throws Error;
+ protected abstract async MediaObjects fetch_results
+ (MediaObject media_object) throws Error;
private async MediaObject fetch_media_object () throws Error {
if (this.object_id == this.root_container.id) {
return this.root_container;
} else {
debug ("searching for object '%s'..", this.object_id);
- var media_object = yield this.root_container.find_object (
- this.object_id,
- this.cancellable);
+ var media_object = yield this.root_container.find_object
+ (this.object_id, this.cancellable);
if (media_object == null) {
- throw new ContentDirectoryError.NO_SUCH_OBJECT (
- _("No such object"));
+ throw new ContentDirectoryError.NO_SUCH_OBJECT
+ (_("No such object"));
}
debug ("object '%s' found.", this.object_id);
diff --git a/src/rygel/rygel-meta-config.vala b/src/rygel/rygel-meta-config.vala
index fd39990..a421606 100644
--- a/src/rygel/rygel-meta-config.vala
+++ b/src/rygel/rygel-meta-config.vala
@@ -299,9 +299,9 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (unavailable) {
- throw new ConfigurationError.NO_VALUE_SET (
- _("No value set for '%s/enabled'"),
- section);
+ throw new ConfigurationError.NO_VALUE_SET
+ (_("No value set for '%s/enabled'"),
+ section);
}
return val;
@@ -318,9 +318,9 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (val == null) {
- throw new ConfigurationError.NO_VALUE_SET (
- _("No value set for '%s/enabled'"),
- section);
+ throw new ConfigurationError.NO_VALUE_SET
+ (_("No value set for '%s/enabled'"),
+ section);
}
return val;
@@ -338,10 +338,10 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (val == null) {
- throw new ConfigurationError.NO_VALUE_SET (
- _("No value available for '%s/%s'"),
- section,
- key);
+ throw new ConfigurationError.NO_VALUE_SET
+ (_("No value available for '%s/%s'"),
+ section,
+ key);
}
return val;
@@ -360,10 +360,10 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (val == null) {
- throw new ConfigurationError.NO_VALUE_SET (
- _("No value available for '%s/%s'"),
- section,
- key);
+ throw new ConfigurationError.NO_VALUE_SET
+ (_("No value available for '%s/%s'"),
+ section,
+ key);
}
return val;
@@ -386,10 +386,10 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (unavailable) {
- throw new ConfigurationError.NO_VALUE_SET (
- _("No value available for '%s/%s'"),
- section,
- key);
+ throw new ConfigurationError.NO_VALUE_SET
+ (_("No value available for '%s/%s'"),
+ section,
+ key);
}
return val;
@@ -408,10 +408,10 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (val == null) {
- throw new ConfigurationError.NO_VALUE_SET (
- _("No value available for '%s/%s'"),
- section,
- key);
+ throw new ConfigurationError.NO_VALUE_SET
+ (_("No value available for '%s/%s'"),
+ section,
+ key);
}
return val;
@@ -432,10 +432,10 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (unavailable) {
- throw new ConfigurationError.NO_VALUE_SET (
- _("No value available for '%s/%s'"),
- section,
- key);
+ throw new ConfigurationError.NO_VALUE_SET
+ (_("No value available for '%s/%s'"),
+ section,
+ key);
}
return val;
diff --git a/src/rygel/rygel-mp3-transcoder.vala b/src/rygel/rygel-mp3-transcoder.vala
index 4069587..96ace8c 100644
--- a/src/rygel/rygel-mp3-transcoder.vala
+++ b/src/rygel/rygel-mp3-transcoder.vala
@@ -84,13 +84,11 @@ internal class Rygel.MP3Transcoder : Rygel.Transcoder {
string? sink_pad_name)
throws Error {
var l16_transcoder = new L16Transcoder (Endianness.LITTLE);
- dynamic Element convert = l16_transcoder.create_encoder (
- item,
- null,
- CONVERT_SINK_PAD);
- dynamic Element encoder = GstUtils.create_element (
- AUDIO_ENCODER[this.layer],
- AUDIO_ENCODER[this.layer]);
+ dynamic Element convert = l16_transcoder.create_encoder
+ (item, null, CONVERT_SINK_PAD);
+ dynamic Element encoder = GstUtils.create_element
+ (AUDIO_ENCODER[this.layer],
+ AUDIO_ENCODER[this.layer]);
dynamic Element parser = GstUtils.create_element (AUDIO_PARSER,
AUDIO_PARSER);
diff --git a/src/rygel/rygel-plugin-loader.vala b/src/rygel/rygel-plugin-loader.vala
index c5805ca..8ee5f8b 100644
--- a/src/rygel/rygel-plugin-loader.vala
+++ b/src/rygel/rygel-plugin-loader.vala
@@ -96,11 +96,11 @@ public class Rygel.PluginLoader : Object {
FileEnumerator enumerator;
try {
- enumerator = yield dir.enumerate_children_async (
- attributes,
- FileQueryInfoFlags.NONE,
- Priority.DEFAULT,
- null);
+ enumerator = yield dir.enumerate_children_async
+ (attributes,
+ FileQueryInfoFlags.NONE,
+ Priority.DEFAULT,
+ null);
infos = yield enumerator.next_files_async (int.MAX,
Priority.DEFAULT,
diff --git a/src/rygel/rygel-relational-expression.vala b/src/rygel/rygel-relational-expression.vala
index c6d1c2d..643b6b3 100644
--- a/src/rygel/rygel-relational-expression.vala
+++ b/src/rygel/rygel-relational-expression.vala
@@ -45,8 +45,8 @@ public class Rygel.RelationalExpression :
return false;
}
- return this.compare_create_class (
- media_object as WritableContainer);
+ return this.compare_create_class
+ (media_object as WritableContainer);
case "dc:creator":
if (!(media_object is PhotoItem)) {
return false;
diff --git a/src/rygel/rygel-search.vala b/src/rygel/rygel-search.vala
index d6a48a5..269b3c5 100644
--- a/src/rygel/rygel-search.vala
+++ b/src/rygel/rygel-search.vala
@@ -47,15 +47,16 @@ internal class Rygel.Search: Rygel.MediaQueryAction {
out this.search_criteria);
if (this.search_criteria == null) {
- throw new ContentDirectoryError.INVALID_ARGS (
- "No search criteria given");
+ throw new ContentDirectoryError.INVALID_ARGS
+ ("No search criteria given");
}
debug ("Executing search request: %s", this.search_criteria);
}
- protected override async MediaObjects fetch_results (
- MediaObject media_object) throws Error {
+ protected override async MediaObjects fetch_results
+ (MediaObject media_object)
+ throws Error {
var container = media_object as MediaContainer;
var parser = new Rygel.SearchCriteriaParser (this.search_criteria);
diff --git a/src/rygel/rygel-subtitle-manager.vala b/src/rygel/rygel-subtitle-manager.vala
index 8ebe825..b47fe78 100644
--- a/src/rygel/rygel-subtitle-manager.vala
+++ b/src/rygel/rygel-subtitle-manager.vala
@@ -62,14 +62,14 @@ internal class Rygel.SubtitleManager : GLib.Object {
null);
if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) {
- throw new SubtitleManagerError.NO_SUBTITLE (
- _("No subtitle available"));
+ throw new SubtitleManagerError.NO_SUBTITLE
+ (_("No subtitle available"));
}
var subtitle = new Subtitle ();
subtitle.uri = srt_file.get_uri ();
- subtitle.size = (int64) info.get_attribute_uint64 (
- FILE_ATTRIBUTE_STANDARD_SIZE);
+ subtitle.size = (int64) info.get_attribute_uint64
+ (FILE_ATTRIBUTE_STANDARD_SIZE);
return subtitle;
}
diff --git a/src/rygel/rygel-thumbnailer.vala b/src/rygel/rygel-thumbnailer.vala
index 90151be..a29f04f 100644
--- a/src/rygel/rygel-thumbnailer.vala
+++ b/src/rygel/rygel-thumbnailer.vala
@@ -102,8 +102,8 @@ internal class Rygel.Thumbnailer : GLib.Object {
null);
if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) {
- throw new ThumbnailerError.NO_THUMBNAIL (
- _("No thumbnail available"));
+ throw new ThumbnailerError.NO_THUMBNAIL
+ (_("No thumbnail available"));
}
thumbnail = new Thumbnail ();
@@ -111,8 +111,8 @@ internal class Rygel.Thumbnailer : GLib.Object {
thumbnail.height = this.template.height;
thumbnail.depth = this.template.depth;
thumbnail.uri = Filename.to_uri (full_path, null);
- thumbnail.size = (int64) info.get_attribute_uint64 (
- FILE_ATTRIBUTE_STANDARD_SIZE);
+ thumbnail.size = (int64) info.get_attribute_uint64
+ (FILE_ATTRIBUTE_STANDARD_SIZE);
return thumbnail;
}
diff --git a/src/rygel/rygel-user-config.vala b/src/rygel/rygel-user-config.vala
index 773f29b..101576c 100644
--- a/src/rygel/rygel-user-config.vala
+++ b/src/rygel/rygel-user-config.vala
@@ -209,9 +209,8 @@ public class Rygel.UserConfig : GLib.Object, Configuration {
var val = this.key_file.get_string (section, key);
if (val == null || val == "") {
- throw new ConfigurationError.NO_VALUE_SET (
- _("No value available for '%s'"),
- key);
+ throw new ConfigurationError.NO_VALUE_SET
+ (_("No value available for '%s'"), key);
}
return val;
@@ -238,9 +237,8 @@ public class Rygel.UserConfig : GLib.Object, Configuration {
int val = this.key_file.get_integer (section, key);
if (val == 0 || val < min || val > max) {
- throw new ConfigurationError.VALUE_OUT_OF_RANGE (
- _("Value of '%s' out of range"),
- key);
+ throw new ConfigurationError.VALUE_OUT_OF_RANGE
+ (_("Value of '%s' out of range"), key);
}
return val;
diff --git a/src/rygel/rygel-video-item.vala b/src/rygel/rygel-video-item.vala
index 734b3e7..0a27b1d 100644
--- a/src/rygel/rygel-video-item.vala
+++ b/src/rygel/rygel-video-item.vala
@@ -88,12 +88,12 @@ public class Rygel.VideoItem : AudioItem, VisualItem {
add_thumbnail_resources (didl_item, allow_internal);
}
- internal override DIDLLiteResource add_resource (
- DIDLLiteItem didl_item,
- string? uri,
- string protocol,
- string? import_uri = null)
- throws Error {
+ internal override DIDLLiteResource add_resource
+ (DIDLLiteItem didl_item,
+ string? uri,
+ string protocol,
+ string? import_uri = null)
+ throws Error {
var res = base.add_resource (didl_item, uri, protocol, import_uri);
this.add_visual_props (res);
diff --git a/src/ui/rygel-general-pref-section.vala b/src/ui/rygel-general-pref-section.vala
index 9f6ec67..07ad69c 100644
--- a/src/ui/rygel-general-pref-section.vala
+++ b/src/ui/rygel-general-pref-section.vala
@@ -95,10 +95,10 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
this.trans_check.toggled.connect (this.on_trans_check_toggled);
- this.context_manager.context_available.connect (
- this.on_context_available);
- this.context_manager.context_unavailable.connect (
- this.on_context_unavailable);
+ this.context_manager.context_available.connect
+ (this.on_context_available);
+ this.context_manager.context_unavailable.connect
+ (this.on_context_unavailable);
// Set the sensitivity of dependent widgets
on_trans_check_toggled (this.trans_check);
diff --git a/tests/rygel-http-time-seek-test.vala b/tests/rygel-http-time-seek-test.vala
index afe493c..da74f56 100644
--- a/tests/rygel-http-time-seek-test.vala
+++ b/tests/rygel-http-time-seek-test.vala
@@ -186,8 +186,8 @@ private class Rygel.HTTPTimeSeekTest : GLib.Object {
var audio_item = request.item as AudioItem;
assert (seek.total_length == audio_item.duration * SECOND);
- var header = request.msg.response_headers.get_one (
- "TimeSeekRange.dlna.org");
+ var header = request.msg.response_headers.get_one
+ ("TimeSeekRange.dlna.org");
assert (header != null);
assert (this.range_regex.match (header));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]