[vala/0.52] gio-2.0: Unhide a few usable symbols which are marked not introspectable



commit d1d4828950a5b30a404a2d6145e6b62dc126dfc9
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Sep 7 09:51:06 2021 +0200

    gio-2.0: Unhide a few usable symbols which are marked not introspectable
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/1222

 vapi/gio-2.0.vapi                 | 22 ++++++++++++++++++++++
 vapi/metadata/Gio-2.0-custom.vala | 21 +++++++++++++++++++++
 vapi/metadata/Gio-2.0.metadata    | 10 ++++++++++
 3 files changed, 53 insertions(+)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 35d197d4b..b7892090f 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -1436,6 +1436,7 @@ namespace GLib {
                public unowned string get_name ();
                public int get_priority ();
                public GLib.Type get_type ();
+               public GLib.TypeClass ref_class ();
        }
        [CCode (cheader_filename = "gio/gio.h", has_type_id = false)]
        [Compact]
@@ -1808,6 +1809,8 @@ namespace GLib {
                [Version (since = "2.34")]
                public MenuItem.from_model (GLib.MenuModel model, int item_index);
                [Version (since = "2.34")]
+               public bool get_attribute (string attribute, string format_string, ...);
+               [Version (since = "2.34")]
                public GLib.Variant? get_attribute_value (string attribute, GLib.VariantType? expected_type);
                [Version (since = "2.34")]
                public GLib.MenuModel? get_link (string link);
@@ -1968,9 +1971,11 @@ namespace GLib {
                [CCode (has_construct_function = false)]
                public Notification (string title);
                public void add_button (string label, string detailed_action);
+               public void add_button_with_target (string label, string action, string? target_format, ...);
                public void add_button_with_target_value (string label, string action, GLib.Variant? target);
                public void set_body (string? body);
                public void set_default_action (string detailed_action);
+               public void set_default_action_and_target (string action, string? target_format, ...);
                public void set_default_action_and_target_value (string action, GLib.Variant? target);
                public void set_icon (GLib.Icon icon);
                public void set_priority (GLib.NotificationPriority priority);
@@ -1992,9 +1997,15 @@ namespace GLib {
                public bool is_closed ();
                [Version (since = "2.24")]
                public bool is_closing ();
+               [CCode (error_pos = 2.8, sentinel = "")]
+               [Version (since = "2.40")]
+               public bool printf (out size_t bytes_written, GLib.Cancellable? cancellable, string format, 
...) throws GLib.Error;
                public bool set_pending () throws GLib.Error;
                public virtual ssize_t splice (GLib.InputStream source, GLib.OutputStreamSpliceFlags flags, 
GLib.Cancellable? cancellable = null) throws GLib.IOError;
                public virtual async ssize_t splice_async (GLib.InputStream source, 
GLib.OutputStreamSpliceFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = 
null) throws GLib.IOError;
+               [CCode (error_pos = 2.8)]
+               [Version (since = "2.40")]
+               public bool vprintf (out size_t bytes_written, GLib.Cancellable? cancellable, string format, 
va_list args) throws GLib.Error;
                [CCode (vfunc_name = "write_fn")]
                public abstract ssize_t write ([CCode (array_length_cname = "count", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.IOError;
                public bool write_all ([CCode (array_length_cname = "count", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] buffer, out size_t bytes_written, GLib.Cancellable? cancellable = null) 
throws GLib.IOError;
@@ -2302,6 +2313,9 @@ namespace GLib {
                public static GLib.SettingsBackend get_default ();
                [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = 
"G_SETTINGS_ENABLE_BACKEND")]
                [NoWrapper]
+               public virtual GLib.Permission get_permission (string path);
+               [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = 
"G_SETTINGS_ENABLE_BACKEND")]
+               [NoWrapper]
                public virtual bool get_writable (string key);
                [CCode (cheader_filename = "gio/gsettingsbackend.h", cname = 
"g_keyfile_settings_backend_new", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")]
                public static GLib.SettingsBackend keyfile_settings_backend_new (string filename, string 
root_path, string? root_group);
@@ -2850,6 +2864,8 @@ namespace GLib {
                public void set_stdin_file_path (string path);
                public void set_stdout_file_path (string? path);
                public void setenv (string variable, string value, bool overwrite);
+               [CCode (error_pos = 0.8)]
+               public GLib.Subprocess spawn (string argv0, ...) throws GLib.Error;
                public GLib.Subprocess spawnv ([CCode (array_length = false, array_null_terminated = true)] 
string[] argv) throws GLib.Error;
                public void take_fd (int source_fd, int target_fd);
                public void take_stderr_fd (int fd);
@@ -3175,6 +3191,8 @@ namespace GLib {
                protected Vfs ();
                [NoWrapper]
                public virtual void add_writable_namespaces (GLib.FileAttributeInfoList list);
+               [NoWrapper]
+               public virtual GLib.Icon deserialize_icon (GLib.Variant value);
                public static unowned GLib.Vfs get_default ();
                public virtual GLib.File get_file_for_path (string path);
                public virtual GLib.File get_file_for_uri (string uri);
@@ -4764,6 +4782,10 @@ namespace GLib {
                UNKNOWN_INTERFACE,
                UNKNOWN_PROPERTY,
                PROPERTY_READ_ONLY;
+               [CCode (error_pos = 0.8, sentinel = "")]
+               public static void set_dbus_error (string dbus_error_name, string dbus_error_message, string? 
format, ...) throws GLib.DBusError;
+               [CCode (error_pos = 0.8)]
+               public static void set_dbus_error_valist (string dbus_error_name, string dbus_error_message, 
string? format, va_list var_args) throws GLib.DBusError;
                [CCode (cheader_filename = "gio/gio.h")]
                public static string encode_gerror (GLib.Error error);
                [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 1b212271a..2264a984a 100644
--- a/vapi/metadata/Gio-2.0-custom.vala
+++ b/vapi/metadata/Gio-2.0-custom.vala
@@ -91,6 +91,15 @@ namespace GLib {
                public abstract GLib.Mount get_mount_for_mount_path (string mount_path, GLib.Cancellable? 
cancellable = null);
        }
 
+       public abstract class OutputStream : GLib.Object {
+               [Version (since = "2.40")]
+               [CCode (error_pos = 2.8, sentinel = "")]
+               public bool printf (out size_t bytes_written, GLib.Cancellable? cancellable, string format, 
...) throws GLib.Error;
+               [Version (since = "2.40")]
+               [CCode (error_pos = 2.8)]
+               public bool vprintf (out size_t bytes_written, GLib.Cancellable? cancellable, string format, 
va_list args) throws GLib.Error;
+       }
+
        [Compact]
        [CCode (cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
        public class PollableSource : GLib.Source {
@@ -124,6 +133,11 @@ namespace GLib {
                public void set_callback ([CCode (type = "GSourceFunc")] owned SocketSourceFunc func);
        }
 
+       public class SubprocessLauncher : GLib.Object {
+               [CCode (error_pos = 0.8)]
+               public GLib.Subprocess spawn (string argv0, ...) throws GLib.Error;
+       }
+
        public class Task : GLib.Object {
                [CCode (has_construct_function = false)]
                [Version (since = "2.36")]
@@ -164,6 +178,13 @@ namespace GLib {
                public virtual GLib.Icon? from_tokens (string[] tokens, int version) throws GLib.Error;
        }
 
+       public errordomain DBusError {
+               [CCode (error_pos = 0.8, sentinel = "")]
+               public static void set_dbus_error (string dbus_error_name, string dbus_error_message, string? 
format, ...) throws GLib.DBusError;
+               [CCode (error_pos = 0.8)]
+               public static void set_dbus_error_valist (string dbus_error_name, string dbus_error_message, 
string? format, va_list var_args) throws GLib.DBusError;
+       }
+
        public errordomain IOError {
                [CCode (cname = "vala_g_io_error_from_errno")]
                public static GLib.IOError from_errno (int err_no) {
diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata
index 51ba44821..fcbb74109 100644
--- a/vapi/metadata/Gio-2.0.metadata
+++ b/vapi/metadata/Gio-2.0.metadata
@@ -57,6 +57,7 @@ SettingsBackend
   .* cheader_filename="gio/gsettingsbackend.h" feature_test_macro="G_SETTINGS_ENABLE_BACKEND"
   .changed_tree.tree type="GLib.Tree<string,GLib.Variant>"
   .flatten_tree.tree type="GLib.Tree<string,GLib.Variant>"
+  .get_permission unowned=false skip=false
   .write_tree.tree type="GLib.Tree<string,GLib.Variant>"
 
 Action
@@ -133,6 +134,10 @@ File
   .monitor_dir* throws="GLib.IOError"
   .monitor_file throws="GLib.IOError"
   .replace_contents_bytes_async finish_name="g_file_replace_contents_finish"
+IOExtension
+  .ref_class skip=false
+IOModuleScope
+  .new skip=false symbol_type="constructor"
 io_error_from_errno type="int" name="io_error__from_errno"
 IOStream
   .close virtual vfunc_name="close_fn" throws="GLib.IOError"
@@ -173,6 +178,7 @@ MemoryOutputStream
   .destroy_function skip=false type="GLib.DestroyNotify?"
   .realloc_function skip=false type="GLib.ReallocFunc?"
 MenuItem
+  .get_attribute skip=false
   .set_action_and_target skip=false
   .set_attribute skip=false
 MenuModel
@@ -180,6 +186,9 @@ MenuModel
   .get_item_attributes.attributes out type="GLib.HashTable<string,GLib.Variant>?"
 Mount
   .get_sort_key#virtual_method virtual
+Notification
+  .add_button_with_target skip=false
+  .set_default_action_and_target skip=false
 OutputStream
   .close abstract vfunc_name="close_fn" throws="GLib.IOError"
   .close_finish throws="GLib.IOError"
@@ -252,6 +261,7 @@ TlsPassword
   .set_value#virtual_method.value owned
   .set_value#virtual_method.destroy default=GLib.free
 Vfs
+  .deserialize_icon skip=false unowned=false
   // TODO: should probably be a simple generic
   .local_file_add_info.extra_data default=null
   .local_file_add_info.free_extra_data nullable default=null


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