[vala] gio-2.0: Fix many async functions which don't end in _async.



commit 0c4e6010052a6e221cbb714dc445a925209a3822
Author: Evan Nemerson <evan coeus-group com>
Date:   Thu Dec 3 09:52:12 2009 -0800

    gio-2.0: Fix many async functions which don't end in _async.
    
    Fixes bug 598657.

 vapi/gio-2.0.vapi                      |   44 ++++++++++++++++----------------
 vapi/packages/gio-2.0/gio-2.0.metadata |   22 ++++++++++++++++
 2 files changed, 44 insertions(+), 22 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index c8300ad..37c6149 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -948,9 +948,9 @@ namespace GLib {
 		public abstract bool can_start ();
 		public abstract bool can_start_degraded ();
 		public abstract bool can_stop ();
-		public abstract void eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async bool eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool eject_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool eject_with_operation_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public abstract unowned string enumerate_identifiers ();
 		public abstract unowned GLib.Icon get_icon ();
@@ -962,11 +962,11 @@ namespace GLib {
 		public abstract bool has_volumes ();
 		public abstract bool is_media_check_automatic ();
 		public abstract bool is_media_removable ();
-		public abstract void poll_for_media (GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async bool poll_for_media (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool poll_for_media_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void start (GLib.DriveStartFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool start (GLib.DriveStartFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool start_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void stop (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool stop (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool stop_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public signal void changed ();
 		public signal void disconnected ();
@@ -992,9 +992,9 @@ namespace GLib {
 		[NoWrapper]
 		public abstract bool delete_file (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract unowned GLib.File dup ();
-		public abstract void eject_mountable (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async bool eject_mountable (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool eject_mountable_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void eject_mountable_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool eject_mountable_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool eject_mountable_with_operation_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public abstract GLib.FileEnumerator enumerate_children (string attributes, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async GLib.FileEnumerator enumerate_children_async (string attributes, GLib.FileQueryInfoFlags flags, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
@@ -1030,7 +1030,7 @@ namespace GLib {
 		public abstract GLib.FileMonitor monitor_file (GLib.FileMonitorFlags flags, GLib.Cancellable? cancellable = null) throws GLib.IOError;
 		public abstract async bool mount_enclosing_volume (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool mount_enclosing_volume_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void mount_mountable (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async unowned GLib.File mount_mountable (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract unowned GLib.File mount_mountable_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public abstract bool move (GLib.File destination, GLib.FileCopyFlags flags, GLib.Cancellable? cancellable, GLib.FileProgressCallback? progress_callback) throws GLib.Error;
 		public static GLib.File new_for_commandline_arg (string arg);
@@ -1040,7 +1040,7 @@ namespace GLib {
 		public abstract async unowned GLib.FileIOStream open_readwrite_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract unowned GLib.FileIOStream open_readwrite_finish (GLib.AsyncResult res) throws GLib.Error;
 		public static unowned GLib.File parse_name (string parse_name);
-		public abstract void poll_mountable (GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool poll_mountable (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool poll_mountable_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public abstract bool prefix_matches (GLib.File file);
@@ -1083,15 +1083,15 @@ namespace GLib {
 		public abstract unowned GLib.File set_display_name (string display_name, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async unowned GLib.File set_display_name_async (string display_name, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract unowned GLib.File set_display_name_finish (GLib.AsyncResult res) throws GLib.Error;
-		public abstract void start_mountable (GLib.DriveStartFlags flags, GLib.MountOperation start_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool start_mountable (GLib.DriveStartFlags flags, GLib.MountOperation start_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool start_mountable_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void stop_mountable (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool stop_mountable (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool stop_mountable_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public bool supports_thread_contexts ();
 		public abstract bool trash (GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract void unmount_mountable (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async bool unmount_mountable (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool unmount_mountable_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void unmount_mountable_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool unmount_mountable_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool unmount_mountable_with_operation_finish (GLib.AsyncResult _result) throws GLib.Error;
 	}
 	[CCode (cheader_filename = "gio/gio.h")]
@@ -1122,9 +1122,9 @@ namespace GLib {
 	public interface Mount : GLib.Object {
 		public abstract bool can_eject ();
 		public abstract bool can_unmount ();
-		public abstract void eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async bool eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool eject_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool eject_with_operation_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public abstract unowned GLib.Drive get_drive ();
 		public abstract unowned GLib.Icon get_icon ();
@@ -1132,16 +1132,16 @@ namespace GLib {
 		public abstract unowned GLib.File get_root ();
 		public abstract unowned string get_uuid ();
 		public abstract unowned GLib.Volume get_volume ();
-		public abstract void guess_content_type (bool force_rescan, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async unowned string guess_content_type (bool force_rescan, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract unowned string guess_content_type_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public abstract unowned string guess_content_type_sync (bool force_rescan, GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool is_shadowed ();
-		public abstract void remount (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async bool remount (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool remount_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public void shadow ();
-		public abstract void unmount (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async bool unmount (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool unmount_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void unmount_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool unmount_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool unmount_with_operation_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public void unshadow ();
 		public signal void changed ();
@@ -1165,9 +1165,9 @@ namespace GLib {
 	public interface Volume : GLib.Object {
 		public abstract bool can_eject ();
 		public abstract bool can_mount ();
-		public abstract void eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public abstract async bool eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool eject_finish (GLib.AsyncResult _result) throws GLib.Error;
-		public abstract void eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
+		public abstract async bool eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool eject_with_operation_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public abstract unowned string enumerate_identifiers ();
 		public abstract unowned GLib.File get_activation_root ();
@@ -1177,7 +1177,7 @@ namespace GLib {
 		public abstract unowned GLib.Mount get_mount ();
 		public abstract unowned string get_name ();
 		public abstract unowned string get_uuid ();
-		public void mount (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback? callback);
+		public async bool mount (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool mount_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public abstract void mount_fn (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
diff --git a/vapi/packages/gio-2.0/gio-2.0.metadata b/vapi/packages/gio-2.0/gio-2.0.metadata
index 1eac08b..923708a 100644
--- a/vapi/packages/gio-2.0/gio-2.0.metadata
+++ b/vapi/packages/gio-2.0/gio-2.0.metadata
@@ -12,12 +12,19 @@ g_data_input_stream_read_line_finish.length is_out="1"
 g_data_input_stream_read_until nullable="1"
 g_data_input_stream_read_until.length is_out="1"
 g_data_input_stream_read_until_finish.length is_out="1"
+g_drive_eject async="1"
+g_drive_eject_with_operation async="1"
+g_drive_poll_for_media async="1"
+g_drive_start async="1"
+g_drive_stop async="1"
 g_file_append_to transfer_ownership="1"
 g_file_append_to_finish transfer_ownership="1"
 g_file_copy.progress_callback_data hidden="1"
 g_file_copy_async.progress_callback_data hidden="1"
 g_file_create transfer_ownership="1"
 g_file_create_finish transfer_ownership="1"
+g_file_eject_mountable async="1"
+g_file_eject_mountable_with_operation async="1"
 g_file_enumerate_children transfer_ownership="1"
 g_file_enumerate_children_finish transfer_ownership="1"
 g_file_enumerator_next_file transfer_ownership="1"
@@ -49,10 +56,12 @@ g_file_monitor_directory hidden="1"
 g_file_monitor_dir hidden="1"
 g_file_monitor_file hidden="1"
 g_file_mount_enclosing_volume async="1"
+g_file_mount_mountable async="1"
 g_file_move.progress_callback_data hidden="1"
 g_file_new_for_commandline_arg transfer_ownership="1"
 g_file_new_for_path transfer_ownership="1"
 g_file_new_for_uri transfer_ownership="1"
+g_file_poll_mountable async="1"
 g_file_query_default_handler transfer_ownership="1"
 g_file_query_info transfer_ownership="1"
 g_file_query_info_finish transfer_ownership="1"
@@ -65,10 +74,20 @@ g_file_replace_contents.new_etag transfer_ownership="1"
 g_file_replace_contents_finish.new_etag transfer_ownership="1"
 g_file_replace_finish transfer_ownership="1"
 g_file_resolve_relative_path transfer_ownership="1"
+g_file_start_mountable async="1"
+g_file_stop_mountable async="1"
+g_file_unmount_mountable async="1"
+g_file_unmount_mountable_with_operation async="1"
 g_input_stream_read_all.bytes_read is_out="1"
 GIOErrorEnum rename_to="IOError" errordomain="1"
 g_memory_input_stream_add_data.destroy nullable="1"
 g_memory_input_stream_new_from_data.destroy nullable="1"
+g_mount_eject async="1"
+g_mount_eject_with_operation async="1"
+g_mount_guess_content_type async="1"
+g_mount_remount async="1"
+g_mount_unmount async="1"
+g_mount_unmount_with_operation async="1"
 GMountOperation::reply has_emitter="1"
 g_output_stream_write_all.bytes_written is_out="1"
 g_seekable_truncate abstract="1" vfunc_name="truncate_fn"
@@ -82,6 +101,9 @@ g_themed_icon_get_names is_array="1" no_array_length="1"
 g_vfs_get_file_for_path transfer_ownership="1"
 g_vfs_get_file_for_uri transfer_ownership="1"
 g_vfs_get_supported_uri_schemes is_array="1"
+g_volume_eject async="1"
+g_volume_eject_with_operation async="1"
+g_volume_mount async="1"
 
 g_*.cancellable nullable="1"
 g_*.mount_operation nullable="1"



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