[glibmm] FileInfo, FileAttributeMatcher: Wrap some unwrapped functions.
- From: Josà Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] FileInfo, FileAttributeMatcher: Wrap some unwrapped functions.
- Date: Tue, 2 Oct 2012 20:57:56 +0000 (UTC)
commit 59fff691f84b728c499ffa09264702d79e04e307
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date: Tue Oct 2 16:54:48 2012 -0400
FileInfo, FileAttributeMatcher: Wrap some unwrapped functions.
* gio/src/fileinfo.hg (FileAttributeMatcher): Add the
create_difference() and to_string() methods wrapping the
g_file_attribute_matcher_subtract() and the
g_file_attribute_matcher_to_string() functions.
(FileInfo): Add the has_namespace(), [get|set]_attribute_status(),
and [get|set]_attribute_strings() methods wrapping the
g_file_info_has_namespace(), g_file_info_[get|set]_attribute_status(),
and g_file_info_[get|set]_attribute_stringv() functions.
* tools/m4/convert_gio.m4: Add an enum and FileAttributeMatcher
conversions.
ChangeLog | 15 +++++++++++++++
gio/src/fileinfo.hg | 16 ++++++++++++++++
tools/m4/convert_gio.m4 | 5 +++++
3 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0da3fc9..7788666 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2012-10-02 Josà Alburquerque <jaalburquerque gmail com>
+ FileInfo, FileAttributeMatcher: Wrap some unwrapped functions.
+
+ * gio/src/fileinfo.hg (FileAttributeMatcher): Add the
+ create_difference() and to_string() methods wrapping the
+ g_file_attribute_matcher_subtract() and the
+ g_file_attribute_matcher_to_string() functions.
+ (FileInfo): Add the has_namespace(), [get|set]_attribute_status(),
+ and [get|set]_attribute_strings() methods wrapping the
+ g_file_info_has_namespace(), g_file_info_[get|set]_attribute_status(),
+ and g_file_info_[get|set]_attribute_stringv() functions.
+ * tools/m4/convert_gio.m4: Add an enum and FileAttributeMatcher
+ conversions.
+
+2012-10-02 Josà Alburquerque <jaalburquerque gmail com>
+
VariantIter: Correct an _IGNORE.
* glib/src/variantiter.hg:
diff --git a/gio/src/fileinfo.hg b/gio/src/fileinfo.hg
index f49beab..4bc3b95 100644
--- a/gio/src/fileinfo.hg
+++ b/gio/src/fileinfo.hg
@@ -63,10 +63,13 @@ public:
*/
static Glib::RefPtr<FileAttributeMatcher> create(const std::string& attributes = "*");
+ _WRAP_METHOD(Glib::RefPtr<FileAttributeMatcher> create_difference(const Glib::RefPtr<const FileAttributeMatcher>& subtract) const, g_file_attribute_matcher_subtract)
+
_WRAP_METHOD(bool matches(const std::string& full_name) const, g_file_attribute_matcher_matches)
_WRAP_METHOD(bool matches_only(const std::string& full_name) const, g_file_attribute_matcher_matches_only)
_WRAP_METHOD(bool enumerate_namespace(const std::string& ns), g_file_attribute_matcher_enumerate_namespace)
_WRAP_METHOD(std::string enumerate_next(), g_file_attribute_matcher_enumerate_next)
+ _WRAP_METHOD(std::string to_string() const, g_file_attribute_matcher_to_string)
};
/** FileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.
@@ -92,6 +95,8 @@ public:
_WRAP_METHOD(bool has_attribute(const std::string& attribute) const,
g_file_info_has_attribute)
+ _WRAP_METHOD(bool has_namespace(const std::string& name_space) const, g_file_info_has_namespace)
+
#m4 _CONVERSION(`char**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
_WRAP_METHOD(Glib::StringArrayHandle list_attributes(const std::string& name_space) const,
g_file_info_list_attributes)
@@ -101,10 +106,15 @@ public:
_WRAP_METHOD(void remove_attribute(const std::string& attribute),
g_file_info_remove_attribute)
+ _WRAP_METHOD(FileAttributeStatus get_attribute_status(const std::string& attribute) const, g_file_info_get_attribute_status)
+
//TODO: This should return a ustring instead: https://bugzilla.gnome.org/show_bug.cgi?id=615950#c7
_WRAP_METHOD(std::string get_attribute_string(const std::string& attribute) const,
g_file_info_get_attribute_string)
+#m4 _CONVERSION(`char**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(std::vector<Glib::ustring> get_attribute_strings(const std::string& attribute) const, g_file_info_get_attribute_stringv)
+
_WRAP_METHOD(Glib::ustring get_attribute_as_string(const std::string& attribute) const,
g_file_info_get_attribute_as_string)
_WRAP_METHOD(std::string get_attribute_byte_string(const std::string& attribute) const,
@@ -122,10 +132,15 @@ public:
_WRAP_METHOD(Glib::RefPtr<Glib::Object> get_attribute_object(const std::string& attribute) const,
g_file_info_get_attribute_object)
+ _WRAP_METHOD(bool set_attribute_status(const std::string& attribute, FileAttributeStatus status), g_file_info_set_attribute_status)
+
//TODO: This should take a ustring value instead: https://bugzilla.gnome.org/show_bug.cgi?id=615950#c7
_WRAP_METHOD(void set_attribute_string(const std::string& attribute, const std::string& value),
g_file_info_set_attribute_string)
+#m4 _CONVERSION(`std::vector<Glib::ustring>&',`char**',`const_cast<char**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data())')
+ _WRAP_METHOD(void set_attribute_strings(const std::string& attribute, std::vector<Glib::ustring>& attr_value), g_file_info_set_attribute_stringv)
+
_WRAP_METHOD(void set_attribute_byte_string(const std::string& attribute, const std::string& value),
g_file_info_set_attribute_byte_string)
_WRAP_METHOD(void set_attribute_boolean(const std::string& attribute, bool value),
@@ -168,6 +183,7 @@ public:
_WRAP_METHOD(goffset get_size() const, g_file_info_get_size)
Glib::TimeVal modification_time() const;
+ _IGNORE(g_file_info_get_modification_time)
_WRAP_METHOD(std::string get_symlink_target() const, g_file_info_get_symlink_target)
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index fc6a98f..5c78e12 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -20,6 +20,7 @@ _CONV_ENUM(G,DriveStartFlags)
_CONV_ENUM(G,DriveStartStopType)
_CONV_ENUM(G,EmblemOrigin)
_CONV_ENUM(G,FileAttributeInfoFlags)
+_CONV_ENUM(G,FileAttributeStatus)
_CONV_ENUM(G,FileAttributeType)
_CONV_ENUM(G,FileCopyFlags)
_CONV_ENUM(G,FileCreateFlags)
@@ -139,6 +140,10 @@ _CONVERSION(`GFileAttributeValue*',`FileAttributeValue',`Glib::wrap($3)')
_CONVERSION(`const FileAttributeValue&',`const GFileAttributeValue*',`$3.gobj()')
_CONVERSION(`GFileAttributeInfoList*',`Glib::RefPtr<FileAttributeInfoList>',`Glib::wrap($3)')
+# FileAttributeMatcher
+_CONVERSION(`GFileAttributeMatcher*',`Glib::RefPtr<FileAttributeMatcher>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<const FileAttributeMatcher>&',`GFileAttributeMatcher*',`const_cast<GFileAttributeMatcher*>(Glib::unwrap($3))')
+
#FileEnumerator
_CONVERSION(`GFileEnumerator*',`Glib::RefPtr<FileEnumerator>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]