[gnome-dvb-daemon] Use FileAttribute namespace
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-dvb-daemon] Use FileAttribute namespace
- Date: Wed, 7 Mar 2012 22:27:16 +0000 (UTC)
commit b9d74a059bd323bd9a8ae837db1bcb103d0ca944
Author: Sebastian PÃlsterl <sebp k-d-w org>
Date: Wed Mar 7 23:18:00 2012 +0100
Use FileAttribute namespace
src/Recorder.vala | 6 +++---
src/Utils.vala | 8 ++++----
src/io/RecordingReader.vala | 12 ++++++------
3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/Recorder.vala b/src/Recorder.vala
index 047f607..ee0f6a3 100644
--- a/src/Recorder.vala
+++ b/src/Recorder.vala
@@ -49,7 +49,7 @@ namespace DVB {
private Map<uint, Recording> recordings;
private const int CHECK_TIMERS_INTERVAL = 5;
- private const string ATTRIBUTES = FILE_ATTRIBUTE_STANDARD_TYPE + "," + FILE_ATTRIBUTE_ACCESS_CAN_WRITE;
+ private const string ATTRIBUTES = FileAttribute.STANDARD_TYPE + "," + FileAttribute.ACCESS_CAN_WRITE;
construct {
this.active_timers = new HashSet<uint32> ();
@@ -735,13 +735,13 @@ namespace DVB {
return null;
}
- if (info.get_attribute_uint32 (FILE_ATTRIBUTE_STANDARD_TYPE)
+ if (info.get_attribute_uint32 (FileAttribute.STANDARD_TYPE)
!= FileType.DIRECTORY) {
log.error ("%s is not a directory", dir.get_path ());
return null;
}
- if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) {
+ if (!info.get_attribute_boolean (FileAttribute.ACCESS_CAN_WRITE)) {
log.error ("Cannot write to %s", dir.get_path ());
return null;
}
diff --git a/src/Utils.vala b/src/Utils.vala
index efdd6ea..bd99c23 100644
--- a/src/Utils.vala
+++ b/src/Utils.vala
@@ -21,8 +21,8 @@ using GLib;
namespace DVB.Utils {
- private const string NAME_ATTRS = FILE_ATTRIBUTE_STANDARD_TYPE + "," + FILE_ATTRIBUTE_STANDARD_NAME;
- private const string READ_ATTRS = FILE_ATTRIBUTE_STANDARD_TYPE + "," + FILE_ATTRIBUTE_ACCESS_CAN_READ;
+ private const string NAME_ATTRS = FileAttribute.STANDARD_TYPE + "," + FileAttribute.STANDARD_NAME;
+ private const string READ_ATTRS = FileAttribute.STANDARD_TYPE + "," + FileAttribute.ACCESS_CAN_READ;
public static inline unowned string? get_nick_from_enum (GLib.Type enumtype, int val) {
EnumClass eclass = (EnumClass)enumtype.class_ref ();
@@ -169,7 +169,7 @@ namespace DVB.Utils {
return false;
}
- if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) {
+ if (!info.get_attribute_boolean (FileAttribute.ACCESS_CAN_READ)) {
Main.log.error ("Cannot read %s", file.get_path ());
return false;
}
@@ -185,7 +185,7 @@ namespace DVB.Utils {
FileInfo childinfo;
while ((childinfo = files.next_file (null)) != null) {
uint32 type = childinfo.get_attribute_uint32 (
- FILE_ATTRIBUTE_STANDARD_TYPE);
+ FileAttribute.STANDARD_TYPE);
File child = dir.get_child (childinfo.get_name ());
diff --git a/src/io/RecordingReader.vala b/src/io/RecordingReader.vala
index 71d2b7a..010bf09 100644
--- a/src/io/RecordingReader.vala
+++ b/src/io/RecordingReader.vala
@@ -30,10 +30,10 @@ namespace DVB.io {
public RecordingsStore store {get; construct;}
public int max_recursion {get; set; default = 3;}
- private static const string ATTRS = FILE_ATTRIBUTE_STANDARD_TYPE
- + "," + FILE_ATTRIBUTE_ACCESS_CAN_READ
- + "," + FILE_ATTRIBUTE_STANDARD_NAME
- + "," + FILE_ATTRIBUTE_STANDARD_IS_HIDDEN;
+ private static const string ATTRS = FileAttribute.STANDARD_TYPE
+ + "," + FileAttribute.ACCESS_CAN_READ
+ + "," + FileAttribute.STANDARD_NAME
+ + "," + FileAttribute.STANDARD_IS_HIDDEN;
/**
* @recordingsbasedir: The directory to search
@@ -70,7 +70,7 @@ namespace DVB.io {
return false;
}
- if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) {
+ if (!info.get_attribute_boolean (FileAttribute.ACCESS_CAN_READ)) {
log.error ("Cannot read %s", directory.get_path ());
return false;
}
@@ -101,7 +101,7 @@ namespace DVB.io {
continue;
uint32 type = childinfo.get_attribute_uint32 (
- FILE_ATTRIBUTE_STANDARD_TYPE);
+ FileAttribute.STANDARD_TYPE);
File child = recordingsbasedir.get_child (
childinfo.get_name ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]