[vala] gio-2.0, gio-unix-2.0, gdk-pixbuf-2.0: Fix cancellable parameters



commit 5eb6c7725b1949c4667c1d90771c91bd1a59a089
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue May 10 16:34:31 2011 +0200

    gio-2.0, gio-unix-2.0, gdk-pixbuf-2.0: Fix cancellable parameters
    
    Fixes bug 649873.

 vapi/gdk-pixbuf-2.0.vapi                           |   14 +++++++-------
 vapi/gio-2.0.vapi                                  |    8 ++++----
 vapi/gio-unix-2.0.vapi                             |    8 ++++----
 .../gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata         |    3 +--
 vapi/packages/gio-2.0/gio-2.0.metadata             |    4 ++++
 vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata   |    1 +
 6 files changed, 21 insertions(+), 17 deletions(-)
---
diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi
index e37f2ad..8910a83 100644
--- a/vapi/gdk-pixbuf-2.0.vapi
+++ b/vapi/gdk-pixbuf-2.0.vapi
@@ -28,13 +28,13 @@ namespace Gdk {
 		public Pixbuf.from_inline (int data_length, [CCode (array_length = false)] uint8[] data, bool copy_pixels = true) throws GLib.Error;
 		public static unowned Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels) throws GLib.Error;
 		[CCode (has_construct_function = false)]
-		public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable) throws GLib.Error;
+		public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
 		[CCode (type = "void", has_construct_function = false)]
-		public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable cancellable) throws GLib.Error;
+		public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
 		[CCode (has_construct_function = false)]
-		public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable) throws GLib.Error;
+		public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null) throws GLib.Error;
 		[CCode (type = "void", has_construct_function = false)]
-		public async Pixbuf.from_stream_at_scale_async (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable cancellable);
+		public async Pixbuf.from_stream_at_scale_async (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null);
 		[CCode (has_construct_function = false)]
 		public Pixbuf.from_xpm_data ([CCode (array_length = false)] string[] data);
 		public int get_bits_per_sample ();
@@ -56,8 +56,8 @@ namespace Gdk {
 		public bool save_to_bufferv ([CCode (type = "gchar**", array_length_type = "gsize")] out uint8[] buffer, string type, string[] option_keys, string[] option_values) throws GLib.Error;
 		public bool save_to_callback (Gdk.PixbufSaveFunc save_func, string type, ...) throws GLib.Error;
 		public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, string type, string[] option_keys, string[] option_values) throws GLib.Error;
-		public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
-		public async bool save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
+		public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null) throws GLib.Error;
+		public async bool save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null) throws GLib.Error;
 		public bool savev (string filename, string type, out unowned string option_keys, out unowned string option_values) throws GLib.Error;
 		public void scale (Gdk.Pixbuf dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, Gdk.InterpType interp_type);
 		public Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
