[rygel] media-export: Small refactor



commit 338dbaa70b077b29708b059b49ba31e5928cb5c4
Author: Jens Georg <mail jensge org>
Date:   Thu May 6 22:52:07 2010 +0200

    media-export: Small refactor

 .../media-export/rygel-media-export-harvester.vala |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-harvester.vala b/src/plugins/media-export/rygel-media-export-harvester.vala
index 62ad02a..1523845 100644
--- a/src/plugins/media-export/rygel-media-export-harvester.vala
+++ b/src/plugins/media-export/rygel-media-export-harvester.vala
@@ -30,6 +30,12 @@ public class Rygel.MediaExportHarvester : GLib.Object {
     private MediaContainer parent;
     private MediaExportRecursiveFileMonitor monitor;
     public Cancellable cancellable;
+    private const string HARVESTER_ATTRIBUTES =
+                                        FILE_ATTRIBUTE_STANDARD_NAME + "," +
+                                        FILE_ATTRIBUTE_STANDARD_TYPE + "," +
+                                        FILE_ATTRIBUTE_TIME_MODIFIED + "," +
+                                        FILE_ATTRIBUTE_STANDARD_SIZE;
+
 
     public MediaExportHarvester (MediaContainer                  parent,
                                  MediaExportMediaCache           media_db,
@@ -126,10 +132,7 @@ public class Rygel.MediaExportHarvester : GLib.Object {
     private async void enumerate_directory (File directory) {
         try {
             var enumerator = yield directory.enumerate_children_async (
-                                        FILE_ATTRIBUTE_STANDARD_TYPE + "," +
-                                        FILE_ATTRIBUTE_STANDARD_NAME + "," +
-                                        FILE_ATTRIBUTE_TIME_MODIFIED + "," +
-                                        FILE_ATTRIBUTE_STANDARD_SIZE,
+                                        HARVESTER_ATTRIBUTES,
                                         FileQueryInfoFlags.NONE,
                                         Priority.DEFAULT,
                                         this.cancellable);
@@ -215,10 +218,7 @@ public class Rygel.MediaExportHarvester : GLib.Object {
         try {
             this.cancellable.reset ();
             var info = yield file.query_info_async (
-                                        FILE_ATTRIBUTE_STANDARD_NAME + "," +
-                                        FILE_ATTRIBUTE_STANDARD_TYPE + "," +
-                                        FILE_ATTRIBUTE_TIME_MODIFIED + "," +
-                                        FILE_ATTRIBUTE_STANDARD_SIZE,
+                                        HARVESTER_ATTRIBUTES,
                                         FileQueryInfoFlags.NONE,
                                         Priority.DEFAULT,
                                         this.cancellable);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]