summaryrefslogtreecommitdiff
path: root/vapi/metadata/Gio-2.0-custom.vala
blob: ed5cc3d00533ac1f5090f788a11ddf301b4baf5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
namespace GLib {
	[CCode (cheader_filename = "glib.h", cname = "g_realloc")]
	public static GLib.ReallocFunc g_realloc;

	[CCode (cheader_filename = "gio/gio.h")]
	namespace Bus {
		public async GLib.DBusConnection get (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError;
		public GLib.DBusConnection get_sync (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError;
		public async T get_proxy<T> (GLib.BusType bus_type, string name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError;
		public T get_proxy_sync<T> (GLib.BusType bus_type, string name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError;
	}

	public struct ActionEntry {
		public weak string name;
		[CCode (delegate_target = false)]
		public weak GLib.SimpleActionActivateCallback? activate;
		public weak string parameter_type;
		public weak string state;
		[CCode (delegate_target = false)]
		public weak GLib.SimpleActionChangeStateCallback? change_state;
	}

	[Compact]
	[CCode (cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
	public class CancellableSource : GLib.Source {
		[CCode (cname = "g_source_set_callback")]
		public void set_callback ([CCode (type = "GSourceFunc")] owned CancellableSourceFunc func);
	}

	[CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_connection_get_type ()")]
	public class DBusConnection : GLib.Object {
		[CCode (cname = "g_dbus_connection_new", finish_function = "g_dbus_connection_new_finish")]
		[Version (deprecated_since = "vala-0.36", replacement = "DBusConnection")]
		public static async GLib.DBusConnection @new (GLib.IOStream stream, string? guid, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[CCode (cname = "g_dbus_connection_new_for_address", finish_function = "g_dbus_connection_new_for_address_finish")]
		[Version (deprecated_since = "vala-0.36", replacement = "DBusConnection.for_address")]
		public static async GLib.DBusConnection @new_for_address (string address, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async T get_proxy<T> (string? name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError; 
		public T get_proxy_sync<T> (string? name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError;
		public uint register_object<T> (string object_path, T object) throws GLib.IOError;
		public async GLib.DBusMessage send_message_with_reply (GLib.DBusMessage message, GLib.DBusSendMessageFlags flags, int timeout_msec, uint32 *out_serial = null, GLib.Cancellable? cancellable = null) throws GLib.IOError;
	}

	[CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_manager_client_get_type ()")]
	public class DBusObjectManagerClient : GLib.Object {
		[CCode (cname = "g_dbus_object_manager_client_new", finish_function = "g_dbus_object_manager_client_new_finish")]
		[Version (deprecated_since = "vala-0.36", replacement = "DBusObjectManagerClient")]
		public static async GLib.DBusObjectManagerClient @new (GLib.DBusConnection connection, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[CCode (cname = "g_dbus_object_manager_client_new_for_bus", finish_function = "g_dbus_object_manager_client_new_for_bus_finish")]
		[Version (deprecated_since = "vala-0.36", replacement = "DBusObjectManagerClient.for_bus")]
		public static async GLib.DBusObjectManagerClient @new_for_bus (GLib.BusType bus_type, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error;
	}

	public class DBusProxy : GLib.Object {
		[CCode (cname = "g_dbus_proxy_new", finish_function = "g_dbus_proxy_new_finish")]
		[Version (deprecated_since = "vala-0.36", replacement = "DBusProxy")]
		public static async GLib.DBusProxy @new (GLib.DBusConnection connection, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string? name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.IOError;
		[CCode (cname = "g_dbus_proxy_new_for_bus", finish_function = "g_dbus_proxy_new_for_bus_finish")]
		[Version (deprecated_since = "vala-0.36", replacement = "DBusProxy.for_bus")]
		public static async GLib.DBusProxy create_for_bus (GLib.BusType bus_type, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.IOError;
	}

	public class DataInputStream : GLib.BufferedInputStream {
		[CCode (cname = "g_data_input_stream_read_line_async", finish_function = "g_data_input_stream_read_line_finish_utf8")]
		public async string? read_line_utf8_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out size_t length = null) throws GLib.IOError;
	}

	[CCode (cheader_filename = "gio/gio.h", type_id = "g_file_monitor_get_type ()")]
	public abstract class FileMonitor : GLib.Object {
		[Version (deprecated_since = "2.46")]
		public GLib.MainContext context { construct; }
	}

	[Compact]
	public class IOModuleScope {
		[CCode (has_construct_function = false)]
		public IOModuleScope (GLib.IOModuleScopeFlags flags);
	}

	public class MemoryOutputStream : GLib.OutputStream {
		[CCode (has_construct_function = false, type = "GOutputStream*")]
		public MemoryOutputStream ([CCode (array_length_type = "gsize")] owned uint8[]? data, GLib.ReallocFunc? realloc_function = GLib.g_realloc, GLib.DestroyNotify? destroy_function = GLib.g_free);
	}

	[CCode (cheader_filename = "gio/gio.h", type_id = "g_native_socket_address_get_type ()")]
	public class NativeSocketAddress : GLib.SocketAddress {
		public NativeSocketAddress (void* native, size_t len);
	}

	public abstract class NativeVolumeMonitor : GLib.VolumeMonitor {
		[NoWrapper]
		public abstract GLib.Mount get_mount_for_mount_path (string mount_path, GLib.Cancellable? cancellable = null);
	}

	[Compact]
	[CCode (cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
	public class PollableSource : GLib.Source {
		[CCode (type = "GSource*")]
		public PollableSource (GLib.Object pollable_stream);
		[CCode (type = "GSource*")]
		public PollableSource.full (GLib.Object pollable_stream, GLib.Source? child_source, GLib.Cancellable? cancellable = null);
		[CCode (cname = "g_source_set_callback")]
		public void set_callback ([CCode (type = "GSourceFunc")] owned PollableSourceFunc func);
	}

	[CCode (cheader_filename = "gio/gio.h", type_id = "g_settings_get_type ()")]
	public class Settings : GLib.Object {
		public void bind_with_mapping (string key, GLib.Object object, string property, GLib.SettingsBindFlags flags, GLib.SettingsBindGetMappingShared get_mapping, GLib.SettingsBindSetMappingShared set_mapping, void* user_data, GLib.DestroyNotify? notify);
	}

	public class SimpleAsyncResult : GLib.Object {
		[CCode (has_construct_function = false)]
		public SimpleAsyncResult (GLib.Object? source_object, void* source_tag);
		[CCode (has_construct_function = false)]
		[PrintfFormat]
		public SimpleAsyncResult.error (GLib.Object? source_object, GLib.Quark domain, int code, string format, ...);
		[CCode (has_construct_function = false)]
		public SimpleAsyncResult.from_error (GLib.Object? source_object, GLib.Error error);
		[CCode (simple_generics = true)]
		public unowned T get_op_res_gpointer<T> ();
		[CCode (simple_generics = true)]
		public void set_op_res_gpointer<T> (owned T op_res);
	}

	[Compact]
	[CCode (cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
	public class SocketSource : GLib.Source {
		[CCode (cname = "g_source_set_callback")]
		public void set_callback ([CCode (type = "GSourceFunc")] owned SocketSourceFunc func);
	}

	public class SocketConnection : GLib.IOStream {
		public static GLib.SocketConnection factory_create_connection (GLib.Socket socket);
	}

	public class Task : GLib.Object {
		[CCode (has_construct_function = false)]
		[Version (since = "2.36")]
		public Task (GLib.Object? source_object, GLib.Cancellable? cancellable, [CCode (scope = "async")] GLib.TaskReadyCallback callback);
		[Version (since = "2.36")]
		public static void report_error (GLib.Object? source_object, [CCode (scope = "async")] GLib.AsyncReadyCallback callback, void* source_tag, owned GLib.Error error);
		[PrintfFormat]
		[Version (since = "2.36")]
		public static void report_new_error (GLib.Object? source_object, [CCode (scope = "async")] GLib.AsyncReadyCallback callback, void* source_tag, GLib.Quark domain, int code, string format, ...);
	}

	public class TlsPassword : GLib.Object {
		[CCode (vfunc_name = "set_value")]
		public virtual void set_value_full ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gssize", type = "guchar*")] owned uint8[] value, GLib.DestroyNotify? notify = GLib.g_free);
	}

	public class VolumeMonitor : GLib.Object {
		[NoWrapper]
		public virtual bool is_supported ();
	}

	public interface AsyncInitable : GLib.Object {
		[CCode (finish_function = "g_async_initable_new_finish")]
		public static async GLib.Object new_async (GLib.Type object_type, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable, ...) throws GLib.Error;
		[CCode (finish_function = "g_async_initable_new_finish")]
		public static async GLib.Object new_valist_async (GLib.Type object_type, string first_property_name, va_list var_args, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null);
		[CCode (finish_function = "g_async_initable_new_finish")]
		[Version (deprecated = true, deprecated_since = "2.54", since = "2.22")]
		public static async GLib.Object newv_async (GLib.Type object_type, [CCode (array_length_pos = 1.1)] GLib.Parameter[] parameters, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null);
	}

	public interface File : GLib.Object {
		public virtual async bool copy_async (GLib.File destination, GLib.FileCopyFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, GLib.FileProgressCallback? progress_callback = null) throws GLib.Error;
		public async bool load_partial_contents_async (GLib.Cancellable? cancellable = null, [CCode (delegate_target_pos = -0.9)] GLib.FileReadMoreCallback read_more_callback, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error;
	}

	public interface Icon : GLib.Object {
		[NoWrapper]
		public virtual bool to_tokens (GLib.GenericArray<string> tokens, out int out_version);
		[NoWrapper]
		public virtual GLib.Icon? from_tokens (string[] tokens, int version) throws GLib.Error;
	}

	public delegate void SimpleActionActivateCallback (SimpleAction action, Variant? parameter);
	public delegate void SimpleActionChangeStateCallback (SimpleAction action, Variant value);
	[CCode (cheader_filename = "gio/gio.h", cname = "GAsyncReadyCallback", instance_pos = 2.9)]
	public delegate void TaskReadyCallback (GLib.Object? source_object, GLib.Task task);
	[CCode (has_target = false, cname = "GSourceFunc")]
	public delegate bool TaskSourceFunc (Task task);
	[CCode (cheader_filename = "gio/gio.h", instance_pos = 6.9)]
	public delegate 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", instance_pos = 7.9)]
	public delegate bool DBusInterfaceSetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name, GLib.Variant value) throws GLib.Error;

	[CCode (cheader_filename = "gio/gio.h", has_target = false, cname = "GSettingsBindGetMapping")]
	public delegate bool SettingsBindGetMappingShared (GLib.Value value, GLib.Variant variant, void* user_data);
	[CCode (cheader_filename = "gio/gio.h", has_target = false, cname = "GSettingsBindSetMapping")]
	public delegate GLib.Variant SettingsBindSetMappingShared (GLib.Value value, GLib.VariantType expected_type, void* user_data);
}