@@ -218,7 +218,7 @@ namespace Gdk {
 	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public delegate void PixbufDestroyNotify ([CCode (array_length = false)] uint8[] pixels);
 	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
-	public delegate bool PixbufSaveFunc (string buf, size_t count, GLib.Error error);
+	public delegate bool PixbufSaveFunc (string buf, size_t count) throws GLib.Error;
 	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
 	public const int PIXBUF_FEATURES_H;
 	[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index ab13077..104400c 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -160,7 +160,7 @@ namespace GLib {
 		public void cancel ();
 		public ulong connect ([CCode (type = "GCallback*")] owned GLib.Func<GLib.Cancellable> callback);
 		public void disconnect (ulong handler_id);
-		public static unowned GLib.Cancellable get_current ();
+		public static unowned GLib.Cancellable? get_current ();
 		public int get_fd ();
 		public bool is_cancelled ();
 		public bool make_pollfd (GLib.PollFD pollfd);
@@ -2474,7 +2474,7 @@ namespace GLib {
 	[CCode (cheader_filename = "gio/gio.h")]
 	public delegate void BusNameVanishedCallback (GLib.DBusConnection connection, string name);
 	[CCode (cheader_filename = "gio/gio.h")]
-	public delegate bool CancellableSourceFunc (GLib.Cancellable cancellable);
+	public delegate bool CancellableSourceFunc (GLib.Cancellable? cancellable);
 	[CCode (cheader_filename = "gio/gio.h")]
 	public delegate unowned GLib.Variant DBusInterfaceGetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name) throws GLib.Error;
 	[CCode (cheader_filename = "gio/gio.h")]
@@ -2496,7 +2496,7 @@ namespace GLib {
 	[CCode (cheader_filename = "gio/gio.h", has_target = false)]
 	public delegate bool FileReadMoreCallback (string file_contents, int64 file_size, void* callback_data);
 	[CCode (cheader_filename = "gio/gio.h")]
-	public delegate bool IOSchedulerJobFunc (GLib.IOSchedulerJob job, GLib.Cancellable cancellable);
+	public delegate bool IOSchedulerJobFunc (GLib.IOSchedulerJob job, GLib.Cancellable? cancellable);
 	[CCode (cheader_filename = "gio/gio.h")]
 	public delegate bool PollableSourceFunc (GLib.Object pollable_stream);
 	[CCode (cheader_filename = "gio/gio.h", has_target = false)]
@@ -2508,7 +2508,7 @@ namespace GLib {
 	[CCode (cheader_filename = "gio/gio.h")]
 	public delegate bool SettingsGetMapping (GLib.Variant value, void* result);
 	[CCode (cheader_filename = "gio/gio.h", has_target = false)]
-	public delegate void SimpleAsyncThreadFunc (GLib.SimpleAsyncResult res, GLib.Object object, GLib.Cancellable cancellable);
+	public delegate void SimpleAsyncThreadFunc (GLib.SimpleAsyncResult res, GLib.Object object, GLib.Cancellable? cancellable);
 	[CCode (cheader_filename = "gio/gio.h")]
 	public delegate bool SocketSourceFunc (GLib.Socket socket, GLib.IOCondition condition);
 	[CCode (cheader_filename = "gio/gio.h")]
diff --git a/vapi/gio-unix-2.0.vapi b/vapi/gio-unix-2.0.vapi
index 24e698e..8929287 100644
--- a/vapi/gio-unix-2.0.vapi
+++ b/vapi/gio-unix-2.0.vapi
@@ -19,10 +19,10 @@ namespace GLib {
 	public class UnixConnection : GLib.SocketConnection {
 		[CCode (has_construct_function = false)]
 		protected UnixConnection ();
-		public unowned GLib.Credentials receive_credentials (GLib.Cancellable cancellable) throws GLib.Error;
-		public int receive_fd (GLib.Cancellable cancellable) throws GLib.Error;
-		public bool send_credentials (GLib.Cancellable cancellable) throws GLib.Error;
-		public bool send_fd (int fd, GLib.Cancellable cancellable) throws GLib.Error;
+		public unowned GLib.Credentials receive_credentials (GLib.Cancellable? cancellable = null) throws GLib.Error;
+		public int receive_fd (GLib.Cancellable? cancellable = null) throws GLib.Error;
+		public bool send_credentials (GLib.Cancellable? cancellable = null) throws GLib.Error;
+		public bool send_fd (int fd, GLib.Cancellable? cancellable = null) throws GLib.Error;
 	}
 	[CCode (cheader_filename = "gio/gunixfdmessage.h")]
 	public class UnixFDMessage : GLib.SocketControlMessage {
diff --git a/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata b/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata
index bb8a10d..25ad7f5 100644
--- a/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata
+++ b/vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata
@@ -1,4 +1,5 @@
 Gdk cheader_filename="gdk-pixbuf/gdk-pixdata.h" gir_namespace="GdkPixbuf" gir_version="2.0"
+gdk_pixbuf_*.cancellable nullable="1" default_value="null"
 gdk_pixbuf_copy transfer_ownership="1"
 gdk_pixbuf_get_file_info.width is_out="1"
 gdk_pixbuf_get_file_info.height is_out="1"
@@ -7,8 +8,6 @@ gdk_pixbuf_get_pixels type_name="uint8" is_array="1" no_array_length="1"
 gdk_pixbuf_new_from_data.destroy_fn nullable="1"
 gdk_pixbuf_new_from_data.destroy_fn_data hidden="1"
 gdk_pixbuf_new_from_data.data type_name="uint8" is_array="1" no_array_length="1"
-gdk_pixbuf_new_from_stream.cancellable nullable="1"
-gdk_pixbuf_new_from_stream_at_scale.cancellable nullable="1"
 gdk_pixbuf_new_from_xpm_data.data is_array="1" no_array_length="1"
 gdk_pixbuf_new_from_inline.data type_name="uint8" is_array="1" no_array_length="1"
 gdk_pixbuf_new_from_inline.copy_pixels default_value="true"
diff --git a/vapi/packages/gio-2.0/gio-2.0.metadata b/vapi/packages/gio-2.0/gio-2.0.metadata
index 620f146..00fe032 100644
--- a/vapi/packages/gio-2.0/gio-2.0.metadata
+++ b/vapi/packages/gio-2.0/gio-2.0.metadata
@@ -18,6 +18,8 @@ g_buffered_input_stream_peek.count hidden="1"
 g_buffered_input_stream_peek.offset default_value="0"
 g_buffered_input_stream_peek_buffer type_name="uint8" is_array="1" array_length_type="gsize"
 g_buffered_input_stream_peek_buffer.count hidden="1"
+GCancellableSourceFunc.cancellable nullable="1"
+g_cancellable_get_current nullable="1"
 g_content_type_can_be_executable parent="ContentType"
 g_content_type_equals parent="ContentType"
 g_content_type_from_mime_type parent="ContentType" transfer_ownership="1"
@@ -198,6 +200,7 @@ GInputVector.size hidden="1"
 GIOErrorEnum rename_to="IOError" errordomain="1"
 g_io_extension_point_get_extensions type_arguments="IOExtension"
 g_io_modules_load_all_in_directory type_arguments="unowned TypeModule" transfer_ownership="1"
+GIOSchedulerJobFunc.cancellable nullable="1"
 g_io_scheduler_job_send_to_mainloop.func transfer_ownership="1"
 g_io_scheduler_job_send_to_mainloop.notify hidden="1"
 g_io_scheduler_job_send_to_mainloop_async.func transfer_ownership="1"
@@ -372,6 +375,7 @@ g_settings_get_strv is_array="1" no_array_length="1" array_null_terminated="1" t
 g_settings_set_strv.value is_array="1" no_array_length="1"
 GSettingsBindSetMapping transfer_ownership="1"
 
+GSimpleAsyncThreadFunc.cancellable nullable="1"
 g_simple_async_result_new.source_object nullable="1"
 g_simple_async_result_new_take_error hidden="1"
 
diff --git a/vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata b/vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata
index 62de7d6..ef3ff76 100644
--- a/vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata
+++ b/vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata
@@ -6,6 +6,7 @@ GUnixFDMessage cheader_filename="gio/gunixfdmessage.h"
 GUnixInputStream cheader_filename="gio/gunixinputstream.h"
 g_unix_is_mount_path_system_internal name="is_mount_path_system_internal"
 GUnixMountEntry hidden="1"
+g_unix_*.cancellable nullable="1" default_value="null"
 g_unix_mounts_changed_since name="mounts_changed_since"
 g_unix_mounts_get hidden="1"
 g_unix_mount_at hidden="1"



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