[vala] gio-2.0: assorted minor fixes



commit a86d34db759595050f6887d49da526ecfbb9775f
Author: Evan Nemerson <evan coeus-group com>
Date:   Thu Nov 15 10:33:04 2012 -0800

    gio-2.0: assorted minor fixes

 vapi/gio-2.0.vapi              |   26 +++++++++++++-------------
 vapi/metadata/Gio-2.0.metadata |   15 +++++++++++++--
 2 files changed, 26 insertions(+), 15 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 32692a9..91ccef5 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -916,23 +916,17 @@ namespace GLib {
 		[NoAccessorMethod]
 		public GLib.Icon gicon { owned get; construct; }
 	}
-	[CCode (cheader_filename = "gio/gio.h")]
-	[Compact]
-	public class FileAttributeInfo {
-		public GLib.FileAttributeInfoFlags flags;
-		public weak string name;
-		public GLib.FileAttributeType type;
-	}
 	[CCode (cheader_filename = "gio/gio.h", ref_function = "g_file_attribute_info_list_ref", type_id = "g_file_attribute_info_list_get_type ()", unref_function = "g_file_attribute_info_list_unref")]
 	[Compact]
 	public class FileAttributeInfoList {
-		public weak GLib.FileAttributeInfo infos;
+		[CCode (array_length_cname = "n_infos")]
+		public GLib.FileAttributeInfo[] infos;
 		public int n_infos;
 		[CCode (has_construct_function = false)]
 		public FileAttributeInfoList ();
 		public void add (string name, GLib.FileAttributeType type, GLib.FileAttributeInfoFlags flags);
 		public GLib.FileAttributeInfoList dup ();
-		public unowned GLib.FileAttributeInfo lookup (string name);
+		public unowned GLib.FileAttributeInfo? lookup (string name);
 	}
 	[CCode (cheader_filename = "gio/gio.h", ref_function = "g_file_attribute_matcher_ref", type_id = "g_file_attribute_matcher_get_type ()", unref_function = "g_file_attribute_matcher_unref")]
 	[Compact]
@@ -957,7 +951,7 @@ namespace GLib {
 		public unowned GLib.File get_container ();
 		public bool has_pending ();
 		public bool is_closed ();
-		public virtual GLib.FileInfo next_file (GLib.Cancellable? cancellable = null) throws GLib.Error;
+		public virtual GLib.FileInfo? next_file (GLib.Cancellable? cancellable = null) throws GLib.Error;
 		public virtual async GLib.List<GLib.FileInfo> next_files_async (int num_files, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error;
 		public void set_pending (bool pending);
 		public GLib.File container { construct; }
@@ -1026,7 +1020,7 @@ namespace GLib {
 		public bool has_attribute (string attribute);
 		public bool has_namespace (string name_space);
 		[CCode (array_length = false, array_null_terminated = true)]
-		public string[] list_attributes (string name_space);
+		public string[]? list_attributes (string name_space);
 		public void remove_attribute (string attribute);
 		public void set_attribute (string attribute, GLib.FileAttributeType type, void* value_p);
 		public void set_attribute_boolean (string attribute, bool attr_value);
@@ -1712,7 +1706,7 @@ namespace GLib {
 		public SettingsSchemaSource.from_directory (string directory, GLib.SettingsSchemaSource? parent, bool trusted) throws GLib.Error;
 		[CCode (cheader_filename = "gio/gio.h")]
 		public static unowned GLib.SettingsSchemaSource get_default ();
-		public GLib.SettingsSchema lookup (string schema_id, bool recursive);
+		public GLib.SettingsSchema? lookup (string schema_id, bool recursive);
 		public GLib.SettingsSchemaSource @ref ();
 		public void unref ();
 	}
@@ -2650,7 +2644,7 @@ namespace GLib {
 		public abstract async bool eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error;
 		[CCode (array_length = false, array_null_terminated = true)]
 		public abstract string[] enumerate_identifiers ();
-		public abstract GLib.File get_activation_root ();
+		public abstract GLib.File? get_activation_root ();
 		public abstract GLib.Drive get_drive ();
 		public abstract GLib.Icon get_icon ();
 		public abstract string get_identifier (string kind);
@@ -2691,6 +2685,12 @@ namespace GLib {
 		public weak GLib.DBusSubtreeDispatchFunc dispatch;
 	}
 	[CCode (cheader_filename = "gio/gio.h", has_type_id = false)]
+	public struct FileAttributeInfo {
+		public weak string name;
+		public GLib.FileAttributeType type;
+		public GLib.FileAttributeInfoFlags flags;
+	}
+	[CCode (cheader_filename = "gio/gio.h", has_type_id = false)]
 	public struct InputVector {
 		public void* buffer;
 		public size_t size;
diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata
index b72d3ef..db6b6c4 100644
--- a/vapi/metadata/Gio-2.0.metadata
+++ b/vapi/metadata/Gio-2.0.metadata
@@ -82,7 +82,6 @@ DBusAuthObserver.authorize_authenticated_peer virtual
 DBusConnection
   .*.observer#parameter default=null
   .send_message_with_reply*.out_serial default=null
-  .send_message_with_reply_finish throws="GLib.IOError"
   .send_message_with_reply_sync throws="GLib.IOError"
 DBusInterfaceSkeleton
   .get_vtable skip=false nullable unowned=false
@@ -110,7 +109,10 @@ Drive
 File
   .monitor_dir* throws="GLib.IOError"
   .monitor_file throws="GLib.IOError"
-FileAttributeInfo struct=false
+FileInfo
+  .list_attributes nullable
+FileEnumerator
+  .next_file nullable
 IOModuleScope
   .free skip
 IOStream
@@ -160,6 +162,8 @@ Settings
   .change_event skip
   .get skip=false sentinel=""
   .set skip=false sentinel=""
+SettingsSchemaSource
+  .lookup nullable
 SimpleAction
   .enabled skip
   .name skip
@@ -203,6 +207,7 @@ Vfs
   .local_file_add_info.extra_data default=null
   .local_file_add_info.free_extra_data nullable default=null
 Volume
+  .get_activation_root nullable
   .get_sort_key#virtual_method virtual
 ZlibCompressor
   .new.level default=-1
@@ -318,6 +323,10 @@ file_* skip
 icon_* skip
 initable_* skip
 
+// Structs incorrectly returned by value
+FileAttributeInfoList
+  .lookup nullable
+
 // Bug #: cannot set ownership of fields
 StaticResource
   .resource unowned=false
@@ -355,6 +364,8 @@ DBusMessage
   .get_body unowned
 DBusSubtreeDispatchFunc nullable unowned
 DBusSubtreeVTable.enumerate skip=false
+FileAttributeInfoList
+  .infos array array_length_field="n_infos" unowned=false
 InputStream
   .read*.buffer type="uint8[]" array_length_idx=1
 LoadableIcon



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