@girs/gio-2.0 2.76.1-3.2.0 → 2.77.0-3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/gio-2.0.d.cts +359 -35
- package/gio-2.0.d.ts +359 -35
- package/package.json +5 -5
- package/typedoc.json +1 -1
package/gio-2.0.d.ts
CHANGED
|
@@ -2177,6 +2177,9 @@ enum FileMeasureFlags {
|
|
|
2177
2177
|
* sizes. Normally, the block-size is used, if available, as this is a
|
|
2178
2178
|
* more accurate representation of disk space used.
|
|
2179
2179
|
* Compare with `du --apparent-size`.
|
|
2180
|
+
* Since GLib 2.78. and similarly to `du` since GNU Coreutils 9.2, this will
|
|
2181
|
+
* ignore the sizes of file types other than regular files and links, as the
|
|
2182
|
+
* sizes of other file types are not specified in a standard way.
|
|
2180
2183
|
*/
|
|
2181
2184
|
APPARENT_SIZE,
|
|
2182
2185
|
/**
|
|
@@ -4562,6 +4565,16 @@ function dtls_client_connection_new(base_socket: DatagramBased, server_identity:
|
|
|
4562
4565
|
* @returns the new #GDtlsServerConnection, or %NULL on error
|
|
4563
4566
|
*/
|
|
4564
4567
|
function dtls_server_connection_new(base_socket: DatagramBased, certificate: TlsCertificate | null): DtlsServerConnection
|
|
4568
|
+
/**
|
|
4569
|
+
* Constructs a #GFile from a vector of elements using the correct
|
|
4570
|
+
* separator for filenames.
|
|
4571
|
+
*
|
|
4572
|
+
* Using this function is equivalent to calling g_build_filenamev(),
|
|
4573
|
+
* followed by g_file_new_for_path() on the result.
|
|
4574
|
+
* @param args %NULL-terminated array of strings containing the path elements.
|
|
4575
|
+
* @returns a new #GFile
|
|
4576
|
+
*/
|
|
4577
|
+
function file_new_build_filenamev(args: string[]): File
|
|
4565
4578
|
/**
|
|
4566
4579
|
* Creates a #GFile with the given argument from the command line.
|
|
4567
4580
|
* The value of `arg` can be either a URI, an absolute path or a
|
|
@@ -6998,6 +7011,34 @@ interface ActionMap {
|
|
|
6998
7011
|
* @param action_name the name of the action
|
|
6999
7012
|
*/
|
|
7000
7013
|
remove_action(action_name: string | null): void
|
|
7014
|
+
/**
|
|
7015
|
+
* Remove actions from a #GActionMap. This is meant as the reverse of
|
|
7016
|
+
* g_action_map_add_action_entries().
|
|
7017
|
+
*
|
|
7018
|
+
*
|
|
7019
|
+
*
|
|
7020
|
+
* ```c
|
|
7021
|
+
* static const GActionEntry entries[] = {
|
|
7022
|
+
* { "quit", activate_quit },
|
|
7023
|
+
* { "print-string", activate_print_string, "s" }
|
|
7024
|
+
* };
|
|
7025
|
+
*
|
|
7026
|
+
* void
|
|
7027
|
+
* add_actions (GActionMap *map)
|
|
7028
|
+
* {
|
|
7029
|
+
* g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL);
|
|
7030
|
+
* }
|
|
7031
|
+
*
|
|
7032
|
+
* void
|
|
7033
|
+
* remove_actions (GActionMap *map)
|
|
7034
|
+
* {
|
|
7035
|
+
* g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
|
|
7036
|
+
* }
|
|
7037
|
+
* ```
|
|
7038
|
+
*
|
|
7039
|
+
* @param entries a pointer to the first item in an array of #GActionEntry structs
|
|
7040
|
+
*/
|
|
7041
|
+
remove_action_entries(entries: ActionEntry[]): void
|
|
7001
7042
|
|
|
7002
7043
|
// Own virtual methods of Gio-2.0.Gio.ActionMap
|
|
7003
7044
|
|
|
@@ -14834,7 +14875,7 @@ interface File {
|
|
|
14834
14875
|
* - g_file_new_tmp_async() to asynchronously create a temporary file.
|
|
14835
14876
|
* - g_file_new_tmp_dir_async() to asynchronously create a temporary directory.
|
|
14836
14877
|
* - g_file_parse_name() from a UTF-8 string gotten from g_file_get_parse_name().
|
|
14837
|
-
* - g_file_new_build_filename() to create a file from path elements.
|
|
14878
|
+
* - g_file_new_build_filename() or g_file_new_build_filenamev() to create a file from path elements.
|
|
14838
14879
|
*
|
|
14839
14880
|
* One way to think of a #GFile is as an abstraction of a pathname. For
|
|
14840
14881
|
* normal files the system pathname is what is stored internally, but as
|
|
@@ -14915,6 +14956,16 @@ class File extends GObject.Object {
|
|
|
14915
14956
|
|
|
14916
14957
|
constructor(config?: File.ConstructorProperties)
|
|
14917
14958
|
_init(config?: File.ConstructorProperties): void
|
|
14959
|
+
/**
|
|
14960
|
+
* Constructs a #GFile from a vector of elements using the correct
|
|
14961
|
+
* separator for filenames.
|
|
14962
|
+
*
|
|
14963
|
+
* Using this function is equivalent to calling g_build_filenamev(),
|
|
14964
|
+
* followed by g_file_new_for_path() on the result.
|
|
14965
|
+
* @param args %NULL-terminated array of strings containing the path elements.
|
|
14966
|
+
* @returns a new #GFile
|
|
14967
|
+
*/
|
|
14968
|
+
static new_build_filenamev(args: string[]): File
|
|
14918
14969
|
/**
|
|
14919
14970
|
* Creates a #GFile with the given argument from the command line.
|
|
14920
14971
|
* The value of `arg` can be either a URI, an absolute path or a
|
|
@@ -16709,6 +16760,9 @@ interface PollableInputStream extends InputStream {
|
|
|
16709
16760
|
* the stream may not actually be readable even after the source
|
|
16710
16761
|
* triggers, so you should use g_pollable_input_stream_read_nonblocking()
|
|
16711
16762
|
* rather than g_input_stream_read() from the callback.
|
|
16763
|
+
*
|
|
16764
|
+
* The behaviour of this method is undefined if
|
|
16765
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16712
16766
|
* @param cancellable a #GCancellable, or %NULL
|
|
16713
16767
|
* @returns a new #GSource
|
|
16714
16768
|
*/
|
|
@@ -16722,6 +16776,9 @@ interface PollableInputStream extends InputStream {
|
|
|
16722
16776
|
* non-blocking behavior, you should always use
|
|
16723
16777
|
* g_pollable_input_stream_read_nonblocking(), which will return a
|
|
16724
16778
|
* %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
|
|
16779
|
+
*
|
|
16780
|
+
* The behaviour of this method is undefined if
|
|
16781
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16725
16782
|
* @returns %TRUE if @stream is readable, %FALSE if not. If an error has occurred on @stream, this will result in g_pollable_input_stream_is_readable() returning %TRUE, and the next attempt to read will return the error.
|
|
16726
16783
|
*/
|
|
16727
16784
|
is_readable(): boolean
|
|
@@ -16737,6 +16794,9 @@ interface PollableInputStream extends InputStream {
|
|
|
16737
16794
|
* if `cancellable` has already been cancelled when you call, which
|
|
16738
16795
|
* may happen if you call this method after a source triggers due
|
|
16739
16796
|
* to having been cancelled.
|
|
16797
|
+
*
|
|
16798
|
+
* The behaviour of this method is undefined if
|
|
16799
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16740
16800
|
* @param cancellable a #GCancellable, or %NULL
|
|
16741
16801
|
* @returns the number of bytes read, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
|
|
16742
16802
|
*/
|
|
@@ -16765,6 +16825,9 @@ interface PollableInputStream extends InputStream {
|
|
|
16765
16825
|
* the stream may not actually be readable even after the source
|
|
16766
16826
|
* triggers, so you should use g_pollable_input_stream_read_nonblocking()
|
|
16767
16827
|
* rather than g_input_stream_read() from the callback.
|
|
16828
|
+
*
|
|
16829
|
+
* The behaviour of this method is undefined if
|
|
16830
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16768
16831
|
* @virtual
|
|
16769
16832
|
* @param cancellable a #GCancellable, or %NULL
|
|
16770
16833
|
* @returns a new #GSource
|
|
@@ -16779,6 +16842,9 @@ interface PollableInputStream extends InputStream {
|
|
|
16779
16842
|
* non-blocking behavior, you should always use
|
|
16780
16843
|
* g_pollable_input_stream_read_nonblocking(), which will return a
|
|
16781
16844
|
* %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
|
|
16845
|
+
*
|
|
16846
|
+
* The behaviour of this method is undefined if
|
|
16847
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16782
16848
|
* @virtual
|
|
16783
16849
|
* @returns %TRUE if @stream is readable, %FALSE if not. If an error has occurred on @stream, this will result in g_pollable_input_stream_is_readable() returning %TRUE, and the next attempt to read will return the error.
|
|
16784
16850
|
*/
|
|
@@ -16795,6 +16861,9 @@ interface PollableInputStream extends InputStream {
|
|
|
16795
16861
|
* if `cancellable` has already been cancelled when you call, which
|
|
16796
16862
|
* may happen if you call this method after a source triggers due
|
|
16797
16863
|
* to having been cancelled.
|
|
16864
|
+
*
|
|
16865
|
+
* The behaviour of this method is undefined if
|
|
16866
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16798
16867
|
* @virtual
|
|
16799
16868
|
* @returns the number of bytes read, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
|
|
16800
16869
|
*/
|
|
@@ -16813,6 +16882,11 @@ interface PollableInputStream extends InputStream {
|
|
|
16813
16882
|
* can be polled for readiness to read. This can be used when
|
|
16814
16883
|
* interfacing with a non-GIO API that expects
|
|
16815
16884
|
* UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
|
|
16885
|
+
*
|
|
16886
|
+
* Some classes may implement #GPollableInputStream but have only certain
|
|
16887
|
+
* instances of that class be pollable. If g_pollable_input_stream_can_poll()
|
|
16888
|
+
* returns %FALSE, then the behavior of other #GPollableInputStream methods is
|
|
16889
|
+
* undefined.
|
|
16816
16890
|
* @interface
|
|
16817
16891
|
*/
|
|
16818
16892
|
class PollableInputStream extends GObject.Object {
|
|
@@ -16861,6 +16935,9 @@ interface PollableOutputStream extends OutputStream {
|
|
|
16861
16935
|
* the stream may not actually be writable even after the source
|
|
16862
16936
|
* triggers, so you should use g_pollable_output_stream_write_nonblocking()
|
|
16863
16937
|
* rather than g_output_stream_write() from the callback.
|
|
16938
|
+
*
|
|
16939
|
+
* The behaviour of this method is undefined if
|
|
16940
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16864
16941
|
* @param cancellable a #GCancellable, or %NULL
|
|
16865
16942
|
* @returns a new #GSource
|
|
16866
16943
|
*/
|
|
@@ -16874,6 +16951,9 @@ interface PollableOutputStream extends OutputStream {
|
|
|
16874
16951
|
* non-blocking behavior, you should always use
|
|
16875
16952
|
* g_pollable_output_stream_write_nonblocking(), which will return a
|
|
16876
16953
|
* %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
|
|
16954
|
+
*
|
|
16955
|
+
* The behaviour of this method is undefined if
|
|
16956
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16877
16957
|
* @returns %TRUE if @stream is writable, %FALSE if not. If an error has occurred on @stream, this will result in g_pollable_output_stream_is_writable() returning %TRUE, and the next attempt to write will return the error.
|
|
16878
16958
|
*/
|
|
16879
16959
|
is_writable(): boolean
|
|
@@ -16893,6 +16973,9 @@ interface PollableOutputStream extends OutputStream {
|
|
|
16893
16973
|
* Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
|
|
16894
16974
|
* transports like D/TLS require that you re-send the same `buffer` and
|
|
16895
16975
|
* `count` in the next write call.
|
|
16976
|
+
*
|
|
16977
|
+
* The behaviour of this method is undefined if
|
|
16978
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16896
16979
|
* @param buffer a buffer to write data from
|
|
16897
16980
|
* @param cancellable a #GCancellable, or %NULL
|
|
16898
16981
|
* @returns the number of bytes written, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
|
|
@@ -16915,6 +16998,9 @@ interface PollableOutputStream extends OutputStream {
|
|
|
16915
16998
|
* Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying
|
|
16916
16999
|
* transports like D/TLS require that you re-send the same `vectors` and
|
|
16917
17000
|
* `n_vectors` in the next write call.
|
|
17001
|
+
*
|
|
17002
|
+
* The behaviour of this method is undefined if
|
|
17003
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16918
17004
|
* @param vectors the buffer containing the #GOutputVectors to write.
|
|
16919
17005
|
* @param cancellable a #GCancellable, or %NULL
|
|
16920
17006
|
* @returns %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK if the stream is not currently writable (and @error is *not* set), or %G_POLLABLE_RETURN_FAILED if there was an error in which case @error will be set.
|
|
@@ -16944,6 +17030,9 @@ interface PollableOutputStream extends OutputStream {
|
|
|
16944
17030
|
* the stream may not actually be writable even after the source
|
|
16945
17031
|
* triggers, so you should use g_pollable_output_stream_write_nonblocking()
|
|
16946
17032
|
* rather than g_output_stream_write() from the callback.
|
|
17033
|
+
*
|
|
17034
|
+
* The behaviour of this method is undefined if
|
|
17035
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16947
17036
|
* @virtual
|
|
16948
17037
|
* @param cancellable a #GCancellable, or %NULL
|
|
16949
17038
|
* @returns a new #GSource
|
|
@@ -16958,6 +17047,9 @@ interface PollableOutputStream extends OutputStream {
|
|
|
16958
17047
|
* non-blocking behavior, you should always use
|
|
16959
17048
|
* g_pollable_output_stream_write_nonblocking(), which will return a
|
|
16960
17049
|
* %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
|
|
17050
|
+
*
|
|
17051
|
+
* The behaviour of this method is undefined if
|
|
17052
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16961
17053
|
* @virtual
|
|
16962
17054
|
* @returns %TRUE if @stream is writable, %FALSE if not. If an error has occurred on @stream, this will result in g_pollable_output_stream_is_writable() returning %TRUE, and the next attempt to write will return the error.
|
|
16963
17055
|
*/
|
|
@@ -16978,6 +17070,9 @@ interface PollableOutputStream extends OutputStream {
|
|
|
16978
17070
|
* Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
|
|
16979
17071
|
* transports like D/TLS require that you re-send the same `buffer` and
|
|
16980
17072
|
* `count` in the next write call.
|
|
17073
|
+
*
|
|
17074
|
+
* The behaviour of this method is undefined if
|
|
17075
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16981
17076
|
* @virtual
|
|
16982
17077
|
* @param buffer a buffer to write data from
|
|
16983
17078
|
* @returns the number of bytes written, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
|
|
@@ -17000,6 +17095,9 @@ interface PollableOutputStream extends OutputStream {
|
|
|
17000
17095
|
* Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying
|
|
17001
17096
|
* transports like D/TLS require that you re-send the same `vectors` and
|
|
17002
17097
|
* `n_vectors` in the next write call.
|
|
17098
|
+
*
|
|
17099
|
+
* The behaviour of this method is undefined if
|
|
17100
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
17003
17101
|
* @virtual
|
|
17004
17102
|
* @param vectors the buffer containing the #GOutputVectors to write.
|
|
17005
17103
|
* @returns %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK if the stream is not currently writable (and @error is *not* set), or %G_POLLABLE_RETURN_FAILED if there was an error in which case @error will be set.
|
|
@@ -17019,6 +17117,11 @@ interface PollableOutputStream extends OutputStream {
|
|
|
17019
17117
|
* can be polled for readiness to write. This can be used when
|
|
17020
17118
|
* interfacing with a non-GIO API that expects
|
|
17021
17119
|
* UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
|
|
17120
|
+
*
|
|
17121
|
+
* Some classes may implement #GPollableOutputStream but have only certain
|
|
17122
|
+
* instances of that class be pollable. If g_pollable_output_stream_can_poll()
|
|
17123
|
+
* returns %FALSE, then the behavior of other #GPollableOutputStream methods is
|
|
17124
|
+
* undefined.
|
|
17022
17125
|
* @interface
|
|
17023
17126
|
*/
|
|
17024
17127
|
class PollableOutputStream extends GObject.Object {
|
|
@@ -19091,19 +19194,34 @@ interface AppInfoMonitor {
|
|
|
19091
19194
|
|
|
19092
19195
|
/**
|
|
19093
19196
|
* #GAppInfoMonitor is a very simple object used for monitoring the app
|
|
19094
|
-
* info database for changes (
|
|
19095
|
-
* applications).
|
|
19197
|
+
* info database for changes (newly installed or removed applications).
|
|
19096
19198
|
*
|
|
19097
19199
|
* Call g_app_info_monitor_get() to get a #GAppInfoMonitor and connect
|
|
19098
|
-
* to the
|
|
19200
|
+
* to the #GAppInfoMonitor::changed signal. The signal will be emitted once when
|
|
19201
|
+
* the app info database changes, and will not be emitted again until after the
|
|
19202
|
+
* next call to g_app_info_get_all() or another `g_app_info_*()` function. This
|
|
19203
|
+
* is because monitoring the app info database for changes is expensive.
|
|
19204
|
+
*
|
|
19205
|
+
* The following functions will re-arm the #GAppInfoMonitor::changed signal so
|
|
19206
|
+
* it can be emitted again:
|
|
19207
|
+
* - g_app_info_get_all()
|
|
19208
|
+
* - g_app_info_get_all_for_type()
|
|
19209
|
+
* - g_app_info_get_default_for_type()
|
|
19210
|
+
* - g_app_info_get_fallback_for_type()
|
|
19211
|
+
* - g_app_info_get_recommended_for_type()
|
|
19212
|
+
* - g_desktop_app_info_get_implementations()
|
|
19213
|
+
* - g_desktop_app_info_new()
|
|
19214
|
+
* - g_desktop_app_info_new_from_filename()
|
|
19215
|
+
* - g_desktop_app_info_new_from_keyfile()
|
|
19216
|
+
* - g_desktop_app_info_search()
|
|
19099
19217
|
*
|
|
19100
19218
|
* In the usual case, applications should try to make note of the change
|
|
19101
19219
|
* (doing things like invalidating caches) but not act on it. In
|
|
19102
19220
|
* particular, applications should avoid making calls to #GAppInfo APIs
|
|
19103
19221
|
* in response to the change signal, deferring these until the time that
|
|
19104
|
-
* the data is actually required. The exception to this case is when
|
|
19222
|
+
* the updated data is actually required. The exception to this case is when
|
|
19105
19223
|
* application information is actually being displayed on the screen
|
|
19106
|
-
* (
|
|
19224
|
+
* (for example, during a search or when the list of all applications is shown).
|
|
19107
19225
|
* The reason for this is that changes to the list of installed
|
|
19108
19226
|
* applications often come in groups (like during system updates) and
|
|
19109
19227
|
* rescanning the list on every change is pointless and expensive.
|
|
@@ -19128,6 +19246,10 @@ class AppInfoMonitor extends GObject.Object {
|
|
|
19128
19246
|
* thread-default main context whenever the list of installed
|
|
19129
19247
|
* applications (as reported by g_app_info_get_all()) may have changed.
|
|
19130
19248
|
*
|
|
19249
|
+
* The #GAppInfoMonitor::changed signal will only be emitted once until
|
|
19250
|
+
* g_app_info_get_all() (or another `g_app_info_*()` function) is called. Doing
|
|
19251
|
+
* so will re-arm the signal ready to notify about the next change.
|
|
19252
|
+
*
|
|
19131
19253
|
* You must only call g_object_unref() on the return value from under
|
|
19132
19254
|
* the same main context as you created it.
|
|
19133
19255
|
* @returns a reference to a #GAppInfoMonitor
|
|
@@ -19640,7 +19762,7 @@ interface Application extends ActionGroup, ActionMap {
|
|
|
19640
19762
|
* Increases the use count of `application`.
|
|
19641
19763
|
*
|
|
19642
19764
|
* Use this function to indicate that the application has a reason to
|
|
19643
|
-
* continue to run. For example, g_application_hold() is called by GTK
|
|
19765
|
+
* continue to run. For example, g_application_hold() is called by GTK
|
|
19644
19766
|
* when a toplevel window is on the screen.
|
|
19645
19767
|
*
|
|
19646
19768
|
* To cancel the hold, call g_application_release().
|
|
@@ -20181,6 +20303,10 @@ interface Application extends ActionGroup, ActionMap {
|
|
|
20181
20303
|
* conveniently access them remotely. GIO provides a #GDBusMenuModel wrapper
|
|
20182
20304
|
* for remote access to exported #GMenuModels.
|
|
20183
20305
|
*
|
|
20306
|
+
* Note: Due to the fact that actions are exported on the session bus,
|
|
20307
|
+
* using `maybe` parameters is not supported, since D-Bus does not support
|
|
20308
|
+
* `maybe` types.
|
|
20309
|
+
*
|
|
20184
20310
|
* There is a number of different entry points into a GApplication:
|
|
20185
20311
|
*
|
|
20186
20312
|
* - via 'Activate' (i.e. just starting the application)
|
|
@@ -26335,9 +26461,10 @@ interface DebugControllerDBus extends DebugController, Initable {
|
|
|
26335
26461
|
* #GDebugController:debug-enabled and, by default, g_log_get_debug_enabled().
|
|
26336
26462
|
* default.
|
|
26337
26463
|
*
|
|
26338
|
-
* By default,
|
|
26339
|
-
*
|
|
26340
|
-
*
|
|
26464
|
+
* By default, no processes are allowed to call `SetDebugEnabled()` unless a
|
|
26465
|
+
* #GDebugControllerDBus::authorize signal handler is installed. This is because
|
|
26466
|
+
* the process may be privileged, or might expose sensitive information in its
|
|
26467
|
+
* debug output. You may want to restrict the ability to enable debug output to
|
|
26341
26468
|
* privileged users or processes.
|
|
26342
26469
|
*
|
|
26343
26470
|
* One option is to install a D-Bus security policy which restricts access to
|
|
@@ -27163,22 +27290,69 @@ interface FileEnumerator {
|
|
|
27163
27290
|
next_file(cancellable: Cancellable | null): FileInfo | null
|
|
27164
27291
|
/**
|
|
27165
27292
|
* Request information for a number of files from the enumerator asynchronously.
|
|
27166
|
-
* When all
|
|
27293
|
+
* When all I/O for the operation is finished the `callback` will be called with
|
|
27167
27294
|
* the requested information.
|
|
27168
27295
|
*
|
|
27169
27296
|
* See the documentation of #GFileEnumerator for information about the
|
|
27170
27297
|
* order of returned files.
|
|
27171
27298
|
*
|
|
27172
|
-
*
|
|
27173
|
-
*
|
|
27174
|
-
*
|
|
27175
|
-
*
|
|
27176
|
-
*
|
|
27299
|
+
* Once the end of the enumerator is reached, or if an error occurs, the
|
|
27300
|
+
* `callback` will be called with an empty list. In this case, the previous call
|
|
27301
|
+
* to g_file_enumerator_next_files_async() will typically have returned fewer
|
|
27302
|
+
* than `num_files` items.
|
|
27303
|
+
*
|
|
27304
|
+
* If a request is cancelled the callback will be called with
|
|
27305
|
+
* %G_IO_ERROR_CANCELLED.
|
|
27306
|
+
*
|
|
27307
|
+
* This leads to the following pseudo-code usage:
|
|
27308
|
+
*
|
|
27309
|
+
* ```
|
|
27310
|
+
* g_autoptr(GFile) dir = get_directory ();
|
|
27311
|
+
* g_autoptr(GFileEnumerator) enumerator = NULL;
|
|
27312
|
+
* g_autolist(GFileInfo) files = NULL;
|
|
27313
|
+
* g_autoptr(GError) local_error = NULL;
|
|
27314
|
+
*
|
|
27315
|
+
* enumerator = yield g_file_enumerate_children_async (dir,
|
|
27316
|
+
* G_FILE_ATTRIBUTE_STANDARD_NAME ","
|
|
27317
|
+
* G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
|
27318
|
+
* G_FILE_QUERY_INFO_NONE,
|
|
27319
|
+
* G_PRIORITY_DEFAULT,
|
|
27320
|
+
* cancellable,
|
|
27321
|
+
* …,
|
|
27322
|
+
* &local_error);
|
|
27323
|
+
* if (enumerator == NULL)
|
|
27324
|
+
* g_error ("Error enumerating: %s", local_error->message);
|
|
27325
|
+
*
|
|
27326
|
+
* // Loop until no files are returned, either because the end of the enumerator
|
|
27327
|
+
* // has been reached, or an error was returned.
|
|
27328
|
+
* do
|
|
27329
|
+
* {
|
|
27330
|
+
* files = yield g_file_enumerator_next_files_async (enumerator,
|
|
27331
|
+
* 5, // number of files to request
|
|
27332
|
+
* G_PRIORITY_DEFAULT,
|
|
27333
|
+
* cancellable,
|
|
27334
|
+
* …,
|
|
27335
|
+
* &local_error);
|
|
27336
|
+
*
|
|
27337
|
+
* // Process the returned files, but don’t assume that exactly 5 were returned.
|
|
27338
|
+
* for (GList *l = files; l != NULL; l = l->next)
|
|
27339
|
+
* {
|
|
27340
|
+
* GFileInfo *info = l->data;
|
|
27341
|
+
* handle_file_info (info);
|
|
27342
|
+
* }
|
|
27343
|
+
* }
|
|
27344
|
+
* while (files != NULL);
|
|
27345
|
+
*
|
|
27346
|
+
* if (local_error != NULL &&
|
|
27347
|
+
* !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
|
27348
|
+
* g_error ("Error while enumerating: %s", local_error->message);
|
|
27349
|
+
* ```
|
|
27350
|
+
*
|
|
27177
27351
|
*
|
|
27178
27352
|
* During an async request no other sync and async calls are allowed, and will
|
|
27179
27353
|
* result in %G_IO_ERROR_PENDING errors.
|
|
27180
27354
|
*
|
|
27181
|
-
* Any outstanding
|
|
27355
|
+
* Any outstanding I/O request with higher priority (lower numerical value) will
|
|
27182
27356
|
* be executed before an outstanding request with lower priority. Default
|
|
27183
27357
|
* priority is %G_PRIORITY_DEFAULT.
|
|
27184
27358
|
* @param num_files the number of file info objects to request
|
|
@@ -27194,22 +27368,69 @@ interface FileEnumerator {
|
|
|
27194
27368
|
* Promisified version of {@link next_files_async}
|
|
27195
27369
|
*
|
|
27196
27370
|
* Request information for a number of files from the enumerator asynchronously.
|
|
27197
|
-
* When all
|
|
27371
|
+
* When all I/O for the operation is finished the `callback` will be called with
|
|
27198
27372
|
* the requested information.
|
|
27199
27373
|
*
|
|
27200
27374
|
* See the documentation of #GFileEnumerator for information about the
|
|
27201
27375
|
* order of returned files.
|
|
27202
27376
|
*
|
|
27203
|
-
*
|
|
27204
|
-
*
|
|
27205
|
-
*
|
|
27206
|
-
*
|
|
27207
|
-
*
|
|
27377
|
+
* Once the end of the enumerator is reached, or if an error occurs, the
|
|
27378
|
+
* `callback` will be called with an empty list. In this case, the previous call
|
|
27379
|
+
* to g_file_enumerator_next_files_async() will typically have returned fewer
|
|
27380
|
+
* than `num_files` items.
|
|
27381
|
+
*
|
|
27382
|
+
* If a request is cancelled the callback will be called with
|
|
27383
|
+
* %G_IO_ERROR_CANCELLED.
|
|
27384
|
+
*
|
|
27385
|
+
* This leads to the following pseudo-code usage:
|
|
27386
|
+
*
|
|
27387
|
+
* ```
|
|
27388
|
+
* g_autoptr(GFile) dir = get_directory ();
|
|
27389
|
+
* g_autoptr(GFileEnumerator) enumerator = NULL;
|
|
27390
|
+
* g_autolist(GFileInfo) files = NULL;
|
|
27391
|
+
* g_autoptr(GError) local_error = NULL;
|
|
27392
|
+
*
|
|
27393
|
+
* enumerator = yield g_file_enumerate_children_async (dir,
|
|
27394
|
+
* G_FILE_ATTRIBUTE_STANDARD_NAME ","
|
|
27395
|
+
* G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
|
27396
|
+
* G_FILE_QUERY_INFO_NONE,
|
|
27397
|
+
* G_PRIORITY_DEFAULT,
|
|
27398
|
+
* cancellable,
|
|
27399
|
+
* …,
|
|
27400
|
+
* &local_error);
|
|
27401
|
+
* if (enumerator == NULL)
|
|
27402
|
+
* g_error ("Error enumerating: %s", local_error->message);
|
|
27403
|
+
*
|
|
27404
|
+
* // Loop until no files are returned, either because the end of the enumerator
|
|
27405
|
+
* // has been reached, or an error was returned.
|
|
27406
|
+
* do
|
|
27407
|
+
* {
|
|
27408
|
+
* files = yield g_file_enumerator_next_files_async (enumerator,
|
|
27409
|
+
* 5, // number of files to request
|
|
27410
|
+
* G_PRIORITY_DEFAULT,
|
|
27411
|
+
* cancellable,
|
|
27412
|
+
* …,
|
|
27413
|
+
* &local_error);
|
|
27414
|
+
*
|
|
27415
|
+
* // Process the returned files, but don’t assume that exactly 5 were returned.
|
|
27416
|
+
* for (GList *l = files; l != NULL; l = l->next)
|
|
27417
|
+
* {
|
|
27418
|
+
* GFileInfo *info = l->data;
|
|
27419
|
+
* handle_file_info (info);
|
|
27420
|
+
* }
|
|
27421
|
+
* }
|
|
27422
|
+
* while (files != NULL);
|
|
27423
|
+
*
|
|
27424
|
+
* if (local_error != NULL &&
|
|
27425
|
+
* !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
|
27426
|
+
* g_error ("Error while enumerating: %s", local_error->message);
|
|
27427
|
+
* ```
|
|
27428
|
+
*
|
|
27208
27429
|
*
|
|
27209
27430
|
* During an async request no other sync and async calls are allowed, and will
|
|
27210
27431
|
* result in %G_IO_ERROR_PENDING errors.
|
|
27211
27432
|
*
|
|
27212
|
-
* Any outstanding
|
|
27433
|
+
* Any outstanding I/O request with higher priority (lower numerical value) will
|
|
27213
27434
|
* be executed before an outstanding request with lower priority. Default
|
|
27214
27435
|
* priority is %G_PRIORITY_DEFAULT.
|
|
27215
27436
|
* @param num_files the number of file info objects to request
|
|
@@ -27281,22 +27502,69 @@ interface FileEnumerator {
|
|
|
27281
27502
|
vfunc_next_file(cancellable: Cancellable | null): FileInfo | null
|
|
27282
27503
|
/**
|
|
27283
27504
|
* Request information for a number of files from the enumerator asynchronously.
|
|
27284
|
-
* When all
|
|
27505
|
+
* When all I/O for the operation is finished the `callback` will be called with
|
|
27285
27506
|
* the requested information.
|
|
27286
27507
|
*
|
|
27287
27508
|
* See the documentation of #GFileEnumerator for information about the
|
|
27288
27509
|
* order of returned files.
|
|
27289
27510
|
*
|
|
27290
|
-
*
|
|
27291
|
-
*
|
|
27292
|
-
*
|
|
27293
|
-
*
|
|
27294
|
-
*
|
|
27511
|
+
* Once the end of the enumerator is reached, or if an error occurs, the
|
|
27512
|
+
* `callback` will be called with an empty list. In this case, the previous call
|
|
27513
|
+
* to g_file_enumerator_next_files_async() will typically have returned fewer
|
|
27514
|
+
* than `num_files` items.
|
|
27515
|
+
*
|
|
27516
|
+
* If a request is cancelled the callback will be called with
|
|
27517
|
+
* %G_IO_ERROR_CANCELLED.
|
|
27518
|
+
*
|
|
27519
|
+
* This leads to the following pseudo-code usage:
|
|
27520
|
+
*
|
|
27521
|
+
* ```
|
|
27522
|
+
* g_autoptr(GFile) dir = get_directory ();
|
|
27523
|
+
* g_autoptr(GFileEnumerator) enumerator = NULL;
|
|
27524
|
+
* g_autolist(GFileInfo) files = NULL;
|
|
27525
|
+
* g_autoptr(GError) local_error = NULL;
|
|
27526
|
+
*
|
|
27527
|
+
* enumerator = yield g_file_enumerate_children_async (dir,
|
|
27528
|
+
* G_FILE_ATTRIBUTE_STANDARD_NAME ","
|
|
27529
|
+
* G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
|
27530
|
+
* G_FILE_QUERY_INFO_NONE,
|
|
27531
|
+
* G_PRIORITY_DEFAULT,
|
|
27532
|
+
* cancellable,
|
|
27533
|
+
* …,
|
|
27534
|
+
* &local_error);
|
|
27535
|
+
* if (enumerator == NULL)
|
|
27536
|
+
* g_error ("Error enumerating: %s", local_error->message);
|
|
27537
|
+
*
|
|
27538
|
+
* // Loop until no files are returned, either because the end of the enumerator
|
|
27539
|
+
* // has been reached, or an error was returned.
|
|
27540
|
+
* do
|
|
27541
|
+
* {
|
|
27542
|
+
* files = yield g_file_enumerator_next_files_async (enumerator,
|
|
27543
|
+
* 5, // number of files to request
|
|
27544
|
+
* G_PRIORITY_DEFAULT,
|
|
27545
|
+
* cancellable,
|
|
27546
|
+
* …,
|
|
27547
|
+
* &local_error);
|
|
27548
|
+
*
|
|
27549
|
+
* // Process the returned files, but don’t assume that exactly 5 were returned.
|
|
27550
|
+
* for (GList *l = files; l != NULL; l = l->next)
|
|
27551
|
+
* {
|
|
27552
|
+
* GFileInfo *info = l->data;
|
|
27553
|
+
* handle_file_info (info);
|
|
27554
|
+
* }
|
|
27555
|
+
* }
|
|
27556
|
+
* while (files != NULL);
|
|
27557
|
+
*
|
|
27558
|
+
* if (local_error != NULL &&
|
|
27559
|
+
* !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
|
27560
|
+
* g_error ("Error while enumerating: %s", local_error->message);
|
|
27561
|
+
* ```
|
|
27562
|
+
*
|
|
27295
27563
|
*
|
|
27296
27564
|
* During an async request no other sync and async calls are allowed, and will
|
|
27297
27565
|
* result in %G_IO_ERROR_PENDING errors.
|
|
27298
27566
|
*
|
|
27299
|
-
* Any outstanding
|
|
27567
|
+
* Any outstanding I/O request with higher priority (lower numerical value) will
|
|
27300
27568
|
* be executed before an outstanding request with lower priority. Default
|
|
27301
27569
|
* priority is %G_PRIORITY_DEFAULT.
|
|
27302
27570
|
* @virtual
|
|
@@ -28161,7 +28429,7 @@ interface FileInfo {
|
|
|
28161
28429
|
* to the given symlink target.
|
|
28162
28430
|
* @param symlink_target a static string containing a path to a symlink target.
|
|
28163
28431
|
*/
|
|
28164
|
-
set_symlink_target(symlink_target: string
|
|
28432
|
+
set_symlink_target(symlink_target: string): void
|
|
28165
28433
|
/**
|
|
28166
28434
|
* Unsets a mask set by g_file_info_set_attribute_mask(), if one
|
|
28167
28435
|
* is set.
|
|
@@ -30469,7 +30737,7 @@ interface InputStream {
|
|
|
30469
30737
|
* streaming APIs.
|
|
30470
30738
|
*
|
|
30471
30739
|
* All of these functions have async variants too.
|
|
30472
|
-
* @
|
|
30740
|
+
* @class
|
|
30473
30741
|
*/
|
|
30474
30742
|
class InputStream extends GObject.Object {
|
|
30475
30743
|
|
|
@@ -33970,7 +34238,7 @@ interface OutputStream {
|
|
|
33970
34238
|
* streaming APIs.
|
|
33971
34239
|
*
|
|
33972
34240
|
* All of these functions have async variants too.
|
|
33973
|
-
* @
|
|
34241
|
+
* @class
|
|
33974
34242
|
*/
|
|
33975
34243
|
class OutputStream extends GObject.Object {
|
|
33976
34244
|
|
|
@@ -34810,12 +35078,44 @@ module Resolver {
|
|
|
34810
35078
|
// Constructor properties interface
|
|
34811
35079
|
|
|
34812
35080
|
interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
35081
|
+
|
|
35082
|
+
// Own constructor properties of Gio-2.0.Gio.Resolver
|
|
35083
|
+
|
|
35084
|
+
/**
|
|
35085
|
+
* The timeout applied to all resolver lookups, in milliseconds.
|
|
35086
|
+
*
|
|
35087
|
+
* This may be changed through the lifetime of the #GResolver. The new value
|
|
35088
|
+
* will apply to any lookups started after the change, but not to any
|
|
35089
|
+
* already-ongoing lookups.
|
|
35090
|
+
*
|
|
35091
|
+
* If this is `0`, no timeout is applied to lookups.
|
|
35092
|
+
*
|
|
35093
|
+
* No timeout was applied to lookups before this property was added in
|
|
35094
|
+
* GLib 2.78.
|
|
35095
|
+
*/
|
|
35096
|
+
timeout?: number | null
|
|
34813
35097
|
}
|
|
34814
35098
|
|
|
34815
35099
|
}
|
|
34816
35100
|
|
|
34817
35101
|
interface Resolver {
|
|
34818
35102
|
|
|
35103
|
+
// Own properties of Gio-2.0.Gio.Resolver
|
|
35104
|
+
|
|
35105
|
+
/**
|
|
35106
|
+
* The timeout applied to all resolver lookups, in milliseconds.
|
|
35107
|
+
*
|
|
35108
|
+
* This may be changed through the lifetime of the #GResolver. The new value
|
|
35109
|
+
* will apply to any lookups started after the change, but not to any
|
|
35110
|
+
* already-ongoing lookups.
|
|
35111
|
+
*
|
|
35112
|
+
* If this is `0`, no timeout is applied to lookups.
|
|
35113
|
+
*
|
|
35114
|
+
* No timeout was applied to lookups before this property was added in
|
|
35115
|
+
* GLib 2.78.
|
|
35116
|
+
*/
|
|
35117
|
+
timeout: number
|
|
35118
|
+
|
|
34819
35119
|
// Own fields of Gio-2.0.Gio.Resolver
|
|
34820
35120
|
|
|
34821
35121
|
parent_instance: GObject.Object
|
|
@@ -34823,6 +35123,11 @@ interface Resolver {
|
|
|
34823
35123
|
|
|
34824
35124
|
// Owm methods of Gio-2.0.Gio.Resolver
|
|
34825
35125
|
|
|
35126
|
+
/**
|
|
35127
|
+
* Get the timeout applied to all resolver lookups. See #GResolver:timeout.
|
|
35128
|
+
* @returns the resolver timeout, in milliseconds, or `0` for no timeout
|
|
35129
|
+
*/
|
|
35130
|
+
get_timeout(): number
|
|
34826
35131
|
/**
|
|
34827
35132
|
* Synchronously reverse-resolves `address` to determine its
|
|
34828
35133
|
* associated hostname.
|
|
@@ -35125,6 +35430,11 @@ interface Resolver {
|
|
|
35125
35430
|
* itself as the default resolver for all later code to use.
|
|
35126
35431
|
*/
|
|
35127
35432
|
set_default(): void
|
|
35433
|
+
/**
|
|
35434
|
+
* Set the timeout applied to all resolver lookups. See #GResolver:timeout.
|
|
35435
|
+
* @param timeout_ms timeout in milliseconds, or `0` for no timeouts
|
|
35436
|
+
*/
|
|
35437
|
+
set_timeout(timeout_ms: number): void
|
|
35128
35438
|
|
|
35129
35439
|
// Own virtual methods of Gio-2.0.Gio.Resolver
|
|
35130
35440
|
|
|
@@ -35321,6 +35631,9 @@ interface Resolver {
|
|
|
35321
35631
|
|
|
35322
35632
|
// Class property signals of Gio-2.0.Gio.Resolver
|
|
35323
35633
|
|
|
35634
|
+
connect(sigName: "notify::timeout", callback: (($obj: Resolver, pspec: GObject.ParamSpec) => void)): number
|
|
35635
|
+
connect_after(sigName: "notify::timeout", callback: (($obj: Resolver, pspec: GObject.ParamSpec) => void)): number
|
|
35636
|
+
emit(sigName: "notify::timeout", ...args: any[]): void
|
|
35324
35637
|
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
35325
35638
|
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
35326
35639
|
emit(sigName: string, ...args: any[]): void
|
|
@@ -35336,6 +35649,10 @@ interface Resolver {
|
|
|
35336
35649
|
* #GNetworkAddress and #GNetworkService provide wrappers around
|
|
35337
35650
|
* #GResolver functionality that also implement #GSocketConnectable,
|
|
35338
35651
|
* making it easy to connect to a remote host/service.
|
|
35652
|
+
*
|
|
35653
|
+
* The default resolver (see g_resolver_get_default()) has a timeout of 30s set
|
|
35654
|
+
* on it since GLib 2.78. Earlier versions of GLib did not support resolver
|
|
35655
|
+
* timeouts.
|
|
35339
35656
|
* @class
|
|
35340
35657
|
*/
|
|
35341
35658
|
class Resolver extends GObject.Object {
|
|
@@ -41652,6 +41969,13 @@ interface Task extends AsyncResult {
|
|
|
41652
41969
|
* do this. If you have a very large number of tasks to run (several tens of
|
|
41653
41970
|
* tasks), but don't want them to all run at once, you should only queue a
|
|
41654
41971
|
* limited number of them (around ten) at a time.
|
|
41972
|
+
*
|
|
41973
|
+
* Be aware that if your task depends on other tasks to complete, use of this
|
|
41974
|
+
* function could lead to a livelock if the other tasks also use this function
|
|
41975
|
+
* and enough of them (around 10) execute in a dependency chain, as that will
|
|
41976
|
+
* exhaust the thread pool. If this situation is possible, consider using a
|
|
41977
|
+
* separate worker thread or thread pool explicitly, rather than using
|
|
41978
|
+
* g_task_run_in_thread().
|
|
41655
41979
|
* @param task_func a #GTaskThreadFunc
|
|
41656
41980
|
*/
|
|
41657
41981
|
run_in_thread(task_func: TaskThreadFunc): void
|
|
@@ -45414,7 +45738,7 @@ interface TlsInteraction {
|
|
|
45414
45738
|
* initialization function. Any interactions not implemented will return
|
|
45415
45739
|
* %G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method,
|
|
45416
45740
|
* it must also implement the corresponding finish method.
|
|
45417
|
-
* @
|
|
45741
|
+
* @interface
|
|
45418
45742
|
*/
|
|
45419
45743
|
class TlsInteraction extends GObject.Object {
|
|
45420
45744
|
|