[glib] gio: Add a boxed type for GFileAttributeMatcher



commit f39a49b03610a1cd54b9feb18528f5c74539d5c9
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Mon Apr 26 23:38:41 2010 +0200

    gio: Add a boxed type for GFileAttributeMatcher
    
    https://bugzilla.gnome.org/show_bug.cgi?id=616892

 docs/reference/gio/gio.types |    1 +
 gio/gfileinfo.c              |   18 ++++++++++++++++++
 gio/gfileinfo.h              |    1 +
 gio/gio.symbols              |    1 +
 4 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gio/gio.types b/docs/reference/gio/gio.types
index 34674c8..e8f9738 100644
--- a/docs/reference/gio/gio.types
+++ b/docs/reference/gio/gio.types
@@ -24,6 +24,7 @@ g_emblem_get_type
 g_emblem_origin_get_type
 g_emblemed_icon_get_type
 g_file_attribute_info_flags_get_type
+g_file_attribute_matcher_get_type
 g_file_attribute_status_get_type
 g_file_attribute_type_get_type
 g_file_copy_flags_get_type
diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c
index 23cc888..b9722a3 100644
--- a/gio/gfileinfo.c
+++ b/gio/gfileinfo.c
@@ -2148,6 +2148,24 @@ matcher_add (GFileAttributeMatcher *matcher,
   g_array_append_val (matcher->more_sub_matchers, s);
 }
 
+GType
+g_file_attribute_matcher_get_type (void)
+{
+  static volatile gsize g_define_type_id__volatile = 0;
+
+  if (g_once_init_enter (&g_define_type_id__volatile))
+    {
+      GType g_define_type_id =
+        g_boxed_type_register_static (I_("GFileAttributeMatcher"),
+                                      (GBoxedCopyFunc) g_file_attribute_matcher_ref,
+                                      (GBoxedFreeFunc) g_file_attribute_matcher_unref);
+
+      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+    }
+
+  return g_define_type_id__volatile;
+}
+
 /**
  * g_file_attribute_matcher_new:
  * @attributes: an attribute string to match.
diff --git a/gio/gfileinfo.h b/gio/gfileinfo.h
index 2b5110f..90188eb 100644
--- a/gio/gfileinfo.h
+++ b/gio/gfileinfo.h
@@ -935,6 +935,7 @@ void              g_file_info_set_symlink_target     (GFileInfo         *info,
 void              g_file_info_set_sort_order         (GFileInfo         *info,
 						      gint32             sort_order);
 
+GType                  g_file_attribute_matcher_get_type       (void) G_GNUC_CONST;
 GFileAttributeMatcher *g_file_attribute_matcher_new            (const char            *attributes);
 GFileAttributeMatcher *g_file_attribute_matcher_ref            (GFileAttributeMatcher *matcher);
 void                   g_file_attribute_matcher_unref          (GFileAttributeMatcher *matcher);
diff --git a/gio/gio.symbols b/gio/gio.symbols
index aa2eadf..8c278fa 100644
--- a/gio/gio.symbols
+++ b/gio/gio.symbols
@@ -485,6 +485,7 @@ g_file_info_set_size
 g_file_info_set_modification_time
 g_file_info_set_symlink_target
 g_file_info_set_sort_order
+g_file_attribute_matcher_get_type G_GNUC_CONST
 g_file_attribute_matcher_new
 g_file_attribute_matcher_ref
 g_file_attribute_matcher_unref



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