[rygel] core: Move get_writable method to MediaObject
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Move get_writable method to MediaObject
- Date: Wed, 17 Feb 2010 13:40:34 +0000 (UTC)
commit 04b7751cf1b2309bc932f1eea7137a538192bb64
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Feb 1 16:55:57 2010 +0200
core: Move get_writable method to MediaObject
Move get_writable method from MediaContainer to MediaObject.
src/rygel/rygel-media-container.vala | 22 ----------------------
src/rygel/rygel-media-object.vala | 22 ++++++++++++++++++++++
2 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/rygel/rygel-media-container.vala b/src/rygel/rygel-media-container.vala
index 0dd0677..9cbff1e 100644
--- a/src/rygel/rygel-media-container.vala
+++ b/src/rygel/rygel-media-container.vala
@@ -277,27 +277,5 @@ public abstract class Rygel.MediaContainer : MediaObject {
this.parent.container_updated (updated_container);
}
}
-
- /**
- * Fetches a File object for any writable URI available for this container.
- *
- * @param cancellable A GLib.Cancellable
- */
- private async File? get_writable (Cancellable? cancellable) throws Error {
- foreach (var uri in this.uris) {
- var file = File.new_for_uri (uri);
-
- var info = yield file.query_info_async (
- FILE_ATTRIBUTE_ACCESS_CAN_WRITE,
- FileQueryInfoFlags.NONE,
- Priority.DEFAULT,
- cancellable);
- if (info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) {
- return file;
- }
- }
-
- return null;
- }
}
diff --git a/src/rygel/rygel-media-object.vala b/src/rygel/rygel-media-object.vala
index e142022..01c5881 100644
--- a/src/rygel/rygel-media-object.vala
+++ b/src/rygel/rygel-media-object.vala
@@ -62,4 +62,26 @@ public abstract class Rygel.MediaObject : GLib.Object {
construct {
uris = new ArrayList<string> ();
}
+
+ /**
+ * Fetches a File object for any writable URI available for this object.
+ *
+ * @param cancellable A GLib.Cancellable
+ */
+ public async File? get_writable (Cancellable? cancellable) throws Error {
+ foreach (var uri in this.uris) {
+ var file = File.new_for_uri (uri);
+
+ var info = yield file.query_info_async (
+ FILE_ATTRIBUTE_ACCESS_CAN_WRITE,
+ FileQueryInfoFlags.NONE,
+ Priority.DEFAULT,
+ cancellable);
+ if (info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) {
+ return file;
+ }
+ }
+
+ return null;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]