[vala/0.40] gio-2.0: Add binding for g_io_error_from_win32_error()



commit 2c29cae6f9a770bd9f77165715cc671ad0a79c28
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Mar 16 08:08:46 2020 +0100

    gio-2.0: Add binding for g_io_error_from_win32_error()

 vapi/gio-2.0.vapi                 | 6 ++++++
 vapi/metadata/Gio-2.0-custom.vala | 6 ++++++
 2 files changed, 12 insertions(+)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 61bbc1a1b..8f12cb1fa 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -4646,6 +4646,12 @@ namespace GLib {
                public static GLib.IOError from_errno (int err_no) {
                        return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), GLib.IOError._from_errno 
(err_no), "%s", GLib.strerror (err_no));
                }
+               [CCode (cname = "g_io_error_from_win32_error")]
+               public static int _from_win32_error (int error_code);
+               [CCode (cname = "vala_g_io_error_from_win32_error")]
+               public static GLib.IOError from_win32_error (int error_code) {
+                       return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), 
GLib.IOError._from_win32_error (error_code), "%s", GLib.Win32.error_message (error_code));
+               }
                [CCode (cheader_filename = "gio/gio.h", cname = "g_io_error_from_errno")]
                public static int _from_errno (int err_no);
                [CCode (cheader_filename = "gio/gio.h")]
diff --git a/vapi/metadata/Gio-2.0-custom.vala b/vapi/metadata/Gio-2.0-custom.vala
index abe3debf0..d246695fa 100644
--- a/vapi/metadata/Gio-2.0-custom.vala
+++ b/vapi/metadata/Gio-2.0-custom.vala
@@ -188,6 +188,12 @@ namespace GLib {
                public static GLib.IOError from_errno (int err_no) {
                        return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), GLib.IOError._from_errno 
(err_no), "%s", GLib.strerror (err_no));
                }
+               [CCode (cname = "g_io_error_from_win32_error")]
+               public static int _from_win32_error (int error_code);
+               [CCode (cname = "vala_g_io_error_from_win32_error")]
+               public static GLib.IOError from_win32_error (int error_code) {
+                       return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), 
GLib.IOError._from_win32_error (error_code), "%s", GLib.Win32.error_message (error_code));
+               }
        }
 
        public delegate void SimpleActionActivateCallback (SimpleAction action, Variant? parameter);


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