[vala] vapigen: Hide async *_finish methods



commit 07842b163a84c993bd3518654e8302a46ded4dfc
Author: Evan Nemerson <evan coeus-group com>
Date:   Wed Mar 31 11:50:51 2010 -0700

    vapigen: Hide async *_finish methods
    
    Fixes bug 614045.

 vapi/gio-2.0.vapi           |   70 -------------------------------------------
 vapi/libgdata.vapi          |   10 +-----
 vapigen/valagidlparser.vala |   10 +++++-
 3 files changed, 11 insertions(+), 79 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index e038979..7892d26 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -79,7 +79,6 @@ namespace GLib {
 		public BufferedInputStream (GLib.InputStream base_stream);
 		public virtual ssize_t fill (ssize_t count, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async ssize_t fill_async (ssize_t count, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual ssize_t fill_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public size_t get_available ();
 		public size_t get_buffer_size ();
 		public size_t peek (void* buffer, size_t offset, size_t count);
@@ -463,13 +462,11 @@ namespace GLib {
 		public int64 read_int64 (GLib.Cancellable? cancellable) throws GLib.Error;
 		public string? read_line (out size_t length, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async string? read_line_async (int io_priority, GLib.Cancellable? cancellable, out size_t length) throws GLib.Error;
-		public string? read_line_finish (GLib.AsyncResult _result, out unowned size_t length) throws GLib.Error;
 		public uint16 read_uint16 (GLib.Cancellable? cancellable) throws GLib.Error;
 		public uint32 read_uint32 (GLib.Cancellable? cancellable) throws GLib.Error;
 		public uint64 read_uint64 (GLib.Cancellable? cancellable) throws GLib.Error;
 		public string? read_until (string stop_chars, out size_t length, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async string? read_until_async (string stop_chars, int io_priority, GLib.Cancellable? cancellable, out size_t length) throws GLib.Error;
-		public string? read_until_finish (GLib.AsyncResult _result, out unowned size_t length) throws GLib.Error;
 		public void set_byte_order (GLib.DataStreamByteOrder order);
 		public void set_newline_type (GLib.DataStreamNewlineType type);
 		public GLib.DataStreamByteOrder byte_order { get; set; }
@@ -550,7 +547,6 @@ namespace GLib {
 	public class FileEnumerator : GLib.Object {
 		public bool close (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async bool close_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual bool close_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual bool close_fn (GLib.Cancellable? cancellable) throws GLib.Error;
 		public unowned GLib.File get_container ();
@@ -558,7 +554,6 @@ namespace GLib {
 		public bool is_closed ();
 		public virtual GLib.FileInfo next_file (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async GLib.List<GLib.FileInfo> next_files_async (int num_files, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual GLib.List<GLib.FileInfo> next_files_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public void set_pending (bool pending);
 		public GLib.File container { construct; }
 	}
@@ -571,7 +566,6 @@ namespace GLib {
 		public virtual unowned string get_etag ();
 		public virtual unowned GLib.FileInfo query_info (string attributes, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async unowned GLib.FileInfo query_info_async (string attributes, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual unowned GLib.FileInfo query_info_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual bool seek (int64 offset, GLib.SeekType type, GLib.Cancellable? cancellable) throws GLib.Error;
 		[NoWrapper]
@@ -664,7 +658,6 @@ namespace GLib {
 		public virtual bool can_seek ();
 		public virtual unowned GLib.FileInfo query_info (string attributes, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async unowned GLib.FileInfo query_info_async (string attributes, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual unowned GLib.FileInfo query_info_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual bool seek (int64 offset, GLib.SeekType type, GLib.Cancellable? cancellable) throws GLib.Error;
 		[NoWrapper]
@@ -691,7 +684,6 @@ namespace GLib {
 		public virtual unowned string get_etag ();
 		public virtual unowned GLib.FileInfo query_info (string attributes, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async unowned GLib.FileInfo query_info_async (string attributes, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual unowned GLib.FileInfo query_info_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual bool seek (int64 offset, GLib.SeekType type, GLib.Cancellable? cancellable) throws GLib.Error;
 		[NoWrapper]
@@ -766,7 +758,6 @@ namespace GLib {
 		public void clear_pending ();
 		public bool close (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async bool close_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual bool close_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual bool close_fn (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual unowned GLib.InputStream get_input_stream ();
@@ -832,7 +823,6 @@ namespace GLib {
 		public void clear_pending ();
 		public bool close (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async bool close_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual bool close_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual bool close_fn (GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool has_pending ();
@@ -840,13 +830,11 @@ namespace GLib {
 		public ssize_t read (void* buffer, size_t count, GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool read_all (void* buffer, size_t count, out size_t bytes_read, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async ssize_t read_async (void* buffer, size_t count, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual ssize_t read_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual ssize_t read_fn (void* buffer, size_t count, GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool set_pending () throws GLib.Error;
 		public virtual ssize_t skip (size_t count, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async ssize_t skip_async (size_t count, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual ssize_t skip_finish (GLib.AsyncResult _result) throws GLib.Error;
 	}
 	[Compact]
 	[CCode (cheader_filename = "gio/gio.h")]
@@ -937,23 +925,19 @@ namespace GLib {
 		public void clear_pending ();
 		public bool close (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async bool close_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual bool close_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual bool close_fn (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual bool flush (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async bool flush_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual bool flush_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public bool has_pending ();
 		public bool is_closed ();
 		public bool is_closing ();
 		public bool set_pending () throws GLib.Error;
 		public virtual ssize_t splice (GLib.InputStream source, GLib.OutputStreamSpliceFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async ssize_t splice_async (GLib.InputStream source, GLib.OutputStreamSpliceFlags flags, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual ssize_t splice_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public ssize_t write (void* buffer, size_t count, GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool write_all (void* buffer, size_t count, out size_t bytes_written, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async ssize_t write_async (void* buffer, size_t count, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual ssize_t write_finish (GLib.AsyncResult _result) throws GLib.Error;
 		[NoWrapper]
 		public virtual ssize_t write_fn (void* buffer, size_t count, GLib.Cancellable? cancellable) throws GLib.Error;
 	}
@@ -967,14 +951,12 @@ namespace GLib {
 	public class Permission : GLib.Object {
 		public virtual bool acquire (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async bool acquire_async (GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual bool acquire_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public bool get_allowed ();
 		public bool get_can_acquire ();
 		public bool get_can_release ();
 		public void impl_update (bool allowed, bool can_acquire, bool can_release);
 		public virtual bool release (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async bool release_async (GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual bool release_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public bool allowed { get; }
 		public bool can_acquire { get; }
 		public bool can_release { get; }
@@ -985,13 +967,10 @@ namespace GLib {
 		public static unowned GLib.Resolver get_default ();
 		public virtual unowned string lookup_by_address (GLib.InetAddress address, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async unowned string lookup_by_address_async (GLib.InetAddress address, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual unowned string lookup_by_address_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public virtual GLib.List<GLib.InetAddress> lookup_by_name (string hostname, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async GLib.List<GLib.InetAddress> lookup_by_name_async (string hostname, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual GLib.List<GLib.InetAddress> lookup_by_name_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public virtual GLib.List<GLib.SrvTarget> lookup_service (string service, string protocol, string domain, GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async GLib.List<GLib.SrvTarget> lookup_service_async (string service, string protocol, string domain, GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual GLib.List<GLib.SrvTarget> lookup_service_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public void set_default ();
 		public virtual signal void reload ();
 	}
@@ -1173,7 +1152,6 @@ namespace GLib {
 	public class SocketAddressEnumerator : GLib.Object {
 		public virtual unowned GLib.SocketAddress next (GLib.Cancellable? cancellable) throws GLib.Error;
 		public virtual async unowned GLib.SocketAddress next_async (GLib.Cancellable? cancellable) throws GLib.Error;
-		public virtual unowned GLib.SocketAddress next_finish (GLib.AsyncResult _result) throws GLib.Error;
 	}
 	[CCode (cheader_filename = "gio/gio.h")]
 	public class SocketClient : GLib.Object {
@@ -1181,13 +1159,10 @@ namespace GLib {
 		public SocketClient ();
 		public unowned GLib.SocketConnection connect (GLib.SocketConnectable connectable, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async unowned GLib.SocketConnection connect_async (GLib.SocketConnectable connectable, GLib.Cancellable? cancellable) throws GLib.Error;
-		public unowned GLib.SocketConnection connect_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public unowned GLib.SocketConnection connect_to_host (string host_and_port, uint16 default_port, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async unowned GLib.SocketConnection connect_to_host_async (string host_and_port, uint16 default_port, GLib.Cancellable? cancellable) throws GLib.Error;
-		public unowned GLib.SocketConnection connect_to_host_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public unowned GLib.SocketConnection connect_to_service (string domain, string service, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async unowned GLib.SocketConnection connect_to_service_async (string domain, string service, GLib.Cancellable? cancellable) throws GLib.Error;
-		public unowned GLib.SocketConnection connect_to_service_finish (GLib.AsyncResult _result) throws GLib.Error;
 		public GLib.SocketFamily get_family ();
 		public unowned GLib.SocketAddress get_local_address ();
 		public GLib.SocketProtocol get_protocol ();
@@ -1228,10 +1203,8 @@ namespace GLib {
 		public SocketListener ();
 		public unowned GLib.SocketConnection accept (out unowned GLib.Object source_object, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async unowned GLib.SocketConnection accept_async (GLib.Cancellable? cancellable, out unowned GLib.Object source_object) throws GLib.Error;
-		public unowned GLib.SocketConnection accept_finish (GLib.AsyncResult _result, out unowned GLib.Object source_object) throws GLib.Error;
 		public unowned GLib.Socket accept_socket (out unowned GLib.Object source_object, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async unowned GLib.Socket accept_socket_async (GLib.Cancellable? cancellable, out unowned GLib.Object source_object) throws GLib.Error;
-		public unowned GLib.Socket accept_socket_finish (GLib.AsyncResult _result, out unowned GLib.Object source_object) throws GLib.Error;
 		public bool add_address (GLib.SocketAddress address, GLib.SocketType type, GLib.SocketProtocol protocol, GLib.Object? source_object, out unowned GLib.SocketAddress effective_address) throws GLib.Error;
 		public uint16 add_any_inet_port (GLib.Object source_object) throws GLib.Error;
 		public bool add_inet_port (uint16 port, GLib.Object? source_object) throws GLib.Error;
@@ -1410,9 +1383,7 @@ namespace GLib {
 	[CCode (cheader_filename = "gio/gio.h")]
 	public interface AsyncInitable : GLib.Object {
 		public abstract async bool init_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract bool init_finish (GLib.AsyncResult res) throws GLib.Error;
 		public static async unowned GLib.Object new_async (GLib.Type object_type, int io_priority, GLib.Cancellable? cancellable, ...) throws GLib.Error;
-		public unowned GLib.Object new_finish (GLib.AsyncResult res) throws GLib.Error;
 		public static async void new_valist_async (GLib.Type object_type, string first_property_name, void* var_args, int io_priority, GLib.Cancellable? cancellable);
 		public static async void newv_async (GLib.Type object_type, uint n_parameters, GLib.Parameter parameters, int io_priority, GLib.Cancellable? cancellable);
 	}
@@ -1434,9 +1405,7 @@ namespace GLib {
 		public abstract bool can_start_degraded ();
 		public abstract bool can_stop ();
 		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 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 ();
 		public abstract unowned string get_identifier (string kind);
@@ -1448,11 +1417,8 @@ namespace GLib {
 		public abstract bool is_media_check_automatic ();
 		public abstract bool is_media_removable ();
 		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 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 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 ();
 		public signal void eject_button ();
@@ -1462,32 +1428,24 @@ namespace GLib {
 	public interface File : GLib.Object {
 		public abstract GLib.FileOutputStream append_to (GLib.FileCreateFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async GLib.FileOutputStream append_to_async (GLib.FileCreateFlags flags, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract GLib.FileOutputStream append_to_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract bool copy (GLib.File destination, GLib.FileCopyFlags flags, GLib.Cancellable? cancellable, GLib.FileProgressCallback? progress_callback) throws GLib.Error;
 		public abstract async bool copy_async (GLib.File destination, GLib.FileCopyFlags flags, int io_priority, GLib.Cancellable? cancellable, GLib.FileProgressCallback? progress_callback) throws GLib.Error;
 		public bool copy_attributes (GLib.File destination, GLib.FileCopyFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract bool copy_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract GLib.FileOutputStream create (GLib.FileCreateFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async GLib.FileOutputStream create_async (GLib.FileCreateFlags flags, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract GLib.FileOutputStream create_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract unowned GLib.FileIOStream create_readwrite (GLib.FileCreateFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async unowned GLib.FileIOStream create_readwrite_async (GLib.FileCreateFlags flags, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract unowned GLib.FileIOStream create_readwrite_finish (GLib.AsyncResult res) throws GLib.Error;
 		public bool @delete (GLib.Cancellable? cancellable) throws GLib.Error;
 		[NoWrapper]
 		public abstract bool delete_file (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract unowned GLib.File dup ();
 		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 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;
-		public abstract GLib.FileEnumerator enumerate_children_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract bool equal (GLib.File file2);
 		public abstract GLib.Mount find_enclosing_mount (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async GLib.Mount find_enclosing_mount_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract GLib.Mount find_enclosing_mount_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract string? get_basename ();
 		public GLib.File get_child (string name);
 		public abstract GLib.File get_child_for_display_name (string display_name) throws GLib.Error;
@@ -1504,9 +1462,7 @@ namespace GLib {
 		public abstract bool is_native ();
 		public bool load_contents (GLib.Cancellable? cancellable, out string contents, out size_t length, out string etag_out) throws GLib.Error;
 		public async bool load_contents_async (GLib.Cancellable? cancellable, out string contents, out size_t length, out string etag_out) throws GLib.Error;
-		public bool load_contents_finish (GLib.AsyncResult res, out string contents, out unowned size_t length, out string etag_out) throws GLib.Error;
 		public async bool load_partial_contents_async (GLib.Cancellable? cancellable, GLib.FileReadMoreCallback read_more_callback, out string contents, out size_t length, out string etag_out) throws GLib.Error;
-		public bool load_partial_contents_finish (GLib.AsyncResult res, out string contents, out unowned size_t length, out string etag_out) throws GLib.Error;
 		public abstract bool make_directory (GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool make_directory_with_parents (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract bool make_symbolic_link (string symlink_value, GLib.Cancellable? cancellable) throws GLib.Error;
@@ -1515,19 +1471,15 @@ namespace GLib {
 		public abstract GLib.FileMonitor monitor_directory (GLib.FileMonitorFlags flags, GLib.Cancellable? cancellable = null) throws GLib.IOError;
 		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 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);
 		public static GLib.File new_for_path (string path);
 		public static GLib.File new_for_uri (string uri);
 		public abstract unowned GLib.FileIOStream open_readwrite (GLib.Cancellable? cancellable) throws GLib.Error;
 		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 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);
 		public GLib.AppInfo query_default_handler (GLib.Cancellable? cancellable) throws GLib.Error;
@@ -1535,26 +1487,20 @@ namespace GLib {
 		public GLib.FileType query_file_type (GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable);
 		public abstract unowned GLib.FileInfo query_filesystem_info (string attributes, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async unowned GLib.FileInfo query_filesystem_info_async (string attributes, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract unowned GLib.FileInfo query_filesystem_info_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract GLib.FileInfo query_info (string attributes, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async GLib.FileInfo query_info_async (string attributes, GLib.FileQueryInfoFlags flags, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract GLib.FileInfo query_info_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract unowned GLib.FileAttributeInfoList query_settable_attributes (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract unowned GLib.FileAttributeInfoList query_writable_namespaces (GLib.Cancellable? cancellable) throws GLib.Error;
 		public GLib.FileInputStream read (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async GLib.FileInputStream read_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract GLib.FileInputStream read_finish (GLib.AsyncResult res) throws GLib.Error;
 		[NoWrapper]
 		public abstract unowned GLib.FileInputStream read_fn (GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract GLib.FileOutputStream replace (string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async GLib.FileOutputStream replace_async (string? etag, bool make_backup, GLib.FileCreateFlags flags, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool replace_contents (string contents, size_t length, string? etag, bool make_backup, GLib.FileCreateFlags flags, out string? new_etag, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async bool replace_contents_async (string contents, size_t length, string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable, out string? new_etag) throws GLib.Error;
-		public bool replace_contents_finish (GLib.AsyncResult res, out string new_etag) throws GLib.Error;
-		public abstract GLib.FileOutputStream replace_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract unowned GLib.FileIOStream replace_readwrite (string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async unowned GLib.FileIOStream replace_readwrite_async (string? etag, bool make_backup, GLib.FileCreateFlags flags, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error;
-		public abstract unowned GLib.FileIOStream replace_readwrite_finish (GLib.AsyncResult res) throws GLib.Error;
 		public abstract GLib.File resolve_relative_path (string relative_path);
 		public abstract bool set_attribute (string attribute, GLib.FileAttributeType type, void* value_p, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool set_attribute_byte_string (string attribute, string value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
@@ -1564,21 +1510,15 @@ namespace GLib {
 		public bool set_attribute_uint32 (string attribute, uint32 value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public bool set_attribute_uint64 (string attribute, uint64 value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async bool set_attributes_async (GLib.FileInfo info, GLib.FileQueryInfoFlags flags, int io_priority, GLib.Cancellable? cancellable, out unowned GLib.FileInfo info_out) throws GLib.Error;
-		public abstract bool set_attributes_finish (GLib.AsyncResult _result, out unowned GLib.FileInfo info) throws GLib.Error;
 		public abstract bool set_attributes_from_info (GLib.FileInfo info, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable) throws GLib.Error;
 		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 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 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 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 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")]
 	public interface Icon : GLib.Object {
@@ -1602,16 +1542,13 @@ namespace GLib {
 	public interface LoadableIcon : GLib.Icon, GLib.Object {
 		public abstract unowned GLib.InputStream load (int size, out unowned string? type, GLib.Cancellable? cancellable) throws GLib.Error;
 		public abstract async unowned GLib.InputStream load_async (int size, GLib.Cancellable? cancellable, out unowned string? type) throws GLib.Error;
-		public abstract unowned GLib.InputStream load_finish (GLib.AsyncResult res, out unowned string type) throws GLib.Error;
 	}
 	[CCode (cheader_filename = "gio/gio.h")]
 	public interface Mount : GLib.Object {
 		public abstract bool can_eject ();
 		public abstract bool can_unmount ();
 		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 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.File get_default_location ();
 		public abstract unowned GLib.Drive get_drive ();
 		public abstract unowned GLib.Icon get_icon ();
@@ -1620,16 +1557,12 @@ namespace GLib {
 		public abstract unowned string get_uuid ();
 		public abstract unowned GLib.Volume get_volume ();
 		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 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 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 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 ();
 		public signal void pre_unmount ();
@@ -1653,9 +1586,7 @@ namespace GLib {
 		public abstract bool can_eject ();
 		public abstract bool can_mount ();
 		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 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 ();
 		public abstract unowned GLib.Drive get_drive ();
@@ -1665,7 +1596,6 @@ namespace GLib {
 		public abstract unowned string get_name ();
 		public abstract unowned string get_uuid ();
 		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);
 		public abstract bool should_automount ();
diff --git a/vapi/libgdata.vapi b/vapi/libgdata.vapi
index 5cbee29..cfa69c9 100644
--- a/vapi/libgdata.vapi
+++ b/vapi/libgdata.vapi
@@ -1165,13 +1165,13 @@ namespace GData {
 		public unowned GData.PicasaWebAlbum insert_album (GData.PicasaWebAlbum album, GLib.Cancellable cancellable) throws GLib.Error;
 		[CCode (cname = "gdata_picasaweb_service_query_all_albums")]
 		public unowned GData.Feed query_all_albums (GData.Query? query, string? username, GLib.Cancellable? cancellable, GData.QueryProgressCallback? progress_callback) throws GLib.Error;
-		[CCode (cname = "gdata_picasaweb_service_query_all_albums_async")]
+		[CCode (cname = "gdata_picasaweb_service_query_all_albums_async", finish_name = "gdata_picasa_web_service_query_all_albums_finish")]
 		public async void query_all_albums_async (GData.Query? query, string username, GLib.Cancellable? cancellable, GData.QueryProgressCallback progress_callback);
 		[CCode (cname = "gdata_picasaweb_service_query_files")]
 		public unowned GData.Feed query_files (GData.PicasaWebAlbum album, GData.Query? query, GLib.Cancellable? cancellable, GData.QueryProgressCallback? progress_callback) throws GLib.Error;
 		[CCode (cname = "gdata_picasaweb_service_upload_file")]
 		public unowned GData.PicasaWebFile upload_file (GData.PicasaWebAlbum album, GData.PicasaWebFile file_entry, GLib.File file_data, GLib.Cancellable cancellable) throws GLib.Error;
-		[CCode (cname = "gdata_picasaweb_service_upload_file_async")]
+		[CCode (cname = "gdata_picasaweb_service_upload_file_async", finish_name = "gdata_picasa_web_service_upload_file_finish")]
 		public async GData.PicasaWebFile upload_file_async (GData.PicasaWebAlbum album, GData.PicasaWebFile file_entry, GLib.File file_data, GLib.Cancellable? cancellable = null) throws GLib.Error;
 	}
 	[CCode (cheader_filename = "gdata/gdata.h")]
@@ -1244,10 +1244,8 @@ namespace GData {
 		public virtual void append_query_headers (Soup.Message message);
 		public bool authenticate (string username, string password, GLib.Cancellable? cancellable) throws GLib.Error;
 		public async bool authenticate_async (string username, string password, GLib.Cancellable cancellable) throws GLib.Error;
-		public bool authenticate_finish (GLib.AsyncResult async_result) throws GLib.Error;
 		public bool delete_entry (GData.Entry entry, GLib.Cancellable cancellable) throws GLib.Error;
 		public async bool delete_entry_async (GData.Entry entry, GLib.Cancellable cancellable) throws GLib.Error;
-		public bool delete_entry_finish (GLib.AsyncResult async_result) throws GLib.Error;
 		public static GLib.Quark error_quark ();
 		public unowned string get_client_id ();
 		public unowned string get_password ();
@@ -1255,7 +1253,6 @@ namespace GData {
 		public unowned string get_username ();
 		public unowned GData.Entry insert_entry (string upload_uri, GData.Entry entry, GLib.Cancellable cancellable) throws GLib.Error;
 		public async unowned GData.Entry insert_entry_async (string upload_uri, GData.Entry entry, GLib.Cancellable cancellable) throws GLib.Error;
-		public unowned GData.Entry insert_entry_finish (GLib.AsyncResult async_result) throws GLib.Error;
 		public bool is_authenticated ();
 		[NoWrapper]
 		public virtual bool parse_authentication_response (uint status, string response_body, int length) throws GLib.Error;
@@ -1263,14 +1260,11 @@ namespace GData {
 		public virtual void parse_error_response (GData.OperationType operation_type, uint status, string reason_phrase, string response_body, int length) throws GLib.Error;
 		public unowned GData.Feed query (string feed_uri, GData.Query query, GLib.Type entry_type, GLib.Cancellable cancellable, GData.QueryProgressCallback progress_callback, void* progress_user_data) throws GLib.Error;
 		public async unowned GData.Feed query_async (string feed_uri, GData.Query query, GLib.Type entry_type, GLib.Cancellable cancellable, GData.QueryProgressCallback progress_callback, void* progress_user_data) throws GLib.Error;
-		public unowned GData.Feed query_finish (GLib.AsyncResult async_result) throws GLib.Error;
 		public unowned GData.Entry query_single_entry (string entry_id, GData.Query query, GLib.Type entry_type, GLib.Cancellable cancellable) throws GLib.Error;
 		public async unowned GData.Entry query_single_entry_async (string entry_id, GData.Query query, GLib.Type entry_type, GLib.Cancellable cancellable) throws GLib.Error;
-		public unowned GData.Entry query_single_entry_finish (GLib.AsyncResult async_result) throws GLib.Error;
 		public void set_proxy_uri (Soup.URI proxy_uri);
 		public unowned GData.Entry update_entry (GData.Entry entry, GLib.Cancellable cancellable) throws GLib.Error;
 		public async unowned GData.Entry update_entry_async (GData.Entry entry, GLib.Cancellable cancellable) throws GLib.Error;
-		public unowned GData.Entry update_entry_finish (GLib.AsyncResult async_result) throws GLib.Error;
 		[NoAccessorMethod]
 		public bool authenticated { get; }
 		public string client_id { get; construct; }
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 9712cec..e42a24e 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -1315,7 +1315,10 @@ public class Vala.GIdlParser : CodeVisitor {
 	}
 
 	void handle_async_methods (ObjectTypeSymbol type_symbol) {
-		foreach (Method m in type_symbol.get_methods ()) {
+		var methods = type_symbol.get_methods ();
+		for (int method_n = 0 ; method_n < methods.size ; method_n++) {
+			var m = methods.get (method_n);
+
 			if (m.coroutine) {
 				string finish_method_base;
 				if (m.name.has_suffix ("_async")) {
@@ -1353,6 +1356,11 @@ public class Vala.GIdlParser : CodeVisitor {
 					foreach (DataType error_type in finish_method.get_error_types ()) {
 						m.add_error_type (error_type.copy ());
 					}
+					if (methods.index_of (finish_method) < method_n) {
+						method_n--;
+					}
+					type_symbol.scope.remove (finish_method.name);
+					methods.remove (finish_method);
 				}
 			}
 		}



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