@girs/gio-2.0 2.76.1-3.2.3 → 2.78.0-3.2.4
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 +522 -127
- package/gio-2.0.d.ts +522 -127
- package/package.json +5 -5
package/gio-2.0.d.cts
CHANGED
|
@@ -2175,6 +2175,9 @@ export enum FileMeasureFlags {
|
|
|
2175
2175
|
* sizes. Normally, the block-size is used, if available, as this is a
|
|
2176
2176
|
* more accurate representation of disk space used.
|
|
2177
2177
|
* Compare with `du --apparent-size`.
|
|
2178
|
+
* Since GLib 2.78. and similarly to `du` since GNU Coreutils 9.2, this will
|
|
2179
|
+
* ignore the sizes of file types other than regular files and links, as the
|
|
2180
|
+
* sizes of other file types are not specified in a standard way.
|
|
2178
2181
|
*/
|
|
2179
2182
|
APPARENT_SIZE,
|
|
2180
2183
|
/**
|
|
@@ -4560,6 +4563,16 @@ export function dtls_client_connection_new(base_socket: DatagramBased, server_id
|
|
|
4560
4563
|
* @returns the new #GDtlsServerConnection, or %NULL on error
|
|
4561
4564
|
*/
|
|
4562
4565
|
export function dtls_server_connection_new(base_socket: DatagramBased, certificate: TlsCertificate | null): DtlsServerConnection
|
|
4566
|
+
/**
|
|
4567
|
+
* Constructs a #GFile from a vector of elements using the correct
|
|
4568
|
+
* separator for filenames.
|
|
4569
|
+
*
|
|
4570
|
+
* Using this function is equivalent to calling g_build_filenamev(),
|
|
4571
|
+
* followed by g_file_new_for_path() on the result.
|
|
4572
|
+
* @param args %NULL-terminated array of strings containing the path elements.
|
|
4573
|
+
* @returns a new #GFile
|
|
4574
|
+
*/
|
|
4575
|
+
export function file_new_build_filenamev(args: string[]): File
|
|
4563
4576
|
/**
|
|
4564
4577
|
* Creates a #GFile with the given argument from the command line.
|
|
4565
4578
|
* The value of `arg` can be either a URI, an absolute path or a
|
|
@@ -6996,6 +7009,34 @@ export interface ActionMap {
|
|
|
6996
7009
|
* @param action_name the name of the action
|
|
6997
7010
|
*/
|
|
6998
7011
|
remove_action(action_name: string | null): void
|
|
7012
|
+
/**
|
|
7013
|
+
* Remove actions from a #GActionMap. This is meant as the reverse of
|
|
7014
|
+
* g_action_map_add_action_entries().
|
|
7015
|
+
*
|
|
7016
|
+
*
|
|
7017
|
+
*
|
|
7018
|
+
* ```c
|
|
7019
|
+
* static const GActionEntry entries[] = {
|
|
7020
|
+
* { "quit", activate_quit },
|
|
7021
|
+
* { "print-string", activate_print_string, "s" }
|
|
7022
|
+
* };
|
|
7023
|
+
*
|
|
7024
|
+
* void
|
|
7025
|
+
* add_actions (GActionMap *map)
|
|
7026
|
+
* {
|
|
7027
|
+
* g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL);
|
|
7028
|
+
* }
|
|
7029
|
+
*
|
|
7030
|
+
* void
|
|
7031
|
+
* remove_actions (GActionMap *map)
|
|
7032
|
+
* {
|
|
7033
|
+
* g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
|
|
7034
|
+
* }
|
|
7035
|
+
* ```
|
|
7036
|
+
*
|
|
7037
|
+
* @param entries a pointer to the first item in an array of #GActionEntry structs
|
|
7038
|
+
*/
|
|
7039
|
+
remove_action_entries(entries: ActionEntry[]): void
|
|
6999
7040
|
|
|
7000
7041
|
// Own virtual methods of Gio-2.0.Gio.ActionMap
|
|
7001
7042
|
|
|
@@ -11090,7 +11131,7 @@ export interface File {
|
|
|
11090
11131
|
* @param flags a set of #GFileCreateFlags
|
|
11091
11132
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
11092
11133
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11093
|
-
* @param callback a #GAsyncReadyCallback
|
|
11134
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11094
11135
|
*/
|
|
11095
11136
|
append_to_async(flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
11096
11137
|
|
|
@@ -11198,8 +11239,34 @@ export interface File {
|
|
|
11198
11239
|
* @param flags set of #GFileCopyFlags
|
|
11199
11240
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
11200
11241
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11242
|
+
* @param progress_callback function to callback with progress information, or %NULL if progress information is not needed
|
|
11243
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11244
|
+
*/
|
|
11245
|
+
copy_async(destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null, callback: AsyncReadyCallback<this> | null): void
|
|
11246
|
+
|
|
11247
|
+
// Overloads of copy_async
|
|
11248
|
+
|
|
11249
|
+
/**
|
|
11250
|
+
* Promisified version of {@link copy_async}
|
|
11251
|
+
*
|
|
11252
|
+
* Copies the file `source` to the location specified by `destination`
|
|
11253
|
+
* asynchronously. For details of the behaviour, see g_file_copy().
|
|
11254
|
+
*
|
|
11255
|
+
* If `progress_callback` is not %NULL, then that function that will be called
|
|
11256
|
+
* just like in g_file_copy(). The callback will run in the default main context
|
|
11257
|
+
* of the thread calling g_file_copy_async() — the same context as `callback` is
|
|
11258
|
+
* run in.
|
|
11259
|
+
*
|
|
11260
|
+
* When the operation is finished, `callback` will be called. You can then call
|
|
11261
|
+
* g_file_copy_finish() to get the result of the operation.
|
|
11262
|
+
* @param destination destination #GFile
|
|
11263
|
+
* @param flags set of #GFileCopyFlags
|
|
11264
|
+
* @param io_priority the [I/O priority][io-priority] of the request
|
|
11265
|
+
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11266
|
+
* @param progress_callback function to callback with progress information, or %NULL if progress information is not needed
|
|
11267
|
+
* @returns A Promise of: a %TRUE on success, %FALSE on error.
|
|
11201
11268
|
*/
|
|
11202
|
-
copy_async(destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null):
|
|
11269
|
+
copy_async(destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null): globalThis.Promise<boolean>
|
|
11203
11270
|
/**
|
|
11204
11271
|
* Copies the file attributes from `source` to `destination`.
|
|
11205
11272
|
*
|
|
@@ -11259,7 +11326,7 @@ export interface File {
|
|
|
11259
11326
|
* @param flags a set of #GFileCreateFlags
|
|
11260
11327
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
11261
11328
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11262
|
-
* @param callback a #GAsyncReadyCallback
|
|
11329
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11263
11330
|
*/
|
|
11264
11331
|
create_async(flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
11265
11332
|
|
|
@@ -11332,7 +11399,7 @@ export interface File {
|
|
|
11332
11399
|
* @param flags a set of #GFileCreateFlags
|
|
11333
11400
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
11334
11401
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11335
|
-
* @param callback a #GAsyncReadyCallback
|
|
11402
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11336
11403
|
*/
|
|
11337
11404
|
create_readwrite_async(flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
11338
11405
|
|
|
@@ -11445,7 +11512,7 @@ export interface File {
|
|
|
11445
11512
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
|
11446
11513
|
* @param flags flags affecting the operation
|
|
11447
11514
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11448
|
-
* @param callback a #GAsyncReadyCallback
|
|
11515
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11449
11516
|
*/
|
|
11450
11517
|
eject_mountable(flags: MountUnmountFlags, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
11451
11518
|
/**
|
|
@@ -11467,7 +11534,7 @@ export interface File {
|
|
|
11467
11534
|
* @param flags flags affecting the operation
|
|
11468
11535
|
* @param mount_operation a #GMountOperation, or %NULL to avoid user interaction
|
|
11469
11536
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11470
|
-
* @param callback a #GAsyncReadyCallback
|
|
11537
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11471
11538
|
*/
|
|
11472
11539
|
eject_mountable_with_operation(flags: MountUnmountFlags, mount_operation: MountOperation | null, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
11473
11540
|
/**
|
|
@@ -11524,7 +11591,7 @@ export interface File {
|
|
|
11524
11591
|
* @param flags a set of #GFileQueryInfoFlags
|
|
11525
11592
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
11526
11593
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11527
|
-
* @param callback a #GAsyncReadyCallback
|
|
11594
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11528
11595
|
*/
|
|
11529
11596
|
enumerate_children_async(attributes: string | null, flags: FileQueryInfoFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
11530
11597
|
|
|
@@ -11594,7 +11661,7 @@ export interface File {
|
|
|
11594
11661
|
* get the result of the operation.
|
|
11595
11662
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
11596
11663
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
11597
|
-
* @param callback a #GAsyncReadyCallback
|
|
11664
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11598
11665
|
*/
|
|
11599
11666
|
find_enclosing_mount_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
11600
11667
|
|
|
@@ -11819,7 +11886,7 @@ export interface File {
|
|
|
11819
11886
|
*
|
|
11820
11887
|
* See g_file_load_bytes() for more information.
|
|
11821
11888
|
* @param cancellable a #GCancellable or %NULL
|
|
11822
|
-
* @param callback a #GAsyncReadyCallback
|
|
11889
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
11823
11890
|
*/
|
|
11824
11891
|
load_bytes_async(cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
11825
11892
|
|
|
@@ -12131,7 +12198,7 @@ export interface File {
|
|
|
12131
12198
|
* @param flags flags affecting the operation
|
|
12132
12199
|
* @param mount_operation a #GMountOperation, or %NULL to avoid user interaction
|
|
12133
12200
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12134
|
-
* @param callback a #GAsyncReadyCallback
|
|
12201
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
12135
12202
|
*/
|
|
12136
12203
|
mount_mountable(flags: MountMountFlags, mount_operation: MountOperation | null, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
12137
12204
|
/**
|
|
@@ -12198,8 +12265,8 @@ export interface File {
|
|
|
12198
12265
|
* @param flags set of #GFileCopyFlags
|
|
12199
12266
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
12200
12267
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12201
|
-
* @param progress_callback
|
|
12202
|
-
* @param callback a #GAsyncReadyCallback
|
|
12268
|
+
* @param progress_callback #GFileProgressCallback function for updates
|
|
12269
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
12203
12270
|
*/
|
|
12204
12271
|
move_async(destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null, callback: AsyncReadyCallback<this> | null): void
|
|
12205
12272
|
|
|
@@ -12221,7 +12288,7 @@ export interface File {
|
|
|
12221
12288
|
* @param flags set of #GFileCopyFlags
|
|
12222
12289
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
12223
12290
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12224
|
-
* @param progress_callback
|
|
12291
|
+
* @param progress_callback #GFileProgressCallback function for updates
|
|
12225
12292
|
* @returns A Promise of: %TRUE on successful file move, %FALSE otherwise.
|
|
12226
12293
|
*/
|
|
12227
12294
|
move_async(destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null): globalThis.Promise<boolean>
|
|
@@ -12264,7 +12331,7 @@ export interface File {
|
|
|
12264
12331
|
* the result of the operation.
|
|
12265
12332
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
12266
12333
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12267
|
-
* @param callback a #GAsyncReadyCallback
|
|
12334
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
12268
12335
|
*/
|
|
12269
12336
|
open_readwrite_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
12270
12337
|
|
|
@@ -12447,7 +12514,7 @@ export interface File {
|
|
|
12447
12514
|
* @param attributes an attribute query string
|
|
12448
12515
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
12449
12516
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12450
|
-
* @param callback a #GAsyncReadyCallback
|
|
12517
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
12451
12518
|
*/
|
|
12452
12519
|
query_filesystem_info_async(attributes: string | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
12453
12520
|
|
|
@@ -12531,7 +12598,7 @@ export interface File {
|
|
|
12531
12598
|
* @param flags a set of #GFileQueryInfoFlags
|
|
12532
12599
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
12533
12600
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12534
|
-
* @param callback a #GAsyncReadyCallback
|
|
12601
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
12535
12602
|
*/
|
|
12536
12603
|
query_info_async(attributes: string | null, flags: FileQueryInfoFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
12537
12604
|
|
|
@@ -12617,7 +12684,7 @@ export interface File {
|
|
|
12617
12684
|
* of the operation.
|
|
12618
12685
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
12619
12686
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12620
|
-
* @param callback a #GAsyncReadyCallback
|
|
12687
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
12621
12688
|
*/
|
|
12622
12689
|
read_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
12623
12690
|
|
|
@@ -12710,7 +12777,7 @@ export interface File {
|
|
|
12710
12777
|
* @param flags a set of #GFileCreateFlags
|
|
12711
12778
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
12712
12779
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12713
|
-
* @param callback a #GAsyncReadyCallback
|
|
12780
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
12714
12781
|
*/
|
|
12715
12782
|
replace_async(etag: string | null, make_backup: boolean, flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
12716
12783
|
|
|
@@ -12861,7 +12928,7 @@ export interface File {
|
|
|
12861
12928
|
* @param flags a set of #GFileCreateFlags
|
|
12862
12929
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
12863
12930
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
12864
|
-
* @param callback a #GAsyncReadyCallback
|
|
12931
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
12865
12932
|
*/
|
|
12866
12933
|
replace_readwrite_async(etag: string | null, make_backup: boolean, flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
12867
12934
|
|
|
@@ -13021,7 +13088,7 @@ export interface File {
|
|
|
13021
13088
|
* @param flags a #GFileQueryInfoFlags
|
|
13022
13089
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
13023
13090
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13024
|
-
* @param callback a #GAsyncReadyCallback
|
|
13091
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13025
13092
|
*/
|
|
13026
13093
|
set_attributes_async(info: FileInfo, flags: FileQueryInfoFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13027
13094
|
|
|
@@ -13103,7 +13170,7 @@ export interface File {
|
|
|
13103
13170
|
* @param display_name a string
|
|
13104
13171
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
13105
13172
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13106
|
-
* @param callback a #GAsyncReadyCallback
|
|
13173
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13107
13174
|
*/
|
|
13108
13175
|
set_display_name_async(display_name: string | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13109
13176
|
|
|
@@ -13246,7 +13313,7 @@ export interface File {
|
|
|
13246
13313
|
* the result of the operation.
|
|
13247
13314
|
* @param flags flags affecting the operation
|
|
13248
13315
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13249
|
-
* @param callback a #GAsyncReadyCallback
|
|
13316
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13250
13317
|
*/
|
|
13251
13318
|
unmount_mountable(flags: MountUnmountFlags, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13252
13319
|
/**
|
|
@@ -13271,7 +13338,7 @@ export interface File {
|
|
|
13271
13338
|
* @param flags flags affecting the operation
|
|
13272
13339
|
* @param mount_operation a #GMountOperation, or %NULL to avoid user interaction
|
|
13273
13340
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13274
|
-
* @param callback a #GAsyncReadyCallback
|
|
13341
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13275
13342
|
*/
|
|
13276
13343
|
unmount_mountable_with_operation(flags: MountUnmountFlags, mount_operation: MountOperation | null, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13277
13344
|
/**
|
|
@@ -13352,7 +13419,7 @@ export interface File {
|
|
|
13352
13419
|
* @param flags a set of #GFileCreateFlags
|
|
13353
13420
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
13354
13421
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13355
|
-
* @param callback a #GAsyncReadyCallback
|
|
13422
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13356
13423
|
*/
|
|
13357
13424
|
vfunc_append_to_async(flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13358
13425
|
/**
|
|
@@ -13428,8 +13495,10 @@ export interface File {
|
|
|
13428
13495
|
* @param flags set of #GFileCopyFlags
|
|
13429
13496
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
13430
13497
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13498
|
+
* @param progress_callback function to callback with progress information, or %NULL if progress information is not needed
|
|
13499
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13431
13500
|
*/
|
|
13432
|
-
vfunc_copy_async(destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null): void
|
|
13501
|
+
vfunc_copy_async(destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null, callback: AsyncReadyCallback<this> | null): void
|
|
13433
13502
|
/**
|
|
13434
13503
|
* Finishes copying the file started with g_file_copy_async().
|
|
13435
13504
|
* @virtual
|
|
@@ -13477,7 +13546,7 @@ export interface File {
|
|
|
13477
13546
|
* @param flags a set of #GFileCreateFlags
|
|
13478
13547
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
13479
13548
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13480
|
-
* @param callback a #GAsyncReadyCallback
|
|
13549
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13481
13550
|
*/
|
|
13482
13551
|
vfunc_create_async(flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13483
13552
|
/**
|
|
@@ -13532,7 +13601,7 @@ export interface File {
|
|
|
13532
13601
|
* @param flags a set of #GFileCreateFlags
|
|
13533
13602
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
13534
13603
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13535
|
-
* @param callback a #GAsyncReadyCallback
|
|
13604
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13536
13605
|
*/
|
|
13537
13606
|
vfunc_create_readwrite_async(flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13538
13607
|
/**
|
|
@@ -13616,7 +13685,7 @@ export interface File {
|
|
|
13616
13685
|
* @virtual
|
|
13617
13686
|
* @param flags flags affecting the operation
|
|
13618
13687
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13619
|
-
* @param callback a #GAsyncReadyCallback
|
|
13688
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13620
13689
|
*/
|
|
13621
13690
|
vfunc_eject_mountable(flags: MountUnmountFlags, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13622
13691
|
/**
|
|
@@ -13640,7 +13709,7 @@ export interface File {
|
|
|
13640
13709
|
* @param flags flags affecting the operation
|
|
13641
13710
|
* @param mount_operation a #GMountOperation, or %NULL to avoid user interaction
|
|
13642
13711
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13643
|
-
* @param callback a #GAsyncReadyCallback
|
|
13712
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13644
13713
|
*/
|
|
13645
13714
|
vfunc_eject_mountable_with_operation(flags: MountUnmountFlags, mount_operation: MountOperation | null, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13646
13715
|
/**
|
|
@@ -13700,7 +13769,7 @@ export interface File {
|
|
|
13700
13769
|
* @param flags a set of #GFileQueryInfoFlags
|
|
13701
13770
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
13702
13771
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13703
|
-
* @param callback a #GAsyncReadyCallback
|
|
13772
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13704
13773
|
*/
|
|
13705
13774
|
vfunc_enumerate_children_async(attributes: string | null, flags: FileQueryInfoFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13706
13775
|
/**
|
|
@@ -13751,7 +13820,7 @@ export interface File {
|
|
|
13751
13820
|
* @virtual
|
|
13752
13821
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
13753
13822
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
13754
|
-
* @param callback a #GAsyncReadyCallback
|
|
13823
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
13755
13824
|
*/
|
|
13756
13825
|
vfunc_find_enclosing_mount_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
13757
13826
|
/**
|
|
@@ -14057,7 +14126,7 @@ export interface File {
|
|
|
14057
14126
|
* @param flags flags affecting the operation
|
|
14058
14127
|
* @param mount_operation a #GMountOperation, or %NULL to avoid user interaction
|
|
14059
14128
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14060
|
-
* @param callback a #GAsyncReadyCallback
|
|
14129
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14061
14130
|
*/
|
|
14062
14131
|
vfunc_mount_mountable(flags: MountMountFlags, mount_operation: MountOperation | null, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14063
14132
|
/**
|
|
@@ -14127,8 +14196,8 @@ export interface File {
|
|
|
14127
14196
|
* @param flags set of #GFileCopyFlags
|
|
14128
14197
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14129
14198
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14130
|
-
* @param progress_callback
|
|
14131
|
-
* @param callback a #GAsyncReadyCallback
|
|
14199
|
+
* @param progress_callback #GFileProgressCallback function for updates
|
|
14200
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14132
14201
|
*/
|
|
14133
14202
|
vfunc_move_async(destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null, callback: AsyncReadyCallback<this> | null): void
|
|
14134
14203
|
/**
|
|
@@ -14173,7 +14242,7 @@ export interface File {
|
|
|
14173
14242
|
* @virtual
|
|
14174
14243
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14175
14244
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14176
|
-
* @param callback a #GAsyncReadyCallback
|
|
14245
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14177
14246
|
*/
|
|
14178
14247
|
vfunc_open_readwrite_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14179
14248
|
/**
|
|
@@ -14277,7 +14346,7 @@ export interface File {
|
|
|
14277
14346
|
* @param attributes an attribute query string
|
|
14278
14347
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14279
14348
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14280
|
-
* @param callback a #GAsyncReadyCallback
|
|
14349
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14281
14350
|
*/
|
|
14282
14351
|
vfunc_query_filesystem_info_async(attributes: string | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14283
14352
|
/**
|
|
@@ -14341,7 +14410,7 @@ export interface File {
|
|
|
14341
14410
|
* @param flags a set of #GFileQueryInfoFlags
|
|
14342
14411
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14343
14412
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14344
|
-
* @param callback a #GAsyncReadyCallback
|
|
14413
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14345
14414
|
*/
|
|
14346
14415
|
vfunc_query_info_async(attributes: string | null, flags: FileQueryInfoFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14347
14416
|
/**
|
|
@@ -14393,7 +14462,7 @@ export interface File {
|
|
|
14393
14462
|
* @virtual
|
|
14394
14463
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14395
14464
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14396
|
-
* @param callback a #GAsyncReadyCallback
|
|
14465
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14397
14466
|
*/
|
|
14398
14467
|
vfunc_read_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14399
14468
|
/**
|
|
@@ -14487,7 +14556,7 @@ export interface File {
|
|
|
14487
14556
|
* @param flags a set of #GFileCreateFlags
|
|
14488
14557
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14489
14558
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14490
|
-
* @param callback a #GAsyncReadyCallback
|
|
14559
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14491
14560
|
*/
|
|
14492
14561
|
vfunc_replace_async(etag: string | null, make_backup: boolean, flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14493
14562
|
/**
|
|
@@ -14534,7 +14603,7 @@ export interface File {
|
|
|
14534
14603
|
* @param flags a set of #GFileCreateFlags
|
|
14535
14604
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14536
14605
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14537
|
-
* @param callback a #GAsyncReadyCallback
|
|
14606
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14538
14607
|
*/
|
|
14539
14608
|
vfunc_replace_readwrite_async(etag: string | null, make_backup: boolean, flags: FileCreateFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14540
14609
|
/**
|
|
@@ -14589,7 +14658,7 @@ export interface File {
|
|
|
14589
14658
|
* @param flags a #GFileQueryInfoFlags
|
|
14590
14659
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14591
14660
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14592
|
-
* @param callback a #GAsyncReadyCallback
|
|
14661
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14593
14662
|
*/
|
|
14594
14663
|
vfunc_set_attributes_async(info: FileInfo, flags: FileQueryInfoFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14595
14664
|
/**
|
|
@@ -14654,7 +14723,7 @@ export interface File {
|
|
|
14654
14723
|
* @param display_name a string
|
|
14655
14724
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
14656
14725
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14657
|
-
* @param callback a #GAsyncReadyCallback
|
|
14726
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14658
14727
|
*/
|
|
14659
14728
|
vfunc_set_display_name_async(display_name: string | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14660
14729
|
/**
|
|
@@ -14766,7 +14835,7 @@ export interface File {
|
|
|
14766
14835
|
* @virtual
|
|
14767
14836
|
* @param flags flags affecting the operation
|
|
14768
14837
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14769
|
-
* @param callback a #GAsyncReadyCallback
|
|
14838
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14770
14839
|
*/
|
|
14771
14840
|
vfunc_unmount_mountable(flags: MountUnmountFlags, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14772
14841
|
/**
|
|
@@ -14793,7 +14862,7 @@ export interface File {
|
|
|
14793
14862
|
* @param flags flags affecting the operation
|
|
14794
14863
|
* @param mount_operation a #GMountOperation, or %NULL to avoid user interaction
|
|
14795
14864
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
14796
|
-
* @param callback a #GAsyncReadyCallback
|
|
14865
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
14797
14866
|
*/
|
|
14798
14867
|
vfunc_unmount_mountable_with_operation(flags: MountUnmountFlags, mount_operation: MountOperation | null, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
14799
14868
|
/**
|
|
@@ -14832,7 +14901,7 @@ export interface File {
|
|
|
14832
14901
|
* - g_file_new_tmp_async() to asynchronously create a temporary file.
|
|
14833
14902
|
* - g_file_new_tmp_dir_async() to asynchronously create a temporary directory.
|
|
14834
14903
|
* - g_file_parse_name() from a UTF-8 string gotten from g_file_get_parse_name().
|
|
14835
|
-
* - g_file_new_build_filename() to create a file from path elements.
|
|
14904
|
+
* - g_file_new_build_filename() or g_file_new_build_filenamev() to create a file from path elements.
|
|
14836
14905
|
*
|
|
14837
14906
|
* One way to think of a #GFile is as an abstraction of a pathname. For
|
|
14838
14907
|
* normal files the system pathname is what is stored internally, but as
|
|
@@ -14913,6 +14982,16 @@ export class File extends GObject.Object {
|
|
|
14913
14982
|
|
|
14914
14983
|
constructor(config?: File.ConstructorProperties)
|
|
14915
14984
|
_init(config?: File.ConstructorProperties): void
|
|
14985
|
+
/**
|
|
14986
|
+
* Constructs a #GFile from a vector of elements using the correct
|
|
14987
|
+
* separator for filenames.
|
|
14988
|
+
*
|
|
14989
|
+
* Using this function is equivalent to calling g_build_filenamev(),
|
|
14990
|
+
* followed by g_file_new_for_path() on the result.
|
|
14991
|
+
* @param args %NULL-terminated array of strings containing the path elements.
|
|
14992
|
+
* @returns a new #GFile
|
|
14993
|
+
*/
|
|
14994
|
+
static new_build_filenamev(args: string[]): File
|
|
14916
14995
|
/**
|
|
14917
14996
|
* Creates a #GFile with the given argument from the command line.
|
|
14918
14997
|
* The value of `arg` can be either a URI, an absolute path or a
|
|
@@ -15508,6 +15587,8 @@ export interface ListModel {
|
|
|
15508
15587
|
*
|
|
15509
15588
|
* %NULL is never returned for an index that is smaller than the length
|
|
15510
15589
|
* of the list. See g_list_model_get_n_items().
|
|
15590
|
+
*
|
|
15591
|
+
* The same #GObject instance may not appear more than once in a #GListModel.
|
|
15511
15592
|
* @virtual
|
|
15512
15593
|
* @param position the position of the item to fetch
|
|
15513
15594
|
* @returns the object at @position.
|
|
@@ -15658,7 +15739,7 @@ export interface LoadableIcon extends Icon {
|
|
|
15658
15739
|
* version of this function, see g_loadable_icon_load().
|
|
15659
15740
|
* @param size an integer.
|
|
15660
15741
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
15661
|
-
* @param callback a #GAsyncReadyCallback
|
|
15742
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
15662
15743
|
*/
|
|
15663
15744
|
load_async(size: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
15664
15745
|
|
|
@@ -15700,7 +15781,7 @@ export interface LoadableIcon extends Icon {
|
|
|
15700
15781
|
* @virtual
|
|
15701
15782
|
* @param size an integer.
|
|
15702
15783
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
15703
|
-
* @param callback a #GAsyncReadyCallback
|
|
15784
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
15704
15785
|
*/
|
|
15705
15786
|
vfunc_load_async(size: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
15706
15787
|
/**
|
|
@@ -16447,14 +16528,18 @@ export interface NetworkMonitor extends Initable {
|
|
|
16447
16528
|
*/
|
|
16448
16529
|
readonly network_available: boolean
|
|
16449
16530
|
/**
|
|
16450
|
-
* Whether the network is considered metered.
|
|
16531
|
+
* Whether the network is considered metered.
|
|
16532
|
+
*
|
|
16533
|
+
* That is, whether the
|
|
16451
16534
|
* system has traffic flowing through the default connection that is
|
|
16452
16535
|
* subject to limitations set by service providers. For example, traffic
|
|
16453
16536
|
* might be billed by the amount of data transmitted, or there might be a
|
|
16454
16537
|
* quota on the amount of traffic per month. This is typical with tethered
|
|
16455
16538
|
* connections (3G and 4G) and in such situations, bandwidth intensive
|
|
16456
16539
|
* applications may wish to avoid network activity where possible if it will
|
|
16457
|
-
* cost the user money or use up their limited quota.
|
|
16540
|
+
* cost the user money or use up their limited quota. Anything more than a
|
|
16541
|
+
* few hundreds of kilobytes of data usage per hour should be avoided without
|
|
16542
|
+
* asking permission from the user.
|
|
16458
16543
|
*
|
|
16459
16544
|
* If more information is required about specific devices then the
|
|
16460
16545
|
* system network management API should be used instead (for example,
|
|
@@ -16504,7 +16589,7 @@ export interface NetworkMonitor extends Initable {
|
|
|
16504
16589
|
* to get the result of the operation.
|
|
16505
16590
|
* @param connectable a #GSocketConnectable
|
|
16506
16591
|
* @param cancellable a #GCancellable, or %NULL
|
|
16507
|
-
* @param callback a #GAsyncReadyCallback
|
|
16592
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
16508
16593
|
*/
|
|
16509
16594
|
can_reach_async(connectable: SocketConnectable, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
16510
16595
|
|
|
@@ -16611,7 +16696,7 @@ export interface NetworkMonitor extends Initable {
|
|
|
16611
16696
|
* @virtual
|
|
16612
16697
|
* @param connectable a #GSocketConnectable
|
|
16613
16698
|
* @param cancellable a #GCancellable, or %NULL
|
|
16614
|
-
* @param callback a #GAsyncReadyCallback
|
|
16699
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
16615
16700
|
*/
|
|
16616
16701
|
vfunc_can_reach_async(connectable: SocketConnectable, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
16617
16702
|
/**
|
|
@@ -16707,6 +16792,9 @@ export interface PollableInputStream extends InputStream {
|
|
|
16707
16792
|
* the stream may not actually be readable even after the source
|
|
16708
16793
|
* triggers, so you should use g_pollable_input_stream_read_nonblocking()
|
|
16709
16794
|
* rather than g_input_stream_read() from the callback.
|
|
16795
|
+
*
|
|
16796
|
+
* The behaviour of this method is undefined if
|
|
16797
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16710
16798
|
* @param cancellable a #GCancellable, or %NULL
|
|
16711
16799
|
* @returns a new #GSource
|
|
16712
16800
|
*/
|
|
@@ -16720,6 +16808,9 @@ export interface PollableInputStream extends InputStream {
|
|
|
16720
16808
|
* non-blocking behavior, you should always use
|
|
16721
16809
|
* g_pollable_input_stream_read_nonblocking(), which will return a
|
|
16722
16810
|
* %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
|
|
16811
|
+
*
|
|
16812
|
+
* The behaviour of this method is undefined if
|
|
16813
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16723
16814
|
* @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.
|
|
16724
16815
|
*/
|
|
16725
16816
|
is_readable(): boolean
|
|
@@ -16735,6 +16826,9 @@ export interface PollableInputStream extends InputStream {
|
|
|
16735
16826
|
* if `cancellable` has already been cancelled when you call, which
|
|
16736
16827
|
* may happen if you call this method after a source triggers due
|
|
16737
16828
|
* to having been cancelled.
|
|
16829
|
+
*
|
|
16830
|
+
* The behaviour of this method is undefined if
|
|
16831
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16738
16832
|
* @param cancellable a #GCancellable, or %NULL
|
|
16739
16833
|
* @returns the number of bytes read, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
|
|
16740
16834
|
*/
|
|
@@ -16763,6 +16857,9 @@ export interface PollableInputStream extends InputStream {
|
|
|
16763
16857
|
* the stream may not actually be readable even after the source
|
|
16764
16858
|
* triggers, so you should use g_pollable_input_stream_read_nonblocking()
|
|
16765
16859
|
* rather than g_input_stream_read() from the callback.
|
|
16860
|
+
*
|
|
16861
|
+
* The behaviour of this method is undefined if
|
|
16862
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16766
16863
|
* @virtual
|
|
16767
16864
|
* @param cancellable a #GCancellable, or %NULL
|
|
16768
16865
|
* @returns a new #GSource
|
|
@@ -16777,6 +16874,9 @@ export interface PollableInputStream extends InputStream {
|
|
|
16777
16874
|
* non-blocking behavior, you should always use
|
|
16778
16875
|
* g_pollable_input_stream_read_nonblocking(), which will return a
|
|
16779
16876
|
* %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
|
|
16877
|
+
*
|
|
16878
|
+
* The behaviour of this method is undefined if
|
|
16879
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16780
16880
|
* @virtual
|
|
16781
16881
|
* @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.
|
|
16782
16882
|
*/
|
|
@@ -16793,6 +16893,9 @@ export interface PollableInputStream extends InputStream {
|
|
|
16793
16893
|
* if `cancellable` has already been cancelled when you call, which
|
|
16794
16894
|
* may happen if you call this method after a source triggers due
|
|
16795
16895
|
* to having been cancelled.
|
|
16896
|
+
*
|
|
16897
|
+
* The behaviour of this method is undefined if
|
|
16898
|
+
* g_pollable_input_stream_can_poll() returns %FALSE for `stream`.
|
|
16796
16899
|
* @virtual
|
|
16797
16900
|
* @returns the number of bytes read, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
|
|
16798
16901
|
*/
|
|
@@ -16811,6 +16914,11 @@ export interface PollableInputStream extends InputStream {
|
|
|
16811
16914
|
* can be polled for readiness to read. This can be used when
|
|
16812
16915
|
* interfacing with a non-GIO API that expects
|
|
16813
16916
|
* UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
|
|
16917
|
+
*
|
|
16918
|
+
* Some classes may implement #GPollableInputStream but have only certain
|
|
16919
|
+
* instances of that class be pollable. If g_pollable_input_stream_can_poll()
|
|
16920
|
+
* returns %FALSE, then the behavior of other #GPollableInputStream methods is
|
|
16921
|
+
* undefined.
|
|
16814
16922
|
* @interface
|
|
16815
16923
|
*/
|
|
16816
16924
|
export class PollableInputStream extends GObject.Object {
|
|
@@ -16859,6 +16967,9 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
16859
16967
|
* the stream may not actually be writable even after the source
|
|
16860
16968
|
* triggers, so you should use g_pollable_output_stream_write_nonblocking()
|
|
16861
16969
|
* rather than g_output_stream_write() from the callback.
|
|
16970
|
+
*
|
|
16971
|
+
* The behaviour of this method is undefined if
|
|
16972
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16862
16973
|
* @param cancellable a #GCancellable, or %NULL
|
|
16863
16974
|
* @returns a new #GSource
|
|
16864
16975
|
*/
|
|
@@ -16872,6 +16983,9 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
16872
16983
|
* non-blocking behavior, you should always use
|
|
16873
16984
|
* g_pollable_output_stream_write_nonblocking(), which will return a
|
|
16874
16985
|
* %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
|
|
16986
|
+
*
|
|
16987
|
+
* The behaviour of this method is undefined if
|
|
16988
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16875
16989
|
* @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.
|
|
16876
16990
|
*/
|
|
16877
16991
|
is_writable(): boolean
|
|
@@ -16891,6 +17005,9 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
16891
17005
|
* Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
|
|
16892
17006
|
* transports like D/TLS require that you re-send the same `buffer` and
|
|
16893
17007
|
* `count` in the next write call.
|
|
17008
|
+
*
|
|
17009
|
+
* The behaviour of this method is undefined if
|
|
17010
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16894
17011
|
* @param buffer a buffer to write data from
|
|
16895
17012
|
* @param cancellable a #GCancellable, or %NULL
|
|
16896
17013
|
* @returns the number of bytes written, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
|
|
@@ -16913,6 +17030,9 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
16913
17030
|
* Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying
|
|
16914
17031
|
* transports like D/TLS require that you re-send the same `vectors` and
|
|
16915
17032
|
* `n_vectors` in the next write call.
|
|
17033
|
+
*
|
|
17034
|
+
* The behaviour of this method is undefined if
|
|
17035
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16916
17036
|
* @param vectors the buffer containing the #GOutputVectors to write.
|
|
16917
17037
|
* @param cancellable a #GCancellable, or %NULL
|
|
16918
17038
|
* @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.
|
|
@@ -16942,6 +17062,9 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
16942
17062
|
* the stream may not actually be writable even after the source
|
|
16943
17063
|
* triggers, so you should use g_pollable_output_stream_write_nonblocking()
|
|
16944
17064
|
* rather than g_output_stream_write() from the callback.
|
|
17065
|
+
*
|
|
17066
|
+
* The behaviour of this method is undefined if
|
|
17067
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16945
17068
|
* @virtual
|
|
16946
17069
|
* @param cancellable a #GCancellable, or %NULL
|
|
16947
17070
|
* @returns a new #GSource
|
|
@@ -16956,6 +17079,9 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
16956
17079
|
* non-blocking behavior, you should always use
|
|
16957
17080
|
* g_pollable_output_stream_write_nonblocking(), which will return a
|
|
16958
17081
|
* %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
|
|
17082
|
+
*
|
|
17083
|
+
* The behaviour of this method is undefined if
|
|
17084
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16959
17085
|
* @virtual
|
|
16960
17086
|
* @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.
|
|
16961
17087
|
*/
|
|
@@ -16976,6 +17102,9 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
16976
17102
|
* Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
|
|
16977
17103
|
* transports like D/TLS require that you re-send the same `buffer` and
|
|
16978
17104
|
* `count` in the next write call.
|
|
17105
|
+
*
|
|
17106
|
+
* The behaviour of this method is undefined if
|
|
17107
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
16979
17108
|
* @virtual
|
|
16980
17109
|
* @param buffer a buffer to write data from
|
|
16981
17110
|
* @returns the number of bytes written, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
|
|
@@ -16998,6 +17127,9 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
16998
17127
|
* Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying
|
|
16999
17128
|
* transports like D/TLS require that you re-send the same `vectors` and
|
|
17000
17129
|
* `n_vectors` in the next write call.
|
|
17130
|
+
*
|
|
17131
|
+
* The behaviour of this method is undefined if
|
|
17132
|
+
* g_pollable_output_stream_can_poll() returns %FALSE for `stream`.
|
|
17001
17133
|
* @virtual
|
|
17002
17134
|
* @param vectors the buffer containing the #GOutputVectors to write.
|
|
17003
17135
|
* @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.
|
|
@@ -17017,6 +17149,11 @@ export interface PollableOutputStream extends OutputStream {
|
|
|
17017
17149
|
* can be polled for readiness to write. This can be used when
|
|
17018
17150
|
* interfacing with a non-GIO API that expects
|
|
17019
17151
|
* UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
|
|
17152
|
+
*
|
|
17153
|
+
* Some classes may implement #GPollableOutputStream but have only certain
|
|
17154
|
+
* instances of that class be pollable. If g_pollable_output_stream_can_poll()
|
|
17155
|
+
* returns %FALSE, then the behavior of other #GPollableOutputStream methods is
|
|
17156
|
+
* undefined.
|
|
17020
17157
|
* @interface
|
|
17021
17158
|
*/
|
|
17022
17159
|
export class PollableOutputStream extends GObject.Object {
|
|
@@ -19089,19 +19226,34 @@ export interface AppInfoMonitor {
|
|
|
19089
19226
|
|
|
19090
19227
|
/**
|
|
19091
19228
|
* #GAppInfoMonitor is a very simple object used for monitoring the app
|
|
19092
|
-
* info database for changes (
|
|
19093
|
-
* applications).
|
|
19229
|
+
* info database for changes (newly installed or removed applications).
|
|
19094
19230
|
*
|
|
19095
19231
|
* Call g_app_info_monitor_get() to get a #GAppInfoMonitor and connect
|
|
19096
|
-
* to the
|
|
19232
|
+
* to the #GAppInfoMonitor::changed signal. The signal will be emitted once when
|
|
19233
|
+
* the app info database changes, and will not be emitted again until after the
|
|
19234
|
+
* next call to g_app_info_get_all() or another `g_app_info_*()` function. This
|
|
19235
|
+
* is because monitoring the app info database for changes is expensive.
|
|
19236
|
+
*
|
|
19237
|
+
* The following functions will re-arm the #GAppInfoMonitor::changed signal so
|
|
19238
|
+
* it can be emitted again:
|
|
19239
|
+
* - g_app_info_get_all()
|
|
19240
|
+
* - g_app_info_get_all_for_type()
|
|
19241
|
+
* - g_app_info_get_default_for_type()
|
|
19242
|
+
* - g_app_info_get_fallback_for_type()
|
|
19243
|
+
* - g_app_info_get_recommended_for_type()
|
|
19244
|
+
* - g_desktop_app_info_get_implementations()
|
|
19245
|
+
* - g_desktop_app_info_new()
|
|
19246
|
+
* - g_desktop_app_info_new_from_filename()
|
|
19247
|
+
* - g_desktop_app_info_new_from_keyfile()
|
|
19248
|
+
* - g_desktop_app_info_search()
|
|
19097
19249
|
*
|
|
19098
19250
|
* In the usual case, applications should try to make note of the change
|
|
19099
19251
|
* (doing things like invalidating caches) but not act on it. In
|
|
19100
19252
|
* particular, applications should avoid making calls to #GAppInfo APIs
|
|
19101
19253
|
* in response to the change signal, deferring these until the time that
|
|
19102
|
-
* the data is actually required. The exception to this case is when
|
|
19254
|
+
* the updated data is actually required. The exception to this case is when
|
|
19103
19255
|
* application information is actually being displayed on the screen
|
|
19104
|
-
* (
|
|
19256
|
+
* (for example, during a search or when the list of all applications is shown).
|
|
19105
19257
|
* The reason for this is that changes to the list of installed
|
|
19106
19258
|
* applications often come in groups (like during system updates) and
|
|
19107
19259
|
* rescanning the list on every change is pointless and expensive.
|
|
@@ -19126,6 +19278,10 @@ export class AppInfoMonitor extends GObject.Object {
|
|
|
19126
19278
|
* thread-default main context whenever the list of installed
|
|
19127
19279
|
* applications (as reported by g_app_info_get_all()) may have changed.
|
|
19128
19280
|
*
|
|
19281
|
+
* The #GAppInfoMonitor::changed signal will only be emitted once until
|
|
19282
|
+
* g_app_info_get_all() (or another `g_app_info_*()` function) is called. Doing
|
|
19283
|
+
* so will re-arm the signal ready to notify about the next change.
|
|
19284
|
+
*
|
|
19129
19285
|
* You must only call g_object_unref() on the return value from under
|
|
19130
19286
|
* the same main context as you created it.
|
|
19131
19287
|
* @returns a reference to a #GAppInfoMonitor
|
|
@@ -19206,7 +19362,7 @@ export interface AppLaunchContext {
|
|
|
19206
19362
|
*
|
|
19207
19363
|
* Support for the XDG Activation Protocol was added in GLib 2.76.
|
|
19208
19364
|
* @param info a #GAppInfo
|
|
19209
|
-
* @param files a #GList of
|
|
19365
|
+
* @param files a #GList of #GFile objects
|
|
19210
19366
|
* @returns a startup notification ID for the application, or %NULL if not supported.
|
|
19211
19367
|
*/
|
|
19212
19368
|
get_startup_notify_id(info: AppInfo, files: File[]): string | null
|
|
@@ -19258,7 +19414,7 @@ export interface AppLaunchContext {
|
|
|
19258
19414
|
* Support for the XDG Activation Protocol was added in GLib 2.76.
|
|
19259
19415
|
* @virtual
|
|
19260
19416
|
* @param info a #GAppInfo
|
|
19261
|
-
* @param files a #GList of
|
|
19417
|
+
* @param files a #GList of #GFile objects
|
|
19262
19418
|
* @returns a startup notification ID for the application, or %NULL if not supported.
|
|
19263
19419
|
*/
|
|
19264
19420
|
vfunc_get_startup_notify_id(info: AppInfo, files: File[]): string | null
|
|
@@ -19638,7 +19794,7 @@ export interface Application extends ActionGroup, ActionMap {
|
|
|
19638
19794
|
* Increases the use count of `application`.
|
|
19639
19795
|
*
|
|
19640
19796
|
* Use this function to indicate that the application has a reason to
|
|
19641
|
-
* continue to run. For example, g_application_hold() is called by GTK
|
|
19797
|
+
* continue to run. For example, g_application_hold() is called by GTK
|
|
19642
19798
|
* when a toplevel window is on the screen.
|
|
19643
19799
|
*
|
|
19644
19800
|
* To cancel the hold, call g_application_release().
|
|
@@ -20150,8 +20306,8 @@ export interface Application extends ActionGroup, ActionMap {
|
|
|
20150
20306
|
* instance and g_application_run() promptly returns. See the code
|
|
20151
20307
|
* examples below.
|
|
20152
20308
|
*
|
|
20153
|
-
* If used, the expected form of an application identifier is the
|
|
20154
|
-
* that of
|
|
20309
|
+
* If used, the expected form of an application identifier is the
|
|
20310
|
+
* same as that of a
|
|
20155
20311
|
* [D-Bus well-known bus name](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus).
|
|
20156
20312
|
* Examples include: `com.example.MyApp`, `org.example.internal_apps.Calculator`,
|
|
20157
20313
|
* `org._7_zip.Archiver`.
|
|
@@ -20179,6 +20335,10 @@ export interface Application extends ActionGroup, ActionMap {
|
|
|
20179
20335
|
* conveniently access them remotely. GIO provides a #GDBusMenuModel wrapper
|
|
20180
20336
|
* for remote access to exported #GMenuModels.
|
|
20181
20337
|
*
|
|
20338
|
+
* Note: Due to the fact that actions are exported on the session bus,
|
|
20339
|
+
* using `maybe` parameters is not supported, since D-Bus does not support
|
|
20340
|
+
* `maybe` types.
|
|
20341
|
+
*
|
|
20182
20342
|
* There is a number of different entry points into a GApplication:
|
|
20183
20343
|
*
|
|
20184
20344
|
* - via 'Activate' (i.e. just starting the application)
|
|
@@ -23304,6 +23464,13 @@ export interface DBusInterfaceSkeleton extends DBusInterface {
|
|
|
23304
23464
|
* @returns A #GVariant of type ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. Free with g_variant_unref().
|
|
23305
23465
|
*/
|
|
23306
23466
|
get_properties(): GLib.Variant
|
|
23467
|
+
/**
|
|
23468
|
+
* Gets the interface vtable for the D-Bus interface implemented by
|
|
23469
|
+
* `interface_`. The returned function pointers should expect `interface_`
|
|
23470
|
+
* itself to be passed as `user_data`.
|
|
23471
|
+
* @returns the vtable of the D-Bus interface implemented by the skeleton
|
|
23472
|
+
*/
|
|
23473
|
+
get_vtable(): DBusInterfaceVTable
|
|
23307
23474
|
/**
|
|
23308
23475
|
* Checks if `interface_` is exported on `connection`.
|
|
23309
23476
|
* @param connection A #GDBusConnection.
|
|
@@ -23359,6 +23526,14 @@ export interface DBusInterfaceSkeleton extends DBusInterface {
|
|
|
23359
23526
|
* @returns A #GVariant of type ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. Free with g_variant_unref().
|
|
23360
23527
|
*/
|
|
23361
23528
|
vfunc_get_properties(): GLib.Variant
|
|
23529
|
+
/**
|
|
23530
|
+
* Gets the interface vtable for the D-Bus interface implemented by
|
|
23531
|
+
* `interface_`. The returned function pointers should expect `interface_`
|
|
23532
|
+
* itself to be passed as `user_data`.
|
|
23533
|
+
* @virtual
|
|
23534
|
+
* @returns the vtable of the D-Bus interface implemented by the skeleton
|
|
23535
|
+
*/
|
|
23536
|
+
vfunc_get_vtable(): DBusInterfaceVTable
|
|
23362
23537
|
|
|
23363
23538
|
// Own signals of Gio-2.0.Gio.DBusInterfaceSkeleton
|
|
23364
23539
|
|
|
@@ -26333,9 +26508,10 @@ export interface DebugControllerDBus extends DebugController, Initable {
|
|
|
26333
26508
|
* #GDebugController:debug-enabled and, by default, g_log_get_debug_enabled().
|
|
26334
26509
|
* default.
|
|
26335
26510
|
*
|
|
26336
|
-
* By default,
|
|
26337
|
-
*
|
|
26338
|
-
*
|
|
26511
|
+
* By default, no processes are allowed to call `SetDebugEnabled()` unless a
|
|
26512
|
+
* #GDebugControllerDBus::authorize signal handler is installed. This is because
|
|
26513
|
+
* the process may be privileged, or might expose sensitive information in its
|
|
26514
|
+
* debug output. You may want to restrict the ability to enable debug output to
|
|
26339
26515
|
* privileged users or processes.
|
|
26340
26516
|
*
|
|
26341
26517
|
* One option is to install a D-Bus security policy which restricts access to
|
|
@@ -27029,7 +27205,7 @@ export interface FileEnumerator {
|
|
|
27029
27205
|
* g_file_enumerator_close_finish().
|
|
27030
27206
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
27031
27207
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
27032
|
-
* @param callback a #GAsyncReadyCallback
|
|
27208
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
27033
27209
|
*/
|
|
27034
27210
|
close_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
27035
27211
|
|
|
@@ -27161,28 +27337,75 @@ export interface FileEnumerator {
|
|
|
27161
27337
|
next_file(cancellable: Cancellable | null): FileInfo | null
|
|
27162
27338
|
/**
|
|
27163
27339
|
* Request information for a number of files from the enumerator asynchronously.
|
|
27164
|
-
* When all
|
|
27340
|
+
* When all I/O for the operation is finished the `callback` will be called with
|
|
27165
27341
|
* the requested information.
|
|
27166
27342
|
*
|
|
27167
27343
|
* See the documentation of #GFileEnumerator for information about the
|
|
27168
27344
|
* order of returned files.
|
|
27169
27345
|
*
|
|
27170
|
-
*
|
|
27171
|
-
*
|
|
27172
|
-
*
|
|
27173
|
-
*
|
|
27174
|
-
*
|
|
27346
|
+
* Once the end of the enumerator is reached, or if an error occurs, the
|
|
27347
|
+
* `callback` will be called with an empty list. In this case, the previous call
|
|
27348
|
+
* to g_file_enumerator_next_files_async() will typically have returned fewer
|
|
27349
|
+
* than `num_files` items.
|
|
27350
|
+
*
|
|
27351
|
+
* If a request is cancelled the callback will be called with
|
|
27352
|
+
* %G_IO_ERROR_CANCELLED.
|
|
27353
|
+
*
|
|
27354
|
+
* This leads to the following pseudo-code usage:
|
|
27355
|
+
*
|
|
27356
|
+
* ```
|
|
27357
|
+
* g_autoptr(GFile) dir = get_directory ();
|
|
27358
|
+
* g_autoptr(GFileEnumerator) enumerator = NULL;
|
|
27359
|
+
* g_autolist(GFileInfo) files = NULL;
|
|
27360
|
+
* g_autoptr(GError) local_error = NULL;
|
|
27361
|
+
*
|
|
27362
|
+
* enumerator = yield g_file_enumerate_children_async (dir,
|
|
27363
|
+
* G_FILE_ATTRIBUTE_STANDARD_NAME ","
|
|
27364
|
+
* G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
|
27365
|
+
* G_FILE_QUERY_INFO_NONE,
|
|
27366
|
+
* G_PRIORITY_DEFAULT,
|
|
27367
|
+
* cancellable,
|
|
27368
|
+
* …,
|
|
27369
|
+
* &local_error);
|
|
27370
|
+
* if (enumerator == NULL)
|
|
27371
|
+
* g_error ("Error enumerating: %s", local_error->message);
|
|
27372
|
+
*
|
|
27373
|
+
* // Loop until no files are returned, either because the end of the enumerator
|
|
27374
|
+
* // has been reached, or an error was returned.
|
|
27375
|
+
* do
|
|
27376
|
+
* {
|
|
27377
|
+
* files = yield g_file_enumerator_next_files_async (enumerator,
|
|
27378
|
+
* 5, // number of files to request
|
|
27379
|
+
* G_PRIORITY_DEFAULT,
|
|
27380
|
+
* cancellable,
|
|
27381
|
+
* …,
|
|
27382
|
+
* &local_error);
|
|
27383
|
+
*
|
|
27384
|
+
* // Process the returned files, but don’t assume that exactly 5 were returned.
|
|
27385
|
+
* for (GList *l = files; l != NULL; l = l->next)
|
|
27386
|
+
* {
|
|
27387
|
+
* GFileInfo *info = l->data;
|
|
27388
|
+
* handle_file_info (info);
|
|
27389
|
+
* }
|
|
27390
|
+
* }
|
|
27391
|
+
* while (files != NULL);
|
|
27392
|
+
*
|
|
27393
|
+
* if (local_error != NULL &&
|
|
27394
|
+
* !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
|
27395
|
+
* g_error ("Error while enumerating: %s", local_error->message);
|
|
27396
|
+
* ```
|
|
27397
|
+
*
|
|
27175
27398
|
*
|
|
27176
27399
|
* During an async request no other sync and async calls are allowed, and will
|
|
27177
27400
|
* result in %G_IO_ERROR_PENDING errors.
|
|
27178
27401
|
*
|
|
27179
|
-
* Any outstanding
|
|
27402
|
+
* Any outstanding I/O request with higher priority (lower numerical value) will
|
|
27180
27403
|
* be executed before an outstanding request with lower priority. Default
|
|
27181
27404
|
* priority is %G_PRIORITY_DEFAULT.
|
|
27182
27405
|
* @param num_files the number of file info objects to request
|
|
27183
27406
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
27184
27407
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
27185
|
-
* @param callback a #GAsyncReadyCallback
|
|
27408
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
27186
27409
|
*/
|
|
27187
27410
|
next_files_async(num_files: number, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
27188
27411
|
|
|
@@ -27192,22 +27415,69 @@ export interface FileEnumerator {
|
|
|
27192
27415
|
* Promisified version of {@link next_files_async}
|
|
27193
27416
|
*
|
|
27194
27417
|
* Request information for a number of files from the enumerator asynchronously.
|
|
27195
|
-
* When all
|
|
27418
|
+
* When all I/O for the operation is finished the `callback` will be called with
|
|
27196
27419
|
* the requested information.
|
|
27197
27420
|
*
|
|
27198
27421
|
* See the documentation of #GFileEnumerator for information about the
|
|
27199
27422
|
* order of returned files.
|
|
27200
27423
|
*
|
|
27201
|
-
*
|
|
27202
|
-
*
|
|
27203
|
-
*
|
|
27204
|
-
*
|
|
27205
|
-
*
|
|
27424
|
+
* Once the end of the enumerator is reached, or if an error occurs, the
|
|
27425
|
+
* `callback` will be called with an empty list. In this case, the previous call
|
|
27426
|
+
* to g_file_enumerator_next_files_async() will typically have returned fewer
|
|
27427
|
+
* than `num_files` items.
|
|
27428
|
+
*
|
|
27429
|
+
* If a request is cancelled the callback will be called with
|
|
27430
|
+
* %G_IO_ERROR_CANCELLED.
|
|
27431
|
+
*
|
|
27432
|
+
* This leads to the following pseudo-code usage:
|
|
27433
|
+
*
|
|
27434
|
+
* ```
|
|
27435
|
+
* g_autoptr(GFile) dir = get_directory ();
|
|
27436
|
+
* g_autoptr(GFileEnumerator) enumerator = NULL;
|
|
27437
|
+
* g_autolist(GFileInfo) files = NULL;
|
|
27438
|
+
* g_autoptr(GError) local_error = NULL;
|
|
27439
|
+
*
|
|
27440
|
+
* enumerator = yield g_file_enumerate_children_async (dir,
|
|
27441
|
+
* G_FILE_ATTRIBUTE_STANDARD_NAME ","
|
|
27442
|
+
* G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
|
27443
|
+
* G_FILE_QUERY_INFO_NONE,
|
|
27444
|
+
* G_PRIORITY_DEFAULT,
|
|
27445
|
+
* cancellable,
|
|
27446
|
+
* …,
|
|
27447
|
+
* &local_error);
|
|
27448
|
+
* if (enumerator == NULL)
|
|
27449
|
+
* g_error ("Error enumerating: %s", local_error->message);
|
|
27450
|
+
*
|
|
27451
|
+
* // Loop until no files are returned, either because the end of the enumerator
|
|
27452
|
+
* // has been reached, or an error was returned.
|
|
27453
|
+
* do
|
|
27454
|
+
* {
|
|
27455
|
+
* files = yield g_file_enumerator_next_files_async (enumerator,
|
|
27456
|
+
* 5, // number of files to request
|
|
27457
|
+
* G_PRIORITY_DEFAULT,
|
|
27458
|
+
* cancellable,
|
|
27459
|
+
* …,
|
|
27460
|
+
* &local_error);
|
|
27461
|
+
*
|
|
27462
|
+
* // Process the returned files, but don’t assume that exactly 5 were returned.
|
|
27463
|
+
* for (GList *l = files; l != NULL; l = l->next)
|
|
27464
|
+
* {
|
|
27465
|
+
* GFileInfo *info = l->data;
|
|
27466
|
+
* handle_file_info (info);
|
|
27467
|
+
* }
|
|
27468
|
+
* }
|
|
27469
|
+
* while (files != NULL);
|
|
27470
|
+
*
|
|
27471
|
+
* if (local_error != NULL &&
|
|
27472
|
+
* !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
|
27473
|
+
* g_error ("Error while enumerating: %s", local_error->message);
|
|
27474
|
+
* ```
|
|
27475
|
+
*
|
|
27206
27476
|
*
|
|
27207
27477
|
* During an async request no other sync and async calls are allowed, and will
|
|
27208
27478
|
* result in %G_IO_ERROR_PENDING errors.
|
|
27209
27479
|
*
|
|
27210
|
-
* Any outstanding
|
|
27480
|
+
* Any outstanding I/O request with higher priority (lower numerical value) will
|
|
27211
27481
|
* be executed before an outstanding request with lower priority. Default
|
|
27212
27482
|
* priority is %G_PRIORITY_DEFAULT.
|
|
27213
27483
|
* @param num_files the number of file info objects to request
|
|
@@ -27240,7 +27510,7 @@ export interface FileEnumerator {
|
|
|
27240
27510
|
* @virtual
|
|
27241
27511
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
27242
27512
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
27243
|
-
* @param callback a #GAsyncReadyCallback
|
|
27513
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
27244
27514
|
*/
|
|
27245
27515
|
vfunc_close_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
27246
27516
|
/**
|
|
@@ -27279,29 +27549,76 @@ export interface FileEnumerator {
|
|
|
27279
27549
|
vfunc_next_file(cancellable: Cancellable | null): FileInfo | null
|
|
27280
27550
|
/**
|
|
27281
27551
|
* Request information for a number of files from the enumerator asynchronously.
|
|
27282
|
-
* When all
|
|
27552
|
+
* When all I/O for the operation is finished the `callback` will be called with
|
|
27283
27553
|
* the requested information.
|
|
27284
27554
|
*
|
|
27285
27555
|
* See the documentation of #GFileEnumerator for information about the
|
|
27286
27556
|
* order of returned files.
|
|
27287
27557
|
*
|
|
27288
|
-
*
|
|
27289
|
-
*
|
|
27290
|
-
*
|
|
27291
|
-
*
|
|
27292
|
-
*
|
|
27558
|
+
* Once the end of the enumerator is reached, or if an error occurs, the
|
|
27559
|
+
* `callback` will be called with an empty list. In this case, the previous call
|
|
27560
|
+
* to g_file_enumerator_next_files_async() will typically have returned fewer
|
|
27561
|
+
* than `num_files` items.
|
|
27562
|
+
*
|
|
27563
|
+
* If a request is cancelled the callback will be called with
|
|
27564
|
+
* %G_IO_ERROR_CANCELLED.
|
|
27565
|
+
*
|
|
27566
|
+
* This leads to the following pseudo-code usage:
|
|
27567
|
+
*
|
|
27568
|
+
* ```
|
|
27569
|
+
* g_autoptr(GFile) dir = get_directory ();
|
|
27570
|
+
* g_autoptr(GFileEnumerator) enumerator = NULL;
|
|
27571
|
+
* g_autolist(GFileInfo) files = NULL;
|
|
27572
|
+
* g_autoptr(GError) local_error = NULL;
|
|
27573
|
+
*
|
|
27574
|
+
* enumerator = yield g_file_enumerate_children_async (dir,
|
|
27575
|
+
* G_FILE_ATTRIBUTE_STANDARD_NAME ","
|
|
27576
|
+
* G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
|
27577
|
+
* G_FILE_QUERY_INFO_NONE,
|
|
27578
|
+
* G_PRIORITY_DEFAULT,
|
|
27579
|
+
* cancellable,
|
|
27580
|
+
* …,
|
|
27581
|
+
* &local_error);
|
|
27582
|
+
* if (enumerator == NULL)
|
|
27583
|
+
* g_error ("Error enumerating: %s", local_error->message);
|
|
27584
|
+
*
|
|
27585
|
+
* // Loop until no files are returned, either because the end of the enumerator
|
|
27586
|
+
* // has been reached, or an error was returned.
|
|
27587
|
+
* do
|
|
27588
|
+
* {
|
|
27589
|
+
* files = yield g_file_enumerator_next_files_async (enumerator,
|
|
27590
|
+
* 5, // number of files to request
|
|
27591
|
+
* G_PRIORITY_DEFAULT,
|
|
27592
|
+
* cancellable,
|
|
27593
|
+
* …,
|
|
27594
|
+
* &local_error);
|
|
27595
|
+
*
|
|
27596
|
+
* // Process the returned files, but don’t assume that exactly 5 were returned.
|
|
27597
|
+
* for (GList *l = files; l != NULL; l = l->next)
|
|
27598
|
+
* {
|
|
27599
|
+
* GFileInfo *info = l->data;
|
|
27600
|
+
* handle_file_info (info);
|
|
27601
|
+
* }
|
|
27602
|
+
* }
|
|
27603
|
+
* while (files != NULL);
|
|
27604
|
+
*
|
|
27605
|
+
* if (local_error != NULL &&
|
|
27606
|
+
* !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
|
27607
|
+
* g_error ("Error while enumerating: %s", local_error->message);
|
|
27608
|
+
* ```
|
|
27609
|
+
*
|
|
27293
27610
|
*
|
|
27294
27611
|
* During an async request no other sync and async calls are allowed, and will
|
|
27295
27612
|
* result in %G_IO_ERROR_PENDING errors.
|
|
27296
27613
|
*
|
|
27297
|
-
* Any outstanding
|
|
27614
|
+
* Any outstanding I/O request with higher priority (lower numerical value) will
|
|
27298
27615
|
* be executed before an outstanding request with lower priority. Default
|
|
27299
27616
|
* priority is %G_PRIORITY_DEFAULT.
|
|
27300
27617
|
* @virtual
|
|
27301
27618
|
* @param num_files the number of file info objects to request
|
|
27302
27619
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
27303
27620
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
27304
|
-
* @param callback a #GAsyncReadyCallback
|
|
27621
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
27305
27622
|
*/
|
|
27306
27623
|
vfunc_next_files_async(num_files: number, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
27307
27624
|
/**
|
|
@@ -27422,7 +27739,7 @@ export interface FileIOStream extends Seekable {
|
|
|
27422
27739
|
* @param attributes a file attribute query string.
|
|
27423
27740
|
* @param io_priority the [I/O priority][gio-GIOScheduler] of the request
|
|
27424
27741
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
27425
|
-
* @param callback
|
|
27742
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
27426
27743
|
*/
|
|
27427
27744
|
query_info_async(attributes: string | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
27428
27745
|
|
|
@@ -27498,7 +27815,7 @@ export interface FileIOStream extends Seekable {
|
|
|
27498
27815
|
* @param attributes a file attribute query string.
|
|
27499
27816
|
* @param io_priority the [I/O priority][gio-GIOScheduler] of the request
|
|
27500
27817
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
27501
|
-
* @param callback
|
|
27818
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
27502
27819
|
*/
|
|
27503
27820
|
vfunc_query_info_async(attributes: string | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
27504
27821
|
/**
|
|
@@ -27712,6 +28029,17 @@ export interface FileInfo {
|
|
|
27712
28029
|
* @returns %TRUE if @info has an attribute named @attribute, %FALSE otherwise.
|
|
27713
28030
|
*/
|
|
27714
28031
|
get_attribute_data(attribute: string | null): [ /* returnType */ boolean, /* type */ FileAttributeType, /* value_pp */ any, /* status */ FileAttributeStatus ]
|
|
28032
|
+
/**
|
|
28033
|
+
* Gets the value of a byte string attribute as a file path.
|
|
28034
|
+
*
|
|
28035
|
+
* If the attribute does not contain a byte string, `NULL` will be returned.
|
|
28036
|
+
*
|
|
28037
|
+
* This function is meant to be used by language bindings that have specific
|
|
28038
|
+
* handling for Unix paths.
|
|
28039
|
+
* @param attribute a file attribute key.
|
|
28040
|
+
* @returns the contents of the @attribute value as a file path, or %NULL otherwise.
|
|
28041
|
+
*/
|
|
28042
|
+
get_attribute_file_path(attribute: string | null): string | null
|
|
27715
28043
|
/**
|
|
27716
28044
|
* Gets a signed 32-bit integer contained within the attribute. If the
|
|
27717
28045
|
* attribute does not contain a signed 32-bit integer, or is invalid,
|
|
@@ -27993,6 +28321,16 @@ export interface FileInfo {
|
|
|
27993
28321
|
* @param attr_value a byte string.
|
|
27994
28322
|
*/
|
|
27995
28323
|
set_attribute_byte_string(attribute: string | null, attr_value: string | null): void
|
|
28324
|
+
/**
|
|
28325
|
+
* Sets the `attribute` to contain the given `attr_value,`
|
|
28326
|
+
* if possible.
|
|
28327
|
+
*
|
|
28328
|
+
* This function is meant to be used by language bindings that have specific
|
|
28329
|
+
* handling for Unix paths.
|
|
28330
|
+
* @param attribute a file attribute key.
|
|
28331
|
+
* @param attr_value a file path.
|
|
28332
|
+
*/
|
|
28333
|
+
set_attribute_file_path(attribute: string | null, attr_value: string): void
|
|
27996
28334
|
/**
|
|
27997
28335
|
* Sets the `attribute` to contain the given `attr_value,`
|
|
27998
28336
|
* if possible.
|
|
@@ -28159,7 +28497,7 @@ export interface FileInfo {
|
|
|
28159
28497
|
* to the given symlink target.
|
|
28160
28498
|
* @param symlink_target a static string containing a path to a symlink target.
|
|
28161
28499
|
*/
|
|
28162
|
-
set_symlink_target(symlink_target: string
|
|
28500
|
+
set_symlink_target(symlink_target: string): void
|
|
28163
28501
|
/**
|
|
28164
28502
|
* Unsets a mask set by g_file_info_set_attribute_mask(), if one
|
|
28165
28503
|
* is set.
|
|
@@ -28279,7 +28617,7 @@ export interface FileInputStream extends Seekable {
|
|
|
28279
28617
|
* @param attributes a file attribute query string.
|
|
28280
28618
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
28281
28619
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
28282
|
-
* @param callback
|
|
28620
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
28283
28621
|
*/
|
|
28284
28622
|
query_info_async(attributes: string | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
28285
28623
|
|
|
@@ -28343,7 +28681,7 @@ export interface FileInputStream extends Seekable {
|
|
|
28343
28681
|
* @param attributes a file attribute query string.
|
|
28344
28682
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
28345
28683
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
28346
|
-
* @param callback
|
|
28684
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
28347
28685
|
*/
|
|
28348
28686
|
vfunc_query_info_async(attributes: string | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
28349
28687
|
/**
|
|
@@ -29135,7 +29473,7 @@ export interface IOStream {
|
|
|
29135
29473
|
* classes. However, if you override one you must override all.
|
|
29136
29474
|
* @param io_priority the io priority of the request
|
|
29137
29475
|
* @param cancellable optional cancellable object
|
|
29138
|
-
* @param callback
|
|
29476
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
29139
29477
|
*/
|
|
29140
29478
|
close_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
29141
29479
|
|
|
@@ -29206,7 +29544,7 @@ export interface IOStream {
|
|
|
29206
29544
|
* @param flags a set of #GIOStreamSpliceFlags.
|
|
29207
29545
|
* @param io_priority the io priority of the request.
|
|
29208
29546
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
29209
|
-
* @param callback a #GAsyncReadyCallback
|
|
29547
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
29210
29548
|
*/
|
|
29211
29549
|
splice_async(stream2: IOStream, flags: IOStreamSpliceFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
29212
29550
|
|
|
@@ -29226,7 +29564,7 @@ export interface IOStream {
|
|
|
29226
29564
|
* @virtual
|
|
29227
29565
|
* @param io_priority the io priority of the request
|
|
29228
29566
|
* @param cancellable optional cancellable object
|
|
29229
|
-
* @param callback
|
|
29567
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
29230
29568
|
*/
|
|
29231
29569
|
vfunc_close_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
29232
29570
|
/**
|
|
@@ -29919,7 +30257,7 @@ export interface InputStream {
|
|
|
29919
30257
|
* override one you must override all.
|
|
29920
30258
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
29921
30259
|
* @param cancellable optional cancellable object
|
|
29922
|
-
* @param callback
|
|
30260
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
29923
30261
|
*/
|
|
29924
30262
|
close_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
29925
30263
|
|
|
@@ -30022,7 +30360,7 @@ export interface InputStream {
|
|
|
30022
30360
|
* priority. Default priority is %G_PRIORITY_DEFAULT.
|
|
30023
30361
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
30024
30362
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
30025
|
-
* @param callback
|
|
30363
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
30026
30364
|
*/
|
|
30027
30365
|
read_all_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): /* buffer */ Uint8Array
|
|
30028
30366
|
|
|
@@ -30086,7 +30424,7 @@ export interface InputStream {
|
|
|
30086
30424
|
* override one you must override all.
|
|
30087
30425
|
* @param io_priority the [I/O priority][io-priority] of the request.
|
|
30088
30426
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
30089
|
-
* @param callback
|
|
30427
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
30090
30428
|
*/
|
|
30091
30429
|
read_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): /* buffer */ Uint8Array
|
|
30092
30430
|
|
|
@@ -30176,7 +30514,7 @@ export interface InputStream {
|
|
|
30176
30514
|
* @param count the number of bytes that will be read from the stream
|
|
30177
30515
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
30178
30516
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
30179
|
-
* @param callback
|
|
30517
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
30180
30518
|
*/
|
|
30181
30519
|
read_bytes_async(count: number, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
30182
30520
|
|
|
@@ -30277,7 +30615,7 @@ export interface InputStream {
|
|
|
30277
30615
|
* @param count the number of bytes that will be skipped from the stream
|
|
30278
30616
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
30279
30617
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
30280
|
-
* @param callback
|
|
30618
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
30281
30619
|
*/
|
|
30282
30620
|
skip_async(count: number, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
30283
30621
|
|
|
@@ -30338,7 +30676,7 @@ export interface InputStream {
|
|
|
30338
30676
|
* @virtual
|
|
30339
30677
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
30340
30678
|
* @param cancellable optional cancellable object
|
|
30341
|
-
* @param callback
|
|
30679
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
30342
30680
|
*/
|
|
30343
30681
|
vfunc_close_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
30344
30682
|
/**
|
|
@@ -30376,7 +30714,7 @@ export interface InputStream {
|
|
|
30376
30714
|
* @virtual
|
|
30377
30715
|
* @param io_priority the [I/O priority][io-priority] of the request.
|
|
30378
30716
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
30379
|
-
* @param callback
|
|
30717
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
30380
30718
|
*/
|
|
30381
30719
|
vfunc_read_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): /* buffer */ Uint8Array | null
|
|
30382
30720
|
/**
|
|
@@ -30436,7 +30774,7 @@ export interface InputStream {
|
|
|
30436
30774
|
* @param count the number of bytes that will be skipped from the stream
|
|
30437
30775
|
* @param io_priority the [I/O priority][io-priority] of the request
|
|
30438
30776
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
30439
|
-
* @param callback
|
|
30777
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
30440
30778
|
*/
|
|
30441
30779
|
vfunc_skip_async(count: number, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
30442
30780
|
/**
|
|
@@ -33058,7 +33396,7 @@ export interface OutputStream {
|
|
|
33058
33396
|
* classes. However, if you override one you must override all.
|
|
33059
33397
|
* @param io_priority the io priority of the request.
|
|
33060
33398
|
* @param cancellable optional cancellable object
|
|
33061
|
-
* @param callback
|
|
33399
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33062
33400
|
*/
|
|
33063
33401
|
close_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33064
33402
|
|
|
@@ -33112,7 +33450,7 @@ export interface OutputStream {
|
|
|
33112
33450
|
* result of the operation.
|
|
33113
33451
|
* @param io_priority the io priority of the request.
|
|
33114
33452
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33115
|
-
* @param callback a #GAsyncReadyCallback
|
|
33453
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33116
33454
|
*/
|
|
33117
33455
|
flush_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33118
33456
|
|
|
@@ -33184,7 +33522,7 @@ export interface OutputStream {
|
|
|
33184
33522
|
* @param flags a set of #GOutputStreamSpliceFlags.
|
|
33185
33523
|
* @param io_priority the io priority of the request.
|
|
33186
33524
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33187
|
-
* @param callback a #GAsyncReadyCallback
|
|
33525
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33188
33526
|
*/
|
|
33189
33527
|
splice_async(source: InputStream, flags: OutputStreamSpliceFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33190
33528
|
|
|
@@ -33283,7 +33621,7 @@ export interface OutputStream {
|
|
|
33283
33621
|
* @param buffer the buffer containing the data to write
|
|
33284
33622
|
* @param io_priority the io priority of the request
|
|
33285
33623
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
33286
|
-
* @param callback
|
|
33624
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33287
33625
|
*/
|
|
33288
33626
|
write_all_async(buffer: Uint8Array, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33289
33627
|
|
|
@@ -33367,7 +33705,7 @@ export interface OutputStream {
|
|
|
33367
33705
|
* @param buffer the buffer containing the data to write.
|
|
33368
33706
|
* @param io_priority the io priority of the request.
|
|
33369
33707
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33370
|
-
* @param callback
|
|
33708
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33371
33709
|
*/
|
|
33372
33710
|
write_async(buffer: Uint8Array, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33373
33711
|
|
|
@@ -33451,7 +33789,7 @@ export interface OutputStream {
|
|
|
33451
33789
|
* @param bytes The bytes to write
|
|
33452
33790
|
* @param io_priority the io priority of the request.
|
|
33453
33791
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33454
|
-
* @param callback
|
|
33792
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33455
33793
|
*/
|
|
33456
33794
|
write_bytes_async(bytes: GLib.Bytes, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33457
33795
|
|
|
@@ -33568,7 +33906,7 @@ export interface OutputStream {
|
|
|
33568
33906
|
* @param vectors the buffer containing the #GOutputVectors to write.
|
|
33569
33907
|
* @param io_priority the I/O priority of the request
|
|
33570
33908
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
|
33571
|
-
* @param callback
|
|
33909
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33572
33910
|
*/
|
|
33573
33911
|
writev_all_async(vectors: OutputVector[], io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33574
33912
|
|
|
@@ -33648,7 +33986,7 @@ export interface OutputStream {
|
|
|
33648
33986
|
* @param vectors the buffer containing the #GOutputVectors to write.
|
|
33649
33987
|
* @param io_priority the I/O priority of the request.
|
|
33650
33988
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33651
|
-
* @param callback
|
|
33989
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33652
33990
|
*/
|
|
33653
33991
|
writev_async(vectors: OutputVector[], io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33654
33992
|
|
|
@@ -33716,7 +34054,7 @@ export interface OutputStream {
|
|
|
33716
34054
|
* @virtual
|
|
33717
34055
|
* @param io_priority the io priority of the request.
|
|
33718
34056
|
* @param cancellable optional cancellable object
|
|
33719
|
-
* @param callback
|
|
34057
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33720
34058
|
*/
|
|
33721
34059
|
vfunc_close_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33722
34060
|
/**
|
|
@@ -33753,7 +34091,7 @@ export interface OutputStream {
|
|
|
33753
34091
|
* @virtual
|
|
33754
34092
|
* @param io_priority the io priority of the request.
|
|
33755
34093
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33756
|
-
* @param callback a #GAsyncReadyCallback
|
|
34094
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33757
34095
|
*/
|
|
33758
34096
|
vfunc_flush_async(io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33759
34097
|
/**
|
|
@@ -33785,7 +34123,7 @@ export interface OutputStream {
|
|
|
33785
34123
|
* @param flags a set of #GOutputStreamSpliceFlags.
|
|
33786
34124
|
* @param io_priority the io priority of the request.
|
|
33787
34125
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33788
|
-
* @param callback a #GAsyncReadyCallback
|
|
34126
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33789
34127
|
*/
|
|
33790
34128
|
vfunc_splice_async(source: InputStream, flags: OutputStreamSpliceFlags, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33791
34129
|
/**
|
|
@@ -33835,7 +34173,7 @@ export interface OutputStream {
|
|
|
33835
34173
|
* @param buffer the buffer containing the data to write.
|
|
33836
34174
|
* @param io_priority the io priority of the request.
|
|
33837
34175
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33838
|
-
* @param callback
|
|
34176
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33839
34177
|
*/
|
|
33840
34178
|
vfunc_write_async(buffer: Uint8Array | null, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33841
34179
|
/**
|
|
@@ -33907,7 +34245,7 @@ export interface OutputStream {
|
|
|
33907
34245
|
* @param vectors the buffer containing the #GOutputVectors to write.
|
|
33908
34246
|
* @param io_priority the I/O priority of the request.
|
|
33909
34247
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
33910
|
-
* @param callback
|
|
34248
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
33911
34249
|
*/
|
|
33912
34250
|
vfunc_writev_async(vectors: OutputVector[], io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
33913
34251
|
/**
|
|
@@ -34808,12 +35146,44 @@ export module Resolver {
|
|
|
34808
35146
|
// Constructor properties interface
|
|
34809
35147
|
|
|
34810
35148
|
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
35149
|
+
|
|
35150
|
+
// Own constructor properties of Gio-2.0.Gio.Resolver
|
|
35151
|
+
|
|
35152
|
+
/**
|
|
35153
|
+
* The timeout applied to all resolver lookups, in milliseconds.
|
|
35154
|
+
*
|
|
35155
|
+
* This may be changed through the lifetime of the #GResolver. The new value
|
|
35156
|
+
* will apply to any lookups started after the change, but not to any
|
|
35157
|
+
* already-ongoing lookups.
|
|
35158
|
+
*
|
|
35159
|
+
* If this is `0`, no timeout is applied to lookups.
|
|
35160
|
+
*
|
|
35161
|
+
* No timeout was applied to lookups before this property was added in
|
|
35162
|
+
* GLib 2.78.
|
|
35163
|
+
*/
|
|
35164
|
+
timeout?: number | null
|
|
34811
35165
|
}
|
|
34812
35166
|
|
|
34813
35167
|
}
|
|
34814
35168
|
|
|
34815
35169
|
export interface Resolver {
|
|
34816
35170
|
|
|
35171
|
+
// Own properties of Gio-2.0.Gio.Resolver
|
|
35172
|
+
|
|
35173
|
+
/**
|
|
35174
|
+
* The timeout applied to all resolver lookups, in milliseconds.
|
|
35175
|
+
*
|
|
35176
|
+
* This may be changed through the lifetime of the #GResolver. The new value
|
|
35177
|
+
* will apply to any lookups started after the change, but not to any
|
|
35178
|
+
* already-ongoing lookups.
|
|
35179
|
+
*
|
|
35180
|
+
* If this is `0`, no timeout is applied to lookups.
|
|
35181
|
+
*
|
|
35182
|
+
* No timeout was applied to lookups before this property was added in
|
|
35183
|
+
* GLib 2.78.
|
|
35184
|
+
*/
|
|
35185
|
+
timeout: number
|
|
35186
|
+
|
|
34817
35187
|
// Own fields of Gio-2.0.Gio.Resolver
|
|
34818
35188
|
|
|
34819
35189
|
parent_instance: GObject.Object
|
|
@@ -34821,6 +35191,11 @@ export interface Resolver {
|
|
|
34821
35191
|
|
|
34822
35192
|
// Owm methods of Gio-2.0.Gio.Resolver
|
|
34823
35193
|
|
|
35194
|
+
/**
|
|
35195
|
+
* Get the timeout applied to all resolver lookups. See #GResolver:timeout.
|
|
35196
|
+
* @returns the resolver timeout, in milliseconds, or `0` for no timeout
|
|
35197
|
+
*/
|
|
35198
|
+
get_timeout(): number
|
|
34824
35199
|
/**
|
|
34825
35200
|
* Synchronously reverse-resolves `address` to determine its
|
|
34826
35201
|
* associated hostname.
|
|
@@ -35123,6 +35498,11 @@ export interface Resolver {
|
|
|
35123
35498
|
* itself as the default resolver for all later code to use.
|
|
35124
35499
|
*/
|
|
35125
35500
|
set_default(): void
|
|
35501
|
+
/**
|
|
35502
|
+
* Set the timeout applied to all resolver lookups. See #GResolver:timeout.
|
|
35503
|
+
* @param timeout_ms timeout in milliseconds, or `0` for no timeouts
|
|
35504
|
+
*/
|
|
35505
|
+
set_timeout(timeout_ms: number): void
|
|
35126
35506
|
|
|
35127
35507
|
// Own virtual methods of Gio-2.0.Gio.Resolver
|
|
35128
35508
|
|
|
@@ -35319,6 +35699,9 @@ export interface Resolver {
|
|
|
35319
35699
|
|
|
35320
35700
|
// Class property signals of Gio-2.0.Gio.Resolver
|
|
35321
35701
|
|
|
35702
|
+
connect(sigName: "notify::timeout", callback: (($obj: Resolver, pspec: GObject.ParamSpec) => void)): number
|
|
35703
|
+
connect_after(sigName: "notify::timeout", callback: (($obj: Resolver, pspec: GObject.ParamSpec) => void)): number
|
|
35704
|
+
emit(sigName: "notify::timeout", ...args: any[]): void
|
|
35322
35705
|
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
35323
35706
|
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
35324
35707
|
emit(sigName: string, ...args: any[]): void
|
|
@@ -35334,6 +35717,10 @@ export interface Resolver {
|
|
|
35334
35717
|
* #GNetworkAddress and #GNetworkService provide wrappers around
|
|
35335
35718
|
* #GResolver functionality that also implement #GSocketConnectable,
|
|
35336
35719
|
* making it easy to connect to a remote host/service.
|
|
35720
|
+
*
|
|
35721
|
+
* The default resolver (see g_resolver_get_default()) has a timeout of 30s set
|
|
35722
|
+
* on it since GLib 2.78. Earlier versions of GLib did not support resolver
|
|
35723
|
+
* timeouts.
|
|
35337
35724
|
* @class
|
|
35338
35725
|
*/
|
|
35339
35726
|
export class Resolver extends GObject.Object {
|
|
@@ -39154,7 +39541,7 @@ export interface SocketAddressEnumerator {
|
|
|
39154
39541
|
*
|
|
39155
39542
|
* It is an error to call this multiple times before the previous callback has finished.
|
|
39156
39543
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
39157
|
-
* @param callback a #GAsyncReadyCallback to call
|
|
39544
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
39158
39545
|
*/
|
|
39159
39546
|
next_async(cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
39160
39547
|
|
|
@@ -39211,7 +39598,7 @@ export interface SocketAddressEnumerator {
|
|
|
39211
39598
|
* It is an error to call this multiple times before the previous callback has finished.
|
|
39212
39599
|
* @virtual
|
|
39213
39600
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
39214
|
-
* @param callback a #GAsyncReadyCallback to call
|
|
39601
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
39215
39602
|
*/
|
|
39216
39603
|
vfunc_next_async(cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
39217
39604
|
/**
|
|
@@ -41650,6 +42037,13 @@ export interface Task extends AsyncResult {
|
|
|
41650
42037
|
* do this. If you have a very large number of tasks to run (several tens of
|
|
41651
42038
|
* tasks), but don't want them to all run at once, you should only queue a
|
|
41652
42039
|
* limited number of them (around ten) at a time.
|
|
42040
|
+
*
|
|
42041
|
+
* Be aware that if your task depends on other tasks to complete, use of this
|
|
42042
|
+
* function could lead to a livelock if the other tasks also use this function
|
|
42043
|
+
* and enough of them (around 10) execute in a dependency chain, as that will
|
|
42044
|
+
* exhaust the thread pool. If this situation is possible, consider using a
|
|
42045
|
+
* separate worker thread or thread pool explicitly, rather than using
|
|
42046
|
+
* g_task_run_in_thread().
|
|
41653
42047
|
* @param task_func a #GTaskThreadFunc
|
|
41654
42048
|
*/
|
|
41655
42049
|
run_in_thread(task_func: TaskThreadFunc): void
|
|
@@ -44616,7 +45010,7 @@ export interface TlsDatabase {
|
|
|
44616
45010
|
* g_tls_database_lookup_certificates_issued_by() for more information.
|
|
44617
45011
|
*
|
|
44618
45012
|
* The database may choose to hold a reference to the issuer byte array for the duration
|
|
44619
|
-
* of
|
|
45013
|
+
* of this asynchronous operation. The byte array should not be modified during
|
|
44620
45014
|
* this time.
|
|
44621
45015
|
* @param issuer_raw_dn a #GByteArray which holds the DER encoded issuer DN.
|
|
44622
45016
|
* @param interaction used to interact with the user if necessary
|
|
@@ -44635,7 +45029,7 @@ export interface TlsDatabase {
|
|
|
44635
45029
|
* g_tls_database_lookup_certificates_issued_by() for more information.
|
|
44636
45030
|
*
|
|
44637
45031
|
* The database may choose to hold a reference to the issuer byte array for the duration
|
|
44638
|
-
* of
|
|
45032
|
+
* of this asynchronous operation. The byte array should not be modified during
|
|
44639
45033
|
* this time.
|
|
44640
45034
|
* @param issuer_raw_dn a #GByteArray which holds the DER encoded issuer DN.
|
|
44641
45035
|
* @param interaction used to interact with the user if necessary
|
|
@@ -44894,7 +45288,7 @@ export interface TlsDatabase {
|
|
|
44894
45288
|
* g_tls_database_lookup_certificates_issued_by() for more information.
|
|
44895
45289
|
*
|
|
44896
45290
|
* The database may choose to hold a reference to the issuer byte array for the duration
|
|
44897
|
-
* of
|
|
45291
|
+
* of this asynchronous operation. The byte array should not be modified during
|
|
44898
45292
|
* this time.
|
|
44899
45293
|
* @virtual
|
|
44900
45294
|
* @param issuer_raw_dn a #GByteArray which holds the DER encoded issuer DN.
|
|
@@ -45412,7 +45806,7 @@ export interface TlsInteraction {
|
|
|
45412
45806
|
* initialization function. Any interactions not implemented will return
|
|
45413
45807
|
* %G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method,
|
|
45414
45808
|
* it must also implement the corresponding finish method.
|
|
45415
|
-
* @
|
|
45809
|
+
* @interface
|
|
45416
45810
|
*/
|
|
45417
45811
|
export class TlsInteraction extends GObject.Object {
|
|
45418
45812
|
|
|
@@ -45655,7 +46049,7 @@ export interface UnixConnection {
|
|
|
45655
46049
|
* When the operation is finished, `callback` will be called. You can then call
|
|
45656
46050
|
* g_unix_connection_receive_credentials_finish() to get the result of the operation.
|
|
45657
46051
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
45658
|
-
* @param callback a #GAsyncReadyCallback
|
|
46052
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
45659
46053
|
*/
|
|
45660
46054
|
receive_credentials_async(cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
45661
46055
|
|
|
@@ -45727,7 +46121,7 @@ export interface UnixConnection {
|
|
|
45727
46121
|
* When the operation is finished, `callback` will be called. You can then call
|
|
45728
46122
|
* g_unix_connection_send_credentials_finish() to get the result of the operation.
|
|
45729
46123
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
45730
|
-
* @param callback a #GAsyncReadyCallback
|
|
46124
|
+
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
|
45731
46125
|
*/
|
|
45732
46126
|
send_credentials_async(cancellable: Cancellable | null, callback: AsyncReadyCallback<this> | null): void
|
|
45733
46127
|
|
|
@@ -48267,6 +48661,7 @@ export interface DBusInterfaceSkeletonClass {
|
|
|
48267
48661
|
*/
|
|
48268
48662
|
parent_class: GObject.ObjectClass
|
|
48269
48663
|
get_info: (interface_: DBusInterfaceSkeleton) => DBusInterfaceInfo
|
|
48664
|
+
get_vtable: (interface_: DBusInterfaceSkeleton) => DBusInterfaceVTable
|
|
48270
48665
|
get_properties: (interface_: DBusInterfaceSkeleton) => GLib.Variant
|
|
48271
48666
|
flush: (interface_: DBusInterfaceSkeleton) => void
|
|
48272
48667
|
g_authorize_method: (interface_: DBusInterfaceSkeleton, invocation: DBusMethodInvocation) => boolean
|
|
@@ -49591,7 +49986,7 @@ export interface FileIface {
|
|
|
49591
49986
|
make_symbolic_link_async: (file: File, symlink_value: string, io_priority: number, cancellable: Cancellable | null, callback: AsyncReadyCallback | null) => void
|
|
49592
49987
|
make_symbolic_link_finish: (file: File, result: AsyncResult) => boolean
|
|
49593
49988
|
copy: (source: File, destination: File, flags: FileCopyFlags, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null) => boolean
|
|
49594
|
-
copy_async: (source: File, destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null) => void
|
|
49989
|
+
copy_async: (source: File, destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null, callback: AsyncReadyCallback | null) => void
|
|
49595
49990
|
copy_finish: (file: File, res: AsyncResult) => boolean
|
|
49596
49991
|
move: (source: File, destination: File, flags: FileCopyFlags, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null) => boolean
|
|
49597
49992
|
move_async: (source: File, destination: File, flags: FileCopyFlags, io_priority: number, cancellable: Cancellable | null, progress_callback: FileProgressCallback | null, callback: AsyncReadyCallback | null) => void
|