Update gio annotations from GLib git
[platform/upstream/gobject-introspection.git] / gir / gio-2.0.c
1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
4
5 /**
6  * g_mount_guess_content_type:
7  * @mount: a #GMount
8  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
9  * @cancellable: optional #GCancellable object, %NULL to ignore
10  * @callback: a #GAsyncReadyCallback
11  * @user_data: user data passed to @callback
12  *
13  * Tries to guess the type of content stored on @mount. Returns one or
14  * more textual identifiers of well-known content types (typically
15  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
16  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
17  * specification for more on x-content types.
18  * This is an asynchronous operation (see
19  * g_mount_guess_content_type_sync() for the synchronous version), and
20  * is finished by calling g_mount_guess_content_type_finish() with the
21  *
22  * Since: 2.18
23  */
24
25
26 /**
27  * g_output_stream_flush_async:
28  * @stream: a #GOutputStream.
29  * @io_priority: the io priority of the request.
30  * @cancellable: optional #GCancellable object, %NULL to ignore.
31  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
32  * @user_data: the data to pass to callback function
33  *
34  * Flushes a stream asynchronously.
35  * For behaviour details see g_output_stream_flush().
36  * When the operation is finished @callback will be
37  * called. You can then call g_output_stream_flush_finish() to get the
38  * result of the operation.
39  */
40
41
42 /**
43  * GZlibDecompressor:file-info:
44  *
45  * A #GFileInfo containing the information found in the GZIP header
46  * of the data stream processed, or %NULL if the header was not yet
47  * fully processed, is not present at all, or the compressor's
48  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
49  *
50  * Since: 2.26
51  */
52
53
54 /**
55  * g_file_attribute_info_list_ref:
56  * @list: a #GFileAttributeInfoList to reference.
57  *
58  * References a file attribute info list.
59  *
60  * Returns: #GFileAttributeInfoList or %NULL on error.
61  */
62
63
64 /**
65  * g_drive_is_media_check_automatic:
66  * @drive: a #GDrive.
67  *
68  * Checks if @drive is capabable of automatically detecting media changes.
69  * media changes, %FALSE otherwise.
70  *
71  * Returns: %TRUE if the @drive is capabable of automatically detecting
72  */
73
74
75 /**
76  * g_dbus_message_set_header:
77  * @message: A #GDBusMessage.
78  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
79  * @value: A #GVariant to set the header field or %NULL to clear the header field.
80  *
81  * Sets a header field on @message.
82  * If @value is floating, @message assumes ownership of @value.
83  *
84  * Since: 2.26
85  */
86
87
88 /**
89  * g_app_info_add_supports_type:
90  * @appinfo: a #GAppInfo.
91  * @content_type: a string.
92  * @error: a #GError.
93  *
94  * Adds a content type to the application information to indicate the
95  * application is capable of opening files with the given content type.
96  *
97  * Returns: %TRUE on success, %FALSE on error.
98  */
99
100
101 /**
102  * g_file_info_get_size:
103  * @info: a #GFileInfo.
104  *
105  * Gets the file's size.
106  *
107  * Returns: a #goffset containing the file's size.
108  */
109
110
111 /**
112  * g_dbus_interface_info_lookup_signal:
113  * @info: A #GDBusInterfaceInfo.
114  * @name: A D-Bus signal name (typically in CamelCase)
115  *
116  * Looks up information about a signal.
117  * This cost of this function is O(n) in number of signals.
118  *
119  * Returns: A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
120  * Since: 2.26
121  */
122
123
124 /**
125  * g_dbus_connection_flush_sync:
126  * @connection: A #GDBusConnection.
127  * @cancellable: A #GCancellable or %NULL.
128  * @error: Return location for error or %NULL.
129  *
130  * Synchronously flushes @connection. The calling thread is blocked
131  * until this is done. See g_dbus_connection_flush() for the
132  * asynchronous version of this method and more details about what it
133  * does.
134  *
135  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
136  * Since: 2.26
137  */
138
139
140 /**
141  * g_dbus_message_set_signature:
142  * @message: A #GDBusMessage.
143  * @value: The value to set.
144  *
145  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
146  *
147  * Since: 2.26
148  */
149
150
151 /**
152  * g_file_make_symbolic_link:
153  * @file: a #GFile with the name of the symlink to create
154  * @symlink_value: a string with the path for the target of the new symlink
155  * @cancellable: optional #GCancellable object, %NULL to ignore.
156  * @error: a #GError.
157  *
158  * Creates a symbolic link named @file which contains the string
159  * If @cancellable is not %NULL, then the operation can be cancelled by
160  * triggering the cancellable object from another thread. If the operation
161  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
162  *
163  * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
164  */
165
166
167 /**
168  * g_io_stream_has_pending:
169  * @stream: a #GIOStream
170  *
171  * Checks if a stream has pending actions.
172  *
173  * Returns: %TRUE if @stream has pending actions.
174  * Since: 2.22
175  */
176
177
178 /**
179  * g_dbus_message_get_message_type:
180  * @message: A #GDBusMessage.
181  *
182  * Gets the type of @message.
183  *
184  * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
185  * Since: 2.26
186  */
187
188
189 /**
190  * SECTION:gdbusnamewatchin:
191  * @title: Watching Bus Names
192  * @short_description: Simple API for watching bus names
193  * @include: gio/gio.h
194  *
195  * Convenience API for watching bus names.
196  * <example id="gdbus-watching-names"><title>Simple application watching a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
197  */
198
199
200 /**
201  * GDBusProxy:g-flags:
202  *
203  * Flags from the #GDBusProxyFlags enumeration.
204  *
205  * Since: 2.26
206  */
207
208
209 /**
210  * g_socket_listener_new:
211  *
212  * Creates a new #GSocketListener with no sockets to listen for.
213  * New listeners can be added with e.g. g_socket_listener_add_address()
214  * or g_socket_listener_add_inet_port().
215  *
216  * Returns: a new #GSocketListener.
217  * Since: 2.22
218  */
219
220
221 /**
222  * g_bus_watch_name_with_closures:
223  * @bus_type: The type of bus to watch a name on.
224  * @name: The name (well-known or unique) to watch.
225  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
226  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
227  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
228  *
229  * Version of g_bus_watch_name() using closures instead of callbacks for
230  * easier binding in other languages.
231  * g_bus_unwatch_name() to stop watching the name.
232  *
233  * Returns: An identifier (never 0) that an be used with
234  * Rename to: g_bus_watch_name
235  * Since: 2.26
236  */
237
238
239 /**
240  * g_converter_output_stream_new:
241  * @base_stream: a #GOutputStream
242  * @converter: a #GConverter
243  *
244  * Creates a new converter output stream for the @base_stream.
245  *
246  * Returns: a new #GOutputStream.
247  */
248
249
250 /**
251  * g_async_result_get_user_data:
252  * @res: a #GAsyncResult.
253  *
254  * Gets the user data from a #GAsyncResult.
255  *
256  * Returns: (transfer full): the user data for @res.
257  */
258
259
260 /**
261  * g_file_poll_mountable:
262  * @file: input #GFile.
263  * @cancellable: optional #GCancellable object, %NULL to ignore.
264  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
265  * @user_data: the data to pass to callback function
266  *
267  * Polls a file of type G_FILE_TYPE_MOUNTABLE.
268  * If @cancellable is not %NULL, then the operation can be cancelled by
269  * triggering the cancellable object from another thread. If the operation
270  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
271  * When the operation is finished, @callback will be called. You can then call
272  * g_file_mount_mountable_finish() to get the result of the operation.
273  *
274  * Since: 2.22
275  */
276
277
278 /**
279  * g_socket_check_connect_result:
280  * @socket: a #GSocket
281  * @error: #GError for error reporting, or %NULL to ignore.
282  *
283  * Checks and resets the pending connect error for the socket.
284  * This is used to check for errors when g_socket_connect() is
285  * used in non-blocking mode.
286  *
287  * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
288  * Since: 2.22
289  */
290
291
292 /**
293  * g_io_module_new:
294  * @filename: filename of the shared library module.
295  *
296  * Creates a new GIOModule that will load the specific
297  * shared library when in use.
298  * or %NULL on error.
299  *
300  * Returns: a #GIOModule from given @filename,
301  */
302
303
304 /**
305  * g_application_new:
306  * @application_id: the application id
307  * @flags: the application flags
308  * @returns: a new #GApplication instance
309  *
310  * Creates a new #GApplication instance.
311  * This function calls g_type_init() for you.
312  * The application id must be valid.  See g_application_id_is_valid().
313  */
314
315
316 /**
317  * g_dbus_connection_get_capabilities:
318  * @connection: A #GDBusConnection.
319  *
320  * Gets the capabilities negotiated with the remote peer
321  *
322  * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
323  * Since: 2.26
324  */
325
326
327 /**
328  * GSrvTarget:
329  *
330  * A single target host/port that a network service is running on.
331  */
332
333
334 /**
335  * g_dbus_connection_close:
336  * @connection: A #GDBusConnection.
337  * @cancellable: A #GCancellable or %NULL.
338  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
339  * @user_data: The data to pass to @callback.
340  *
341  * Closes @connection. Note that this never causes the process to
342  * exit (this might only happen if the other end of a shared message
343  * bus connection disconnects, see #GDBusConnection:exit-on-close).
344  * Once the connection is closed, operations such as sending a message
345  * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
346  * will not automatically flush the connection so queued messages may
347  * be lost. Use g_dbus_connection_flush() if you need such guarantees.
348  * If @connection is already closed, this method fails with
349  * %G_IO_ERROR_CLOSED.
350  * When @connection has been closed, the #GDBusConnection::closed
351  * signal is emitted in the <link
352  * linkend="g-main-context-push-thread-default">thread-default main
353  * loop</link> of the thread that @connection was constructed in.
354  * This is an asynchronous method. When the operation is finished,
355  * linkend="g-main-context-push-thread-default">thread-default main
356  * loop</link> of the thread you are calling this method from. You can
357  * then call g_dbus_connection_close_finish() to get the result of the
358  * operation.  See g_dbus_connection_close_sync() for the synchronous
359  * version.
360  *
361  * Since: 2.26
362  */
363
364
365 /**
366  * g_resolver_lookup_by_address:
367  * @resolver: a #GResolver
368  * @address: the address to reverse-resolve
369  * @cancellable: a #GCancellable, or %NULL
370  * @error: return location for a #GError, or %NULL
371  *
372  * Synchronously reverse-resolves @address to determine its
373  * associated hostname.
374  * If the DNS resolution fails, @error (if non-%NULL) will be set to
375  * a value from #GResolverError.
376  * If @cancellable is non-%NULL, it can be used to cancel the
377  * operation, in which case @error (if non-%NULL) will be set to
378  * %G_IO_ERROR_CANCELLED.
379  * form), or %NULL on error.
380  *
381  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
382  * Since: 2.22
383  */
384
385
386 /**
387  * GDataStream:newline-type:
388  *
389  * The :newline-type property determines what is considered
390  * as a line ending when reading complete lines from the stream.
391  */
392
393
394 /**
395  * SECTION:gdbusnameownin:
396  * @title: Owning Bus Names
397  * @short_description: Simple API for owning bus names
398  * @include: gio/gio.h
399  *
400  * Convenience API for owning bus names.
401  * <example id="gdbus-owning-names"><title>Simple application owning a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-own-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
402  */
403
404
405 /**
406  * GInetAddress:is-loopback:
407  *
408  * Whether this is the loopback address for its family.
409  * See g_inet_address_get_is_loopback().
410  *
411  * Since: 2.22
412  */
413
414
415 /**
416  * GSettings:path:
417  *
418  * The path within the backend where the settings are stored.
419  */
420
421
422 /**
423  * GDBusMethodInvocationClass:
424  *
425  * Class structure for #GDBusMethodInvocation.
426  *
427  * Since: 2.26
428  */
429
430
431 /**
432  * g_dbus_method_invocation_get_user_data: (skip)
433  * @invocation: A #GDBusMethodInvocation.
434  *
435  * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
436  *
437  * Returns: A #gpointer.
438  * Since: 2.26
439  */
440
441
442 /**
443  * g_unix_mount_point_guess_icon:
444  * @mount_point: a #GUnixMountPoint
445  *
446  * Guesses the icon of a Unix mount point.
447  *
448  * Returns: (transfer full): a #GIcon
449  */
450
451
452 /**
453  * g_settings_get:
454  * @settings: a #GSettings object
455  * @key: the key to get the value for
456  * @format: a #GVariant format string
457  * @...: arguments as per @format
458  *
459  * Gets the value that is stored at @key in @settings.
460  * A convenience function that combines g_settings_get_value() with
461  * g_variant_get().
462  * It is a programmer error to give a @key that isn't contained in the
463  * schema for @settings or for the #GVariantType of @format to mismatch
464  * the type given in the schema.
465  *
466  * Since: 2.26
467  */
468
469
470 /**
471  * g_socket_control_message_get_size:
472  * @message: a #GSocketControlMessage
473  *
474  * Returns the space required for the control message, not including
475  * headers or alignment.
476  *
477  * Returns: The number of bytes required.
478  * Since: 2.22
479  */
480
481
482 /**
483  * g_settings_new_with_path:
484  * @schema: the name of the schema
485  * @path: the path to use
486  * @returns: a new #GSettings object
487  *
488  * Creates a new #GSettings object with a given schema and path.
489  * You only need to do this if you want to directly create a settings
490  * object with a schema that doesn't have a specified path of its own.
491  * That's quite rare.
492  * It is a programmer error to call this function for a schema that
493  * has an explicitly specified path.
494  *
495  * Since: 2.26
496  */
497
498
499 /**
500  * g_file_info_set_edit_name:
501  * @info: a #GFileInfo.
502  * @edit_name: a string containing an edit name.
503  *
504  * Sets the edit name for the current file.
505  * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
506  */
507
508
509 /**
510  * g_drive_can_start:
511  * @drive: a #GDrive.
512  *
513  * Checks if a drive can be started.
514  *
515  * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
516  * Since: 2.22
517  */
518
519
520 /**
521  * g_socket_service_is_active:
522  * @service: a #GSocketService
523  *
524  * Check whether the service is active or not. An active
525  * service will accept new clients that connect, while
526  * a non-active service will let connecting clients queue
527  * up until the service is started.
528  *
529  * Returns: %TRUE if the service is active, %FALSE otherwise
530  * Since: 2.22
531  */
532
533
534 /**
535  * g_unix_mount_at:
536  * @mount_path: path for a possible unix mount.
537  * @time_read: guint64 to contain a timestamp.
538  *
539  * Gets a #GUnixMountEntry for a given mount path. If @time_read
540  * is set, it will be filled with a unix timestamp for checking
541  * if the mounts have changed since with g_unix_mounts_changed_since().
542  *
543  * Returns: (transfer full): a #GUnixMount.
544  */
545
546
547 /**
548  * g_proxy_address_get_usernam:
549  * @proxy: a #GProxyAddress
550  *
551  * Gets @proxy's username.
552  *
553  * Returns: the @proxy's username
554  * Since: 2.26
555  */
556
557
558 /**
559  * g_initable_init:
560  * @initable: a #GInitable.
561  * @cancellable: optional #GCancellable object, %NULL to ignore.
562  * @error: a #GError location to store the error occuring, or %NULL to ignore.
563  *
564  * Initializes the object implementing the interface. This must be
565  * done before any real use of the object after initial construction.
566  * Implementations may also support cancellation. If @cancellable is not %NULL,
567  * then initialization can be cancelled by triggering the cancellable object
568  * from another thread. If the operation was cancelled, the error
569  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
570  * the object doesn't support cancellable initialization the error
571  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
572  * If this function is not called, or returns with an error then all
573  * operations on the object should fail, generally returning the
574  * error %G_IO_ERROR_NOT_INITIALIZED.
575  * Implementations of this method must be idempotent, i.e. multiple calls
576  * to this function with the same argument should return the same results.
577  * Only the first call initializes the object, further calls return the result
578  * of the first call. This is so that its safe to implement the singleton
579  * pattern in the GObject constructor function.
580  * return %FALSE and set @error appropriately if present.
581  *
582  * Returns: %TRUE if successful. If an error has occurred, this function will
583  * Since: 2.22
584  */
585
586
587 /**
588  * g_drive_enumerate_identifiers:
589  * @drive: a #GDrive
590  *
591  * Gets the kinds of identifiers that @drive has.
592  * Use g_drive_get_identifer() to obtain the identifiers
593  * themselves.
594  * kinds of identifiers. Use g_strfreev() to free.
595  *
596  * Returns: (transfer full): a %NULL-terminated array of strings containing
597  */
598
599
600 /**
601  * g_volume_monitor_get_volumes:
602  * @volume_monitor: a #GVolumeMonitor.
603  *
604  * Gets a list of the volumes on the system.
605  * The returned list should be freed with g_list_free(), after
606  * its elements have been unreffed with g_object_unref().
607  *
608  * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
609  */
610
611
612 /**
613  * g_dbus_message_new_signal:
614  * @path: A valid object path.
615  * @interface_: A valid D-Bus interface name.
616  * @signal: A valid signal name.
617  *
618  * Creates a new #GDBusMessage for a signal emission.
619  *
620  * Returns: A #GDBusMessage. Free with g_object_unref().
621  * Since: 2.26
622  */
623
624
625 /**
626  * g_settings_bind_writable:
627  * @settings: a #GSettings object
628  * @key: the key to bind
629  * @object: a #GObject
630  * @property: the name of a boolean property to bind
631  * @inverted: whether to 'invert' the value
632  *
633  * Create a binding between the writability of @key in the
634  * The property must be boolean; "sensitive" or "visible"
635  * properties of widgets are the most likely candidates.
636  * Writable bindings are always uni-directional; changes of the
637  * writability of the setting will be propagated to the object
638  * property, not the other way.
639  * When the @inverted argument is %TRUE, the binding inverts the
640  * value as it passes from the setting to the object, i.e. @property
641  * will be set to %TRUE if the key is <emphasis>not</emphasis>
642  * writable.
643  * Note that the lifecycle of the binding is tied to the object,
644  * and that you can have only one binding per object property.
645  * If you bind the same property twice on the same object, the second
646  * binding overrides the first one.
647  *
648  * Since: 2.26
649  */
650
651
652 /**
653  * g_memory_input_stream_new_from_data:
654  * @data: input data
655  * @len: length of the data, may be -1 if @data is a nul-terminated string
656  * @destroy: function that is called to free @data, or %NULL
657  *
658  * Creates a new #GMemoryInputStream with data in memory of a given size.
659  *
660  * Returns: new #GInputStream read from @data of @len bytes.
661  */
662
663
664 /**
665  * g_socket_connection_get_socket:
666  * @connection: a #GSocketConnection
667  *
668  * Gets the underlying #GSocket object of the connection.
669  * This can be useful if you want to do something unusual on it
670  * not supported by the #GSocketConnection APIs.
671  *
672  * Returns: (transfer none): a #GSocketAddress or %NULL on error.
673  * Since: 2.22
674  */
675
676
677 /**
678  * g_input_stream_is_closed:
679  * @stream: input stream.
680  *
681  * Checks if an input stream is closed.
682  *
683  * Returns: %TRUE if the stream is closed.
684  */
685
686
687 /**
688  * g_credentials_get_native: (skip)
689  * @credentials: A #GCredentials.
690  * @native_type: The type of native credentials to get.
691  *
692  * Gets a pointer to native credentials of type @native_type from
693  * It is a programming error (which will cause an warning to be
694  * logged) to use this method if there is no #GCredentials support for
695  * the OS or if @native_type isn't supported by the OS.
696  * operation there is no #GCredentials support for the OS or if
697  * data, it is owned by @credentials.
698  *
699  * Returns: The pointer to native credentials or %NULL if the
700  * Since: 2.26
701  */
702
703
704 /**
705  * g_file_replace_contents:
706  * @file: input #GFile.
707  * @contents: a string containing the new contents for @file.
708  * @length: the length of @contents in bytes.
709  * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
710  * @make_backup: %TRUE if a backup should be created.
711  * @flags: a set of #GFileCreateFlags.
712  * @new_etag: (allow-none) (out): a location to a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when no longer needed, or %NULL
713  * @cancellable: optional #GCancellable object, %NULL to ignore.
714  * @error: a #GError, or %NULL
715  *
716  * Replaces the contents of @file with @contents of @length bytes.
717  * If @etag is specified (not %NULL) any existing file must have that etag, or
718  * the error %G_IO_ERROR_WRONG_ETAG will be returned.
719  * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
720  * If @cancellable is not %NULL, then the operation can be cancelled by
721  * triggering the cancellable object from another thread. If the operation
722  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
723  * The returned @new_etag can be used to verify that the file hasn't changed the
724  * next time it is saved over.
725  * has occurred, this function will return %FALSE and set @error
726  * appropriately if present.
727  *
728  * Returns: %TRUE if successful. If an error
729  */
730
731
732 /**
733  * g_inet_address_to_bytes:
734  * @address: a #GInetAddress
735  *
736  * Gets the raw binary address data from @address.
737  * which should not be modified, stored, or freed. The size of this
738  * array can be gotten with g_inet_address_get_native_size().
739  *
740  * Returns: a pointer to an internal array of the bytes in @address,
741  * Since: 2.22
742  */
743
744
745 /**
746  * g_file_get_path:
747  * @file: input #GFile.
748  *
749  * Gets the local pathname for #GFile, if one exists.
750  * This call does no blocking i/o.
751  * no such path exists. The returned string should be
752  * freed with g_free() when no longer needed.
753  *
754  * Returns: string containing the #GFile's path, or %NULL if
755  */
756
757
758 /**
759  * g_file_input_stream_query_info:
760  * @stream: a #GFileInputStream.
761  * @attributes: a file attribute query string.
762  * @cancellable: optional #GCancellable object, %NULL to ignore.
763  * @error: a #GError location to store the error occuring, or %NULL to ignore.
764  *
765  * Queries a file input stream the given @attributes. This function blocks
766  * while querying the stream. For the asynchronous (non-blocking) version
767  * of this function, see g_file_input_stream_query_info_async(). While the
768  * stream is blocked, the stream will set the pending flag internally, and
769  * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
770  *
771  * Returns: (transfer full): a #GFileInfo, or %NULL on error.
772  */
773
774
775 /**
776  * g_permission_acquire_finish:
777  * @permission: a #GPermission instance
778  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
779  * @error: a pointer to a %NULL #GError, or %NULL
780  * @returns: %TRUE if the permission was successfully acquired
781  *
782  * Collects the result of attempting to acquire the permission
783  * represented by @permission.
784  * This is the second half of the asynchronous version of
785  * g_permission_acquire().
786  *
787  * Since: 2.26
788  */
789
790
791 /**
792  * g_file_mount_enclosing_volume_finish:
793  * @location: input #GFile.
794  * @result: a #GAsyncResult.
795  * @error: a #GError, or %NULL
796  *
797  * Finishes a mount operation started by g_file_mount_enclosing_volume().
798  * has occurred, this function will return %FALSE and set @error
799  * appropriately if present.
800  *
801  * Returns: %TRUE if successful. If an error
802  */
803
804
805 /**
806  * g_application_id_is_valid:
807  * @application_id: a potential application identifier
808  * @returns: %TRUE if @application_id is valid
809  *
810  * Checks if @application_id is a valid application identifier.
811  * A valid ID is required for calls to g_application_new() and
812  * g_application_set_application_id().
813  * For convenience, the restrictions on application identifiers are
814  * reproduced here:
815  * <itemizedlist>
816  * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-" and must not begin with a digit.</listitem>
817  * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least two elements).</listitem>
818  * <listitem>Application identifiers must not begin with a '.' (period) character.</listitem>
819  * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
820  * <listitem>Application identifiers must not exceed 255 characters.</listitem>
821  * </itemizedlist>
822  */
823
824
825 /**
826  * g_resolver_lookup_service_async:
827  * @resolver: a #GResolver
828  * @service: the service type to look up (eg, "ldap")
829  * @protocol: the networking protocol to use for @service (eg, "tcp")
830  * @domain: the DNS domain to look up the service in
831  * @cancellable: a #GCancellable, or %NULL
832  * @callback: callback to call after resolution completes
833  * @user_data: data for @callback
834  *
835  * Begins asynchronously performing a DNS SRV lookup for the given
836  * get the final result. See g_resolver_lookup_service() for more
837  * details.
838  *
839  * Since: 2.22
840  */
841
842
843 /**
844  * g_proxy_resolver_lookup:
845  * @resolver: a #GProxyResolver
846  * @uri: a URI representing the destination to connect to
847  * @cancellable: a #GCancellable, or %NULL
848  * @error: return location for a #GError, or %NULL
849  *
850  * Looks into the system proxy configuration to determine what proxy,
851  * if any, to use to connect to @uri. The returned proxy URIs are of the
852  * form <literal>&lt;protocol&gt;://[user[:password]@]host:port</literal>
853  * or <literal>direct://</literal>, where &lt;protocol&gt; could be
854  * http, rtsp, socks or other proxying protocol.
855  * If you don't know what network protocol is being used on the
856  * socket, you should use <literal>none</literal> as the URI protocol.
857  * In this case, the resolver might still return a generic proxy type
858  * (such as SOCKS), but would not return protocol-specific proxy types
859  * (such as http).
860  * <literal>direct://</literal> is used when no proxy is needed.
861  * Direct connection should not be attempted unless it is part of the
862  * returned array of proxies.
863  * g_strfreev().
864  *
865  * Returns: (transfer full) (element-type utf8): A NULL-terminated array of proxy URIs. Must be freed with
866  * Since: 2.26
867  */
868
869
870 /**
871  * g_data_output_stream_new:
872  * @base_stream: a #GOutputStream.
873  *
874  * Creates a new data output stream for @base_stream.
875  *
876  * Returns: #GDataOutputStream.
877  */
878
879
880 /**
881  * g_file_make_director:
882  * @file: input #GFile.
883  * @cancellable: optional #GCancellable object, %NULL to ignore.
884  * @error: a #GError, or %NULL
885  *
886  * Creates a directory. Note that this will only create a child directory of
887  * the immediate parent directory of the path or URI given by the #GFile. To
888  * recursively create directories, see g_file_make_directory_with_parents().
889  * This function will fail if the parent directory does not exist, setting
890  * directories, this function will fail, setting @error to
891  * %G_IO_ERROR_NOT_SUPPORTED.
892  * For a local #GFile the newly created directory will have the default
893  * (current) ownership and permissions of the current process.
894  * If @cancellable is not %NULL, then the operation can be cancelled by
895  * triggering the cancellable object from another thread. If the operation
896  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
897  *
898  * Returns: %TRUE on successful creation, %FALSE otherwise.
899  */
900
901
902 /**
903  * g_zlib_compressor_set_file_info:
904  * @compressor: a #GZlibCompressor
905  * @file_info: (allow-none): a #GFileInfo
906  *
907  * Sets @file_info in @compressor. If non-%NULL, and @compressor's
908  * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
909  * it will be used to set the file name and modification time in
910  * the GZIP header of the compressed data.
911  * progress; it may only be called immediately after creation of @compressor,
912  * or after resetting it with g_converter_reset().
913  *
914  * Note: it is an error to call this function while a compression is in
915  * Since: 2.26
916  */
917
918
919 /**
920  * g_cancellable_make_pollfd:
921  * @cancellable: a #GCancellable or %NULL
922  * @pollfd: a pointer to a #GPollFD
923  *
924  * Creates a #GPollFD corresponding to @cancellable; this can be passed
925  * to g_poll() and used to poll for cancellation. This is useful both
926  * for unix systems without a native poll and for portability to
927  * windows.
928  * When this function returns %TRUE, you should use
929  * g_cancellable_release_fd() to free up resources allocated for the
930  * If this function returns %FALSE, either no @cancellable was given or
931  * resource limits prevent this function from allocating the necessary
932  * structures for polling. (On Linux, you will likely have reached
933  * the maximum number of file descriptors.) The suggested way to handle
934  * these cases is to ignore the @cancellable.
935  * You are not supposed to read from the fd yourself, just check for
936  * readable status. Reading to unset the readable status is done
937  * with g_cancellable_reset().
938  * failure to prepare the cancellable.
939  *
940  * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
941  * Since: 2.22
942  */
943
944
945 /**
946  * g_file_icon_get_file:
947  * @icon: a #GIcon.
948  *
949  * Gets the #GFile associated with the given @icon.
950  *
951  * Returns: (transfer none): a #GFile, or %NULL.
952  */
953
954
955 /**
956  * g_seekable_seek:
957  * @seekable: a #GSeekable.
958  * @offset: a #goffset.
959  * @type: a #GSeekType.
960  * @cancellable: optional #GCancellable object, %NULL to ignore.
961  * @error: a #GError location to store the error occuring, or %NULL to ignore.
962  *
963  * Seeks in the stream by the given @offset, modified by @type.
964  * If @cancellable is not %NULL, then the operation can be cancelled by
965  * triggering the cancellable object from another thread. If the operation
966  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
967  * has occurred, this function will return %FALSE and set @error
968  * appropriately if present.
969  *
970  * Returns: %TRUE if successful. If an error
971  */
972
973
974 /**
975  * SECTION:gcontenttyp:
976  * @short_description: Platform-specific content typing
977  * @include: gio/gio.h
978  *
979  * A content type is a platform specific string that defines the type
980  * of a file. On unix it is a mime type, on win32 it is an extension string
981  * like ".doc", ".txt" or a percieved string like "audio". Such strings
982  * can be looked up in the registry at HKEY_CLASSES_ROOT.
983  */
984
985
986 /**
987  * GDBusConnection:locked:
988  *
989  * A boolean specifying whether the message is locked.
990  *
991  * Since: 2.26
992  */
993
994
995 /**
996  * g_dbus_proxy_call_finish:
997  * @proxy: A #GDBusProxy.
998  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
999  * @error: Return location for error or %NULL.
1000  *
1001  * Finishes an operation started with g_dbus_proxy_call().
1002  * return values. Free with g_variant_unref().
1003  *
1004  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
1005  * Since: 2.26
1006  */
1007
1008
1009 /**
1010  * g_socket_client_get_timeout:
1011  * @client: a #GSocketClient
1012  *
1013  * Gets the I/O timeout time for sockets created by @client.
1014  * See g_socket_client_set_timeout() for details.
1015  *
1016  * Returns: the timeout in seconds
1017  * Since: 2.26
1018  */
1019
1020
1021 /**
1022  * g_socket_address_to_native:
1023  * @address: a #GSocketAddress
1024  * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
1025  * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
1026  * @error: #GError for error reporting, or %NULL to ignore.
1027  *
1028  * Converts a #GSocketAddress to a native <type>struct
1029  * sockaddr</type>, which can be passed to low-level functions like
1030  * connect() or bind().
1031  * If not enough space is availible, a %G_IO_ERROR_NO_SPACE error is
1032  * returned. If the address type is not known on the system
1033  * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
1034  *
1035  * Returns: %TRUE if @dest was filled in, %FALSE on error
1036  * Since: 2.22
1037  */
1038
1039
1040 /**
1041  * g_bus_own_name_on_connection_with_closures:
1042  * @connection: A #GDBusConnection.
1043  * @name: The well-known name to own.
1044  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
1045  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
1046  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
1047  *
1048  * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
1049  * easier binding in other languages.
1050  * g_bus_unown_name() to stop owning the name.
1051  *
1052  * Returns: An identifier (never 0) that an be used with
1053  * Rename to: g_bus_own_name_on_connection
1054  * Since: 2.26
1055  */
1056
1057
1058 /**
1059  * g_socket_client_connect:
1060  * @client: a #GSocketClient.
1061  * @connectable: a #GSocketConnectable specifying the remote address.
1062  * @cancellable: optional #GCancellable object, %NULL to ignore.
1063  * @error: #GError for error reporting, or %NULL to ignore.
1064  *
1065  * Tries to resolve the @connectable and make a network connection to it..
1066  * Upon a successful connection, a new #GSocketConnection is constructed
1067  * and returned.  The caller owns this new object and must drop their
1068  * reference to it when finished with it.
1069  * The type of the #GSocketConnection object returned depends on the type of
1070  * the underlying socket that is used. For instance, for a TCP/IP connection
1071  * it will be a #GTcpConnection.
1072  * The socket created will be the same family as the the address that the
1073  * or indirectly via g_socket_client_set_local_address(). The socket type
1074  * defaults to %G_SOCKET_TYPE_STREAM but can be set with
1075  * g_socket_client_set_socket_type().
1076  * If a local address is specified with g_socket_client_set_local_address() the
1077  * socket will be bound to this address before connecting.
1078  *
1079  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
1080  * Since: 2.22
1081  */
1082
1083
1084 /**
1085  * g_settings_unbind:
1086  * @object: the object
1087  * @property: the property whose binding is removed
1088  *
1089  * Removes an existing binding for @property on @object.
1090  * Note that bindings are automatically removed when the
1091  * object is finalized, so it is rarely necessary to call this
1092  * function.
1093  *
1094  * Since: 2.26
1095  */
1096
1097
1098 /**
1099  * g_file_input_stream_query_info_finish:
1100  * @stream: a #GFileInputStream.
1101  * @result: a #GAsyncResult.
1102  * @error: a #GError location to store the error occuring, or %NULL to ignore.
1103  *
1104  * Finishes an asynchronous info query operation.
1105  *
1106  * Returns: (transfer full): #GFileInfo.
1107  */
1108
1109
1110 /**
1111  * GInetAddress:is-mc-link-local:
1112  *
1113  * Whether this is a link-local multicast address.
1114  * See g_inet_address_get_is_mc_link_local().
1115  *
1116  * Since: 2.22
1117  */
1118
1119
1120 /**
1121  * GUnixCredentialsMessage:credentials:
1122  *
1123  * The credentials stored in the message.
1124  *
1125  * Since: 2.26
1126  */
1127
1128
1129 /**
1130  * g_mount_is_shadowed:
1131  * @mount: A #GMount.
1132  *
1133  * Determines if @mount is shadowed. Applications or libraries should
1134  * avoid displaying @mount in the user interface if it is shadowed.
1135  * A mount is said to be shadowed if there exists one or more user
1136  * visible objects (currently #GMount objects) with a root that is
1137  * inside the root of @mount.
1138  * One application of shadow mounts is when exposing a single file
1139  * system that is used to address several logical volumes. In this
1140  * situation, a #GVolumeMonitor implementation would create two
1141  * #GVolume objects (for example, one for the camera functionality of
1142  * the device and one for a SD card reader on the device) with
1143  * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
1144  * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
1145  * underlying mount (with root
1146  * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
1147  * #GVolumeMonitor implementation would create two #GMount objects
1148  * (each with their root matching the corresponding volume activation
1149  * root) that would shadow the original mount.
1150  * The proxy monitor in GVfs 2.26 and later, automatically creates and
1151  * manage shadow mounts (and shadows the underlying mount) if the
1152  * activation root on a #GVolume is set.
1153  *
1154  * Returns: %TRUE if @mount is shadowed.
1155  * Since: 2.20
1156  */
1157
1158
1159 /**
1160  * g_io_scheduler_push_job:
1161  * @job_func: a #GIOSchedulerJobFunc.
1162  * @user_data: data to pass to @job_func
1163  * @notify: a #GDestroyNotify for @user_data, or %NULL
1164  * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
1165  * @cancellable: optional #GCancellable object, %NULL to ignore.
1166  *
1167  * Schedules the I/O job to run.
1168  * regardless whether the job was cancelled or has run to completion.
1169  * If @cancellable is not %NULL, it can be used to cancel the I/O job
1170  * by calling g_cancellable_cancel() or by calling
1171  * g_io_scheduler_cancel_all_jobs().
1172  */
1173
1174
1175 /**
1176  * g_dbus_message_set_serial:
1177  * @message: A #GDBusMessage.
1178  * @serial: A #guint32.
1179  *
1180  * Sets the serial for @message.
1181  *
1182  * Since: 2.26
1183  */
1184
1185
1186 /**
1187  * g_dbus_auth_observer_authorize_authenticated_peer:
1188  * @observer: A #GDBusAuthObserver.
1189  * @stream: A #GIOStream for the #GDBusConnection.
1190  * @credentials: Credentials received from the peer or %NULL.
1191  *
1192  * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
1193  *
1194  * Returns: %TRUE if the peer is authorized, %FALSE if not.
1195  * Since: 2.26
1196  */
1197
1198
1199 /**
1200  * g_io_stream_get_output_stream:
1201  * @stream: a #GIOStream
1202  *
1203  * Gets the output stream for this object. This is used for
1204  * writing.
1205  * Do not free.
1206  *
1207  * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
1208  * Since: 2.22
1209  */
1210
1211
1212 /**
1213  * g_file_query_settable_attributes:
1214  * @file: input #GFile.
1215  * @cancellable: optional #GCancellable object, %NULL to ignore.
1216  * @error: a #GError, or %NULL
1217  *
1218  * Obtain the list of settable attributes for the file.
1219  * Returns the type and full attribute name of all the attributes
1220  * that can be set on this file. This doesn't mean setting it will always
1221  * succeed though, you might get an access failure, or some specific
1222  * file may not support a specific attribute.
1223  * If @cancellable is not %NULL, then the operation can be cancelled by
1224  * triggering the cancellable object from another thread. If the operation
1225  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1226  * When you are done with it, release it with g_file_attribute_info_list_unref()
1227  *
1228  * Returns: a #GFileAttributeInfoList describing the settable attributes.
1229  */
1230
1231
1232 /**
1233  * GActionGroup::action-added:
1234  * @action_group: the #GActionGroup that changed
1235  * @action_name: the name of the action in @action_group
1236  *
1237  * Signals that a new action was just added to the group.  This signal
1238  * is emitted after the action has been added and is now visible.
1239  *
1240  * Since: 2.28
1241  */
1242
1243
1244 /**
1245  * GWin32InputStream:close-handle:
1246  *
1247  * Whether to close the file handle when the stream is closed.
1248  *
1249  * Since: 2.26
1250  */
1251
1252
1253 /**
1254  * g_socket_listener_set_backlog:
1255  * @listener: a #GSocketListener
1256  * @listen_backlog: an integer
1257  *
1258  * Sets the listen backlog on the sockets in the listener.
1259  * See g_socket_set_listen_backlog() for details
1260  *
1261  * Since: 2.22
1262  */
1263
1264
1265 /**
1266  * GFilenameCompleter::got-completion-data:
1267  *
1268  * Emitted when the file name completion information comes available.
1269  */
1270
1271
1272 /**
1273  * g_dbus_connection_flush_finish:
1274  * @connection: A #GDBusConnection.
1275  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
1276  * @error: Return location for error or %NULL.
1277  *
1278  * Finishes an operation started with g_dbus_connection_flush().
1279  *
1280  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
1281  * Since: 2.26
1282  */
1283
1284
1285 /**
1286  * g_dbus_method_invocation_get_message:
1287  * @invocation: A #GDBusMethodInvocation.
1288  *
1289  * Gets the #GDBusMessage for the method invocation. This is useful if
1290  * you need to use low-level protocol features, such as UNIX file
1291  * descriptor passing, that cannot be properly expressed in the
1292  * #GVariant API.
1293  * See <xref linkend="gdbus-server"/> and <xref
1294  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
1295  * low-level API to send and receive UNIX file descriptors.
1296  *
1297  * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
1298  * Since: 2.26
1299  */
1300
1301
1302 /**
1303  * g_socket_create_source:
1304  * @socket: a #GSocket
1305  * @condition: a #GIOCondition mask to monitor
1306  * @cancellable: a %GCancellable or %NULL
1307  *
1308  * Creates a %GSource that can be attached to a %GMainContext to monitor
1309  * for the availibility of the specified @condition on the socket.
1310  * The callback on the source is of the #GSocketSourceFunc type.
1311  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
1312  * these conditions will always be reported output if they are true.
1313  * cause the source to trigger, reporting the current condition (which
1314  * is likely 0 unless cancellation happened at the same time as a
1315  * condition change). You can check for this in the callback using
1316  * g_cancellable_is_cancelled().
1317  * If @socket has a timeout set, and it is reached before @condition
1318  * occurs, the source will then trigger anyway, reporting %G_IO_IN or
1319  * %G_IO_OUT depending on @condition. However, @socket will have been
1320  * marked as having had a timeout, and so the next #GSocket I/O method
1321  * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
1322  *
1323  * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
1324  * Since: 2.22
1325  */
1326
1327
1328 /**
1329  * g_file_attribute_matcher_enumerate_namespace:
1330  * @matcher: a #GFileAttributeMatcher.
1331  * @ns: a string containing a file attribute namespace.
1332  *
1333  * Checks if the matcher will match all of the keys in a given namespace.
1334  * This will always return %TRUE if a wildcard character is in use (e.g. if
1335  * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
1336  * using "*" and namespace is anything.)
1337  * in the given @ns, %FALSE otherwise.
1338  *
1339  * Todo: this is awkwardly worded.
1340  * Returns: %TRUE if the matcher matches all of the entries
1341  */
1342
1343
1344 /**
1345  * g_simple_async_result_get_op_res_gboolean:
1346  * @simple: a #GSimpleAsyncResult.
1347  *
1348  * Gets the operation result boolean from within the asynchronous result.
1349  * if the operation's result was %FALSE.
1350  *
1351  * Returns: %TRUE if the operation's result was %TRUE, %FALSE
1352  */
1353
1354
1355 /**
1356  * SECTION:gnetworkaddres:
1357  * @short_description: A GSocketConnectable for resolving hostnames
1358  * @include: gio/gio.h
1359  *
1360  * #GNetworkAddress provides an easy way to resolve a hostname and
1361  * then attempt to connect to that host, handling the possibility of
1362  * multiple IP addresses and multiple address families.
1363  * See #GSocketConnectable for and example of using the connectable
1364  * interface.
1365  */
1366
1367
1368 /**
1369  * g_application_get_is_remote:
1370  * @application: a #GApplication
1371  * @returns: %TRUE if @application is remote
1372  *
1373  * Checks if @application is remote.
1374  * If @application is remote then it means that another instance of
1375  * application already exists (the 'primary' instance).  Calls to
1376  * perform actions on @application will result in the actions being
1377  * performed by the primary instance.
1378  * The value of this property can not be accessed before
1379  * g_application_register() has been called.  See
1380  * g_application_get_is_registered().
1381  *
1382  * Since: 2.28
1383  */
1384
1385
1386 /**
1387  * GVolumeMonitor::drive-changed:
1388  * @volume_monitor: The volume monitor emitting the signal.
1389  * @drive: the drive that changed
1390  *
1391  * Emitted when a drive changes.
1392  */
1393
1394
1395 /**
1396  * g_credentials_get_unix_user:
1397  * @credentials: A #GCredentials
1398  * @error: Return location for error or %NULL.
1399  *
1400  * Tries to get the UNIX user identifier from @credentials. This
1401  * method is only available on UNIX platforms.
1402  * This operation can fail if #GCredentials is not supported on the
1403  * OS or if the native credentials type does not contain information
1404  * about the UNIX user.
1405  *
1406  * Returns: The UNIX user identifier or -1 if @error is set.
1407  * Since: 2.26
1408  */
1409
1410
1411 /**
1412  * SECTION:gemblemedico:
1413  * @short_description: Icon with emblems
1414  * @include: gio/gio.h
1415  * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
1416  *
1417  * #GEmblemedIcon is an implementation of #GIcon that supports
1418  * adding an emblem to an icon. Adding multiple emblems to an
1419  * icon is ensured via g_emblemed_icon_add_emblem().
1420  * Note that #GEmblemedIcon allows no control over the position
1421  * of the emblems. See also #GEmblem for more information.
1422  */
1423
1424
1425 /**
1426  * g_file_enumerator_set_pending:
1427  * @enumerator: a #GFileEnumerator.
1428  * @pending: a boolean value.
1429  *
1430  * Sets the file enumerator as having pending operations.
1431  */
1432
1433
1434 /**
1435  * g_dbus_proxy_get_default_timeout:
1436  * @proxy: A #GDBusProxy.
1437  *
1438  * Gets the timeout to use if -1 (specifying default timeout) is
1439  * passed as @timeout_msec in the g_dbus_proxy_call() and
1440  * g_dbus_proxy_call_sync() functions.
1441  * See the #GDBusProxy:g-default-timeout property for more details.
1442  *
1443  * Returns: Timeout to use for @proxy.
1444  * Since: 2.26
1445  */
1446
1447
1448 /**
1449  * g_application_release:
1450  * @application: a #GApplication
1451  *
1452  * Decrease the use count of @application.
1453  * When the use count reaches zero, the application will stop running.
1454  * Never call this function except to cancel the effect of a previous
1455  * call to g_application_hold().
1456  */
1457
1458
1459 /**
1460  * GSocketService::incoming:
1461  * @service: the #GSocketService.
1462  * @connection: a new #GSocketConnection object.
1463  * @source_object: the source_object passed to g_socket_listener_add_address().
1464  *
1465  * The ::incoming signal is emitted when a new incoming connection
1466  * to @service needs to be handled. The handler must initiate the
1467  * handling of @connection, but may not block; in essence,
1468  * asynchronous operations must be used.
1469  *
1470  * Returns: %TRUE to stop other handlers from being called
1471  * Since: 2.22
1472  */
1473
1474
1475 /**
1476  * g_io_error_from_errno:
1477  * @err_no: Error number as defined in errno.h.
1478  *
1479  * Converts errno.h error codes into GIO error codes.
1480  *
1481  * Returns: #GIOErrorEnum value for the given errno.h error number.
1482  */
1483
1484
1485 /**
1486  * g_file_enumerator_get_container:
1487  * @enumerator: a #GFileEnumerator
1488  *
1489  * Get the #GFile container which is being enumerated.
1490  *
1491  * Returns: (transfer full): the #GFile which is being enumerated.
1492  * Since: 2.18
1493  */
1494
1495
1496 /**
1497  * g_volume_monitor_adopt_orphan_mount:
1498  * @mount: a #GMount object to find a parent for
1499  *
1500  * This function should be called by any #GVolumeMonitor
1501  * implementation when a new #GMount object is created that is not
1502  * associated with a #GVolume object. It must be called just before
1503  * emitting the @mount_added signal.
1504  * If the return value is not %NULL, the caller must associate the
1505  * returned #GVolume object with the #GMount. This involves returning
1506  * it in its g_mount_get_volume() implementation. The caller must
1507  * also listen for the "removed" signal on the returned object
1508  * and give up its reference when handling that signal
1509  * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
1510  * the implementor must take a reference to @mount and return it in
1511  * its g_volume_get_mount() implemented. Also, the implementor must
1512  * listen for the "unmounted" signal on @mount and give up its
1513  * reference upon handling that signal.
1514  * There are two main use cases for this function.
1515  * One is when implementing a user space file system driver that reads
1516  * blocks of a block device that is already represented by the native
1517  * volume monitor (for example a CD Audio file system driver). Such
1518  * a driver will generate its own #GMount object that needs to be
1519  * assoicated with the #GVolume object that represents the volume.
1520  * The other is for implementing a #GVolumeMonitor whose sole purpose
1521  * is to return #GVolume objects representing entries in the users
1522  * "favorite servers" list or similar.
1523  * if no wants to adopt the #GMount.
1524  * implementations should instead create shadow mounts with the URI of
1525  * the mount they intend to adopt. See the proxy volume monitor in
1526  * gvfs for an example of this. Also see g_mount_is_shadowed(),
1527  * g_mount_shadow() and g_mount_unshadow() functions.
1528  *
1529  * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
1530  * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
1531  */
1532
1533
1534 /**
1535  * g_action_get_state:
1536  * @action: a #GAction
1537  *
1538  * Queries the current state of @action.
1539  * If the action is not stateful then %NULL will be returned.  If the
1540  * action is stateful then the type of the return value is the type
1541  * given by g_action_get_state_type().
1542  * The return value (if non-%NULL) should be freed with
1543  * g_variant_unref() when it is no longer required.
1544  *
1545  * Returns: (transfer full): the current state of the action
1546  * Since: 2.28
1547  */
1548
1549
1550 /**
1551  * g_dbus_connection_emit_signal:
1552  * @connection: A #GDBusConnection.
1553  * @destination_bus_name: The unique bus name for the destination for the signal or %NULL to emit to all listeners.
1554  * @object_path: Path of remote object.
1555  * @interface_name: D-Bus interface to emit a signal on.
1556  * @signal_name: The name of the signal to emit.
1557  * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
1558  * @error: Return location for error or %NULL.
1559  *
1560  * Emits a signal.
1561  * If the parameters GVariant is floating, it is consumed.
1562  * This can only fail if @parameters is not compatible with the D-Bus protocol.
1563  *
1564  * Returns: %TRUE unless @error is set.
1565  * Since: 2.26
1566  */
1567
1568
1569 /**
1570  * g_emblemed_icon_add_emblem:
1571  * @emblemed: a #GEmblemedIcon
1572  * @emblem: a #GEmblem
1573  *
1574  * Adds @emblem to the #GList of #GEmblem <!-- -->s.
1575  *
1576  * Since: 2.18
1577  */
1578
1579
1580 /**
1581  * g_emblem_get_icon:
1582  * @emblem: a #GEmblem from which the icon should be extracted.
1583  *
1584  * Gives back the icon from @emblem.
1585  * and should not be modified or freed.
1586  *
1587  * Returns: (transfer full): a #GIcon. The returned object belongs to the emblem
1588  * Since: 2.18
1589  */
1590
1591
1592 /**
1593  * SECTION:gfilemonito:
1594  * @short_description: File Monitor
1595  * @include: gio/gio.h
1596  *
1597  * Monitors a file or directory for changes.
1598  * To obtain a #GFileMonitor for a file or directory, use
1599  * g_file_monitor(), g_file_monitor_file(), or
1600  * g_file_monitor_directory().
1601  * To get informed about changes to the file or directory you are
1602  * monitoring, connect to the #GFileMonitor::changed signal. The
1603  * signal will be emitted in the <link
1604  * linkend="g-main-context-push-thread-default">thread-default main
1605  * context</link> of the thread that the monitor was created in
1606  * (though if the global default main context is blocked, this may
1607  * cause notifications to be blocked even if the thread-default
1608  * context is still running).
1609  */
1610
1611
1612 /**
1613  * g_dbus_node_info_ref:
1614  * @info: A #GDBusNodeInfo
1615  *
1616  * If @info is statically allocated does nothing. Otherwise increases
1617  * the reference count.
1618  *
1619  * Returns: The same @info.
1620  * Since: 2.26
1621  */
1622
1623
1624 /**
1625  * g_action_get_enabled:
1626  * @action: a #GAction
1627  *
1628  * Checks if @action is currently enabled.
1629  * An action must be enabled in order to be activated or in order to
1630  * have its state changed from outside callers.
1631  *
1632  * Returns: whether the action is enabled
1633  * Since: 2.28
1634  */
1635
1636
1637 /**
1638  * g_dbus_connection_new_for_address:
1639  * @address: A D-Bus address.
1640  * @flags: Flags describing how to make the connection.
1641  * @observer: A #GDBusAuthObserver or %NULL.
1642  * @cancellable: A #GCancellable or %NULL.
1643  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1644  * @user_data: The data to pass to @callback.
1645  *
1646  * Asynchronously connects and sets up a D-Bus client connection for
1647  * exchanging D-Bus messages with an endpoint specified by @address
1648  * which must be in the D-Bus address format.
1649  * This constructor can only be used to initiate client-side
1650  * connections - use g_dbus_connection_new() if you need to act as the
1651  * server. In particular, @flags cannot contain the
1652  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
1653  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
1654  * When the operation is finished, @callback will be invoked. You can
1655  * then call g_dbus_connection_new_finish() to get the result of the
1656  * operation.
1657  * If @observer is not %NULL it may be used to control the
1658  * authentication process.
1659  * This is a asynchronous failable constructor. See
1660  * g_dbus_connection_new_for_address_sync() for the synchronous
1661  * version.
1662  *
1663  * Since: 2.26
1664  */
1665
1666
1667 /**
1668  * g_drive_get_identifier:
1669  * @drive: a #GDrive
1670  * @kind: the kind of identifier to return
1671  *
1672  * Gets the identifier of the given kind for @drive.
1673  * requested identfier, or %NULL if the #GDrive
1674  * doesn't have this kind of identifier.
1675  *
1676  * Returns: a newly allocated string containing the
1677  */
1678
1679
1680 /**
1681  * GMountOperation:password:
1682  *
1683  * The password that is used for authentication when carrying out
1684  * the mount operation.
1685  */
1686
1687
1688 /**
1689  * g_network_service_set_scheme:
1690  * @srv: a #GNetworkService
1691  * @scheme: a URI scheme
1692  *
1693  * Set's the URI scheme used to resolve proxies. By default, the service name
1694  * is used as scheme.
1695  *
1696  * Since: 2.26
1697  */
1698
1699
1700 /**
1701  * g_win32_output_stream_new:
1702  * @handle: a Win32 file handle
1703  * @close_handle: %TRUE to close the handle when done
1704  *
1705  * Creates a new #GWin32OutputStream for the given @handle.
1706  * If @close_handle, is %TRUE, the handle will be closed when the
1707  * output stream is destroyed.
1708  *
1709  * Returns: a new #GOutputStream
1710  * Since: 2.26
1711  */
1712
1713
1714 /**
1715  * g_volume_get_mount:
1716  * @volume: a #GVolume.
1717  *
1718  * Gets the mount for the @volume.
1719  * The returned object should be unreffed with g_object_unref()
1720  * when no longer needed.
1721  *
1722  * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
1723  */
1724
1725
1726 /**
1727  * g_unix_socket_address_new:
1728  * @path: the socket path
1729  *
1730  * Creates a new #GUnixSocketAddress for @path.
1731  * To create abstract socket addresses, on systems that support that,
1732  * use g_unix_socket_address_new_abstract().
1733  *
1734  * Returns: a new #GUnixSocketAddress
1735  * Since: 2.22
1736  */
1737
1738
1739 /**
1740  * GMountOperation:password-save:
1741  *
1742  * Determines if and how the password information should be saved.
1743  */
1744
1745
1746 /**
1747  * g_dbus_proxy_get_flags:
1748  * @proxy: A #GDBusProxy.
1749  *
1750  * Gets the flags that @proxy was constructed with.
1751  *
1752  * Returns: Flags from the #GDBusProxyFlags enumeration.
1753  * Since: 2.26
1754  */
1755
1756
1757 /**
1758  * g_inet_address_get_is_mc_global:
1759  * @address: a #GInetAddress
1760  *
1761  * Tests whether @address is a global multicast address.
1762  *
1763  * Returns: %TRUE if @address is a global multicast address.
1764  * Since: 2.22
1765  */
1766
1767
1768 /**
1769  * GPermission:can-acquire:
1770  *
1771  * %TRUE if it is generally possible to acquire the permission by calling
1772  * g_permission_acquire().
1773  */
1774
1775
1776 /**
1777  * GMemoryOutputStream:realloc-function:
1778  *
1779  * Function with realloc semantics called to enlarge the buffer.
1780  *
1781  * Since: 2.24
1782  */
1783
1784
1785 /**
1786  * g_unix_input_stream_get_close_fd:
1787  * @stream: a #GUnixInputStream
1788  *
1789  * Returns whether the file descriptor of @stream will be
1790  * closed when the stream is closed.
1791  *
1792  * Returns: %TRUE if the file descriptor is closed when done
1793  * Since: 2.20
1794  */
1795
1796
1797 /**
1798  * g_dbus_proxy_new_sync:
1799  * @connection: A #GDBusConnection.
1800  * @flags: Flags used when constructing the proxy.
1801  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
1802  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1803  * @object_path: An object path.
1804  * @interface_name: A D-Bus interface name.
1805  * @cancellable: (allow-none): A #GCancellable or %NULL.
1806  * @error: (allow-none): Return location for error or %NULL.
1807  *
1808  * Creates a proxy for accessing @interface_name on the remote object
1809  * at @object_path owned by @name at @connection and synchronously
1810  * loads D-Bus properties unless the
1811  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
1812  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
1813  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
1814  * to handle signals from the remote object.
1815  * If @name is a well-known name and the
1816  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
1817  * owner currently exists, the message bus will be requested to launch
1818  * a name owner for the name.
1819  * This is a synchronous failable constructor. See g_dbus_proxy_new()
1820  * and g_dbus_proxy_new_finish() for the asynchronous version.
1821  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
1822  *
1823  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
1824  * Since: 2.26
1825  */
1826
1827
1828 /**
1829  * SECTION:gdbusconnectio:
1830  * @short_description: D-Bus Connections
1831  * @include: gio/gio.h
1832  *
1833  * The #GDBusConnection type is used for D-Bus connections to remote
1834  * peers such as a message buses. It is a low-level API that offers a
1835  * lot of flexibility. For instance, it lets you establish a connection
1836  * over any transport that can by represented as an #GIOStream.
1837  * This class is rarely used directly in D-Bus clients. If you are writing
1838  * an D-Bus client, it is often easier to use the g_bus_own_name(),
1839  * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
1840  * <example id="gdbus-server"><title>D-Bus server example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-server.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
1841  * <example id="gdbus-subtree-server"><title>D-Bus subtree example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-subtree.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
1842  * <example id="gdbus-unix-fd-client"><title>D-Bus UNIX File Descriptor example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-unix-fd-client.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
1843  * <example id="gdbus-export"><title>Exporting a GObject</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-export.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
1844  */
1845
1846
1847 /**
1848  * SECTION:gfileinputstrea:
1849  * @short_description: File input streaming operations
1850  * @include: gio/gio.h
1851  * @see_also: #GInputStream, #GDataInputStream, #GSeekable
1852  *
1853  * GFileInputStream provides input streams that take their
1854  * content from a file.
1855  * GFileInputStream implements #GSeekable, which allows the input
1856  * stream to jump to arbitrary positions in the file, provided the
1857  * filesystem of the file allows it. To find the position of a file
1858  * input stream, use g_seekable_tell(). To find out if a file input
1859  * stream supports seeking, use g_seekable_stream_can_seek().
1860  * To position a file input stream, use g_seekable_seek().
1861  */
1862
1863
1864 /**
1865  * g_socket_client_new:
1866  *
1867  * Creates a new #GSocketClient with the default options.
1868  * Free the returned object with g_object_unref().
1869  *
1870  * Returns: a #GSocketClient.
1871  * Since: 2.22
1872  */
1873
1874
1875 /**
1876  * GDBusProxy:g-connection:
1877  *
1878  * The #GDBusConnection the proxy is for.
1879  *
1880  * Since: 2.26
1881  */
1882
1883
1884 /**
1885  * g_file_enumerator_has_pending:
1886  * @enumerator: a #GFileEnumerator.
1887  *
1888  * Checks if the file enumerator has pending operations.
1889  *
1890  * Returns: %TRUE if the @enumerator has pending operations.
1891  */
1892
1893
1894 /**
1895  * g_socket_send_to:
1896  * @socket: a #GSocket
1897  * @address: a #GSocketAddress, or %NULL
1898  * @buffer: the buffer containing the data to send.
1899  * @size: the number of bytes to send
1900  * @cancellable: a %GCancellable or %NULL
1901  * @error: #GError for error reporting, or %NULL to ignore.
1902  *
1903  * Tries to send @size bytes from @buffer to @address. If @address is
1904  * %NULL then the message is sent to the default receiver (set by
1905  * g_socket_connect()).
1906  * See g_socket_send() for additional information.
1907  * on error
1908  *
1909  * Returns: Number of bytes written (which may be less than @size), or -1
1910  * Since: 2.22
1911  */
1912
1913
1914 /**
1915  * g_file_new_for_uri:
1916  * @uri: a UTF8 string containing a URI.
1917  *
1918  * Constructs a #GFile for a given URI. This operation never
1919  * fails, but the returned object might not support any I/O
1920  * operation if @uri is malformed or if the uri type is
1921  * not supported.
1922  *
1923  * Returns: (transfer full): a #GFile for the given @uri.
1924  */
1925
1926
1927 /**
1928  * g_mount_operation_set_anonymous:
1929  * @op: a #GMountOperation.
1930  * @anonymous: boolean value.
1931  *
1932  * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
1933  */
1934
1935
1936 /**
1937  * SECTION:
1938  * @title: GUnixFDMessage
1939  * @short_description: A GSocketControlMessage containing a GUnixFDList
1940  * @include: gio/gunixfdmessage.h
1941  * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
1942  *
1943  * This #GSocketControlMessage contains a #GUnixFDList.
1944  * It may be sent using g_socket_send_message() and received using
1945  * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
1946  * between processes by the kernel.
1947  * For an easier way to send and receive file descriptors over
1948  * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
1949  * g_unix_connection_receive_fd().
1950  * Note that <filename>&lt;gio/gunixfdmessage.h&gt;</filename> belongs to
1951  * the UNIX-specific GIO interfaces, thus you have to use the
1952  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
1953  *
1954  * G_socket_receive_message() over unix sockets (ie: sockets in the
1955  */
1956
1957
1958 /**
1959  * SECTION:gdriv:
1960  * @short_description: Drive management
1961  * @include: gio/gio.h
1962  *
1963  * #GDrive - this represent a piece of hardware connected to the machine.
1964  * It's generally only created for removable hardware or hardware with
1965  * removable media.
1966  * #GDrive is a container class for #GVolume objects that stem from
1967  * the same piece of media. As such, #GDrive abstracts a drive with
1968  * (or without) removable media and provides operations for querying
1969  * whether media is available, determing whether media change is
1970  * automatically detected and ejecting the media.
1971  * If the #GDrive reports that media isn't automatically detected, one
1972  * can poll for media; typically one should not do this periodically
1973  * as a poll for media operation is potententially expensive and may
1974  * spin up the drive creating noise.
1975  * #GDrive supports starting and stopping drives with authentication
1976  * support for the former. This can be used to support a diverse set
1977  * of use cases including connecting/disconnecting iSCSI devices,
1978  * powering down external disk enclosures and starting/stopping
1979  * multi-disk devices such as RAID devices. Note that the actual
1980  * semantics and side-effects of starting/stopping a #GDrive may vary
1981  * according to implementation. To choose the correct verbs in e.g. a
1982  * file manager, use g_drive_get_start_stop_type().
1983  * For porting from GnomeVFS note that there is no equivalent of
1984  * #GDrive in that API.
1985  */
1986
1987
1988 /**
1989  * g_periodic_add:
1990  * @periodic: a #GPeriodic clock
1991  * @callback: a #GPeriodicTickFunc function
1992  * @user_data: data for @callback
1993  * @notify: for freeing @user_data when it is no longer needed
1994  *
1995  * Request periodic calls to @callback to start.  The periodicity of the
1996  * calls is determined by the 'hz' property.
1997  * This function may not be called from a handler of the repair signal,
1998  * but it is perfectly reasonable to call it from a handler of the tick
1999  * signal.
2000  * The callback may be cancelled later by using g_periodic_remove() on
2001  * the return value of this function.
2002  *
2003  * Returns: a non-zero tag identifying this callback
2004  * Since: 2.28
2005  */
2006
2007
2008 /**
2009  * g_dbus_message_get_header_fields:
2010  * @message: A #GDBusMessage.
2011  *
2012  * Gets an array of all header fields on @message that are set.
2013  * %G_DBUS_MESSAGE_HEADER_FIELD_INVALID.  Each element is a
2014  * #guchar. Free with g_free().
2015  *
2016  * Returns: An array of header fields terminated by
2017  * Since: 2.26
2018  */
2019
2020
2021 /**
2022  * g_application_get_application_id:
2023  * @application: a #GApplication
2024  * @returns: the identifier for @application, owned by @application
2025  *
2026  * Gets the unique identifier for @application.
2027  *
2028  * Since: 2.28
2029  */
2030
2031
2032 /**
2033  * g_socket_connection_factory_create_connection:
2034  * @socket: a #GSocket
2035  *
2036  * Creates a #GSocketConnection subclass of the right type for
2037  *
2038  * Returns: (transfer full): a #GSocketConnection
2039  * Since: 2.22
2040  */
2041
2042
2043 /**
2044  * g_drive_poll_for_media:
2045  * @drive: a #GDrive.
2046  * @cancellable: optional #GCancellable object, %NULL to ignore.
2047  * @callback: a #GAsyncReadyCallback, or %NULL.
2048  * @user_data: user data to pass to @callback
2049  *
2050  * Asynchronously polls @drive to see if media has been inserted or removed.
2051  * When the operation is finished, @callback will be called.
2052  * You can then call g_drive_poll_for_media_finish() to obtain the
2053  * result of the operation.
2054  */
2055
2056
2057 /**
2058  * g_file_trash:
2059  * @file: #GFile to send to trash.
2060  * @cancellable: optional #GCancellable object, %NULL to ignore.
2061  * @error: a #GError, or %NULL
2062  *
2063  * Sends @file to the "Trashcan", if possible. This is similar to
2064  * deleting it, but the user can recover it before emptying the trashcan.
2065  * Not all file systems support trashing, so this call can return the
2066  * %G_IO_ERROR_NOT_SUPPORTED error.
2067  * If @cancellable is not %NULL, then the operation can be cancelled by
2068  * triggering the cancellable object from another thread. If the operation
2069  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2070  *
2071  * Returns: %TRUE on successful trash, %FALSE otherwise.
2072  */
2073
2074
2075 /**
2076  * g_unix_mounts_get:
2077  * @time_read: (allow-none): guint64 to contain a timestamp, or %NULL
2078  *
2079  * Gets a #GList of #GUnixMountEntry containing the unix mounts.
2080  * If @time_read is set, it will be filled with the mount
2081  * timestamp, allowing for checking if the mounts have changed
2082  * with g_unix_mounts_changed_since().
2083  *
2084  * Returns: (element-type utf8) (transfer full): a #GList of the UNIX mounts.
2085  */
2086
2087
2088 /**
2089  * SECTION:gappinf:
2090  * @short_description: Application information and launch contexts
2091  * @include: gio/gio.h
2092  *
2093  * #GAppInfo and #GAppLaunchContext are used for describing and launching
2094  * applications installed on the system.
2095  * As of GLib 2.20, URIs will always be converted to POSIX paths
2096  * (using g_file_get_path()) when using g_app_info_launch() even if
2097  * the application requested an URI and not a POSIX path. For example
2098  * for an desktop-file based application with Exec key <literal>totem
2099  * %%U</literal> and a single URI,
2100  * <literal>sftp://foo/file.avi</literal>, then
2101  * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> will be
2102  * passed. This will only work if a set of suitable GIO extensions
2103  * (such as gvfs 2.26 compiled with FUSE support), is available and
2104  * operational; if this is not the case, the URI will be passed
2105  * unmodified to the application. Some URIs, such as
2106  * <literal>mailto:</literal>, of course cannot be mapped to a POSIX
2107  * path (in gvfs there's no FUSE mount for it); such URIs will be
2108  * passed unmodified to the application.
2109  * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
2110  * back to the GIO URI in the #GFile constructors (since gvfs
2111  * implements the #GVfs extension point). As such, if the application
2112  * needs to examine the URI, it needs to use g_file_get_uri() or
2113  * similar on #GFile. In other words, an application cannot assume
2114  * that the URI passed to e.g. g_file_new_for_commandline_arg() is
2115  * equal to the result of g_file_get_uri(). The following snippet
2116  * illustrates this:
2117  * <programlisting>
2118  * GFile *f;
2119  * char *uri;
2120  * file = g_file_new_for_commandline_arg (uri_from_commandline);
2121  * uri = g_file_get_uri (file);
2122  * strcmp (uri, uri_from_commandline) == 0; // FALSE
2123  * g_free (uri);
2124  * if (g_file_has_uri_scheme (file, "cdda"))
2125  * {
2126  * // do something special with uri
2127  * }
2128  * g_object_unref (file);
2129  * </programlisting>
2130  * This code will work when both <literal>cdda://sr0/Track
2131  * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
2132  * 1.wav</literal> is passed to the application. It should be noted
2133  * that it's generally not safe for applications to rely on the format
2134  * of a particular URIs. Different launcher applications (e.g. file
2135  * managers) may have different ideas of what a given URI means.
2136  */
2137
2138
2139 /**
2140  * g_proxy_address_get_destination_por:
2141  * @proxy: a #GProxyAddress
2142  *
2143  * Gets @proxy's destination port.
2144  *
2145  * Returns: the @proxy's destination port
2146  * Since: 2.26
2147  */
2148
2149
2150 /**
2151  * g_action_group_get_action_state_type:
2152  * @action_group: a #GActionGroup
2153  * @action_name: the name of the action to query
2154  *
2155  * Queries the type of the state of the named action within
2156  * If the action is stateful then this function returns the
2157  * #GVariantType of the state.  All calls to g_action_group_set_state()
2158  * must give a #GVariant of this type and g_action_group_get_state()
2159  * will return a #GVariant of the same type.
2160  * If the action is not stateful then this function will return %NULL.
2161  * In that case, g_action_group_get_state() will return %NULL and you
2162  * must not call g_action_group_set_state().
2163  * The state type of a particular action will never change but it is
2164  * possible for an action to be removed and for a new action to be added
2165  * with the same name but a different state type.
2166  *
2167  * Returns: (transfer full): the state type, if the action is stateful
2168  * Since: 2.28
2169  */
2170
2171
2172 /**
2173  * g_application_activate:
2174  * @application: a #GApplication
2175  *
2176  * Activates the application.
2177  * In essence, this results in the #GApplication::activate() signal being
2178  * emitted in the primary instance.
2179  * The application must be registered before calling this function.
2180  *
2181  * Since: 2.28
2182  */
2183
2184
2185 /**
2186  * g_mount_unmount_with_operation:
2187  * @mount: a #GMount.
2188  * @flags: flags affecting the operation
2189  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
2190  * @cancellable: optional #GCancellable object, %NULL to ignore.
2191  * @callback: a #GAsyncReadyCallback, or %NULL.
2192  * @user_data: user data passed to @callback.
2193  *
2194  * Unmounts a mount. This is an asynchronous operation, and is
2195  * finished by calling g_mount_unmount_with_operation_finish() with the @mount
2196  * and #GAsyncResult data returned in the @callback.
2197  *
2198  * Since: 2.22
2199  */
2200
2201
2202 /**
2203  * g_dbus_connection_register_object:
2204  * @connection: A #GDBusConnection.
2205  * @object_path: The object path to register at.
2206  * @interface_info: Introspection data for the interface.
2207  * @vtable: A #GDBusInterfaceVTable to call into or %NULL.
2208  * @user_data: Data to pass to functions in @vtable.
2209  * @user_data_free_func: Function to call when the object path is unregistered.
2210  * @error: Return location for error or %NULL.
2211  *
2212  * Registers callbacks for exported objects at @object_path with the
2213  * D-Bus interface that is described in @interface_info.
2214  * Calls to functions in @vtable (and @user_data_free_func) will
2215  * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
2216  * loop</link> of the thread you are calling this method from.
2217  * Note that all #GVariant values passed to functions in @vtable will match
2218  * the signature given in @interface_info - if a remote caller passes
2219  * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
2220  * is returned to the remote caller.
2221  * Additionally, if the remote caller attempts to invoke methods or
2222  * access properties not mentioned in @interface_info the
2223  * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
2224  * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
2225  * are returned to the caller.
2226  * It is considered a programming error if the
2227  * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
2228  * #GVariant of incorrect type.
2229  * If an existing callback is already registered at @object_path and
2230  * GDBus automatically implements the standard D-Bus interfaces
2231  * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
2232  * and org.freedesktop.Peer, so you don't have to implement those for
2233  * the objects you export. You <emphasis>can</emphasis> implement
2234  * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
2235  * and setting of properties asynchronously.
2236  * Note that the reference count on @interface_info will be
2237  * incremented by 1 (unless allocated statically, e.g. if the
2238  * reference count is -1, see g_dbus_interface_info_ref()) for as long
2239  * as the object is exported. Also note that @vtable will be copied.
2240  * See <xref linkend="gdbus-server"/> for an example of how to use this method.
2241  * that can be used with g_dbus_connection_unregister_object() .
2242  *
2243  * Returns: 0 if @error is set, otherwise a registration id (never 0)
2244  * Since: 2.26
2245  */
2246
2247
2248 /**
2249  * g_file_stop_mountable_finish:
2250  * @file: input #GFile.
2251  * @result: a #GAsyncResult.
2252  * @error: a #GError, or %NULL
2253  *
2254  * Finishes an stop operation, see g_file_stop_mountable() for details.
2255  * Finish an asynchronous stop operation that was started
2256  * with g_file_stop_mountable().
2257  * otherwise.
2258  *
2259  * Returns: %TRUE if the operation finished successfully. %FALSE
2260  * Since: 2.22
2261  */
2262
2263
2264 /**
2265  * g_cancellable_get_current:
2266  *
2267  * Gets the top cancellable from the stack.
2268  * if the stack is empty.
2269  *
2270  * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
2271  */
2272
2273
2274 /**
2275  * g_file_replace_readwrite_async:
2276  * @file: input #GFile.
2277  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
2278  * @make_backup: %TRUE if a backup should be created.
2279  * @flags: a set of #GFileCreateFlags.
2280  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
2281  * @cancellable: optional #GCancellable object, %NULL to ignore.
2282  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
2283  * @user_data: the data to pass to callback function
2284  *
2285  * Asynchronously overwrites the file in read-write mode, replacing the
2286  * contents, possibly creating a backup copy of the file first.
2287  * For more details, see g_file_replace_readwrite() which is
2288  * the synchronous version of this call.
2289  * When the operation is finished, @callback will be called. You can then
2290  * call g_file_replace_readwrite_finish() to get the result of the operation.
2291  *
2292  * Since: 2.22
2293  */
2294
2295
2296 /**
2297  * g_dbus_server_new_sync:
2298  * @address: A D-Bus address.
2299  * @flags: Flags from the #GDBusServerFlags enumeration.
2300  * @guid: A D-Bus GUID.
2301  * @observer: A #GDBusAuthObserver or %NULL.
2302  * @cancellable: A #GCancellable or %NULL.
2303  * @error: Return location for server or %NULL.
2304  *
2305  * Creates a new D-Bus server that listens on the first address in
2306  * Once constructed, you can use g_dbus_server_get_client_address() to
2307  * get a D-Bus address string that clients can use to connect.
2308  * Connect to the #GDBusServer::new-connection signal to handle
2309  * incoming connections.
2310  * The returned #GDBusServer isn't active - you have to start it with
2311  * g_dbus_server_start().
2312  * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
2313  * be used.
2314  * This is a synchronous failable constructor. See
2315  * g_dbus_server_new() for the asynchronous version.
2316  * g_object_unref().
2317  *
2318  * Returns: A #GDBusServer or %NULL if @error is set. Free with
2319  * Since: 2.26
2320  */
2321
2322
2323 /**
2324  * g_settings_backend_flatten_tree:
2325  * @tree: a #GTree containing the changes
2326  * @path: the location to save the path
2327  * @keys: the location to save the relative keys
2328  * @values: the location to save the values, or %NULL
2329  *
2330  * Calculate the longest common prefix of all keys in a tree and write
2331  * out an array of the key names relative to that prefix and,
2332  * optionally, the value to store at each of those keys.
2333  * You must free the value returned in @path, @keys and @values using
2334  * g_free().  You should not attempt to free or unref the contents of
2335  *
2336  * Since: 2.26
2337  */
2338
2339
2340 /**
2341  * g_poll_file_monitor_new:
2342  * @file: a #GFile.
2343  *
2344  * Polls @file for changes.
2345  *
2346  * Returns: a new #GFileMonitor for the given #GFile.
2347  */
2348
2349
2350 /**
2351  * g_filter_output_stream_get_base_stream:
2352  * @stream: a #GFilterOutputStream.
2353  *
2354  * Gets the base stream for the filter stream.
2355  *
2356  * Returns: (transfer none): a #GOutputStream.
2357  */
2358
2359
2360 /**
2361  * g_unix_mount_compare:
2362  * @mount1: first #GUnixMountEntry to compare.
2363  * @mount2: second #GUnixMountEntry to compare.
2364  *
2365  * Compares two unix mounts.
2366  * or less than @mount2, respectively.
2367  *
2368  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
2369  */
2370
2371
2372 /**
2373  * g_resolver_free_addresses: (skip)
2374  * @addresses: a #GList of #GInetAddress
2375  *
2376  * Frees @addresses (which should be the return value from
2377  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
2378  * (This is a convenience method; you can also simply free the results
2379  * by hand.)
2380  *
2381  * Since: 2.22
2382  */
2383
2384
2385 /**
2386  * g_action_group_get_action_parameter_type:
2387  * @action_group: a #GActionGroup
2388  * @action_name: the name of the action to query
2389  *
2390  * Queries the type of the parameter that must be given when activating
2391  * the named action within @action_group.
2392  * When activating the action using g_action_group_activate(), the
2393  * #GVariant given to that function must be of the type returned by this
2394  * function.
2395  * In the case that this function returns %NULL, you must not give any
2396  * #GVariant, but %NULL instead.
2397  * The parameter type of a particular action will never change but it is
2398  * possible for an action to be removed and for a new action to be added
2399  * with the same name but a different parameter type.
2400  *
2401  * Returns: the parameter type
2402  * Since: 2.28
2403  */
2404
2405
2406 /**
2407  * g_dbus_property_info_unref:
2408  * @info: A #GDBusPropertyInfo.
2409  *
2410  * If @info is statically allocated, does nothing. Otherwise decreases
2411  * the reference count of @info. When its reference count drops to 0,
2412  * the memory used is freed.
2413  *
2414  * Since: 2.26
2415  */
2416
2417
2418 /**
2419  * g_file_unmount_mountable_with_operation:
2420  * @file: input #GFile.
2421  * @flags: flags affecting the operation
2422  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
2423  * @cancellable: optional #GCancellable object, %NULL to ignore.
2424  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
2425  * @user_data: the data to pass to callback function
2426  *
2427  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
2428  * If @cancellable is not %NULL, then the operation can be cancelled by
2429  * triggering the cancellable object from another thread. If the operation
2430  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2431  * When the operation is finished, @callback will be called. You can then call
2432  * g_file_unmount_mountable_finish() to get the result of the operation.
2433  *
2434  * Since: 2.22
2435  */
2436
2437
2438 /**
2439  * g_permission_acquire_async:
2440  * @permission: a #GPermission instance
2441  * @cancellable: a #GCancellable, or %NULL
2442  * @callback: the #GAsyncReadyCallback to call when done
2443  * @user_data: the user data to pass to @callback
2444  *
2445  * Attempts to acquire the permission represented by @permission.
2446  * This is the first half of the asynchronous version of
2447  * g_permission_acquire().
2448  *
2449  * Since: 2.26
2450  */
2451
2452
2453 /**
2454  * SECTION:gdataoutputstrea:
2455  * @short_description: Data Output Stream
2456  * @include: gio/gio.h
2457  * @see_also: #GOutputStream
2458  *
2459  * Data output stream implements #GOutputStream and includes functions for
2460  * writing data directly to an output stream.
2461  */
2462
2463
2464 /**
2465  * g_output_stream_splice_async:
2466  * @stream: a #GOutputStream.
2467  * @source: a #GInputStream.
2468  * @flags: a set of #GOutputStreamSpliceFlags.
2469  * @io_priority: the io priority of the request.
2470  * @cancellable: optional #GCancellable object, %NULL to ignore.
2471  * @callback: a #GAsyncReadyCallback.
2472  * @user_data: user data passed to @callback.
2473  *
2474  * Splices a stream asynchronously.
2475  * When the operation is finished @callback will be called.
2476  * You can then call g_output_stream_splice_finish() to get the
2477  * result of the operation.
2478  * For the synchronous, blocking version of this function, see
2479  * g_output_stream_splice().
2480  */
2481
2482
2483 /**
2484  * g_file_info_dup:
2485  * @other: a #GFileInfo.
2486  *
2487  * Duplicates a file info structure.
2488  *
2489  * Returns: (transfer full): a duplicate #GFileInfo of @other.
2490  */
2491
2492
2493 /**
2494  * g_simple_action_group_lookup:
2495  * @simple: a #GSimpleActionGroup
2496  * @action_name: the name of an action
2497  *
2498  * Looks up the action with the name @action_name in the group.
2499  * If no such action exists, returns %NULL.
2500  *
2501  * Returns: (transfer none): a #GAction, or %NULL
2502  * Since: 2.28
2503  */
2504
2505
2506 /**
2507  * g_output_stream_flush:
2508  * @stream: a #GOutputStream.
2509  * @cancellable: optional cancellable object
2510  * @error: location to store the error occuring, or %NULL to ignore
2511  *
2512  * Flushed any outstanding buffers in the stream. Will block during
2513  * the operation. Closing the stream will implicitly cause a flush.
2514  * This function is optional for inherited classes.
2515  * If @cancellable is not %NULL, then the operation can be cancelled by
2516  * triggering the cancellable object from another thread. If the operation
2517  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2518  *
2519  * Returns: %TRUE on success, %FALSE on error
2520  */
2521
2522
2523 /**
2524  * g_dbus_is_guid:
2525  * @string: The string to check.
2526  *
2527  * Checks if @string is a D-Bus GUID.
2528  * See the D-Bus specification regarding what strings are valid D-Bus
2529  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
2530  *
2531  * Returns: %TRUE if @string is a guid, %FALSE otherwise.
2532  * Since: 2.26
2533  */
2534
2535
2536 /**
2537  * g_file_io_stream_get_etag:
2538  * @stream: a #GFileIOStream.
2539  *
2540  * Gets the entity tag for the file when it has been written.
2541  * This must be called after the stream has been written
2542  * and closed, as the etag can change while writing.
2543  *
2544  * Returns: the entity tag for the stream.
2545  * Since: 2.22
2546  */
2547
2548
2549 /**
2550  * g_buffered_input_stream_read_byte:
2551  * @stream: a #GBufferedInputStream
2552  * @cancellable: optional #GCancellable object, %NULL to ignore
2553  * @error: location to store the error occuring, or %NULL to ignore
2554  *
2555  * Tries to read a single byte from the stream or the buffer. Will block
2556  * during this read.
2557  * On success, the byte read from the stream is returned. On end of stream
2558  * -1 is returned but it's not an exceptional error and @error is not set.
2559  * If @cancellable is not %NULL, then the operation can be cancelled by
2560  * triggering the cancellable object from another thread. If the operation
2561  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
2562  * operation was partially finished when the operation was cancelled the
2563  * partial result will be returned, without an error.
2564  * On error -1 is returned and @error is set accordingly.
2565  *
2566  * Returns: the byte read from the @stream, or -1 on end of stream or error.
2567  */
2568
2569
2570 /**
2571  * g_socket_set_blocking:
2572  * @socket: a #GSocket.
2573  * @blocking: Whether to use blocking I/O or not.
2574  *
2575  * Sets the blocking mode of the socket. In blocking mode
2576  * all operations block until they succeed or there is an error. In
2577  * non-blocking mode all functions return results immediately or
2578  * with a %G_IO_ERROR_WOULD_BLOCK error.
2579  * All sockets are created in blocking mode. However, note that the
2580  * platform level socket is always non-blocking, and blocking mode
2581  * is a GSocket level feature.
2582  *
2583  * Since: 2.22
2584  */
2585
2586
2587 /**
2588  * g_buffered_input_stream_get_buffer_size:
2589  * @stream: a #GBufferedInputStream
2590  *
2591  * Gets the size of the input buffer.
2592  *
2593  * Returns: the current buffer size.
2594  */
2595
2596
2597 /**
2598  * g_unix_fd_list_peek_fds:
2599  * @list: a #GUnixFDList
2600  * @length: pointer to the length of the returned array, or %NULL
2601  *
2602  * Returns the array of file descriptors that is contained in this
2603  * object.
2604  * After this call, the descriptors remain the property of @list.  The
2605  * caller must not close them and must not free the array.  The array is
2606  * valid only until @list is changed in any way.
2607  * If @length is non-%NULL then it is set to the number of file
2608  * descriptors in the returned array. The returned array is also
2609  * terminated with -1.
2610  * This function never returns %NULL. In case there are no file
2611  * descriptors contained in @list, an empty array is returned.
2612  *
2613  * Returns: an array of file descriptors
2614  * Since: 2.24
2615  */
2616
2617
2618 /**
2619  * g_network_address_new:
2620  * @hostname: the hostname
2621  * @port: the port
2622  *
2623  * Creates a new #GSocketConnectable for connecting to the given
2624  *
2625  * Returns: (transfer full): the new #GNetworkAddress
2626  * Since: 2.22
2627  */
2628
2629
2630 /**
2631  * g_file_info_has_namespace:
2632  * @info: a #GFileInfo.
2633  * @name_space: a file attribute namespace.
2634  *
2635  * Checks if a file info structure has an attribute in the
2636  * specified @name_space.
2637  * %FALSE otherwise.
2638  *
2639  * Returns: %TRUE if @Ginfo has an attribute in @name_space,
2640  * Since: 2.22
2641  */
2642
2643
2644 /**
2645  * g_data_output_stream_put_uint32:
2646  * @stream: a #GDataOutputStream.
2647  * @data: a #guint32.
2648  * @cancellable: optional #GCancellable object, %NULL to ignore.
2649  * @error: a #GError, %NULL to ignore.
2650  *
2651  * Puts an unsigned 32-bit integer into the stream.
2652  *
2653  * Returns: %TRUE if @data was successfully added to the @stream.
2654  */
2655
2656
2657 /**
2658  * g_file_set_attribute:
2659  * @file: input #GFile.
2660  * @attribute: a string containing the attribute's name.
2661  * @type: The type of the attribute
2662  * @value_p: a pointer to the value (or the pointer itself if the type is a pointer type)
2663  * @flags: a set of #GFileQueryInfoFlags.
2664  * @cancellable: optional #GCancellable object, %NULL to ignore.
2665  * @error: a #GError, or %NULL
2666  *
2667  * Sets an attribute in the file with attribute name @attribute to @value.
2668  * If @cancellable is not %NULL, then the operation can be cancelled by
2669  * triggering the cancellable object from another thread. If the operation
2670  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2671  *
2672  * Returns: %TRUE if the attribute was set, %FALSE otherwise.
2673  */
2674
2675
2676 /**
2677  * g_filename_completer_get_completion_suffix:
2678  * @completer: the filename completer.
2679  * @initial_text: text to be completed.
2680  *
2681  * Obtains a completion for @initial_text from @completer.
2682  * This string is not owned by GIO, so remember to g_free() it
2683  * when finished.
2684  *
2685  * Returns: a completed string, or %NULL if no completion exists.
2686  */
2687
2688
2689 /**
2690  * g_file_icon_new:
2691  * @file: a #GFile.
2692  *
2693  * Creates a new icon for a file.
2694  *
2695  * Returns: (transfer full): a #GIcon for the given @file, or %NULL on error.
2696  */
2697
2698
2699 /**
2700  * SECTION:gnetworkservic:
2701  * @short_description: A GSocketConnectable for resolving SRV records
2702  * @include: gio/gio.h
2703  *
2704  * Like #GNetworkAddress does with hostnames, #GNetworkService
2705  * provides an easy way to resolve a SRV record, and then attempt to
2706  * connect to one of the hosts that implements that service, handling
2707  * service priority/weighting, multiple IP addresses, and multiple
2708  * address families.
2709  * See #GSrvTarget for more information about SRV records, and see
2710  * #GSocketConnectable for and example of using the connectable
2711  * interface.
2712  */
2713
2714
2715 /**
2716  * g_file_start_mountable:
2717  * @file: input #GFile.
2718  * @flags: flags affecting the operation
2719  * @start_operation: a #GMountOperation, or %NULL to avoid user interaction.
2720  * @cancellable: optional #GCancellable object, %NULL to ignore.
2721  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
2722  * @user_data: the data to pass to callback function
2723  *
2724  * Starts a file of type G_FILE_TYPE_MOUNTABLE.
2725  * Using @start_operation, you can request callbacks when, for instance,
2726  * passwords are needed during authentication.
2727  * If @cancellable is not %NULL, then the operation can be cancelled by
2728  * triggering the cancellable object from another thread. If the operation
2729  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2730  * When the operation is finished, @callback will be called. You can then call
2731  * g_file_mount_mountable_finish() to get the result of the operation.
2732  *
2733  * Since: 2.22
2734  */
2735
2736
2737 /**
2738  * g_app_info_get_default_for_uri_scheme:
2739  * @uri_scheme: a string containing a URI scheme.
2740  *
2741  * Gets the default application for launching applications
2742  * using this URI scheme. A URI scheme is the initial part
2743  * of the URI, up to but not including the ':', e.g. "http",
2744  * "ftp" or "sip".
2745  *
2746  * Returns: #GAppInfo for given @uri_scheme or %NULL on error.
2747  */
2748
2749
2750 /**
2751  * g_file_set_attributes_finish:
2752  * @file: input #GFile.
2753  * @result: a #GAsyncResult.
2754  * @info: (out) (transfer full): a #GFileInfo.
2755  * @error: a #GError, or %NULL
2756  *
2757  * Finishes setting an attribute started in g_file_set_attributes_async().
2758  *
2759  * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
2760  */
2761
2762
2763 /**
2764  * g_socket_listener_accept:
2765  * @listener: a #GSocketListener
2766  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
2767  * @cancellable: optional #GCancellable object, %NULL to ignore.
2768  * @error: #GError for error reporting, or %NULL to ignore.
2769  *
2770  * Blocks waiting for a client to connect to any of the sockets added
2771  * to the listener. Returns a #GSocketConnection for the socket that was
2772  * accepted.
2773  * If @source_object is not %NULL it will be filled out with the source
2774  * object specified when the corresponding socket or address was added
2775  * to the listener.
2776  * If @cancellable is not %NULL, then the operation can be cancelled by
2777  * triggering the cancellable object from another thread. If the operation
2778  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2779  *
2780  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
2781  * Since: 2.22
2782  */
2783
2784
2785 /**
2786  * g_dbus_node_info_unref:
2787  * @info: A #GDBusNodeInfo.
2788  *
2789  * If @info is statically allocated, does nothing. Otherwise decreases
2790  * the reference count of @info. When its reference count drops to 0,
2791  * the memory used is freed.
2792  *
2793  * Since: 2.26
2794  */
2795
2796
2797 /**
2798  * g_unix_mount_point_guess_can_eject:
2799  * @mount_point: a #GUnixMountPoint
2800  *
2801  * Guesses whether a Unix mount point can be ejected.
2802  *
2803  * Returns: %TRUE if @mount_point is deemed to be ejectable.
2804  */
2805
2806
2807 /**
2808  * g_file_enumerate_children_finish:
2809  * @file: input #GFile.
2810  * @res: a #GAsyncResult.
2811  * @error: a #GError.
2812  *
2813  * Finishes an async enumerate children operation.
2814  * See g_file_enumerate_children_async().
2815  * Free the returned object with g_object_unref().
2816  *
2817  * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
2818  */
2819
2820
2821 /**
2822  * g_dbus_connection_flush:
2823  * @connection: A #GDBusConnection.
2824  * @cancellable: A #GCancellable or %NULL.
2825  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
2826  * @user_data: The data to pass to @callback.
2827  *
2828  * Asynchronously flushes @connection, that is, writes all queued
2829  * outgoing message to the transport and then flushes the transport
2830  * (using g_output_stream_flush_async()). This is useful in programs
2831  * that wants to emit a D-Bus signal and then exit
2832  * immediately. Without flushing the connection, there is no guarantee
2833  * that the message has been sent to the networking buffers in the OS
2834  * kernel.
2835  * This is an asynchronous method. When the operation is finished,
2836  * linkend="g-main-context-push-thread-default">thread-default main
2837  * loop</link> of the thread you are calling this method from. You can
2838  * then call g_dbus_connection_flush_finish() to get the result of the
2839  * operation.  See g_dbus_connection_flush_sync() for the synchronous
2840  * version.
2841  *
2842  * Since: 2.26
2843  */
2844
2845
2846 /**
2847  * g_inet_address_new_any:
2848  * @family: the address family
2849  *
2850  * Creates a #GInetAddress for the "any" address (unassigned/"don't
2851  * care") for @family.
2852  * for @family.
2853  *
2854  * Returns: a new #GInetAddress corresponding to the "any" address
2855  * Since: 2.22
2856  */
2857
2858
2859 /**
2860  * GProxyAddress:
2861  *
2862  * A #GInetSocketAddress representing a connection via a proxy server
2863  *
2864  * Since: 2.26
2865  */
2866
2867
2868 /**
2869  * g_emblemed_icon_get_emblems:
2870  * @emblemed: a #GEmblemedIcon
2871  *
2872  * Gets the list of emblems for the @icon.
2873  * is owned by @emblemed
2874  *
2875  * Returns: (element-type utf8) (transfer none): a #GList of #GEmblem <!-- -->s that
2876  * Since: 2.18
2877  */
2878
2879
2880 /**
2881  * g_file_io_stream_query_info_finish:
2882  * @stream: a #GFileIOStream.
2883  * @result: a #GAsyncResult.
2884  * @error: a #GError, %NULL to ignore.
2885  *
2886  * Finalizes the asynchronous query started
2887  * by g_file_io_stream_query_info_async().
2888  *
2889  * Returns: (transfer full): A #GFileInfo for the finished query.
2890  * Since: 2.22
2891  */
2892
2893
2894 /**
2895  * g_file_hash:
2896  * @file: #gconstpointer to a #GFile.
2897  *
2898  * Creates a hash value for a #GFile.
2899  * This call does no blocking i/o.
2900  * integer that can be used as hash value for the #GFile.
2901  * This function is intended for easily hashing a #GFile to
2902  * add to a #GHashTable or similar data structure.
2903  *
2904  * Virtual: hash
2905  * Returns: 0 if @file is not a valid #GFile, otherwise an
2906  */
2907
2908
2909 /**
2910  * g_inet_address_new_loopback:
2911  * @family: the address family
2912  *
2913  * Creates a #GInetAddress for the loopback address for @family.
2914  * for @family.
2915  *
2916  * Returns: a new #GInetAddress corresponding to the loopback address
2917  * Since: 2.22
2918  */
2919
2920
2921 /**
2922  * g_unix_mount_monitor_set_rate_limit:
2923  * @mount_monitor: a #GUnixMountMonitor
2924  * @limit_msec: a integer with the limit in milliseconds to poll for changes.
2925  *
2926  * Sets the rate limit to which the @mount_monitor will report
2927  * consecutive change events to the mount and mount point entry files.
2928  *
2929  * Since: 2.18
2930  */
2931
2932
2933 /**
2934  * g_file_copy:
2935  * @source: input #GFile.
2936  * @destination: destination #GFile
2937  * @flags: set of #GFileCopyFlags
2938  * @cancellable: optional #GCancellable object, %NULL to ignore.
2939  * @progress_callback: (scope call): function to callback with progress information
2940  * @progress_callback_data: (closure): user data to pass to @progress_callback
2941  * @error: #GError to set on error, or %NULL
2942  *
2943  * Copies the file @source to the location specified by @destination.
2944  * Can not handle recursive copies of directories.
2945  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
2946  * existing @destination file is overwritten.
2947  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
2948  * will be copied as symlinks, otherwise the target of the
2949  * If @cancellable is not %NULL, then the operation can be cancelled by
2950  * triggering the cancellable object from another thread. If the operation
2951  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2952  * If @progress_callback is not %NULL, then the operation can be monitored by
2953  * setting this to a #GFileProgressCallback function. @progress_callback_data
2954  * will be passed to this function. It is guaranteed that this callback will
2955  * be called after all data has been transferred with the total number of bytes
2956  * copied during the operation.
2957  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
2958  * error is returned, independent on the status of the @destination.
2959  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
2960  * error G_IO_ERROR_EXISTS is returned.
2961  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
2962  * error is returned. If trying to overwrite a directory with a directory the
2963  * G_IO_ERROR_WOULD_MERGE error is returned.
2964  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
2965  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
2966  * is returned.
2967  * If you are interested in copying the #GFile object itself (not the on-disk
2968  * file), see g_file_dup().
2969  *
2970  * Returns: %TRUE on success, %FALSE otherwise.
2971  */
2972
2973
2974 /**
2975  * g_file_set_attribute_int64:
2976  * @file: input #GFile.
2977  * @attribute: a string containing the attribute's name.
2978  * @value: a #guint64 containing the attribute's new value.
2979  * @flags: a #GFileQueryInfoFlags.
2980  * @cancellable: optional #GCancellable object, %NULL to ignore.
2981  * @error: a #GError, or %NULL
2982  *
2983  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
2984  * If @attribute is of a different type, this operation will fail.
2985  * If @cancellable is not %NULL, then the operation can be cancelled by
2986  * triggering the cancellable object from another thread. If the operation
2987  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2988  *
2989  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
2990  */
2991
2992
2993 /**
2994  * g_file_enumerator_next_files_finish:
2995  * @enumerator: a #GFileEnumerator.
2996  * @result: a #GAsyncResult.
2997  * @error: a #GError location to store the error occuring, or %NULL to ignore.
2998  *
2999  * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
3000  * g_list_free() and unref the infos with g_object_unref() when you're
3001  * done with them.
3002  *
3003  * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
3004  */
3005
3006
3007 /**
3008  * g_dbus_is_name:
3009  * @string: The string to check.
3010  *
3011  * Checks if @string is a valid D-Bus bus name (either unique or well-known).
3012  *
3013  * Returns: %TRUE if valid, %FALSE otherwise.
3014  * Since: 2.26
3015  */
3016
3017
3018 /**
3019  * g_drive_get_name:
3020  * @drive: a #GDrive.
3021  *
3022  * Gets the name of @drive.
3023  * string should be freed when no longer needed.
3024  *
3025  * Returns: a string containing @drive's name. The returned
3026  */
3027
3028
3029 /**
3030  * g_unix_fd_message_new_with_fd_list:
3031  * @fd_list: a #GUnixFDList
3032  *
3033  * Creates a new #GUnixFDMessage containing @list.
3034  *
3035  * Returns: a new #GUnixFDMessage
3036  * Since: 2.24
3037  */
3038
3039
3040 /**
3041  * GDBusConnection:flags:
3042  *
3043  * Flags from the #GDBusConnectionFlags enumeration.
3044  *
3045  * Since: 2.26
3046  */
3047
3048
3049 /**
3050  * g_application_run:
3051  * @application: a #GApplication
3052  * @argc: the argc from main()
3053  * @argv: the argv from main()
3054  * @returns: the exit status
3055  *
3056  * Runs the application.
3057  * This function is intended to be run from main() and its return value
3058  * is intended to be returned by main().
3059  * First, the local_command_line() virtual function is invoked.  This
3060  * function always runs on the local instance.  If that function returns
3061  * %FALSE then the application is registered and the #GApplication::command-line
3062  * signal is emitted in the primary instance (which may or may not be
3063  * this instance).
3064  * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
3065  * flag set then the default implementation of local_command_line()
3066  * always returns %FALSE immediately, resulting in the commandline
3067  * always being handled in the primary instance.
3068  * Otherwise, the default implementation of local_command_line() tries
3069  * to do a couple of things that are probably reasonable for most
3070  * applications.  First, g_application_register() is called to attempt
3071  * to register the application.  If that works, then the command line
3072  * arguments are inspected.  If no commandline arguments are given, then
3073  * g_application_activate() is called.  If commandline arguments are
3074  * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
3075  * are assumed to be filenames and g_application_open() is called.
3076  * If you are interested in doing more complicated local handling of the
3077  * commandline then you should implement your own #GApplication subclass
3078  * and override local_command_line(). See
3079  * <xref linkend="gapplication-example-cmdline2"/> for an example.
3080  * If, after the above is done, the use count of the application is zero
3081  * then the exit status is returned immediately.  If the use count is
3082  * non-zero then the mainloop is run until the use count falls to zero,
3083  * at which point 0 is returned.
3084  * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
3085  * around to provide its <emphasis>service</emphasis> to others).
3086  *
3087  * Use count of zero is delayed for a while (ie: the instance stays
3088  * Since: 2.28
3089  */
3090
3091
3092 /**
3093  * g_socket_service_new:
3094  *
3095  * Creates a new #GSocketService with no sockets to listen for.
3096  * New listeners can be added with e.g. g_socket_listener_add_address()
3097  * or g_socket_listener_add_inet_port().
3098  *
3099  * Returns: a new #GSocketService.
3100  * Since: 2.22
3101  */
3102
3103
3104 /**
3105  * g_unix_connection_receive_fd:
3106  * @connection: a #GUnixConnection
3107  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
3108  * @error: (allow-none): #GError for error reporting, or %NULL to ignore
3109  *
3110  * Receives a file descriptor from the sending end of the connection.
3111  * The sending end has to call g_unix_connection_send_fd() for this
3112  * to work.
3113  * As well as reading the fd this also reads a single byte from the
3114  * stream, as this is required for fd passing to work on some
3115  * implementations.
3116  *
3117  * Returns: a file descriptor on success, -1 on error.
3118  * Since: 2.22
3119  */
3120
3121
3122 /**
3123  * GMountOperation::show-processes:
3124  * @op: a #GMountOperation.
3125  * @message: string containing a message to display to the user.
3126  * @processes: an array of #GPid for processes blocking the operation.
3127  * @choices: an array of strings for each possible choice.
3128  *
3129  * Emitted when one or more processes are blocking an operation
3130  * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
3131  * Note that this signal may be emitted several times to update the
3132  * list of blocking processes as processes close files. The
3133  * application should only respond with g_mount_operation_reply() to
3134  * the latest signal (setting #GMountOperation:choice to the choice
3135  * the user made).
3136  * If the message contains a line break, the first line should be
3137  * presented as a heading. For example, it may be used as the
3138  * primary text in a #GtkMessageDialog.
3139  *
3140  * Since: 2.22
3141  */
3142
3143
3144 /**
3145  * g_simple_async_result_set_error:
3146  * @simple: a #GSimpleAsyncResult.
3147  * @domain: a #GQuark (usually #G_IO_ERROR).
3148  * @code: an error code.
3149  * @format: a formatted error reporting string.
3150  * @...: a list of variables to fill in @format.
3151  *
3152  * Sets an error within the asynchronous result without a #GError.
3153  */
3154
3155
3156 /**
3157  * g_file_info_remove_attribute:
3158  * @info: a #GFileInfo.
3159  * @attribute: a file attribute key.
3160  *
3161  * Removes all cases of @attribute from @info if it exists.
3162  */
3163
3164
3165 /**
3166  * g_unix_input_stream_get_fd:
3167  * @stream: a #GUnixInputStream
3168  *
3169  * Return the UNIX file descriptor that the stream reads from.
3170  *
3171  * Returns: The file descriptor of @stream
3172  * Since: 2.20
3173  */
3174
3175
3176 /**
3177  * g_dbus_connection_add_filter:
3178  * @connection: A #GDBusConnection.
3179  * @filter_function: A filter function.
3180  * @user_data: User data to pass to @filter_function.
3181  * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
3182  *
3183  * Adds a message filter. Filters are handlers that are run on all
3184  * incoming and outgoing messages, prior to standard dispatch. Filters
3185  * are run in the order that they were added.  The same handler can be
3186  * added as a filter more than once, in which case it will be run more
3187  * than once.  Filters added during a filter callback won't be run on
3188  * the message being processed. Filter functions are allowed to modify
3189  * and even drop messages - see the #GDBusMessageFilterResult
3190  * enumeration for details.
3191  * Note that filters are run in a dedicated message handling thread so
3192  * they can't block and, generally, can't do anything but signal a
3193  * worker thread. Also note that filters are rarely needed - use API
3194  * such as g_dbus_connection_send_message_with_reply(),
3195  * g_dbus_connection_signal_subscribe() or
3196  * g_dbus_connection_call() instead.
3197  * If a filter consumes an incoming message the message is not
3198  * dispatched anywhere else - not even the standard dispatch machinery
3199  * (that API such as g_dbus_connection_signal_subscribe() and
3200  * g_dbus_connection_send_message_with_reply() relies on) will see the
3201  * message. Similary, if a filter consumes an outgoing message, the
3202  * message will not be sent to the other peer.
3203  * g_dbus_connection_remove_filter().
3204  *
3205  * Returns: A filter identifier that can be used with
3206  * Since: 2.26
3207  */
3208
3209
3210 /**
3211  * g_dbus_method_invocation_return_dbus_error:
3212  * @invocation: A #GDBusMethodInvocation.
3213  * @error_name: A valid D-Bus error name.
3214  * @error_message: A valid D-Bus error message.
3215  *
3216  * Finishes handling a D-Bus method call by returning an error.
3217  * This method will free @invocation, you cannot use it afterwards.
3218  *
3219  * Since: 2.26
3220  */
3221
3222
3223 /**
3224  * g_file_info_get_attribute_string:
3225  * @info: a #GFileInfo.
3226  * @attribute: a file attribute key.
3227  *
3228  * Gets the value of a string attribute. If the attribute does
3229  * not contain a string, %NULL will be returned.
3230  * %NULL otherwise.
3231  *
3232  * Returns: the contents of the @attribute value as a string, or
3233  */
3234
3235
3236 /**
3237  * g_content_type_equals:
3238  * @type1: a content type string
3239  * @type2: a content type string
3240  *
3241  * Compares two content types for equality.
3242  * %FALSE otherwise.
3243  *
3244  * Returns: %TRUE if the two strings are identical or equivalent,
3245  */
3246
3247
3248 /**
3249  * g_file_info_set_size:
3250  * @info: a #GFileInfo.
3251  * @size: a #goffset containing the file's size.
3252  *
3253  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
3254  * to the given size.
3255  */
3256
3257
3258 /**
3259  * GApplication::startup:
3260  * @application: the application
3261  *
3262  * The ::startup signal is emitted on the primary instance immediately
3263  * after registration. See g_activation_register().
3264  */
3265
3266
3267 /**
3268  * SECTION:gfileinf:
3269  * @short_description: File Information and Attributes
3270  * @include: gio/gio.h
3271  * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
3272  *
3273  * Functionality for manipulating basic metadata for files. #GFileInfo
3274  * implements methods for getting information that all files should
3275  * contain, and allows for manipulation of extended attributes.
3276  * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
3277  * information on how GIO handles file attributes.
3278  * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
3279  * async variant). To obtain a #GFileInfo for a file input or output
3280  * stream, use g_file_input_stream_query_info() or
3281  * g_file_output_stream_query_info() (or their async variants).
3282  * To change the actual attributes of a file, you should then set the
3283  * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
3284  * or g_file_set_attributes_async() on a GFile.
3285  * However, not all attributes can be changed in the file. For instance,
3286  * the actual size of a file cannot be changed via g_file_info_set_size().
3287  * You may call g_file_query_settable_attributes() and
3288  * g_file_query_writable_namespaces() to discover the settable attributes
3289  * of a particular file at runtime.
3290  * #GFileAttributeMatcher allows for searching through a #GFileInfo for
3291  * attributes.
3292  */
3293
3294
3295 /**
3296  * g_socket_bind:
3297  * @socket: a #GSocket.
3298  * @address: a #GSocketAddress specifying the local address.
3299  * @allow_reuse: whether to allow reusing this address
3300  * @error: #GError for error reporting, or %NULL to ignore.
3301  *
3302  * When a socket is created it is attached to an address family, but it
3303  * doesn't have an address in this family. g_socket_bind() assigns the
3304  * address (sometimes called name) of the socket.
3305  * It is generally required to bind to a local address before you can
3306  * receive connections. (See g_socket_listen() and g_socket_accept() ).
3307  * In certain situations, you may also want to bind a socket that will be
3308  * used to initiate connections, though this is not normally required.
3309  * eventually call g_socket_accept() on), and %FALSE for client sockets.
3310  * (Specifically, if it is %TRUE, then g_socket_bind() will set the
3311  * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
3312  * that address was previously used by another socket that has not yet been
3313  * fully cleaned-up by the kernel. Failing to set this flag on a server
3314  * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
3315  * the server program is stopped and then immediately restarted.)
3316  *
3317  * Returns: %TRUE on success, %FALSE on error.
3318  * Since: 2.22
3319  */
3320
3321
3322 /**
3323  * g_input_stream_read_all:
3324  * @stream: a #GInputStream.
3325  * @buffer: a buffer to read data into (which should be at least count bytes long).
3326  * @count: the number of bytes that will be read from the stream
3327  * @bytes_read: location to store the number of bytes that was read from the stream
3328  * @cancellable: optional #GCancellable object, %NULL to ignore.
3329  * @error: location to store the error occuring, or %NULL to ignore
3330  *
3331  * Tries to read @count bytes from the stream into the buffer starting at
3332  * This function is similar to g_input_stream_read(), except it tries to
3333  * read as many bytes as requested, only stopping on an error or end of stream.
3334  * On a successful read of @count bytes, or if we reached the end of the
3335  * stream,  %TRUE is returned, and @bytes_read is set to the number of bytes
3336  * read into @buffer.
3337  * If there is an error during the operation %FALSE is returned and @error
3338  * is set to indicate the error status, @bytes_read is updated to contain
3339  * the number of bytes read into @buffer before the error occurred.
3340  *
3341  * Returns: %TRUE on success, %FALSE if there was an error
3342  */
3343
3344
3345 /**
3346  * g_cancellable_pop_current:
3347  * @cancellable: a #GCancellable object
3348  *
3349  * Pops @cancellable off the cancellable stack (verifying that @cancellable
3350  * is on the top of the stack).
3351  */
3352
3353
3354 /**
3355  * SECTION:gthemedico:
3356  * @short_description: Icon theming support
3357  * @include: gio/gio.h
3358  * @see_also: #GIcon, #GLoadableIcon
3359  *
3360  * #GThemedIcon is an implementation of #GIcon that supports icon themes.
3361  * #GThemedIcon contains a list of all of the icons present in an icon
3362  * theme, so that icons can be looked up quickly. #GThemedIcon does
3363  * not provide actual pixmaps for icons, just the icon names.
3364  * Ideally something like gtk_icon_theme_choose_icon() should be used to
3365  * resolve the list of names so that fallback icons work nicely with
3366  * themes that inherit other themes.
3367  */
3368
3369
3370 /**
3371  * g_file_info_list_attributes:
3372  * @info: a #GFileInfo.
3373  * @name_space: a file attribute key's namespace.
3374  *
3375  * Lists the file info structure's attributes.
3376  * possible attribute types for the given @name_space, or
3377  * %NULL on error.
3378  *
3379  * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
3380  */
3381
3382
3383 /**
3384  * GActionGroup::action-enabled-changed:
3385  * @action_group: the #GActionGroup that changed
3386  * @action_name: the name of the action in @action_group
3387  * @enabled: whether the action is enabled or not
3388  *
3389  * Signals that the enabled status of the named action has changed.
3390  *
3391  * Since: 2.28
3392  */
3393
3394
3395 /**
3396  * g_dbus_connection_new_sync:
3397  * @stream: A #GIOStream.
3398  * @guid: The GUID to use if a authenticating as a server or %NULL.
3399  * @flags: Flags describing how to make the connection.
3400  * @observer: A #GDBusAuthObserver or %NULL.
3401  * @cancellable: A #GCancellable or %NULL.
3402  * @error: Return location for error or %NULL.
3403  *
3404  * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
3405  * with the end represented by @stream.
3406  * If @observer is not %NULL it may be used to control the
3407  * authentication process.
3408  * This is a synchronous failable constructor. See
3409  * g_dbus_connection_new() for the asynchronous version.
3410  *
3411  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
3412  * Since: 2.26
3413  */
3414
3415
3416 /**
3417  * SECTION:gbufferedinputstrea:
3418  * @short_description: Buffered Input Stream
3419  * @include: gio/gio.h
3420  * @see_also: #GFilterInputStream, #GInputStream
3421  *
3422  * Buffered input stream implements #GFilterInputStream and provides
3423  * for buffered reads.
3424  * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
3425  * To create a buffered input stream, use g_buffered_input_stream_new(),
3426  * or g_buffered_input_stream_new_sized() to specify the buffer's size at
3427  * construction.
3428  * To get the size of a buffer within a buffered input stream, use
3429  * g_buffered_input_stream_get_buffer_size(). To change the size of a
3430  * buffered input stream's buffer, use
3431  * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
3432  * cannot be reduced below the size of the data within the buffer.
3433  */
3434
3435
3436 /**
3437  * g_proxy_connect_async:
3438  * @proxy: a #GProxy
3439  * @connection: a #GIOStream
3440  * @proxy_address: a #GProxyAddress
3441  * @cancellable: a #GCancellable
3442  * @callback: a #GAsyncReadyCallback
3443  * @user_data: callback data
3444  *
3445  * Asynchronous version of g_proxy_connect().
3446  *
3447  * Since: 2.26
3448  */
3449
3450
3451 /**
3452  * g_resolver_lookup_service:
3453  * @resolver: a #GResolver
3454  * @service: the service type to look up (eg, "ldap")
3455  * @protocol: the networking protocol to use for @service (eg, "tcp")
3456  * @domain: the DNS domain to look up the service in
3457  * @cancellable: a #GCancellable, or %NULL
3458  * @error: return location for a #GError, or %NULL
3459  *
3460  * Synchronously performs a DNS SRV lookup for the given @service and
3461  * include the leading underscore that appears in the actual DNS
3462  * entry.
3463  * On success, g_resolver_lookup_service() will return a #GList of
3464  * #GSrvTarget, sorted in order of preference. (That is, you should
3465  * attempt to connect to the first target first, then the second if
3466  * the first fails, etc.)
3467  * If the DNS resolution fails, @error (if non-%NULL) will be set to
3468  * a value from #GResolverError.
3469  * If @cancellable is non-%NULL, it can be used to cancel the
3470  * operation, in which case @error (if non-%NULL) will be set to
3471  * %G_IO_ERROR_CANCELLED.
3472  * If you are planning to connect to the service, it is usually easier
3473  * to create a #GNetworkService and use its #GSocketConnectable
3474  * interface.
3475  * or %NULL on error. You must free each of the targets and the list when you are
3476  * done with it. (You can use g_resolver_free_targets() to do this.)
3477  *
3478  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
3479  * Since: 2.22
3480  */
3481
3482
3483 /**
3484  * g_file_create:
3485  * @file: input #GFile.
3486  * @flags: a set of #GFileCreateFlags.
3487  * @cancellable: optional #GCancellable object, %NULL to ignore.
3488  * @error: a #GError, or %NULL
3489  *
3490  * Creates a new file and returns an output stream for writing to it.
3491  * The file must not already exist.
3492  * By default files created are generally readable by everyone,
3493  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
3494  * will be made readable only to the current user, to the level that
3495  * is supported on the target filesystem.
3496  * If @cancellable is not %NULL, then the operation can be cancelled by
3497  * triggering the cancellable object from another thread. If the operation
3498  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3499  * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
3500  * error will be returned.
3501  * Some file systems don't allow all file names, and may
3502  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
3503  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
3504  * Other errors are possible too, and depend on what kind of
3505  * filesystem the file is on.
3506  * %NULL on error.
3507  * Free the returned object with g_object_unref().
3508  *
3509  * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
3510  */
3511
3512
3513 /**
3514  * g_buffered_input_stream_fill:
3515  * @stream: a #GBufferedInputStream
3516  * @count: the number of bytes that will be read from the stream
3517  * @cancellable: optional #GCancellable object, %NULL to ignore
3518  * @error: location to store the error occuring, or %NULL to ignore
3519  *
3520  * Tries to read @count bytes from the stream into the buffer.
3521  * Will block during this read.
3522  * If @count is zero, returns zero and does nothing. A value of @count
3523  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
3524  * On success, the number of bytes read into the buffer is returned.
3525  * It is not an error if this is not the same as the requested size, as it
3526  * can happen e.g. near the end of a file. Zero is returned on end of file
3527  * (or if @count is zero),  but never otherwise.
3528  * If @count is -1 then the attempted read size is equal to the number of
3529  * bytes that are required to fill the buffer.
3530  * If @cancellable is not %NULL, then the operation can be cancelled by
3531  * triggering the cancellable object from another thread. If the operation
3532  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
3533  * operation was partially finished when the operation was cancelled the
3534  * partial result will be returned, without an error.
3535  * On error -1 is returned and @error is set accordingly.
3536  * For the asynchronous, non-blocking, version of this function, see
3537  * g_buffered_input_stream_fill_async().
3538  * or -1 on error.
3539  *
3540  * Returns: the number of bytes read into @stream's buffer, up to @count,
3541  */
3542
3543
3544 /**
3545  * g_settings_backend_writable_changed:
3546  * @backend: a #GSettingsBackend implementation
3547  * @key: the name of the key
3548  *
3549  * Signals that the writability of a single key has possibly changed.
3550  * Since GSettings performs no locking operations for itself, this call
3551  * will always be made in response to external events.
3552  *
3553  * Since: 2.26
3554  */
3555
3556
3557 /**
3558  * g_dbus_proxy_new:
3559  * @connection: A #GDBusConnection.
3560  * @flags: Flags used when constructing the proxy.
3561  * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
3562  * @name: A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
3563  * @object_path: An object path.
3564  * @interface_name: A D-Bus interface name.
3565  * @cancellable: A #GCancellable or %NULL.
3566  * @callback: Callback function to invoke when the proxy is ready.
3567  * @user_data: User data to pass to @callback.
3568  *
3569  * Creates a proxy for accessing @interface_name on the remote object
3570  * at @object_path owned by @name at @connection and asynchronously
3571  * loads D-Bus properties unless the
3572  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
3573  * the #GDBusProxy::g-properties-changed signal to get notified about
3574  * property changes.
3575  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
3576  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
3577  * to handle signals from the remote object.
3578  * If @name is a well-known name and the
3579  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
3580  * owner currently exists, the message bus will be requested to launch
3581  * a name owner for the name.
3582  * This is a failable asynchronous constructor - when the proxy is
3583  * ready, @callback will be invoked and you can use
3584  * g_dbus_proxy_new_finish() to get the result.
3585  * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
3586  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
3587  *
3588  * Since: 2.26
3589  */
3590
3591
3592 /**
3593  * g_unix_mount_point_free:
3594  * @mount_point: unix mount point to free.
3595  *
3596  * Frees a unix mount point.
3597  */
3598
3599
3600 /**
3601  * GInetSocketAddress:
3602  *
3603  * An IPv4 or IPv6 socket address, corresponding to a <type>struct
3604  * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3605  */
3606
3607
3608 /**
3609  * g_dbus_error_set_dbus_error_valist:
3610  * @error: A pointer to a #GError or %NULL.
3611  * @dbus_error_name: D-Bus error name.
3612  * @dbus_error_message: D-Bus error message.
3613  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
3614  * @var_args: Arguments for @format.
3615  *
3616  * Like g_dbus_error_set_dbus_error() but intended for language bindings.
3617  *
3618  * Since: 2.26
3619  */
3620
3621
3622 /**
3623  * g_drive_start:
3624  * @drive: a #GDrive.
3625  * @flags: flags affecting the start operation.
3626  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
3627  * @cancellable: optional #GCancellable object, %NULL to ignore.
3628  * @callback: a #GAsyncReadyCallback, or %NULL.
3629  * @user_data: user data to pass to @callback
3630  *
3631  * Asynchronously starts a drive.
3632  * When the operation is finished, @callback will be called.
3633  * You can then call g_drive_start_finish() to obtain the
3634  * result of the operation.
3635  *
3636  * Since: 2.22
3637  */
3638
3639
3640 /**
3641  * g_unix_credentials_message_new_with_credentials:
3642  * @credentials: A #GCredentials object.
3643  *
3644  * Creates a new #GUnixCredentialsMessage holding @credentials.
3645  *
3646  * Returns: a new #GUnixCredentialsMessage
3647  * Since: 2.26
3648  */
3649
3650
3651 /**
3652  * g_file_create_readwrite:
3653  * @file: a #GFile
3654  * @flags: a set of #GFileCreateFlags
3655  * @cancellable: optional #GCancellable object, %NULL to ignore
3656  * @error: return location for a #GError, or %NULL
3657  *
3658  * Creates a new file and returns a stream for reading and writing to it.
3659  * The file must not already exist.
3660  * By default files created are generally readable by everyone,
3661  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
3662  * will be made readable only to the current user, to the level that
3663  * is supported on the target filesystem.
3664  * If @cancellable is not %NULL, then the operation can be cancelled by
3665  * triggering the cancellable object from another thread. If the operation
3666  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3667  * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
3668  * error will be returned. Some file systems don't allow all file names,
3669  * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
3670  * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
3671  * are possible too, and depend on what kind of filesystem the file is on.
3672  * Note that in many non-local file cases read and write streams are not
3673  * supported, so make sure you really need to do read and write streaming,
3674  * rather than just opening for reading or writing.
3675  * Free the returned object with g_object_unref().
3676  *
3677  * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
3678  * Since: 2.22
3679  */
3680
3681
3682 /**
3683  * g_dbus_message_set_member:
3684  * @message: A #GDBusMessage.
3685  * @value: The value to set.
3686  *
3687  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
3688  *
3689  * Since: 2.26
3690  */
3691
3692
3693 /**
3694  * g_socket_receive_from:
3695  * @socket: a #GSocket
3696  * @address: a pointer to a #GSocketAddress pointer, or %NULL
3697  * @buffer: a buffer to read data into (which should be at least @size bytes long).
3698  * @size: the number of bytes you want to read from the socket
3699  * @cancellable: a %GCancellable or %NULL
3700  * @error: #GError for error reporting, or %NULL to ignore.
3701  *
3702  * Receive data (up to @size bytes) from a socket.
3703  * If @address is non-%NULL then @address will be set equal to the
3704  * source address of the received packet.
3705  * See g_socket_receive() for additional information.
3706  *
3707  * Returns: Number of bytes read, or -1 on error
3708  * Since: 2.22
3709  */
3710
3711
3712 /**
3713  * g_seekable_can_seek:
3714  * @seekable: a #GSeekable.
3715  *
3716  * Tests if the stream supports the #GSeekableIface.
3717  *
3718  * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
3719  */
3720
3721
3722 /**
3723  * GCredentialsClass:
3724  *
3725  * Class structure for #GCredentials.
3726  *
3727  * Since: 2.26
3728  */
3729
3730
3731 /**
3732  * SECTION:gactio:
3733  * @title: GAction
3734  * @short_description: an action
3735  *
3736  * #GAction represents a single named action.
3737  * The main interface to an action is that it can be activated with
3738  * g_action_activate().  This results in the 'activate' signal being
3739  * emitted.  An activation has a #GVariant parameter (which may be
3740  * %NULL).  The correct type for the parameter is determined by a static
3741  * parameter type (which is given at construction time).
3742  * An action may optionally have a state, in which case the state may be
3743  * set with g_action_set_state().  This call takes a #GVariant.  The
3744  * correct type for the state is determined by a static state type
3745  * (which is given at construction time).
3746  * The state may have a hint associated with it, specifying its valid
3747  * range.
3748  * #GAction is merely the interface to the concept of an action, as
3749  * described above.  Various implementations of actions exist, including
3750  * #GSimpleAction and #GtkAction.
3751  * In all cases, the implementing class is responsible for storing the
3752  * name of the action, the parameter type, the enabled state, the
3753  * optional state type and the state and emitting the appropriate
3754  * signals when these change.  The implementor responsible for filtering
3755  * calls to g_action_activate() and g_action_set_state() for type safety
3756  * and for the state being enabled.
3757  * Probably the only useful thing to do with a #GAction is to put it
3758  * inside of a #GSimpleActionGroup.
3759  */
3760
3761
3762 /**
3763  * g_file_attribute_matcher_new:
3764  * @attributes: an attribute string to match.
3765  *
3766  * Creates a new file attribute matcher, which matches attributes
3767  * against a given string. #GFileAttributeMatcher<!-- -->s are reference
3768  * counted structures, and are created with a reference count of 1. If
3769  * the number of references falls to 0, the #GFileAttributeMatcher is
3770  * automatically destroyed.
3771  * The @attribute string should be formatted with specific keys separated
3772  * from namespaces with a double colon. Several "namespace::key" strings may be
3773  * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
3774  * The wildcard "*" may be used to match all keys and namespaces, or
3775  * "namespace::*" will match all keys in a given namespace.
3776  * Examples of strings to use:
3777  * <table>
3778  * <title>File Attribute Matcher strings and results</title>
3779  * <tgroup cols='2' align='left'><thead>
3780  * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
3781  * <tbody>
3782  * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
3783  * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
3784  * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
3785  * all keys in the unix namespace.</entry></row>
3786  * </tbody></tgroup>
3787  * </table>
3788  *
3789  * Returns: a #GFileAttributeMatcher.
3790  */
3791
3792
3793 /**
3794  * GDBusMethodInvocation:
3795  *
3796  * The #GDBusMethodInvocation structure contains only private data and
3797  * should only be accessed using the provided API.
3798  *
3799  * Since: 2.26
3800  */
3801
3802
3803 /**
3804  * GInetAddress:
3805  *
3806  * An IPv4 or IPv6 internet address.
3807  */
3808
3809
3810 /**
3811  * g_file_info_get_attribute_type:
3812  * @info: a #GFileInfo.
3813  * @attribute: a file attribute key.
3814  *
3815  * Gets the attribute type for an attribute key.
3816  * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
3817  *
3818  * Returns: a #GFileAttributeType for the given @attribute, or
3819  */
3820
3821
3822 /**
3823  * g_inet_socket_address_get_port:
3824  * @address: a #GInetSocketAddress
3825  *
3826  * Gets @address's port.
3827  *
3828  * Returns: the port for @address
3829  * Since: 2.22
3830  */
3831
3832
3833 /**
3834  * g_dbus_message_get_destination:
3835  * @message: A #GDBusMessage.
3836  *
3837  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
3838  *
3839  * Returns: The value.
3840  * Since: 2.26
3841  */
3842
3843
3844 /**
3845  * g_file_load_contents:
3846  * @file: input #GFile.
3847  * @cancellable: optional #GCancellable object, %NULL to ignore.
3848  * @contents: (out) (transfer full): a location to place the contents of the file.
3849  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
3850  * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
3851  * @error: a #GError, or %NULL
3852  *
3853  * Loads the content of the file into memory. The data is always
3854  * zero-terminated, but this is not included in the resultant @length.
3855  * The returned @content should be freed with g_free() when no longer
3856  * needed.
3857  * If @cancellable is not %NULL, then the operation can be cancelled by
3858  * triggering the cancellable object from another thread. If the operation
3859  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3860  * %FALSE if there were errors.
3861  *
3862  * Returns: %TRUE if the @file's contents were successfully loaded.
3863  */
3864
3865
3866 /**
3867  * g_inet_address_get_is_multicast:
3868  * @address: a #GInetAddress
3869  *
3870  * Tests whether @address is a multicast address.
3871  *
3872  * Returns: %TRUE if @address is a multicast address.
3873  * Since: 2.22
3874  */
3875
3876
3877 /**
3878  * GDBusServer:flags:
3879  *
3880  * Flags from the #GDBusServerFlags enumeration.
3881  *
3882  * Since: 2.26
3883  */
3884
3885
3886 /**
3887  * GSettings:schema:
3888  *
3889  * The name of the schema that describes the types of keys
3890  * for this #GSettings object.
3891  */
3892
3893
3894 /**
3895  * g_volume_monitor_get_volume_for_uuid:
3896  * @volume_monitor: a #GVolumeMonitor.
3897  * @uuid: the UUID to look for
3898  *
3899  * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
3900  * Free the returned object with g_object_unref().
3901  *
3902  * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
3903  */
3904
3905
3906 /**
3907  * g_settings_set_enum:
3908  * @settings: a #GSettings object
3909  * @key: a key, within @settings
3910  * @value: an enumerated value
3911  * @returns: %TRUE, if the set succeeds
3912  *
3913  * Looks up the enumerated type nick for @value and writes it to @key,
3914  * within @settings.
3915  * It is a programmer error to give a @key that isn't contained in the
3916  * schema for @settings or is not marked as an enumerated type, or for
3917  * After performing the write, accessing @key directly with
3918  * g_settings_get_string() will return the 'nick' associated with
3919  */
3920
3921
3922 /**
3923  * g_network_address_parse:
3924  * @host_and_port: the hostname and optionally a port
3925  * @default_port: the default port if not in @host_and_port
3926  * @error: a pointer to a #GError, or %NULL
3927  *
3928  * Creates a new #GSocketConnectable for connecting to the given
3929  * parsing @host_and_port fails.
3930  * address, an IPv4 address, or a domain name (in which case a DNS
3931  * lookup is performed). Quoting with [] is supported for all address
3932  * types. A port override may be specified in the usual way with a
3933  * colon. Ports may be given as decimal numbers or symbolic names (in
3934  * which case an /etc/services lookup is performed).
3935  * If no port is specified in @host_and_port then @default_port will be
3936  * used as the port number to connect to.
3937  * In general, @host_and_port is expected to be provided by the user
3938  * (allowing them to give the hostname, and a port overide if necessary)
3939  * and @default_port is expected to be provided by the application.
3940  *
3941  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
3942  * Since: 2.22
3943  */
3944
3945
3946 /**
3947  * g_settings_backend_path_changed:
3948  * @backend: a #GSettingsBackend implementation
3949  * @path: the path containing the changes
3950  * @origin_tag: the origin tag
3951  *
3952  * Signals that all keys below a given path may have possibly changed.
3953  * Backend implementations should call this if an entire path of keys
3954  * have possibly changed their values.
3955  * not containing '//').
3956  * The meaning of this signal is that any of the key which has a name
3957  * starting with @path may have changed.
3958  * The same rules for when notifications must occur apply as per
3959  * g_settings_backend_changed().  This call might be an appropriate
3960  * reasponse to a 'reset' call but implementations are also free to
3961  * explicitly list the keys that were affected by that call if they can
3962  * easily do so.
3963  * For efficiency reasons, the implementation should strive for @path to
3964  * keys that were changed) but this is not strictly required.  As an
3965  * example, if this function is called with the path of "/" then every
3966  * single key in the application will be notified of a possible change.
3967  *
3968  * Be as long as possible (ie: the longest common prefix of all of the
3969  * Since: 2.26
3970  */
3971
3972
3973 /**
3974  * g_socket_listener_accept_socket:
3975  * @listener: a #GSocketListener
3976  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
3977  * @cancellable: optional #GCancellable object, %NULL to ignore.
3978  * @error: #GError for error reporting, or %NULL to ignore.
3979  *
3980  * Blocks waiting for a client to connect to any of the sockets added
3981  * to the listener. Returns the #GSocket that was accepted.
3982  * If you want to accept the high-level #GSocketConnection, not a #GSocket,
3983  * which is often the case, then you should use g_socket_listener_accept()
3984  * instead.
3985  * If @source_object is not %NULL it will be filled out with the source
3986  * object specified when the corresponding socket or address was added
3987  * to the listener.
3988  * If @cancellable is not %NULL, then the operation can be cancelled by
3989  * triggering the cancellable object from another thread. If the operation
3990  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3991  *
3992  * Returns: (transfer full): a #GSocket on success, %NULL on error.
3993  * Since: 2.22
3994  */
3995
3996
3997 /**
3998  * GVolumeMonitor::mount-removed:
3999  * @volume_monitor: The volume monitor emitting the signal.
4000  * @mount: a #GMount that was removed.
4001  *
4002  * Emitted when a mount is removed.
4003  */
4004
4005
4006 /**
4007  * g_socket_address_get_family:
4008  * @address: a #GSocketAddress
4009  *
4010  * Gets the socket family type of @address.
4011  *
4012  * Returns: the socket family type of @address.
4013  * Since: 2.22
4014  */
4015
4016
4017 /**
4018  * g_simple_async_result_get_op_res_gssize:
4019  * @simple: a #GSimpleAsyncResult.
4020  *
4021  * Gets a gssize from the asynchronous result.
4022  *
4023  * Returns: a gssize returned from the asynchronous function.
4024  */
4025
4026
4027 /**
4028  * g_vfs_get_default:
4029  *
4030  * Gets the default #GVfs for the system.
4031  *
4032  * Returns: (transfer none): a #GVfs.
4033  */
4034
4035
4036 /**
4037  * g_simple_action_new_stateful:
4038  * @name: the name of the action
4039  * @parameter_type: (allow-none): the type of the parameter to the activate function
4040  * @state: the initial state of the action
4041  *
4042  * Creates a new stateful action.
4043  * must have the same #GVariantType as the initial state.
4044  * If the @state GVariant is floating, it is consumed.
4045  *
4046  * Returns: a new #GSimpleAction
4047  * Since: 2.28
4048  */
4049
4050
4051 /**
4052  * g_file_mount_mountable_finish:
4053  * @file: input #GFile.
4054  * @result: a #GAsyncResult.
4055  * @error: a #GError, or %NULL
4056  *
4057  * Finishes a mount operation. See g_file_mount_mountable() for details.
4058  * Finish an asynchronous mount operation that was started
4059  * with g_file_mount_mountable().
4060  * Free the returned object with g_object_unref().
4061  *
4062  * Returns: (transfer full): a #GFile or %NULL on error.
4063  */
4064
4065
4066 /**
4067  * g_drive_poll_for_media_finish:
4068  * @drive: a #GDrive.
4069  * @result: a #GAsyncResult.
4070  * @error: a #GError, or %NULL
4071  *
4072  * Finishes an operation started with g_drive_poll_for_media() on a drive.
4073  * %FALSE otherwise.
4074  *
4075  * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
4076  */
4077
4078
4079 /**
4080  * g_dbus_message_set_reply_serial:
4081  * @message: A #GDBusMessage.
4082  * @value: The value to set.
4083  *
4084  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
4085  *
4086  * Since: 2.26
4087  */
4088
4089
4090 /**
4091  * SECTION:gdbusmethodinvocatio:
4092  * @short_description: Object for handling remote calls
4093  * @include: gio/gio.h
4094  *
4095  * Instances of the #GDBusMethodInvocation class are used when
4096  * handling D-Bus method calls. It provides a way to asynchronously
4097  * return results and errors.
4098  * The normal way to obtain a #GDBusMethodInvocation object is to receive
4099  * it as an argument to the handle_method_call() function in a
4100  * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
4101  */
4102
4103
4104 /**
4105  * g_async_initable_new_async:
4106  * @object_type: a #GType supporting #GAsyncInitable.
4107  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
4108  * @cancellable: optional #GCancellable object, %NULL to ignore.
4109  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
4110  * @user_data: the data to pass to callback function
4111  * @first_property_name: the name of the first property, or %NULL if no properties
4112  * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
4113  *
4114  * Helper function for constructing #GAsyncInitiable object. This is
4115  * similar to g_object_new() but also initializes the object asynchronously.
4116  * When the initialization is finished, @callback will be called. You can
4117  * then call g_async_initable_new_finish() to get the new object and check
4118  * for any errors.
4119  *
4120  * Since: 2.22
4121  */
4122
4123
4124 /**
4125  * GWin32OutputStream:handle:
4126  *
4127  * The file handle that the stream writes to.
4128  *
4129  * Since: 2.26
4130  */
4131
4132
4133 /**
4134  * SECTION:gasyncresul:
4135  * @short_description: Asynchronous Function Results
4136  * @include: gio/gio.h
4137  * @see_also: #GSimpleAsyncResult
4138  *
4139  * Provides a base class for implementing asynchronous function results.
4140  * Asynchronous operations are broken up into two separate operations
4141  * which are chained together by a #GAsyncReadyCallback. To begin
4142  * an asynchronous operation, provide a #GAsyncReadyCallback to the
4143  * asynchronous function. This callback will be triggered when the
4144  * operation has completed, and will be passed a #GAsyncResult instance
4145  * filled with the details of the operation's success or failure, the
4146  * object the asynchronous function was started for and any error codes
4147  * returned. The asynchronous callback function is then expected to call
4148  * the corresponding "_finish()" function, passing the object the
4149  * function was called for, the #GAsyncResult instance, and (optionally)
4150  * an @error to grab any error conditions that may have occurred.
4151  * The "_finish()" function for an operation takes the generic result
4152  * (of type #GAsyncResult) and returns the specific result that the
4153  * operation in question yields (e.g. a #GFileEnumerator for a
4154  * "enumerate children" operation). If the result or error status of the
4155  * operation is not needed, there is no need to call the "_finish()"
4156  * function; GIO will take care of cleaning up the result and error
4157  * information after the #GAsyncReadyCallback returns. Applications may
4158  * also take a reference to the #GAsyncResult and call "_finish()"
4159  * later; however, the "_finish()" function may be called at most once.
4160  * Example of a typical asynchronous operation flow:
4161  * |[
4162  * void _theoretical_frobnitz_async (Theoretical         *t,
4163  * GCancellable        *c,
4164  * GAsyncReadyCallback *cb,
4165  * gpointer             u);
4166  * gboolean _theoretical_frobnitz_finish (Theoretical   *t,
4167  * GAsyncResult  *res,
4168  * GError       **e);
4169  * static void
4170  * frobnitz_result_func (GObject      *source_object,
4171  * GAsyncResult *res,
4172  * gpointer      user_data)
4173  * {
4174  * gboolean success = FALSE;
4175  * success = _theoretical_frobnitz_finish (source_object, res, NULL);
4176  * if (success)
4177  * g_printf ("Hurray!\n");
4178  * else
4179  * g_printf ("Uh oh!\n");
4180  * /<!-- -->* ... *<!-- -->/
4181  * }
4182  * int main (int argc, void *argv[])
4183  * {
4184  * /<!-- -->* ... *<!-- -->/
4185  * _theoretical_frobnitz_async (theoretical_data,
4186  * NULL,
4187  * frobnitz_result_func,
4188  * NULL);
4189  * /<!-- -->* ... *<!-- -->/
4190  * }
4191  * ]|
4192  * The callback for an asynchronous operation is called only once, and is
4193  * always called, even in the case of a cancelled operation. On cancellation
4194  * the result is a %G_IO_ERROR_CANCELLED error.
4195  * Some asynchronous operations are implemented using synchronous calls.
4196  * These are run in a separate thread, if #GThread has been initialized, but
4197  * otherwise they are sent to the Main Event Loop and processed in an idle
4198  * function. So, if you truly need asynchronous operations, make sure to
4199  * initialize #GThread.
4200  */
4201
4202
4203 /**
4204  * g_icon_new_for_string:
4205  * @str: A string obtained via g_icon_to_string().
4206  * @error: Return location for error.
4207  *
4208  * Generate a #GIcon instance from @str. This function can fail if
4209  * If your application or library provides one or more #GIcon
4210  * implementations you need to ensure that each #GType is registered
4211  * with the type system prior to calling g_icon_new_for_string().
4212  *
4213  * Returns: An object implementing the #GIcon interface or %NULL if
4214  * Since: 2.20
4215  */
4216
4217
4218 /**
4219  * g_app_info_supports_files:
4220  * @appinfo: a #GAppInfo.
4221  *
4222  * Checks if the application accepts files as arguments.
4223  *
4224  * Returns: %TRUE if the @appinfo supports files.
4225  */
4226
4227
4228 /**
4229  * g_action_group_get_action_state:
4230  * @action_group: a #GActionGroup
4231  * @action_name: the name of the action to query
4232  *
4233  * Queries the current state of the named action within @action_group.
4234  * If the action is not stateful then %NULL will be returned.  If the
4235  * action is stateful then the type of the return value is the type
4236  * given by g_action_group_get_state_type().
4237  * The return value (if non-%NULL) should be freed with
4238  * g_variant_unref() when it is no longer required.
4239  *
4240  * Returns: (allow-none): the current state of the action
4241  * Since: 2.28
4242  */
4243
4244
4245 /**
4246  * g_drive_can_stop:
4247  * @drive: a #GDrive.
4248  *
4249  * Checks if a drive can be stopped.
4250  *
4251  * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
4252  * Since: 2.22
4253  */
4254
4255
4256 /**
4257  * g_file_input_stream_query_info_async:
4258  * @stream: a #GFileInputStream.
4259  * @attributes: a file attribute query string.
4260  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
4261  * @cancellable: optional #GCancellable object, %NULL to ignore.
4262  * @callback: callback to call when the request is satisfied
4263  * @user_data: the data to pass to callback function
4264  *
4265  * Queries the stream information asynchronously.
4266  * When the operation is finished @callback will be called.
4267  * You can then call g_file_input_stream_query_info_finish()
4268  * to get the result of the operation.
4269  * For the synchronous version of this function,
4270  * see g_file_input_stream_query_info().
4271  * If @cancellable is not %NULL, then the operation can be cancelled by
4272  * triggering the cancellable object from another thread. If the operation
4273  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
4274  */
4275
4276
4277 /**
4278  * GSimplePermission:
4279  *
4280  * #GSimplePermission is an opaque data structure.  There are no methods
4281  * except for those defined by #GPermission.
4282  */
4283
4284
4285 /**
4286  * g_data_input_stream_read_until:
4287  * @stream: a given #GDataInputStream.
4288  * @stop_chars: characters to terminate the read.
4289  * @length: a #gsize to get the length of the data read in.
4290  * @cancellable: optional #GCancellable object, %NULL to ignore.
4291  * @error: #GError for error reporting.
4292  *
4293  * Reads a string from the data input stream, up to the first
4294  * occurrence of any of the stop characters.
4295  * Note that, in contrast to g_data_input_stream_read_until_async(),
4296  * this function consumes the stop character that it finds.
4297  * Don't use this function in new code.  Its functionality is
4298  * inconsistent with g_data_input_stream_read_until_async().  Both
4299  * functions will be marked as deprecated in a future release.  Use
4300  * g_data_input_stream_read_upto() instead, but note that that function
4301  * does not consume the stop character.
4302  * any of the stop characters. Set @length to a #gsize to get the length
4303  * of the string. This function will return %NULL on an error.
4304  *
4305  * Returns: a string with the data that was read before encountering
4306  */
4307
4308
4309 /**
4310  * g_cancellable_connect:
4311  * @cancellable: A #GCancellable.
4312  * @callback: The #GCallback to connect.
4313  * @data: Data to pass to @callback.
4314  * @data_destroy_func: Free function for @data or %NULL.
4315  *
4316  * Convenience function to connect to the #GCancellable::cancelled
4317  * signal. Also handles the race condition that may happen
4318  * if the cancellable is cancelled right before connecting.
4319  * time of the connect if @cancellable is already cancelled,
4320  * or when @cancellable is cancelled in some thread.
4321  * disconnected, or immediately if the cancellable is already
4322  * cancelled.
4323  * See #GCancellable::cancelled for details on how to use this.
4324  * been cancelled.
4325  *
4326  * Returns: The id of the signal handler or 0 if @cancellable has already
4327  * Since: 2.22
4328  */
4329
4330
4331 /**
4332  * GSimpleAction:enabled:
4333  *
4334  * If @action is currently enabled.
4335  * If the action is disabled then calls to g_simple_action_activate() and
4336  * g_simple_action_set_state() have no effect.
4337  *
4338  * Since: 2.28
4339  */
4340
4341
4342 /**
4343  * g_app_launch_context_new:
4344  *
4345  * Creates a new application launch context. This is not normally used,
4346  * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
4347  *
4348  * Returns: a #GAppLaunchContext.
4349  */
4350
4351
4352 /**
4353  * g_simple_async_result_set_op_res_gpointer:
4354  * @simple: a #GSimpleAsyncResult.
4355  * @op_res: a pointer result from an asynchronous function.
4356  * @destroy_op_res: a #GDestroyNotify function.
4357  *
4358  * Sets the operation result within the asynchronous result to a pointer.
4359  */
4360
4361
4362 /**
4363  * g_unix_mount_get_device_path:
4364  * @mount_entry: a #GUnixMount.
4365  *
4366  * Gets the device path for a unix mount.
4367  *
4368  * Returns: a string containing the device path.
4369  */
4370
4371
4372 /**
4373  * g_dbus_error_strip_remote_error:
4374  * @error: A #GError.
4375  *
4376  * Looks for extra information in the error message used to recover
4377  * the D-Bus error name and strips it if found. If stripped, the
4378  * message field in @error will correspond exactly to what was
4379  * received on the wire.
4380  * This is typically used when presenting errors to the end user.
4381  *
4382  * Returns: %TRUE if information was stripped, %FALSE otherwise.
4383  * Since: 2.26
4384  */
4385
4386
4387 /**
4388  * g_socket_control_message_deserialize:
4389  * @level: a socket level
4390  * @type: a socket control message type for the given @level
4391  * @size: the size of the data in bytes
4392  * @data: pointer to the message data
4393  *
4394  * Tries to deserialize a socket control message of a given
4395  * of #GSocketControlMessage if they can understand this kind
4396  * of message and if so deserialize it into a #GSocketControlMessage.
4397  * If there is no implementation for this kind of control message, %NULL
4398  * will be returned.
4399  *
4400  * Returns: (transfer full): the deserialized message or %NULL
4401  * Since: 2.22
4402  */
4403
4404
4405 /**
4406  * g_file_enumerate_children:
4407  * @file: input #GFile.
4408  * @attributes: an attribute query string.
4409  * @flags: a set of #GFileQueryInfoFlags.
4410  * @cancellable: optional #GCancellable object, %NULL to ignore.
4411  * @error: #GError for error reporting.
4412  *
4413  * Gets the requested information about the files in a directory. The result
4414  * is a #GFileEnumerator object that will give out #GFileInfo objects for
4415  * all the files in the directory.
4416  * The @attributes value is a string that specifies the file attributes that
4417  * should be gathered. It is not an error if it's not possible to read a particular
4418  * requested attribute from a file - it just won't be set. @attributes should
4419  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
4420  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
4421  * namespace. An example attribute query be "standard::*,owner::user".
4422  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
4423  * If @cancellable is not %NULL, then the operation can be cancelled by
4424  * triggering the cancellable object from another thread. If the operation
4425  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4426  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
4427  * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
4428  * Other errors are possible too.
4429  * Free the returned object with g_object_unref().
4430  *
4431  * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
4432  */
4433
4434
4435 /**
4436  * g_output_stream_clear_pending:
4437  * @stream: output stream
4438  *
4439  * Clears the pending flag on @stream.
4440  */
4441
4442
4443 /**
4444  * g_permission_get_can_release:
4445  * @permission: a #GPermission instance
4446  * @returns: the value of the 'can-release' property
4447  *
4448  * Gets the value of the 'can-release' property.  This property is %TRUE
4449  * if it is generally possible to release the permission by calling
4450  * g_permission_release().
4451  *
4452  * Since: 2.26
4453  */
4454
4455
4456 /**
4457  * g_mount_get_default_location:
4458  * @mount: a #GMount.
4459  *
4460  * Gets the default location of @mount. The default location of the given
4461  * the home directory, or the root of the volume).
4462  * The returned object should be unreffed with
4463  * g_object_unref() when no longer needed.
4464  *
4465  * Returns: (transfer full): a #GFile.
4466  */
4467
4468
4469 /**
4470  * g_io_scheduler_job_send_to_mainloop:
4471  * @job: a #GIOSchedulerJob
4472  * @func: a #GSourceFunc callback that will be called in the original thread
4473  * @user_data: data to pass to @func
4474  * @notify: a #GDestroyNotify for @user_data, or %NULL
4475  *
4476  * Used from an I/O job to send a callback to be run in the thread
4477  * that the job was started from, waiting for the result (and thus
4478  * blocking the I/O job).
4479  *
4480  * Returns: The return value of @func
4481  */
4482
4483
4484 /**
4485  * SECTION:gdatainputstrea:
4486  * @short_description: Data Input Stream
4487  * @include: gio/gio.h
4488  * @see_also: #GInputStream
4489  *
4490  * Data input stream implements #GInputStream and includes functions for
4491  * reading structured data directly from a binary input stream.
4492  */
4493
4494
4495 /**
4496  * g_socket_client_get_family:
4497  * @client: a #GSocketClient.
4498  *
4499  * Gets the socket family of the socket client.
4500  * See g_socket_client_set_family() for details.
4501  *
4502  * Returns: a #GSocketFamily
4503  * Since: 2.22
4504  */
4505
4506
4507 /**
4508  * g_simple_async_result_new:
4509  * @source_object: a #GObject the asynchronous function was called with, or %NULL.
4510  * @callback: a #GAsyncReadyCallback.
4511  * @user_data: user data passed to @callback.
4512  * @source_tag: the asynchronous function.
4513  *
4514  * Creates a #GSimpleAsyncResult.
4515  *
4516  * Returns: a #GSimpleAsyncResult.
4517  */
4518
4519
4520 /**
4521  * g_content_type_get_mime_type:
4522  * @type: a content type string
4523  *
4524  * Gets the mime type for the content type, if one is registered.
4525  * or %NULL if unknown.
4526  *
4527  * Returns: (allow-none): the registered mime type for the given @type,
4528  */
4529
4530
4531 /**
4532  * g_file_find_enclosing_mount_async:
4533  * @file: a #GFile
4534  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
4535  * @cancellable: optional #GCancellable object, %NULL to ignore.
4536  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
4537  * @user_data: the data to pass to callback function
4538  *
4539  * Asynchronously gets the mount for the file.
4540  * For more details, see g_file_find_enclosing_mount() which is
4541  * the synchronous version of this call.
4542  * When the operation is finished, @callback will be called. You can then call
4543  * g_file_find_enclosing_mount_finish() to get the result of the operation.
4544  */
4545
4546
4547 /**
4548  * g_file_open_readwrite_async:
4549  * @file: input #GFile.
4550  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
4551  * @cancellable: optional #GCancellable object, %NULL to ignore.
4552  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
4553  * @user_data: the data to pass to callback function
4554  *
4555  * Asynchronously opens @file for reading and writing.
4556  * For more details, see g_file_open_readwrite() which is
4557  * the synchronous version of this call.
4558  * When the operation is finished, @callback will be called. You can then call
4559  * g_file_open_readwrite_finish() to get the result of the operation.
4560  *
4561  * Since: 2.22
4562  */
4563
4564
4565 /**
4566  * SECTION:gproxyresolve:
4567  * @short_description: Asynchronous and cancellable network proxy resolver
4568  * @include: gio/gio.h
4569  *
4570  * #GProxyResolver provides synchronous and asynchronous network proxy
4571  * resolution. #GProxyResolver is used within #GClientSocket through
4572  * the method g_socket_connectable_proxy_enumerate().
4573  */
4574
4575
4576 /**
4577  * g_socket_client_set_enable_proxy:
4578  * @client: a #GSocketClient.
4579  * @enable: whether to enable proxies
4580  *
4581  * Sets whether or not @client attempts to make connections via a
4582  * proxy server. When enabled (the default), #GSocketClient will use a
4583  * #GProxyResolver to determine if a proxy protocol such as SOCKS is
4584  * needed, and automatically do the necessary proxy negotiation.
4585  *
4586  * Since: 2.26
4587  */
4588
4589
4590 /**
4591  * g_file_attribute_matcher_matches:
4592  * @matcher: a #GFileAttributeMatcher.
4593  * @attribute: a file attribute key.
4594  *
4595  * Checks if an attribute will be matched by an attribute matcher. If
4596  * the matcher was created with the "*" matching string, this function
4597  * will always return %TRUE.
4598  *
4599  * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
4600  */
4601
4602
4603 /**
4604  * g_resolver_lookup_service_finish:
4605  * @resolver: a #GResolver
4606  * @result: the result passed to your #GAsyncReadyCallback
4607  * @error: return location for a #GError, or %NULL
4608  *
4609  * Retrieves the result of a previous call to
4610  * g_resolver_lookup_service_async().
4611  * If the DNS resolution failed, @error (if non-%NULL) will be set to
4612  * a value from #GResolverError. If the operation was cancelled,
4613  * or %NULL on error. See g_resolver_lookup_service() for more details.
4614  *
4615  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
4616  * Since: 2.22
4617  */
4618
4619
4620 /**
4621  * g_file_info_set_attribute_int32:
4622  * @info: a #GFileInfo.
4623  * @attribute: a file attribute key.
4624  * @attr_value: a signed 32-bit integer
4625  *
4626  * Sets the @attribute to contain the given @attr_value,
4627  * if possible.
4628  */
4629
4630
4631 /**
4632  * g_socket_client_connect_to_service_finish:
4633  * @client: a #GSocketClient.
4634  * @result: a #GAsyncResult.
4635  * @error: a #GError location to store the error occuring, or %NULL to ignore.
4636  *
4637  * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
4638  *
4639  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
4640  * Since: 2.22
4641  */
4642
4643
4644 /**
4645  * g_cancellable_cancel:
4646  * @cancellable: a #GCancellable object.
4647  *
4648  * Will set @cancellable to cancelled, and will emit the
4649  * #GCancellable::cancelled signal. (However, see the warning about
4650  * race conditions in the documentation for that signal if you are
4651  * planning to connect to it.)
4652  * This function is thread-safe. In other words, you can safely call
4653  * it from a thread other than the one running the operation that was
4654  * passed the @cancellable.
4655  * The convention within gio is that cancelling an asynchronous
4656  * operation causes it to complete asynchronously. That is, if you
4657  * cancel the operation from the same thread in which it is running,
4658  * then the operation's #GAsyncReadyCallback will not be invoked until
4659  * the application returns to the main loop.
4660  */
4661
4662
4663 /**
4664  * g_dbus_arg_info_ref:
4665  * @info: A #GDBusArgInfo
4666  *
4667  * If @info is statically allocated does nothing. Otherwise increases
4668  * the reference count.
4669  *
4670  * Returns: The same @info.
4671  * Since: 2.26
4672  */
4673
4674
4675 /**
4676  * g_file_attribute_matcher_enumerate_next:
4677  * @matcher: a #GFileAttributeMatcher.
4678  *
4679  * Gets the next matched attribute from a #GFileAttributeMatcher.
4680  * no more attribute exist.
4681  *
4682  * Returns: a string containing the next attribute or %NULL if
4683  */
4684
4685
4686 /**
4687  * g_file_enumerator_close:
4688  * @enumerator: a #GFileEnumerator.
4689  * @cancellable: optional #GCancellable object, %NULL to ignore.
4690  * @error: location to store the error occuring, or %NULL to ignore
4691  *
4692  * Releases all resources used by this enumerator, making the
4693  * enumerator return %G_IO_ERROR_CLOSED on all calls.
4694  * This will be automatically called when the last reference
4695  * is dropped, but you might want to call this function to make
4696  * sure resources are released as early as possible.
4697  *
4698  * Returns: #TRUE on success or #FALSE on error.
4699  */
4700
4701
4702 /**
4703  * g_socket_control_message_get_msg_type:
4704  * @message: a #GSocketControlMessage
4705  *
4706  * Returns the protocol specific type of the control message.
4707  * For instance, for UNIX fd passing this would be SCM_RIGHTS.
4708  *
4709  * Returns: an integer describing the type of control message
4710  * Since: 2.22
4711  */
4712
4713
4714 /**
4715  * g_file_io_stream_query_info_async:
4716  * @stream: a #GFileIOStream.
4717  * @attributes: a file attribute query string.
4718  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
4719  * @cancellable: optional #GCancellable object, %NULL to ignore.
4720  * @callback: callback to call when the request is satisfied
4721  * @user_data: the data to pass to callback function
4722  *
4723  * Asynchronously queries the @stream for a #GFileInfo. When completed,
4724  * finish the operation with g_file_io_stream_query_info_finish().
4725  * For the synchronous version of this function, see
4726  * g_file_io_stream_query_info().
4727  *
4728  * Since: 2.22
4729  */
4730
4731
4732 /**
4733  * g_memory_output_stream_get_data: (skip)
4734  * @ostream: a #GMemoryOutputStream
4735  *
4736  * Gets any loaded data from the @ostream.
4737  * Note that the returned pointer may become invalid on the next
4738  * write or truncate operation on the stream.
4739  *
4740  * Returns: pointer to the stream's data
4741  */
4742
4743
4744 /**
4745  * g_data_input_stream_read_upto_finish:
4746  * @stream: a #GDataInputStream
4747  * @result: the #GAsyncResult that was provided to the callback
4748  * @length: a #gsize to get the length of the data read in
4749  * @error: #GError for error reporting
4750  *
4751  * Finish an asynchronous call started by
4752  * g_data_input_stream_read_upto_async().
4753  * Note that this function does <emphasis>not</emphasis> consume the
4754  * stop character. You have to use g_data_input_stream_read_byte() to
4755  * get it before calling g_data_input_stream_read_upto_async() again.
4756  * any of the stop characters. Set @length to a #gsize to get the length
4757  * of the string. This function will return %NULL on an error.
4758  *
4759  * Returns: a string with the data that was read before encountering
4760  * Since: 2.24
4761  */
4762
4763
4764 /**
4765  * g_simple_action_group_remove:
4766  * @simple: a #GSimpleActionGroup
4767  * @action_name: the name of the action
4768  *
4769  * Removes the named action from the action group.
4770  * If no action of this name is in the group then nothing happens.
4771  *
4772  * Since: 2.28
4773  */
4774
4775
4776 /**
4777  * g_output_stream_splice:
4778  * @stream: a #GOutputStream.
4779  * @source: a #GInputStream.
4780  * @flags: a set of #GOutputStreamSpliceFlags.
4781  * @cancellable: optional #GCancellable object, %NULL to ignore.
4782  * @error: a #GError location to store the error occuring, or %NULL to ignore.
4783  *
4784  * Splices an input stream into an output stream.
4785  * -1 if an error occurred.
4786  *
4787  * Returns: a #gssize containing the size of the data spliced, or
4788  */
4789
4790
4791 /**
4792  * g_socket_client_connect_to_uri:
4793  * @client: a #GSocketClient
4794  * @uri: A network URI
4795  * @default_port: the default port to connect to
4796  * @cancellable: a #GCancellable, or %NULL
4797  * @error: a pointer to a #GError, or %NULL
4798  *
4799  * This is a helper function for g_socket_client_connect().
4800  * Attempts to create a TCP connection with a network URI.
4801  * component. If a port is not specified in the URI, @default_port
4802  * will be used.
4803  * Using this rather than g_socket_client_connect() or
4804  * g_socket_client_connect_to_host() allows #GSocketClient to
4805  * determine when to use application-specific proxy protocols.
4806  * Upon a successful connection, a new #GSocketConnection is constructed
4807  * and returned.  The caller owns this new object and must drop their
4808  * reference to it when finished with it.
4809  * In the event of any failure (DNS error, service not found, no hosts
4810  * connectable) %NULL is returned and @error (if non-%NULL) is set
4811  * accordingly.
4812  *
4813  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
4814  * Since: 2.26
4815  */
4816
4817
4818 /**
4819  * g_unix_mount_points_get:
4820  * @time_read: (allow-none): guint64 to contain a timestamp.
4821  *
4822  * Gets a #GList of #GUnixMountPoint containing the unix mount points.
4823  * If @time_read is set, it will be filled with the mount timestamp,
4824  * allowing for checking if the mounts have changed with
4825  * g_unix_mounts_points_changed_since().
4826  *
4827  * Returns: (element-type utf8) (transfer full): a #GList of the UNIX mountpoints.
4828  */
4829
4830
4831 /**
4832  * g_mount_guess_content_type_sync:
4833  * @mount: a #GMount
4834  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
4835  * @cancellable: optional #GCancellable object, %NULL to ignore
4836  * @error: a #GError location to store the error occuring, or %NULL to ignore
4837  *
4838  * Tries to guess the type of content stored on @mount. Returns one or
4839  * more textual identifiers of well-known content types (typically
4840  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
4841  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
4842  * specification for more on x-content types.
4843  * This is an synchronous operation and as such may block doing IO;
4844  * see g_mount_guess_content_type() for the asynchronous version.
4845  * Caller should free this array with g_strfreev() when done with it.
4846  *
4847  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
4848  * Since: 2.18
4849  */
4850
4851
4852 /**
4853  * g_async_initable_init_async:
4854  * @initable: a #GAsyncInitable.
4855  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
4856  * @cancellable: optional #GCancellable object, %NULL to ignore.
4857  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
4858  * @user_data: the data to pass to callback function
4859  *
4860  * Starts asynchronous initialization of the object implementing the
4861  * interface. This must be done before any real use of the object after
4862  * initial construction. If the object also implements #GInitable you can
4863  * optionally call g_initable_init() instead.
4864  * When the initialization is finished, @callback will be called. You can
4865  * then call g_async_initable_init_finish() to get the result of the
4866  * initialization.
4867  * Implementations may also support cancellation. If @cancellable is not
4868  * %NULL, then initialization can be cancelled by triggering the cancellable
4869  * object from another thread. If the operation was cancelled, the error
4870  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
4871  * the object doesn't support cancellable initialization, the error
4872  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
4873  * If this function is not called, or returns with an error, then all
4874  * operations on the object should fail, generally returning the
4875  * error %G_IO_ERROR_NOT_INITIALIZED.
4876  * to this function with the same argument should return the same results.
4877  * Only the first call initializes the object; further calls return the result
4878  * of the first call. This is so that it's safe to implement the singleton
4879  * pattern in the GObject constructor function.
4880  * For classes that also support the #GInitable interface, the default
4881  * implementation of this method will run the g_initable_init() function
4882  * in a thread, so if you want to support asynchronous initialization via
4883  * threads, just implement the #GAsyncInitable interface without overriding
4884  * any interface methods.
4885  *
4886  * Implementations of this method must be idempotent: i.e. multiple calls
4887  * Since: 2.22
4888  */
4889
4890
4891 /**
4892  * g_file_new_for_path:
4893  * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
4894  *
4895  * Constructs a #GFile for a given path. This operation never
4896  * fails, but the returned object might not support any I/O
4897  * operation if @path is malformed.
4898  *
4899  * Returns: (transfer full): a new #GFile for the given @path.
4900  */
4901
4902
4903 /**
4904  * g_file_copy_attributes:
4905  * @source: a #GFile with attributes.
4906  * @destination: a #GFile to copy attributes to.
4907  * @flags: a set of #GFileCopyFlags.
4908  * @cancellable: optional #GCancellable object, %NULL to ignore.
4909  * @error: a #GError, %NULL to ignore.
4910  *
4911  * Copies the file attributes from @source to @destination.
4912  * Normally only a subset of the file attributes are copied,
4913  * those that are copies in a normal file copy operation
4914  * (which for instance does not include e.g. owner). However
4915  * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
4916  * all the metadata that is possible to copy is copied. This
4917  * is useful when implementing move by copy + delete source.
4918  *
4919  * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
4920  */
4921
4922
4923 /**
4924  * g_dbus_message_get_byte_order:
4925  * @message: A #GDBusMessage.
4926  *
4927  * Gets the byte order of @message.
4928  *
4929  * Returns: The byte order.
4930  */
4931
4932
4933 /**
4934  * g_app_info_get_default_for_type:
4935  * @content_type: the content type to find a #GAppInfo for
4936  * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
4937  *
4938  * Gets the #GAppInfo that corresponds to a given content type.
4939  *
4940  * Returns: #GAppInfo for given @content_type or %NULL on error.
4941  */
4942
4943
4944 /**
4945  * g_settings_apply:
4946  * @settings: a #GSettings instance
4947  *
4948  * Applies any changes that have been made to the settings.  This
4949  * function does nothing unless @settings is in 'delay-apply' mode;
4950  * see g_settings_delay().  In the normal case settings are always
4951  * applied immediately.
4952  */
4953
4954
4955 /**
4956  * g_file_info_get_symlink_target:
4957  * @info: a #GFileInfo.
4958  *
4959  * Gets the symlink target for a given #GFileInfo.
4960  *
4961  * Returns: a string containing the symlink target.
4962  */
4963
4964
4965 /**
4966  * g_output_stream_is_closed:
4967  * @stream: a #GOutputStream.
4968  *
4969  * Checks if an output stream has already been closed.
4970  *
4971  * Returns: %TRUE if @stream is closed. %FALSE otherwise.
4972  */
4973
4974
4975 /**
4976  * g_file_load_partial_contents_finish:
4977  * @file: input #GFile.
4978  * @res: a #GAsyncResult.
4979  * @contents: (out) (transfer full): a location to place the contents of the file.
4980  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
4981  * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
4982  * @error: a #GError, or %NULL
4983  *
4984  * Finishes an asynchronous partial load operation that was started
4985  * with g_file_load_partial_contents_async(). The data is always
4986  * zero-terminated, but this is not included in the resultant @length.
4987  * The returned @content should be freed with g_free() when no longer
4988  * needed.
4989  * present, it will be set appropriately.
4990  *
4991  * Returns: %TRUE if the load was successful. If %FALSE and @error is
4992  */
4993
4994
4995 /**
4996  * g_socket_listener_add_address:
4997  * @listener: a #GSocketListener
4998  * @address: a #GSocketAddress
4999  * @type: a #GSocketType
5000  * @protocol: a #GSocketProtocol
5001  * @source_object: Optional #GObject identifying this source
5002  * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
5003  * @error: #GError for error reporting, or %NULL to ignore.
5004  *
5005  * Creates a socket of type @type and protocol @protocol, binds
5006  * it to @address and adds it to the set of sockets we're accepting
5007  * sockets from.
5008  * Note that adding an IPv6 address, depending on the platform,
5009  * may or may not result in a listener that also accepts IPv4
5010  * connections.  For more determinstic behaviour, see
5011  * g_socket_listener_add_inet_port().
5012  * to accept to identify this particular source, which is
5013  * useful if you're listening on multiple addresses and do
5014  * different things depending on what address is connected to.
5015  * If successful and @effective_address is non-%NULL then it will
5016  * be set to the address that the binding actually occured at.  This
5017  * is helpful for determining the port number that was used for when
5018  * requested, belongs to the caller and must be freed.
5019  *
5020  * Requesting a binding to port 0 (ie: "any port").  This address, if
5021  * Returns: %TRUE on success, %FALSE on error.
5022  * Since: 2.22
5023  */
5024
5025
5026 /**
5027  * g_socket_get_socket_type:
5028  * @socket: a #GSocket.
5029  *
5030  * Gets the socket type of the socket.
5031  *
5032  * Returns: a #GSocketType
5033  * Since: 2.22
5034  */
5035
5036
5037 /**
5038  * g_vfs_get_supported_uri_schemes:
5039  * @vfs: a #GVfs.
5040  *
5041  * Gets a list of URI schemes supported by @vfs.
5042  * The returned array belongs to GIO and must
5043  * not be freed or modified.
5044  *
5045  * Returns: (transfer none): a %NULL-terminated array of strings.
5046  */
5047
5048
5049 /**
5050  * GMount::changed:
5051  * @mount: the object on which the signal is emitted
5052  *
5053  * Emitted when the mount has been changed.
5054  */
5055
5056
5057 /**
5058  * g_action_get_state_hint:
5059  * @action: a #GAction
5060  *
5061  * Requests a hint about the valid range of values for the state of
5062  * If %NULL is returned it either means that the action is not stateful
5063  * or that there is no hint about the valid range of values for the
5064  * state of the action.
5065  * If a #GVariant array is returned then each item in the array is a
5066  * returned then the tuple specifies the inclusive lower and upper bound
5067  * of valid values for the state.
5068  * In any case, the information is merely a hint.  It may be possible to
5069  * have a state value outside of the hinted range and setting a value
5070  * within the range may fail.
5071  * The return value (if non-%NULL) should be freed with
5072  * g_variant_unref() when it is no longer required.
5073  *
5074  * Possible value for the state.  if a #gvariant pair (ie: two-tuple) is
5075  * Returns: (transfer full): the state range hint
5076  * Since: 2.28
5077  */
5078
5079
5080 /**
5081  * g_action_group_activate_action:
5082  * @action_group: a #GActionGroup
5083  * @action_name: the name of the action to activate
5084  * @parameter: (allow-none): parameters to the activation
5085  *
5086  * Activate the named action within @action_group.
5087  * If the action is expecting a parameter, then the correct type of
5088  * parameter must be given as @parameter.  If the action is expecting no
5089  * parameters then @parameter must be %NULL.  See
5090  * g_action_group_get_parameter_type().
5091  *
5092  * Since: 2.28
5093  */
5094
5095
5096 /**
5097  * g_file_info_get_edit_name:
5098  * @info: a #GFileInfo.
5099  *
5100  * Gets the edit name for a file.
5101  *
5102  * Returns: a string containing the edit name.
5103  */
5104
5105
5106 /**
5107  * g_dbus_address_get_stream:
5108  * @address: A valid D-Bus address.
5109  * @cancellable: A #GCancellable or %NULL.
5110  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
5111  * @user_data: Data to pass to @callback.
5112  *
5113  * Asynchronously connects to an endpoint specified by @address and
5114  * sets up the connection so it is in a state to run the client-side
5115  * of the D-Bus authentication conversation.
5116  * When the operation is finished, @callback will be invoked. You can
5117  * then call g_dbus_address_get_stream_finish() to get the result of
5118  * the operation.
5119  * This is an asynchronous failable function. See
5120  * g_dbus_address_get_stream_sync() for the synchronous version.
5121  *
5122  * Since: 2.26
5123  */
5124
5125
5126 /**
5127  * g_simple_async_report_error_in_idle:
5128  * @object: a #GObject.
5129  * @callback: a #GAsyncReadyCallback.
5130  * @user_data: user data passed to @callback.
5131  * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
5132  * @code: a specific error code.
5133  * @format: a formatted error reporting string.
5134  * @...: a list of variables to fill in @format.
5135  *
5136  * Reports an error in an asynchronous function in an idle function by
5137  * directly setting the contents of the #GAsyncResult with the given error
5138  * information.
5139  */
5140
5141
5142 /**
5143  * g_file_read:
5144  * @file: #GFile to read.
5145  * @cancellable: a #GCancellable
5146  * @error: a #GError, or %NULL
5147  *
5148  * Opens a file for reading. The result is a #GFileInputStream that
5149  * can be used to read the contents of the file.
5150  * If @cancellable is not %NULL, then the operation can be cancelled by
5151  * triggering the cancellable object from another thread. If the operation
5152  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5153  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
5154  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
5155  * Other errors are possible too, and depend on what kind of filesystem the file is on.
5156  * Free the returned object with g_object_unref().
5157  *
5158  * Virtual: read_fn
5159  * Returns: (transfer full): #GFileInputStream or %NULL on error.
5160  */
5161
5162
5163 /**
5164  * GVolumeMonitor::volume-added:
5165  * @volume_monitor: The volume monitor emitting the signal.
5166  * @volume: a #GVolume that was added.
5167  *
5168  * Emitted when a mountable volume is added to the system.
5169  */
5170
5171
5172 /**
5173  * g_volume_monitor_get_connected_drives:
5174  * @volume_monitor: a #GVolumeMonitor.
5175  *
5176  * Gets a list of drives connected to the system.
5177  * The returned list should be freed with g_list_free(), after
5178  * its elements have been unreffed with g_object_unref().
5179  *
5180  * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
5181  */
5182
5183
5184 /**
5185  * GDBusProxy::g-properties-changed:
5186  * @proxy: The #GDBusProxy emitting the signal.
5187  * @changed_properties: A #GVariant containing the properties that changed
5188  * @invalidated_properties: A %NULL terminated array of properties that was invalidated
5189  *
5190  * Emitted when one or more D-Bus properties on @proxy changes. The
5191  * local cache has already been updated when this signal fires. Note
5192  * that both @changed_properties and @invalidated_properties are
5193  * guaranteed to never be %NULL (either may be empty though).
5194  * This signal corresponds to the
5195  * <literal>PropertiesChanged</literal> D-Bus signal on the
5196  * <literal>org.freedesktop.DBus.Properties</literal> interface.
5197  *
5198  * Since: 2.26
5199  */
5200
5201
5202 /**
5203  * g_simple_async_result_propagate_error:
5204  * @simple: a #GSimpleAsyncResult.
5205  * @dest: a location to propegate the error to.
5206  *
5207  * Propagates an error from within the simple asynchronous result to
5208  * a given destination.
5209  *
5210  * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
5211  */
5212
5213
5214 /**
5215  * g_file_replace_readwrite_finish:
5216  * @file: input #GFile.
5217  * @res: a #GAsyncResult.
5218  * @error: a #GError, or %NULL
5219  *
5220  * Finishes an asynchronous file replace operation started with
5221  * g_file_replace_readwrite_async().
5222  * Free the returned object with g_object_unref().
5223  *
5224  * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
5225  * Since: 2.22
5226  */
5227
5228
5229 /**
5230  * GUnixInputStream:fd:
5231  *
5232  * The file descriptor that the stream reads from.
5233  *
5234  * Since: 2.20
5235  */
5236
5237
5238 /**
5239  * GThemedIcon:names:
5240  *
5241  * A %NULL-terminated array of icon names.
5242  */
5243
5244
5245 /**
5246  * g_io_extension_point_register:
5247  * @name: The name of the extension point
5248  *
5249  * Registers an extension point.
5250  * and should not be freed
5251  *
5252  * Returns: the new #GIOExtensionPoint. This object is owned by GIO
5253  */
5254
5255
5256 /**
5257  * g_async_initable_newv_async:
5258  * @object_type: a #GType supporting #GAsyncInitable.
5259  * @n_parameters: the number of parameters in @parameters
5260  * @parameters: the parameters to use to construct the object
5261  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
5262  * @cancellable: optional #GCancellable object, %NULL to ignore.
5263  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
5264  * @user_data: the data to pass to callback function
5265  *
5266  * Helper function for constructing #GAsyncInitiable object. This is
5267  * similar to g_object_newv() but also initializes the object asynchronously.
5268  * When the initialization is finished, @callback will be called. You can
5269  * then call g_async_initable_new_finish() to get the new object and check
5270  * for any errors.
5271  *
5272  * Since: 2.22
5273  */
5274
5275
5276 /**
5277  * g_simple_async_result_new_from_error:
5278  * @source_object: a #GObject, or %NULL.
5279  * @callback: a #GAsyncReadyCallback.
5280  * @user_data: user data passed to @callback.
5281  * @error: a #GError
5282  *
5283  * Creates a #GSimpleAsyncResult from an error condition.
5284  *
5285  * Returns: a #GSimpleAsyncResult.
5286  */
5287
5288
5289 /**
5290  * g_file_info_get_sort_order:
5291  * @info: a #GFileInfo.
5292  *
5293  * Gets the value of the sort_order attribute from the #GFileInfo.
5294  * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
5295  *
5296  * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
5297  */
5298
5299
5300 /**
5301  * g_themed_icon_new:
5302  * @iconname: a string containing an icon name.
5303  *
5304  * Creates a new themed icon for @iconname.
5305  *
5306  * Returns: (transfer full): a new #GThemedIcon.
5307  */
5308
5309
5310 /**
5311  * g_dbus_message_get_unix_fd_list:
5312  * @message: A #GDBusMessage.
5313  *
5314  * Gets the UNIX file descriptors associated with @message, if any.
5315  * This method is only available on UNIX.
5316  * associated. Do not free, this object is owned by @message.
5317  *
5318  * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
5319  * Since: 2.26
5320  */
5321
5322
5323 /**
5324  * GThreadedSocketService::run:
5325  * @service: the #GThreadedSocketService.
5326  * @connection: a new #GSocketConnection object.
5327  * @source_object: the source_object passed to g_socket_listener_add_address().
5328  *
5329  * The ::run signal is emitted in a worker thread in response to an
5330  * incoming connection. This thread is dedicated to handling
5331  * not return until the connection is closed.
5332  *
5333  * Returns: %TRUE to stope further signal handlers from being called
5334  */
5335
5336
5337 /**
5338  * g_dbus_proxy_new_for_bus_finish:
5339  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
5340  * @error: Return location for error or %NULL.
5341  *
5342  * Finishes creating a #GDBusProxy.
5343  *
5344  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
5345  * Since: 2.26
5346  */
5347
5348
5349 /**
5350  * g_unix_mount_guess_can_eject:
5351  * @mount_entry: a #GUnixMountEntry
5352  *
5353  * Guesses whether a Unix mount can be ejected.
5354  *
5355  * Returns: %TRUE if @mount_entry is deemed to be ejectable.
5356  */
5357
5358
5359 /**
5360  * g_drive_stop_finish:
5361  * @drive: a #GDrive.
5362  * @result: a #GAsyncResult.
5363  * @error: a #GError, or %NULL
5364  *
5365  * Finishes stopping a drive.
5366  * %FALSE otherwise.
5367  *
5368  * Returns: %TRUE if the drive has been stopped successfully,
5369  * Since: 2.22
5370  */
5371
5372
5373 /**
5374  * g_memory_output_stream_new:
5375  * @data: pointer to a chunk of memory to use, or %NULL
5376  * @size: the size of @data
5377  * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
5378  * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
5379  *
5380  * Creates a new #GMemoryOutputStream.
5381  * If @data is non-%NULL, the stream  will use that for its internal storage.
5382  * If @realloc_fn is non-%NULL, it will be used for resizing the internal
5383  * storage when necessary. To construct a fixed-size output stream,
5384  * pass %NULL as @realloc_fn.
5385  * |[
5386  * /&ast; a stream that can grow &ast;/
5387  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
5388  * /&ast; another stream that can grow &ast;/
5389  * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
5390  * /&ast; a fixed-size stream &ast;/
5391  * data = malloc (200);
5392  * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
5393  * ]|
5394  *
5395  * Returns: A newly created #GMemoryOutputStream object.
5396  */
5397
5398
5399 /**
5400  * g_buffered_output_stream_set_buffer_size:
5401  * @stream: a #GBufferedOutputStream.
5402  * @size: a #gsize.
5403  *
5404  * Sets the size of the internal buffer to @size.
5405  */
5406
5407
5408 /**
5409  * GDBusConnection:
5410  *
5411  * The #GDBusConnection structure contains only private data and
5412  * should only be accessed using the provided API.
5413  *
5414  * Since: 2.26
5415  */
5416
5417
5418 /**
5419  * g_proxy_address_get_passwor:
5420  * @proxy: a #GProxyAddress
5421  *
5422  * Gets @proxy's password.
5423  *
5424  * Returns: the @proxy's password
5425  * Since: 2.26
5426  */
5427
5428
5429 /**
5430  * g_periodic_unblock:
5431  * @periodic: a #GPeriodic clock
5432  * @unblock_time: the unblock time
5433  *
5434  * Reverses the effect of a previous call to g_periodic_block().
5435  * If this call removes the last block, the tick signal is immediately
5436  * run.  The repair signal may also be run if the clock is marked as
5437  * damaged.
5438  * at which the event causing the unblock occured.
5439  * This function may not be called from handlers of any signal emitted
5440  * by @periodic.
5441  *
5442  * Since: 2.28
5443  */
5444
5445
5446 /**
5447  * g_file_info_get_attribute_object:
5448  * @info: a #GFileInfo.
5449  * @attribute: a file attribute key.
5450  *
5451  * Gets the value of a #GObject attribute. If the attribute does
5452  * not contain a #GObject, %NULL will be returned.
5453  * %NULL otherwise.
5454  *
5455  * Returns: (transfer none): a #GObject associated with the given @attribute, or
5456  */
5457
5458
5459 /**
5460  * g_action_set_state:
5461  * @action: a #GAction
5462  * @value: the new state
5463  *
5464  * Request for the state of @action to be changed to @value.
5465  * The action must be stateful and @value must be of the correct type.
5466  * See g_action_get_state_type().
5467  * This call merely requests a change.  The action may refuse to change
5468  * its state or may change its state to something other than @value.
5469  * See g_action_get_state_hint().
5470  * If the @value GVariant is floating, it is consumed.
5471  *
5472  * Since: 2.28
5473  */
5474
5475
5476 /**
5477  * g_file_replace_finish:
5478  * @file: input #GFile.
5479  * @res: a #GAsyncResult.
5480  * @error: a #GError, or %NULL
5481  *
5482  * Finishes an asynchronous file replace operation started with
5483  * g_file_replace_async().
5484  * Free the returned object with g_object_unref().
5485  *
5486  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
5487  */
5488
5489
5490 /**
5491  * g_file_has_parent:
5492  * @file: input #GFile
5493  * @parent: the parent to check for, or %NULL
5494  *
5495  * Checks if @file has a parent, and optionally, if it is @parent.
5496  * If @parent is %NULL then this function returns %TRUE if @file has any
5497  * parent at all.  If @parent is non-%NULL then %TRUE is only returned
5498  * if @file is a child of @parent.
5499  * case that @parent is %NULL).
5500  *
5501  * Returns: %TRUE if @file is a child of @parent (or any parent in the
5502  * Since: 2.24
5503  */
5504
5505
5506 /**
5507  * g_dbus_is_supported_address:
5508  * @string: A string.
5509  * @error: Return location for error or %NULL.
5510  *
5511  * Like g_dbus_is_address() but also checks if the library suppors the
5512  * transports in @string and that key/value pairs for each transport
5513  * are valid.
5514  * supported by this library, %FALSE if @error is set.
5515  *
5516  * Returns: %TRUE if @string is a valid D-Bus address that is
5517  * Since: 2.26
5518  */
5519
5520
5521 /**
5522  * g_socket_connection_get_remote_address:
5523  * @connection: a #GSocketConnection
5524  * @error: #GError for error reporting, or %NULL to ignore.
5525  *
5526  * Try to get the remote address of a socket connection.
5527  * Free the returned object with g_object_unref().
5528  *
5529  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
5530  * Since: 2.22
5531  */
5532
5533
5534 /**
5535  * g_dbus_message_new_method_call:
5536  * @name: A valid D-Bus name or %NULL.
5537  * @path: A valid object path.
5538  * @interface_: A valid D-Bus interface name or %NULL.
5539  * @method: A valid method name.
5540  *
5541  * Creates a new #GDBusMessage for a method call.
5542  *
5543  * Returns: A #GDBusMessage. Free with g_object_unref().
5544  * Since: 2.26
5545  */
5546
5547
5548 /**
5549  * g_simple_async_result_new_error:
5550  * @source_object: a #GObject, or %NULL.
5551  * @callback: a #GAsyncReadyCallback.
5552  * @user_data: user data passed to @callback.
5553  * @domain: a #GQuark.
5554  * @code: an error code.
5555  * @format: a string with format characters.
5556  * @...: a list of values to insert into @format.
5557  *
5558  * Creates a new #GSimpleAsyncResult with a set error.
5559  *
5560  * Returns: a #GSimpleAsyncResult.
5561  */
5562
5563
5564 /**
5565  * g_simple_async_report_take_gerror_in_idle:
5566  * @object: a #GObject.
5567  * @callback: a #GAsyncReadyCallback.
5568  * @user_data: user data passed to @callback.
5569  * @error: the #GError to report
5570  *
5571  * Reports an error in an idle function. Similar to
5572  * g_simple_async_report_gerror_in_idle(), but takes over the caller's
5573  * ownership of @error, so the caller does not have to free it any more.
5574  *
5575  * Since: 2.28
5576  */
5577
5578
5579 /**
5580  * g_file_unmount_mountable_finish:
5581  * @file: input #GFile.
5582  * @result: a #GAsyncResult.
5583  * @error: a #GError, or %NULL
5584  *
5585  * Finishes an unmount operation, see g_file_unmount_mountable() for details.
5586  * Finish an asynchronous unmount operation that was started
5587  * with g_file_unmount_mountable().
5588  * otherwise.
5589  *
5590  * Returns: %TRUE if the operation finished successfully. %FALSE
5591  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
5592  */
5593
5594
5595 /**
5596  * g_app_info_can_remove_supports_type:
5597  * @appinfo: a #GAppInfo.
5598  *
5599  * Checks if a supported content type can be removed from an application.
5600  * content types from a given @appinfo, %FALSE if not.
5601  *
5602  * Returns: %TRUE if it is possible to remove supported
5603  */
5604
5605
5606 /**
5607  * g_input_stream_read_finish:
5608  * @stream: a #GInputStream.
5609  * @result: a #GAsyncResult.
5610  * @error: a #GError location to store the error occuring, or %NULL to ignore.
5611  *
5612  * Finishes an asynchronous stream read operation.
5613  *
5614  * Returns: number of bytes read in, or -1 on error.
5615  */
5616
5617
5618 /**
5619  * g_dbus_signal_info_ref:
5620  * @info: A #GDBusSignalInfo
5621  *
5622  * If @info is statically allocated does nothing. Otherwise increases
5623  * the reference count.
5624  *
5625  * Returns: The same @info.
5626  * Since: 2.26
5627  */
5628
5629
5630 /**
5631  * g_loadable_icon_load:
5632  * @icon: a #GLoadableIcon.
5633  * @size: an integer.
5634  * @type: a location to store the type of the loaded icon, %NULL to ignore.
5635  * @cancellable: optional #GCancellable object, %NULL to ignore.
5636  * @error: a #GError location to store the error occuring, or %NULL to ignore.
5637  *
5638  * Loads a loadable icon. For the asynchronous version of this function,
5639  * see g_loadable_icon_load_async().
5640  *
5641  * Returns: (transfer full): a #GInputStream to read the icon from.
5642  */
5643
5644
5645 /**
5646  * GMountOperation:domain:
5647  *
5648  * The domain to use for the mount operation.
5649  */
5650
5651
5652 /**
5653  * g_socket_client_connect_to_uri_async:
5654  * @client: a #GSocketClient
5655  * @uri: a network uri
5656  * @default_port: the default port to connect to
5657  * @cancellable: a #GCancellable, or %NULL
5658  * @callback: a #GAsyncReadyCallback
5659  * @user_data: user data for the callback
5660  *
5661  * This is the asynchronous version of g_socket_client_connect_to_uri().
5662  * When the operation is finished @callback will be
5663  * called. You can then call g_socket_client_connect_to_uri_finish() to get
5664  * the result of the operation.
5665  *
5666  * Since: 2.26
5667  */
5668
5669
5670 /**
5671  * g_app_info_delete:
5672  * @appinfo: a #GAppInfo
5673  *
5674  * Tries to delete a #GAppInfo.
5675  * On some platforms, there may be a difference between user-defined
5676  * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
5677  * cannot. See g_app_info_can_delete().
5678  *
5679  * Virtual: do_delete
5680  * Returns: %TRUE if @appinfo has been deleted
5681  * Since: 2.20
5682  */
5683
5684
5685 /**
5686  * g_socket_control_message_get_level:
5687  * @message: a #GSocketControlMessage
5688  *
5689  * Returns the "level" (i.e. the originating protocol) of the control message.
5690  * This is often SOL_SOCKET.
5691  *
5692  * Returns: an integer describing the level
5693  * Since: 2.22
5694  */
5695
5696
5697 /**
5698  * SECTION:gdbusutil:
5699  * @title: D-Bus Utilities
5700  * @short_description: Various utilities related to D-Bus.
5701  * @include: gio/gio.h
5702  *
5703  * Various utility routines related to D-Bus.
5704  */
5705
5706
5707 /**
5708  * g_file_info_get_attribute_boolean:
5709  * @info: a #GFileInfo.
5710  * @attribute: a file attribute key.
5711  *
5712  * Gets the value of a boolean attribute. If the attribute does not
5713  * contain a boolean value, %FALSE will be returned.
5714  *
5715  * Returns: the boolean value contained within the attribute.
5716  */
5717
5718
5719 /**
5720  * g_mount_operation_set_domain:
5721  * @op: a #GMountOperation.
5722  * @domain: the domain to set.
5723  *
5724  * Sets the mount operation's domain.
5725  */
5726
5727
5728 /**
5729  * g_unix_mount_point_is_loopback:
5730  * @mount_point: a #GUnixMountPoint.
5731  *
5732  * Checks if a unix mount point is a loopback device.
5733  *
5734  * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
5735  */
5736
5737
5738 /**
5739  * g_mount_operation_get_password:
5740  * @op: a #GMountOperation.
5741  *
5742  * Gets a password from the mount operation.
5743  *
5744  * Returns: a string containing the password within @op.
5745  */
5746
5747
5748 /**
5749  * SECTION:gfilenamecomplete:
5750  * @short_description: Filename Completer
5751  * @include: gio/gio.h
5752  *
5753  * Completes partial file and directory names given a partial string by
5754  * looking in the file system for clues. Can return a list of possible
5755  * completion strings for widget implementations.
5756  */
5757
5758
5759 /**
5760  * g_dbus_message_get_interface:
5761  * @message: A #GDBusMessage.
5762  *
5763  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
5764  *
5765  * Returns: The value.
5766  * Since: 2.26
5767  */
5768
5769
5770 /**
5771  * g_content_types_get_registered:
5772  *
5773  * Gets a list of strings containing all the registered content types
5774  * known to the system. The list and its data should be freed using
5775  * <programlisting>
5776  * g_list_foreach (list, g_free, NULL);
5777  * g_list_free (list);
5778  * </programlisting>
5779  *
5780  * Returns: (element-type utf8) (transfer full): #GList of the registered content types
5781  */
5782
5783
5784 /**
5785  * g_dbus_interface_info_ref:
5786  * @info: A #GDBusInterfaceInfo
5787  *
5788  * If @info is statically allocated does nothing. Otherwise increases
5789  * the reference count.
5790  *
5791  * Returns: The same @info.
5792  * Since: 2.26
5793  */
5794
5795
5796 /**
5797  * g_file_info_clear_status:
5798  * @info: a #GFileInfo.
5799  *
5800  * Clears the status information from @info.
5801  */
5802
5803
5804 /**
5805  * g_file_eject_mountable:
5806  * @file: input #GFile.
5807  * @flags: flags affecting the operation
5808  * @cancellable: optional #GCancellable object, %NULL to ignore.
5809  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
5810  * @user_data: the data to pass to callback function
5811  *
5812  * Starts an asynchronous eject on a mountable.
5813  * When this operation has completed, @callback will be called with
5814  * g_file_eject_mountable_finish().
5815  * If @cancellable is not %NULL, then the operation can be cancelled by
5816  * triggering the cancellable object from another thread. If the operation
5817  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5818  *
5819  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
5820  */
5821
5822
5823 /**
5824  * g_dbus_message_get_member:
5825  * @message: A #GDBusMessage.
5826  *
5827  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
5828  *
5829  * Returns: The value.
5830  * Since: 2.26
5831  */
5832
5833
5834 /**
5835  * SECTION:gfilterinputstrea:
5836  * @short_description: Filter Input Stream
5837  * @include: gio/gio.h
5838  *
5839  * Base class for input stream implementations that perform some
5840  * kind of filtering operation on a base stream. Typical examples
5841  * of filtering operations are character set conversion, compression
5842  * and byte order flipping.
5843  */
5844
5845
5846 /**
5847  * g_file_replace_readwrite:
5848  * @file: a #GFile
5849  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
5850  * @make_backup: %TRUE if a backup should be created
5851  * @flags: a set of #GFileCreateFlags
5852  * @cancellable: optional #GCancellable object, %NULL to ignore
5853  * @error: return location for a #GError, or %NULL
5854  *
5855  * Returns an output stream for overwriting the file in readwrite mode,
5856  * possibly creating a backup copy of the file first. If the file doesn't
5857  * exist, it will be created.
5858  * For details about the behaviour, see g_file_replace() which does the same
5859  * thing but returns an output stream only.
5860  * Note that in many non-local file cases read and write streams are not
5861  * supported, so make sure you really need to do read and write streaming,
5862  * rather than just opening for reading or writing.
5863  * Free the returned object with g_object_unref().
5864  *
5865  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
5866  * Since: 2.22
5867  */
5868
5869
5870 /**
5871  * g_simple_permission_new:
5872  * @allowed: %TRUE if the action is allowed
5873  * @returns: the #GSimplePermission, as a #GPermission
5874  *
5875  * Creates a new #GPermission instance that represents an action that is
5876  * either always or never allowed.
5877  *
5878  * Since: 2.26
5879  */
5880
5881
5882 /**
5883  * g_file_query_filesystem_info_finish:
5884  * @file: input #GFile.
5885  * @res: a #GAsyncResult.
5886  * @error: a #GError.
5887  *
5888  * Finishes an asynchronous filesystem info query.  See
5889  * g_file_query_filesystem_info_async().
5890  * Free the returned object with g_object_unref().
5891  *
5892  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
5893  */
5894
5895
5896 /**
5897  * GVolumeMonitor::mount-changed:
5898  * @volume_monitor: The volume monitor emitting the signal.
5899  * @mount: a #GMount that changed.
5900  *
5901  * Emitted when a mount changes.
5902  */
5903
5904
5905 /**
5906  * g_volume_get_identifier:
5907  * @volume: a #GVolume
5908  * @kind: the kind of identifier to return
5909  *
5910  * Gets the identifier of the given kind for @volume.
5911  * See the <link linkend="volume-identifier">introduction</link>
5912  * for more information about volume identifiers.
5913  * requested identfier, or %NULL if the #GVolume
5914  * doesn't have this kind of identifier
5915  *
5916  * Returns: a newly allocated string containing the
5917  */
5918
5919
5920 /**
5921  * g_tcp_connection_get_graceful_disconnect:
5922  * @connection: a #GTcpConnection
5923  *
5924  * Checks if graceful disconnects are used. See
5925  * g_tcp_connection_set_graceful_disconnect().
5926  *
5927  * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
5928  * Since: 2.22
5929  */
5930
5931
5932 /**
5933  * SECTION:gzdecompresso:
5934  * @short_description: Zlib decompressor
5935  * @include: gio/gio.h
5936  *
5937  * #GZlibDecompressor is an implementation of #GConverter that
5938  * decompresses data compressed with zlib.
5939  */
5940
5941
5942 /**
5943  * g_dbus_message_get_reply_serial:
5944  * @message: A #GDBusMessage.
5945  *
5946  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
5947  *
5948  * Returns: The value.
5949  * Since: 2.26
5950  */
5951
5952
5953 /**
5954  * g_emblem_get_origin:
5955  * @emblem: a #GEmblem
5956  *
5957  * Gets the origin of the emblem.
5958  *
5959  * Returns: the origin of the emblem
5960  * Since: 2.18
5961  */
5962
5963
5964 /**
5965  * SECTION:gfiledescriptorbase:
5966  * @short_description: Interface for file descriptor based IO
5967  * @include: gio/gfiledescriptorbased.h
5968  * @see_also: #GInputStream, #GOutputStream
5969  *
5970  * #GFileDescriptorBased is implemented by streams (implementations of
5971  * #GInputStream or #GOutputStream) that are based on file descriptors.
5972  * Note that <filename>&lt;gio/gfiledescriptorbased.h&gt;</filename> belongs to
5973  * the UNIX-specific GIO interfaces, thus you have to use the
5974  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
5975  *
5976  * Since: 2.24
5977  */
5978
5979
5980 /**
5981  * g_file_find_enclosing_mount_finish:
5982  * @file: a #GFile
5983  * @res: a #GAsyncResult
5984  * @error: a #GError
5985  *
5986  * Finishes an asynchronous find mount request.
5987  * See g_file_find_enclosing_mount_async().
5988  * Free the returned object with g_object_unref().
5989  *
5990  * Returns: (transfer full): #GMount for given @file or %NULL on error.
5991  */
5992
5993
5994 /**
5995  * g_inet_address_get_is_site_local:
5996  * @address: a #GInetAddress
5997  *
5998  * Tests whether @address is a site-local address such as 10.0.0.1
5999  * (that is, the address identifies a host on a local network that can
6000  * not be reached directly from the Internet, but which may have
6001  * outgoing Internet connectivity via a NAT or firewall).
6002  *
6003  * Returns: %TRUE if @address is a site-local address.
6004  * Since: 2.22
6005  */
6006
6007
6008 /**
6009  * g_dbus_message_set_num_unix_fds:
6010  * @message: A #GDBusMessage.
6011  * @value: The value to set.
6012  *
6013  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
6014  *
6015  * Since: 2.26
6016  */
6017
6018
6019 /**
6020  * g_file_copy_async:
6021  * @source: input #GFile.
6022  * @destination: destination #GFile
6023  * @flags: set of #GFileCopyFlags
6024  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
6025  * @cancellable: optional #GCancellable object, %NULL to ignore.
6026  * @progress_callback: function to callback with progress information
6027  * @progress_callback_data: user data to pass to @progress_callback
6028  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
6029  * @user_data: the data to pass to callback function
6030  *
6031  * Copies the file @source to the location specified by @destination
6032  * asynchronously. For details of the behaviour, see g_file_copy().
6033  * If @progress_callback is not %NULL, then that function that will be called
6034  * just like in g_file_copy(), however the callback will run in the main loop,
6035  * not in the thread that is doing the I/O operation.
6036  * When the operation is finished, @callback will be called. You can then call
6037  * g_file_copy_finish() to get the result of the operation.
6038  */
6039
6040
6041 /**
6042  * g_dbus_method_invocation_get_method_name:
6043  * @invocation: A #GDBusMethodInvocation.
6044  *
6045  * Gets the name of the method that was invoked.
6046  *
6047  * Returns: A string. Do not free, it is owned by @invocation.
6048  * Since: 2.26
6049  */
6050
6051
6052 /**
6053  * g_io_extension_ref_class:
6054  * @extension: a #GIOExtension
6055  *
6056  * Gets a reference to the class for the type that is
6057  * associated with @extension.
6058  *
6059  * Returns: (transfer full): the #GTypeClass for the type of @extension
6060  */
6061
6062
6063 /**
6064  * GVolumeMonitor::mount-pre-unmount:
6065  * @volume_monitor: The volume monitor emitting the signal.
6066  * @mount: a #GMount that is being unmounted.
6067  *
6068  * Emitted when a mount is about to be removed.
6069  */
6070
6071
6072 /**
6073  * g_desktop_app_info_new_from_keyfile:
6074  * @key_file: an opened #GKeyFile
6075  *
6076  * Creates a new #GDesktopAppInfo.
6077  *
6078  * Returns: a new #GDesktopAppInfo or %NULL on error.
6079  * Since: 2.18
6080  */
6081
6082
6083 /**
6084  * g_file_info_get_attribute_uint32:
6085  * @info: a #GFileInfo.
6086  * @attribute: a file attribute key.
6087  *
6088  * Gets an unsigned 32-bit integer contained within the attribute. If the
6089  * attribute does not contain an unsigned 32-bit integer, or is invalid,
6090  * 0 will be returned.
6091  *
6092  * Returns: an unsigned 32-bit integer from the attribute.
6093  */
6094
6095
6096 /**
6097  * g_dbus_server_is_active:
6098  * @server: A #GDBusServer.
6099  *
6100  * Gets whether @server is active.
6101  *
6102  * Returns: %TRUE if server is active, %FALSE otherwise.
6103  * Since: 2.26
6104  */
6105
6106
6107 /**
6108  * g_application_set_inactivity_timeout:
6109  * @application: a #GApplication
6110  * @inactivity_timeout: the timeout, in milliseconds
6111  *
6112  * Sets the current inactivity timeout for the application.
6113  * This is the amount of time (in milliseconds) after the last call to
6114  * g_application_release() before the application stops running.
6115  * This call has no side effects of its own.  The value set here is only
6116  * used for next time g_application_release() drops the use count to
6117  * zero.  Any timeouts currently in progress are not impacted.
6118  *
6119  * Returns: the timeout, in milliseconds
6120  * Since: 2.28
6121  */
6122
6123
6124 /**
6125  * GVolume::removed:
6126  *
6127  * This signal is emitted when the #GVolume have been removed. If
6128  * the recipient is holding references to the object they should
6129  * release them so the object can be finalized.
6130  */
6131
6132
6133 /**
6134  * g_settings_set_flags:
6135  * @settings: a #GSettings object
6136  * @key: a key, within @settings
6137  * @value: a flags value
6138  * @returns: %TRUE, if the set succeeds
6139  *
6140  * Looks up the flags type nicks for the bits specified by @value, puts
6141  * them in an array of strings and writes the array to @key, withing
6142  * It is a programmer error to give a @key that isn't contained in the
6143  * schema for @settings or is not marked as a flags type, or for @value
6144  * to contain any bits that are not value for the named type.
6145  * After performing the write, accessing @key directly with
6146  * g_settings_get_strv() will return an array of 'nicks'; one for each
6147  * bit in @value.
6148  */
6149
6150
6151 /**
6152  * g_drive_has_volumes:
6153  * @drive: a #GDrive.
6154  *
6155  * Check if @drive has any mountable volumes.
6156  *
6157  * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
6158  */
6159
6160
6161 /**
6162  * g_app_info_get_description:
6163  * @appinfo: a #GAppInfo.
6164  *
6165  * Gets a human-readable description of an installed application.
6166  * application @appinfo, or %NULL if none.
6167  *
6168  * Returns: a string containing a description of the
6169  */
6170
6171
6172 /**
6173  * g_input_stream_close_async:
6174  * @stream: A #GInputStream.
6175  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
6176  * @cancellable: optional cancellable object
6177  * @callback: callback to call when the request is satisfied
6178  * @user_data: the data to pass to callback function
6179  *
6180  * Requests an asynchronous closes of the stream, releasing resources related to it.
6181  * When the operation is finished @callback will be called.
6182  * You can then call g_input_stream_close_finish() to get the result of the
6183  * operation.
6184  * For behaviour details see g_input_stream_close().
6185  * The asyncronous methods have a default fallback that uses threads to implement
6186  * asynchronicity, so they are optional for inheriting classes. However, if you
6187  * override one you must override all.
6188  */
6189
6190
6191 /**
6192  * g_file_descriptor_based_get_fd:
6193  * @fd_based: a #GFileDescriptorBased.
6194  *
6195  * Gets the underlying file descriptor.
6196  *
6197  * Returns: The file descriptor
6198  * Since: 2.24
6199  */
6200
6201
6202 /**
6203  * g_file_append_to:
6204  * @file: input #GFile.
6205  * @flags: a set of #GFileCreateFlags.
6206  * @cancellable: optional #GCancellable object, %NULL to ignore.
6207  * @error: a #GError, or %NULL
6208  *
6209  * Gets an output stream for appending data to the file. If
6210  * the file doesn't already exist it is created.
6211  * By default files created are generally readable by everyone,
6212  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
6213  * will be made readable only to the current user, to the level that
6214  * is supported on the target filesystem.
6215  * If @cancellable is not %NULL, then the operation can be cancelled by
6216  * triggering the cancellable object from another thread. If the operation
6217  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
6218  * Some file systems don't allow all file names, and may
6219  * return an %G_IO_ERROR_INVALID_FILENAME error.
6220  * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
6221  * returned. Other errors are possible too, and depend on what kind of
6222  * filesystem the file is on.
6223  * Free the returned object with g_object_unref().
6224  *
6225  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
6226  */
6227
6228
6229 /**
6230  * g_data_input_stream_read_until_finish:
6231  * @stream: a given #GDataInputStream.
6232  * @result: the #GAsyncResult that was provided to the callback.
6233  * @length: a #gsize to get the length of the data read in.
6234  * @error: #GError for error reporting.
6235  *
6236  * Finish an asynchronous call started by
6237  * g_data_input_stream_read_until_async().
6238  * any of the stop characters. Set @length to a #gsize to get the length
6239  * of the string. This function will return %NULL on an error.
6240  *
6241  * Since: 2.20
6242  * Returns: a string with the data that was read before encountering
6243  */
6244
6245
6246 /**
6247  * g_proxy_address_get_protocol:
6248  * @proxy: a #GProxyAddress
6249  *
6250  * Gets @proxy's protocol.
6251  *
6252  * Returns: the @proxy's protocol
6253  * Since: 2.26
6254  */
6255
6256
6257 /**
6258  * g_input_stream_set_pending:
6259  * @stream: input stream
6260  * @error: a #GError location to store the error occuring, or %NULL to ignore.
6261  *
6262  * Sets @stream to have actions pending. If the pending flag is
6263  * already set or @stream is closed, it will return %FALSE and set
6264  *
6265  * Returns: %TRUE if pending was previously unset and is now set.
6266  */
6267
6268
6269 /**
6270  * g_application_command_line_get_is_remote:
6271  * @cmdline: a #GApplicationCommandLine
6272  *
6273  * Determines if @cmdline represents a remote invocation.
6274  *
6275  * Returns: %TRUE if the invocation was remote
6276  * Since: 2.28
6277  */
6278
6279
6280 /**
6281  * g_dbus_error_new_for_dbus_error:
6282  * @dbus_error_name: D-Bus error name.
6283  * @dbus_error_message: D-Bus error message.
6284  *
6285  * Creates a #GError based on the contents of @dbus_error_name and
6286  * Errors registered with g_dbus_error_register_error() will be looked
6287  * up using @dbus_error_name and if a match is found, the error domain
6288  * and code is used. Applications can use g_dbus_error_get_remote_error()
6289  * to recover @dbus_error_name.
6290  * If a match against a registered error is not found and the D-Bus
6291  * error name is in a form as returned by g_dbus_error_encode_gerror()
6292  * the error domain and code encoded in the name is used to
6293  * create the #GError. Also, @dbus_error_name is added to the error message
6294  * such that it can be recovered with g_dbus_error_get_remote_error().
6295  * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
6296  * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
6297  * added to the error message such that it can be recovered with
6298  * g_dbus_error_get_remote_error().
6299  * In all three cases, @dbus_error_name can always be recovered from the
6300  * returned #GError using the g_dbus_error_get_remote_error() function
6301  * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
6302  * This function is typically only used in object mappings to prepare
6303  * #GError instances for applications. Regular applications should not use
6304  * it.
6305  *
6306  * Returns: An allocated #GError. Free with g_error_free().
6307  * Since: 2.26
6308  */
6309
6310
6311 /**
6312  * g_dbus_proxy_get_cached_property_names:
6313  * @proxy: A #GDBusProxy.
6314  *
6315  * Gets the names of all cached properties on @proxy.
6316  * no cached properties. Free the returned array with g_strfreev().
6317  *
6318  * Returns: A %NULL-terminated array of strings or %NULL if @proxy has
6319  * Since: 2.26
6320  */
6321
6322
6323 /**
6324  * GZlibDecompressor:
6325  *
6326  * Zlib decompression
6327  */
6328
6329
6330 /**
6331  * GDrive::eject-button:
6332  * @drive: a #GDrive.
6333  *
6334  * Emitted when the physical eject button (if any) of a drive has
6335  * been pressed.
6336  */
6337
6338
6339 /**
6340  * g_application_set_flags:
6341  * @application: a #GApplication
6342  * @flags: the flags for @application
6343  *
6344  * Sets the flags for @application.
6345  * The flags can only be modified if @application has not yet been
6346  * registered.
6347  * See #GApplicationFlags.
6348  *
6349  * Since: 2.28
6350  */
6351
6352
6353 /**
6354  * GSettings::changed:
6355  * @settings: the object on which the signal was emitted
6356  * @key: the name of the key that changed
6357  *
6358  * The "changed" signal is emitted when a key has potentially changed.
6359  * You should call one of the g_settings_get() calls to check the new
6360  * value.
6361  * This signal supports detailed connections.  You can connect to the
6362  * detailed signal "changed::x" in order to only receive callbacks
6363  * when key "x" changes.
6364  */
6365
6366
6367 /**
6368  * g_file_delete:
6369  * @file: input #GFile.
6370  * @cancellable: optional #GCancellable object, %NULL to ignore.
6371  * @error: a #GError, or %NULL
6372  *
6373  * Deletes a file. If the @file is a directory, it will only be deleted if it
6374  * is empty.
6375  * If @cancellable is not %NULL, then the operation can be cancelled by
6376  * triggering the cancellable object from another thread. If the operation
6377  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
6378  *
6379  * Virtual: delete_file
6380  * Returns: %TRUE if the file was deleted. %FALSE otherwise.
6381  */
6382
6383
6384 /**
6385  * GSettings:context:
6386  *
6387  * The name of the context that the settings are stored in.
6388  */
6389
6390
6391 /**
6392  * g_output_stream_is_closing:
6393  * @stream: a #GOutputStream.
6394  *
6395  * Checks if an output stream is being closed. This can be
6396  * used inside e.g. a flush implementation to see if the
6397  * flush (or other i/o operation) is called from within
6398  * the closing operation.
6399  *
6400  * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
6401  * Since: 2.24
6402  */
6403
6404
6405 /**
6406  * g_data_input_stream_read_line_async:
6407  * @stream: a given #GDataInputStream.
6408  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
6409  * @cancellable: optional #GCancellable object, %NULL to ignore.
6410  * @callback: callback to call when the request is satisfied.
6411  * @user_data: the data to pass to callback function.
6412  *
6413  * The asynchronous version of g_data_input_stream_read_line().  It is
6414  * an error to have two outstanding calls to this function.
6415  * When the operation is finished, @callback will be called. You
6416  * can then call g_data_input_stream_read_line_finish() to get
6417  * the result of the operation.
6418  *
6419  * Since: 2.20
6420  */
6421
6422
6423 /**
6424  * g_output_stream_write_finish:
6425  * @stream: a #GOutputStream.
6426  * @result: a #GAsyncResult.
6427  * @error: a #GError location to store the error occuring, or %NULL to ignore.
6428  *
6429  * Finishes a stream write operation.
6430  *
6431  * Returns: a #gssize containing the number of bytes written to the stream.
6432  */
6433
6434
6435 /**
6436  * g_file_create_readwrite_async:
6437  * @file: input #GFile
6438  * @flags: a set of #GFileCreateFlags
6439  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
6440  * @cancellable: optional #GCancellable object, %NULL to ignore
6441  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
6442  * @user_data: the data to pass to callback function
6443  *
6444  * Asynchronously creates a new file and returns a stream for reading and
6445  * writing to it. The file must not already exist.
6446  * For more details, see g_file_create_readwrite() which is
6447  * the synchronous version of this call.
6448  * When the operation is finished, @callback will be called. You can then
6449  * call g_file_create_readwrite_finish() to get the result of the operation.
6450  *
6451  * Since: 2.22
6452  */
6453
6454
6455 /**
6456  * GDBusAuthObserver::authorize-authenticated-peer:
6457  * @observer: The #GDBusAuthObserver emitting the signal.
6458  * @stream: A #GIOStream for the #GDBusConnection.
6459  * @credentials: Credentials received from the peer or %NULL.
6460  *
6461  * Emitted to check if a peer that is successfully authenticated
6462  * is authorized.
6463  *
6464  * Returns: %TRUE if the peer is authorized, %FALSE if not.
6465  * Since: 2.26
6466  */
6467
6468
6469 /**
6470  * GSimpleAction::activate:
6471  * @simple: the #GSimpleAction
6472  * @parameter: (allow-none): the parameter to the activation
6473  *
6474  * Indicates that the action was just activated.
6475  * an incorrect type was given, no signal will be emitted.
6476  *
6477  * Since: 2.28
6478  */
6479
6480
6481 /**
6482  * g_data_input_stream_read_byte:
6483  * @stream: a given #GDataInputStream.
6484  * @cancellable: optional #GCancellable object, %NULL to ignore.
6485  * @error: #GError for error reporting.
6486  *
6487  * Reads an unsigned 8-bit/1-byte value from @stream.
6488  * if an error occurred.
6489  *
6490  * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
6491  */
6492
6493
6494 /**
6495  * g_socket_client_connect_to_host_finish:
6496  * @client: a #GSocketClient.
6497  * @result: a #GAsyncResult.
6498  * @error: a #GError location to store the error occuring, or %NULL to ignore.
6499  *
6500  * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
6501  *
6502  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
6503  * Since: 2.22
6504  */
6505
6506
6507 /**
6508  * GMountOperation::ask-question:
6509  * @op: a #GMountOperation asking a question.
6510  * @message: string containing a message to display to the user.
6511  * @choices: an array of strings for each possible choice.
6512  *
6513  * Emitted when asking the user a question and gives a list of
6514  * choices for the user to choose from.
6515  * If the message contains a line break, the first line should be
6516  * presented as a heading. For example, it may be used as the
6517  * primary text in a #GtkMessageDialog.
6518  */
6519
6520
6521 /**
6522  * SECTION:extensionpoint:
6523  * @short_description: Extension Points
6524  * @include: gio.h
6525  * @see_also: <link linkend="extending-gio">Extending GIO</link>
6526  *
6527  * #GIOExtensionPoint provides a mechanism for modules to extend the
6528  * functionality of the library or application that loaded it in an
6529  * organized fashion.
6530  * An extension point is identified by a name, and it may optionally
6531  * require that any implementation must by of a certain type (or derived
6532  * thereof). Use g_io_extension_point_register() to register an
6533  * extension point, and g_io_extension_point_set_required_type() to
6534  * set a required type.
6535  * A module can implement an extension point by specifying the #GType
6536  * that implements the functionality. Additionally, each implementation
6537  * of an extension point has a name, and a priority. Use
6538  * g_io_extension_point_implement() to implement an extension point.
6539  * |[
6540  * GIOExtensionPoint *ep;
6541  * /&ast; Register an extension point &ast;/
6542  * ep = g_io_extension_point_register ("my-extension-point");
6543  * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
6544  * ]|
6545  * |[
6546  * /&ast; Implement an extension point &ast;/
6547  * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
6548  * g_io_extension_point_implement ("my-extension-point",
6549  * my_example_impl_get_type (),
6550  * "my-example",
6551  * 10);
6552  * ]|
6553  * It is up to the code that registered the extension point how
6554  * it uses the implementations that have been associated with it.
6555  * Depending on the use case, it may use all implementations, or
6556  * only the one with the highest priority, or pick a specific
6557  * one by name.
6558  * To avoid opening all modules just to find out what extension
6559  * points they implement, GIO makes use of a caching mechanism,
6560  * see <link linkend="gio-querymodules">gio-querymodules</link>.
6561  * You are expected to run this command after installing a
6562  * GIO module.
6563  */
6564
6565
6566 /**
6567  * g_output_stream_write:
6568  * @stream: a #GOutputStream.
6569  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
6570  * @count: the number of bytes to write
6571  * @cancellable: optional cancellable object
6572  * @error: location to store the error occuring, or %NULL to ignore
6573  *
6574  * Tries to write @count bytes from @buffer into the stream. Will block
6575  * during the operation.
6576  * If count is 0, returns 0 and does nothing. A value of @count
6577  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
6578  * On success, the number of bytes written to the stream is returned.
6579  * It is not an error if this is not the same as the requested size, as it
6580  * can happen e.g. on a partial I/O error, or if there is not enough
6581  * storage in the stream. All writes block until at least one byte
6582  * is written or an error occurs; 0 is never returned (unless
6583  * If @cancellable is not NULL, then the operation can be cancelled by
6584  * triggering the cancellable object from another thread. If the operation
6585  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
6586  * operation was partially finished when the operation was cancelled the
6587  * partial result will be returned, without an error.
6588  * On error -1 is returned and @error is set accordingly.
6589  *
6590  * Returns: Number of bytes written, or -1 on error
6591  */
6592
6593
6594 /**
6595  * g_dbus_connection_new:
6596  * @stream: A #GIOStream.
6597  * @guid: The GUID to use if a authenticating as a server or %NULL.
6598  * @flags: Flags describing how to make the connection.
6599  * @observer: A #GDBusAuthObserver or %NULL.
6600  * @cancellable: A #GCancellable or %NULL.
6601  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
6602  * @user_data: The data to pass to @callback.
6603  *
6604  * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
6605  * with the end represented by @stream.
6606  * If @observer is not %NULL it may be used to control the
6607  * authentication process.
6608  * When the operation is finished, @callback will be invoked. You can
6609  * then call g_dbus_connection_new_finish() to get the result of the
6610  * operation.
6611  * This is a asynchronous failable constructor. See
6612  * g_dbus_connection_new_sync() for the synchronous
6613  * version.
6614  *
6615  * Since: 2.26
6616  */
6617
6618
6619 /**
6620  * g_unix_credentials_message_get_credentials:
6621  * @message: A #GUnixCredentialsMessage.
6622  *
6623  * Gets the credentials stored in @message.
6624  *
6625  * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
6626  * Since: 2.26
6627  */
6628
6629
6630 /**
6631  * SECTION:gfileenumerato:
6632  * @short_description: Enumerated Files Routines
6633  * @include: gio/gio.h
6634  *
6635  * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
6636  * returning a #GFileInfo structure for each file enumerated (e.g.
6637  * g_file_enumerate_children() will return a #GFileEnumerator for each
6638  * of the children within a directory).
6639  * To get the next file's information from a #GFileEnumerator, use
6640  * g_file_enumerator_next_file() or its asynchronous version,
6641  * g_file_enumerator_next_files_async(). Note that the asynchronous
6642  * version will return a list of #GFileInfo<!---->s, whereas the
6643  * synchronous will only return the next file in the enumerator.
6644  * To close a #GFileEnumerator, use g_file_enumerator_close(), or
6645  * its asynchronous version, g_file_enumerator_close_async(). Once
6646  * a #GFileEnumerator is closed, no further actions may be performed
6647  * on it, and it should be freed with g_object_unref().
6648  */
6649
6650
6651 /**
6652  * GThemedIcon:use-default-fallbacks:
6653  *
6654  * Whether to use the default fallbacks found by shortening the icon name
6655  * at '-' characters. If the "names" array has more than one element,
6656  * ignores any past the first.
6657  * For example, if the icon name was "gnome-dev-cdrom-audio", the array
6658  * would become
6659  * |[
6660  * {
6661  * "gnome-dev-cdrom-audio",
6662  * "gnome-dev-cdrom",
6663  * "gnome-dev",
6664  * "gnome",
6665  * NULL
6666  * };
6667  * ]|
6668  */
6669
6670
6671 /**
6672  * g_mount_remount_finish:
6673  * @mount: a #GMount.
6674  * @result: a #GAsyncResult.
6675  * @error: a #GError location to store the error occuring, or %NULL to ignore.
6676  *
6677  * Finishes remounting a mount. If any errors occurred during the operation,
6678  *
6679  * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
6680  */
6681
6682
6683 /**
6684  * g_settings_sync:
6685  *
6686  * Ensures that all pending operations for the given are complete for
6687  * the default backend.
6688  * Writes made to a #GSettings are handled asynchronously.  For this
6689  * reason, it is very unlikely that the changes have it to disk by the
6690  * time g_settings_set() returns.
6691  * This call will block until all of the writes have made it to the
6692  * backend.  Since the mainloop is not running, no change notifications
6693  * will be dispatched during this call (but some may be queued by the
6694  * time the call is done).
6695  */
6696
6697
6698 /**
6699  * GNetworkAddress:
6700  *
6701  * A #GSocketConnectable for resolving a hostname and connecting to
6702  * that host.
6703  */
6704
6705
6706 /**
6707  * g_socket_address_enumerator_next_async:
6708  * @enumerator: a #GSocketAddressEnumerator
6709  * @cancellable: optional #GCancellable object, %NULL to ignore.
6710  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
6711  * @user_data: the data to pass to callback function
6712  *
6713  * Asynchronously retrieves the next #GSocketAddress from @enumerator
6714  * and then calls @callback, which must call
6715  * g_socket_address_enumerator_next_finish() to get the result.
6716  */
6717
6718
6719 /**
6720  * g_settings_get_strv:
6721  * @settings: a #GSettings object
6722  * @key: the key to get the value for
6723  * @returns: (array zero-terminated=1) (transfer full): the value that is
6724  *
6725  * A convenience variant of g_settings_get() for string arrays.
6726  * It is a programmer error to give a @key that isn't specified as
6727  * having an array of strings type in the schema for @settings.
6728  * stored at @key in @settings.
6729  *
6730  * Since: 2.26
6731  */
6732
6733
6734 /**
6735  * g_unix_output_stream_set_close_fd:
6736  * @stream: a #GUnixOutputStream
6737  * @close_fd: %TRUE to close the file descriptor when done
6738  *
6739  * Sets whether the file descriptor of @stream shall be closed
6740  * when the stream is closed.
6741  *
6742  * Since: 2.20
6743  */
6744
6745
6746 /**
6747  * g_dbus_message_set_interface:
6748  * @message: A #GDBusMessage.
6749  * @value: The value to set.
6750  *
6751  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
6752  *
6753  * Since: 2.26
6754  */
6755
6756
6757 /**
6758  * g_charset_converter_new:
6759  * @to_charset: destination charset
6760  * @from_charset: source charset
6761  * @error: #GError for error reporting, or %NULL to ignore.
6762  *
6763  * Creates a new #GCharsetConverter.
6764  *
6765  * Returns: a new #GCharsetConverter or %NULL on error.
6766  * Since: 2.24
6767  */
6768
6769
6770 /**
6771  * g_periodic_get_high_priority:
6772  * @periodic: a #GPeriodic clock
6773  *
6774  * Gets the #GSource priority of the clock.
6775  *
6776  * Returns: the high priority level
6777  * Since: 2.28
6778  */
6779
6780
6781 /**
6782  * g_simple_async_result_set_op_res_gboolean:
6783  * @simple: a #GSimpleAsyncResult.
6784  * @op_res: a #gboolean.
6785  *
6786  * Sets the operation result to a boolean within the asynchronous result.
6787  */
6788
6789
6790 /**
6791  * g_unix_fd_list_get:
6792  * @list: a #GUnixFDList
6793  * @index_: the index into the list
6794  * @error: a #GError pointer
6795  *
6796  * Gets a file descriptor out of @list.
6797  * programmer error for @index_ to be out of range; see
6798  * g_unix_fd_list_get_length().
6799  * The file descriptor is duplicated using dup() and set as
6800  * close-on-exec before being returned.  You must call close() on it
6801  * when you are done.
6802  * A possible cause of failure is exceeding the per-process or
6803  * system-wide file descriptor limit.
6804  *
6805  * Returns: the file descriptor, or -1 in case of error
6806  * Since: 2.24
6807  */
6808
6809
6810 /**
6811  * g_simple_action_new:
6812  * @name: the name of the action
6813  * @parameter_type: (allow-none): the type of parameter to the activate function
6814  *
6815  * Creates a new action.
6816  * The created action is stateless.  See g_simple_action_new_stateful().
6817  *
6818  * Returns: a new #GSimpleAction
6819  * Since: 2.28
6820  */
6821
6822
6823 /**
6824  * g_inet_address_get_is_link_local:
6825  * @address: a #GInetAddress
6826  *
6827  * Tests whether @address is a link-local address (that is, if it
6828  * identifies a host on a local network that is not connected to the
6829  * Internet).
6830  *
6831  * Returns: %TRUE if @address is a link-local address.
6832  * Since: 2.22
6833  */
6834
6835
6836 /**
6837  * g_drive_has_media:
6838  * @drive: a #GDrive.
6839  *
6840  * Checks if the @drive has media. Note that the OS may not be polling
6841  * the drive for media changes; see g_drive_is_media_check_automatic()
6842  * for more details.
6843  *
6844  * Returns: %TRUE if @drive has media, %FALSE otherwise.
6845  */
6846
6847
6848 /**
6849  * g_simple_async_result_set_op_res_gssize:
6850  * @simple: a #GSimpleAsyncResult.
6851  * @op_res: a #gssize.
6852  *
6853  * Sets the operation result within the asynchronous result to
6854  * the given @op_res.
6855  */
6856
6857
6858 /**
6859  * g_loadable_icon_load_finish:
6860  * @icon: a #GLoadableIcon.
6861  * @res: a #GAsyncResult.
6862  * @type: a location to store the type of the loaded icon, %NULL to ignore.
6863  * @error: a #GError location to store the error occuring, or %NULL to ignore.
6864  *
6865  * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
6866  *
6867  * Returns: (transfer full): a #GInputStream to read the icon from.
6868  */
6869
6870
6871 /**
6872  * g_resolver_get_default:
6873  *
6874  * Gets the default #GResolver. You should unref it when you are done
6875  * with it. #GResolver may use its reference count as a hint about how
6876  * many threads/processes, etc it should allocate for concurrent DNS
6877  * resolutions.
6878  *
6879  * Returns: (transfer full): the default #GResolver.
6880  * Since: 2.22
6881  */
6882
6883
6884 /**
6885  * g_application_command_line_print:
6886  * @cmdline: a #GApplicationCommandLine
6887  * @format: a printf-style format string
6888  * @...: arguments, as per @format
6889  *
6890  * Formats a message and prints it using the stdout print handler in the
6891  * invoking process.
6892  * If @cmdline is a local invocation then this is exactly equivalent to
6893  * g_print().  If @cmdline is remote then this is equivalent to calling
6894  * g_print() in the invoking process.
6895  *
6896  * Since: 2.28
6897  */
6898
6899
6900 /**
6901  * g_file_info_has_attribute:
6902  * @info: a #GFileInfo.
6903  * @attribute: a file attribute key.
6904  *
6905  * Checks if a file info structure has an attribute named @attribute.
6906  * %FALSE otherwise.
6907  *
6908  * Returns: %TRUE if @Ginfo has an attribute named @attribute,
6909  */
6910
6911
6912 /**
6913  * g_drive_get_volumes:
6914  * @drive: a #GDrive.
6915  *
6916  * Get a list of mountable volumes for @drive.
6917  * The returned list should be freed with g_list_free(), after
6918  * its elements have been unreffed with g_object_unref().
6919  *
6920  * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
6921  */
6922
6923
6924 /**
6925  * g_dbus_connection_start_message_processing:
6926  * @connection: A #GDBusConnection.
6927  *
6928  * If @connection was created with
6929  * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
6930  * starts processing messages. Does nothing on if @connection wasn't
6931  * created with this flag or if the method has already been called.
6932  *
6933  * Since: 2.26
6934  */
6935
6936
6937 /**
6938  * g_desktop_app_info_set_desktop_env:
6939  * @desktop_env: a string specifying what desktop this is
6940  *
6941  * Sets the name of the desktop that the application is running in.
6942  * This is used by g_app_info_should_show() to evaluate the
6943  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
6944  * desktop entry fields.
6945  * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
6946  * Menu specification</ulink> recognizes the following:
6947  * <simplelist>
6948  * <member>GNOME</member>
6949  * <member>KDE</member>
6950  * <member>ROX</member>
6951  * <member>XFCE</member>
6952  * <member>Old</member>
6953  * </simplelist>
6954  * Should be called only once; subsequent calls are ignored.
6955  */
6956
6957
6958 /**
6959  * g_cancellable_new:
6960  *
6961  * Creates a new #GCancellable object.
6962  * Applications that want to start one or more operations
6963  * that should be cancellable should create a #GCancellable
6964  * and pass it to the operations.
6965  * One #GCancellable can be used in multiple consecutive
6966  * operations, but not in multiple concurrent operations.
6967  *
6968  * Returns: a #GCancellable.
6969  */
6970
6971
6972 /**
6973  * g_io_extension_get_priority:
6974  * @extension: a #GIOExtension
6975  *
6976  * Gets the priority with which @extension was registered.
6977  *
6978  * Returns: the priority of @extension
6979  */
6980
6981
6982 /**
6983  * g_file_new_for_commandline_arg:
6984  * @arg: a command line string.
6985  *
6986  * Creates a #GFile with the given argument from the command line. The value of
6987  * relative to the current working directory.
6988  * This operation never fails, but the returned object might not support any
6989  * I/O operation if @arg points to a malformed path.
6990  *
6991  * Returns: (transfer full): a new #GFile.
6992  */
6993
6994
6995 /**
6996  * g_app_info_get_display_name:
6997  * @appinfo: a #GAppInfo.
6998  *
6999  * Gets the display name of the application. The display name is often more
7000  * descriptive to the user than the name itself.
7001  * no display name is available.
7002  *
7003  * Returns: the display name of the application for @appinfo, or the name if
7004  * Since: 2.24
7005  */
7006
7007
7008 /**
7009  * GApplication::activate:
7010  * @application: the application
7011  *
7012  * The ::activate signal is emitted on the primary instance when an
7013  * activation occurs. See g_application_activate().
7014  */
7015
7016
7017 /**
7018  * g_proxy_connect_finish:
7019  * @proxy: a #GProxy
7020  * @result: a #GAsyncRetult
7021  * @error: return #GError
7022  *
7023  * See g_proxy_connect().
7024  *
7025  * Returns: (transfer full): a #GIOStream.
7026  * Since: 2.26
7027  */
7028
7029
7030 /**
7031  * g_mount_get_icon:
7032  * @mount: a #GMount.
7033  *
7034  * Gets the icon for @mount.
7035  * The returned object should be unreffed with
7036  * g_object_unref() when no longer needed.
7037  *
7038  * Returns: (transfer full): a #GIcon.
7039  */
7040
7041
7042 /**
7043  * g_mount_operation_reply:
7044  * @op: a #GMountOperation
7045  * @result: a #GMountOperationResult
7046  *
7047  * Emits the #GMountOperation::reply signal.
7048  */
7049
7050
7051 /**
7052  * g_dbus_property_info_ref:
7053  * @info: A #GDBusPropertyInfo
7054  *
7055  * If @info is statically allocated does nothing. Otherwise increases
7056  * the reference count.
7057  *
7058  * Returns: The same @info.
7059  * Since: 2.26
7060  */
7061
7062
7063 /**
7064  * g_themed_icon_new_with_default_fallbacks:
7065  * @iconname: a string containing an icon name
7066  *
7067  * Creates a new themed icon for @iconname, and all the names
7068  * that can be created by shortening @iconname at '-' characters.
7069  * In the following example, @icon1 and @icon2 are equivalent:
7070  * |[
7071  * const char *names[] = {
7072  * "gnome-dev-cdrom-audio",
7073  * "gnome-dev-cdrom",
7074  * "gnome-dev",
7075  * "gnome"
7076  * };
7077  * icon1 = g_themed_icon_new_from_names (names, 4);
7078  * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
7079  * ]|
7080  *
7081  * Returns: (transfer full): a new #GThemedIcon.
7082  */
7083
7084
7085 /**
7086  * g_action_group_has_action:
7087  * @action_group: a #GActionGroup
7088  * @action_name: the name of the action to check for
7089  *
7090  * Checks if the named action exists within @action_group.
7091  *
7092  * Returns: whether the named action exists
7093  * Since: 2.28
7094  */
7095
7096
7097 /**
7098  * g_buffered_input_stream_fill_async:
7099  * @stream: a #GBufferedInputStream
7100  * @count: the number of bytes that will be read from the stream
7101  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
7102  * @cancellable: optional #GCancellable object
7103  * @callback: a #GAsyncReadyCallback
7104  * @user_data: a #gpointer
7105  *
7106  * Reads data into @stream's buffer asynchronously, up to @count size.
7107  * version of this function, see g_buffered_input_stream_fill().
7108  * If @count is -1 then the attempted read size is equal to the number
7109  * of bytes that are required to fill the buffer.
7110  */
7111
7112
7113 /**
7114  * g_inet_address_get_is_mc_node_local:
7115  * @address: a #GInetAddress
7116  *
7117  * Tests whether @address is a node-local multicast address.
7118  *
7119  * Returns: %TRUE if @address is a node-local multicast address.
7120  * Since: 2.22
7121  */
7122
7123
7124 /**
7125  * SECTION:gvolum:
7126  * @short_description: Volume management
7127  * @include: gio/gio.h
7128  *
7129  * The #GVolume interface represents user-visible objects that can be
7130  * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
7131  * equivalent of #GnomeVFSDrive.
7132  * Mounting a #GVolume instance is an asynchronous operation. For more
7133  * information about asynchronous operations, see #GAsyncReady and
7134  * #GSimpleAsyncReady. To mount a #GVolume, first call
7135  * g_volume_mount() with (at least) the #GVolume instance, optionally
7136  * a #GMountOperation object and a #GAsyncReadyCallback.
7137  * Typically, one will only want to pass %NULL for the
7138  * #GMountOperation if automounting all volumes when a desktop session
7139  * starts since it's not desirable to put up a lot of dialogs asking
7140  * for credentials.
7141  * The callback will be fired when the operation has resolved (either
7142  * with success or failure), and a #GAsyncReady structure will be
7143  * passed to the callback.  That callback should then call
7144  * g_volume_mount_finish() with the #GVolume instance and the
7145  * #GAsyncReady data to see if the operation was completed
7146  * successfully.  If an @error is present when g_volume_mount_finish()
7147  * is called, then it will be filled with any error information.
7148  * <para id="volume-identifier">
7149  * It is sometimes necessary to directly access the underlying
7150  * operating system object behind a volume (e.g. for passing a volume
7151  * to an application via the commandline). For this purpose, GIO
7152  * allows to obtain an 'identifier' for the volume. There can be
7153  * different kinds of identifiers, such as Hal UDIs, filesystem labels,
7154  * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
7155  * uuids. GIO uses predefind strings as names for the different kinds
7156  * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
7157  * to obtain an identifier for a volume.
7158  * </para>
7159  * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
7160  * when the gvfs hal volume monitor is in use. Other volume monitors
7161  * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
7162  * identifier, which can be used to obtain a hal device by means of
7163  * libhal_manger_find_device_string_match().
7164  *
7165  * Of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
7166  */
7167
7168
7169 /**
7170  * g_output_stream_write_async:
7171  * @stream: A #GOutputStream.
7172  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
7173  * @count: the number of bytes to write
7174  * @io_priority: the io priority of the request.
7175  * @cancellable: optional #GCancellable object, %NULL to ignore.
7176  * @callback: callback to call when the request is satisfied
7177  * @user_data: the data to pass to callback function
7178  *
7179  * Request an asynchronous write of @count bytes from @buffer into
7180  * the stream. When the operation is finished @callback will be called.
7181  * You can then call g_output_stream_write_finish() to get the result of the
7182  * operation.
7183  * During an async request no other sync and async calls are allowed,
7184  * and will result in %G_IO_ERROR_PENDING errors.
7185  * A value of @count larger than %G_MAXSSIZE will cause a
7186  * %G_IO_ERROR_INVALID_ARGUMENT error.
7187  * On success, the number of bytes written will be passed to the
7188  * requested size, as it can happen e.g. on a partial I/O error,
7189  * but generally we try to write as many bytes as requested.
7190  * You are guaranteed that this method will never fail with
7191  * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
7192  * method will just wait until this changes.
7193  * Any outstanding I/O request with higher priority (lower numerical
7194  * value) will be executed before an outstanding request with lower
7195  * priority. Default priority is %G_PRIORITY_DEFAULT.
7196  * The asyncronous methods have a default fallback that uses threads
7197  * to implement asynchronicity, so they are optional for inheriting
7198  * classes. However, if you override one you must override all.
7199  * For the synchronous, blocking version of this function, see
7200  * g_output_stream_write().
7201  */
7202
7203
7204 /**
7205  * g_socket_condition_wait:
7206  * @socket: a #GSocket
7207  * @condition: a #GIOCondition mask to wait for
7208  * @cancellable: a #GCancellable, or %NULL
7209  * @error: a #GError pointer, or %NULL
7210  *
7211  * Waits for @condition to become true on @socket. When the condition
7212  * is met, %TRUE is returned.
7213  * If @cancellable is cancelled before the condition is met, or if the
7214  * socket has a timeout set and it is reached before the condition is
7215  * met, then %FALSE is returned and @error, if non-%NULL, is set to
7216  * the appropriate value (%G_IO_ERROR_CANCELLED or
7217  * %G_IO_ERROR_TIMED_OUT).
7218  *
7219  * Returns: %TRUE if the condition was met, %FALSE otherwise
7220  * Since: 2.22
7221  */
7222
7223
7224 /**
7225  * g_dbus_message_to_gerror:
7226  * @message: A #GDBusMessage.
7227  * @error: The #GError to set.
7228  *
7229  * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
7230  * nothing and returns %FALSE.
7231  * Otherwise this method encodes the error in @message as a #GError
7232  * using g_dbus_error_set_dbus_error() using the information in the
7233  * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
7234  * well as the first string item in @message's body.
7235  *
7236  * Returns: %TRUE if @error was set, %FALSE otherwise.
7237  * Since: 2.26
7238  */
7239
7240
7241 /**
7242  * g_socket_client_connect_to_service_async:
7243  * @client: a #GSocketClient
7244  * @domain: a domain name
7245  * @service: the name of the service to connect to
7246  * @cancellable: a #GCancellable, or %NULL
7247  * @callback: a #GAsyncReadyCallback
7248  * @user_data: user data for the callback
7249  *
7250  * This is the asynchronous version of
7251  * g_socket_client_connect_to_service().
7252  *
7253  * Since: 2.22
7254  */
7255
7256
7257 /**
7258  * g_mount_operation_get_domain:
7259  * @op: a #GMountOperation.
7260  *
7261  * Gets the domain of the mount operation.
7262  *
7263  * Returns: a string set to the domain.
7264  */
7265
7266
7267 /**
7268  * g_file_info_get_display_name:
7269  * @info: a #GFileInfo.
7270  *
7271  * Gets a display name for a file.
7272  *
7273  * Returns: a string containing the display name.
7274  */
7275
7276
7277 /**
7278  * g_dbus_server_get_client_address:
7279  * @server: A #GDBusServer.
7280  *
7281  * Gets a D-Bus address string that can be used by clients to connect
7282  * to @server.
7283  * by @server.
7284  *
7285  * Returns: A D-Bus address string. Do not free, the string is owned
7286  * Since: 2.26
7287  */
7288
7289
7290 /**
7291  * g_socket_client_connect_to_service:
7292  * @client: a #GSocketConnection
7293  * @domain: a domain name
7294  * @service: the name of the service to connect to
7295  * @cancellable: a #GCancellable, or %NULL
7296  * @error: a pointer to a #GError, or %NULL
7297  * @returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
7298  *
7299  * Attempts to create a TCP connection to a service.
7300  * This call looks up the SRV record for @service at @domain for the
7301  * "tcp" protocol.  It then attempts to connect, in turn, to each of
7302  * the hosts providing the service until either a connection succeeds
7303  * or there are no hosts remaining.
7304  * Upon a successful connection, a new #GSocketConnection is constructed
7305  * and returned.  The caller owns this new object and must drop their
7306  * reference to it when finished with it.
7307  * In the event of any failure (DNS error, service not found, no hosts
7308  * connectable) %NULL is returned and @error (if non-%NULL) is set
7309  * accordingly.
7310  */
7311
7312
7313 /**
7314  * g_dbus_connection_register_subtree:
7315  * @connection: A #GDBusConnection.
7316  * @object_path: The object path to register the subtree at.
7317  * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
7318  * @flags: Flags used to fine tune the behavior of the subtree.
7319  * @user_data: Data to pass to functions in @vtable.
7320  * @user_data_free_func: Function to call when the subtree is unregistered.
7321  * @error: Return location for error or %NULL.
7322  *
7323  * Registers a whole subtree of <quote>dynamic</quote> objects.
7324  * The @enumerate and @introspection functions in @vtable are used to
7325  * convey, to remote callers, what nodes exist in the subtree rooted
7326  * by @object_path.
7327  * When handling remote calls into any node in the subtree, first the
7328  * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
7329  * the @introspection function is used to check if the node supports the
7330  * requested method. If so, the @dispatch function is used to determine
7331  * where to dispatch the call. The collected #GDBusInterfaceVTable and
7332  * #gpointer will be used to call into the interface vtable for processing
7333  * the request.
7334  * All calls into user-provided code will be invoked in the <link
7335  * linkend="g-main-context-push-thread-default">thread-default main
7336  * loop</link> of the thread you are calling this method from.
7337  * If an existing subtree is already registered at @object_path or
7338  * then @error is set to #G_IO_ERROR_EXISTS.
7339  * Note that it is valid to register regular objects (using
7340  * g_dbus_connection_register_object()) in a subtree registered with
7341  * g_dbus_connection_register_subtree() - if so, the subtree handler
7342  * is tried as the last resort. One way to think about a subtree
7343  * handler is to consider it a <quote>fallback handler</quote>
7344  * for object paths not registered via g_dbus_connection_register_object()
7345  * or other bindings.
7346  * Note that @vtable will be copied so you cannot change it after
7347  * registration.
7348  * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
7349  * that can be used with g_dbus_connection_unregister_subtree() .
7350  *
7351  * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
7352  * Since: 2.26
7353  */
7354
7355
7356 /**
7357  * SECTION:gseekabl:
7358  * @short_description: Stream seeking interface
7359  * @include: gio/gio.h
7360  * @see_also: #GInputStream, #GOutputStream
7361  *
7362  * #GSeekable is implemented by streams (implementations of
7363  * #GInputStream or #GOutputStream) that support seeking.
7364  */
7365
7366
7367 /**
7368  * g_mount_get_drive:
7369  * @mount: a #GMount.
7370  *
7371  * Gets the drive for the @mount.
7372  * This is a convenience method for getting the #GVolume and then
7373  * using that object to get the #GDrive.
7374  * The returned object should be unreffed with
7375  * g_object_unref() when no longer needed.
7376  *
7377  * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
7378  */
7379
7380
7381 /**
7382  * g_file_get_parse_name:
7383  * @file: input #GFile.
7384  *
7385  * Gets the parse name of the @file.
7386  * A parse name is a UTF-8 string that describes the
7387  * file such that one can get the #GFile back using
7388  * g_file_parse_name().
7389  * This is generally used to show the #GFile as a nice
7390  * full-pathname kind of string in a user interface,
7391  * like in a location entry.
7392  * For local files with names that can safely be converted
7393  * to UTF8 the pathname is used, otherwise the IRI is used
7394  * (a form of URI that allows UTF8 characters unescaped).
7395  * This call does no blocking i/o.
7396  * string should be freed with g_free() when no longer needed.
7397  *
7398  * Returns: a string containing the #GFile's parse name. The returned
7399  */
7400
7401
7402 /**
7403  * g_resolver_lookup_by_name_async:
7404  * @resolver: a #GResolver
7405  * @hostname: the hostname to look up the address of
7406  * @cancellable: a #GCancellable, or %NULL
7407  * @callback: callback to call after resolution completes
7408  * @user_data: data for @callback
7409  *
7410  * Begins asynchronously resolving @hostname to determine its
7411  * associated IP address(es), and eventually calls @callback, which
7412  * must call g_resolver_lookup_by_name_finish() to get the result.
7413  * See g_resolver_lookup_by_name() for more details.
7414  *
7415  * Since: 2.22
7416  */
7417
7418
7419 /**
7420  * SECTION:gfilteroutputstrea:
7421  * @short_description: Filter Output Stream
7422  * @include: gio/gio.h
7423  *
7424  * Base class for output stream implementations that perform some
7425  * kind of filtering operation on a base stream. Typical examples
7426  * of filtering operations are character set conversion, compression
7427  * and byte order flipping.
7428  */
7429
7430
7431 /**
7432  * g_file_equal:
7433  * @file1: the first #GFile.
7434  * @file2: the second #GFile.
7435  *
7436  * Checks equality of two given #GFile<!-- -->s. Note that two
7437  * #GFile<!-- -->s that differ can still refer to the same
7438  * file on the filesystem due to various forms of filename
7439  * aliasing.
7440  * This call does no blocking i/o.
7441  * %FALSE if either is not a #GFile.
7442  *
7443  * Returns: %TRUE if @file1 and @file2 are equal.
7444  */
7445
7446
7447 /**
7448  * g_file_set_attributes_async:
7449  * @file: input #GFile.
7450  * @info: a #GFileInfo.
7451  * @flags: a #GFileQueryInfoFlags.
7452  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
7453  * @cancellable: optional #GCancellable object, %NULL to ignore.
7454  * @callback: a #GAsyncReadyCallback.
7455  * @user_data: a #gpointer.
7456  *
7457  * Asynchronously sets the attributes of @file with @info.
7458  * For more details, see g_file_set_attributes_from_info() which is
7459  * the synchronous version of this call.
7460  * When the operation is finished, @callback will be called. You can then call
7461  * g_file_set_attributes_finish() to get the result of the operation.
7462  */
7463
7464
7465 /**
7466  * SECTION:gcharsetconverte:
7467  * @short_description: Convert between charsets
7468  * @include: gio/gio.h
7469  *
7470  * #GCharsetConverter is an implementation of #GConverter based on
7471  * GIConv.
7472  */
7473
7474
7475 /**
7476  * g_dbus_method_invocation_get_parameters:
7477  * @invocation: A #GDBusMethodInvocation.
7478  *
7479  * Gets the parameters of the method invocation.
7480  *
7481  * Returns: A #GVariant. Do not free, it is owned by @invocation.
7482  * Since: 2.26
7483  */
7484
7485
7486 /**
7487  * g_output_stream_close_async:
7488  * @stream: A #GOutputStream.
7489  * @io_priority: the io priority of the request.
7490  * @callback: callback to call when the request is satisfied
7491  * @user_data: the data to pass to callback function
7492  * @cancellable: optional cancellable object
7493  *
7494  * Requests an asynchronous close of the stream, releasing resources
7495  * related to it. When the operation is finished @callback will be
7496  * called. You can then call g_output_stream_close_finish() to get
7497  * the result of the operation.
7498  * For behaviour details see g_output_stream_close().
7499  * The asyncronous methods have a default fallback that uses threads
7500  * to implement asynchronicity, so they are optional for inheriting
7501  * classes. However, if you override one you must override all.
7502  */
7503
7504
7505 /**
7506  * g_dbus_message_to_blob:
7507  * @message: A #GDBusMessage.
7508  * @out_size: Return location for size of generated blob.
7509  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
7510  * @error: Return location for error.
7511  *
7512  * Serializes @message to a blob. The byte order returned by
7513  * g_dbus_message_get_byte_order() will be used.
7514  * generated by @message or %NULL if @error is set. Free with g_free().
7515  *
7516  * Returns: A pointer to a valid binary D-Bus message of @out_size bytes
7517  * Since: 2.26
7518  */
7519
7520
7521 /**
7522  * SECTION:giostrea:
7523  * @short_description: Base class for implementing read/write streams
7524  * @include: gio/gio.h
7525  * @see_also: #GInputStream, #GOutputStream
7526  *
7527  * GIOStream represents an object that has both read and write streams.
7528  * Generally the two streams acts as separate input and output streams,
7529  * but they share some common resources and state. For instance, for
7530  * seekable streams they may use the same position in both streams.
7531  * Examples of #GIOStream objects are #GSocketConnection which represents
7532  * a two-way network connection, and #GFileIOStream which represent a
7533  * file handle opened in read-write mode.
7534  * To do the actual reading and writing you need to get the substreams
7535  * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
7536  * The #GIOStream object owns the input and the output streams, not the other
7537  * way around, so keeping the substreams alive will not keep the #GIOStream
7538  * object alive. If the #GIOStream object is freed it will be closed, thus
7539  * closing the substream, so even if the substreams stay alive they will
7540  * always just return a %G_IO_ERROR_CLOSED for all operations.
7541  * To close a stream use g_io_stream_close() which will close the common
7542  * stream object and also the individual substreams. You can also close
7543  * the substreams themselves. In most cases this only marks the
7544  * substream as closed, so further I/O on it fails. However, some streams
7545  * may support "half-closed" states where one direction of the stream
7546  * is actually shut down.
7547  *
7548  * Since: 2.22
7549  */
7550
7551
7552 /**
7553  * g_socket_client_get_local_address:
7554  * @client: a #GSocketClient.
7555  *
7556  * Gets the local address of the socket client.
7557  * See g_socket_client_set_local_address() for details.
7558  *
7559  * Returns: (transfer none): a #GSocketAddres or %NULL. don't free
7560  * Since: 2.22
7561  */
7562
7563
7564 /**
7565  * g_data_input_stream_read_uint64:
7566  * @stream: a given #GDataInputStream.
7567  * @cancellable: optional #GCancellable object, %NULL to ignore.
7568  * @error: #GError for error reporting.
7569  *
7570  * Reads an unsigned 64-bit/8-byte value from @stream.
7571  * In order to get the correct byte order for this read operation,
7572  * see g_data_input_stream_get_byte_order().
7573  * If @cancellable is not %NULL, then the operation can be cancelled by
7574  * triggering the cancellable object from another thread. If the operation
7575  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
7576  * an error occurred.
7577  *
7578  * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
7579  */
7580
7581
7582 /**
7583  * g_proxy_connect:
7584  * @proxy: a #GProxy
7585  * @connection: a #GIOStream
7586  * @proxy_address: a #GProxyAddress
7587  * @cancellable: a #GCancellable
7588  * @error: return #GError
7589  *
7590  * Given @connection to communicate with a proxy (eg, a
7591  * #GSocketConnection that is connected to the proxy server), this
7592  * does the necessary handshake to connect to @proxy_address, and if
7593  * required, wraps the #GIOStream to handle proxy payload.
7594  * be the same as @connection, in which case a reference
7595  * will be added.
7596  *
7597  * Returns: (transfer full): a #GIOStream that will replace @connection. This might
7598  * Since: 2.26
7599  */
7600
7601
7602 /**
7603  * g_content_type_guess:
7604  * @filename: (allow-none): a string, or %NULL
7605  * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
7606  * @data_size: the size of @data
7607  * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
7608  *
7609  * Guesses the content type based on example data. If the function is
7610  * uncertain, @result_uncertain will be set to %TRUE. Either @filename
7611  * or @data may be %NULL, in which case the guess will be based solely
7612  * on the other argument.
7613  * given data. Free with g_free()
7614  *
7615  * Returns: a string indicating a guessed content type for the
7616  */
7617
7618
7619 /**
7620  * g_settings_backend_keys_changed:
7621  * @backend: a #GSettingsBackend implementation
7622  * @path: the path containing the changes
7623  * @items: the %NULL-terminated list of changed keys
7624  * @origin_tag: the origin tag
7625  *
7626  * Signals that a list of keys have possibly changed.  Backend
7627  * implementations should call this if keys have possibly changed their
7628  * values.
7629  * not containing '//').  Each string in @items must form a valid key
7630  * end with '/' and must not contain '//').
7631  * The meaning of this signal is that any of the key names resulting
7632  * from the contatenation of @path with each item in @items may have
7633  * changed.
7634  * The same rules for when notifications must occur apply as per
7635  * g_settings_backend_changed().  These two calls can be used
7636  * interchangeably if exactly one item has changed (although in that
7637  * case g_settings_backend_changed() is definitely preferred).
7638  * For efficiency reasons, the implementation should strive for @path to
7639  * keys that were changed) but this is not strictly required.
7640  *
7641  * Name when @path is prefixed to it (ie: each item must not start or
7642  * Be as long as possible (ie: the longest common prefix of all of the
7643  * Since: 2.26
7644  */
7645
7646
7647 /**
7648  * g_file_query_writable_namespaces:
7649  * @file: input #GFile.
7650  * @cancellable: optional #GCancellable object, %NULL to ignore.
7651  * @error: a #GError, or %NULL
7652  *
7653  * Obtain the list of attribute namespaces where new attributes
7654  * can be created by a user. An example of this is extended
7655  * attributes (in the "xattr" namespace).
7656  * If @cancellable is not %NULL, then the operation can be cancelled by
7657  * triggering the cancellable object from another thread. If the operation
7658  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
7659  * When you are done with it, release it with g_file_attribute_info_list_unref()
7660  *
7661  * Returns: a #GFileAttributeInfoList describing the writable namespaces.
7662  */
7663
7664
7665 /**
7666  * g_file_eject_mountable_with_operation:
7667  * @file: input #GFile.
7668  * @flags: flags affecting the operation
7669  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
7670  * @cancellable: optional #GCancellable object, %NULL to ignore.
7671  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
7672  * @user_data: the data to pass to callback function
7673  *
7674  * Starts an asynchronous eject on a mountable.
7675  * When this operation has completed, @callback will be called with
7676  * g_file_eject_mountable_with_operation_finish().
7677  * If @cancellable is not %NULL, then the operation can be cancelled by
7678  * triggering the cancellable object from another thread. If the operation
7679  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
7680  *
7681  * Since: 2.22
7682  */
7683
7684
7685 /**
7686  * g_dbus_message_new_method_error_valist:
7687  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
7688  * @error_name: A valid D-Bus error name.
7689  * @error_message_format: The D-Bus error message in a printf() format.
7690  * @var_args: Arguments for @error_message_format.
7691  *
7692  * Like g_dbus_message_new_method_error() but intended for language bindings.
7693  *
7694  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
7695  * Since: 2.26
7696  */
7697
7698
7699 /**
7700  * g_socket_set_listen_backlog:
7701  * @socket: a #GSocket.
7702  * @backlog: the maximum number of pending connections.
7703  *
7704  * Sets the maximum number of outstanding connections allowed
7705  * when listening on this socket. If more clients than this are
7706  * connecting to the socket and the application is not handling them
7707  * on time then the new connections will be refused.
7708  * Note that this must be called before g_socket_listen() and has no
7709  * effect if called after that.
7710  *
7711  * Since: 2.22
7712  */
7713
7714
7715 /**
7716  * g_proxy_resolver_get_default:
7717  *
7718  * Gets the default #GProxyResolver for the system.
7719  *
7720  * Returns: (transfer none): the default #GProxyResolver.
7721  * Since: 2.26
7722  */
7723
7724
7725 /**
7726  * g_settings_delay:
7727  * @settings: a #GSettings object
7728  *
7729  * Changes the #GSettings object into 'delay-apply' mode. In this
7730  * mode, changes to @settings are not immediately propagated to the
7731  * backend, but kept locally until g_settings_apply() is called.
7732  *
7733  * Since: 2.26
7734  */
7735
7736
7737 /**
7738  * GMemoryOutputStream:destroy-function:
7739  *
7740  * Function called with the buffer as argument when the stream is destroyed.
7741  *
7742  * Since: 2.24
7743  */
7744
7745
7746 /**
7747  * SECTION:gwin32outputstrea:
7748  * @short_description: Streaming output operations for Windows file handles
7749  * @include: gio/gwin32outputstream.h
7750  * @see_also: #GOutputStream
7751  *
7752  * #GWin32OutputStream implements #GOutputStream for writing to a
7753  * Windows file handle.
7754  * Note that <filename>&lt;gio/gwin32outputstream.h&gt;</filename> belongs
7755  * to the Windows-specific GIO interfaces, thus you have to use the
7756  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
7757  */
7758
7759
7760 /**
7761  * g_file_monitor_is_cancelled:
7762  * @monitor: a #GFileMonitor
7763  *
7764  * Returns whether the monitor is canceled.
7765  *
7766  * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
7767  */
7768
7769
7770 /**
7771  * g_periodic_get_low_priority:
7772  * @periodic: a #GPeriodic clock
7773  *
7774  * Gets the priority level that #GPeriodic uses to check for mainloop
7775  * inactivity.  Other sources scheduled below this level of priority are
7776  * effectively ignored by #GPeriodic and may be starved.
7777  *
7778  * Returns: the low priority level
7779  * Since: 2.28
7780  */
7781
7782
7783 /**
7784  * g_file_set_attributes_from_info:
7785  * @file: input #GFile.
7786  * @info: a #GFileInfo.
7787  * @flags: #GFileQueryInfoFlags
7788  * @cancellable: optional #GCancellable object, %NULL to ignore.
7789  * @error: a #GError, or %NULL
7790  *
7791  * Tries to set all attributes in the #GFileInfo on the target values,
7792  * not stopping on the first error.
7793  * If there is any error during this operation then @error will be set to
7794  * the first error. Error on particular fields are flagged by setting
7795  * the "status" field in the attribute value to
7796  * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
7797  * further errors.
7798  * If @cancellable is not %NULL, then the operation can be cancelled by
7799  * triggering the cancellable object from another thread. If the operation
7800  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
7801  *
7802  * Returns: %TRUE if there was any error, %FALSE otherwise.
7803  */
7804
7805
7806 /**
7807  * g_settings_is_writable:
7808  * @settings: a #GSettings object
7809  * @name: the name of a key
7810  * @returns: %TRUE if the key @name is writable
7811  *
7812  * Finds out if a key can be written or not
7813  *
7814  * Since: 2.26
7815  */
7816
7817
7818 /**
7819  * g_file_create_async:
7820  * @file: input #GFile.
7821  * @flags: a set of #GFileCreateFlags.
7822  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
7823  * @cancellable: optional #GCancellable object, %NULL to ignore.
7824  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
7825  * @user_data: the data to pass to callback function
7826  *
7827  * Asynchronously creates a new file and returns an output stream for writing to it.
7828  * The file must not already exist.
7829  * For more details, see g_file_create() which is
7830  * the synchronous version of this call.
7831  * When the operation is finished, @callback will be called. You can then call
7832  * g_file_create_finish() to get the result of the operation.
7833  */
7834
7835
7836 /**
7837  * g_output_stream_splice_finish:
7838  * @stream: a #GOutputStream.
7839  * @result: a #GAsyncResult.
7840  * @error: a #GError location to store the error occuring, or %NULL to ignore.
7841  *
7842  * Finishes an asynchronous stream splice operation.
7843  *
7844  * Returns: a #gssize of the number of bytes spliced.
7845  */
7846
7847
7848 /**
7849  * g_socket_shutdown:
7850  * @socket: a #GSocket
7851  * @shutdown_read: whether to shut down the read side
7852  * @shutdown_write: whether to shut down the write side
7853  * @error: #GError for error reporting, or %NULL to ignore.
7854  *
7855  * Shut down part of a full-duplex connection.
7856  * If @shutdown_read is %TRUE then the recieving side of the connection
7857  * is shut down, and further reading is disallowed.
7858  * If @shutdown_write is %TRUE then the sending side of the connection
7859  * is shut down, and further writing is disallowed.
7860  * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
7861  * One example where this is used is graceful disconnect for TCP connections
7862  * where you close the sending side, then wait for the other side to close
7863  * the connection, thus ensuring that the other side saw all sent data.
7864  *
7865  * Returns: %TRUE on success, %FALSE on error
7866  * Since: 2.22
7867  */
7868
7869
7870 /**
7871  * g_file_get_relative_path:
7872  * @parent: input #GFile.
7873  * @descendant: input #GFile.
7874  *
7875  * Gets the path for @descendant relative to @parent.
7876  * This call does no blocking i/o.
7877  * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
7878  * The returned string should be freed with g_free() when no longer needed.
7879  *
7880  * Returns: string with the relative path from @descendant
7881  */
7882
7883
7884 /**
7885  * g_simple_async_result_take_error:
7886  * @simple: a #GSimpleAsyncResult
7887  * @error: a #GError
7888  *
7889  * Sets the result from @error, and takes over the caller's ownership
7890  * of @error, so the caller does not need to free it any more.
7891  *
7892  * Since: 2.28
7893  */
7894
7895
7896 /**
7897  * g_unix_is_mount_path_system_internal:
7898  * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
7899  *
7900  * Determines if @mount_path is considered an implementation of the
7901  * OS. This is primarily used for hiding mountable and mounted volumes
7902  * that only are used in the OS and has little to no relevance to the
7903  * casual user.
7904  * of the OS.
7905  *
7906  * Returns: %TRUE if @mount_path is considered an implementation detail
7907  */
7908
7909
7910 /**
7911  * g_emblemed_icon_new:
7912  * @icon: a #GIcon
7913  * @emblem: (allow-none): a #GEmblem, or %NULL
7914  *
7915  * Creates a new emblemed icon for @icon with the emblem @emblem.
7916  *
7917  * Returns: (transfer full): a new #GIcon
7918  * Since: 2.18
7919  */
7920
7921
7922 /**
7923  * g_file_eject_mountable_finish:
7924  * @file: input #GFile.
7925  * @result: a #GAsyncResult.
7926  * @error: a #GError, or %NULL
7927  *
7928  * Finishes an asynchronous eject operation started by
7929  * g_file_eject_mountable().
7930  * otherwise.
7931  *
7932  * Returns: %TRUE if the @file was ejected successfully. %FALSE
7933  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
7934  */
7935
7936
7937 /**
7938  * g_local_vfs_new:
7939  *
7940  * Returns a new #GVfs handle for a local vfs.
7941  *
7942  * Returns: a new #GVfs handle.
7943  */
7944
7945
7946 /**
7947  * GDBusServer::new-connection:
7948  * @server: The #GDBusServer emitting the signal.
7949  * @connection: A #GDBusConnection for the new connection.
7950  *
7951  * Emitted when a new authenticated connection has been made. Use
7952  * g_dbus_connection_get_peer_credentials() to figure out what
7953  * identity (if any), was authenticated.
7954  * If you want to accept the connection, take a reference to the
7955  * connection call g_dbus_connection_close() and give up your
7956  * reference. Note that the other peer may disconnect at any time -
7957  * a typical thing to do when accepting a connection is to listen to
7958  * the #GDBusConnection::closed signal.
7959  * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
7960  * then the signal is emitted in a new thread dedicated to the
7961  * connection. Otherwise the signal is emitted in the <link
7962  * linkend="g-main-context-push-thread-default">thread-default main
7963  * loop</link> of the thread that @server was constructed in.
7964  * You are guaranteed that signal handlers for this signal runs
7965  * before incoming messages on @connection are processed. This means
7966  * that it's suitable to call g_dbus_connection_register_object() or
7967  * similar from the signal handler.
7968  * run.
7969  *
7970  * Returns: %TRUE to claim @connection, %FALSE to let other handlers
7971  * Since: 2.26
7972  */
7973
7974
7975 /**
7976  * g_action_group_action_added:
7977  * @action_group: a #GActionGroup
7978  * @action_name: the name of an action in the group
7979  *
7980  * Emits the #GActionGroup::action-added signal on @action_group.
7981  * This function should only be called by #GActionGroup implementations.
7982  *
7983  * Since: 2.28
7984  */
7985
7986
7987 /**
7988  * g_output_stream_has_pending:
7989  * @stream: a #GOutputStream.
7990  *
7991  * Checks if an ouput stream has pending actions.
7992  *
7993  * Returns: %TRUE if @stream has pending actions.
7994  */
7995
7996
7997 /**
7998  * GDBusConnection:capabilities:
7999  *
8000  * Flags from the #GDBusCapabilityFlags enumeration
8001  * representing connection features negotiated with the other peer.
8002  *
8003  * Since: 2.26
8004  */
8005
8006
8007 /**
8008  * g_dbus_error_unregister_error:
8009  * @error_domain: A #GQuark for a error domain.
8010  * @error_code: An error code.
8011  * @dbus_error_name: A D-Bus error name.
8012  *
8013  * Destroys an association previously set up with g_dbus_error_register_error().
8014  *
8015  * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
8016  * Since: 2.26
8017  */
8018
8019
8020 /**
8021  * SECTION:gcancellabl:
8022  * @short_description: Thread-safe Operation Cancellation Stack
8023  * @include: gio/gio.h
8024  *
8025  * GCancellable is a thread-safe operation cancellation stack used
8026  * throughout GIO to allow for cancellation of synchronous and
8027  * asynchronous operations.
8028  */
8029
8030
8031 /**
8032  * g_buffered_input_stream_peek:
8033  * @stream: a #GBufferedInputStream
8034  * @buffer: a pointer to an allocated chunk of memory
8035  * @offset: a #gsize
8036  * @count: a #gsize
8037  *
8038  * Peeks in the buffer, copying data of size @count into @buffer,
8039  * offset @offset bytes.
8040  *
8041  * Returns: a #gsize of the number of bytes peeked, or -1 on error.
8042  */
8043
8044
8045 /**
8046  * g_file_is_native:
8047  * @file: input #GFile.
8048  *
8049  * Checks to see if a file is native to the platform.
8050  * A native file s one expressed in the platform-native filename format,
8051  * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
8052  * as it might be on a locally mounted remote filesystem.
8053  * On some systems non-native files may be available using
8054  * the native filesystem via a userspace filesystem (FUSE), in
8055  * these cases this call will return %FALSE, but g_file_get_path()
8056  * will still return a native path.
8057  * This call does no blocking i/o.
8058  *
8059  * Returns: %TRUE if file is native.
8060  */
8061
8062
8063 /**
8064  * g_file_set_attribute_uint64:
8065  * @file: input #GFile.
8066  * @attribute: a string containing the attribute's name.
8067  * @value: a #guint64 containing the attribute's new value.
8068  * @flags: a #GFileQueryInfoFlags.
8069  * @cancellable: optional #GCancellable object, %NULL to ignore.
8070  * @error: a #GError, or %NULL
8071  *
8072  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
8073  * If @attribute is of a different type, this operation will fail.
8074  * If @cancellable is not %NULL, then the operation can be cancelled by
8075  * triggering the cancellable object from another thread. If the operation
8076  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
8077  * in the @file, %FALSE otherwise.
8078  *
8079  * Returns: %TRUE if the @attribute was successfully set to @value
8080  */
8081
8082
8083 /**
8084  * g_output_stream_flush_finish:
8085  * @stream: a #GOutputStream.
8086  * @result: a GAsyncResult.
8087  * @error: a #GError location to store the error occuring, or %NULL to ignore.
8088  *
8089  * Finishes flushing an output stream.
8090  *
8091  * Returns: %TRUE if flush operation suceeded, %FALSE otherwise.
8092  */
8093
8094
8095 /**
8096  * g_volume_get_icon:
8097  * @volume: a #GVolume.
8098  *
8099  * Gets the icon for @volume.
8100  * The returned object should be unreffed with g_object_unref()
8101  * when no longer needed.
8102  *
8103  * Returns: (transfer full): a #GIcon.
8104  */
8105
8106
8107 /**
8108  * GMountOperation::aborted:
8109  *
8110  * Emitted by the backend when e.g. a device becomes unavailable
8111  * while a mount operation is in progress.
8112  * Implementations of GMountOperation should handle this signal
8113  * by dismissing open password dialogs.
8114  *
8115  * Since: 2.20
8116  */
8117
8118
8119 /**
8120  * g_charset_converter_get_use_fallback:
8121  * @converter: a #GCharsetConverter
8122  *
8123  * Gets the #GCharsetConverter:use-fallback property.
8124  *
8125  * Returns: %TRUE if fallbacks are used by @converter
8126  * Since: 2.24
8127  */
8128
8129
8130 /**
8131  * g_win32_output_stream_set_close_handle:
8132  * @stream: a #GWin32OutputStream
8133  * @close_handle: %TRUE to close the handle when done
8134  *
8135  * Sets whether the handle of @stream shall be closed when the stream
8136  * is closed.
8137  *
8138  * Since: 2.26
8139  */
8140
8141
8142 /**
8143  * g_converter_convert:
8144  * @converter: a #GConverter.
8145  * @inbuf: the buffer containing the data to convert.
8146  * @inbuf_size: the number of bytes in @inbuf
8147  * @outbuf: a buffer to write converted data in.
8148  * @outbuf_size: the number of bytes in @outbuf, must be at least one
8149  * @flags: a #GConvertFlags controlling the conversion details
8150  * @bytes_read: will be set to the number of bytes read from @inbuf on success
8151  * @bytes_written: will be set to the number of bytes written to @outbuf on success
8152  * @error: location to store the error occuring, or %NULL to ignore
8153  *
8154  * This is the main operation used when converting data. It is to be called
8155  * multiple times in a loop, and each time it will do some work, i.e.
8156  * producing some output (in @outbuf) or consuming some input (from @inbuf) or
8157  * both. If its not possible to do any work an error is returned.
8158  * Note that a single call may not consume all input (or any input at all).
8159  * Also a call may produce output even if given no input, due to state stored
8160  * in the converter producing output.
8161  * If any data was either produced or consumed, and then an error happens, then
8162  * only the successful conversion is reported and the error is returned on the
8163  * next call.
8164  * A full conversion loop involves calling this method repeatedly, each time
8165  * giving it new input and space output space. When there is no more input
8166  * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
8167  * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
8168  * each time until all data is consumed and all output is produced, then
8169  * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
8170  * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
8171  * in a decompression converter where the end of data is detectable from the
8172  * data (and there might even be other data after the end of the compressed data).
8173  * When some data has successfully been converted @bytes_read and is set to
8174  * the number of bytes read from @inbuf, and @bytes_written is set to indicate
8175  * how many bytes was written to @outbuf. If there are more data to output
8176  * or consume (i.e. unless the G_CONVERTER_INPUT_AT_END is specified) then
8177  * G_CONVERTER_CONVERTED is returned, and if no more data is to be output
8178  * then G_CONVERTER_FINISHED is returned.
8179  * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
8180  * Some errors need special handling:
8181  * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
8182  * to write the resulting converted data, the application should
8183  * call the function again with a larger @outbuf to continue.
8184  * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
8185  * input to fully determine what the conversion should produce,
8186  * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
8187  * example with an incomplete multibyte sequence when converting text,
8188  * or when a regexp matches up to the end of the input (and may match
8189  * further input). It may also happen when @inbuf_size is zero and
8190  * there is no more data to produce.
8191  * When this happens the application should read more input and then
8192  * call the function again. If further input shows that there is no
8193  * more data call the function again with the same data but with
8194  * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
8195  * to finish as e.g. in the regexp match case (or, to fail again with
8196  * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
8197  * input is actually partial).
8198  * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
8199  * converter object is in an invalid state where its not allowed
8200  * to call g_converter_convert() anymore. At this time you can only
8201  * free the object or call g_converter_reset() to reset it to the
8202  * initial state.
8203  * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
8204  * to try to write out all internal state to the output. The application
8205  * has to call the function multiple times with the flag set, and when
8206  * the availible input has been consumed and all internal state has
8207  * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
8208  * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
8209  * This is somewhat similar to what happens at the end of the input stream,
8210  * but done in the middle of the data.
8211  * This has different meanings for different conversions. For instance
8212  * in a compression converter it would mean that we flush all the
8213  * compression state into output such that if you uncompress the
8214  * compressed data you get back all the input data. Doing this may
8215  * make the final file larger due to padding though. Another example
8216  * is a regexp conversion, where if you at the end of the flushed data
8217  * have a match, but there is also a potential longer match. In the
8218  * non-flushed case we would ask for more input, but when flushing we
8219  * treat this as the end of input and do the match.
8220  * Flushing is not always possible (like if a charset converter flushes
8221  * at a partial multibyte sequence). Converters are supposed to try
8222  * to produce as much output as possible and then return an error
8223  * (typically %G_IO_ERROR_PARTIAL_INPUT).
8224  *
8225  * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
8226  * Since: 2.24
8227  */
8228
8229
8230 /**
8231  * g_unix_mounts_changed_since:
8232  * @time: guint64 to contain a timestamp.
8233  *
8234  * Checks if the unix mounts have changed since a given unix time.
8235  *
8236  * Returns: %TRUE if the mounts have changed since @time.
8237  */
8238
8239
8240 /**
8241  * GAction:state:
8242  *
8243  * The state of the action, or %NULL if the action is stateless.
8244  *
8245  * Since: 2.28
8246  */
8247
8248
8249 /**
8250  * g_file_info_get_attribute_int64:
8251  * @info: a #GFileInfo.
8252  * @attribute: a file attribute key.
8253  *
8254  * Gets a signed 64-bit integer contained within the attribute. If the
8255  * attribute does not contain an signed 64-bit integer, or is invalid,
8256  * 0 will be returned.
8257  *
8258  * Returns: a signed 64-bit integer from the attribute.
8259  */
8260
8261
8262 /**
8263  * g_unix_socket_address_get_is_abstract:
8264  * @address: a #GInetSocketAddress
8265  *
8266  * Tests if @address is abstract.
8267  *
8268  * Returns: %TRUE if the address is abstract, %FALSE otherwise
8269  * Since: 2.22
8270  * Deprecated: Use g_unix_socket_address_get_address_type()
8271  */
8272
8273
8274 /**
8275  * g_io_extension_get_name:
8276  * @extension: a #GIOExtension
8277  *
8278  * Gets the name under which @extension was registered.
8279  * Note that the same type may be registered as extension
8280  * for multiple extension points, under different names.
8281  *
8282  * Returns: the name of @extension.
8283  */
8284
8285
8286 /**
8287  * g_settings_backend_changed_tree:
8288  * @backend: a #GSettingsBackend implementation
8289  * @tree: a #GTree containing the changes
8290  * @origin_tag: the origin tag
8291  *
8292  * This call is a convenience wrapper.  It gets the list of changes from
8293  * g_settings_backend_changed().
8294  *
8295  * Since: 2.26
8296  */
8297
8298
8299 /**
8300  * g_socket_client_connect_to_host:
8301  * @client: a #GSocketClient
8302  * @host_and_port: the name and optionally port of the host to connect to
8303  * @default_port: the default port to connect to
8304  * @cancellable: a #GCancellable, or %NULL
8305  * @error: a pointer to a #GError, or %NULL
8306  *
8307  * This is a helper function for g_socket_client_connect().
8308  * Attempts to create a TCP connection to the named host.
8309  * address, an IPv4 address, or a domain name (in which case a DNS
8310  * lookup is performed).  Quoting with [] is supported for all address
8311  * types.  A port override may be specified in the usual way with a
8312  * colon.  Ports may be given as decimal numbers or symbolic names (in
8313  * which case an /etc/services lookup is performed).
8314  * If no port override is given in @host_and_port then @default_port will be
8315  * used as the port number to connect to.
8316  * In general, @host_and_port is expected to be provided by the user (allowing
8317  * them to give the hostname, and a port overide if necessary) and
8318  * In the case that an IP address is given, a single connection
8319  * attempt is made.  In the case that a name is given, multiple
8320  * connection attempts may be made, in turn and according to the
8321  * number of address records in DNS, until a connection succeeds.
8322  * Upon a successful connection, a new #GSocketConnection is constructed
8323  * and returned.  The caller owns this new object and must drop their
8324  * reference to it when finished with it.
8325  * In the event of any failure (DNS error, service not found, no hosts
8326  * connectable) %NULL is returned and @error (if non-%NULL) is set
8327  * accordingly.
8328  *
8329  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
8330  * Since: 2.22
8331  */
8332
8333
8334 /**
8335  * g_srv_target_new:
8336  * @hostname: the host that the service is running on
8337  * @port: the port that the service is running on
8338  * @priority: the target's priority
8339  * @weight: the target's weight
8340  *
8341  * Creates a new #GSrvTarget with the given parameters.
8342  * You should not need to use this; normally #GSrvTarget<!-- -->s are
8343  * created by #GResolver.
8344  *
8345  * Returns: a new #GSrvTarget.
8346  * Since: 2.22
8347  */
8348
8349
8350 /**
8351  * SECTION:gunixsocketaddres:
8352  * @short_description: UNIX GSocketAddress
8353  * @include: gio/gunixsocketaddress.h
8354  *
8355  * Support for UNIX-domain (also known as local) sockets.
8356  * UNIX domain sockets are generally visible in the filesystem.
8357  * However, some systems support abstract socket names which are not
8358  * visible in the filesystem and not affected by the filesystem
8359  * permissions, visibility, etc. Currently this is only supported
8360  * under Linux. If you attempt to use abstract sockets on other
8361  * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
8362  * errors. You can use g_unix_socket_address_abstract_names_supported()
8363  * to see if abstract names are supported.
8364  * Note that <filename>&lt;gio/gunixsocketaddress.h&gt;</filename> belongs to
8365  * the UNIX-specific GIO interfaces, thus you have to use the
8366  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
8367  */
8368
8369
8370 /**
8371  * g_vfs_get_file_for_uri:
8372  * @vfs: a#GVfs.
8373  * @uri: a string containing a URI
8374  *
8375  * Gets a #GFile for @uri.
8376  * This operation never fails, but the returned object
8377  * might not support any I/O operation if the URI
8378  * is malformed or if the URI scheme is not supported.
8379  * Free the returned object with g_object_unref().
8380  *
8381  * Returns: (transfer full): a #GFile.
8382  */
8383
8384
8385 /**
8386  * SECTION:gbufferedoutputstrea:
8387  * @short_description: Buffered Output Stream
8388  * @include: gio/gio.h
8389  * @see_also: #GFilterOutputStream, #GOutputStream
8390  *
8391  * Buffered output stream implements #GFilterOutputStream and provides
8392  * for buffered writes.
8393  * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
8394  * To create a buffered output stream, use g_buffered_output_stream_new(),
8395  * or g_buffered_output_stream_new_sized() to specify the buffer's size
8396  * at construction.
8397  * To get the size of a buffer within a buffered input stream, use
8398  * g_buffered_output_stream_get_buffer_size(). To change the size of a
8399  * buffered output stream's buffer, use
8400  * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
8401  * size cannot be reduced below the size of the data within the buffer.
8402  */
8403
8404
8405 /**
8406  * g_action_group_change_action_state:
8407  * @action_group: a #GActionGroup
8408  * @action_name: the name of the action to request the change on
8409  * @value: the new state
8410  *
8411  * Request for the state of the named action within @action_group to be
8412  * changed to @value.
8413  * The action must be stateful and @value must be of the correct type.
8414  * See g_action_group_get_state_type().
8415  * This call merely requests a change.  The action may refuse to change
8416  * its state or may change its state to something other than @value.
8417  * See g_action_group_get_state_hint().
8418  * If the @value GVariant is floating, it is consumed.
8419  *
8420  * Since: 2.28
8421  */
8422
8423
8424 /**
8425  * g_bus_get_sync:
8426  * @bus_type: A #GBusType.
8427  * @cancellable: A #GCancellable or %NULL.
8428  * @error: Return location for error or %NULL.
8429  *
8430  * Synchronously connects to the message bus specified by @bus_type.
8431  * Note that the returned object may shared with other callers,
8432  * e.g. if two separate parts of a process calls this function with
8433  * the same @bus_type, they will share the same object.
8434  * This is a synchronous failable function. See g_bus_get() and
8435  * g_bus_get_finish() for the asynchronous version.
8436  * The returned object is a singleton, that is, shared with other
8437  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
8438  * event that you need a private message bus connection, use
8439  * g_dbus_address_get_for_bus_sync() and
8440  * g_dbus_connection_new_for_address().
8441  * Note that the returned #GDBusConnection object will (usually) have
8442  * the #GDBusConnection:exit-on-close property set to %TRUE.
8443  *
8444  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
8445  * Since: 2.26
8446  */
8447
8448
8449 /**
8450  * g_file_unmount_mountable:
8451  * @file: input #GFile.
8452  * @flags: flags affecting the operation
8453  * @cancellable: optional #GCancellable object, %NULL to ignore.
8454  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
8455  * @user_data: the data to pass to callback function
8456  *
8457  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
8458  * If @cancellable is not %NULL, then the operation can be cancelled by
8459  * triggering the cancellable object from another thread. If the operation
8460  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
8461  * When the operation is finished, @callback will be called. You can then call
8462  * g_file_unmount_mountable_finish() to get the result of the operation.
8463  *
8464  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
8465  */
8466
8467
8468 /**
8469  * g_network_address_get_port:
8470  * @addr: a #GNetworkAddress
8471  *
8472  * Gets @addr's port number
8473  *
8474  * Returns: @addr's port (which may be 0)
8475  * Since: 2.22
8476  */
8477
8478
8479 /**
8480  * g_dbus_proxy_call:
8481  * @proxy: A #GDBusProxy.
8482  * @method_name: Name of method to invoke.
8483  * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
8484  * @flags: Flags from the #GDBusCallFlags enumeration.
8485  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
8486  * @cancellable: A #GCancellable or %NULL.
8487  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
8488  * @user_data: The data to pass to @callback.
8489  *
8490  * Asynchronously invokes the @method_name method on @proxy.
8491  * If @method_name contains any dots, then @name is split into interface and
8492  * method name parts. This allows using @proxy for invoking methods on
8493  * other interfaces.
8494  * If the #GDBusConnection associated with @proxy is closed then
8495  * the operation will fail with %G_IO_ERROR_CLOSED. If
8496  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
8497  * compatible with the D-Bus protocol, the operation fails with
8498  * %G_IO_ERROR_INVALID_ARGUMENT.
8499  * If the @parameters #GVariant is floating, it is consumed. This allows
8500  * convenient 'inline' use of g_variant_new(), e.g.:
8501  * |[
8502  * g_dbus_proxy_call (proxy,
8503  * "TwoStrings",
8504  * g_variant_new ("(ss)",
8505  * "Thing One",
8506  * "Thing Two"),
8507  * G_DBUS_CALL_FLAGS_NONE,
8508  * -1,
8509  * NULL,
8510  * (GAsyncReadyCallback) two_strings_done,
8511  * &amp;data);
8512  * ]|
8513  * This is an asynchronous method. When the operation is finished,
8514  * <link linkend="g-main-context-push-thread-default">thread-default
8515  * main loop</link> of the thread you are calling this method from.
8516  * You can then call g_dbus_proxy_call_finish() to get the result of
8517  * the operation. See g_dbus_proxy_call_sync() for the synchronous
8518  * version of this method.
8519  *
8520  * Since: 2.26
8521  */
8522
8523
8524 /**
8525  * GApplication::open:
8526  * @application: the application
8527  * @files: an array of #GFile objects
8528  * @n_files: the length of @files
8529  * @hint: a hint provided by the calling instance
8530  *
8531  * The ::open signal is emitted on the primary instance when there are
8532  * files to open. See g_application_open() for more information.
8533  */
8534
8535
8536 /**
8537  * g_dbus_proxy_new_finish:
8538  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
8539  * @error: Return location for error or %NULL.
8540  *
8541  * Finishes creating a #GDBusProxy.
8542  *
8543  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
8544  * Since: 2.26
8545  */
8546
8547
8548 /**
8549  * g_socket_client_set_local_address:
8550  * @client: a #GSocketClient.
8551  * @address: a #GSocketAddress, or %NULL
8552  *
8553  * Sets the local address of the socket client.
8554  * The sockets created by this object will bound to the
8555  * specified address (if not %NULL) before connecting.
8556  * This is useful if you want to ensure the the local
8557  * side of the connection is on a specific port, or on
8558  * a specific interface.
8559  *
8560  * Since: 2.22
8561  */
8562
8563
8564 /**
8565  * g_input_stream_has_pending:
8566  * @stream: input stream.
8567  *
8568  * Checks if an input stream has pending actions.
8569  *
8570  * Returns: %TRUE if @stream has pending actions.
8571  */
8572
8573
8574 /**
8575  * g_dbus_connection_send_message_with_reply:
8576  * @connection: A #GDBusConnection.
8577  * @message: A #GDBusMessage.
8578  * @flags: Flags affecting how the message is sent.
8579  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
8580  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
8581  * @cancellable: A #GCancellable or %NULL.
8582  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
8583  * @user_data: The data to pass to @callback.
8584  *
8585  * Asynchronously sends @message to the peer represented by @connection.
8586  * Unless @flags contain the
8587  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
8588  * will be assigned by @connection and set on @message via
8589  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
8590  * serial number used will be written to this location prior to
8591  * submitting the message to the underlying transport.
8592  * If @connection is closed then the operation will fail with
8593  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
8594  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
8595  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
8596  * This is an asynchronous method. When the operation is finished, @callback will be invoked
8597  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
8598  * of the thread you are calling this method from. You can then call
8599  * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
8600  * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
8601  * Note that @message must be unlocked, unless @flags contain the
8602  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
8603  * See <xref linkend="gdbus-server"/> and <xref
8604  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
8605  * low-level API to send and receive UNIX file descriptors.
8606  *
8607  * Since: 2.26
8608  */
8609
8610
8611 /**
8612  * g_file_info_get_attribute_byte_string:
8613  * @info: a #GFileInfo.
8614  * @attribute: a file attribute key.
8615  *
8616  * Gets the value of a byte string attribute. If the attribute does
8617  * not contain a byte string, %NULL will be returned.
8618  * %NULL otherwise.
8619  *
8620  * Returns: the contents of the @attribute value as a byte string, or
8621  */
8622
8623
8624 /**
8625  * g_socket_get_credentials:
8626  * @socket: a #GSocket.
8627  * @error: #GError for error reporting, or %NULL to ignore.
8628  *
8629  * Returns the credentials of the foreign process connected to this
8630  * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
8631  * sockets).
8632  * If this operation isn't supported on the OS, the method fails with
8633  * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
8634  * by reading the %SO_PEERCRED option on the underlying socket.
8635  * Other ways to obtain credentials from a foreign peer includes the
8636  * #GUnixCredentialsMessage type and
8637  * g_unix_connection_send_credentials() /
8638  * g_unix_connection_receive_credentials() functions.
8639  * that must be freed with g_object_unref().
8640  *
8641  * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
8642  * Since: 2.26
8643  */
8644
8645
8646 /**
8647  * GVolumeMonitor::volume-changed:
8648  * @volume_monitor: The volume monitor emitting the signal.
8649  * @volume: a #GVolume that changed.
8650  *
8651  * Emitted when mountable volume is changed.
8652  */
8653
8654
8655 /**
8656  * g_dbus_proxy_new_for_bus_sync:
8657  * @bus_type: A #GBusType.
8658  * @flags: Flags used when constructing the proxy.
8659  * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
8660  * @name: A bus name (well-known or unique).
8661  * @object_path: An object path.
8662  * @interface_name: A D-Bus interface name.
8663  * @cancellable: A #GCancellable or %NULL.
8664  * @error: Return location for error or %NULL.
8665  *
8666  * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
8667  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
8668  *
8669  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
8670  * Since: 2.26
8671  */
8672
8673
8674 /**
8675  * GVolume::changed:
8676  *
8677  * Emitted when the volume has been changed.
8678  */
8679
8680
8681 /**
8682  * g_buffered_output_stream_set_auto_grow:
8683  * @stream: a #GBufferedOutputStream.
8684  * @auto_grow: a #gboolean.
8685  *
8686  * Sets whether or not the @stream's buffer should automatically grow.
8687  * If @auto_grow is true, then each write will just make the buffer
8688  * larger, and you must manually flush the buffer to actually write out
8689  * the data to the underlying stream.
8690  */
8691
8692
8693 /**
8694  * g_memory_output_stream_get_size:
8695  * @ostream: a #GMemoryOutputStream
8696  *
8697  * Gets the size of the currently allocated data area (availible from
8698  * g_memory_output_stream_get_data()). If the stream isn't
8699  * growable (no realloc was passed to g_memory_output_stream_new()) then
8700  * this is the maximum size of the stream and further writes
8701  * will return %G_IO_ERROR_NO_SPACE.
8702  * Note that for growable streams the returned size may become invalid on
8703  * the next write or truncate operation on the stream.
8704  * If you want the number of bytes currently written to the stream, use
8705  * g_memory_output_stream_get_data_size().
8706  *
8707  * Returns: the number of bytes allocated for the data buffer
8708  */
8709
8710
8711 /**
8712  * GMount::unmounted:
8713  * @mount: the object on which the signal is emitted
8714  *
8715  * This signal is emitted when the #GMount have been
8716  * unmounted. If the recipient is holding references to the
8717  * object they should release them so the object can be
8718  * finalized.
8719  */
8720
8721
8722 /**
8723  * GMount::pre-unmount:
8724  * @mount: the object on which the signal is emitted
8725  *
8726  * This signal is emitted when the #GMount is about to be
8727  * unmounted.
8728  *
8729  * Since: 2.22
8730  */
8731
8732
8733 /**
8734  * g_dbus_connection_get_guid:
8735  * @connection: A #GDBusConnection.
8736  *
8737  * The GUID of the peer performing the role of server when
8738  * authenticating. See #GDBusConnection:guid for more details.
8739  *
8740  * Returns: The GUID. Do not free this string, it is owned by
8741  * Since: 2.26
8742  */
8743
8744
8745 /**
8746  * g_socket_connection_factory_register_type:
8747  * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
8748  * @family: a #GSocketFamily
8749  * @type: a #GSocketType
8750  * @protocol: a protocol id
8751  *
8752  * Looks up the #GType to be used when creating socket connections on
8753  * sockets with the specified @family,@type and @protocol.
8754  * If no type is registered, the #GSocketConnection base type is returned.
8755  *
8756  * Since: 2.22
8757  */
8758
8759
8760 /**
8761  * g_dbus_error_is_remote_error:
8762  * @error: A #GError.
8763  *
8764  * Checks if @error represents an error received via D-Bus from a remote peer. If so,
8765  * use g_dbus_error_get_remote_error() to get the name of the error.
8766  * %FALSE otherwise.
8767  *
8768  * Returns: %TRUE if @error represents an error from a remote peer,
8769  * Since: 2.26
8770  */
8771
8772
8773 /**
8774  * g_unix_mount_point_get_device_path:
8775  * @mount_point: a #GUnixMountPoint.
8776  *
8777  * Gets the device path for a unix mount point.
8778  *
8779  * Returns: a string containing the device path.
8780  */
8781
8782
8783 /**
8784  * g_socket_get_family:
8785  * @socket: a #GSocket.
8786  *
8787  * Gets the socket family of the socket.
8788  *
8789  * Returns: a #GSocketFamily
8790  * Since: 2.22
8791  */
8792
8793
8794 /**
8795  * g_app_info_get_executable:
8796  * @appinfo: a #GAppInfo
8797  *
8798  * Gets the executable's name for the installed application.
8799  * binaries name
8800  *
8801  * Returns: a string containing the @appinfo's application
8802  */
8803
8804
8805 /**
8806  * GDBusAuthObserver:
8807  *
8808  * The #GDBusAuthObserver structure contains only private data and
8809  * should only be accessed using the provided API.
8810  *
8811  * Since: 2.26
8812  */
8813
8814
8815 /**
8816  * g_settings_get_value:
8817  * @settings: a #GSettings object
8818  * @key: the key to get the value for
8819  * @returns: a new #GVariant
8820  *
8821  * Gets the value that is stored in @settings for @key.
8822  * It is a programmer error to give a @key that isn't contained in the
8823  * schema for @settings.
8824  *
8825  * Since: 2.26
8826  */
8827
8828
8829 /**
8830  * g_dbus_connection_close_finish:
8831  * @connection: A #GDBusConnection.
8832  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
8833  * @error: Return location for error or %NULL.
8834  *
8835  * Finishes an operation started with g_dbus_connection_close().
8836  *
8837  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
8838  * Since: 2.26
8839  */
8840
8841
8842 /**
8843  * g_settings_set_value:
8844  * @settings: a #GSettings object
8845  * @key: the name of the key to set
8846  * @value: a #GVariant of the correct type
8847  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
8848  *
8849  * Sets @key in @settings to @value.
8850  * It is a programmer error to give a @key that isn't contained in the
8851  * schema for @settings or for @value to have the incorrect type, per
8852  * the schema.
8853  * If @value is floating then this function consumes the reference.
8854  *
8855  * Since: 2.26
8856  */
8857
8858
8859 /**
8860  * g_action_get_state_type:
8861  * @action: a #GAction
8862  *
8863  * Queries the type of the state of @action.
8864  * g_action_new_stateful()) then this function returns the #GVariantType
8865  * of the state.  This is the type of the initial value given as the
8866  * state.  All calls to g_action_set_state() must give a #GVariant of
8867  * this type and g_action_get_state() will return a #GVariant of the
8868  * same type.
8869  * this function will return %NULL.  In that case, g_action_get_state()
8870  * will return %NULL and you must not call g_action_set_state().
8871  *
8872  * If the action is stateful (ie: was created with
8873  * If the action is not stateful (ie: created with g_action_new()) then
8874  * Returns: (allow-none): the state type, if the action is stateful
8875  * Since: 2.28
8876  */
8877
8878
8879 /**
8880  * g_input_stream_close_finish:
8881  * @stream: a #GInputStream.
8882  * @result: a #GAsyncResult.
8883  * @error: a #GError location to store the error occuring, or %NULL to ignore.
8884  *
8885  * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
8886  *
8887  * Returns: %TRUE if the stream was closed successfully.
8888  */
8889
8890
8891 /**
8892  * g_resolver_lookup_by_address_finish:
8893  * @resolver: a #GResolver
8894  * @result: the result passed to your #GAsyncReadyCallback
8895  * @error: return location for a #GError, or %NULL
8896  *
8897  * Retrieves the result of a previous call to
8898  * g_resolver_lookup_by_address_async().
8899  * If the DNS resolution failed, @error (if non-%NULL) will be set to
8900  * a value from #GResolverError. If the operation was cancelled,
8901  * form), or %NULL on error.
8902  *
8903  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
8904  * Since: 2.22
8905  */
8906
8907
8908 /**
8909  * mime_info_cache_reload:
8910  * @dir: directory path which needs reloading.
8911  *
8912  * Reload the mime information for the @dir.
8913  */
8914
8915
8916 /**
8917  * g_socket_get_fd:
8918  * @socket: a #GSocket.
8919  *
8920  * Returns the underlying OS socket object. On unix this
8921  * is a socket file descriptor, and on windows this is
8922  * a Winsock2 SOCKET handle. This may be useful for
8923  * doing platform specific or otherwise unusual operations
8924  * on the socket.
8925  *
8926  * Returns: the file descriptor of the socket.
8927  * Since: 2.22
8928  */
8929
8930
8931 /**
8932  * GDBusConnection:address:
8933  *
8934  * A D-Bus address specifying potential endpoints that can be used
8935  * when establishing the connection.
8936  *
8937  * Since: 2.26
8938  */
8939
8940
8941 /**
8942  * g_mount_operation_set_choice:
8943  * @op: a #GMountOperation.
8944  * @choice: an integer.
8945  *
8946  * Sets a default choice for the mount operation.
8947  */
8948
8949
8950 /**
8951  * g_dbus_message_set_body:
8952  * @message: A #GDBusMessage.
8953  * @body: Either %NULL or a #GVariant that is a tuple.
8954  *
8955  * Sets the body @message. As a side-effect the
8956  * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
8957  * type string of @body (or cleared if @body is %NULL).
8958  * If @body is floating, @message assumes ownership of @body.
8959  *
8960  * Since: 2.26
8961  */
8962
8963
8964 /**
8965  * g_data_input_stream_read_upto_async:
8966  * @stream: a #GDataInputStream
8967  * @stop_chars: characters to terminate the read
8968  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
8969  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
8970  * @cancellable: optional #GCancellable object, %NULL to ignore
8971  * @callback: callback to call when the request is satisfied
8972  * @user_data: the data to pass to callback function
8973  *
8974  * The asynchronous version of g_data_input_stream_read_upto().
8975  * It is an error to have two outstanding calls to this function.
8976  * In contrast to g_data_input_stream_read_until(), this function
8977  * does <emphasis>not</emphasis> consume the stop character. You have
8978  * to use g_data_input_stream_read_byte() to get it before calling
8979  * g_data_input_stream_read_upto() again.
8980  * Note that @stop_chars may contain '\0' if @stop_chars_len is
8981  * specified.
8982  * When the operation is finished, @callback will be called. You
8983  * can then call g_data_input_stream_read_upto_finish() to get
8984  * the result of the operation.
8985  *
8986  * Since: 2.24
8987  */
8988
8989
8990 /**
8991  * g_application_set_application_id:
8992  * @application: a #GApplication
8993  * @application_id: the identifier for @application
8994  *
8995  * Sets the unique identifier for @application.
8996  * The application id can only be modified if @application has not yet
8997  * been registered.
8998  * The application id must be valid.  See g_application_id_is_valid().
8999  *
9000  * Since: 2.28
9001  */
9002
9003
9004 /**
9005  * g_dbus_method_invocation_get_object_path:
9006  * @invocation: A #GDBusMethodInvocation.
9007  *
9008  * Gets the object path the method was invoked on.
9009  *
9010  * Returns: A string. Do not free, it is owned by @invocation.
9011  * Since: 2.26
9012  */
9013
9014
9015 /**
9016  * g_application_open:
9017  * @application: a #GApplication
9018  * @files: an array of #GFiles to open
9019  * @n_files: the length of the @files array
9020  * @hint: a hint (or ""), but never %NULL
9021  *
9022  * Opens the given files.
9023  * In essence, this results in the #GApplication::open signal being emitted
9024  * in the primary instance.
9025  * intended to be used by applications that have multiple modes for
9026  * for this functionality, you should use "".
9027  * The application must be registered before calling this function
9028  * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
9029  *
9030  * Opening files (eg: "view" vs "edit", etc).  Unless you have a need
9031  * Since: 2.28
9032  */
9033
9034
9035 /**
9036  * g_file_append_to_finish:
9037  * @file: input #GFile.
9038  * @res: #GAsyncResult
9039  * @error: a #GError, or %NULL
9040  *
9041  * Finishes an asynchronous file append operation started with
9042  * g_file_append_to_async().
9043  * Free the returned object with g_object_unref().
9044  *
9045  * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
9046  */
9047
9048
9049 /**
9050  * g_dbus_is_address:
9051  * @string: A string.
9052  *
9053  * Checks if @string is a D-Bus address.
9054  * This doesn't check if @string is actually supported by #GDBusServer
9055  * or #GDBusConnection - use g_dbus_is_supported_address() to do more
9056  * checks.
9057  *
9058  * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
9059  * Since: 2.26
9060  */
9061
9062
9063 /**
9064  * g_dbus_message_get_flags:
9065  * @message: A #GDBusMessage.
9066  *
9067  * Gets the flags for @message.
9068  *
9069  * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
9070  * Since: 2.26
9071  */
9072
9073
9074 /**
9075  * g_dbus_arg_info_unref:
9076  * @info: A #GDBusArgInfo.
9077  *
9078  * If @info is statically allocated, does nothing. Otherwise decreases
9079  * the reference count of @info. When its reference count drops to 0,
9080  * the memory used is freed.
9081  *
9082  * Since: 2.26
9083  */
9084
9085
9086 /**
9087  * g_mount_operation_new:
9088  *
9089  * Creates a new mount operation.
9090  *
9091  * Returns: a #GMountOperation.
9092  */
9093
9094
9095 /**
9096  * GSimpleAction:state-type:
9097  *
9098  * The #GVariantType of the state that the action has, or %NULL if the
9099  * action is stateless.
9100  *
9101  * Since: 2.28
9102  */
9103
9104
9105 /**
9106  * g_io_modules_load_all_in_directory:
9107  * @dirname: pathname for a directory containing modules to load.
9108  *
9109  * Loads all the modules in the specified directory.
9110  * If don't require all modules to be initialized (and thus registering
9111  * all gtypes) then you can use g_io_modules_scan_all_in_directory()
9112  * which allows delayed/lazy loading of modules.
9113  * from the directory,
9114  * All the modules are loaded into memory, if you want to
9115  * unload them (enabling on-demand loading) you must call
9116  * g_type_module_unuse() on all the modules. Free the list
9117  * with g_list_free().
9118  *
9119  * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
9120  */
9121
9122
9123 /**
9124  * g_unix_connection_receive_credentials:
9125  * @connection: A #GUnixConnection.
9126  * @cancellable: A #GCancellable or %NULL.
9127  * @error: Return location for error or %NULL.
9128  *
9129  * Receives credentials from the sending end of the connection.  The
9130  * sending end has to call g_unix_connection_send_credentials() (or
9131  * similar) for this to work.
9132  * As well as reading the credentials this also reads (and discards) a
9133  * single byte from the stream, as this is required for credentials
9134  * passing to work on some implementations.
9135  * Other ways to exchange credentials with a foreign peer includes the
9136  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
9137  * g_object_unref()), %NULL if @error is set.
9138  *
9139  * Returns: (transfer full): Received credentials on success (free with
9140  * Since: 2.26
9141  */
9142
9143
9144 /**
9145  * g_proxy_resolver_lookup_finish:
9146  * @resolver: a #GProxyResolver
9147  * @result: the result passed to your #GAsyncReadyCallback
9148  * @error: return location for a #GError, or %NULL
9149  *
9150  * Call this function to obtain the array of proxy URIs when
9151  * g_proxy_resolver_lookup_async() is complete. See
9152  * g_proxy_resolver_lookup() for more details.
9153  * g_strfreev().
9154  *
9155  * Returns: (transfer full) (element-type utf8): A NULL-terminated array of proxy URIs. Must be freed with
9156  * Since: 2.26
9157  */
9158
9159
9160 /**
9161  * g_dbus_message_set_error_name:
9162  * @message: A #GDBusMessage.
9163  * @value: The value to set.
9164  *
9165  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
9166  *
9167  * Since: 2.26
9168  */
9169
9170
9171 /**
9172  * g_socket_client_connect_async:
9173  * @client: a #GTcpClient
9174  * @connectable: a #GSocketConnectable specifying the remote address.
9175  * @cancellable: a #GCancellable, or %NULL
9176  * @callback: a #GAsyncReadyCallback
9177  * @user_data: user data for the callback
9178  *
9179  * This is the asynchronous version of g_socket_client_connect().
9180  * When the operation is finished @callback will be
9181  * called. You can then call g_socket_client_connect_finish() to get
9182  * the result of the operation.
9183  *
9184  * Since: 2.22
9185  */
9186
9187
9188 /**
9189  * GResolver:
9190  *
9191  * The object that handles DNS resolution. Use g_resolver_get_default()
9192  * to get the default resolver.
9193  */
9194
9195
9196 /**
9197  * GDBusConnection:guid:
9198  *
9199  * The GUID of the peer performing the role of server when
9200  * authenticating.
9201  * If you are constructing a #GDBusConnection and pass
9202  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
9203  * #GDBusConnection:flags property then you MUST also set this
9204  * property to a valid guid.
9205  * If you are constructing a #GDBusConnection and pass
9206  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
9207  * #GDBusConnection:flags property you will be able to read the GUID
9208  * of the other peer here after the connection has been successfully
9209  * initialized.
9210  *
9211  * Since: 2.26
9212  */
9213
9214
9215 /**
9216  * g_inet_address_new_from_string:
9217  * @string: a string representation of an IP address
9218  *
9219  * Parses @string as an IP address and creates a new #GInetAddress.
9220  *
9221  * Returns: a new #GInetAddress corresponding to @string, or %NULL if
9222  * Since: 2.22
9223  */
9224
9225
9226 /**
9227  * g_app_info_get_id:
9228  * @appinfo: a #GAppInfo.
9229  *
9230  * Gets the ID of an application. An id is a string that
9231  * identifies the application. The exact format of the id is
9232  * platform dependent. For instance, on Unix this is the
9233  * desktop file id from the xdg menu specification.
9234  * Note that the returned ID may be %NULL, depending on how
9235  * the @appinfo has been constructed.
9236  *
9237  * Returns: a string containing the application's ID.
9238  */
9239
9240
9241 /**
9242  * g_dbus_message_new_method_error_literal:
9243  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
9244  * @error_name: A valid D-Bus error name.
9245  * @error_message: The D-Bus error message.
9246  *
9247  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
9248  *
9249  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
9250  * Since: 2.26
9251  */
9252
9253
9254 /**
9255  * g_dbus_node_info_lookup_interface:
9256  * @info: A #GDBusNodeInfo.
9257  * @name: A D-Bus interface name.
9258  *
9259  * Looks up information about an interface.
9260  * This cost of this function is O(n) in number of interfaces.
9261  *
9262  * Returns: A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
9263  * Since: 2.26
9264  */
9265
9266
9267 /**
9268  * g_data_output_stream_put_int64:
9269  * @stream: a #GDataOutputStream.
9270  * @data: a #gint64.
9271  * @cancellable: optional #GCancellable object, %NULL to ignore.
9272  * @error: a #GError, %NULL to ignore.
9273  *
9274  * Puts a signed 64-bit integer into the stream.
9275  *
9276  * Returns: %TRUE if @data was successfully added to the @stream.
9277  */
9278
9279
9280 /**
9281  * g_output_stream_close:
9282  * @stream: A #GOutputStream.
9283  * @cancellable: optional cancellable object
9284  * @error: location to store the error occuring, or %NULL to ignore
9285  *
9286  * Closes the stream, releasing resources related to it.
9287  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
9288  * Closing a stream multiple times will not return an error.
9289  * Closing a stream will automatically flush any outstanding buffers in the
9290  * stream.
9291  * Streams will be automatically closed when the last reference
9292  * is dropped, but you might want to call this function to make sure
9293  * resources are released as early as possible.
9294  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
9295  * open after the stream is closed. See the documentation for the individual
9296  * stream for details.
9297  * On failure the first error that happened will be reported, but the close
9298  * operation will finish as much as possible. A stream that failed to
9299  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
9300  * is important to check and report the error to the user, otherwise
9301  * there might be a loss of data as all data might not be written.
9302  * If @cancellable is not NULL, then the operation can be cancelled by
9303  * triggering the cancellable object from another thread. If the operation
9304  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
9305  * Cancelling a close will still leave the stream closed, but there some streams
9306  * can use a faster close that doesn't block to e.g. check errors. On
9307  * cancellation (as with any error) there is no guarantee that all written
9308  * data will reach the target.
9309  *
9310  * Returns: %TRUE on success, %FALSE on failure
9311  */
9312
9313
9314 /**
9315  * g_win32_output_stream_get_handle:
9316  * @stream: a #GWin32OutputStream
9317  *
9318  * Return the Windows handle that the stream writes to.
9319  *
9320  * Returns: The handle descriptor of @stream
9321  * Since: 2.26
9322  */
9323
9324
9325 /**
9326  * g_socket_connectable_enumerate:
9327  * @connectable: a #GSocketConnectable
9328  *
9329  * Creates a #GSocketAddressEnumerator for @connectable.
9330  *
9331  * Returns: (transfer full): a new #GSocketAddressEnumerator.
9332  * Since: 2.22
9333  */
9334
9335
9336 /**
9337  * The string info map is an efficient data structure designed to b:
9338  *
9339  * used with a small set of items.  It is used by GSettings schemas for
9340  * three purposes:
9341  * 1) Implement <choices> with a list of valid strings
9342  * 2) Implement <alias> by mapping one string to another
9343  * 3) Implement enumerated types by mapping strings to integer values
9344  * (and back).
9345  * The map is made out of an array of uint32s.  Each entry in the array
9346  * is an integer value, followed by a specially formatted string value:
9347  * The string starts with the byte 0xff or 0xfe, followed by the
9348  * content of the string, followed by a nul byte, followed by
9349  * additional nul bytes for padding, followed by a 0xff byte.
9350  * Padding is added so that the entire formatted string takes up a
9351  * multiple of 4 bytes, and not less than 8 bytes.  The requirement
9352  * for a string to take up 8 bytes is so that the scanner doesn't lose
9353  * synch and mistake a string for an integer value.
9354  * The first byte of the formatted string depends on if the integer is
9355  * an enum value (0xff) or an alias (0xfe).  If it is an alias then the
9356  * number refers to the word offset within the info map at which the
9357  * integer corresponding to the "target" value is stored.
9358  * For example, consider the case of the string info map representing an
9359  * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
9360  * (alias for 'bar').  Note that string info maps are always little
9361  * endian.
9362  * x01 x00 x00 x00   xff 'f' 'o' 'o'   x00 x00 x00 xff   x02 x00 x00 x00
9363  * xff 'b' 'a' 'r'   x00 x00 x00 xff   x03 x00 x00 x00   xfe 'b' 'a' 'z'
9364  * x00 x00 x00 xff
9365  * The operations that someone may want to perform with the map:
9366  * - lookup if a string is valid (and not an alias)
9367  * - lookup the integer value for a enum 'nick'
9368  * - lookup the integer value for the target of an alias
9369  * - lookup an alias and convert it to its target string
9370  * - lookup the enum nick for a given value
9371  * In order to lookup if a string is valid, it is padded on either side
9372  * (as described) and scanned for in the array.  For example, you might
9373  * look for "foo":
9374  * xff 'f' 'o' 'o'   x00 x00 x00 xff
9375  * In order to lookup the integer value for a nick, the string is padded
9376  * on either side and scanned for in the array, as above.  Instead of
9377  * merely succeeding, we look at the integer value to the left of the
9378  * match.  This is the enum value.
9379  * In order to lookup an alias and convert it to its target enum value,
9380  * the string is padded on either side (as described, with 0xfe) and
9381  * scanned for.  For example, you might look for "baz":
9382  * xfe 'b' 'a' 'z'  x00 x00 x00 xff
9383  * The integer immediately preceeding the match then contains the offset
9384  * of the integer value of the target.  In our example, that's '3'.
9385  * This index is dereferenced to find the enum value of '2'.
9386  * To convert the alias to its target string, 5 bytes just need to be
9387  * added past the start of the integer value to find the start of the
9388  * string.
9389  * To lookup the enum nick for a given value, the value is searched for
9390  * in the array.  To ensure that the value isn't matching the inside of a
9391  * string, we must check that it is either the first item in the array or
9392  * immediately preceeded by the byte 0xff.  It must also be immediately
9393  * followed by the byte 0xff.
9394  * Because strings always take up a minimum of 2 words, because 0xff or
9395  * 0xfe never appear inside of a utf-8 string and because no two integer
9396  * values ever appear in sequence, the only way we can have the
9397  * sequence:
9398  * xff __ __ __ __ xff (or 0xfe)
9399  * is in the event of an integer nested between two strings.
9400  * For implementation simplicity/efficiency, strings may not be more
9401  * the value of each choice is set to zero and ignored.
9402  *
9403  * Than 65 characters in length (ie: 17 32bit words after padding).
9404  * In the event that we are doing <choices> (ie: not an enum type) then
9405  */
9406
9407
9408 /**
9409  * g_settings_get_string:
9410  * @settings: a #GSettings object
9411  * @key: the key to get the value for
9412  * @returns: a newly-allocated string
9413  *
9414  * Gets the value that is stored at @key in @settings.
9415  * A convenience variant of g_settings_get() for strings.
9416  * It is a programmer error to give a @key that isn't specified as
9417  * having a string type in the schema for @settings.
9418  *
9419  * Since: 2.26
9420  */
9421
9422
9423 /**
9424  * g_settings_get_boolean:
9425  * @settings: a #GSettings object
9426  * @key: the key to get the value for
9427  * @returns: a boolean
9428  *
9429  * Gets the value that is stored at @key in @settings.
9430  * A convenience variant of g_settings_get() for booleans.
9431  * It is a programmer error to give a @key that isn't specified as
9432  * having a boolean type in the schema for @settings.
9433  *
9434  * Since: 2.26
9435  */
9436
9437
9438 /**
9439  * g_settings_list_schemas:
9440  *
9441  * Gets a list of the #GSettings schemas installed on the system.  The
9442  * returned list is exactly the list of schemas for which you may call
9443  * g_settings_new() without adverse effects.
9444  * This function does not list the schemas that do not provide their own
9445  * g_settings_new_with_path()).  See
9446  * g_settings_list_relocatable_schemas() for that.
9447  * schemas that are available.  The list must not be modified or
9448  * freed.
9449  *
9450  * Paths (ie: schemas for which you must use
9451  * Returns: (element-type utf8) (transfer none): a list of #GSettings
9452  * Since: 2.26
9453  */
9454
9455
9456 /**
9457  * g_dbus_connection_signal_unsubscribe:
9458  * @connection: A #GDBusConnection.
9459  * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
9460  *
9461  * Unsubscribes from signals.
9462  *
9463  * Since: 2.26
9464  */
9465
9466
9467 /**
9468  * g_dbus_message_set_flags:
9469  * @message: A #GDBusMessage.
9470  * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
9471  *
9472  * Sets the flags to set on @message.
9473  *
9474  * Since: 2.26
9475  */
9476
9477
9478 /**
9479  * g_file_append_to_async:
9480  * @file: input #GFile.
9481  * @flags: a set of #GFileCreateFlags.
9482  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
9483  * @cancellable: optional #GCancellable object, %NULL to ignore.
9484  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
9485  * @user_data: the data to pass to callback function
9486  *
9487  * Asynchronously opens @file for appending.
9488  * For more details, see g_file_append_to() which is
9489  * the synchronous version of this call.
9490  * When the operation is finished, @callback will be called. You can then call
9491  * g_file_append_to_finish() to get the result of the operation.
9492  */
9493
9494
9495 /**
9496  * g_dbus_message_set_sender:
9497  * @message: A #GDBusMessage.
9498  * @value: The value to set.
9499  *
9500  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
9501  *
9502  * Since: 2.26
9503  */
9504
9505
9506 /**
9507  * g_dbus_proxy_call_sync:
9508  * @proxy: A #GDBusProxy.
9509  * @method_name: Name of method to invoke.
9510  * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
9511  * @flags: Flags from the #GDBusCallFlags enumeration.
9512  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
9513  * @cancellable: A #GCancellable or %NULL.
9514  * @error: Return location for error or %NULL.
9515  *
9516  * Synchronously invokes the @method_name method on @proxy.
9517  * If @method_name contains any dots, then @name is split into interface and
9518  * method name parts. This allows using @proxy for invoking methods on
9519  * other interfaces.
9520  * If the #GDBusConnection associated with @proxy is disconnected then
9521  * the operation will fail with %G_IO_ERROR_CLOSED. If
9522  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
9523  * compatible with the D-Bus protocol, the operation fails with
9524  * %G_IO_ERROR_INVALID_ARGUMENT.
9525  * If the @parameters #GVariant is floating, it is consumed. This allows
9526  * convenient 'inline' use of g_variant_new(), e.g.:
9527  * |[
9528  * g_dbus_proxy_call_sync (proxy,
9529  * "TwoStrings",
9530  * g_variant_new ("(ss)",
9531  * "Thing One",
9532  * "Thing Two"),
9533  * G_DBUS_CALL_FLAGS_NONE,
9534  * -1,
9535  * NULL,
9536  * &amp;error);
9537  * ]|
9538  * The calling thread is blocked until a reply is received. See
9539  * g_dbus_proxy_call() for the asynchronous version of this
9540  * method.
9541  * return values. Free with g_variant_unref().
9542  *
9543  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
9544  * Since: 2.26
9545  */
9546
9547
9548 /**
9549  * GDBusProxy:g-object-path:
9550  *
9551  * The object path the proxy is for.
9552  *
9553  * Since: 2.26
9554  */
9555
9556
9557 /**
9558  * g_file_info_set_is_symlink:
9559  * @info: a #GFileInfo.
9560  * @is_symlink: a #gboolean.
9561  *
9562  * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
9563  * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
9564  */
9565
9566
9567 /**
9568  * g_file_info_set_attribute_mask:
9569  * @info: a #GFileInfo.
9570  * @mask: a #GFileAttributeMatcher.
9571  *
9572  * Sets @mask on @info to match specific attribute types.
9573  */
9574
9575
9576 /**
9577  * g_dbus_is_member_name:
9578  * @string: The string to check.
9579  *
9580  * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
9581  *
9582  * Returns: %TRUE if valid, %FALSE otherwise.
9583  * Since: 2.26
9584  */
9585
9586
9587 /**
9588  * g_file_query_default_handler:
9589  * @file: a #GFile to open.
9590  * @cancellable: optional #GCancellable object, %NULL to ignore.
9591  * @error: a #GError, or %NULL
9592  *
9593  * Returns the #GAppInfo that is registered as the default
9594  * application to handle the file specified by @file.
9595  * If @cancellable is not %NULL, then the operation can be cancelled by
9596  * triggering the cancellable object from another thread. If the operation
9597  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
9598  * When you are done with it, release it with g_object_unref()
9599  *
9600  * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
9601  */
9602
9603
9604 /**
9605  * GDBusProxy:g-bus-type:
9606  *
9607  * If this property is not %G_BUS_TYPE_NONE, then
9608  * #GDBusProxy:g-connection must be %NULL and will be set to the
9609  * #GDBusConnection obtained by calling g_bus_get() with the value
9610  * of this property.
9611  *
9612  * Since: 2.26
9613  */
9614
9615
9616 /**
9617  * g_dbus_connection_get_peer_credentials:
9618  * @connection: A #GDBusConnection.
9619  *
9620  * Gets the credentials of the authenticated peer. This will always
9621  * return %NULL unless @connection acted as a server
9622  * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
9623  * when set up and the client passed credentials as part of the
9624  * authentication process.
9625  * In a message bus setup, the message bus is always the server and
9626  * each application is a client. So this method will always return
9627  * %NULL for message bus clients.
9628  * this object, it is owned by @connection.
9629  *
9630  * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
9631  * Since: 2.26
9632  */
9633
9634
9635 /**
9636  * g_file_info_set_icon:
9637  * @info: a #GFileInfo.
9638  * @icon: a #GIcon.
9639  *
9640  * Sets the icon for a given #GFileInfo.
9641  * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
9642  */
9643
9644
9645 /**
9646  * g_socket_new_from_fd:
9647  * @fd: a native socket file descriptor.
9648  * @error: #GError for error reporting, or %NULL to ignore.
9649  *
9650  * Creates a new #GSocket from a native file descriptor
9651  * or winsock SOCKET handle.
9652  * This reads all the settings from the file descriptor so that
9653  * all properties should work. Note that the file descriptor
9654  * will be set to non-blocking mode, independent on the blocking
9655  * mode of the #GSocket.
9656  * Free the returned object with g_object_unref().
9657  *
9658  * Returns: a #GSocket or %NULL on error.
9659  * Since: 2.22
9660  */
9661
9662
9663 /**
9664  * g_app_launch_context_launch_failed:
9665  * @context: a #GAppLaunchContext.
9666  * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
9667  *
9668  * Called when an application has failed to launch, so that it can cancel
9669  * the application startup notification started in g_app_launch_context_get_startup_notify_id().
9670  */
9671
9672
9673 /**
9674  * g_socket_get_blocking:
9675  * @socket: a #GSocket.
9676  *
9677  * Gets the blocking mode of the socket. For details on blocking I/O,
9678  * see g_socket_set_blocking().
9679  *
9680  * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
9681  * Since: 2.22
9682  */
9683
9684
9685 /**
9686  * g_periodic_damaged:
9687  * @periodic: a #GPeriodic clock
9688  *
9689  * Report damage and schedule the "repair" signal to be emitted during
9690  * the next repair phase.
9691  * You may not call this function during the repair phase.
9692  *
9693  * Since: 2.28
9694  */
9695
9696
9697 /**
9698  * g_buffered_input_stream_set_buffer_size:
9699  * @stream: a #GBufferedInputStream
9700  * @size: a #gsize
9701  *
9702  * Sets the size of the internal buffer of @stream to @size, or to the
9703  * size of the contents of the buffer. The buffer can never be resized
9704  * smaller than its current contents.
9705  */
9706
9707
9708 /**
9709  * g_action_group_action_enabled_changed:
9710  * @action_group: a #GActionGroup
9711  * @action_name: the name of an action in the group
9712  * @enabled: whether or not the action is now enabled
9713  *
9714  * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
9715  * This function should only be called by #GActionGroup implementations.
9716  *
9717  * Since: 2.28
9718  */
9719
9720
9721 /**
9722  * g_input_stream_read:
9723  * @stream: a #GInputStream.
9724  * @buffer: a buffer to read data into (which should be at least count bytes long).
9725  * @count: the number of bytes that will be read from the stream
9726  * @cancellable: optional #GCancellable object, %NULL to ignore.
9727  * @error: location to store the error occuring, or %NULL to ignore
9728  *
9729  * Tries to read @count bytes from the stream into the buffer starting at
9730  * If count is zero returns zero and does nothing. A value of @count
9731  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
9732  * On success, the number of bytes read into the buffer is returned.
9733  * It is not an error if this is not the same as the requested size, as it
9734  * can happen e.g. near the end of a file. Zero is returned on end of file
9735  * (or if @count is zero),  but never otherwise.
9736  * If @cancellable is not NULL, then the operation can be cancelled by
9737  * triggering the cancellable object from another thread. If the operation
9738  * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
9739  * operation was partially finished when the operation was cancelled the
9740  * partial result will be returned, without an error.
9741  * On error -1 is returned and @error is set accordingly.
9742  *
9743  * Returns: Number of bytes read, or -1 on error
9744  */
9745
9746
9747 /**
9748  * g_themed_icon_prepend_name:
9749  * @icon: a #GThemedIcon
9750  * @iconname: name of icon to prepend to list of icons from within @icon.
9751  *
9752  * Prepend a name to the list of icons from within @icon.
9753  * <note><para>
9754  * Note that doing so invalidates the hash computed by prior calls
9755  * to g_icon_hash().
9756  * </para></note>
9757  *
9758  * Since: 2.18
9759  */
9760
9761
9762 /**
9763  * SECTION:gconverte:
9764  * @short_description: Data conversion interface
9765  * @include: gio/gio.h
9766  * @see_also: #GInputStream, #GOutputStream
9767  *
9768  * #GConverter is implemented by objects that convert
9769  * binary data in various ways. The conversion can be
9770  * stateful and may fail at any place.
9771  * compression, decompression and regular expression
9772  * replace.
9773  *
9774  * Some example conversions are: character set conversion,
9775  * Since: 2.24
9776  */
9777
9778
9779 /**
9780  * g_settings_get_enum:
9781  * @settings: a #GSettings object
9782  * @key: the key to get the value for
9783  * @returns: the enum value
9784  *
9785  * Gets the value that is stored in @settings for @key and converts it
9786  * to the enum value that it represents.
9787  * In order to use this function the type of the value must be a string
9788  * and it must be marked in the schema file as an enumerated type.
9789  * It is a programmer error to give a @key that isn't contained in the
9790  * schema for @settings or is not marked as an enumerated type.
9791  * If the value stored in the configuration database is not a valid
9792  * value for the enumerated type then this function will return the
9793  * default value.
9794  *
9795  * Since: 2.26
9796  */
9797
9798
9799 /**
9800  * g_app_info_reset_type_associations:
9801  * @content_type: a content type
9802  *
9803  * Removes all changes to the type associations done by
9804  * g_app_info_set_as_default_for_type(),
9805  * g_app_info_set_as_default_for_extension(),
9806  * g_app_info_add_supports_type() or g_app_info_remove_supports_type().
9807  *
9808  * Since: 2.20
9809  */
9810
9811
9812 /**
9813  * g_dbus_proxy_get_name:
9814  * @proxy: A #GDBusProxy.
9815  *
9816  * Gets the name that @proxy was constructed for.
9817  *
9818  * Returns: A string owned by @proxy. Do not free.
9819  * Since: 2.26
9820  */
9821
9822
9823 /**
9824  * g_file_info_get_name:
9825  * @info: a #GFileInfo.
9826  *
9827  * Gets the name for a file.
9828  *
9829  * Returns: a string containing the file name.
9830  */
9831
9832
9833 /**
9834  * g_mount_operation_get_anonymous:
9835  * @op: a #GMountOperation.
9836  *
9837  * Check to see whether the mount operation is being used
9838  * for an anonymous user.
9839  *
9840  * Returns: %TRUE if mount operation is anonymous.
9841  */
9842
9843
9844 /**
9845  * g_socket_is_connected:
9846  * @socket: a #GSocket.
9847  *
9848  * Check whether the socket is connected. This is only useful for
9849  * connection-oriented sockets.
9850  *
9851  * Returns: %TRUE if socket is connected, %FALSE otherwise.
9852  * Since: 2.22
9853  */
9854
9855
9856 /**
9857  * g_application_hold:
9858  * @application: a #GApplication
9859  *
9860  * Increases the use count of @application.
9861  * Use this function to indicate that the application has a reason to
9862  * continue to run.  For example, g_application_hold() is called by GTK+
9863  * when a toplevel window is on the screen.
9864  * To cancel the hold, call g_application_release().
9865  */
9866
9867
9868 /**
9869  * g_socket_get_remote_address:
9870  * @socket: a #GSocket.
9871  * @error: #GError for error reporting, or %NULL to ignore.
9872  *
9873  * Try to get the remove address of a connected socket. This is only
9874  * useful for connection oriented sockets that have been connected.
9875  * Free the returned object with g_object_unref().
9876  *
9877  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
9878  * Since: 2.22
9879  */
9880
9881
9882 /**
9883  * g_dbus_message_new_method_reply:
9884  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
9885  *
9886  * Creates a new #GDBusMessage that is a reply to @method_call_message.
9887  *
9888  * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
9889  * Since: 2.26
9890  */
9891
9892
9893 /**
9894  * g_application_register:
9895  * @application: a #GApplication
9896  * @cancellable: a #GCancellable, or %NULL
9897  * @error: a pointer to a NULL #GError, or %NULL
9898  * @returns: %TRUE if registration succeeded
9899  *
9900  * Attempts registration of the application.
9901  * This is the point at which the application discovers if it is the
9902  * primary instance or merely acting as a remote for an already-existing
9903  * primary instance.
9904  * If the application has already been registered then %TRUE is
9905  * returned with no work performed.
9906  * The #GApplication::startup signal is emitted if registration succeeds
9907  * and @application is the primary instance.
9908  * In the event of an error (such as @cancellable being cancelled, or a
9909  * failure to connect to the session bus), %FALSE is returned and @error
9910  * is set appropriately.
9911  * instance is or is not the primary instance of the application.  See
9912  * g_application_get_is_remote() for that.
9913  *
9914  * Note: the return value of this function is not an indicator that this
9915  * Since: 2.28
9916  */
9917
9918
9919 /**
9920  * g_emblemed_icon_get_icon:
9921  * @emblemed: a #GEmblemedIcon
9922  *
9923  * Gets the main icon for @emblemed.
9924  *
9925  * Returns: (transfer full): a #GIcon that is owned by @emblemed
9926  * Since: 2.18
9927  */
9928
9929
9930 /**
9931  * g_file_info_set_attribute_object:
9932  * @info: a #GFileInfo.
9933  * @attribute: a file attribute key.
9934  * @attr_value: a #GObject.
9935  *
9936  * Sets the @attribute to contain the given @attr_value,
9937  * if possible.
9938  */
9939
9940
9941 /**
9942  * GDBusServer:authentication-observer:
9943  *
9944  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
9945  *
9946  * Since: 2.26
9947  */
9948
9949
9950 /**
9951  * g_bus_watch_name_on_connection:
9952  * @connection: A #GDBusConnection.
9953  * @name: The name (well-known or unique) to watch.
9954  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
9955  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
9956  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
9957  * @user_data: User data to pass to handlers.
9958  * @user_data_free_func: Function for freeing @user_data or %NULL.
9959  *
9960  * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
9961  * #GBusType.
9962  * g_bus_unwatch_name() to stop watching the name.
9963  *
9964  * Returns: An identifier (never 0) that an be used with
9965  * Since: 2.26
9966  */
9967
9968
9969 /**
9970  * g_action_group_get_action_enabled:
9971  * @action_group: a #GActionGroup
9972  * @action_name: the name of the action to query
9973  *
9974  * Checks if the named action within @action_group is currently enabled.
9975  * An action must be enabled in order to be activated or in order to
9976  * have its state changed from outside callers.
9977  *
9978  * Returns: whether or not the action is currently enabled
9979  * Since: 2.28
9980  */
9981
9982
9983 /**
9984  * g_app_info_should_show:
9985  * @appinfo: a #GAppInfo.
9986  *
9987  * Checks if the application info should be shown in menus that
9988  * list available applications.
9989  *
9990  * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
9991  */
9992
9993
9994 /**
9995  * g_proxy_get_default_for_protocol:
9996  * @protocol: the proxy protocol name (e.g. http, socks, etc)
9997  *
9998  * Lookup "gio-proxy" extension point for a proxy implementation that supports
9999  * specified protocol.
10000  *
10001  * Returns: return a #GProxy or NULL if protocol is not supported.
10002  * Since: 2.26
10003  */
10004
10005
10006 /**
10007  * g_dbus_connection_send_message_with_reply_finish:
10008  * @connection: a #GDBusConnection
10009  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
10010  * @error: Return location for error or %NULL.
10011  *
10012  * Finishes an operation started with g_dbus_connection_send_message_with_reply().
10013  * Note that @error is only set if a local in-process error
10014  * occured. That is to say that the returned #GDBusMessage object may
10015  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
10016  * g_dbus_message_to_gerror() to transcode this to a #GError.
10017  * See <xref linkend="gdbus-server"/> and <xref
10018  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
10019  * low-level API to send and receive UNIX file descriptors.
10020  *
10021  * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
10022  * Since: 2.26
10023  */
10024
10025
10026 /**
10027  * SECTION:gunixinputstrea:
10028  * @short_description: Streaming input operations for UNIX file descriptors
10029  * @include: gio/gunixinputstream.h
10030  * @see_also: #GInputStream
10031  *
10032  * #GUnixInputStream implements #GInputStream for reading from a
10033  * UNIX file descriptor, including asynchronous operations. The file
10034  * descriptor must be selectable, so it doesn't work with opened files.
10035  * Note that <filename>&lt;gio/gunixinputstream.h&gt;</filename> belongs
10036  * to the UNIX-specific GIO interfaces, thus you have to use the
10037  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
10038  */
10039
10040
10041 /**
10042  * GZlibCompressor:
10043  *
10044  * Zlib decompression
10045  */
10046
10047
10048 /**
10049  * g_dbus_server_get_guid:
10050  * @server: A #GDBusServer.
10051  *
10052  * Gets the GUID for @server.
10053  *
10054  * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
10055  * Since: 2.26
10056  */
10057
10058
10059 /**
10060  * g_file_get_basename:
10061  * @file: input #GFile.
10062  *
10063  * Gets the base name (the last component of the path) for a given #GFile.
10064  * If called for the top level of a system (such as the filesystem root
10065  * or a uri like sftp://host/) it will return a single directory separator
10066  * (and on Windows, possibly a drive letter).
10067  * The base name is a byte string (*not* UTF-8). It has no defined encoding
10068  * or rules other than it may not contain zero bytes.  If you want to use
10069  * filenames in a user interface you should use the display name that you
10070  * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
10071  * attribute with g_file_query_info().
10072  * This call does no blocking i/o.
10073  * if given #GFile is invalid. The returned string should be
10074  * freed with g_free() when no longer needed.
10075  *
10076  * Returns: string containing the #GFile's base name, or %NULL
10077  */
10078
10079
10080 /**
10081  * g_volume_get_drive:
10082  * @volume: a #GVolume.
10083  *
10084  * Gets the drive for the @volume.
10085  * The returned object should be unreffed with g_object_unref()
10086  * when no longer needed.
10087  *
10088  * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
10089  */
10090
10091
10092 /**
10093  * GUnixMountMonitor::mountpoints-changed:
10094  * @monitor: the object on which the signal is emitted
10095  *
10096  * Emitted when the unix mount points have changed.
10097  */
10098
10099
10100 /**
10101  * GDBusProxy:g-interface-name:
10102  *
10103  * The D-Bus interface name the proxy is for.
10104  *
10105  * Since: 2.26
10106  */
10107
10108
10109 /**
10110  * g_icon_to_string:
10111  * @icon: a #GIcon.
10112  *
10113  * Generates a textual representation of @icon that can be used for
10114  * serialization such as when passing @icon to a different process or
10115  * saving it to persistent storage. Use g_icon_new_for_string() to
10116  * get @icon back from the returned string.
10117  * The encoding of the returned string is proprietary to #GIcon except
10118  * in the following two cases
10119  * <itemizedlist>
10120  * <listitem><para>
10121  * If @icon is a #GFileIcon, the returned string is a native path
10122  * (such as <literal>/path/to/my icon.png</literal>) without escaping
10123  * if the #GFile for @icon is a native file.  If the file is not
10124  * native, the returned string is the result of g_file_get_uri()
10125  * (such as <literal>sftp://path/to/my%%20icon.png</literal>).
10126  * </para></listitem>
10127  * <listitem><para>
10128  * If @icon is a #GThemedIcon with exactly one name, the encoding is
10129  * simply the name (such as <literal>network-server</literal>).
10130  * </para></listitem>
10131  * </itemizedlist>
10132  * be serialized. Use g_free() to free.
10133  *
10134  * Virtual: to_tokens
10135  * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
10136  * Since: 2.20
10137  */
10138
10139
10140 /**
10141  * g_dbus_connection_unregister_subtree:
10142  * @connection: A #GDBusConnection.
10143  * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
10144  *
10145  * Unregisters a subtree.
10146  *
10147  * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
10148  * Since: 2.26
10149  */
10150
10151
10152 /**
10153  * g_socket_listener_accept_socket_finish:
10154  * @listener: a #GSocketListener
10155  * @result: a #GAsyncResult.
10156  * @source_object: Optional #GObject identifying this source
10157  * @error: a #GError location to store the error occuring, or %NULL to ignore.
10158  *
10159  * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
10160  *
10161  * Returns: (transfer full): a #GSocket on success, %NULL on error.
10162  * Since: 2.22
10163  */
10164
10165
10166 /**
10167  * g_io_extension_point_get_required_type:
10168  * @extension_point: a #GIOExtensionPoint
10169  *
10170  * Gets the required type for @extension_point.
10171  * or #G_TYPE_INVALID if the extension point has no required type
10172  *
10173  * Returns: the #GType that all implementations must have,
10174  */
10175
10176
10177 /**
10178  * GDBusProxy:g-default-timeout:
10179  *
10180  * The timeout to use if -1 (specifying default timeout) is passed
10181  * as @timeout_msec in the g_dbus_proxy_call() and
10182  * g_dbus_proxy_call_sync() functions.
10183  * This allows applications to set a proxy-wide timeout for all
10184  * remote method invocations on the proxy. If this property is -1,
10185  * the default timeout (typically 25 seconds) is used. If set to
10186  * %G_MAXINT, then no timeout is used.
10187  *
10188  * Since: 2.26
10189  */
10190
10191
10192 /**
10193  * g_file_info_set_attribute_uint64:
10194  * @info: a #GFileInfo.
10195  * @attribute: a file attribute key.
10196  * @attr_value: an unsigned 64-bit integer.
10197  *
10198  * Sets the @attribute to contain the given @attr_value,
10199  * if possible.
10200  */
10201
10202
10203 /**
10204  * g_socket_get_timeout:
10205  * @socket: a #GSocket.
10206  *
10207  * Gets the timeout setting of the socket. For details on this, see
10208  * g_socket_set_timeout().
10209  *
10210  * Returns: the timeout in seconds
10211  * Since: 2.26
10212  */
10213
10214
10215 /**
10216  * g_dbus_connection_set_exit_on_close:
10217  * @connection: A #GDBusConnection.
10218  * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
10219  *
10220  * Sets whether the process should be terminated when @connection is
10221  * closed by the remote peer. See #GDBusConnection:exit-on-close for
10222  * more details.
10223  *
10224  * Since: 2.26
10225  */
10226
10227
10228 /**
10229  * SECTION:gsimpleasyncresul:
10230  * @short_description: Simple asynchronous results implementation
10231  * @include: gio/gio.h
10232  * @see_also: #GAsyncResult
10233  *
10234  * Implements #GAsyncResult for simple cases. Most of the time, this
10235  * will be all an application needs, and will be used transparently.
10236  * Because of this, #GSimpleAsyncResult is used throughout GIO for
10237  * handling asynchronous functions.
10238  * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
10239  * reporting, operation cancellation and the final state of an operation,
10240  * completely transparent to the application. Results can be returned
10241  * as a pointer e.g. for functions that return data that is collected
10242  * asynchronously, a boolean value for checking the success or failure
10243  * of an operation, or a #gssize for operations which return the number
10244  * of bytes modified by the operation; all of the simple return cases
10245  * are covered.
10246  * Most of the time, an application will not need to know of the details
10247  * of this API; it is handled transparently, and any necessary operations
10248  * are handled by #GAsyncResult's interface. However, if implementing a
10249  * new GIO module, for writing language bindings, or for complex
10250  * applications that need better control of how asynchronous operations
10251  * are completed, it is important to understand this functionality.
10252  * GSimpleAsyncResults are tagged with the calling function to ensure
10253  * that asynchronous functions and their finishing functions are used
10254  * together correctly.
10255  * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
10256  * If the result needs to be created for a #GError, use
10257  * g_simple_async_result_new_from_error() or
10258  * g_simple_async_result_new_take_error(). If a #GError is not available
10259  * (e.g. the asynchronous operation's doesn't take a #GError argument),
10260  * but the result still needs to be created for an error condition, use
10261  * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
10262  * if your application or binding requires passing a variable argument list
10263  * directly), and the error can then be propagated through the use of
10264  * g_simple_async_result_propagate_error().
10265  * An asynchronous operation can be made to ignore a cancellation event by
10266  * calling g_simple_async_result_set_handle_cancellation() with a
10267  * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
10268  * operations that are dangerous to cancel, such as close (which would
10269  * cause a leak if cancelled before being run).
10270  * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
10271  * or it can use #GThread<!-- -->s if available.
10272  * g_simple_async_result_complete() will finish an I/O task directly
10273  * from the point where it is called. g_simple_async_result_complete_in_idle()
10274  * will finish it from an idle handler in the <link
10275  * linkend="g-main-context-push-thread-default">thread-default main
10276  * context</link>. g_simple_async_result_run_in_thread() will run the
10277  * job in a separate thread and then deliver the result to the
10278  * thread-default main context.
10279  * To set the results of an asynchronous function,
10280  * g_simple_async_result_set_op_res_gpointer(),
10281  * g_simple_async_result_set_op_res_gboolean(), and
10282  * g_simple_async_result_set_op_res_gssize()
10283  * are provided, setting the operation's result to a gpointer, gboolean, or
10284  * gssize, respectively.
10285  * Likewise, to get the result of an asynchronous function,
10286  * g_simple_async_result_get_op_res_gpointer(),
10287  * g_simple_async_result_get_op_res_gboolean(), and
10288  * g_simple_async_result_get_op_res_gssize() are
10289  * provided, getting the operation's result as a gpointer, gboolean, and
10290  * gssize, respectively.
10291  * For the details of the requirements implementations must respect, see
10292  * #GAsyncResult.  A typical implementation of an asynchronous operation
10293  * using GSimpleAsyncResult looks something like this:
10294  * |[
10295  * static void
10296  * baked_cb (Cake    *cake,
10297  * gpointer user_data)
10298  * {
10299  * /&ast; In this example, this callback is not given a reference to the cake, so
10300  * &ast; the GSimpleAsyncResult has to take a reference to it.
10301  * &ast;/
10302  * GSimpleAsyncResult *result = user_data;
10303  * if (cake == NULL)
10304  * g_simple_async_result_set_error (result,
10305  * BAKER_ERRORS,
10306  * BAKER_ERROR_NO_FLOUR,
10307  * "Go to the supermarket");
10308  * else
10309  * g_simple_async_result_set_op_res_gpointer (result,
10310  * g_object_ref (cake),
10311  * g_object_unref);
10312  * /&ast; In this example, we assume that baked_cb is called as a callback from
10313  * &ast; the mainloop, so it's safe to complete the operation synchronously here.
10314  * &ast; If, however, _baker_prepare_cake () might call its callback without
10315  * &ast; first returning to the mainloop â€” inadvisable, but some APIs do so â€”
10316  * &ast; we would need to use g_simple_async_result_complete_in_idle().
10317  * &ast;/
10318  * g_simple_async_result_complete (result);
10319  * g_object_unref (result);
10320  * }
10321  * void
10322  * baker_bake_cake_async (Baker              *self,
10323  * guint               radius,
10324  * GAsyncReadyCallback callback,
10325  * gpointer            user_data)
10326  * {
10327  * GSimpleAsyncResult *simple;
10328  * Cake               *cake;
10329  * if (radius < 3)
10330  * {
10331  * g_simple_async_report_error_in_idle (G_OBJECT (self),
10332  * callback,
10333  * user_data,
10334  * BAKER_ERRORS,
10335  * BAKER_ERROR_TOO_SMALL,
10336  * "%ucm radius cakes are silly",
10337  * radius);
10338  * return;
10339  * }
10340  * simple = g_simple_async_result_new (G_OBJECT (self),
10341  * callback,
10342  * user_data,
10343  * baker_bake_cake_async);
10344  * cake = _baker_get_cached_cake (self, radius);
10345  * if (cake != NULL)
10346  * {
10347  * g_simple_async_result_set_op_res_gpointer (simple,
10348  * g_object_ref (cake),
10349  * g_object_unref);
10350  * g_simple_async_result_complete_in_idle (simple);
10351  * g_object_unref (simple);
10352  * /&ast; Drop the reference returned by _baker_get_cached_cake(); the
10353  * &ast; GSimpleAsyncResult has taken its own reference.
10354  * &ast;/
10355  * g_object_unref (cake);
10356  * return;
10357  * }
10358  * _baker_prepare_cake (self, radius, baked_cb, user_data);
10359  * }
10360  * Cake *
10361  * baker_bake_cake_finish (Baker        *self,
10362  * GAsyncResult *result,
10363  * GError      **error)
10364  * {
10365  * GSimpleAsyncResult *simple;
10366  * Cake               *cake;
10367  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
10368  * G_OBJECT (self),
10369  * baker_bake_cake_async),
10370  * NULL);
10371  * simple = (GSimpleAsyncResult *) result;
10372  * if (g_simple_async_result_propagate_error (simple, error))
10373  * return NULL;
10374  * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
10375  * return g_object_ref (cake);
10376  * }
10377  * ]|
10378  */
10379
10380
10381 /**
10382  * g_async_initable_init_finish:
10383  * @initable: a #GAsyncInitable.
10384  * @res: a #GAsyncResult.
10385  * @error: a #GError location to store the error occuring, or %NULL to ignore.
10386  *
10387  * Finishes asynchronous initialization and returns the result.
10388  * See g_async_initable_init_async().
10389  * will return %FALSE and set @error appropriately if present.
10390  *
10391  * Returns: %TRUE if successful. If an error has occurred, this function
10392  * Since: 2.22
10393  */
10394
10395
10396 /**
10397  * g_input_stream_skip_async:
10398  * @stream: A #GInputStream.
10399  * @count: the number of bytes that will be skipped from the stream
10400  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
10401  * @cancellable: optional #GCancellable object, %NULL to ignore.
10402  * @callback: callback to call when the request is satisfied
10403  * @user_data: the data to pass to callback function
10404  *
10405  * Request an asynchronous skip of @count bytes from the stream.
10406  * When the operation is finished @callback will be called.
10407  * You can then call g_input_stream_skip_finish() to get the result
10408  * of the operation.
10409  * During an async request no other sync and async calls are allowed,
10410  * and will result in %G_IO_ERROR_PENDING errors.
10411  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
10412  * On success, the number of bytes skipped will be passed to the callback.
10413  * It is not an error if this is not the same as the requested size, as it
10414  * can happen e.g. near the end of a file, but generally we try to skip
10415  * as many bytes as requested. Zero is returned on end of file
10416  * (or if @count is zero), but never otherwise.
10417  * Any outstanding i/o request with higher priority (lower numerical value)
10418  * will be executed before an outstanding request with lower priority.
10419  * Default priority is %G_PRIORITY_DEFAULT.
10420  * The asynchronous methods have a default fallback that uses threads to
10421  * implement asynchronicity, so they are optional for inheriting classes.
10422  * However, if you override one, you must override all.
10423  */
10424
10425
10426 /**
10427  * g_mount_guess_content_type_finish:
10428  * @mount: a #GMount
10429  * @result: a #GAsyncResult
10430  * @error: a #GError location to store the error occuring, or %NULL to ignore
10431  *
10432  * Finishes guessing content types of @mount. If any errors occured
10433  * during the operation, @error will be set to contain the errors and
10434  * %FALSE will be returned. In particular, you may get an
10435  * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
10436  * guessing.
10437  * Caller should free this array with g_strfreev() when done with it.
10438  *
10439  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
10440  * Since: 2.18
10441  */
10442
10443
10444 /**
10445  * g_cancellable_push_current:
10446  * @cancellable: a #GCancellable object
10447  *
10448  * Pushes @cancellable onto the cancellable stack. The current
10449  * cancllable can then be recieved using g_cancellable_get_current().
10450  * This is useful when implementing cancellable operations in
10451  * code that does not allow you to pass down the cancellable object.
10452  * This is typically called automatically by e.g. #GFile operations,
10453  * so you rarely have to call this yourself.
10454  */
10455
10456
10457 /**
10458  * g_file_query_exists:
10459  * @file: input #GFile.
10460  * @cancellable: optional #GCancellable object, %NULL to ignore.
10461  *
10462  * Utility function to check if a particular file exists. This is
10463  * implemented using g_file_query_info() and as such does blocking I/O.
10464  * Note that in many cases it is racy to first check for file existence
10465  * and then execute something based on the outcome of that, because the
10466  * file might have been created or removed in between the operations. The
10467  * general approach to handling that is to not check, but just do the
10468  * operation and handle the errors as they come.
10469  * As an example of race-free checking, take the case of reading a file, and
10470  * can both result in two processes creating the file (with perhaps a partially
10471  * written file as the result). The correct approach is to always try to create
10472  * the file with g_file_create() which will either atomically create the file
10473  * or fail with a G_IO_ERROR_EXISTS error.
10474  * However, in many cases an existence check is useful in a user
10475  * interface, for instance to make a menu item sensitive/insensitive, so that
10476  * you don't have to fool users that something is possible and then just show
10477  * and error dialog. If you do this, you should make sure to also handle the
10478  * errors that can happen due to races when you execute the operation.
10479  *
10480  * If it doesn't exist, creating it. there are two racy versions: read it, and
10481  * On error create it; and: check if it exists, if not create it. These
10482  * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
10483  */
10484
10485
10486 /**
10487  * g_inet_address_get_is_any:
10488  * @address: a #GInetAddress
10489  *
10490  * Tests whether @address is the "any" address for its family.
10491  *
10492  * Returns: %TRUE if @address is the "any" address for its family.
10493  * Since: 2.22
10494  */
10495
10496
10497 /**
10498  * g_unix_socket_address_get_path:
10499  * @address: a #GInetSocketAddress
10500  *
10501  * Gets @address's path, or for abstract sockets the "name".
10502  * Guaranteed to be zero-terminated, but an abstract socket
10503  * may contain embedded zeros, and thus you should use
10504  * g_unix_socket_address_get_path_len() to get the true length
10505  * of this string.
10506  *
10507  * Returns: the path for @address
10508  * Since: 2.22
10509  */
10510
10511
10512 /**
10513  * SECTION:gdbusserve:
10514  * @short_description: Helper for accepting connections
10515  * @include: gio/gio.h
10516  *
10517  * #GDBusServer is a helper for listening to and accepting D-Bus
10518  * connections.
10519  * <example id="gdbus-peer-to-peer"><title>D-Bus peer-to-peer example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-peer.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10520  */
10521
10522
10523 /**
10524  * SECTION:gdbusmessag:
10525  * @short_description: D-Bus Message
10526  * @include: gio/gio.h
10527  *
10528  * A type for representing D-Bus messages that can be sent or received
10529  * on a #GDBusConnection.
10530  */
10531
10532
10533 /**
10534  * g_inet_address_get_is_mc_link_local:
10535  * @address: a #GInetAddress
10536  *
10537  * Tests whether @address is a link-local multicast address.
10538  *
10539  * Returns: %TRUE if @address is a link-local multicast address.
10540  * Since: 2.22
10541  */
10542
10543
10544 /**
10545  * GDBusMessage:
10546  *
10547  * The #GDBusMessage structure contains only private data and should
10548  * only be accessed using the provided API.
10549  *
10550  * Since: 2.26
10551  */
10552
10553
10554 /**
10555  * g_file_enumerator_close_async:
10556  * @enumerator: a #GFileEnumerator.
10557  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
10558  * @cancellable: optional #GCancellable object, %NULL to ignore.
10559  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
10560  * @user_data: the data to pass to callback function
10561  *
10562  * Asynchronously closes the file enumerator.
10563  * If @cancellable is not %NULL, then the operation can be cancelled by
10564  * triggering the cancellable object from another thread. If the operation
10565  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
10566  * g_file_enumerator_close_finish().
10567  */
10568
10569
10570 /**
10571  * SECTION:gactiongrou:
10572  * @title: GActionGroup
10573  * @short_description: a group of actions
10574  *
10575  * #GActionGroup represents a group of actions.
10576  * Each action in the group has a unique name (which is a string).  All
10577  * method calls, except g_action_group_list_actions() take the name of
10578  * an action as an argument.
10579  * The #GActionGroup API is meant to be the 'public' API to the action
10580  * group.  The calls here are exactly the interaction that 'external
10581  * the action group implementation) are found on subclasses.  This is
10582  * why you will find -- for example -- g_action_group_get_enabled() but
10583  * not an equivalent <function>set()</function> call.
10584  * Signals are emitted on the action group in response to state changes
10585  * on individual actions.
10586  *
10587  * Forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
10588  * With actions.  'internal' apis (ie: ones meant only to be accessed by
10589  */
10590
10591
10592 /**
10593  * GUnixOutputStream:close-fd:
10594  *
10595  * Whether to close the file descriptor when the stream is closed.
10596  *
10597  * Since: 2.20
10598  */
10599
10600
10601 /**
10602  * g_app_info_dup:
10603  * @appinfo: a #GAppInfo.
10604  *
10605  * Creates a duplicate of a #GAppInfo.
10606  *
10607  * Returns: (transfer full): a duplicate of @appinfo.
10608  */
10609
10610
10611 /**
10612  * g_srv_target_copy:
10613  * @target: a #GSrvTarget
10614  *
10615  * Copies @target
10616  *
10617  * Returns: a copy of @target
10618  * Since: 2.22
10619  */
10620
10621
10622 /**
10623  * g_app_launch_context_get_display:
10624  * @context: a #GAppLaunchContext
10625  * @info: a #GAppInfo
10626  * @files: (element-type GFile): a #GList of #GFile objects
10627  *
10628  * Gets the display string for the @context. This is used to ensure new
10629  * applications are started on the same display as the launching
10630  * application, by setting the <envvar>DISPLAY</envvar> environment variable.
10631  *
10632  * Returns: a display string for the display.
10633  */
10634
10635
10636 /**
10637  * g_desktop_app_info_get_is_hidden:
10638  * @info: a #GDesktopAppInfo.
10639  *
10640  * A desktop file is hidden if the Hidden key in it is
10641  * set to True.
10642  *
10643  * Returns: %TRUE if hidden, %FALSE otherwise.
10644  */
10645
10646
10647 /**
10648  * SECTION:gperiodi:
10649  * @title: GPeriodic
10650  * @short_description: a periodic event clock
10651  *
10652  * #GPeriodic is a periodic event clock that fires a configurable number
10653  * of times per second and is capable of being put into synch with an
10654  * external time source.
10655  * A number of #GPeriodicTickFunc<!-- -->s are registered with
10656  * g_periodic_add() and are called each time the clock "ticks".
10657  * performed) that are handled in a "repair" phase that follows all the
10658  * tick functions having been run.  It is also possible to report damage
10659  * while the clock is not running, in which case the rate of repairs
10660  * will be rate limited as if the clock were running.
10661  * #GPeriodic has a configurable priority range consisting of a high and
10662  * low value.  Other sources with a priority higher than the high value
10663  * might starve #GPeriodic and sources with the priority lower than the
10664  * low value may be starved by #GPeriodic.
10665  * #GPeriodic will engage in dynamic scheduling with respect to sources
10666  * that have their priorities within the high to low range.  A given
10667  * #GPeriodic will ensure that the events dispatched from itself are
10668  * generally using less than 50% of the CPU (on average) if other tasks
10669  * are pending.  If no other sources within the range are pending then
10670  * #GPeriodic will use up to all of the available CPU (which can lead to
10671  * starvation of lower-priority sources, as mentioned above).  The 50%
10672  * figure is entirely arbitrary and may change or become configurable in
10673  * the future.
10674  * For example, if a #GPeriodic has been set to run at 10Hz and a
10675  * particular iteration uses 140ms of time, then 2 ticks will be
10676  * "skipped" to give other sources a chance to run (ie: the next tick
10677  * will occur 300ms later rather than 100ms later, giving 160ms of time
10678  * for other sources).
10679  * This means that the high priority value for #GPeriodic should be set
10680  * quite high (above anything else) and the low priority value for
10681  * #GPeriodic should be set lower than everything except true "idle"
10682  * truly idle).
10683  * #GPeriodic generally assumes that although the things attached to it
10684  * may be poorly behaved in terms of non-yielding behaviour (either
10685  * individually or in aggregate), the other sources on the main loop
10686  * should be "well behaved".  Other sources should try not to block the
10687  * CPU for a substantial portion of the periodic interval.
10688  * The sources attached to a #GPeriodic are permitted to be somewhat
10689  * less well-behaved because they are generally rendering the UI for the
10690  * user (which should be done smoothly) and also because they will be
10691  * throttled by #GPeriodic.
10692  * #GPeriodic is intended to be used as a paint clock for managing
10693  * geometry updates and painting of windows.
10694  *
10695  * The tick functions can report "damage" (ie: updates that need to be
10696  * Handlers (ie: things that you want to run only when the program is
10697  * Since: 2.28
10698  */
10699
10700
10701 /**
10702  * g_socket_send_message:
10703  * @socket: a #GSocket
10704  * @address: a #GSocketAddress, or %NULL
10705  * @vectors: an array of #GOutputVector structs
10706  * @num_vectors: the number of elements in @vectors, or -1
10707  * @messages: a pointer to an array of #GSocketControlMessages, or %NULL.
10708  * @num_messages: number of elements in @messages, or -1.
10709  * @flags: an int containing #GSocketMsgFlags flags
10710  * @cancellable: a %GCancellable or %NULL
10711  * @error: #GError for error reporting, or %NULL to ignore.
10712  *
10713  * Send data to @address on @socket.  This is the most complicated and
10714  * fully-featured version of this call. For easier use, see
10715  * g_socket_send() and g_socket_send_to().
10716  * If @address is %NULL then the message is sent to the default receiver
10717  * (set by g_socket_connect()).
10718  * then @vectors is assumed to be terminated by a #GOutputVector with a
10719  * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
10720  * that the sent data will be gathered from. Using multiple
10721  * #GOutputVector<!-- -->s is more memory-efficient than manually copying
10722  * data from multiple sources into a single buffer, and more
10723  * network-efficient than making multiple calls to g_socket_send().
10724  * #GSocketControlMessage instances. These correspond to the control
10725  * messages to be sent on the socket.
10726  * If @num_messages is -1 then @messages is treated as a %NULL-terminated
10727  * array.
10728  * for this are available in the #GSocketMsgFlags enum, but the
10729  * values there are the same as the system values, and the flags
10730  * are passed in as-is, so you can pass in system-specific flags too.
10731  * If the socket is in blocking mode the call will block until there is
10732  * space for the data in the socket queue. If there is no space available
10733  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
10734  * will be returned. To be notified when space is available, wait for the
10735  * %G_IO_OUT condition. Note though that you may still receive
10736  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
10737  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
10738  * very common due to the way the underlying APIs work.)
10739  * On error -1 is returned and @error is set accordingly.
10740  * on error
10741  *
10742  * Returns: Number of bytes written (which may be less than @size), or -1
10743  * Since: 2.22
10744  */
10745
10746
10747 /**
10748  * g_permission_release:
10749  * @permission: a #GPermission instance
10750  * @cancellable: a #GCancellable, or %NULL
10751  * @error: a pointer to a %NULL #GError, or %NULL
10752  * @returns: %TRUE if the permission was successfully released
10753  *
10754  * Attempts to release the permission represented by @permission.
10755  * The precise method by which this happens depends on the permission
10756  * and the underlying authentication mechanism.  In most cases the
10757  * permission will be dropped immediately without further action.
10758  * You should check with g_permission_get_can_release() before calling
10759  * this function.
10760  * If the permission is released then %TRUE is returned.  Otherwise,
10761  * %FALSE is returned and @error is set appropriately.
10762  * This call is blocking, likely for a very long time (in the case that
10763  * user interaction is required).  See g_permission_release_async() for
10764  * the non-blocking version.
10765  *
10766  * Since: 2.26
10767  */
10768
10769
10770 /**
10771  * GSettings::change-event:
10772  * @settings: the object on which the signal was emitted
10773  * @keys: an array of #GQuark<!-- -->s for the changed keys, or %NULL
10774  * @n_keys: the length of the @keys array, or 0
10775  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
10776  *
10777  * The "change-event" signal is emitted once per change event that
10778  * affects this settings object.  You should connect to this signal
10779  * only if you are interested in viewing groups of changes before they
10780  * are split out into multiple emissions of the "changed" signal.
10781  * For most use cases it is more appropriate to use the "changed" signal.
10782  * In the event that the change event applies to one or more specified
10783  * keys, @keys will be an array of #GQuark of length @n_keys.  In the
10784  * event that the change event applies to the #GSettings object as a
10785  * be %NULL and @n_keys will be 0.
10786  * The default handler for this signal invokes the "changed" signal
10787  * for each affected key.  If any other connected handler returns
10788  * %TRUE then this default functionality will be supressed.
10789  *
10790  * Whole (ie: potentially every key has been changed) then @keys will
10791  */
10792
10793
10794 /**
10795  * GInetAddress:is-mc-org-local:
10796  *
10797  * Whether this is an organization-local multicast address.
10798  * See g_inet_address_get_is_mc_org_local().
10799  *
10800  * Since: 2.22
10801  */
10802
10803
10804 /**
10805  * g_file_start_mountable_finish:
10806  * @file: input #GFile.
10807  * @result: a #GAsyncResult.
10808  * @error: a #GError, or %NULL
10809  *
10810  * Finishes a start operation. See g_file_start_mountable() for details.
10811  * Finish an asynchronous start operation that was started
10812  * with g_file_start_mountable().
10813  * otherwise.
10814  *
10815  * Returns: %TRUE if the operation finished successfully. %FALSE
10816  * Since: 2.22
10817  */
10818
10819
10820 /**
10821  * g_input_stream_read_async:
10822  * @stream: A #GInputStream.
10823  * @buffer: a buffer to read data into (which should be at least count bytes long).
10824  * @count: the number of bytes that will be read from the stream
10825  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
10826  * @cancellable: optional #GCancellable object, %NULL to ignore.
10827  * @callback: callback to call when the request is satisfied
10828  * @user_data: the data to pass to callback function
10829  *
10830  * Request an asynchronous read of @count bytes from the stream into the buffer
10831  * starting at @buffer. When the operation is finished @callback will be called.
10832  * You can then call g_input_stream_read_finish() to get the result of the
10833  * operation.
10834  * During an async request no other sync and async calls are allowed on @stream, and will
10835  * result in %G_IO_ERROR_PENDING errors.
10836  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
10837  * On success, the number of bytes read into the buffer will be passed to the
10838  * callback. It is not an error if this is not the same as the requested size, as it
10839  * can happen e.g. near the end of a file, but generally we try to read
10840  * as many bytes as requested. Zero is returned on end of file
10841  * (or if @count is zero),  but never otherwise.
10842  * Any outstanding i/o request with higher priority (lower numerical value) will
10843  * be executed before an outstanding request with lower priority. Default
10844  * priority is %G_PRIORITY_DEFAULT.
10845  * The asyncronous methods have a default fallback that uses threads to implement
10846  * asynchronicity, so they are optional for inheriting classes. However, if you
10847  * override one you must override all.
10848  */
10849
10850
10851 /**
10852  * g_data_input_stream_new:
10853  * @base_stream: a #GInputStream.
10854  *
10855  * Creates a new data input stream for the @base_stream.
10856  *
10857  * Returns: a new #GDataInputStream.
10858  */
10859
10860
10861 /**
10862  * g_file_get_uri:
10863  * @file: input #GFile.
10864  *
10865  * Gets the URI for the @file.
10866  * This call does no blocking i/o.
10867  * The returned string should be freed with g_free() when no longer needed.
10868  *
10869  * Returns: a string containing the #GFile's URI.
10870  */
10871
10872
10873 /**
10874  * g_mount_get_volume:
10875  * @mount: a #GMount.
10876  *
10877  * Gets the volume for the @mount.
10878  * The returned object should be unreffed with
10879  * g_object_unref() when no longer needed.
10880  *
10881  * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
10882  */
10883
10884
10885 /**
10886  * g_buffered_input_stream_get_available:
10887  * @stream: #GBufferedInputStream
10888  *
10889  * Gets the size of the available data within the stream.
10890  *
10891  * Returns: size of the available stream.
10892  */
10893
10894
10895 /**
10896  * g_settings_reset:
10897  * @settings: a #GSettings object
10898  * @key: the name of a key
10899  *
10900  * Resets @key to its default value.
10901  * This call resets the key, as much as possible, to its default value.
10902  * That might the value specified in the schema or the one set by the
10903  * administrator.
10904  */
10905
10906
10907 /**
10908  * SECTION:gdbusaddres:
10909  * @title: D-Bus Addresses
10910  * @short_description: D-Bus connection endpoints
10911  * @include: gio/gio.h
10912  *
10913  * Routines for working with D-Bus addresses. A D-Bus address is a string
10914  * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
10915  * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;addresses">D-Bus specification</link>.
10916  */
10917
10918
10919 /**
10920  * g_volume_eject_finish:
10921  * @volume: pointer to a #GVolume.
10922  * @result: a #GAsyncResult.
10923  * @error: a #GError location to store an error, or %NULL to ignore
10924  *
10925  * Finishes ejecting a volume. If any errors occured during the operation,
10926  *
10927  * Returns: %TRUE, %FALSE if operation failed.
10928  * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
10929  */
10930
10931
10932 /**
10933  * g_volume_mount:
10934  * @volume: a #GVolume.
10935  * @flags: flags affecting the operation
10936  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
10937  * @cancellable: optional #GCancellable object, %NULL to ignore.
10938  * @callback: a #GAsyncReadyCallback, or %NULL.
10939  * @user_data: user data that gets passed to @callback
10940  *
10941  * Mounts a volume. This is an asynchronous operation, and is
10942  * finished by calling g_volume_mount_finish() with the @volume
10943  * and #GAsyncResult returned in the @callback.
10944  *
10945  * Virtual: mount_fn
10946  */
10947
10948
10949 /**
10950  * g_unix_mount_points_changed_since:
10951  * @time: guint64 to contain a timestamp.
10952  *
10953  * Checks if the unix mount points have changed since a given unix time.
10954  *
10955  * Returns: %TRUE if the mount points have changed since @time.
10956  */
10957
10958
10959 /**
10960  * SECTION:gdbusauthobserve:
10961  * @short_description: Object used for authenticating connections
10962  * @include: gio/gio.h
10963  *
10964  * The #GDBusAuthObserver type provides a mechanism for participating
10965  * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
10966  * peers. Simply instantiate a #GDBusAuthObserver and connect to the
10967  * signals you are interested in. Note that new signals may be added
10968  * in the future
10969  * For example, if you only want to allow D-Bus connections from
10970  * processes owned by the same uid as the server, you would use a
10971  * signal handler like the following:
10972  * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
10973  * static gboolean
10974  * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
10975  * GIOStream         *stream,
10976  * GCredentials      *credentials,
10977  * gpointer           user_data)
10978  * {
10979  * gboolean authorized;
10980  * authorized = FALSE;
10981  * if (credentials != NULL)
10982  * {
10983  * GCredentials *own_credentials;
10984  * own_credentials = g_credentials_new ();
10985  * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
10986  * authorized = TRUE;
10987  * g_object_unref (own_credentials);
10988  * }
10989  * return authorized;
10990  * }
10991  * </programlisting></example>
10992  */
10993
10994
10995 /**
10996  * g_settings_set_string:
10997  * @settings: a #GSettings object
10998  * @key: the name of the key to set
10999  * @value: the value to set it to
11000  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
11001  *
11002  * Sets @key in @settings to @value.
11003  * A convenience variant of g_settings_set() for strings.
11004  * It is a programmer error to give a @key that isn't specified as
11005  * having a string type in the schema for @settings.
11006  *
11007  * Since: 2.26
11008  */
11009
11010
11011 /**
11012  * g_mount_unmount_finish:
11013  * @mount: a #GMount.
11014  * @result: a #GAsyncResult.
11015  * @error: a #GError location to store the error occuring, or %NULL to ignore.
11016  *
11017  * Finishes unmounting a mount. If any errors occurred during the operation,
11018  *
11019  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
11020  * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
11021  */
11022
11023
11024 /**
11025  * g_buffered_output_stream_get_buffer_size:
11026  * @stream: a #GBufferedOutputStream.
11027  *
11028  * Gets the size of the buffer in the @stream.
11029  *
11030  * Returns: the current size of the buffer.
11031  */
11032
11033
11034 /**
11035  * g_action_group_list_actions:
11036  * @action_group: a #GActionGroup
11037  *
11038  * Lists the actions contained within @action_group.
11039  * The caller is responsible for freeing the list with g_strfreev() when
11040  * it is no longer required.
11041  * actions in the groupb
11042  *
11043  * Returns: (transfer full): a %NULL-terminated array of the names of the
11044  * Since: 2.28
11045  */
11046
11047
11048 /**
11049  * g_dbus_method_invocation_return_error_literal:
11050  * @invocation: A #GDBusMethodInvocation.
11051  * @domain: A #GQuark for the #GError error domain.
11052  * @code: The error code.
11053  * @message: The error message.
11054  *
11055  * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
11056  * This method will free @invocation, you cannot use it afterwards.
11057  *
11058  * Since: 2.26
11059  */
11060
11061
11062 /**
11063  * g_dbus_message_get_serial:
11064  * @message: A #GDBusMessage.
11065  *
11066  * Gets the serial for @message.
11067  *
11068  * Returns: A #guint32.
11069  * Since: 2.26
11070  */
11071
11072
11073 /**
11074  * g_file_attribute_matcher_ref:
11075  * @matcher: a #GFileAttributeMatcher.
11076  *
11077  * References a file attribute matcher.
11078  *
11079  * Returns: a #GFileAttributeMatcher.
11080  */
11081
11082
11083 /**
11084  * g_file_info_new:
11085  *
11086  * Creates a new file info structure.
11087  *
11088  * Returns: a #GFileInfo.
11089  */
11090
11091
11092 /**
11093  * g_unix_output_stream_new:
11094  * @fd: a UNIX file descriptor
11095  * @close_fd: %TRUE to close the file descriptor when done
11096  *
11097  * Creates a new #GUnixOutputStream for the given @fd.
11098  * If @close_fd, is %TRUE, the file descriptor will be closed when
11099  * the output stream is destroyed.
11100  *
11101  * Returns: a new #GOutputStream
11102  */
11103
11104
11105 /**
11106  * g_input_stream_close:
11107  * @stream: A #GInputStream.
11108  * @cancellable: optional #GCancellable object, %NULL to ignore.
11109  * @error: location to store the error occuring, or %NULL to ignore
11110  *
11111  * Closes the stream, releasing resources related to it.
11112  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
11113  * Closing a stream multiple times will not return an error.
11114  * Streams will be automatically closed when the last reference
11115  * is dropped, but you might want to call this function to make sure
11116  * resources are released as early as possible.
11117  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
11118  * open after the stream is closed. See the documentation for the individual
11119  * stream for details.
11120  * On failure the first error that happened will be reported, but the close
11121  * operation will finish as much as possible. A stream that failed to
11122  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
11123  * is important to check and report the error to the user.
11124  * If @cancellable is not NULL, then the operation can be cancelled by
11125  * triggering the cancellable object from another thread. If the operation
11126  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
11127  * Cancelling a close will still leave the stream closed, but some streams
11128  * can use a faster close that doesn't block to e.g. check errors.
11129  *
11130  * Returns: %TRUE on success, %FALSE on failure
11131  */
11132
11133
11134 /**
11135  * g_dbus_annotation_info_lookup:
11136  * @annotations: A %NULL-terminated array of annotations or %NULL.
11137  * @name: The name of the annotation to look up.
11138  *
11139  * Looks up the value of an annotation.
11140  * This cost of this function is O(n) in number of annotations.
11141  *
11142  * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
11143  * Since: 2.26
11144  */
11145
11146
11147 /**
11148  * g_file_set_display_name_async:
11149  * @file: input #GFile.
11150  * @display_name: a string.
11151  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
11152  * @cancellable: optional #GCancellable object, %NULL to ignore.
11153  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
11154  * @user_data: the data to pass to callback function
11155  *
11156  * Asynchronously sets the display name for a given #GFile.
11157  * For more details, see g_file_set_display_name() which is
11158  * the synchronous version of this call.
11159  * When the operation is finished, @callback will be called. You can then call
11160  * g_file_set_display_name_finish() to get the result of the operation.
11161  */
11162
11163
11164 /**
11165  * g_socket_listener_accept_finish:
11166  * @listener: a #GSocketListener
11167  * @result: a #GAsyncResult.
11168  * @source_object: Optional #GObject identifying this source
11169  * @error: a #GError location to store the error occuring, or %NULL to ignore.
11170  *
11171  * Finishes an async accept operation. See g_socket_listener_accept_async()
11172  *
11173  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
11174  * Since: 2.22
11175  */
11176
11177
11178 /**
11179  * GSimpleAction:parameter-type:
11180  *
11181  * The type of the parameter that must be given when activating the
11182  * action.
11183  *
11184  * Since: 2.28
11185  */
11186
11187
11188 /**
11189  * g_proxy_supports_hostname:
11190  * @proxy: a #GProxy
11191  *
11192  * Some proxy protocols expect to be passed a hostname, which they
11193  * will resolve to an IP address themselves. Others, like SOCKS4, do
11194  * not allow this. This function will return %FALSE if @proxy is
11195  * implementing such a protocol. When %FALSE is returned, the caller
11196  * should resolve the destination hostname first, and then pass a
11197  * #GProxyAddress containing the stringified IP address to
11198  * g_proxy_connect() or g_proxy_connect_async().
11199  *
11200  * Returns: %TRUE if hostname resolution is supported.
11201  * Since: 2.26
11202  */
11203
11204
11205 /**
11206  * g_file_info_get_attribute_uint64:
11207  * @info: a #GFileInfo.
11208  * @attribute: a file attribute key.
11209  *
11210  * Gets a unsigned 64-bit integer contained within the attribute. If the
11211  * attribute does not contain an unsigned 64-bit integer, or is invalid,
11212  * 0 will be returned.
11213  *
11214  * Returns: a unsigned 64-bit integer from the attribute.
11215  */
11216
11217
11218 /**
11219  * g_dbus_message_get_sender:
11220  * @message: A #GDBusMessage.
11221  *
11222  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
11223  *
11224  * Returns: The value.
11225  * Since: 2.26
11226  */
11227
11228
11229 /**
11230  * g_mount_operation_set_username:
11231  * @op: a #GMountOperation.
11232  * @username: input username.
11233  *
11234  * Sets the user name within @op to @username.
11235  */
11236
11237
11238 /**
11239  * GDBusProxy:g-name:
11240  *
11241  * The well-known or unique name that the proxy is for.
11242  *
11243  * Since: 2.26
11244  */
11245
11246
11247 /**
11248  * g_mount_shadow:
11249  * @mount: A #GMount.
11250  *
11251  * Increments the shadow count on @mount. Usually used by
11252  * #GVolumeMonitor implementations when creating a shadow mount for
11253  * will need to emit the #GMount::changed signal on @mount manually.
11254  *
11255  * Since: 2.20
11256  */
11257
11258
11259 /**
11260  * g_file_query_filesystem_info_async:
11261  * @file: input #GFile.
11262  * @attributes: an attribute query string.
11263  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
11264  * @cancellable: optional #GCancellable object, %NULL to ignore.
11265  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
11266  * @user_data: the data to pass to callback function
11267  *
11268  * Asynchronously gets the requested information about the filesystem
11269  * that the specified @file is on. The result is a #GFileInfo object
11270  * that contains key-value attributes (such as type or size for the
11271  * file).
11272  * For more details, see g_file_query_filesystem_info() which is the
11273  * synchronous version of this call.
11274  * When the operation is finished, @callback will be called. You can
11275  * then call g_file_query_info_finish() to get the result of the
11276  * operation.
11277  */
11278
11279
11280 /**
11281  * g_file_attribute_info_list_add:
11282  * @list: a #GFileAttributeInfoList.
11283  * @name: the name of the attribute to add.
11284  * @type: the #GFileAttributeType for the attribute.
11285  * @flags: #GFileAttributeInfoFlags for the attribute.
11286  *
11287  * Adds a new attribute with @name to the @list, setting
11288  * its @type and @flags.
11289  */
11290
11291
11292 /**
11293  * GUnixInputStream:close-fd:
11294  *
11295  * Whether to close the file descriptor when the stream is closed.
11296  *
11297  * Since: 2.20
11298  */
11299
11300
11301 /**
11302  * g_content_type_from_mime_type:
11303  * @mime_type: a mime type string
11304  *
11305  * Tries to find a content type based on the mime type name.
11306  * or %NULL. Free with g_free()
11307  *
11308  * Returns: (allow-none): Newly allocated string with content type
11309  * Since: 2.18
11310  */
11311
11312
11313 /**
11314  * g_srv_target_get_port:
11315  * @target: a #GSrvTarget
11316  *
11317  * Gets @target's port
11318  *
11319  * Returns: @target's port
11320  * Since: 2.22
11321  */
11322
11323
11324 /**
11325  * g_mount_eject:
11326  * @mount: a #GMount.
11327  * @flags: flags affecting the unmount if required for eject
11328  * @cancellable: optional #GCancellable object, %NULL to ignore.
11329  * @callback: a #GAsyncReadyCallback, or %NULL.
11330  * @user_data: user data passed to @callback.
11331  *
11332  * Ejects a mount. This is an asynchronous operation, and is
11333  * finished by calling g_mount_eject_finish() with the @mount
11334  * and #GAsyncResult data returned in the @callback.
11335  *
11336  * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
11337  */
11338
11339
11340 /**
11341  * g_dbus_error_get_remote_error:
11342  * @error: A #GError.
11343  *
11344  * Gets the D-Bus error name used for @error, if any.
11345  * This function is guaranteed to return a D-Bus error name for all
11346  * #GError<!-- -->s returned from functions handling remote method
11347  * calls (e.g. g_dbus_connection_call_finish()) unless
11348  * g_dbus_error_strip_remote_error() has been used on @error.
11349  *
11350  * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
11351  * Since: 2.26
11352  */
11353
11354
11355 /**
11356  * SECTION:gsettingsbacken:
11357  * @title: GSettingsBackend
11358  * @short_description: an interface for settings backend implementations
11359  * @include: gio/gsettingsbackend.h
11360  * @see_also: #GSettings, #GIOExtensionPoint
11361  *
11362  * The #GSettingsBackend interface defines a generic interface for
11363  * non-strictly-typed data that is stored in a hierarchy. To implement
11364  * an alternative storage backend for #GSettings, you need to implement
11365  * the #GSettingsBackend interface and then make it implement the
11366  * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
11367  * The interface defines methods for reading and writing values, a
11368  * method for determining if writing of certain values will fail
11369  * (lockdown) and a change notification mechanism.
11370  * The semantics of the interface are very precisely defined and
11371  * implementations must carefully adhere to the expectations of
11372  * callers that are documented on each of the interface methods.
11373  * Some of the GSettingsBackend functions accept or return a #GTree.
11374  * These trees always have strings as keys and #GVariant as values.
11375  * g_settings_backend_create_tree() is a convenience function to create
11376  * suitable trees.
11377  * <note><para>
11378  * The #GSettingsBackend API is exported to allow third-party
11379  * implementations, but does not carry the same stability guarantees
11380  * as the public GIO API. For this reason, you have to define the
11381  * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
11382  * <filename>gio/gsettingsbackend.h</filename>
11383  * </para></note>
11384  */
11385
11386
11387 /**
11388  * g_dbus_interface_info_lookup_method:
11389  * @info: A #GDBusInterfaceInfo.
11390  * @name: A D-Bus method name (typically in CamelCase)
11391  *
11392  * Looks up information about a method.
11393  * This cost of this function is O(n) in number of methods.
11394  *
11395  * Returns: A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
11396  * Since: 2.26
11397  */
11398
11399
11400 /**
11401  * GDBusConnection:closed:
11402  *
11403  * A boolean specifying whether the connection has been closed.
11404  *
11405  * Since: 2.26
11406  */
11407
11408
11409 /**
11410  * g_zlib_compressor_new:
11411  * @format: The format to use for the compressed data
11412  * @level: compression level (0-9), -1 for default
11413  *
11414  * Creates a new #GZlibCompressor.
11415  *
11416  * Returns: a new #GZlibCompressor
11417  * Since: 2.24
11418  */
11419
11420
11421 /**
11422  * g_cancellable_disconnect:
11423  * @cancellable: A #GCancellable or %NULL.
11424  * @handler_id: Handler id of the handler to be disconnected, or %0.
11425  *
11426  * Disconnects a handler from a cancellable instance similar to
11427  * g_signal_handler_disconnect().  Additionally, in the event that a
11428  * signal handler is currently running, this call will block until the
11429  * handler has finished.  Calling this function from a
11430  * #GCancellable::cancelled signal handler will therefore result in a
11431  * deadlock.
11432  * This avoids a race condition where a thread cancels at the
11433  * same time as the cancellable operation is finished and the
11434  * signal handler is removed. See #GCancellable::cancelled for
11435  * details on how to use this.
11436  * If @cancellable is %NULL or @handler_id is %0 this function does
11437  * nothing.
11438  *
11439  * Since: 2.22
11440  */
11441
11442
11443 /**
11444  * g_input_stream_skip_finish:
11445  * @stream: a #GInputStream.
11446  * @result: a #GAsyncResult.
11447  * @error: a #GError location to store the error occuring, or %NULL to ignore.
11448  *
11449  * Finishes a stream skip operation.
11450  *
11451  * Returns: the size of the bytes skipped, or %-1 on error.
11452  */
11453
11454
11455 /**
11456  * g_resolver_set_default:
11457  * @resolver: the new default #GResolver
11458  *
11459  * Sets @resolver to be the application's default resolver (reffing
11460  * Future calls to g_resolver_get_default() will return this resolver.
11461  * This can be used if an application wants to perform any sort of DNS
11462  * caching or "pinning"; it can implement its own #GResolver that
11463  * calls the original default resolver for DNS operations, and
11464  * implements its own cache policies on top of that, and then set
11465  * itself as the default resolver for all later code to use.
11466  *
11467  * Since: 2.22
11468  */
11469
11470
11471 /**
11472  * g_dbus_annotation_info_unref:
11473  * @info: A #GDBusAnnotationInfo.
11474  *
11475  * If @info is statically allocated, does nothing. Otherwise decreases
11476  * the reference count of @info. When its reference count drops to 0,
11477  * the memory used is freed.
11478  *
11479  * Since: 2.26
11480  */
11481
11482
11483 /**
11484  * g_file_info_set_sort_order:
11485  * @info: a #GFileInfo.
11486  * @sort_order: a sort order integer.
11487  *
11488  * Sets the sort order attribute in the file info structure. See
11489  * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
11490  */
11491
11492
11493 /**
11494  * SECTION:goutputstrea:
11495  * @short_description: Base class for implementing streaming output
11496  * @include: gio/gio.h
11497  *
11498  * GOutputStream has functions to write to a stream (g_output_stream_write()),
11499  * to close a stream (g_output_stream_close()) and to flush pending writes
11500  * (g_output_stream_flush()).
11501  * To copy the content of an input stream to an output stream without
11502  * manually handling the reads and writes, use g_output_stream_splice().
11503  * All of these functions have async variants too.
11504  */
11505
11506
11507 /**
11508  * SECTION:gmemoryinputstrea:
11509  * @short_description: Streaming input operations on memory chunks
11510  * @include: gio/gio.h
11511  * @see_also: #GMemoryOutputStream
11512  *
11513  * #GMemoryInputStream is a class for using arbitrary
11514  * memory chunks as input for GIO streaming input operations.
11515  */
11516
11517
11518 /**
11519  * g_action_get_name:
11520  * @action: a #GAction
11521  *
11522  * Queries the name of @action.
11523  *
11524  * Returns: the name of the action
11525  * Since: 2.28
11526  */
11527
11528
11529 /**
11530  * SECTION:gvf:
11531  * @short_description: Virtual File System
11532  * @include: gio/gio.h
11533  *
11534  * Entry point for using GIO functionality.
11535  */
11536
11537
11538 /**
11539  * g_file_output_stream_query_info_async:
11540  * @stream: a #GFileOutputStream.
11541  * @attributes: a file attribute query string.
11542  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
11543  * @cancellable: optional #GCancellable object, %NULL to ignore.
11544  * @callback: callback to call when the request is satisfied
11545  * @user_data: the data to pass to callback function
11546  *
11547  * Asynchronously queries the @stream for a #GFileInfo. When completed,
11548  * finish the operation with g_file_output_stream_query_info_finish().
11549  * For the synchronous version of this function, see
11550  * g_file_output_stream_query_info().
11551  */
11552
11553
11554 /**
11555  * g_dbus_connection_remove_filter:
11556  * @connection: a #GDBusConnection
11557  * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
11558  *
11559  * Removes a filter.
11560  *
11561  * Since: 2.26
11562  */
11563
11564
11565 /**
11566  * g_resolver_lookup_by_name:
11567  * @resolver: a #GResolver
11568  * @hostname: the hostname to look up
11569  * @cancellable: a #GCancellable, or %NULL
11570  * @error: return location for a #GError, or %NULL
11571  *
11572  * Synchronously resolves @hostname to determine its associated IP
11573  * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
11574  * the textual form of an IP address (in which case this just becomes
11575  * a wrapper around g_inet_address_new_from_string()).
11576  * On success, g_resolver_lookup_by_name() will return a #GList of
11577  * #GInetAddress, sorted in order of preference. (That is, you should
11578  * attempt to connect to the first address first, then the second if
11579  * the first fails, etc.)
11580  * If the DNS resolution fails, @error (if non-%NULL) will be set to a
11581  * value from #GResolverError.
11582  * If @cancellable is non-%NULL, it can be used to cancel the
11583  * operation, in which case @error (if non-%NULL) will be set to
11584  * %G_IO_ERROR_CANCELLED.
11585  * If you are planning to connect to a socket on the resolved IP
11586  * address, it may be easier to create a #GNetworkAddress and use its
11587  * #GSocketConnectable interface.
11588  * of #GInetAddress, or %NULL on error. You
11589  * must unref each of the addresses and free the list when you are
11590  * done with it. (You can use g_resolver_free_addresses() to do this.)
11591  *
11592  * Returns: (element-type GInetAddress) (transfer full): a #GList
11593  * Since: 2.22
11594  */
11595
11596
11597 /**
11598  * g_socket_listener_accept_async:
11599  * @listener: a #GSocketListener
11600  * @cancellable: a #GCancellable, or %NULL
11601  * @callback: a #GAsyncReadyCallback
11602  * @user_data: user data for the callback
11603  *
11604  * This is the asynchronous version of g_socket_listener_accept().
11605  * When the operation is finished @callback will be
11606  * called. You can then call g_socket_listener_accept_socket()
11607  * to get the result of the operation.
11608  *
11609  * Since: 2.22
11610  */
11611
11612
11613 /**
11614  * g_mount_unshadow:
11615  * @mount: A #GMount.
11616  *
11617  * Decrements the shadow count on @mount. Usually used by
11618  * #GVolumeMonitor implementations when destroying a shadow mount for
11619  * will need to emit the #GMount::changed signal on @mount manually.
11620  *
11621  * Since: 2.20
11622  */
11623
11624
11625 /**
11626  * g_file_info_get_is_backup:
11627  * @info: a #GFileInfo.
11628  *
11629  * Checks if a file is a backup file.
11630  *
11631  * Returns: %TRUE if file is a backup file, %FALSE otherwise.
11632  */
11633
11634
11635 /**
11636  * g_dbus_connection_call:
11637  * @connection: A #GDBusConnection.
11638  * @bus_name: A unique or well-known bus name or %NULL if @connection is not a message bus connection.
11639  * @object_path: Path of remote object.
11640  * @interface_name: D-Bus interface to invoke method on.
11641  * @method_name: The name of the method to invoke.
11642  * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
11643  * @reply_type: The expected type of the reply, or %NULL.
11644  * @flags: Flags from the #GDBusCallFlags enumeration.
11645  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
11646  * @cancellable: A #GCancellable or %NULL.
11647  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
11648  * @user_data: The data to pass to @callback.
11649  *
11650  * Asynchronously invokes the @method_name method on the
11651  * If @connection is closed then the operation will fail with
11652  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
11653  * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
11654  * not compatible with the D-Bus protocol, the operation fails with
11655  * %G_IO_ERROR_INVALID_ARGUMENT.
11656  * If @reply_type is non-%NULL then the reply will be checked for having this type and an
11657  * error will be raised if it does not match.  Said another way, if you give a @reply_type
11658  * then any non-%NULL return value will be of this type.
11659  * If the @parameters #GVariant is floating, it is consumed. This allows
11660  * convenient 'inline' use of g_variant_new(), e.g.:
11661  * |[
11662  * g_dbus_connection_call (connection,
11663  * "org.freedesktop.StringThings",
11664  * "/org/freedesktop/StringThings",
11665  * "org.freedesktop.StringThings",
11666  * "TwoStrings",
11667  * g_variant_new ("(ss)",
11668  * "Thing One",
11669  * "Thing Two"),
11670  * NULL,
11671  * G_DBUS_CALL_FLAGS_NONE,
11672  * -1,
11673  * NULL,
11674  * (GAsyncReadyCallback) two_strings_done,
11675  * NULL);
11676  * ]|
11677  * This is an asynchronous method. When the operation is finished, @callback will be invoked
11678  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
11679  * of the thread you are calling this method from. You can then call
11680  * g_dbus_connection_call_finish() to get the result of the operation.
11681  * See g_dbus_connection_call_sync() for the synchronous version of this
11682  * function.
11683  *
11684  * Since: 2.26
11685  */
11686
11687
11688 /**
11689  * g_unix_fd_message_get_fd_list:
11690  * @message: a #GUnixFDMessage
11691  *
11692  * Gets the #GUnixFDList contained in @message.  This function does not
11693  * return a reference to the caller, but the returned list is valid for
11694  * the lifetime of @message.
11695  *
11696  * Returns: (transfer none): the #GUnixFDList from @message
11697  * Since: 2.24
11698  */
11699
11700
11701 /**
11702  * g_filter_input_stream_get_base_stream:
11703  * @stream: a #GFilterInputStream.
11704  *
11705  * Gets the base stream for the filter stream.
11706  *
11707  * Returns: (transfer none): a #GInputStream.
11708  */
11709
11710
11711 /**
11712  * g_data_input_stream_get_byte_order:
11713  * @stream: a given #GDataInputStream.
11714  *
11715  * Gets the byte order for the data input stream.
11716  *
11717  * Returns: the @stream's current #GDataStreamByteOrder.
11718  */
11719
11720
11721 /**
11722  * SECTION:gdbuserro:
11723  * @title: GDBusError
11724  * @short_description: Mapping D-Bus errors to and from GError
11725  * @include: gio/gio.h
11726  *
11727  * All facilities that return errors from remote methods (such as
11728  * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
11729  * errors (e.g. errors returned from the other peer) and locally
11730  * in-process generated errors.
11731  * To check if a returned #GError is an error from a remote peer, use
11732  * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
11733  * use g_dbus_error_get_remote_error(). Before presenting an error,
11734  * always use g_dbus_error_strip_remote_error().
11735  * In addition, facilities used to return errors to a remote peer also
11736  * use #GError. See g_dbus_method_invocation_return_error() for
11737  * discussion about how the D-Bus error name is set.
11738  * Applications can associate a #GError error domain with a set of D-Bus errors in order to
11739  * automatically map from D-Bus errors to #GError and back. This
11740  * is typically done in the function returning the #GQuark for the
11741  * error domain:
11742  * <example id="error-registration"><title>Error Registration</title><programlisting>
11743  * /<!-- -->* foo-bar-error.h: *<!-- -->/
11744  * #define FOO_BAR_ERROR (foo_bar_error_quark ())
11745  * GQuark foo_bar_error_quark (void);
11746  * typedef enum
11747  * {
11748  * FOO_BAR_ERROR_FAILED,
11749  * FOO_BAR_ERROR_ANOTHER_ERROR,
11750  * FOO_BAR_ERROR_SOME_THIRD_ERROR,
11751  * } FooBarError;
11752  * /<!-- -->* foo-bar-error.c: *<!-- -->/
11753  * static const GDBusErrorEntry foo_bar_error_entries[] =
11754  * {
11755  * {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
11756  * {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
11757  * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
11758  * };
11759  * GQuark
11760  * foo_bar_error_quark (void)
11761  * {
11762  * static volatile gsize quark_volatile = 0;
11763  * g_dbus_error_register_error_domain ("foo-bar-error-quark",
11764  * &quark_volatile,
11765  * foo_bar_error_entries,
11766  * G_N_ELEMENTS (foo_bar_error_entries));
11767  * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
11768  * return (GQuark) quark_volatile;
11769  * }
11770  * </programlisting></example>
11771  * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
11772  * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
11773  * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
11774  * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
11775  * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
11776  * Note that errors in the %G_DBUS_ERROR error domain is intended only
11777  * for returning errors from a remote message bus process. Errors
11778  * generated locally in-process by e.g. #GDBusConnection is from the
11779  * %G_IO_ERROR domain.
11780  */
11781
11782
11783 /**
11784  * g_seekable_truncate:
11785  * @seekable: a #GSeekable.
11786  * @offset: a #goffset.
11787  * @cancellable: optional #GCancellable object, %NULL to ignore.
11788  * @error: a #GError location to store the error occuring, or %NULL to ignore.
11789  *
11790  * Truncates a stream with a given #offset.
11791  * If @cancellable is not %NULL, then the operation can be cancelled by
11792  * triggering the cancellable object from another thread. If the operation
11793  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
11794  * operation was partially finished when the operation was cancelled the
11795  * partial result will be returned, without an error.
11796  * has occurred, this function will return %FALSE and set @error
11797  * appropriately if present.
11798  *
11799  * Virtual: truncate_fn
11800  * Returns: %TRUE if successful. If an error
11801  */
11802
11803
11804 /**
11805  * g_dbus_message_new_method_error:
11806  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
11807  * @error_name: A valid D-Bus error name.
11808  * @error_message_format: The D-Bus error message in a printf() format.
11809  * @...: Arguments for @error_message_format.
11810  *
11811  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
11812  *
11813  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
11814  * Since: 2.26
11815  */
11816
11817
11818 /**
11819  * g_volume_eject_with_operation:
11820  * @volume: a #GVolume.
11821  * @flags: flags affecting the unmount if required for eject
11822  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
11823  * @cancellable: optional #GCancellable object, %NULL to ignore.
11824  * @callback: a #GAsyncReadyCallback, or %NULL.
11825  * @user_data: user data passed to @callback.
11826  *
11827  * Ejects a volume. This is an asynchronous operation, and is
11828  * finished by calling g_volume_eject_with_operation_finish() with the @volume
11829  * and #GAsyncResult data returned in the @callback.
11830  *
11831  * Since: 2.22
11832  */
11833
11834
11835 /**
11836  * g_settings_bind:
11837  * @settings: a #GSettings object
11838  * @key: the key to bind
11839  * @object: a #GObject
11840  * @property: the name of the property to bind
11841  * @flags: flags for the binding
11842  *
11843  * Create a binding between the @key in the @settings object
11844  * and the property @property of @object.
11845  * The binding uses the default GIO mapping functions to map
11846  * between the settings and property values. These functions
11847  * handle booleans, numeric types and string types in a
11848  * straightforward way. Use g_settings_bind_with_mapping() if
11849  * you need a custom mapping, or map between types that are not
11850  * supported by the default mapping functions.
11851  * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
11852  * function also establishes a binding between the writability of
11853  * a boolean property by that name). See g_settings_bind_writable()
11854  * for more details about writable bindings.
11855  * Note that the lifecycle of the binding is tied to the object,
11856  * and that you can have only one binding per object property.
11857  * If you bind the same property twice on the same object, the second
11858  * binding overrides the first one.
11859  *
11860  * Since: 2.26
11861  */
11862
11863
11864 /**
11865  * g_socket_client_connect_to_host_async:
11866  * @client: a #GTcpClient
11867  * @host_and_port: the name and optionally the port of the host to connect to
11868  * @default_port: the default port to connect to
11869  * @cancellable: a #GCancellable, or %NULL
11870  * @callback: a #GAsyncReadyCallback
11871  * @user_data: user data for the callback
11872  *
11873  * This is the asynchronous version of g_socket_client_connect_to_host().
11874  * When the operation is finished @callback will be
11875  * called. You can then call g_socket_client_connect_to_host_finish() to get
11876  * the result of the operation.
11877  *
11878  * Since: 2.22
11879  */
11880
11881
11882 /**
11883  * g_file_info_set_content_type:
11884  * @info: a #GFileInfo.
11885  * @content_type: a content type. See #GContentType.
11886  *
11887  * Sets the content type attribute for a given #GFileInfo.
11888  * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
11889  */
11890
11891
11892 /**
11893  * g_loadable_icon_load_async:
11894  * @icon: a #GLoadableIcon.
11895  * @size: an integer.
11896  * @cancellable: optional #GCancellable object, %NULL to ignore.
11897  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
11898  * @user_data: the data to pass to callback function
11899  *
11900  * Loads an icon asynchronously. To finish this function, see
11901  * g_loadable_icon_load_finish(). For the synchronous, blocking
11902  * version of this function, see g_loadable_icon_load().
11903  */
11904
11905
11906 /**
11907  * g_dbus_message_new_from_blob:
11908  * @blob: A blob represent a binary D-Bus message.
11909  * @blob_len: The length of @blob.
11910  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
11911  * @error: Return location for error or %NULL.
11912  *
11913  * Creates a new #GDBusMessage from the data stored at @blob. The byte
11914  * order that the message was in can be retrieved using
11915  * g_dbus_message_get_byte_order().
11916  * g_object_unref().
11917  *
11918  * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
11919  * Since: 2.26
11920  */
11921
11922
11923 /**
11924  * g_dbus_error_set_dbus_error:
11925  * @error: A pointer to a #GError or %NULL.
11926  * @dbus_error_name: D-Bus error name.
11927  * @dbus_error_message: D-Bus error message.
11928  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
11929  * @...: Arguments for @format.
11930  *
11931  * Does nothing if @error is %NULL. Otherwise sets *@error to
11932  * a new #GError created with g_dbus_error_new_for_dbus_error()
11933  * with @dbus_error_message prepend with @format (unless %NULL).
11934  *
11935  * Since: 2.26
11936  */
11937
11938
11939 /**
11940  * g_file_query_info_finish:
11941  * @file: input #GFile.
11942  * @res: a #GAsyncResult.
11943  * @error: a #GError.
11944  *
11945  * Finishes an asynchronous file info query.
11946  * See g_file_query_info_async().
11947  * Free the returned object with g_object_unref().
11948  *
11949  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
11950  */
11951
11952
11953 /**
11954  * GDBusConnection:unique-name:
11955  *
11956  * The unique name as assigned by the message bus or %NULL if the
11957  * connection is not open or not a message bus connection.
11958  *
11959  * Since: 2.26
11960  */
11961
11962
11963 /**
11964  * g_file_attribute_info_list_lookup:
11965  * @list: a #GFileAttributeInfoList.
11966  * @name: the name of the attribute to lookup.
11967  *
11968  * Gets the file attribute with the name @name from @list.
11969  * attribute isn't found.
11970  *
11971  * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
11972  */
11973
11974
11975 /**
11976  * g_file_enumerator_close_finish:
11977  * @enumerator: a #GFileEnumerator.
11978  * @result: a #GAsyncResult.
11979  * @error: a #GError location to store the error occuring, or %NULL to ignore.
11980  *
11981  * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
11982  * If the file enumerator was already closed when g_file_enumerator_close_async()
11983  * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
11984  * return %FALSE. If the file enumerator had pending operation when the close
11985  * operation was started, then this function will report %G_IO_ERROR_PENDING, and
11986  * return %FALSE.  If @cancellable was not %NULL, then the operation may have been
11987  * cancelled by triggering the cancellable object from another thread. If the operation
11988  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
11989  * returned.
11990  *
11991  * Returns: %TRUE if the close operation has finished successfully.
11992  */
11993
11994
11995 /**
11996  * GSimpleAction:name:
11997  *
11998  * The name of the action.  This is mostly meaningful for identifying
11999  * the action once it has been added to a #GSimpleActionGroup.
12000  *
12001  * Since: 2.28
12002  */
12003
12004
12005 /**
12006  * g_app_info_set_as_default_for_type:
12007  * @appinfo: a #GAppInfo.
12008  * @content_type: the content type.
12009  * @error: a #GError.
12010  *
12011  * Sets the application as the default handler for a given type.
12012  *
12013  * Returns: %TRUE on success, %FALSE on error.
12014  */
12015
12016
12017 /**
12018  * g_filter_input_stream_get_close_base_stream:
12019  * @stream: a #GFilterInputStream.
12020  *
12021  * Returns whether the base stream will be closed when @stream is
12022  * closed.
12023  *
12024  * Returns: %TRUE if the base stream will be closed.
12025  */
12026
12027
12028 /**
12029  * GPeriodic:
12030  *
12031  * #GPeriodic is an opaque structure type.
12032  *
12033  * Since: 2.28
12034  */
12035
12036
12037 /**
12038  * g_io_stream_clear_pending:
12039  * @stream: a #GIOStream
12040  *
12041  * Clears the pending flag on @stream.
12042  *
12043  * Since: 2.22
12044  */
12045
12046
12047 /**
12048  * g_permission_release_async:
12049  * @permission: a #GPermission instance
12050  * @cancellable: a #GCancellable, or %NULL
12051  * @callback: the #GAsyncReadyCallback to call when done
12052  * @user_data: the user data to pass to @callback
12053  *
12054  * Attempts to release the permission represented by @permission.
12055  * This is the first half of the asynchronous version of
12056  * g_permission_release().
12057  *
12058  * Since: 2.26
12059  */
12060
12061
12062 /**
12063  * g_unix_mount_guess_name:
12064  * @mount_entry: a #GUnixMountEntry
12065  *
12066  * Guesses the name of a Unix mount.
12067  * The result is a translated string.
12068  * be freed with g_free()
12069  *
12070  * Returns: A newly allocated string that must
12071  */
12072
12073
12074 /**
12075  * GDBusConnection:exit-on-close:
12076  *
12077  * A boolean specifying whether the process will be terminated (by
12078  * calling <literal>raise(SIGTERM)</literal>) if the connection
12079  * is closed by the remote peer.
12080  *
12081  * Since: 2.26
12082  */
12083
12084
12085 /**
12086  * g_simple_async_result_get_source_tag: (skip)
12087  * @simple: a #GSimpleAsyncResult.
12088  *
12089  * Gets the source tag for the #GSimpleAsyncResult.
12090  *
12091  * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
12092  */
12093
12094
12095 /**
12096  * SECTION:gemble:
12097  * @short_description: An object for emblems
12098  * @include: gio/gio.h
12099  * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
12100  *
12101  * #GEmblem is an implementation of #GIcon that supports
12102  * having an emblem, which is an icon with additional properties.
12103  * It can than be added to a #GEmblemedIcon.
12104  * Currently, only metainformation about the emblem's origin is
12105  * supported. More may be added in the future.
12106  */
12107
12108
12109 /**
12110  * g_threaded_socket_service_new:
12111  * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
12112  *
12113  * Creates a new #GThreadedSocketService with no listeners. Listeners
12114  * must be added with g_socket_service_add_listeners().
12115  *
12116  * Returns: a new #GSocketService.
12117  * Since: 2.22
12118  */
12119
12120
12121 /**
12122  * g_file_monitor_cancel:
12123  * @monitor: a #GFileMonitor.
12124  *
12125  * Cancels a file monitor.
12126  *
12127  * Returns: %TRUE if monitor was cancelled.
12128  */
12129
12130
12131 /**
12132  * SECTION:gfileiostrea:
12133  * @short_description: File read and write streaming operations
12134  * @include: gio/gio.h
12135  * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
12136  *
12137  * GFileIOStream provides io streams that both read and write to the same
12138  * file handle.
12139  * GFileIOStream implements #GSeekable, which allows the io
12140  * stream to jump to arbitrary positions in the file and to truncate
12141  * the file, provided the filesystem of the file supports these
12142  * operations.
12143  * To find the position of a file io stream, use
12144  * g_seekable_tell().
12145  * To find out if a file io stream supports seeking, use g_seekable_can_seek().
12146  * To position a file io stream, use g_seekable_seek().
12147  * To find out if a file io stream supports truncating, use
12148  * g_seekable_can_truncate(). To truncate a file io
12149  * stream, use g_seekable_truncate().
12150  * The default implementation of all the #GFileIOStream operations
12151  * and the implementation of #GSeekable just call into the same operations
12152  * on the output stream.
12153  *
12154  * Since: 2.22
12155  */
12156
12157
12158 /**
12159  * g_mount_get_root:
12160  * @mount: a #GMount.
12161  *
12162  * Gets the root directory on @mount.
12163  * The returned object should be unreffed with
12164  * g_object_unref() when no longer needed.
12165  *
12166  * Returns: (transfer full): a #GFile.
12167  */
12168
12169
12170 /**
12171  * SECTION:gunixmount:
12172  * @include: gio/gunixmounts.h
12173  * @short_description: UNIX mounts
12174  *
12175  * Routines for managing mounted UNIX mount points and paths.
12176  * Note that <filename>&lt;gio/gunixmounts.h&gt;</filename> belongs to the
12177  * UNIX-specific GIO interfaces, thus you have to use the
12178  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12179  */
12180
12181
12182 /**
12183  * g_mount_unmount_with_operation_finish:
12184  * @mount: a #GMount.
12185  * @result: a #GAsyncResult.
12186  * @error: a #GError location to store the error occuring, or %NULL to ignore.
12187  *
12188  * Finishes unmounting a mount. If any errors occurred during the operation,
12189  *
12190  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
12191  * Since: 2.22
12192  */
12193
12194
12195 /**
12196  * g_app_info_launch:
12197  * @appinfo: a #GAppInfo
12198  * @files: (element-type GFile): a #GList of #GFile objects
12199  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
12200  * @error: a #GError
12201  *
12202  * Launches the application. Passes @files to the launched application
12203  * as arguments, using the optional @launch_context to get information
12204  * about the details of the launcher (like what screen it is on).
12205  * On error, @error will be set accordingly.
12206  * To launch the application without arguments pass a %NULL @files list.
12207  * Note that even if the launch is successful the application launched
12208  * can fail to start if it runs into problems during startup. There is
12209  * no way to detect this.
12210  * Some URIs can be changed when passed through a GFile (for instance
12211  * unsupported uris with strange formats like mailto:), so if you have
12212  * a textual uri you want to pass in as argument, consider using
12213  * g_app_info_launch_uris() instead.
12214  * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
12215  * environment variable with the path of the launched desktop file and
12216  * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
12217  * id of the launched process. This can be used to ignore
12218  * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
12219  * by further processes. The <envar>DISPLAY</envar> and
12220  * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
12221  * set, based on information provided in @launch_context.
12222  *
12223  * Returns: %TRUE on successful launch, %FALSE otherwise.
12224  */
12225
12226
12227 /**
12228  * GVolumeMonitor::drive-disconnected:
12229  * @volume_monitor: The volume monitor emitting the signal.
12230  * @drive: a #GDrive that was disconnected.
12231  *
12232  * Emitted when a drive is disconnected from the system.
12233  */
12234
12235
12236 /**
12237  * g_bus_watch_name:
12238  * @bus_type: The type of bus to watch a name on.
12239  * @name: The name (well-known or unique) to watch.
12240  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
12241  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
12242  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
12243  * @user_data: User data to pass to handlers.
12244  * @user_data_free_func: Function for freeing @user_data or %NULL.
12245  *
12246  * Starts watching @name on the bus specified by @bus_type and calls
12247  * known to have a owner respectively known to lose its
12248  * owner. Callbacks will be invoked in the <link
12249  * linkend="g-main-context-push-thread-default">thread-default main
12250  * loop</link> of the thread you are calling this function from.
12251  * You are guaranteed that one of the handlers will be invoked after
12252  * calling this function. When you are done watching the name, just
12253  * call g_bus_unwatch_name() with the watcher id this function
12254  * returns.
12255  * If the name vanishes or appears (for example the application owning
12256  * the name could restart), the handlers are also invoked. If the
12257  * #GDBusConnection that is used for watching the name disconnects, then
12258  * possible to access the name.
12259  * Another guarantee is that invocations of @name_appeared_handler
12260  * and @name_vanished_handler are guaranteed to alternate; that
12261  * is, if @name_appeared_handler is invoked then you are
12262  * guaranteed that the next time one of the handlers is invoked, it
12263  * will be @name_vanished_handler. The reverse is also true.
12264  * This behavior makes it very simple to write applications that wants
12265  * to take action when a certain name exists, see <xref
12266  * linkend="gdbus-watching-names"/>. Basically, the application
12267  * should create object proxies in @name_appeared_handler and destroy
12268  * them again (if any) in @name_vanished_handler.
12269  * g_bus_unwatch_name() to stop watching the name.
12270  *
12271  * Returns: An identifier (never 0) that an be used with
12272  * Since: 2.26
12273  */
12274
12275
12276 /**
12277  * g_desktop_app_info_new_from_filename:
12278  * @filename: the path of a desktop file, in the GLib filename encoding
12279  *
12280  * Creates a new #GDesktopAppInfo.
12281  *
12282  * Returns: a new #GDesktopAppInfo or %NULL on error.
12283  */
12284
12285
12286 /**
12287  * g_io_extension_point_get_extension_by_name:
12288  * @extension_point: a #GIOExtensionPoint
12289  * @name: the name of the extension to get
12290  *
12291  * Finds a #GIOExtension for an extension point by name.
12292  * given name, or %NULL if there is no extension with that name
12293  *
12294  * Returns: (transfer none): the #GIOExtension for @extension_point that has the
12295  */
12296
12297
12298 /**
12299  * g_dbus_server_stop:
12300  * @server: A #GDBusServer.
12301  *
12302  * Stops @server.
12303  *
12304  * Since: 2.26
12305  */
12306
12307
12308 /**
12309  * g_volume_can_eject:
12310  * @volume: a #GVolume.
12311  *
12312  * Checks if a volume can be ejected.
12313  *
12314  * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
12315  */
12316
12317
12318 /**
12319  * g_app_info_create_from_commandline:
12320  * @commandline: the commandline to use
12321  * @application_name: (allow-none): the application name, or %NULL to use @commandline
12322  * @flags: flags that can specify details of the created #GAppInfo
12323  * @error: a #GError location to store the error occuring, %NULL to ignore.
12324  *
12325  * Creates a new #GAppInfo from the given information.
12326  *
12327  * Returns: (transfer full): new #GAppInfo for given command.
12328  */
12329
12330
12331 /**
12332  * g_socket_client_get_protocol:
12333  * @client: a #GSocketClient
12334  *
12335  * Gets the protocol name type of the socket client.
12336  * See g_socket_client_set_protocol() for details.
12337  *
12338  * Returns: a #GSocketProtocol
12339  * Since: 2.22
12340  */
12341
12342
12343 /**
12344  * g_dbus_message_get_body:
12345  * @message: A #GDBusMessage.
12346  *
12347  * Gets the body of a message.
12348  *
12349  * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
12350  * Since: 2.26
12351  */
12352
12353
12354 /**
12355  * g_permission_get_can_acquire:
12356  * @permission: a #GPermission instance
12357  * @returns: the value of the 'can-acquire' property
12358  *
12359  * Gets the value of the 'can-acquire' property.  This property is %TRUE
12360  * if it is generally possible to acquire the permission by calling
12361  * g_permission_acquire().
12362  *
12363  * Since: 2.26
12364  */
12365
12366
12367 /**
12368  * g_desktop_app_info_new:
12369  * @desktop_id: the desktop file id
12370  *
12371  * Creates a new #GDesktopAppInfo based on a desktop file id.
12372  * A desktop file id is the basename of the desktop file, including the
12373  * .desktop extension. GIO is looking for a desktop file with this name
12374  * in the <filename>applications</filename> subdirectories of the XDG data
12375  * directories (i.e. the directories specified in the
12376  * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
12377  * variables). GIO also supports the prefix-to-subdirectory mapping that is
12378  * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
12379  * (i.e. a desktop id of kde-foo.desktop will match
12380  * <filename>/usr/share/applications/kde/foo.desktop</filename>).
12381  *
12382  * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
12383  */
12384
12385
12386 /**
12387  * g_io_scheduler_job_send_to_mainloop_async:
12388  * @job: a #GIOSchedulerJob
12389  * @func: a #GSourceFunc callback that will be called in the original thread
12390  * @user_data: data to pass to @func
12391  * @notify: a #GDestroyNotify for @user_data, or %NULL
12392  *
12393  * Used from an I/O job to send a callback to be run asynchronously in
12394  * the thread that the job was started from. The callback will be run
12395  * when the main loop is available, but at that time the I/O job might
12396  * have finished. The return value from the callback is ignored.
12397  * Note that if you are passing the @user_data from g_io_scheduler_push_job()
12398  * on to this function you have to ensure that it is not freed before
12399  * g_io_scheduler_push_job() or by using refcounting for @user_data.
12400  */
12401
12402
12403 /**
12404  * g_application_command_line_getenv:
12405  * @cmdline: a #GApplicationCommandLine
12406  * @name: the environment variable to get
12407  *
12408  * Gets the value of a particular environment variable of the command
12409  * line invocation, as would be returned by g_getenv().  The strings may
12410  * contain non-utf8 data.
12411  * The remote application usually does not send an environment.  Use
12412  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
12413  * set it is possible that the environment is still not available (due
12414  * to invocation messages from other applications).
12415  * The return value should not be modified or freed and is valid for as
12416  * long as @cmdline exists.
12417  *
12418  * Returns: the value of the variable, or %NULL if unset or unsent
12419  * Since: 2.28
12420  */
12421
12422
12423 /**
12424  * g_simple_async_result_set_from_error:
12425  * @simple: a #GSimpleAsyncResult.
12426  * @error: #GError.
12427  *
12428  * Sets the result from a #GError.
12429  */
12430
12431
12432 /**
12433  * g_file_info_set_attribute_int64:
12434  * @info: a #GFileInfo.
12435  * @attribute: attribute name to set.
12436  * @attr_value: int64 value to set attribute to.
12437  *
12438  * Sets the @attribute to contain the given @attr_value,
12439  * if possible.
12440  */
12441
12442
12443 /**
12444  * g_data_input_stream_read_uint16:
12445  * @stream: a given #GDataInputStream.
12446  * @cancellable: optional #GCancellable object, %NULL to ignore.
12447  * @error: #GError for error reporting.
12448  *
12449  * Reads an unsigned 16-bit/2-byte value from @stream.
12450  * In order to get the correct byte order for this read operation,
12451  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
12452  * an error occurred.
12453  *
12454  * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
12455  */
12456
12457
12458 /**
12459  * g_socket_client_set_socket_type:
12460  * @client: a #GSocketClient.
12461  * @type: a #GSocketType
12462  *
12463  * Sets the socket type of the socket client.
12464  * The sockets created by this object will be of the specified
12465  * type.
12466  * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
12467  * as GSocketClient is used for connection oriented services.
12468  *
12469  * Since: 2.22
12470  */
12471
12472
12473 /**
12474  * GDBusAuthMechanism:credentials:
12475  *
12476  * If authenticating as a server, this property contains the
12477  * received credentials, if any.
12478  * If authenticating as a client, the property contains the
12479  * credentials that were sent, if any.
12480  */
12481
12482
12483 /**
12484  * g_io_extension_point_set_required_type:
12485  * @extension_point: a #GIOExtensionPoint
12486  * @type: the #GType to require
12487  *
12488  * Sets the required type for @extension_point to @type.
12489  * All implementations must henceforth have this type.
12490  */
12491
12492
12493 /**
12494  * g_converter_reset:
12495  * @converter: a #GConverter.
12496  *
12497  * Resets all internal state in the converter, making it behave
12498  * as if it was just created. If the converter has any internal
12499  * state that would produce output then that output is lost.
12500  *
12501  * Since: 2.24
12502  */
12503
12504
12505 /**
12506  * g_buffered_output_stream_new_sized:
12507  * @base_stream: a #GOutputStream.
12508  * @size: a #gsize.
12509  *
12510  * Creates a new buffered output stream with a given buffer size.
12511  *
12512  * Returns: a #GOutputStream with an internal buffer set to @size.
12513  */
12514
12515
12516 /**
12517  * GDBusServer:active:
12518  *
12519  * Whether the server is currently active.
12520  *
12521  * Since: 2.26
12522  */
12523
12524
12525 /**
12526  * g_file_set_attribute_byte_string:
12527  * @file: input #GFile.
12528  * @attribute: a string containing the attribute's name.
12529  * @value: a string containing the attribute's new value.
12530  * @flags: a #GFileQueryInfoFlags.
12531  * @cancellable: optional #GCancellable object, %NULL to ignore.
12532  * @error: a #GError, or %NULL
12533  *
12534  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
12535  * If @attribute is of a different type, this operation will fail,
12536  * returning %FALSE.
12537  * If @cancellable is not %NULL, then the operation can be cancelled by
12538  * triggering the cancellable object from another thread. If the operation
12539  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
12540  * in the @file, %FALSE otherwise.
12541  *
12542  * Returns: %TRUE if the @attribute was successfully set to @value
12543  */
12544
12545
12546 /**
12547  * g_socket_listen:
12548  * @socket: a #GSocket.
12549  * @error: #GError for error reporting, or %NULL to ignore.
12550  *
12551  * Marks the socket as a server socket, i.e. a socket that is used
12552  * to accept incoming requests using g_socket_accept().
12553  * Before calling this the socket must be bound to a local address using
12554  * g_socket_bind().
12555  * To set the maximum amount of outstanding clients, use
12556  * g_socket_set_listen_backlog().
12557  *
12558  * Returns: %TRUE on success, %FALSE on error.
12559  * Since: 2.22
12560  */
12561
12562
12563 /**
12564  * g_simple_async_result_complete_in_idle:
12565  * @simple: a #GSimpleAsyncResult.
12566  *
12567  * Completes an asynchronous function in an idle handler in the <link
12568  * linkend="g-main-context-push-thread-default">thread-default main
12569  * loop</link> of the thread that @simple was initially created in.
12570  * Calling this function takes a reference to @simple for as long as
12571  * is needed to complete the call.
12572  */
12573
12574
12575 /**
12576  * g_file_info_set_attribute_byte_string:
12577  * @info: a #GFileInfo.
12578  * @attribute: a file attribute key.
12579  * @attr_value: a byte string.
12580  *
12581  * Sets the @attribute to contain the given @attr_value,
12582  * if possible.
12583  */
12584
12585
12586 /**
12587  * g_data_output_stream_put_uint64:
12588  * @stream: a #GDataOutputStream.
12589  * @data: a #guint64.
12590  * @cancellable: optional #GCancellable object, %NULL to ignore.
12591  * @error: a #GError, %NULL to ignore.
12592  *
12593  * Puts an unsigned 64-bit integer into the stream.
12594  *
12595  * Returns: %TRUE if @data was successfully added to the @stream.
12596  */
12597
12598
12599 /**
12600  * SECTION:gdbusprox:
12601  * @short_description: Client-side proxies
12602  * @include: gio/gio.h
12603  *
12604  * #GDBusProxy is a base class used for proxies to access a D-Bus
12605  * interface on a remote object. A #GDBusProxy can be constructed for
12606  * both well-known and unique names.
12607  * By default, #GDBusProxy will cache all properties (and listen to
12608  * changes) of the remote object, and proxy all signals that gets
12609  * emitted. This behaviour can be changed by passing suitable
12610  * #GDBusProxyFlags when the proxy is created. If the proxy is for a
12611  * well-known name, the property cache is flushed when the name owner
12612  * vanishes and reloaded when a name owner appears.
12613  * If a #GDBusProxy is used for a well-known name, the owner of the
12614  * name is tracked and can be read from
12615  * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
12616  * get notified of changes. Additionally, only signals and property
12617  * changes emitted from the current name owner are considered and
12618  * calls are always sent to the current name owner. This avoids a
12619  * number of race conditions when the name is lost by one owner and
12620  * claimed by another. However, if no name owner currently exists,
12621  * then calls will be sent to the well-known name which may result in
12622  * the message bus launching an owner (unless
12623  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
12624  * The generic #GDBusProxy::g-properties-changed and #GDBusProxy::g-signal
12625  * signals are not very convenient to work with. Therefore, the recommended
12626  * way of working with proxies is to subclass #GDBusProxy, and have
12627  * more natural properties and signals in your derived class.
12628  * See <xref linkend="gdbus-example-proxy-subclass"/> for an example.
12629  * <example id="gdbus-wellknown-proxy"><title>GDBusProxy for a well-known-name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-proxy.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
12630  */
12631
12632
12633 /**
12634  * g_socket_get_local_address:
12635  * @socket: a #GSocket.
12636  * @error: #GError for error reporting, or %NULL to ignore.
12637  *
12638  * Try to get the local address of a bound socket. This is only
12639  * useful if the socket has been bound to a local address,
12640  * either explicitly or implicitly when connecting.
12641  * Free the returned object with g_object_unref().
12642  *
12643  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
12644  * Since: 2.22
12645  */
12646
12647
12648 /**
12649  * g_unix_output_stream_get_fd:
12650  * @stream: a #GUnixOutputStream
12651  *
12652  * Return the UNIX file descriptor that the stream writes to.
12653  *
12654  * Returns: The file descriptor of @stream
12655  * Since: 2.20
12656  */
12657
12658
12659 /**
12660  * g_dbus_is_unique_name:
12661  * @string: The string to check.
12662  *
12663  * Checks if @string is a valid D-Bus unique bus name.
12664  *
12665  * Returns: %TRUE if valid, %FALSE otherwise.
12666  * Since: 2.26
12667  */
12668
12669
12670 /**
12671  * g_inet_address_get_native_size:
12672  * @address: a #GInetAddress
12673  *
12674  * Gets the size of the native raw binary address for @address. This
12675  * is the size of the data that you get from g_inet_address_to_bytes().
12676  *
12677  * Returns: the number of bytes used for the native version of @address.
12678  * Since: 2.22
12679  */
12680
12681
12682 /**
12683  * g_file_query_info:
12684  * @file: input #GFile.
12685  * @attributes: an attribute query string.
12686  * @flags: a set of #GFileQueryInfoFlags.
12687  * @cancellable: optional #GCancellable object, %NULL to ignore.
12688  * @error: a #GError.
12689  *
12690  * Gets the requested information about specified @file. The result
12691  * is a #GFileInfo object that contains key-value attributes (such as
12692  * the type or size of the file).
12693  * The @attributes value is a string that specifies the file attributes that
12694  * should be gathered. It is not an error if it's not possible to read a particular
12695  * requested attribute from a file - it just won't be set. @attributes should
12696  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
12697  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
12698  * namespace. An example attribute query be "standard::*,owner::user".
12699  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
12700  * If @cancellable is not %NULL, then the operation can be cancelled by
12701  * triggering the cancellable object from another thread. If the operation
12702  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
12703  * For symlinks, normally the information about the target of the
12704  * symlink is returned, rather than information about the symlink itself.
12705  * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
12706  * information about the symlink itself will be returned. Also, for symlinks
12707  * that point to non-existing files the information about the symlink itself
12708  * will be returned.
12709  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
12710  * Other errors are possible too, and depend on what kind of filesystem the file is on.
12711  * Free the returned object with g_object_unref().
12712  *
12713  * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
12714  */
12715
12716
12717 /**
12718  * g_io_extension_point_implement:
12719  * @extension_point_name: the name of the extension point
12720  * @type: the #GType to register as extension
12721  * @extension_name: the name for the extension
12722  * @priority: the priority for the extension
12723  *
12724  * Registers @type as extension for the extension point with name
12725  * If @type has already been registered as an extension for this
12726  * extension point, the existing #GIOExtension object is returned.
12727  *
12728  * Returns: a #GIOExtension object for #GType
12729  */
12730
12731
12732 /**
12733  * g_mount_eject_finish:
12734  * @mount: a #GMount.
12735  * @result: a #GAsyncResult.
12736  * @error: a #GError location to store the error occuring, or %NULL to ignore.
12737  *
12738  * Finishes ejecting a mount. If any errors occurred during the operation,
12739  *
12740  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
12741  * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
12742  */
12743
12744
12745 /**
12746  * GUnixSocketAddress:
12747  *
12748  * A UNIX-domain (local) socket address, corresponding to a
12749  * <type>struct sockaddr_un</type>.
12750  */
12751
12752
12753 /**
12754  * g_file_info_get_attribute_status:
12755  * @info: a #GFileInfo
12756  * @attribute: a file attribute key
12757  *
12758  * Gets the attribute status for an attribute key.
12759  * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
12760  *
12761  * Returns: a #GFileAttributeStatus for the given @attribute, or
12762  */
12763
12764
12765 /**
12766  * g_cancellable_get_fd:
12767  * @cancellable: a #GCancellable.
12768  *
12769  * Gets the file descriptor for a cancellable job. This can be used to
12770  * implement cancellable operations on Unix systems. The returned fd will
12771  * turn readable when @cancellable is cancelled.
12772  * You are not supposed to read from the fd yourself, just check for
12773  * readable status. Reading to unset the readable status is done
12774  * with g_cancellable_reset().
12775  * After a successful return from this function, you should use
12776  * g_cancellable_release_fd() to free up resources allocated for
12777  * the returned file descriptor.
12778  * See also g_cancellable_make_pollfd().
12779  * is not supported, or on errors.
12780  *
12781  * Returns: A valid file descriptor. %-1 if the file descriptor
12782  */
12783
12784
12785 /**
12786  * GNetworkService:
12787  *
12788  * A #GSocketConnectable for resolving a SRV record and connecting to
12789  * that service.
12790  */
12791
12792
12793 /**
12794  * g_dbus_message_get_path:
12795  * @message: A #GDBusMessage.
12796  *
12797  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
12798  *
12799  * Returns: The value.
12800  * Since: 2.26
12801  */
12802
12803
12804 /**
12805  * g_file_attribute_matcher_matches_only:
12806  * @matcher: a #GFileAttributeMatcher.
12807  * @attribute: a file attribute key.
12808  *
12809  * Checks if a attribute matcher only matches a given attribute. Always
12810  * returns %FALSE if "*" was used when creating the matcher.
12811  *
12812  * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
12813  */
12814
12815
12816 /**
12817  * g_drive_can_eject:
12818  * @drive: a #GDrive.
12819  *
12820  * Checks if a drive can be ejected.
12821  *
12822  * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
12823  */
12824
12825
12826 /**
12827  * SECTION:ginetaddres:
12828  * @short_description: An IPv4/IPv6 address
12829  *
12830  * #GInetAddress represents an IPv4 or IPv6 internet address. Use
12831  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
12832  * look up the #GInetAddress for a hostname. Use
12833  * g_resolver_lookup_by_address() or
12834  * g_resolver_lookup_by_address_async() to look up the hostname for a
12835  * #GInetAddress.
12836  * To actually connect to a remote host, you will need a
12837  * #GInetSocketAddress (which includes a #GInetAddress as well as a
12838  * port number).
12839  */
12840
12841
12842 /**
12843  * g_output_stream_close_finish:
12844  * @stream: a #GOutputStream.
12845  * @result: a #GAsyncResult.
12846  * @error: a #GError location to store the error occuring, or %NULL to ignore.
12847  *
12848  * Closes an output stream.
12849  *
12850  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
12851  */
12852
12853
12854 /**
12855  * g_dbus_message_bytes_needed:
12856  * @blob: A blob represent a binary D-Bus message.
12857  * @blob_len: The length of @blob (must be at least 16).
12858  * @error: Return location for error or %NULL.
12859  *
12860  * Utility function to calculate how many bytes are needed to
12861  * completely deserialize the D-Bus message stored at @blob.
12862  * determine the size).
12863  *
12864  * Returns: Number of bytes needed or -1 if @error is set (e.g. if
12865  * Since: 2.26
12866  */
12867
12868
12869 /**
12870  * g_socket_listener_accept_socket_async:
12871  * @listener: a #GSocketListener
12872  * @cancellable: a #GCancellable, or %NULL
12873  * @callback: a #GAsyncReadyCallback
12874  * @user_data: user data for the callback
12875  *
12876  * This is the asynchronous version of g_socket_listener_accept_socket().
12877  * When the operation is finished @callback will be
12878  * called. You can then call g_socket_listener_accept_socket_finish()
12879  * to get the result of the operation.
12880  *
12881  * Since: 2.22
12882  */
12883
12884
12885 /**
12886  * g_unix_credentials_message_new:
12887  *
12888  * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
12889  *
12890  * Returns: a new #GUnixCredentialsMessage
12891  * Since: 2.26
12892  */
12893
12894
12895 /**
12896  * get_all_desktop_entries_for_mime_type:
12897  * @mime_type: a mime type.
12898  * @except: NULL or a strv list
12899  *
12900  * Returns all the desktop ids for @mime_type. The desktop files
12901  * are listed in an order so that default applications are listed before
12902  * non-default ones, and handlers for inherited mimetypes are listed
12903  * after the base ones.
12904  * Optionally doesn't list the desktop ids given in the @except
12905  * to handle @mime_type.
12906  *
12907  * Returns: a #GList containing the desktop ids which claim
12908  */
12909
12910
12911 /**
12912  * GPermission:allowed:
12913  *
12914  * %TRUE if the caller currently has permission to perform the action that
12915  */
12916
12917
12918 /**
12919  * g_application_command_line_get_platform_data:
12920  * @cmdline: #GApplicationCommandLine
12921  *
12922  * Gets the platform data associated with the invocation of @cmdline.
12923  * This is a #GVariant dictionary containing information about the
12924  * context in which the invocation occured.  It typically contains
12925  * information like the current working directory and the startup
12926  * notification ID.
12927  * For local invocation, it will be %NULL.
12928  *
12929  * Returns: the platform data, or %NULL
12930  * Since: 2.28
12931  */
12932
12933
12934 /**
12935  * g_file_info_set_symlink_target:
12936  * @info: a #GFileInfo.
12937  * @symlink_target: a static string containing a path to a symlink target.
12938  *
12939  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
12940  * to the given symlink target.
12941  */
12942
12943
12944 /**
12945  * g_unix_mount_point_compare:
12946  * @mount1: a #GUnixMount.
12947  * @mount2: a #GUnixMount.
12948  *
12949  * Compares two unix mount points.
12950  * or less than @mount2, respectively.
12951  *
12952  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
12953  */
12954
12955
12956 /**
12957  * g_file_info_get_attribute_int32:
12958  * @info: a #GFileInfo.
12959  * @attribute: a file attribute key.
12960  *
12961  * Gets a signed 32-bit integer contained within the attribute. If the
12962  * attribute does not contain a signed 32-bit integer, or is invalid,
12963  * 0 will be returned.
12964  *
12965  * Returns: a signed 32-bit integer from the attribute.
12966  */
12967
12968
12969 /**
12970  * g_unix_fd_list_steal_fds:
12971  * @list: a #GUnixFDList
12972  * @length: pointer to the length of the returned array, or %NULL
12973  *
12974  * Returns the array of file descriptors that is contained in this
12975  * object.
12976  * After this call, the descriptors are no longer contained in
12977  * descriptors have been added).
12978  * The return result of this function must be freed with g_free().
12979  * The caller is also responsible for closing all of the file
12980  * descriptors.  The file descriptors in the array are set to
12981  * close-on-exec.
12982  * If @length is non-%NULL then it is set to the number of file
12983  * descriptors in the returned array. The returned array is also
12984  * terminated with -1.
12985  * This function never returns %NULL. In case there are no file
12986  * descriptors contained in @list, an empty array is returned.
12987  *
12988  * Returns: an array of file descriptors
12989  * Since: 2.24
12990  */
12991
12992
12993 /**
12994  * g_dbus_message_set_byte_order:
12995  * @message: A #GDBusMessage.
12996  * @byte_order: The byte order.
12997  *
12998  * Sets the byte order of @message.
12999  */
13000
13001
13002 /**
13003  * GDrive::disconnected:
13004  * @drive: a #GDrive.
13005  *
13006  * This signal is emitted when the #GDrive have been
13007  * disconnected. If the recipient is holding references to the
13008  * object they should release them so the object can be
13009  * finalized.
13010  */
13011
13012
13013 /**
13014  * g_file_set_attribute_uint32:
13015  * @file: input #GFile.
13016  * @attribute: a string containing the attribute's name.
13017  * @value: a #guint32 containing the attribute's new value.
13018  * @flags: a #GFileQueryInfoFlags.
13019  * @cancellable: optional #GCancellable object, %NULL to ignore.
13020  * @error: a #GError, or %NULL
13021  *
13022  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
13023  * If @attribute is of a different type, this operation will fail.
13024  * If @cancellable is not %NULL, then the operation can be cancelled by
13025  * triggering the cancellable object from another thread. If the operation
13026  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
13027  * in the @file, %FALSE otherwise.
13028  *
13029  * Returns: %TRUE if the @attribute was successfully set to @value
13030  */
13031
13032
13033 /**
13034  * g_file_has_prefix:
13035  * @file: input #GFile.
13036  * @prefix: input #GFile.
13037  *
13038  * Checks whether @file has the prefix specified by @prefix. In other word,
13039  * if the names of inital elements of @file<!-- -->s pathname match @prefix.
13040  * Only full pathname elements are matched, so a path like /foo is not
13041  * considered a prefix of /foobar, only of /foo/bar.
13042  * This call does no i/o, as it works purely on names. As such it can
13043  * sometimes return %FALSE even if @file is inside a @prefix (from a
13044  * filesystem point of view), because the prefix of @file is an alias
13045  * of @prefix.
13046  * %FALSE otherwise.
13047  *
13048  * Virtual: prefix_matches
13049  * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
13050  */
13051
13052
13053 /**
13054  * SECTION:gfileattribut:
13055  * @short_description: Key-Value Paired File Attributes
13056  * @include: gio/gio.h
13057  * @see_also: #GFile, #GFileInfo
13058  *
13059  * File attributes in GIO consist of a list of key-value pairs.
13060  * Keys are strings that contain a key namespace and a key name, separated
13061  * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
13062  * key-value pairs by namespaces for relevance. Keys can be retrived
13063  * using wildcards, e.g. "standard::*" will return all of the keys in the
13064  * "standard" namespace.
13065  * Values are stored within the list in #GFileAttributeValue structures.
13066  * Values can store different types, listed in the enum #GFileAttributeType.
13067  * Upon creation of a #GFileAttributeValue, the type will be set to
13068  * %G_FILE_ATTRIBUTE_TYPE_INVALID.
13069  * The list of possible attributes for a filesystem (pointed to by a #GFile) is
13070  * availible as a #GFileAttributeInfoList. This list is queryable by key names
13071  * as indicated earlier.
13072  * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
13073  * install default keys and values for their given file system, architecture,
13074  * and other possible implementation details (e.g., on a UNIX system, a file
13075  * attribute key will be registered for the user id for a given file).
13076  * <para>
13077  * <table>
13078  * <title>GFileAttributes Default Namespaces</title>
13079  * <tgroup cols='2' align='left'><thead>
13080  * <row><entry>Namspace</entry><entry>Description</entry></row>
13081  * </thead>
13082  * <tbody>
13083  * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
13084  * information that any application may need should be put in this namespace.
13085  * Examples include the file's name, type, and size.</entry></row>
13086  * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
13087  * namespace. Currently, the only key in this namespace is "value", which contains
13088  * the value of the current entity tag.</entry></row>
13089  * <row><entry>"id"</entry><entry>The "Identification" namespace. This
13090  * namespace is used by file managers and applications that list directories
13091  * to check for loops and to uniquely identify files.</entry></row>
13092  * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
13093  * if a user has the proper privilidges to access files and perform
13094  * file operations. Keys in this namespace are made to be generic
13095  * and easily understood, e.g. the "can_read" key is %TRUE if
13096  * the current user has permission to read the file. UNIX permissions and
13097  * NTFS ACLs in Windows should be mapped to these values.</entry></row>
13098  * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
13099  * simple boolean keys for checking if a file or path supports mount operations, e.g.
13100  * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
13101  * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
13102  * access, changed, created times. </entry></row>
13103  * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
13104  * information and may not be available for all files. Examples include
13105  * the UNIX "UID", "GID", etc.</entry></row>
13106  * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
13107  * information and may not be available for all files. Examples include
13108  * "is_system" for checking if a file is marked as a system file, and "is_archive"
13109  * for checking if a file is marked as an archive file.</entry></row>
13110  * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
13111  * about who owns a file. May not be available for all file systems. Examples include
13112  * "user" for getting the user name of the file owner. This information is often mapped from
13113  * some backend specific data such as a unix UID.</entry></row>
13114  * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
13115  * information about file thumbnails and their location within the file system. Exaples of
13116  * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
13117  * to check if thumbnailing of the file failed.</entry></row>
13118  * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
13119  * about the file system where a file is located, such as its type, how much
13120  * space is left available, and the overall size of the file system.</entry></row>
13121  * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
13122  * contain information about the current GVFS backend in use. </entry></row>
13123  * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
13124  * about extended user attributes. See attr(5). The "user." prefix of the
13125  * extended user attribute name is stripped away when constructing keys in
13126  * this namespace, e.g. "xattr::mime_type" for the extended attribute with
13127  * the name "user.mime_type". Note that this information is only available
13128  * if GLib has been built with extended attribute support.</entry></row>
13129  * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
13130  * Gets information about extended attributes which are not user-specific.
13131  * See attr(5). Note that this information is only available if GLib
13132  * has been built with extended attribute support.</entry></row>
13133  * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
13134  * information about the SELinux context of files. Note that this information
13135  * is only available if GLib has been built with SELinux support.</entry></row>
13136  * </tbody>
13137  * </tgroup>
13138  * </table>
13139  * </para>
13140  * Please note that these are not all of the possible namespaces.
13141  * More namespaces can be added from GIO modules or by individual applications.
13142  * For more information about writing GIO modules, see #GIOModule.
13143  * <!-- TODO: Implementation note about using extended attributes on supported
13144  * file systems -->
13145  * <para><table>
13146  * <title>GFileAttributes Built-in Keys and Value Types</title>
13147  * <tgroup cols='3' align='left'><thead>
13148  * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
13149  * </thead><tbody>
13150  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
13151  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
13152  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
13153  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
13154  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
13155  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
13156  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
13157  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
13158  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
13159  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
13160  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
13161  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
13162  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
13163  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
13164  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
13165  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
13166  * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
13167  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
13168  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
13169  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
13170  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
13171  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
13172  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
13173  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
13174  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
13175  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
13176  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
13177  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
13178  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
13179  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
13180  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
13181  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
13182  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
13183  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
13184  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
13185  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
13186  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
13187  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
13188  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
13189  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
13190  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
13191  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
13192  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
13193  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
13194  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
13195  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
13196  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
13197  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
13198  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
13199  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
13200  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
13201  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
13202  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
13203  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
13204  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
13205  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
13206  * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
13207  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
13208  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
13209  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
13210  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
13211  * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
13212  * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
13213  * </tbody></tgroup></table></para>
13214  * Note that there are no predefined keys in the "xattr" and "xattr-sys"
13215  * namespaces. Keys for the "xattr" namespace are constructed by stripping
13216  * away the "user." prefix from the extended user attribute, and prepending
13217  * "xattr::". Keys for the "xattr-sys" namespace are constructed by
13218  * concatenating "xattr-sys::" with the extended attribute name. All extended
13219  * attribute values are returned as hex-encoded strings in which bytes outside
13220  * the ASCII range are encoded as hexadecimal escape sequences of the form
13221  * \x<replaceable>nn</replaceable>.
13222  */
13223
13224
13225 /**
13226  * g_drive_eject:
13227  * @drive: a #GDrive.
13228  * @flags: flags affecting the unmount if required for eject
13229  * @cancellable: optional #GCancellable object, %NULL to ignore.
13230  * @callback: a #GAsyncReadyCallback, or %NULL.
13231  * @user_data: user data to pass to @callback
13232  *
13233  * Asynchronously ejects a drive.
13234  * When the operation is finished, @callback will be called.
13235  * You can then call g_drive_eject_finish() to obtain the
13236  * result of the operation.
13237  *
13238  * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
13239  */
13240
13241
13242 /**
13243  * GVolumeMonitor::drive-stop-button:
13244  * @volume_monitor: The volume monitor emitting the signal.
13245  * @drive: the drive where the stop button was pressed
13246  *
13247  * Emitted when the stop button is pressed on @drive.
13248  *
13249  * Since: 2.22
13250  */
13251
13252
13253 /**
13254  * SECTION:gasynchelpe:
13255  * @short_description: Asynchronous Helper Functions
13256  * @include: gio/gio.h
13257  * @see_also: #GAsyncReady
13258  *
13259  * Provides helper functions for asynchronous operations.
13260  */
13261
13262
13263 /**
13264  * g_drive_get_start_stop_type:
13265  * @drive: a #GDrive.
13266  *
13267  * Gets a hint about how a drive can be started/stopped.
13268  *
13269  * Returns: A value from the #GDriveStartStopType enumeration.
13270  * Since: 2.22
13271  */
13272
13273
13274 /**
13275  * g_dbus_connection_new_finish:
13276  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
13277  * @error: Return location for error or %NULL.
13278  *
13279  * Finishes an operation started with g_dbus_connection_new().
13280  *
13281  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
13282  * Since: 2.26
13283  */
13284
13285
13286 /**
13287  * g_bus_own_name:
13288  * @bus_type: The type of bus to own a name on.
13289  * @name: The well-known name to own.
13290  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
13291  * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
13292  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
13293  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
13294  * @user_data: User data to pass to handlers.
13295  * @user_data_free_func: Function for freeing @user_data or %NULL.
13296  *
13297  * Starts acquiring @name on the bus specified by @bus_type and calls
13298  * acquired respectively lost. Callbacks will be invoked in the <link
13299  * linkend="g-main-context-push-thread-default">thread-default main
13300  * loop</link> of the thread you are calling this function from.
13301  * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
13302  * callbacks will be invoked after calling this function - there are three
13303  * possible cases:
13304  * <itemizedlist>
13305  * <listitem><para>
13306  * </para></listitem>
13307  * <listitem><para>
13308  * </para></listitem>
13309  * <listitem><para>
13310  * </para></listitem>
13311  * </itemizedlist>
13312  * When you are done owning the name, just call g_bus_unown_name()
13313  * with the owner id this function returns.
13314  * If the name is acquired or lost (for example another application
13315  * could acquire the name if you allow replacement or the application
13316  * currently owning the name exits), the handlers are also invoked. If the
13317  * #GDBusConnection that is used for attempting to own the name
13318  * closes, then @name_lost_handler is invoked since it is no
13319  * longer possible for other processes to access the process.
13320  * You cannot use g_bus_own_name() several times for the same name (unless
13321  * interleaved with calls to g_bus_unown_name()) - only the first call
13322  * will work.
13323  * Another guarantee is that invocations of @name_acquired_handler
13324  * and @name_lost_handler are guaranteed to alternate; that
13325  * is, if @name_acquired_handler is invoked then you are
13326  * guaranteed that the next time one of the handlers is invoked, it
13327  * will be @name_lost_handler. The reverse is also true.
13328  * If you plan on exporting objects (using e.g.
13329  * g_dbus_connection_register_object()), note that it is generally too late
13330  * to export the objects in @name_acquired_handler. Instead, you can do this
13331  * in @bus_acquired_handler since you are guaranteed that this will run
13332  * before @name is requested from the bus.
13333  * This behavior makes it very simple to write applications that wants
13334  * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
13335  * Simply register objects to be exported in @bus_acquired_handler and
13336  * unregister the objects (if any) in @name_lost_handler.
13337  * g_bus_unown_name() to stop owning the name.
13338  *
13339  * Returns: An identifier (never 0) that an be used with
13340  * Since: 2.26
13341  */
13342
13343
13344 /**
13345  * g_dbus_message_get_error_name:
13346  * @message: A #GDBusMessage.
13347  *
13348  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
13349  *
13350  * Returns: The value.
13351  * Since: 2.26
13352  */
13353
13354
13355 /**
13356  * GDBusProxy:g-name-owner:
13357  *
13358  * The unique name that owns #GDBusProxy:name or %NULL if no-one
13359  * currently owns that name. You may connect to #GObject::notify signal to
13360  * track changes to this property.
13361  *
13362  * Since: 2.26
13363  */
13364
13365
13366 /**
13367  * g_socket_close:
13368  * @socket: a #GSocket
13369  * @error: #GError for error reporting, or %NULL to ignore.
13370  *
13371  * Closes the socket, shutting down any active connection.
13372  * Closing a socket does not wait for all outstanding I/O operations
13373  * to finish, so the caller should not rely on them to be guaranteed
13374  * to complete even if the close returns with no error.
13375  * Once the socket is closed, all other operations will return
13376  * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
13377  * return an error.
13378  * Sockets will be automatically closed when the last reference
13379  * is dropped, but you might want to call this function to make sure
13380  * resources are released as early as possible.
13381  * Beware that due to the way that TCP works, it is possible for
13382  * recently-sent data to be lost if either you close a socket while the
13383  * %G_IO_IN condition is set, or else if the remote connection tries to
13384  * send something to you after you close the socket but before it has
13385  * finished reading all of the data you sent. There is no easy generic
13386  * way to avoid this problem; the easiest fix is to design the network
13387  * protocol such that the client will never send data "out of turn".
13388  * Another solution is for the server to half-close the connection by
13389  * calling g_socket_shutdown() with only the @shutdown_write flag set,
13390  * and then wait for the client to notice this and close its side of the
13391  * connection, after which the server can safely call g_socket_close().
13392  * (This is what #GTcpConnection does if you call
13393  * g_tcp_connection_set_graceful_disconnect(). But of course, this
13394  * only works if the client will close its connection after the server
13395  * does.)
13396  *
13397  * Returns: %TRUE on success, %FALSE on error
13398  * Since: 2.22
13399  */
13400
13401
13402 /**
13403  * g_dbus_proxy_new_for_bus:
13404  * @bus_type: A #GBusType.
13405  * @flags: Flags used when constructing the proxy.
13406  * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
13407  * @name: A bus name (well-known or unique).
13408  * @object_path: An object path.
13409  * @interface_name: A D-Bus interface name.
13410  * @cancellable: A #GCancellable or %NULL.
13411  * @callback: Callback function to invoke when the proxy is ready.
13412  * @user_data: User data to pass to @callback.
13413  *
13414  * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
13415  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
13416  *
13417  * Since: 2.26
13418  */
13419
13420
13421 /**
13422  * g_dbus_message_print:
13423  * @message: A #GDBusMessage.
13424  * @indent: Indentation level.
13425  *
13426  * Produces a human-readable multi-line description of @message.
13427  * The contents of the description has no ABI guarantees, the contents
13428  * and formatting is subject to change at any time. Typical output
13429  * looks something like this:
13430  * <programlisting>
13431  * Headers:
13432  * path -> objectpath '/org/gtk/GDBus/TestObject'
13433  * interface -> 'org.gtk.GDBus.TestInterface'
13434  * member -> 'GimmeStdout'
13435  * destination -> ':1.146'
13436  * UNIX File Descriptors:
13437  * (none)
13438  * </programlisting>
13439  * or
13440  * <programlisting>
13441  * Headers:
13442  * reply-serial -> uint32 4
13443  * destination -> ':1.159'
13444  * sender -> ':1.146'
13445  * num-unix-fds -> uint32 1
13446  * UNIX File Descriptors:
13447  * </programlisting>
13448  *
13449  * Type:    method-return
13450  * Flags:   no-reply-expected
13451  * Version: 0
13452  * Serial:  477
13453  * Body: ()
13454  * Fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
13455  * Returns: A string that should be freed with g_free().
13456  * Since: 2.26
13457  */
13458
13459
13460 /**
13461  * g_simple_async_result_set_error_va:
13462  * @simple: a #GSimpleAsyncResult.
13463  * @domain: a #GQuark (usually #G_IO_ERROR).
13464  * @code: an error code.
13465  * @format: a formatted error reporting string.
13466  * @args: va_list of arguments.
13467  *
13468  * Sets an error within the asynchronous result without a #GError.
13469  * Unless writing a binding, see g_simple_async_result_set_error().
13470  */
13471
13472
13473 /**
13474  * g_permission_get_allowed:
13475  * @permission: a #GPermission instance
13476  * @returns: the value of the 'allowed' property
13477  *
13478  * Gets the value of the 'allowed' property.  This property is %TRUE if
13479  * the caller currently has permission to perform the action that
13480  *
13481  * Since: 2.26
13482  */
13483
13484
13485 /**
13486  * g_settings_get_mapped:
13487  * @settings: a #GSettings object
13488  * @key: the key to get the value for
13489  * @mapping: the function to map the value in the settings database to the value used by the application
13490  * @user_data: user data for @mapping
13491  * @returns: (transfer full): the result, which may be %NULL
13492  *
13493  * Gets the value that is stored at @key in @settings, subject to
13494  * application-level validation/mapping.
13495  * You should use this function when the application needs to perform
13496  * some processing on the value of the key (for example, parsing).  The
13497  * indicates that the processing was unsuccessful (due to a parse error,
13498  * for example) then the mapping is tried again with another value.
13499  * This allows a robust 'fall back to defaults' behaviour to be
13500  * implemented somewhat automatically.
13501  * The first value that is tried is the user's setting for the key.  If
13502  * the mapping function fails to map this value, other values may be
13503  * tried in an unspecified order (system or site defaults, translated
13504  * schema default values, untranslated schema default values, etc).
13505  * If the mapping function fails for all possible values, one additional
13506  * If the mapping function still indicates failure at this point then
13507  * the application will be aborted.
13508  * The result parameter for the @mapping function is pointed to a
13509  * #gpointer which is initially set to %NULL.  The same pointer is given
13510  * to each invocation of @mapping.  The final value of that #gpointer is
13511  * what is returned by this function.  %NULL is valid; it is returned
13512  * just as any other value would be.
13513  *
13514  * Attempt is made: the mapping function is called with a %NULL value.
13515  */
13516
13517
13518 /**
13519  * g_srv_target_get_priority:
13520  * @target: a #GSrvTarget
13521  *
13522  * Gets @target's priority. You should not need to look at this;
13523  * #GResolver already sorts the targets according to the algorithm in
13524  * RFC 2782.
13525  *
13526  * Returns: @target's priority
13527  * Since: 2.22
13528  */
13529
13530
13531 /**
13532  * GActionGroup::action-state-changed:
13533  * @action_group: the #GActionGroup that changed
13534  * @action_name: the name of the action in @action_group
13535  * @value: the new value of the state
13536  *
13537  * Signals that the state of the named action has changed.
13538  *
13539  * Since: 2.28
13540  */
13541
13542
13543 /**
13544  * g_mount_operation_get_choice:
13545  * @op: a #GMountOperation.
13546  *
13547  * Gets a choice from the mount operation.
13548  * the choice's list, or %0.
13549  *
13550  * Returns: an integer containing an index of the user's choice from
13551  */
13552
13553
13554 /**
13555  * g_zlib_decompressor_new:
13556  * @format: The format to use for the compressed data
13557  *
13558  * Creates a new #GZlibDecompressor.
13559  *
13560  * Returns: a new #GZlibDecompressor
13561  * Since: 2.24
13562  */
13563
13564
13565 /**
13566  * g_network_service_get_scheme:
13567  * @srv: a #GNetworkService
13568  *
13569  * Get's the URI scheme used to resolve proxies. By default, the service name
13570  * is used as scheme.
13571  *
13572  * Returns: @srv's scheme name
13573  * Since: 2.26
13574  */
13575
13576
13577 /**
13578  * g_dbus_proxy_set_cached_property:
13579  * @proxy: A #GDBusProxy
13580  * @property_name: Property name.
13581  * @value: Value for the property or %NULL to remove it from the cache.
13582  *
13583  * If @value is not %NULL, sets the cached value for the property with
13584  * name @property_name to the value in @value.
13585  * If @value is %NULL, then the cached value is removed from the
13586  * property cache.
13587  * If @proxy has an expected interface (see
13588  * #GDBusProxy:g-interface-info), then @property_name (for existence)
13589  * and @value (for the type) is checked against it.
13590  * If the @value #GVariant is floating, it is consumed. This allows
13591  * convenient 'inline' use of g_variant_new(), e.g.
13592  * |[
13593  * g_dbus_proxy_set_cached_property (proxy,
13594  * "SomeProperty",
13595  * g_variant_new ("(si)",
13596  * "A String",
13597  * 42));
13598  * ]|
13599  * Normally you will not need to use this method since @proxy is
13600  * tracking changes using the
13601  * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
13602  * D-Bus signal. However, for performance reasons an object may decide
13603  * to not use this signal for some properties and instead use a
13604  * proprietary out-of-band mechanism to transmit changes.
13605  * As a concrete example, consider an object with a property
13606  * <literal>ChatroomParticipants</literal> which is an array of
13607  * strings. Instead of transmitting the same (long) array every time
13608  * the property changes, it is more efficient to only transmit the
13609  * delta using e.g. signals <literal>ChatroomParticipantJoined(String
13610  * name)</literal> and <literal>ChatroomParticipantParted(String
13611  * name)</literal>.
13612  *
13613  * Since: 2.26
13614  */
13615
13616
13617 /**
13618  * g_unix_fd_message_append_fd:
13619  * @message: a #GUnixFDMessage
13620  * @fd: a valid open file descriptor
13621  * @error: a #GError pointer
13622  *
13623  * Adds a file descriptor to @message.
13624  * The file descriptor is duplicated using dup(). You keep your copy
13625  * of the descriptor and the copy contained in @message will be closed
13626  * when @message is finalized.
13627  * A possible cause of failure is exceeding the per-process or
13628  * system-wide file descriptor limit.
13629  *
13630  * Returns: %TRUE in case of success, else %FALSE (and @error is set)
13631  * Since: 2.22
13632  */
13633
13634
13635 /**
13636  * g_file_unmount_mountable_with_operation_finish:
13637  * @file: input #GFile.
13638  * @result: a #GAsyncResult.
13639  * @error: a #GError, or %NULL
13640  *
13641  * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
13642  * Finish an asynchronous unmount operation that was started
13643  * with g_file_unmount_mountable_with_operation().
13644  * otherwise.
13645  *
13646  * Returns: %TRUE if the operation finished successfully. %FALSE
13647  * Since: 2.22
13648  */
13649
13650
13651 /**
13652  * g_simple_async_result_set_handle_cancellation:
13653  * @simple: a #GSimpleAsyncResult.
13654  * @handle_cancellation: a #gboolean.
13655  *
13656  * Sets whether to handle cancellation within the asynchronous operation.
13657  */
13658
13659
13660 /**
13661  * g_dbus_method_invocation_return_value:
13662  * @invocation: A #GDBusMethodInvocation.
13663  * @parameters: A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
13664  *
13665  * Finishes handling a D-Bus method call by returning @parameters.
13666  * If the @parameters GVariant is floating, it is consumed.
13667  * It is an error if @parameters is not of the right format.
13668  * This method will free @invocation, you cannot use it afterwards.
13669  *
13670  * Since: 2.26
13671  */
13672
13673
13674 /**
13675  * GSocketAddress:
13676  *
13677  * A socket endpoint address, corresponding to <type>struct sockaddr</type>
13678  * or one of its subtypes.
13679  */
13680
13681
13682 /**
13683  * g_io_stream_close_finish:
13684  * @stream: a #GIOStream
13685  * @result: a #GAsyncResult
13686  * @error: a #GError location to store the error occuring, or %NULL to ignore
13687  *
13688  * Closes a stream.
13689  *
13690  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
13691  * Since: 2.22
13692  */
13693
13694
13695 /**
13696  * g_socket_connection_factory_lookup_type:
13697  * @family: a #GSocketFamily
13698  * @type: a #GSocketType
13699  * @protocol_id: a protocol id
13700  *
13701  * Looks up the #GType to be used when creating socket connections on
13702  * sockets with the specified @family,@type and @protocol_id.
13703  * If no type is registered, the #GSocketConnection base type is returned.
13704  *
13705  * Returns: a #GType
13706  * Since: 2.22
13707  */
13708
13709
13710 /**
13711  * g_file_load_partial_contents_async:
13712  * @file: input #GFile.
13713  * @cancellable: optional #GCancellable object, %NULL to ignore.
13714  * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
13715  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
13716  * @user_data: the data to pass to the callback functions.
13717  *
13718  * Reads the partial contents of a file. A #GFileReadMoreCallback should be
13719  * used to stop reading from the file when appropriate, else this function
13720  * will behave exactly as g_file_load_contents_async(). This operation
13721  * can be finished by g_file_load_partial_contents_finish().
13722  * Users of this function should be aware that @user_data is passed to
13723  * both the @read_more_callback and the @callback.
13724  * If @cancellable is not %NULL, then the operation can be cancelled by
13725  * triggering the cancellable object from another thread. If the operation
13726  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
13727  */
13728
13729
13730 /**
13731  * g_io_stream_is_closed:
13732  * @stream: a #GIOStream
13733  *
13734  * Checks if a stream is closed.
13735  *
13736  * Returns: %TRUE if the stream is closed.
13737  * Since: 2.22
13738  */
13739
13740
13741 /**
13742  * g_inet_address_get_is_loopback:
13743  * @address: a #GInetAddress
13744  *
13745  * Tests whether @address is the loopback address for its family.
13746  *
13747  * Returns: %TRUE if @address is the loopback address for its family.
13748  * Since: 2.22
13749  */
13750
13751
13752 /**
13753  * g_file_get_parent:
13754  * @file: input #GFile.
13755  *
13756  * Gets the parent directory for the @file.
13757  * If the @file represents the root directory of the
13758  * file system, then %NULL will be returned.
13759  * This call does no blocking i/o.
13760  * #GFile or %NULL if there is no parent.
13761  * Free the returned object with g_object_unref().
13762  *
13763  * Returns: (transfer full): a #GFile structure to the parent of the given
13764  */
13765
13766
13767 /**
13768  * g_application_get_is_registered:
13769  * @application: a #GApplication
13770  * @returns: %TRUE if @application is registered
13771  *
13772  * Checks if @application is registered.
13773  * An application is registered if g_application_register() has been
13774  * successfully called.
13775  *
13776  * Since: 2.28
13777  */
13778
13779
13780 /**
13781  * g_periodic_new:
13782  * @hz: the frequency of the new clock in Hz (between 1 and 120)
13783  * @priority: the #GSource priority to run at
13784  *
13785  * Creates a new #GPeriodic clock.
13786  * The created clock is attached to the thread-default main context in
13787  * effect at the time of the call to this function.  See
13788  * g_main_context_push_thread_default() for more information.
13789  * Due to the fact that #GMainContext is only accurate to the nearest
13790  * millisecond, the frequency can not meaningfully get too close to
13791  * 1000.  For this reason, it is arbitrarily bounded at 120.
13792  *
13793  * Returns: a new #GPeriodic
13794  * Since: 2.28
13795  */
13796
13797
13798 /**
13799  * g_file_parse_name:
13800  * @parse_name: a file name or path to be parsed.
13801  *
13802  * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
13803  * This operation never fails, but the returned object might not support any I/O
13804  * operation if the @parse_name cannot be parsed.
13805  *
13806  * Returns: (transfer full): a new #GFile.
13807  */
13808
13809
13810 /**
13811  * g_simple_async_result_is_valid:
13812  * @result: the #GAsyncResult passed to the _finish function.
13813  * @source: the #GObject passed to the _finish function.
13814  * @source_tag: the asynchronous function.
13815  *
13816  * Ensures that the data passed to the _finish function of an async
13817  * operation is consistent.  Three checks are performed.
13818  * First, @result is checked to ensure that it is really a
13819  * #GSimpleAsyncResult.  Second, @source is checked to ensure that it
13820  * matches the source object of @result.  Third, @source_tag is
13821  * checked to ensure that it is either %NULL (as it is when the result was
13822  * created by g_simple_async_report_error_in_idle() or
13823  * g_simple_async_report_gerror_in_idle()) or equal to the
13824  * convention, is a pointer to the _async function corresponding to the
13825  * _finish function from which this function is called).
13826  *
13827  * Returns: #TRUE if all checks passed or #FALSE if any failed.
13828  */
13829
13830
13831 /**
13832  * g_action_get_parameter_type:
13833  * @action: a #GAction
13834  *
13835  * Queries the type of the parameter that must be given when activating
13836  * When activating the action using g_action_activate(), the #GVariant
13837  * given to that function must be of the type returned by this function.
13838  * In the case that this function returns %NULL, you must not give any
13839  * #GVariant, but %NULL instead.
13840  *
13841  * Returns: (allow-none): the parameter type
13842  * Since: 2.28
13843  */
13844
13845
13846 /**
13847  * g_dbus_connection_get_exit_on_close:
13848  * @connection: A #GDBusConnection.
13849  *
13850  * Gets whether the process is terminated when @connection is
13851  * closed by the remote peer. See
13852  * #GDBusConnection:exit-on-close for more details.
13853  * closed by the remote peer.
13854  *
13855  * Returns: Whether the process is terminated when @connection is
13856  * Since: 2.26
13857  */
13858
13859
13860 /**
13861  * g_vfs_get_local:
13862  *
13863  * Gets the local #GVfs for the system.
13864  *
13865  * Returns: (transfer none): a #GVfs.
13866  */
13867
13868
13869 /**
13870  * g_dbus_message_get_signature:
13871  * @message: A #GDBusMessage.
13872  *
13873  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
13874  *
13875  * Returns: The value.
13876  * Since: 2.26
13877  */
13878
13879
13880 /**
13881  * g_file_info_get_attribute_data:
13882  * @info: a #GFileInfo
13883  * @attribute: a file attribute key
13884  * @type: (out) (allow-none): return location for the attribute type, or %NULL
13885  * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
13886  * @status: (out) (allow-none): return location for the attribute status, or %NULL
13887  *
13888  * Gets the attribute type, value and status for an attribute key.
13889  * %FALSE otherwise.
13890  *
13891  * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
13892  */
13893
13894
13895 /**
13896  * SECTION:gsrvtarge:
13897  * @short_description: DNS SRV record target
13898  * @include: gio/gio.h
13899  *
13900  * SRV (service) records are used by some network protocols to provide
13901  * service-specific aliasing and load-balancing. For example, XMPP
13902  * (Jabber) uses SRV records to locate the XMPP server for a domain;
13903  * rather than connecting directly to "example.com" or assuming a
13904  * specific server hostname like "xmpp.example.com", an XMPP client
13905  * would look up the "xmpp-client" SRV record for "example.com", and
13906  * then connect to whatever host was pointed to by that record.
13907  * You can use g_resolver_lookup_service() or
13908  * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
13909  * for a given service. However, if you are simply planning to connect
13910  * to the remote service, you can use #GNetworkService's
13911  * #GSocketConnectable interface and not need to worry about
13912  * #GSrvTarget at all.
13913  */
13914
13915
13916 /**
13917  * g_proxy_resolver_is_supported:
13918  * @resolver: a #GProxyResolver
13919  *
13920  * Checks if @resolver can be used on this system. (This is used
13921  * internally; g_proxy_resolver_get_default() will only return a proxy
13922  * resolver that returns %TRUE for this method.)
13923  *
13924  * Returns: %TRUE if @resolver is supported.
13925  * Since: 2.26
13926  */
13927
13928
13929 /**
13930  * GSettings::writable-change-event:
13931  * @settings: the object on which the signal was emitted
13932  * @key: the quark of the key, or 0
13933  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
13934  *
13935  * The "writable-change-event" signal is emitted once per writability
13936  * change event that affects this settings object.  You should connect
13937  * to this signal if you are interested in viewing groups of changes
13938  * before they are split out into multiple emissions of the
13939  * "writable-changed" signal.  For most use cases it is more
13940  * appropriate to use the "writable-changed" signal.
13941  * In the event that the writability change applies only to a single
13942  * key, @key will be set to the #GQuark for that key.  In the event
13943  * that the writability change affects the entire settings object,
13944  * The default handler for this signal invokes the "writable-changed"
13945  * and "changed" signals for each affected key.  This is done because
13946  * changes in writability might also imply changes in value (if for
13947  * example, a new mandatory setting is introduced).  If any other
13948  * connected handler returns %TRUE then this default functionality
13949  * will be supressed.
13950  */
13951
13952
13953 /**
13954  * g_socket_get_keepalive:
13955  * @socket: a #GSocket.
13956  *
13957  * Gets the keepalive mode of the socket. For details on this,
13958  * see g_socket_set_keepalive().
13959  *
13960  * Returns: %TRUE if keepalive is active, %FALSE otherwise.
13961  * Since: 2.22
13962  */
13963
13964
13965 /**
13966  * g_dbus_generate_guid:
13967  *
13968  * Generate a D-Bus GUID that can be used with
13969  * e.g. g_dbus_connection_new().
13970  * See the D-Bus specification regarding what strings are valid D-Bus
13971  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
13972  *
13973  * Returns: A valid D-Bus GUID. Free with g_free().
13974  * Since: 2.26
13975  */
13976
13977
13978 /**
13979  * SECTION:gico:
13980  * @short_description: Interface for icons
13981  * @include: gio/gio.h
13982  *
13983  * #GIcon is a very minimal interface for icons. It provides functions
13984  * for checking the equality of two icons, hashing of icons and
13985  * serializing an icon to and from strings.
13986  * #GIcon does not provide the actual pixmap for the icon as this is out
13987  * of GIO's scope, however implementations of #GIcon may contain the name
13988  * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
13989  * To obtain a hash of a #GIcon, see g_icon_hash().
13990  * To check if two #GIcons are equal, see g_icon_equal().
13991  * For serializing a #GIcon, use g_icon_to_string() and
13992  * g_icon_new_for_string().
13993  * If your application or library provides one or more #GIcon
13994  * implementations you need to ensure that each #GType is registered
13995  * with the type system prior to calling g_icon_new_for_string().
13996  */
13997
13998
13999 /**
14000  * g_socket_receive:
14001  * @socket: a #GSocket
14002  * @buffer: a buffer to read data into (which should be at least @size bytes long).
14003  * @size: the number of bytes you want to read from the socket
14004  * @cancellable: a %GCancellable or %NULL
14005  * @error: #GError for error reporting, or %NULL to ignore.
14006  *
14007  * Receive data (up to @size bytes) from a socket. This is mainly used by
14008  * connection-oriented sockets; it is identical to g_socket_receive_from()
14009  * with @address set to %NULL.
14010  * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
14011  * g_socket_receive() will always read either 0 or 1 complete messages from
14012  * the socket. If the received message is too large to fit in @buffer, then
14013  * the data beyond @size bytes will be discarded, without any explicit
14014  * indication that this has occurred.
14015  * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
14016  * number of bytes, up to @size. If more than @size bytes have been
14017  * received, the additional data will be returned in future calls to
14018  * g_socket_receive().
14019  * If the socket is in blocking mode the call will block until there is
14020  * some data to receive or there is an error. If there is no data available
14021  * and the socket is in non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error
14022  * will be returned. To be notified when data is available, wait for the
14023  * %G_IO_IN condition.
14024  * On error -1 is returned and @error is set accordingly.
14025  *
14026  * Returns: Number of bytes read, or -1 on error
14027  * Since: 2.22
14028  */
14029
14030
14031 /**
14032  * g_dbus_message_set_unix_fd_list:
14033  * @message: A #GDBusMessage.
14034  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
14035  *
14036  * Sets the UNIX file descriptors associated with @message. As a
14037  * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
14038  * field is set to the number of fds in @fd_list (or cleared if
14039  * This method is only available on UNIX.
14040  *
14041  * Since: 2.26
14042  */
14043
14044
14045 /**
14046  * g_socket_connect:
14047  * @socket: a #GSocket.
14048  * @address: a #GSocketAddress specifying the remote address.
14049  * @cancellable: a %GCancellable or %NULL
14050  * @error: #GError for error reporting, or %NULL to ignore.
14051  *
14052  * Connect the socket to the specified remote address.
14053  * For connection oriented socket this generally means we attempt to make
14054  * a connection to the @address. For a connection-less socket it sets
14055  * the default address for g_socket_send() and discards all incoming datagrams
14056  * from other sources.
14057  * Generally connection oriented sockets can only connect once, but
14058  * connection-less sockets can connect multiple times to change the
14059  * default address.
14060  * If the connect call needs to do network I/O it will block, unless
14061  * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
14062  * and the user can be notified of the connection finishing by waiting
14063  * for the G_IO_OUT condition. The result of the connection can then be
14064  * checked with g_socket_check_connect_result().
14065  *
14066  * Returns: %TRUE if connected, %FALSE on error.
14067  * Since: 2.22
14068  */
14069
14070
14071 /**
14072  * g_file_read_async:
14073  * @file: input #GFile
14074  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
14075  * @cancellable: optional #GCancellable object, %NULL to ignore.
14076  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
14077  * @user_data: the data to pass to callback function
14078  *
14079  * Asynchronously opens @file for reading.
14080  * For more details, see g_file_read() which is
14081  * the synchronous version of this call.
14082  * When the operation is finished, @callback will be called. You can then call
14083  * g_file_read_finish() to get the result of the operation.
14084  */
14085
14086
14087 /**
14088  * g_dbus_server_get_flags:
14089  * @server: A #GDBusServer.
14090  *
14091  * Gets the flags for @server.
14092  *
14093  * Returns: A set of flags from the #GDBusServerFlags enumeration.
14094  * Since: 2.26
14095  */
14096
14097
14098 /**
14099  * GMemoryOutputStream:data:
14100  *
14101  * Pointer to buffer where data will be written.
14102  *
14103  * Since: 2.24
14104  */
14105
14106
14107 /**
14108  * g_settings_list_relocatable_schemas:
14109  *
14110  * Gets a list of the relocatable #GSettings schemas installed on the
14111  * system.  These are schemas that do not provide their own path.  It is
14112  * usual to instantiate these schemas directly, but if you want to you
14113  * can use g_settings_new_with_path() to specify the path.
14114  * The output of this function, tTaken together with the output of
14115  * g_settings_list_schemas() represents the complete list of all
14116  * installed schemas.
14117  * #GSettings schemas that are available.  The list must not be
14118  * modified or freed.
14119  *
14120  * Returns: (element-type utf8) (transfer none): a list of relocatable
14121  * Since: 2.28
14122  */
14123
14124
14125 /**
14126  * SECTION:gmoun:
14127  * @short_description: Mount management
14128  * @include: gio/gio.h
14129  * @see_also: GVolume, GUnixMount
14130  *
14131  * The #GMount interface represents user-visible mounts. Note, when
14132  * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
14133  * #GMount is a "mounted" filesystem that you can access. Mounted is in
14134  * quotes because it's not the same as a unix mount, it might be a gvfs
14135  * mount, but you can still access the files on it if you use GIO. Might or
14136  * might not be related to a volume object.
14137  * Unmounting a #GMount instance is an asynchronous operation. For
14138  * more information about asynchronous operations, see #GAsyncReady
14139  * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
14140  * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
14141  * #GAsyncReadyCallback.  The callback will be fired when the
14142  * operation has resolved (either with success or failure), and a
14143  * #GAsyncReady structure will be passed to the callback.  That
14144  * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
14145  * and the #GAsyncReady data to see if the operation was completed
14146  * successfully.  If an @error is present when g_mount_unmount_with_operation_finish()
14147  * is called, then it will be filled with any error information.
14148  */
14149
14150
14151 /**
14152  * g_drive_eject_with_operation:
14153  * @drive: a #GDrive.
14154  * @flags: flags affecting the unmount if required for eject
14155  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
14156  * @cancellable: optional #GCancellable object, %NULL to ignore.
14157  * @callback: a #GAsyncReadyCallback, or %NULL.
14158  * @user_data: user data passed to @callback.
14159  *
14160  * Ejects a drive. This is an asynchronous operation, and is
14161  * finished by calling g_drive_eject_with_operation_finish() with the @drive
14162  * and #GAsyncResult data returned in the @callback.
14163  *
14164  * Since: 2.22
14165  */
14166
14167
14168 /**
14169  * g_mount_can_unmount:
14170  * @mount: a #GMount.
14171  *
14172  * Checks if @mount can be mounted.
14173  *
14174  * Returns: %TRUE if the @mount can be unmounted.
14175  */
14176
14177
14178 /**
14179  * g_io_error_from_win32_error:
14180  * @error_code: Windows error number.
14181  *
14182  * Converts some common error codes into GIO error codes. The
14183  * fallback value G_IO_ERROR_FAILED is returned for error codes not
14184  * handled.
14185  *
14186  * Returns: #GIOErrorEnum value for the given error number.
14187  * Since: 2.26
14188  */
14189
14190
14191 /**
14192  * g_icon_hash:
14193  * @icon: #gconstpointer to an icon object.
14194  *
14195  * Gets a hash for an icon.
14196  * use in a #GHashTable or similar data structure.
14197  *
14198  * Virtual: hash
14199  * Returns: a #guint containing a hash for the @icon, suitable for
14200  */
14201
14202
14203 /**
14204  * g_application_command_line_get_exit_status:
14205  * @cmdline: a #GApplicationCommandLine
14206  *
14207  * Gets the exit status of @cmdline.  See
14208  * g_application_command_line_set_exit_status() for more information.
14209  *
14210  * Returns: the exit status
14211  * Since: 2.28
14212  */
14213
14214
14215 /**
14216  * g_socket_get_listen_backlog:
14217  * @socket: a #GSocket.
14218  *
14219  * Gets the listen backlog setting of the socket. For details on this,
14220  * see g_socket_set_listen_backlog().
14221  *
14222  * Returns: the maximum number of pending connections.
14223  * Since: 2.22
14224  */
14225
14226
14227 /**
14228  * g_async_initable_new_valist_async:
14229  * @object_type: a #GType supporting #GAsyncInitable.
14230  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
14231  * @var_args: The var args list generated from @first_property_name.
14232  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14233  * @cancellable: optional #GCancellable object, %NULL to ignore.
14234  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14235  * @user_data: the data to pass to callback function
14236  *
14237  * Helper function for constructing #GAsyncInitiable object. This is
14238  * similar to g_object_new_valist() but also initializes the object
14239  * asynchronously.
14240  * When the initialization is finished, @callback will be called. You can
14241  * then call g_async_initable_new_finish() to get the new object and check
14242  * for any errors.
14243  *
14244  * Since: 2.22
14245  */
14246
14247
14248 /**
14249  * g_network_service_get_protocol:
14250  * @srv: a #GNetworkService
14251  *
14252  * Gets @srv's protocol name (eg, "tcp").
14253  *
14254  * Returns: @srv's protocol name
14255  * Since: 2.22
14256  */
14257
14258
14259 /**
14260  * g_unix_fd_message_new:
14261  *
14262  * Creates a new #GUnixFDMessage containing an empty file descriptor
14263  * list.
14264  *
14265  * Returns: a new #GUnixFDMessage
14266  * Since: 2.22
14267  */
14268
14269
14270 /**
14271  * g_settings_get_child:
14272  * @settings: a #GSettings object
14273  * @name: the name of the 'child' schema
14274  * @returns: (transfer full): a 'child' settings object
14275  *
14276  * Creates a 'child' settings object which has a base path of
14277  * <replaceable>base-path</replaceable>/@name", where
14278  * <replaceable>base-path</replaceable> is the base path of @settings.
14279  * The schema for the child settings object must have been declared
14280  * in the schema of @settings using a <tag class="starttag">child</tag> element.
14281  *
14282  * Since: 2.26
14283  */
14284
14285
14286 /**
14287  * g_simple_action_group_new:
14288  *
14289  * Creates a new, empty, #GSimpleActionGroup.
14290  *
14291  * Returns: a new #GSimpleActionGroup
14292  * Since: 2.28
14293  */
14294
14295
14296 /**
14297  * g_resolver_lookup_by_address_async:
14298  * @resolver: a #GResolver
14299  * @address: the address to reverse-resolve
14300  * @cancellable: a #GCancellable, or %NULL
14301  * @callback: callback to call after resolution completes
14302  * @user_data: data for @callback
14303  *
14304  * Begins asynchronously reverse-resolving @address to determine its
14305  * associated hostname, and eventually calls @callback, which must
14306  * call g_resolver_lookup_by_address_finish() to get the final result.
14307  *
14308  * Since: 2.22
14309  */
14310
14311
14312 /**
14313  * g_dbus_method_info_ref:
14314  * @info: A #GDBusMethodInfo
14315  *
14316  * If @info is statically allocated does nothing. Otherwise increases
14317  * the reference count.
14318  *
14319  * Returns: The same @info.
14320  * Since: 2.26
14321  */
14322
14323
14324 /**
14325  * g_dbus_connection_signal_subscribe:
14326  * @connection: A #GDBusConnection.
14327  * @sender: Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
14328  * @interface_name: D-Bus interface name to match on or %NULL to match on all interfaces.
14329  * @member: D-Bus signal name to match on or %NULL to match on all signals.
14330  * @object_path: Object path to match on or %NULL to match on all object paths.
14331  * @arg0: Contents of first string argument to match on or %NULL to match on all kinds of arguments.
14332  * @flags: Flags describing how to subscribe to the signal (currently unused).
14333  * @callback: Callback to invoke when there is a signal matching the requested data.
14334  * @user_data: User data to pass to @callback.
14335  * @user_data_free_func: Function to free @user_data with when subscription is removed or %NULL.
14336  *
14337  * Subscribes to signals on @connection and invokes @callback with a
14338  * whenever the signal is received. Note that @callback
14339  * will be invoked in the <link
14340  * linkend="g-main-context-push-thread-default">thread-default main
14341  * loop</link> of the thread you are calling this method from.
14342  * If @connection is not a message bus connection, @sender must be
14343  * %NULL.
14344  * If @sender is a well-known name note that @callback is invoked with
14345  * the unique name for the owner of @sender, not the well-known name
14346  * as one would expect. This is because the message bus rewrites the
14347  * name. As such, to avoid certain race conditions, users should be
14348  * tracking the name owner of the well-known name and use that when
14349  * processing the received signal.
14350  *
14351  * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
14352  * Since: 2.26
14353  */
14354
14355
14356 /**
14357  * g_themed_icon_append_name:
14358  * @icon: a #GThemedIcon
14359  * @iconname: name of icon to append to list of icons from within @icon.
14360  *
14361  * Append a name to the list of icons from within @icon.
14362  * <note><para>
14363  * Note that doing so invalidates the hash computed by prior calls
14364  * to g_icon_hash().
14365  * </para></note>
14366  */
14367
14368
14369 /**
14370  * g_socket_listener_add_socket:
14371  * @listener: a #GSocketListener
14372  * @socket: a listening #GSocket
14373  * @source_object: Optional #GObject identifying this source
14374  * @error: #GError for error reporting, or %NULL to ignore.
14375  *
14376  * Adds @socket to the set of sockets that we try to accept
14377  * new clients from. The socket must be bound to a local
14378  * address and listened to.
14379  * to accept to identify this particular source, which is
14380  * useful if you're listening on multiple addresses and do
14381  * different things depending on what address is connected to.
14382  *
14383  * Returns: %TRUE on success, %FALSE on error.
14384  * Since: 2.22
14385  */
14386
14387
14388 /**
14389  * g_file_info_set_is_hidden:
14390  * @info: a #GFileInfo.
14391  * @is_hidden: a #gboolean.
14392  *
14393  * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
14394  * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
14395  */
14396
14397
14398 /**
14399  * GUnixSocketAddress:abstract:
14400  *
14401  * Whether or not this is an abstract address
14402  * distinguishes between zero-padded and non-zero-padded
14403  * abstract addresses.
14404  *
14405  * Deprecated: Use #GUnixSocketAddress:address-type, which
14406  */
14407
14408
14409 /**
14410  * g_io_extension_get_type:
14411  * @extension: a #GIOExtension
14412  *
14413  * Gets the type associated with @extension.
14414  *
14415  * Returns: the type of @extension
14416  */
14417
14418
14419 /**
14420  * g_data_output_stream_put_int32:
14421  * @stream: a #GDataOutputStream.
14422  * @data: a #gint32.
14423  * @cancellable: optional #GCancellable object, %NULL to ignore.
14424  * @error: a #GError, %NULL to ignore.
14425  *
14426  * Puts a signed 32-bit integer into the output stream.
14427  *
14428  * Returns: %TRUE if @data was successfully added to the @stream.
14429  */
14430
14431
14432 /**
14433  * g_buffered_input_stream_new_sized:
14434  * @base_stream: a #GInputStream
14435  * @size: a #gsize
14436  *
14437  * Creates a new #GBufferedInputStream from the given @base_stream,
14438  * with a buffer set to @size.
14439  *
14440  * Returns: a #GInputStream.
14441  */
14442
14443
14444 /**
14445  * g_socket_is_closed:
14446  * @socket: a #GSocket
14447  *
14448  * Checks whether a socket is closed.
14449  *
14450  * Returns: %TRUE if socket is closed, %FALSE otherwise
14451  * Since: 2.22
14452  */
14453
14454
14455 /**
14456  * g_filter_output_stream_get_close_base_stream:
14457  * @stream: a #GFilterOutputStream.
14458  *
14459  * Returns whether the base stream will be closed when @stream is
14460  * closed.
14461  *
14462  * Returns: %TRUE if the base stream will be closed.
14463  */
14464
14465
14466 /**
14467  * GDBusMessageClass:
14468  *
14469  * Class structure for #GDBusMessage.
14470  *
14471  * Since: 2.26
14472  */
14473
14474
14475 /**
14476  * g_dbus_auth_observer_new:
14477  *
14478  * Creates a new #GDBusAuthObserver object.
14479  *
14480  * Returns: A #GDBusAuthObserver. Free with g_object_unref().
14481  * Since: 2.26
14482  */
14483
14484
14485 /**
14486  * g_file_info_copy_into:
14487  * @src_info: source to copy attributes from.
14488  * @dest_info: destination to copy attributes to.
14489  *
14490  * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
14491  */
14492
14493
14494 /**
14495  * GVolumeMonitor::drive-connected:
14496  * @volume_monitor: The volume monitor emitting the signal.
14497  * @drive: a #GDrive that was connected.
14498  *
14499  * Emitted when a drive is connected to the system.
14500  */
14501
14502
14503 /**
14504  * g_settings_bind_with_mapping:
14505  * @settings: a #GSettings object
14506  * @key: the key to bind
14507  * @object: a #GObject
14508  * @property: the name of the property to bind
14509  * @flags: flags for the binding
14510  * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
14511  * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
14512  * @user_data: data that gets passed to @get_mapping and @set_mapping
14513  * @destroy: #GDestroyNotify function for @user_data
14514  *
14515  * Create a binding between the @key in the @settings object
14516  * and the property @property of @object.
14517  * The binding uses the provided mapping functions to map between
14518  * settings and property values.
14519  * Note that the lifecycle of the binding is tied to the object,
14520  * and that you can have only one binding per object property.
14521  * If you bind the same property twice on the same object, the second
14522  * binding overrides the first one.
14523  *
14524  * Since: 2.26
14525  */
14526
14527
14528 /**
14529  * g_socket_client_get_socket_type:
14530  * @client: a #GSocketClient.
14531  *
14532  * Gets the socket type of the socket client.
14533  * See g_socket_client_set_socket_type() for details.
14534  *
14535  * Returns: a #GSocketFamily
14536  * Since: 2.22
14537  */
14538
14539
14540 /**
14541  * SECTION:gfil:
14542  * @short_description: File and Directory Handling
14543  * @include: gio/gio.h
14544  * @see_also: #GFileInfo, #GFileEnumerator
14545  *
14546  * #GFile is a high level abstraction for manipulating files on a
14547  * virtual file system. #GFile<!-- -->s are lightweight, immutable
14548  * objects that do no I/O upon creation. It is necessary to understand that
14549  * #GFile objects do not represent files, merely an identifier for a file. All
14550  * file content I/O is implemented as streaming operations (see #GInputStream and
14551  * #GOutputStream).
14552  * g_file_new_for_path() if you have a path.
14553  * g_file_new_for_uri() if you have a URI.
14554  * g_file_new_for_commandline_arg() for a command line argument.
14555  * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
14556  * One way to think of a #GFile is as an abstraction of a pathname. For normal
14557  * files the system pathname is what is stored internally, but as #GFile<!-- -->s
14558  * are extensible it could also be something else that corresponds to a pathname
14559  * in a userspace implementation of a filesystem.
14560  * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
14561  * files on a filesystem. You can move through the file system with #GFile using
14562  * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
14563  * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
14564  * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
14565  * end up at the same root if you repeatedly call g_file_get_parent() on two different
14566  * files.
14567  * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
14568  * are byte strings that are used to identify the file on the filesystem (relative to
14569  * its parent directory) and there is no guarantees that they have any particular charset
14570  * encoding or even make any sense at all. If you want to use filenames in a user
14571  * interface you should use the display name that you can get by requesting the
14572  * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
14573  * This is guaranteed to be in utf8 and can be used in a user interface. But always
14574  * store the real basename or the #GFile to use to actually access the file, because
14575  * there is no way to go from a display name to the actual name.
14576  * Using #GFile as an identifier has the same weaknesses as using a path in that
14577  * there may be multiple aliases for the same file. For instance, hard or
14578  * soft links may cause two different #GFile<!-- -->s to refer to the same file.
14579  * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
14580  * two #GFile<!-- -->s point to the same file you can query for the
14581  * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
14582  * canonicalization of pathnames passed in, so that trivial differences in the
14583  * path string used at creation (duplicated slashes, slash at end of path, "."
14584  * or ".." path segments, etc) does not create different #GFile<!-- -->s.
14585  * Many #GFile operations have both synchronous and asynchronous versions
14586  * to suit your application. Asynchronous versions of synchronous functions
14587  * simply have _async() appended to their function names. The asynchronous
14588  * I/O functions call a #GAsyncReadyCallback which is then used to finalize
14589  * the operation, producing a GAsyncResult which is then passed to the
14590  * function's matching _finish() operation.
14591  * Some #GFile operations do not have synchronous analogs, as they may
14592  * take a very long time to finish, and blocking may leave an application
14593  * unusable. Notable cases include:
14594  * g_file_mount_mountable() to mount a mountable file.
14595  * g_file_unmount_mountable_with_operation() to unmount a mountable file.
14596  * g_file_eject_mountable_with_operation() to eject a mountable file.
14597  * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
14598  * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
14599  * short. Entity tags are somewhat like a more abstract version of the
14600  * traditional mtime, and can be used to quickly determine if the file has
14601  * been modified from the version on the file system. See the HTTP 1.1
14602  * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
14603  * for HTTP Etag headers, which are a very similar concept.
14604  * </para>
14605  *
14606  * To construct a #gfile, you can use:
14607  * Other possible causes for aliases are: case insensitive filesystems, short
14608  */
14609
14610
14611 /**
14612  * g_desktop_app_info_get_filename:
14613  * @info: a #GDesktopAppInfo
14614  *
14615  * When @info was created from a known filename, return it.  In some
14616  * situations such as the #GDesktopAppInfo returned from
14617  * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
14618  *
14619  * Returns: The full path to the file for @info, or %NULL if not known.
14620  * Since: 2.24
14621  */
14622
14623
14624 /**
14625  * g_settings_backend_path_writable_changed:
14626  * @backend: a #GSettingsBackend implementation
14627  * @path: the name of the path
14628  *
14629  * Signals that the writability of all keys below a given path may have
14630  * changed.
14631  * Since GSettings performs no locking operations for itself, this call
14632  * will always be made in response to external events.
14633  *
14634  * Since: 2.26
14635  */
14636
14637
14638 /**
14639  * g_file_replace_contents_async:
14640  * @file: input #GFile.
14641  * @contents: string of contents to replace the file with.
14642  * @length: the length of @contents in bytes.
14643  * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
14644  * @make_backup: %TRUE if a backup should be created.
14645  * @flags: a set of #GFileCreateFlags.
14646  * @cancellable: optional #GCancellable object, %NULL to ignore.
14647  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
14648  * @user_data: the data to pass to callback function
14649  *
14650  * Starts an asynchronous replacement of @file with the given
14651  * current entity tag.
14652  * When this operation has completed, @callback will be called with
14653  * g_file_replace_contents_finish().
14654  * If @cancellable is not %NULL, then the operation can be cancelled by
14655  * triggering the cancellable object from another thread. If the operation
14656  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
14657  * If @make_backup is %TRUE, this function will attempt to
14658  * make a backup of @file.
14659  */
14660
14661
14662 /**
14663  * GActionGroup::action-removed:
14664  * @action_group: the #GActionGroup that changed
14665  * @action_name: the name of the action in @action_group
14666  *
14667  * Signals that an action is just about to be removed from the group.
14668  * This signal is emitted before the action is removed, so the action
14669  * is still visible and can be queried from the signal handler.
14670  *
14671  * Since: 2.28
14672  */
14673
14674
14675 /**
14676  * g_socket_set_timeout:
14677  * @socket: a #GSocket.
14678  * @timeout: the timeout for @socket, in seconds, or 0 for none
14679  *
14680  * Sets the time in seconds after which I/O operations on @socket will
14681  * time out if they have not yet completed.
14682  * On a blocking socket, this means that any blocking #GSocket
14683  * operation will time out after @timeout seconds of inactivity,
14684  * returning %G_IO_ERROR_TIMED_OUT.
14685  * On a non-blocking socket, calls to g_socket_condition_wait() will
14686  * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
14687  * created with g_socket_create_source() will trigger after
14688  * set, at which point calling g_socket_receive(), g_socket_send(),
14689  * g_socket_check_connect_result(), etc, will fail with
14690  * %G_IO_ERROR_TIMED_OUT.
14691  * If @timeout is 0 (the default), operations will never time out
14692  * on their own.
14693  * Note that if an I/O operation is interrupted by a signal, this may
14694  * cause the timeout to be reset.
14695  *
14696  * Since: 2.26
14697  */
14698
14699
14700 /**
14701  * g_app_info_set_as_default_for_extension:
14702  * @appinfo: a #GAppInfo.
14703  * @extension: a string containing the file extension (without the dot).
14704  * @error: a #GError.
14705  *
14706  * Sets the application as the default handler for the given file extension.
14707  *
14708  * Returns: %TRUE on success, %FALSE on error.
14709  */
14710
14711
14712 /**
14713  * g_unix_connection_send_fd:
14714  * @connection: a #GUnixConnection
14715  * @fd: a file descriptor
14716  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
14717  * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
14718  *
14719  * Passes a file descriptor to the recieving side of the
14720  * connection. The recieving end has to call g_unix_connection_receive_fd()
14721  * to accept the file descriptor.
14722  * As well as sending the fd this also writes a single byte to the
14723  * stream, as this is required for fd passing to work on some
14724  * implementations.
14725  *
14726  * Returns: a %TRUE on success, %NULL on error.
14727  * Since: 2.22
14728  */
14729
14730
14731 /**
14732  * g_content_type_is_unknown:
14733  * @type: a content type string
14734  *
14735  * Checks if the content type is the generic "unknown" type.
14736  * On UNIX this is the "application/octet-stream" mimetype,
14737  * while on win32 it is "*".
14738  *
14739  * Returns: %TRUE if the type is the unknown type.
14740  */
14741
14742
14743 /**
14744  * GZlibCompressor:file-info:
14745  *
14746  * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
14747  * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
14748  * and modification time from the file info to the the GZIP header.
14749  *
14750  * Since: 2.26
14751  */
14752
14753
14754 /**
14755  * g_async_result_get_source_object:
14756  * @res: a #GAsyncResult
14757  *
14758  * Gets the source object from a #GAsyncResult.
14759  * or %NULL if there is none.
14760  *
14761  * Returns: (transfer full): a new reference to the source object for the @res,
14762  */
14763
14764
14765 /**
14766  * g_file_replace_async:
14767  * @file: input #GFile.
14768  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
14769  * @make_backup: %TRUE if a backup should be created.
14770  * @flags: a set of #GFileCreateFlags.
14771  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
14772  * @cancellable: optional #GCancellable object, %NULL to ignore.
14773  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
14774  * @user_data: the data to pass to callback function
14775  *
14776  * Asynchronously overwrites the file, replacing the contents, possibly
14777  * creating a backup copy of the file first.
14778  * For more details, see g_file_replace() which is
14779  * the synchronous version of this call.
14780  * When the operation is finished, @callback will be called. You can then call
14781  * g_file_replace_finish() to get the result of the operation.
14782  */
14783
14784
14785 /**
14786  * g_file_set_display_name_finish:
14787  * @file: input #GFile.
14788  * @res: a #GAsyncResult.
14789  * @error: a #GError, or %NULL
14790  *
14791  * Finishes setting a display name started with
14792  * g_file_set_display_name_async().
14793  * Free the returned object with g_object_unref().
14794  *
14795  * Returns: (transfer full): a #GFile or %NULL on error.
14796  */
14797
14798
14799 /**
14800  * g_unix_mount_point_get_mount_path:
14801  * @mount_point: a #GUnixMountPoint.
14802  *
14803  * Gets the mount path for a unix mount point.
14804  *
14805  * Returns: a string containing the mount path.
14806  */
14807
14808
14809 /**
14810  * g_mount_get_uuid:
14811  * @mount: a #GMount.
14812  *
14813  * Gets the UUID for the @mount. The reference is typically based on
14814  * the file system UUID for the mount in question and should be
14815  * considered an opaque string. Returns %NULL if there is no UUID
14816  * available.
14817  * The returned string should be freed with g_free()
14818  * when no longer needed.
14819  *
14820  * Returns: the UUID for @mount or %NULL if no UUID can be computed.
14821  */
14822
14823
14824 /**
14825  * g_settings_revert:
14826  * @settings: a #GSettings instance
14827  *
14828  * Reverts all non-applied changes to the settings.  This function
14829  * does nothing unless @settings is in 'delay-apply' mode; see
14830  * g_settings_delay().  In the normal case settings are always applied
14831  * immediately.
14832  * Change notifications will be emitted for affected keys.
14833  */
14834
14835
14836 /**
14837  * g_file_resolve_relative_path:
14838  * @file: input #GFile.
14839  * @relative_path: a given relative path string.
14840  *
14841  * Resolves a relative path for @file to an absolute path.
14842  * This call does no blocking i/o.
14843  * is %NULL or if @file is invalid.
14844  * Free the returned object with g_object_unref().
14845  *
14846  * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
14847  */
14848
14849
14850 /**
14851  * g_application_get_flags:
14852  * @application: a #GApplication
14853  * @returns: the flags for @application
14854  *
14855  * Gets the flags for @application.
14856  * See #GApplicationFlags.
14857  *
14858  * Since: 2.28
14859  */
14860
14861
14862 /**
14863  * g_file_info_set_display_name:
14864  * @info: a #GFileInfo.
14865  * @display_name: a string containing a display name.
14866  *
14867  * Sets the display name for the current #GFileInfo.
14868  * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
14869  */
14870
14871
14872 /**
14873  * SECTION:gloadableico:
14874  * @short_description: Loadable Icons
14875  * @include: gio/gio.h
14876  * @see_also: #GIcon, #GThemedIcon
14877  *
14878  * Extends the #GIcon interface and adds the ability to
14879  * load icons from streams.
14880  */
14881
14882
14883 /**
14884  * g_file_replace:
14885  * @file: input #GFile.
14886  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
14887  * @make_backup: %TRUE if a backup should be created.
14888  * @flags: a set of #GFileCreateFlags.
14889  * @cancellable: optional #GCancellable object, %NULL to ignore.
14890  * @error: a #GError, or %NULL
14891  *
14892  * Returns an output stream for overwriting the file, possibly
14893  * creating a backup copy of the file first. If the file doesn't exist,
14894  * it will be created.
14895  * This will try to replace the file in the safest way possible so
14896  * that any errors during the writing will not affect an already
14897  * existing copy of the file. For instance, for local files it
14898  * may write to a temporary file and then atomically rename over
14899  * the destination when the stream is closed.
14900  * By default files created are generally readable by everyone,
14901  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
14902  * will be made readable only to the current user, to the level that
14903  * is supported on the target filesystem.
14904  * If @cancellable is not %NULL, then the operation can be cancelled by
14905  * triggering the cancellable object from another thread. If the operation
14906  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
14907  * If you pass in a non-#NULL @etag value, then this value is
14908  * compared to the current entity tag of the file, and if they differ
14909  * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
14910  * that the file has been changed since you last read it. You can get
14911  * the new etag from g_file_output_stream_get_etag() after you've
14912  * finished writing and closed the #GFileOutputStream. When you load
14913  * a new file you can use g_file_input_stream_query_info() to get
14914  * the etag of the file.
14915  * If @make_backup is %TRUE, this function will attempt to make a backup
14916  * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
14917  * error will be returned. If you want to replace anyway, try again with
14918  * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
14919  * and if the file is some other form of non-regular file then a
14920  * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
14921  * Some file systems don't allow all file names, and may
14922  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
14923  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
14924  * Other errors are possible too, and depend on what kind of
14925  * filesystem the file is on.
14926  * Free the returned object with g_object_unref().
14927  *
14928  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
14929  */
14930
14931
14932 /**
14933  * g_dbus_message_copy:
14934  * @message: A #GDBusMessage.
14935  * @error: Return location for error or %NULL.
14936  *
14937  * Copies @message. The copy is a deep copy and the returned
14938  * #GDBusMessage is completely identical except that it is guaranteed
14939  * to not be locked.
14940  * This operation can fail if e.g. @message contains file descriptors
14941  * and the per-process or system-wide open files limit is reached.
14942  * g_object_unref().
14943  *
14944  * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set. Free with
14945  * Since: 2.26
14946  */
14947
14948
14949 /**
14950  * g_dbus_connection_new_for_address_sync:
14951  * @address: A D-Bus address.
14952  * @flags: Flags describing how to make the connection.
14953  * @observer: A #GDBusAuthObserver or %NULL.
14954  * @cancellable: A #GCancellable or %NULL.
14955  * @error: Return location for error or %NULL.
14956  *
14957  * Synchronously connects and sets up a D-Bus client connection for
14958  * exchanging D-Bus messages with an endpoint specified by @address
14959  * which must be in the D-Bus address format.
14960  * This constructor can only be used to initiate client-side
14961  * connections - use g_dbus_connection_new_sync() if you need to act
14962  * as the server. In particular, @flags cannot contain the
14963  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
14964  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
14965  * This is a synchronous failable constructor. See
14966  * g_dbus_connection_new_for_address() for the asynchronous version.
14967  * If @observer is not %NULL it may be used to control the
14968  * authentication process.
14969  *
14970  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14971  * Since: 2.26
14972  */
14973
14974
14975 /**
14976  * GMountOperation:anonymous:
14977  *
14978  * Whether to use an anonymous user when authenticating.
14979  */
14980
14981
14982 /**
14983  * g_socket_condition_check:
14984  * @socket: a #GSocket
14985  * @condition: a #GIOCondition mask to check
14986  *
14987  * Checks on the readiness of @socket to perform operations.
14988  * The operations specified in @condition are checked for and masked
14989  * against the currently-satisfied conditions on @socket. The result
14990  * is returned.
14991  * Note that on Windows, it is possible for an operation to return
14992  * %G_IO_ERROR_WOULD_BLOCK even immediately after
14993  * g_socket_condition_check() has claimed that the socket is ready for
14994  * writing. Rather than calling g_socket_condition_check() and then
14995  * writing to the socket if it succeeds, it is generally better to
14996  * simply try writing to the socket right away, and try again later if
14997  * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
14998  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
14999  * these conditions will always be set in the output if they are true.
15000  * This call never blocks.
15001  *
15002  * Returns: the @GIOCondition mask of the current state
15003  * Since: 2.22
15004  */
15005
15006
15007 /**
15008  * g_bus_unown_name:
15009  * @owner_id: An identifier obtained from g_bus_own_name()
15010  *
15011  * Stops owning a name.
15012  *
15013  * Since: 2.26
15014  */
15015
15016
15017 /**
15018  * g_dbus_proxy_get_interface_info:
15019  * @proxy: A #GDBusProxy
15020  *
15021  * Returns the #GDBusInterfaceInfo, if any, specifying the minimal
15022  * interface that @proxy conforms to.
15023  * See the #GDBusProxy:g-interface-info property for more details.
15024  * object, it is owned by @proxy.
15025  *
15026  * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
15027  * Since: 2.26
15028  */
15029
15030
15031 /**
15032  * g_proxy_address_get_destination_hostnam:
15033  * @proxy: a #GProxyAddress
15034  *
15035  * Gets @proxy's destination hostname.
15036  *
15037  * Returns: the @proxy's destination hostname
15038  * Since: 2.26
15039  */
15040
15041
15042 /**
15043  * g_dbus_method_invocation_get_connection:
15044  * @invocation: A #GDBusMethodInvocation.
15045  *
15046  * Gets the #GDBusConnection the method was invoked on.
15047  *
15048  * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
15049  * Since: 2.26
15050  */
15051
15052
15053 /**
15054  * g_srv_target_get_hostname:
15055  * @target: a #GSrvTarget
15056  *
15057  * Gets @target's hostname (in ASCII form; if you are going to present
15058  * this to the user, you should use g_hostname_is_ascii_encoded() to
15059  * check if it contains encoded Unicode segments, and use
15060  * g_hostname_to_unicode() to convert it if it does.)
15061  *
15062  * Returns: @target's hostname
15063  * Since: 2.22
15064  */
15065
15066
15067 /**
15068  * g_io_extension_point_get_extensions:
15069  * @extension_point: a #GIOExtensionPoint
15070  *
15071  * Gets a list of all extensions that implement this extension point.
15072  * The list is sorted by priority, beginning with the highest priority.
15073  * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
15074  * modified.
15075  *
15076  * Returns: (element-type GIOExtension) (transfer none): a #GList of
15077  */
15078
15079
15080 /**
15081  * GSettings:has-unapplied:
15082  *
15083  * If this property is %TRUE, the #GSettings object has outstanding
15084  * changes that will be applied when g_settings_apply() is called.
15085  */
15086
15087
15088 /**
15089  * g_dbus_proxy_set_interface_info:
15090  * @proxy: A #GDBusProxy
15091  * @info: Minimum interface this proxy conforms to or %NULL to unset.
15092  *
15093  * Ensure that interactions with @proxy conform to the given
15094  * interface.  For example, when completing a method call, if the type
15095  * signature of the message isn't what's expected, the given #GError
15096  * is set.  Signals that have a type signature mismatch are simply
15097  * dropped.
15098  * See the #GDBusProxy:g-interface-info property for more details.
15099  *
15100  * Since: 2.26
15101  */
15102
15103
15104 /**
15105  * g_memory_input_stream_add_data:
15106  * @stream: a #GMemoryInputStream
15107  * @data: input data
15108  * @len: length of the data, may be -1 if @data is a nul-terminated string
15109  * @destroy: function that is called to free @data, or %NULL
15110  *
15111  * Appends @data to data that can be read from the input stream
15112  */
15113
15114
15115 /**
15116  * g_content_type_get_description:
15117  * @type: a content type string
15118  *
15119  * Gets the human readable description of the content type.
15120  * returned string with g_free()
15121  *
15122  * Returns: a short description of the content type @type. Free the
15123  */
15124
15125
15126 /**
15127  * g_permission_release_finish:
15128  * @permission: a #GPermission instance
15129  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
15130  * @error: a pointer to a %NULL #GError, or %NULL
15131  * @returns: %TRUE if the permission was successfully released
15132  *
15133  * Collects the result of attempting to release the permission
15134  * represented by @permission.
15135  * This is the second half of the asynchronous version of
15136  * g_permission_release().
15137  *
15138  * Since: 2.26
15139  */
15140
15141
15142 /**
15143  * g_dbus_message_get_num_unix_fds:
15144  * @message: A #GDBusMessage.
15145  *
15146  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
15147  *
15148  * Returns: The value.
15149  * Since: 2.26
15150  */
15151
15152
15153 /**
15154  * g_dbus_connection_unregister_object:
15155  * @connection: A #GDBusConnection.
15156  * @registration_id: A registration id obtained from g_dbus_connection_register_object().
15157  *
15158  * Unregisters an object.
15159  *
15160  * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
15161  * Since: 2.26
15162  */
15163
15164
15165 /**
15166  * SECTION:gmemoryoutputstrea:
15167  * @short_description: Streaming output operations on memory chunks
15168  * @include: gio/gio.h
15169  * @see_also: #GMemoryInputStream
15170  *
15171  * #GMemoryOutputStream is a class for using arbitrary
15172  * memory chunks as output for GIO streaming output operations.
15173  */
15174
15175
15176 /**
15177  * g_network_address_get_scheme:
15178  * @addr: a #GNetworkAddress
15179  *
15180  * Gets @addr's scheme
15181  *
15182  * Returns: @addr's scheme (%NULL if not built from URI)
15183  * Since: 2.26
15184  */
15185
15186
15187 /**
15188  * g_unix_mount_guess_icon:
15189  * @mount_entry: a #GUnixMountEntry
15190  *
15191  * Guesses the icon of a Unix mount.
15192  *
15193  * Returns: (transfer full): a #GIcon
15194  */
15195
15196
15197 /**
15198  * GDrive::changed:
15199  * @drive: a #GDrive.
15200  *
15201  * Emitted when the drive's state has changed.
15202  */
15203
15204
15205 /**
15206  * g_file_info_unset_attribute_mask:
15207  * @info: #GFileInfo.
15208  *
15209  * Unsets a mask set by g_file_info_set_attribute_mask(), if one
15210  * is set.
15211  */
15212
15213
15214 /**
15215  * GAction:parameter-type:
15216  *
15217  * The type of the parameter that must be given when activating the
15218  * action.
15219  *
15220  * Since: 2.28
15221  */
15222
15223
15224 /**
15225  * g_file_monitor:
15226  * @file: input #GFile
15227  * @flags: a set of #GFileMonitorFlags
15228  * @cancellable: optional #GCancellable object, %NULL to ignore
15229  * @error: a #GError, or %NULL
15230  *
15231  * Obtains a file or directory monitor for the given file, depending
15232  * on the type of the file.
15233  * If @cancellable is not %NULL, then the operation can be cancelled by
15234  * triggering the cancellable object from another thread. If the operation
15235  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15236  * Free the returned object with g_object_unref().
15237  *
15238  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
15239  * Since: 2.18
15240  */
15241
15242
15243 /**
15244  * g_credentials_set_unix_user:
15245  * @credentials: A #GCredentials.
15246  * @uid: The UNIX user identifier to set.
15247  * @error: Return location for error or %NULL.
15248  *
15249  * Tries to set the UNIX user identifier on @credentials. This method
15250  * is only available on UNIX platforms.
15251  * This operation can fail if #GCredentials is not supported on the
15252  * OS or if the native credentials type does not contain information
15253  * about the UNIX user.
15254  *
15255  * Returns: %TRUE if @uid was set, %FALSE if error is set.
15256  * Since: 2.26
15257  */
15258
15259
15260 /**
15261  * SECTION:gsocketaddres:
15262  * @short_description: Abstract base class representing endpoints for socket communication
15263  *
15264  * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
15265  * in the BSD sockets API. This is an abstract class; use
15266  * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
15267  * for UNIX domain sockets.
15268  */
15269
15270
15271 /**
15272  * g_drive_can_start_degraded:
15273  * @drive: a #GDrive.
15274  *
15275  * Checks if a drive can be started degraded.
15276  *
15277  * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
15278  * Since: 2.22
15279  */
15280
15281
15282 /**
15283  * g_content_type_can_be_executable:
15284  * @type: a content type string
15285  *
15286  * Checks if a content type can be executable. Note that for instance
15287  * things like text files can be executables (i.e. scripts and batch files).
15288  * can be executable, %FALSE otherwise.
15289  *
15290  * Returns: %TRUE if the file type corresponds to a type that
15291  */
15292
15293
15294 /**
15295  * g_file_info_get_attribute_as_string:
15296  * @info: a #GFileInfo.
15297  * @attribute: a file attribute key.
15298  *
15299  * Gets the value of a attribute, formated as a string.
15300  * This escapes things as needed to make the string valid
15301  * utf8.
15302  * When you're done with the string it must be freed with g_free().
15303  *
15304  * Returns: a UTF-8 string associated with the given @attribute.
15305  */
15306
15307
15308 /**
15309  * GResolver::reload:
15310  * @resolver: a #GResolver
15311  *
15312  * Emitted when the resolver notices that the system resolver
15313  * configuration has changed.
15314  */
15315
15316
15317 /**
15318  * g_settings_get_range:
15319  * @settings: a #GSettings
15320  * @key: the key to query the range of
15321  * @returns: a #GVariant describing the range
15322  *
15323  * Queries the range of a key.
15324  * This function will return a #GVariant that fully describes the range
15325  * of values that are valid for @key.
15326  * The type of #GVariant returned is <literal>(sv)</literal>.  The
15327  * string describes the type of range restriction in effect.  The type
15328  * and meaning of the value contained in the variant depends on the
15329  * string.
15330  * If the string is <literal>'type'</literal> then the variant contains
15331  * an empty array.  The element type of that empty array is the expected
15332  * type of value and all values of that type are valid.
15333  * If the string is <literal>'enum'</literal> then the variant contains
15334  * an array enumerating the possible values.  Each item in the array is
15335  * a possible valid value and no other values are valid.
15336  * If the string is <literal>'flags'</literal> then the variant contains
15337  * an array.  Each item in the array is a value that may appear zero or
15338  * one times in an array to be used as the value for this key.  For
15339  * example, if the variant contained the array <literal>['x',
15340  * 'y']</literal> then the valid values for the key would be
15341  * <literal>[]</literal>, <literal>['x']</literal>,
15342  * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
15343  * <literal>['y', 'x']</literal>.
15344  * Finally, if the string is <literal>'range'</literal> then the variant
15345  * contains a pair of like-typed values -- the minimum and maximum
15346  * permissible values for this key.
15347  * This information should not be used by normal programs.  It is
15348  * considered to be a hint for introspection purposes.  Normal programs
15349  * should already know what is permitted by their own schema.  The
15350  * format may change in any way in the future -- but particularly, new
15351  * forms may be added to the possibilities described above.
15352  * It is a programmer error to give a @key that isn't contained in the
15353  * schema for @settings.
15354  * You should free the returned value with g_variant_unref() when it is
15355  * no longer needed.
15356  *
15357  * Since: 2.28
15358  */
15359
15360
15361 /**
15362  * g_socket_client_set_protocol:
15363  * @client: a #GSocketClient.
15364  * @protocol: a #GSocketProtocol
15365  *
15366  * Sets the protocol of the socket client.
15367  * The sockets created by this object will use of the specified
15368  * protocol.
15369  * If @protocol is %0 that means to use the default
15370  * protocol for the socket family and type.
15371  *
15372  * Since: 2.22
15373  */
15374
15375
15376 /**
15377  * g_mount_unmount:
15378  * @mount: a #GMount.
15379  * @flags: flags affecting the operation
15380  * @cancellable: optional #GCancellable object, %NULL to ignore.
15381  * @callback: a #GAsyncReadyCallback, or %NULL.
15382  * @user_data: user data passed to @callback.
15383  *
15384  * Unmounts a mount. This is an asynchronous operation, and is
15385  * finished by calling g_mount_unmount_finish() with the @mount
15386  * and #GAsyncResult data returned in the @callback.
15387  *
15388  * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
15389  */
15390
15391
15392 /**
15393  * g_unix_mount_point_is_user_mountable:
15394  * @mount_point: a #GUnixMountPoint.
15395  *
15396  * Checks if a unix mount point is mountable by the user.
15397  *
15398  * Returns: %TRUE if the mount point is user mountable.
15399  */
15400
15401
15402 /**
15403  * g_app_info_supports_uris:
15404  * @appinfo: a #GAppInfo.
15405  *
15406  * Checks if the application supports reading files and directories from URIs.
15407  *
15408  * Returns: %TRUE if the @appinfo supports URIs.
15409  */
15410
15411
15412 /**
15413  * g_seekable_can_truncate:
15414  * @seekable: a #GSeekable.
15415  *
15416  * Tests if the stream can be truncated.
15417  *
15418  * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
15419  */
15420
15421
15422 /**
15423  * g_dbus_interface_info_lookup_property:
15424  * @info: A #GDBusInterfaceInfo.
15425  * @name: A D-Bus property name (typically in CamelCase).
15426  *
15427  * Looks up information about a property.
15428  * This cost of this function is O(n) in number of properties.
15429  *
15430  * Returns: A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
15431  * Since: 2.26
15432  */
15433
15434
15435 /**
15436  * g_mount_can_eject:
15437  * @mount: a #GMount.
15438  *
15439  * Checks if @mount can be eject.
15440  *
15441  * Returns: %TRUE if the @mount can be ejected.
15442  */
15443
15444
15445 /**
15446  * SECTION:gmountoperatio:
15447  * @short_description: Object used for authentication and user interaction
15448  * @include: gio/gio.h
15449  *
15450  * #GMountOperation provides a mechanism for interacting with the user.
15451  * It can be used for authenticating mountable operations, such as loop
15452  * mounting files, hard drive partitions or server locations. It can
15453  * also be used to ask the user questions or show a list of applications
15454  * preventing unmount or eject operations from completing.
15455  * Note that #GMountOperation is used for more than just #GMount
15456  * objects â€“ for example it is also used in g_drive_start() and
15457  * g_drive_stop().
15458  * Users should instantiate a subclass of this that implements all the
15459  * various callbacks to show the required dialogs, such as
15460  * #GtkMountOperation. If no user interaction is desired (for example
15461  * when automounting filesystems at login time), usually %NULL can be
15462  * passed, see each method taking a #GMountOperation for details.
15463  */
15464
15465
15466 /**
15467  * g_data_input_stream_read_int64:
15468  * @stream: a given #GDataInputStream.
15469  * @cancellable: optional #GCancellable object, %NULL to ignore.
15470  * @error: #GError for error reporting.
15471  *
15472  * Reads a 64-bit/8-byte value from @stream.
15473  * In order to get the correct byte order for this read operation,
15474  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15475  * If @cancellable is not %NULL, then the operation can be cancelled by
15476  * triggering the cancellable object from another thread. If the operation
15477  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15478  * an error occurred.
15479  *
15480  * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
15481  */
15482
15483
15484 /**
15485  * SECTION:gunixoutputstrea:
15486  * @short_description: Streaming output operations for UNIX file descriptors
15487  * @include: gio/gunixoutputstream.h
15488  * @see_also: #GOutputStream
15489  *
15490  * #GUnixOutputStream implements #GOutputStream for writing to a
15491  * UNIX file descriptor, including asynchronous operations. The file
15492  * descriptor must be selectable, so it doesn't work with opened files.
15493  * Note that <filename>&lt;gio/gunixoutputstream.h&gt;</filename> belongs
15494  * to the UNIX-specific GIO interfaces, thus you have to use the
15495  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15496  */
15497
15498
15499 /**
15500  * g_simple_async_result_get_op_res_gpointer: (skip)
15501  * @simple: a #GSimpleAsyncResult.
15502  *
15503  * Gets a pointer result as returned by the asynchronous function.
15504  *
15505  * Returns: a pointer from the result.
15506  */
15507
15508
15509 /**
15510  * g_memory_output_stream_steal_data:
15511  * @ostream: a #GMemoryOutputStream
15512  *
15513  * Gets any loaded data from the @ostream. Ownership of the data
15514  * is transferred to the caller; when no longer needed it must be
15515  * freed using the free function set in @ostream's
15516  * #GMemoryOutputStream:destroy-function property.
15517  *
15518  * Returns: (transfer full): the stream's data
15519  * Since: 2.26
15520  */
15521
15522
15523 /**
15524  * g_unix_mount_get_fs_type:
15525  * @mount_entry: a #GUnixMount.
15526  *
15527  * Gets the filesystem type for the unix mount.
15528  *
15529  * Returns: a string containing the file system type.
15530  */
15531
15532
15533 /**
15534  * g_data_input_stream_read_uint32:
15535  * @stream: a given #GDataInputStream.
15536  * @cancellable: optional #GCancellable object, %NULL to ignore.
15537  * @error: #GError for error reporting.
15538  *
15539  * Reads an unsigned 32-bit/4-byte value from @stream.
15540  * In order to get the correct byte order for this read operation,
15541  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15542  * If @cancellable is not %NULL, then the operation can be cancelled by
15543  * triggering the cancellable object from another thread. If the operation
15544  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15545  * an error occurred.
15546  *
15547  * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
15548  */
15549
15550
15551 /**
15552  * GInetAddress:is-any:
15553  *
15554  * Whether this is the "any" address for its family.
15555  * See g_inet_address_get_is_any().
15556  *
15557  * Since: 2.22
15558  */
15559
15560
15561 /**
15562  * g_volume_get_uuid:
15563  * @volume: a #GVolume.
15564  *
15565  * Gets the UUID for the @volume. The reference is typically based on
15566  * the file system UUID for the volume in question and should be
15567  * considered an opaque string. Returns %NULL if there is no UUID
15568  * available.
15569  * The returned string should be freed with g_free()
15570  * when no longer needed.
15571  *
15572  * Returns: the UUID for @volume or %NULL if no UUID can be computed.
15573  */
15574
15575
15576 /**
15577  * GDataStream:byte-order:
15578  *
15579  * The ::byte-order property determines the byte ordering that
15580  * is used when reading multi-byte entities (such as integers)
15581  * from the stream.
15582  */
15583
15584
15585 /**
15586  * g_resolver_error_quark:
15587  *
15588  * Gets the #GResolver Error Quark.
15589  *
15590  * Returns: a #GQuark.
15591  * Since: 2.22
15592  */
15593
15594
15595 /**
15596  * g_input_stream_clear_pending:
15597  * @stream: input stream
15598  *
15599  * Clears the pending flag on @stream.
15600  */
15601
15602
15603 /**
15604  * g_file_copy_finish:
15605  * @file: input #GFile.
15606  * @res: a #GAsyncResult.
15607  * @error: a #GError, or %NULL
15608  *
15609  * Finishes copying the file started with
15610  * g_file_copy_async().
15611  *
15612  * Returns: a %TRUE on success, %FALSE on error.
15613  */
15614
15615
15616 /**
15617  * g_file_get_uri_scheme:
15618  * @file: input #GFile.
15619  *
15620  * Gets the URI scheme for a #GFile.
15621  * RFC 3986 decodes the scheme as:
15622  * <programlisting>
15623  * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
15624  * </programlisting>
15625  * Common schemes include "file", "http", "ftp", etc.
15626  * This call does no blocking i/o.
15627  * #GFile. The returned string should be freed with g_free()
15628  * when no longer needed.
15629  *
15630  * Returns: a string containing the URI scheme for the given
15631  */
15632
15633
15634 /**
15635  * g_settings_set_boolean:
15636  * @settings: a #GSettings object
15637  * @key: the name of the key to set
15638  * @value: the value to set it to
15639  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
15640  *
15641  * Sets @key in @settings to @value.
15642  * A convenience variant of g_settings_set() for booleans.
15643  * It is a programmer error to give a @key that isn't specified as
15644  * having a boolean type in the schema for @settings.
15645  *
15646  * Since: 2.26
15647  */
15648
15649
15650 /**
15651  * SECTION:gsocketclien:
15652  * @short_description: Helper for connecting to a network service
15653  * @include: gio/gio.h
15654  * @see_also: #GSocketConnection, #GSocketListener
15655  *
15656  * #GSocketClient is a high-level utility class for connecting to a
15657  * network host using a connection oriented socket type.
15658  * You create a #GSocketClient object, set any options you want, then
15659  * call a sync or async connect operation, which returns a #GSocketConnection
15660  * subclass on success.
15661  * The type of the #GSocketConnection object returned depends on the type of
15662  * the underlying socket that is in use. For instance, for a TCP/IP connection
15663  * it will be a #GTcpConnection.
15664  *
15665  * Since: 2.22
15666  */
15667
15668
15669 /**
15670  * g_app_info_get_all:
15671  *
15672  * Gets a list of all of the applications currently registered
15673  * on this system.
15674  * For desktop files, this includes applications that have
15675  * <literal>NoDisplay=true</literal> set or are excluded from
15676  * display by means of <literal>OnlyShowIn</literal> or
15677  * <literal>NotShowIn</literal>. See g_app_info_should_show().
15678  * The returned list does not include applications which have
15679  * the <literal>Hidden</literal> key set.
15680  *
15681  * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
15682  */
15683
15684
15685 /**
15686  * g_socket_send:
15687  * @socket: a #GSocket
15688  * @buffer: the buffer containing the data to send.
15689  * @size: the number of bytes to send
15690  * @cancellable: a %GCancellable or %NULL
15691  * @error: #GError for error reporting, or %NULL to ignore.
15692  *
15693  * Tries to send @size bytes from @buffer on the socket. This is
15694  * mainly used by connection-oriented sockets; it is identical to
15695  * g_socket_send_to() with @address set to %NULL.
15696  * If the socket is in blocking mode the call will block until there is
15697  * space for the data in the socket queue. If there is no space available
15698  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
15699  * will be returned. To be notified when space is available, wait for the
15700  * %G_IO_OUT condition. Note though that you may still receive
15701  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
15702  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
15703  * very common due to the way the underlying APIs work.)
15704  * On error -1 is returned and @error is set accordingly.
15705  * on error
15706  *
15707  * Returns: Number of bytes written (which may be less than @size), or -1
15708  * Since: 2.22
15709  */
15710
15711
15712 /**
15713  * g_socket_client_set_timeout:
15714  * @client: a #GSocketClient.
15715  * @timeout: the timeout
15716  *
15717  * Sets the I/O timeout for sockets created by @client. @timeout is a
15718  * time in seconds, or 0 for no timeout (the default).
15719  * The timeout value affects the initial connection attempt as well,
15720  * so setting this may cause calls to g_socket_client_connect(), etc,
15721  * to fail with %G_IO_ERROR_TIMED_OUT.
15722  *
15723  * Since: 2.26
15724  */
15725
15726
15727 /**
15728  * g_file_open_readwrite_finish:
15729  * @file: input #GFile.
15730  * @res: a #GAsyncResult.
15731  * @error: a #GError, or %NULL
15732  *
15733  * Finishes an asynchronous file read operation started with
15734  * g_file_open_readwrite_async().
15735  * Free the returned object with g_object_unref().
15736  *
15737  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
15738  * Since: 2.22
15739  */
15740
15741
15742 /**
15743  * GMountOperation:choice:
15744  *
15745  * The index of the user's choice when a question is asked during the
15746  * mount operation. See the #GMountOperation::ask-question signal.
15747  */
15748
15749
15750 /**
15751  * g_buffered_output_stream_get_auto_grow:
15752  * @stream: a #GBufferedOutputStream.
15753  *
15754  * Checks if the buffer automatically grows as data is added.
15755  * %FALSE otherwise.
15756  *
15757  * Returns: %TRUE if the @stream's buffer automatically grows,
15758  */
15759
15760
15761 /**
15762  * g_socket_new:
15763  * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
15764  * @type: the socket type to use.
15765  * @protocol: the id of the protocol to use, or 0 for default.
15766  * @error: #GError for error reporting, or %NULL to ignore.
15767  *
15768  * Creates a new #GSocket with the defined family, type and protocol.
15769  * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
15770  * for the family and type is used.
15771  * The @protocol is a family and type specific int that specifies what
15772  * kind of protocol to use. #GSocketProtocol lists several common ones.
15773  * Many families only support one protocol, and use 0 for this, others
15774  * support several and using 0 means to use the default protocol for
15775  * the family and type.
15776  * The protocol id is passed directly to the operating
15777  * system, so you can use protocols not listed in #GSocketProtocol if you
15778  * know the protocol number used for it.
15779  * Free the returned object with g_object_unref().
15780  *
15781  * Returns: a #GSocket or %NULL on error.
15782  * Since: 2.22
15783  */
15784
15785
15786 /**
15787  * g_converter_input_stream_get_converter:
15788  * @converter_stream: a #GConverterInputStream
15789  *
15790  * Gets the #GConverter that is used by @converter_stream.
15791  *
15792  * Returns: (transfer none): the converter of the converter input stream
15793  * Since: 2.24
15794  */
15795
15796
15797 /**
15798  * g_file_info_set_attribute_stringv:
15799  * @info: a #GFileInfo.
15800  * @attribute: a file attribute key.
15801  * @attr_value: a %NULL terminated string array
15802  *
15803  * Sets the @attribute to contain the given @attr_value,
15804  * if possible.
15805  *
15806  * Sinze: 2.22
15807  */
15808
15809
15810 /**
15811  * g_themed_icon_get_names:
15812  * @icon: a #GThemedIcon.
15813  *
15814  * Gets the names of icons from within @icon.
15815  *
15816  * Returns: (transfer none): a list of icon names.
15817  */
15818
15819
15820 /**
15821  * g_file_mount_mountable:
15822  * @file: input #GFile.
15823  * @flags: flags affecting the operation
15824  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
15825  * @cancellable: optional #GCancellable object, %NULL to ignore.
15826  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
15827  * @user_data: the data to pass to callback function
15828  *
15829  * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
15830  * Using @mount_operation, you can request callbacks when, for instance,
15831  * passwords are needed during authentication.
15832  * If @cancellable is not %NULL, then the operation can be cancelled by
15833  * triggering the cancellable object from another thread. If the operation
15834  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15835  * When the operation is finished, @callback will be called. You can then call
15836  * g_file_mount_mountable_finish() to get the result of the operation.
15837  */
15838
15839
15840 /**
15841  * GCredentials:
15842  *
15843  * The #GCredentials structure contains only private data and
15844  * should only be accessed using the provided API.
15845  *
15846  * Since: 2.26
15847  */
15848
15849
15850 /**
15851  * g_desktop_app_info_lookup_get_default_for_uri_scheme:
15852  * @lookup: a #GDesktopAppInfoLookup
15853  * @uri_scheme: a string containing a URI scheme.
15854  *
15855  * Gets the default application for launching applications
15856  * using this URI scheme for a particular GDesktopAppInfoLookup
15857  * implementation.
15858  * The GDesktopAppInfoLookup interface and this function is used
15859  * to implement g_app_info_get_default_for_uri_scheme() backends
15860  * in a GIO module. There is no reason for applications to use it
15861  * directly. Applications should use g_app_info_get_default_for_uri_scheme().
15862  *
15863  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
15864  * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
15865  */
15866
15867
15868 /**
15869  * g_application_get_inactivity_timeout:
15870  * @application: a #GApplication
15871  *
15872  * Gets the current inactivity timeout for the application.
15873  * This is the amount of time (in milliseconds) after the last call to
15874  * g_application_release() before the application stops running.
15875  *
15876  * Returns: the timeout, in milliseconds
15877  * Since: 2.28
15878  */
15879
15880
15881 /**
15882  * g_periodic_get_hz:
15883  * @periodic: a #GPeriodic clock
15884  *
15885  * Gets the frequency of the clock.
15886  *
15887  * Returns: the frquency of the clock, in Hz
15888  * Since: 2.28
15889  */
15890
15891
15892 /**
15893  * g_unix_mount_get_mount_path:
15894  * @mount_entry: input #GUnixMountEntry to get the mount path for.
15895  *
15896  * Gets the mount path for a unix mount.
15897  *
15898  * Returns: the mount path for @mount_entry.
15899  */
15900
15901
15902 /**
15903  * g_app_info_get_all_for_type:
15904  * @content_type: the content type to find a #GAppInfo for
15905  *
15906  * Gets a list of all #GAppInfo<!-- -->s for a given content type.
15907  * or %NULL on error.
15908  *
15909  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfo<!-- -->s for given @content_type
15910  */
15911
15912
15913 /**
15914  * g_win32_input_stream_get_handle:
15915  * @stream: a #GWin32InputStream
15916  *
15917  * Return the Windows file handle that the stream reads from.
15918  *
15919  * Returns: The file handle of @stream
15920  * Since: 2.26
15921  */
15922
15923
15924 /**
15925  * GDataOutputStream:byte-order:
15926  *
15927  * Determines the byte ordering that is used when writing
15928  * multi-byte entities (such as integers) to the stream.
15929  */
15930
15931
15932 /**
15933  * g_dbus_method_invocation_get_method_info:
15934  * @invocation: A #GDBusMethodInvocation.
15935  *
15936  * Gets information about the method call, if any.
15937  *
15938  * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
15939  * Since: 2.26
15940  */
15941
15942
15943 /**
15944  * g_inet_address_new_from_bytes:
15945  * @bytes: raw address data
15946  * @family: the address family of @bytes
15947  *
15948  * Creates a new #GInetAddress from the given @family and @bytes.
15949  * %G_INET_ADDRESS_IPV6.
15950  *
15951  * Returns: a new #GInetAddress corresponding to @family and @bytes.
15952  * Since: 2.22
15953  */
15954
15955
15956 /**
15957  * g_file_attribute_info_list_unref:
15958  * @list: The #GFileAttributeInfoList to unreference.
15959  *
15960  * Removes a reference from the given @list. If the reference count
15961  * falls to zero, the @list is deleted.
15962  */
15963
15964
15965 /**
15966  * g_bus_own_name_on_connection:
15967  * @connection: A #GDBusConnection.
15968  * @name: The well-known name to own.
15969  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
15970  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
15971  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
15972  * @user_data: User data to pass to handlers.
15973  * @user_data_free_func: Function for freeing @user_data or %NULL.
15974  *
15975  * Like g_bus_own_name() but takes a #GDBusConnection instead of a
15976  * #GBusType.
15977  * g_bus_unown_name() to stop owning the name.
15978  *
15979  * Returns: An identifier (never 0) that an be used with
15980  * Since: 2.26
15981  */
15982
15983
15984 /**
15985  * g_unix_input_stream_set_close_fd:
15986  * @stream: a #GUnixInputStream
15987  * @close_fd: %TRUE to close the file descriptor when done
15988  *
15989  * Sets whether the file descriptor of @stream shall be closed
15990  * when the stream is closed.
15991  *
15992  * Since: 2.20
15993  */
15994
15995
15996 /**
15997  * GMountOperation::ask-password:
15998  * @op: a #GMountOperation requesting a password.
15999  * @message: string containing a message to display to the user.
16000  * @default_user: string containing the default user name.
16001  * @default_domain: string containing the default domain.
16002  * @flags: a set of #GAskPasswordFlags.
16003  *
16004  * Emitted when a mount operation asks the user for a password.
16005  * If the message contains a line break, the first line should be
16006  * presented as a heading. For example, it may be used as the
16007  * primary text in a #GtkMessageDialog.
16008  */
16009
16010
16011 /**
16012  * g_file_query_filesystem_info:
16013  * @file: input #GFile.
16014  * @attributes: an attribute query string.
16015  * @cancellable: optional #GCancellable object, %NULL to ignore.
16016  * @error: a #GError.
16017  *
16018  * Similar to g_file_query_info(), but obtains information
16019  * about the filesystem the @file is on, rather than the file itself.
16020  * For instance the amount of space available and the type of
16021  * the filesystem.
16022  * The @attributes value is a string that specifies the file attributes that
16023  * should be gathered. It is not an error if it's not possible to read a particular
16024  * requested attribute from a file - it just won't be set. @attributes should
16025  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
16026  * means all attributes, and a wildcard like "fs:*" means all attributes in the fs
16027  * namespace. The standard namespace for filesystem attributes is "fs".
16028  * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
16029  * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
16030  * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
16031  * If @cancellable is not %NULL, then the operation can be cancelled by
16032  * triggering the cancellable object from another thread. If the operation
16033  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16034  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
16035  * Other errors are possible too, and depend on what kind of filesystem the file is on.
16036  * Free the returned object with g_object_unref().
16037  *
16038  * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
16039  */
16040
16041
16042 /**
16043  * g_socket_control_message_serialize:
16044  * @message: a #GSocketControlMessage
16045  * @data: A buffer to write data to
16046  *
16047  * Converts the data in the message to bytes placed in the
16048  * message.
16049  * returned by g_socket_control_message_get_size() on this
16050  * object.
16051  *
16052  * Since: 2.22
16053  */
16054
16055
16056 /**
16057  * g_dbus_connection_get_unique_name:
16058  * @connection: A #GDBusConnection.
16059  *
16060  * Gets the unique name of @connection as assigned by the message
16061  * bus. This can also be used to figure out if @connection is a
16062  * message bus connection.
16063  * bus connection. Do not free this string, it is owned by
16064  *
16065  * Returns: The unique name or %NULL if @connection is not a message
16066  * Since: 2.26
16067  */
16068
16069
16070 /**
16071  * g_unix_input_stream_new:
16072  * @fd: a UNIX file descriptor
16073  * @close_fd: %TRUE to close the file descriptor when done
16074  *
16075  * Creates a new #GUnixInputStream for the given @fd.
16076  * If @close_fd is %TRUE, the file descriptor will be closed
16077  * when the stream is closed.
16078  *
16079  * Returns: a new #GUnixInputStream
16080  */
16081
16082
16083 /**
16084  * g_simple_async_result_run_in_thread:
16085  * @simple: a #GSimpleAsyncResult.
16086  * @func: a #GSimpleAsyncThreadFunc.
16087  * @io_priority: the io priority of the request.
16088  * @cancellable: optional #GCancellable object, %NULL to ignore.
16089  *
16090  * Runs the asynchronous job in a separate thread and then calls
16091  * g_simple_async_result_complete_in_idle() on @simple to return
16092  * the result to the appropriate main loop.
16093  * Calling this function takes a reference to @simple for as long as
16094  * is needed to run the job and report its completion.
16095  */
16096
16097
16098 /**
16099  * g_dbus_proxy_get_cached_property:
16100  * @proxy: A #GDBusProxy.
16101  * @property_name: Property name.
16102  *
16103  * Looks up the value for a property from the cache. This call does no
16104  * blocking IO.
16105  * If @proxy has an expected interface (see
16106  * #GDBusProxy:g-interface-info), then @property_name (for existence)
16107  * is checked against it.
16108  * for @property_name or %NULL if the value is not in the cache. The
16109  * returned reference must be freed with g_variant_unref().
16110  *
16111  * Returns: A reference to the #GVariant instance that holds the value
16112  * Since: 2.26
16113  */
16114
16115
16116 /**
16117  * g_file_io_stream_query_info:
16118  * @stream: a #GFileIOStream.
16119  * @attributes: a file attribute query string.
16120  * @cancellable: optional #GCancellable object, %NULL to ignore.
16121  * @error: a #GError, %NULL to ignore.
16122  *
16123  * Queries a file io stream for the given @attributes.
16124  * This function blocks while querying the stream. For the asynchronous
16125  * version of this function, see g_file_io_stream_query_info_async().
16126  * While the stream is blocked, the stream will set the pending flag
16127  * internally, and any other operations on the stream will fail with
16128  * %G_IO_ERROR_PENDING.
16129  * Can fail if the stream was already closed (with @error being set to
16130  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
16131  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
16132  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
16133  * all cases of failure, %NULL will be returned.
16134  * If @cancellable is not %NULL, then the operation can be cancelled by
16135  * triggering the cancellable object from another thread. If the operation
16136  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
16137  * be returned.
16138  *
16139  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
16140  * Since: 2.22
16141  */
16142
16143
16144 /**
16145  * g_mount_operation_get_usernam:
16146  * @op: a #GMountOperation.
16147  *
16148  * Get the user name from the mount operation.
16149  *
16150  * Returns: a string containing the user name.
16151  */
16152
16153
16154 /**
16155  * SECTION:gproxyaddres:
16156  * @short_description: An internet address with proxy information
16157  *
16158  * Support for proxied #GInetSocketAddress.
16159  */
16160
16161
16162 /**
16163  * GWin32InputStream:handle:
16164  *
16165  * The handle that the stream reads from.
16166  *
16167  * Since: 2.26
16168  */
16169
16170
16171 /**
16172  * GDBusServer:
16173  *
16174  * The #GDBusServer structure contains only private data and
16175  * should only be accessed using the provided API.
16176  *
16177  * Since: 2.26
16178  */
16179
16180
16181 /**
16182  * g_win32_output_stream_get_close_handle:
16183  * @stream: a #GWin32OutputStream
16184  *
16185  * Returns whether the handle of @stream will be closed when the
16186  * stream is closed.
16187  *
16188  * Returns: %TRUE if the handle is closed when done
16189  * Since: 2.26
16190  */
16191
16192
16193 /**
16194  * g_file_eject_mountable_with_operation_finish:
16195  * @file: input #GFile.
16196  * @result: a #GAsyncResult.
16197  * @error: a #GError, or %NULL
16198  *
16199  * Finishes an asynchronous eject operation started by
16200  * g_file_eject_mountable_with_operation().
16201  * otherwise.
16202  *
16203  * Returns: %TRUE if the @file was ejected successfully. %FALSE
16204  * Since: 2.22
16205  */
16206
16207
16208 /**
16209  * g_socket_client_set_family:
16210  * @client: a #GSocketClient.
16211  * @family: a #GSocketFamily
16212  *
16213  * Sets the socket family of the socket client.
16214  * If this is set to something other than %G_SOCKET_FAMILY_INVALID
16215  * then the sockets created by this object will be of the specified
16216  * family.
16217  * This might be useful for instance if you want to force the local
16218  * connection to be an ipv4 socket, even though the address might
16219  * be an ipv6 mapped to ipv4 address.
16220  *
16221  * Since: 2.22
16222  */
16223
16224
16225 /**
16226  * g_vfs_parse_name:
16227  * @vfs: a #GVfs.
16228  * @parse_name: a string to be parsed by the VFS module.
16229  *
16230  * This operation never fails, but the returned object might
16231  * not support any I/O operations if the @parse_name cannot
16232  * be parsed by the #GVfs module.
16233  * Free the returned object with g_object_unref().
16234  *
16235  * Returns: (transfer full): a #GFile for the given @parse_name.
16236  */
16237
16238
16239 /**
16240  * g_application_command_line_get_environ:
16241  * @cmdline: a #GApplicationCommandLine
16242  *
16243  * Gets the contents of the 'environ' variable of the command line
16244  * invocation, as would be returned by g_get_environ().  The strings may
16245  * contain non-utf8 data.
16246  * The remote application usually does not send an environment.  Use
16247  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
16248  * set it is possible that the environment is still not available (due
16249  * to invocation messages from other applications).
16250  * The return value should not be modified or freed and is valid for as
16251  * long as @cmdline exists.
16252  *
16253  * Returns: the environment strings, or %NULL if they were not sent
16254  * Since: 2.28
16255  */
16256
16257
16258 /**
16259  * g_srv_target_free:
16260  * @target: a #GSrvTarget
16261  *
16262  * Frees @target
16263  *
16264  * Since: 2.22
16265  */
16266
16267
16268 /**
16269  * g_content_type_guess_for_tree:
16270  * @root: the root of the tree to guess a type for
16271  *
16272  * Tries to guess the type of the tree with root @root, by
16273  * looking at the files it contains. The result is an array
16274  * of content types, with the best guess coming first.
16275  * The types returned all have the form x-content/foo, e.g.
16276  * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
16277  * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
16278  * specification for more on x-content types.
16279  * This function is useful in the implementation of
16280  * g_mount_guess_content_type().
16281  * or %NULL. Free with g_strfreev()
16282  *
16283  * Returns: (transfer full): an %NULL-terminated array of zero or more content types,
16284  * Since: 2.18
16285  */
16286
16287
16288 /**
16289  * g_drive_eject_with_operation_finish:
16290  * @drive: a #GDrive.
16291  * @result: a #GAsyncResult.
16292  * @error: a #GError location to store the error occuring, or %NULL to ignore.
16293  *
16294  * Finishes ejecting a drive. If any errors occurred during the operation,
16295  *
16296  * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
16297  * Since: 2.22
16298  */
16299
16300
16301 /**
16302  * g_file_load_contents_finish:
16303  * @file: input #GFile.
16304  * @res: a #GAsyncResult.
16305  * @contents: (out) (transfer full): a location to place the contents of the file.
16306  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
16307  * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
16308  * @error: a #GError, or %NULL
16309  *
16310  * Finishes an asynchronous load of the @file's contents.
16311  * The contents are placed in @contents, and @length is set to the
16312  * size of the @contents string. The @content should be freed with
16313  * g_free() when no longer needed. If @etag_out is present, it will be
16314  * set to the new entity tag for the @file.
16315  * present, it will be set appropriately.
16316  *
16317  * Returns: %TRUE if the load was successful. If %FALSE and @error is
16318  */
16319
16320
16321 /**
16322  * g_dbus_address_get_stream_sync:
16323  * @address: A valid D-Bus address.
16324  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
16325  * @cancellable: A #GCancellable or %NULL.
16326  * @error: Return location for error or %NULL.
16327  *
16328  * Synchronously connects to an endpoint specified by @address and
16329  * sets up the connection so it is in a state to run the client-side
16330  * of the D-Bus authentication conversation.
16331  * This is a synchronous failable function. See
16332  * g_dbus_address_get_stream() for the asynchronous version.
16333  *
16334  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
16335  * Since: 2.26
16336  */
16337
16338
16339 /**
16340  * g_application_command_line_set_exit_status:
16341  * @cmdline: a #GApplicationCommandLine
16342  * @exit_status: the exit status
16343  *
16344  * Sets the exit status that will be used when the invoking process
16345  * exits.
16346  * The return value of the #GApplication::command-line signal is
16347  * passed to this function when the handler returns.  This is the usual
16348  * way of setting the exit status.
16349  * In the event that you want the remote invocation to continue running
16350  * and want to decide on the exit status in the future, you can use this
16351  * call.  For the case of a remote invocation, the remote process will
16352  * typically exit when the last reference is dropped on @cmdline.  The
16353  * exit status of the remote process will be equal to the last value
16354  * that was set with this function.
16355  * In the case that the commandline invocation is local, the situation
16356  * is slightly more complicated.  If the commandline invocation results
16357  * increased to a non-zero value) then the application is considered to
16358  * have been 'successful' in a certain sense, and the exit status is
16359  * always zero.  If the application use count is zero, though, the exit
16360  * status of the local #GApplicationCommandLine is used.
16361  *
16362  * In the mainloop running (ie: because the use-count of the application
16363  * Since: 2.28
16364  */
16365
16366
16367 /**
16368  * GDBusConnection:authentication-observer:
16369  *
16370  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
16371  *
16372  * Since: 2.26
16373  */
16374
16375
16376 /**
16377  * g_zlib_compressor_get_file_info:
16378  * @compressor: a #GZlibCompressor
16379  *
16380  * Returns the #GZlibCompressor:file-info property.
16381  *
16382  * Returns: (transfer none): a #GFileInfo, or %NULL
16383  * Since: 2.26
16384  */
16385
16386
16387 /**
16388  * GMemoryOutputStream:size:
16389  *
16390  * Current size of the data buffer.
16391  *
16392  * Since: 2.24
16393  */
16394
16395
16396 /**
16397  * GApplication::command-line:
16398  * @application: the application
16399  * @command_line: a #GApplicationCommandLine representing the passed commandline
16400  *
16401  * The ::command-line signal is emitted on the primary instance when
16402  * a commandline is not handled locally. See g_application_run() for
16403  * more information.
16404  */
16405
16406
16407 /**
16408  * g_socket_client_connect_finish:
16409  * @client: a #GSocketClient.
16410  * @result: a #GAsyncResult.
16411  * @error: a #GError location to store the error occuring, or %NULL to ignore.
16412  *
16413  * Finishes an async connect operation. See g_socket_client_connect_async()
16414  *
16415  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
16416  * Since: 2.22
16417  */
16418
16419
16420 /**
16421  * g_socket_address_enumerator_next:
16422  * @enumerator: a #GSocketAddressEnumerator
16423  * @cancellable: optional #GCancellable object, %NULL to ignore.
16424  * @error: a #GError.
16425  *
16426  * Retrieves the next #GSocketAddress from @enumerator. Note that this
16427  * may block for some amount of time. (Eg, a #GNetworkAddress may need
16428  * to do a DNS lookup before it can return an address.) Use
16429  * g_socket_address_enumerator_next_async() if you need to avoid
16430  * blocking.
16431  * If @enumerator is expected to yield addresses, but for some reason
16432  * is unable to (eg, because of a DNS error), then the first call to
16433  * g_socket_address_enumerator_next() will return an appropriate error
16434  * in *@error. However, if the first call to
16435  * g_socket_address_enumerator_next() succeeds, then any further
16436  * internal errors (other than @cancellable being triggered) will be
16437  * ignored.
16438  * error (in which case *@error will be set) or if there are no
16439  * more addresses.
16440  *
16441  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
16442  */
16443
16444
16445 /**
16446  * g_app_info_launch_uris:
16447  * @appinfo: a #GAppInfo
16448  * @uris: (element-type char*): a #GList containing URIs to launch.
16449  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
16450  * @error: a #GError
16451  *
16452  * Launches the application. Passes @uris to the launched application
16453  * as arguments, using the optional @launch_context to get information
16454  * about the details of the launcher (like what screen it is on).
16455  * On error, @error will be set accordingly.
16456  * To lauch the application without arguments pass a %NULL @uris list.
16457  * Note that even if the launch is successful the application launched
16458  * can fail to start if it runs into problems during startup. There is
16459  * no way to detect this.
16460  *
16461  * Returns: %TRUE on successful launch, %FALSE otherwise.
16462  */
16463
16464
16465 /**
16466  * GDBusProxy:g-interface-info:
16467  *
16468  * Ensure that interactions with this proxy conform to the given
16469  * interface.  For example, when completing a method call, if the
16470  * type signature of the message isn't what's expected, the given
16471  * #GError is set.  Signals that have a type signature mismatch are
16472  * simply dropped.
16473  *
16474  * Since: 2.26
16475  */
16476
16477
16478 /**
16479  * g_win32_input_stream_new:
16480  * @handle: a Win32 file handle
16481  * @close_fd: %TRUE to close the handle when done
16482  *
16483  * Creates a new #GWin32InputStream for the given @fd.
16484  * If @close_handle is %TRUE, the handle will be closed
16485  * when the stream is closed.
16486  * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
16487  * as used in the Windows C libraries.
16488  *
16489  * Returns: a new #GWin32InputStream
16490  */
16491
16492
16493 /**
16494  * g_themed_icon_new_from_names:
16495  * @iconnames: an array of strings containing icon names.
16496  * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
16497  *
16498  * Creates a new themed icon for @iconnames.
16499  *
16500  * Returns: (transfer full): a new #GThemedIcon
16501  */
16502
16503
16504 /**
16505  * GMountOperation::reply:
16506  * @op: a #GMountOperation.
16507  * @result: a #GMountOperationResult indicating how the request was handled
16508  *
16509  * Emitted when the user has replied to the mount operation.
16510  */
16511
16512
16513 /**
16514  * g_dbus_method_info_unref:
16515  * @info: A #GDBusMethodInfo.
16516  *
16517  * If @info is statically allocated, does nothing. Otherwise decreases
16518  * the reference count of @info. When its reference count drops to 0,
16519  * the memory used is freed.
16520  *
16521  * Since: 2.26
16522  */
16523
16524
16525 /**
16526  * g_initable_new_valist:
16527  * @object_type: a #GType supporting #GInitable.
16528  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
16529  * @var_args: The var args list generated from @first_property_name.
16530  * @cancellable: optional #GCancellable object, %NULL to ignore.
16531  * @error: a #GError location to store the error occuring, or %NULL to ignore.
16532  *
16533  * Helper function for constructing #GInitiable object. This is
16534  * similar to g_object_new_valist() but also initializes the object
16535  * and returns %NULL, setting an error on failure.
16536  *
16537  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
16538  * Since: 2.22
16539  */
16540
16541
16542 /**
16543  * g_socket_accept:
16544  * @socket: a #GSocket.
16545  * @cancellable: a %GCancellable or %NULL
16546  * @error: #GError for error reporting, or %NULL to ignore.
16547  *
16548  * Accept incoming connections on a connection-based socket. This removes
16549  * the first outstanding connection request from the listening socket and
16550  * creates a #GSocket object for it.
16551  * The @socket must be bound to a local address with g_socket_bind() and
16552  * must be listening for incoming connections (g_socket_listen()).
16553  * If there are no outstanding connections then the operation will block
16554  * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
16555  * To be notified of an incoming connection, wait for the %G_IO_IN condition.
16556  * Free the returned object with g_object_unref().
16557  *
16558  * Returns: (transfer full): a new #GSocket, or %NULL on error.
16559  * Since: 2.22
16560  */
16561
16562
16563 /**
16564  * g_socket_address_get_native_size:
16565  * @address: a #GSocketAddress
16566  *
16567  * Gets the size of @address's native <type>struct sockaddr</type>.
16568  * You can use this to allocate memory to pass to
16569  * g_socket_address_to_native().
16570  *
16571  * Returns: the size of the native <type>struct sockaddr</type> that
16572  * Since: 2.22
16573  */
16574
16575
16576 /**
16577  * g_file_stop_mountable:
16578  * @file: input #GFile.
16579  * @flags: flags affecting the operation
16580  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
16581  * @cancellable: optional #GCancellable object, %NULL to ignore.
16582  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
16583  * @user_data: the data to pass to callback function
16584  *
16585  * Stops a file of type G_FILE_TYPE_MOUNTABLE.
16586  * If @cancellable is not %NULL, then the operation can be cancelled by
16587  * triggering the cancellable object from another thread. If the operation
16588  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16589  * When the operation is finished, @callback will be called. You can then call
16590  * g_file_stop_mountable_finish() to get the result of the operation.
16591  *
16592  * Since: 2.22
16593  */
16594
16595
16596 /**
16597  * g_dbus_signal_info_unref:
16598  * @info: A #GDBusSignalInfo.
16599  *
16600  * If @info is statically allocated, does nothing. Otherwise decreases
16601  * the reference count of @info. When its reference count drops to 0,
16602  * the memory used is freed.
16603  *
16604  * Since: 2.26
16605  */
16606
16607
16608 /**
16609  * g_file_info_get_modification_time:
16610  * @info: a #GFileInfo.
16611  * @result: a #GTimeVal.
16612  *
16613  * Gets the modification time of the current @info and sets it
16614  * in @result.
16615  */
16616
16617
16618 /**
16619  * g_dbus_proxy_get_name_owner:
16620  * @proxy: A #GDBusProxy.
16621  *
16622  * The unique name that owns the name that @proxy is for or %NULL if
16623  * no-one currently owns that name. You may connect to the
16624  * #GObject::notify signal to track changes to the
16625  * #GDBusProxy:g-name-owner property.
16626  *
16627  * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
16628  * Since: 2.26
16629  */
16630
16631
16632 /**
16633  * GInetAddress:is-link-local:
16634  *
16635  * Whether this is a link-local address.
16636  * See g_inet_address_get_is_link_local().
16637  *
16638  * Since: 2.22
16639  */
16640
16641
16642 /**
16643  * g_io_stream_close_async:
16644  * @stream: a #GIOStream
16645  * @io_priority: the io priority of the request
16646  * @callback: callback to call when the request is satisfied
16647  * @user_data: the data to pass to callback function
16648  * @cancellable: optional cancellable object
16649  *
16650  * Requests an asynchronous close of the stream, releasing resources
16651  * related to it. When the operation is finished @callback will be
16652  * called. You can then call g_io_stream_close_finish() to get
16653  * the result of the operation.
16654  * For behaviour details see g_io_stream_close().
16655  * The asynchronous methods have a default fallback that uses threads
16656  * to implement asynchronicity, so they are optional for inheriting
16657  * classes. However, if you override one you must override all.
16658  *
16659  * Since: 2.22
16660  */
16661
16662
16663 /**
16664  * GVolumeMonitor::drive-eject-button:
16665  * @volume_monitor: The volume monitor emitting the signal.
16666  * @drive: the drive where the eject button was pressed
16667  *
16668  * Emitted when the eject button is pressed on @drive.
16669  *
16670  * Since: 2.18
16671  */
16672
16673
16674 /**
16675  * SECTION:gresolve:
16676  * @short_description: Asynchronous and cancellable DNS resolver
16677  * @include: gio/gio.h
16678  *
16679  * #GResolver provides cancellable synchronous and asynchronous DNS
16680  * resolution, for hostnames (g_resolver_lookup_by_address(),
16681  * g_resolver_lookup_by_name() and their async variants) and SRV
16682  * (service) records (g_resolver_lookup_service()).
16683  * #GNetworkAddress and #GNetworkService provide wrappers around
16684  * #GResolver functionality that also implement #GSocketConnectable,
16685  * making it easy to connect to a remote host/service.
16686  */
16687
16688
16689 /**
16690  * g_action_activate:
16691  * @action: a #GAction
16692  * @parameter: (allow-none): the parameter to the activation
16693  *
16694  * Activates the action.
16695  * the parameter type given at construction time).  If the parameter
16696  * type was %NULL then @parameter must also be %NULL.
16697  *
16698  * Since: 2.28
16699  */
16700
16701
16702 /**
16703  * g_dbus_proxy_get_interface_name:
16704  * @proxy: A #GDBusProxy.
16705  *
16706  * Gets the D-Bus interface name @proxy is for.
16707  *
16708  * Returns: A string owned by @proxy. Do not free.
16709  * Since: 2.26
16710  */
16711
16712
16713 /**
16714  * g_file_info_set_attribute_string:
16715  * @info: a #GFileInfo.
16716  * @attribute: a file attribute key.
16717  * @attr_value: a string.
16718  *
16719  * Sets the @attribute to contain the given @attr_value,
16720  * if possible.
16721  */
16722
16723
16724 /**
16725  * g_dbus_proxy_set_default_timeout:
16726  * @proxy: A #GDBusProxy.
16727  * @timeout_msec: Timeout in milliseconds.
16728  *
16729  * Sets the timeout to use if -1 (specifying default timeout) is
16730  * passed as @timeout_msec in the g_dbus_proxy_call() and
16731  * g_dbus_proxy_call_sync() functions.
16732  * See the #GDBusProxy:g-default-timeout property for more details.
16733  *
16734  * Since: 2.26
16735  */
16736
16737
16738 /**
16739  * GSettings::writable-changed:
16740  * @settings: the object on which the signal was emitted
16741  * @key: the key
16742  *
16743  * The "writable-changed" signal is emitted when the writability of a
16744  * key has potentially changed.  You should call
16745  * g_settings_is_writable() in order to determine the new status.
16746  * This signal supports detailed connections.  You can connect to the
16747  * detailed signal "writable-changed::x" in order to only receive
16748  * callbacks when the writability of "x" changes.
16749  */
16750
16751
16752 /**
16753  * g_cancellable_reset:
16754  * @cancellable: a #GCancellable object.
16755  *
16756  * Resets @cancellable to its uncancelled state.
16757  */
16758
16759
16760 /**
16761  * g_unix_mount_monitor_new:
16762  *
16763  * Gets a new #GUnixMountMonitor. The default rate limit for which the
16764  * monitor will report consecutive changes for the mount and mount
16765  * point entry files is the default for a #GFileMonitor. Use
16766  * g_unix_mount_monitor_set_rate_limit() to change this.
16767  *
16768  * Returns: a #GUnixMountMonitor.
16769  */
16770
16771
16772 /**
16773  * g_unix_fd_list_new_from_array:
16774  * @fds: the initial list of file descriptors
16775  * @n_fds: the length of #fds, or -1
16776  *
16777  * Creates a new #GUnixFDList containing the file descriptors given in
16778  * may no longer be used by the caller.  The array itself is owned by
16779  * the caller.
16780  * Each file descriptor in the array should be set to close-on-exec.
16781  * If @n_fds is -1 then @fds must be terminated with -1.
16782  *
16783  * Returns: a new #GUnixFDList
16784  * Since: 2.24
16785  */
16786
16787
16788 /**
16789  * GMountOperation:username:
16790  *
16791  * The user name that is used for authentication when carrying out
16792  * the mount operation.
16793  */
16794
16795
16796 /**
16797  * g_dbus_annotation_info_ref:
16798  * @info: A #GDBusNodeInfo
16799  *
16800  * If @info is statically allocated does nothing. Otherwise increases
16801  * the reference count.
16802  *
16803  * Returns: The same @info.
16804  * Since: 2.26
16805  */
16806
16807
16808 /**
16809  * g_file_info_set_attribute:
16810  * @info: a #GFileInfo.
16811  * @attribute: a file attribute key.
16812  * @type: a #GFileAttributeType
16813  * @value_p: pointer to the value
16814  *
16815  * Sets the @attribute to contain the given value, if possible.
16816  */
16817
16818
16819 /**
16820  * SECTION:gpermissio:
16821  * @title: GPermission
16822  * @short_description: an object representing the permission to perform a certain action
16823  *
16824  * A #GPermission represents the status of the caller's permission to
16825  * perform a certain action.
16826  * You can query if the action is currently allowed and if it is
16827  * possible to acquire the permission so that the action will be allowed
16828  * in the future.
16829  * There is also an API to actually acquire the permission and one to
16830  * release it.
16831  * As an example, a #GPermission might represent the ability for the
16832  * user to write to a #GSettings object.  This #GPermission object could
16833  * then be used to decide if it is appropriate to show a "Click here to
16834  * unlock" button in a dialog and to provide the mechanism to invoke
16835  * when that button is clicked.
16836  */
16837
16838
16839 /**
16840  * g_permission_acquire:
16841  * @permission: a #GPermission instance
16842  * @cancellable: a #GCancellable, or %NULL
16843  * @error: a pointer to a %NULL #GError, or %NULL
16844  * @returns: %TRUE if the permission was successfully acquired
16845  *
16846  * Attempts to acquire the permission represented by @permission.
16847  * The precise method by which this happens depends on the permission
16848  * and the underlying authentication mechanism.  A simple example is
16849  * that a dialog may appear asking the user to enter their password.
16850  * You should check with g_permission_get_can_acquire() before calling
16851  * this function.
16852  * If the permission is acquired then %TRUE is returned.  Otherwise,
16853  * %FALSE is returned and @error is set appropriately.
16854  * This call is blocking, likely for a very long time (in the case that
16855  * user interaction is required).  See g_permission_acquire_async() for
16856  * the non-blocking version.
16857  *
16858  * Since: 2.26
16859  */
16860
16861
16862 /**
16863  * g_file_enumerator_next_files_async:
16864  * @enumerator: a #GFileEnumerator.
16865  * @num_files: the number of file info objects to request
16866  * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
16867  * @cancellable: optional #GCancellable object, %NULL to ignore.
16868  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
16869  * @user_data: the data to pass to callback function
16870  *
16871  * Request information for a number of files from the enumerator asynchronously.
16872  * When all i/o for the operation is finished the @callback will be called with
16873  * the requested information.
16874  * The callback can be called with less than @num_files files in case of error
16875  * or at the end of the enumerator. In case of a partial error the callback will
16876  * be called with any succeeding items and no error, and on the next request the
16877  * error will be reported. If a request is cancelled the callback will be called
16878  * with %G_IO_ERROR_CANCELLED.
16879  * During an async request no other sync and async calls are allowed, and will
16880  * result in %G_IO_ERROR_PENDING errors.
16881  * Any outstanding i/o request with higher priority (lower numerical value) will
16882  * be executed before an outstanding request with lower priority. Default
16883  * priority is %G_PRIORITY_DEFAULT.
16884  */
16885
16886
16887 /**
16888  * g_file_enumerate_children_async:
16889  * @file: input #GFile.
16890  * @attributes: an attribute query string.
16891  * @flags: a set of #GFileQueryInfoFlags.
16892  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
16893  * @cancellable: optional #GCancellable object, %NULL to ignore.
16894  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
16895  * @user_data: the data to pass to callback function
16896  *
16897  * Asynchronously gets the requested information about the files in a directory. The result
16898  * is a #GFileEnumerator object that will give out #GFileInfo objects for
16899  * all the files in the directory.
16900  * For more details, see g_file_enumerate_children() which is
16901  * the synchronous version of this call.
16902  * When the operation is finished, @callback will be called. You can then call
16903  * g_file_enumerate_children_finish() to get the result of the operation.
16904  */
16905
16906
16907 /**
16908  * g_action_group_action_removed:
16909  * @action_group: a #GActionGroup
16910  * @action_name: the name of an action in the group
16911  *
16912  * Emits the #GActionGroup::action-removed signal on @action_group.
16913  * This function should only be called by #GActionGroup implementations.
16914  *
16915  * Since: 2.28
16916  */
16917
16918
16919 /**
16920  * g_file_info_set_file_type:
16921  * @info: a #GFileInfo.
16922  * @type: a #GFileType.
16923  *
16924  * Sets the file type in a #GFileInfo to @type.
16925  * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
16926  */
16927
16928
16929 /**
16930  * g_data_input_stream_read_int16:
16931  * @stream: a given #GDataInputStream.
16932  * @cancellable: optional #GCancellable object, %NULL to ignore.
16933  * @error: #GError for error reporting.
16934  *
16935  * Reads a 16-bit/2-byte value from @stream.
16936  * In order to get the correct byte order for this read operation,
16937  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
16938  * an error occurred.
16939  *
16940  * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
16941  */
16942
16943
16944 /**
16945  * SECTION:gdbusintrospectio:
16946  * @title: D-Bus Introspection Data
16947  * @short_description: Node and interface description data structures
16948  * @include: gio/gio.h
16949  *
16950  * Various data structures and convenience routines to parse and
16951  * generate D-Bus introspection XML. Introspection information is
16952  * used when registering objects with g_dbus_connection_register_object().
16953  * The format of D-Bus introspection XML is specified in the
16954  * <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;introspection-format">D-Bus specification</link>.
16955  */
16956
16957
16958 /**
16959  * g_srv_target_list_sort: (skip)
16960  * @targets: a #GList of #GSrvTarget
16961  *
16962  * Sorts @targets in place according to the algorithm in RFC 2782.
16963  *
16964  * Returns: (transfer full): the head of the sorted list.
16965  * Since: 2.22
16966  */
16967
16968
16969 /**
16970  * g_credentials_set_native:
16971  * @credentials: A #GCredentials.
16972  * @native_type: The type of native credentials to set.
16973  * @native: A pointer to native credentials.
16974  *
16975  * Copies the native credentials of type @native_type from @native
16976  * into @credentials.
16977  * It is a programming error (which will cause an warning to be
16978  * logged) to use this method if there is no #GCredentials support for
16979  * the OS or if @native_type isn't supported by the OS.
16980  *
16981  * Since: 2.26
16982  */
16983
16984
16985 /**
16986  * g_dbus_connection_get_stream:
16987  * @connection: a #GDBusConnection
16988  *
16989  * Gets the underlying stream used for IO.
16990  *
16991  * Returns: (transfer none): the stream used for IO
16992  * Since: 2.26
16993  */
16994
16995
16996 /**
16997  * g_network_service_new:
16998  * @service: the service type to look up (eg, "ldap")
16999  * @protocol: the networking protocol to use for @service (eg, "tcp")
17000  * @domain: the DNS domain to look up the service in
17001  *
17002  * Creates a new #GNetworkService representing the given @service,
17003  * #GSocketConnectable interface to resolve it.
17004  *
17005  * Returns: (transfer full): a new #GNetworkService
17006  * Since: 2.22
17007  */
17008
17009
17010 /**
17011  * g_credentials_new:
17012  *
17013  * Creates a new #GCredentials object with credentials matching the
17014  * the current process.
17015  *
17016  * Returns: A #GCredentials. Free with g_object_unref().
17017  * Since: 2.26
17018  */
17019
17020
17021 /**
17022  * SECTION:ginitabl:
17023  * @short_description: Failable object initialization interface
17024  * @include: gio/gio.h
17025  * @see_also: #GAsyncInitable
17026  *
17027  * #GInitable is implemented by objects that can fail during
17028  * initialization. If an object implements this interface the
17029  * g_initable_init() function must be called as the first thing
17030  * after construction. If g_initable_init() is not called, or if
17031  * it returns an error, all further operations on the object
17032  * should fail, generally with a %G_IO_ERROR_NOT_INITIALIZED error.
17033  * Users of objects implementing this are not intended to use
17034  * the interface method directly, instead it will be used automatically
17035  * in various ways. For C applications you generally just call
17036  * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
17037  * This will call g_initable_init() under the cover, returning %NULL and
17038  * setting a %GError on failure.
17039  * For bindings in languages where the native constructor supports
17040  * exceptions the binding could check for objects implemention %GInitable
17041  * during normal construction and automatically initialize them, throwing
17042  * an exception on failure.
17043  */
17044
17045
17046 /**
17047  * g_file_info_get_file_type:
17048  * @info: a #GFileInfo.
17049  *
17050  * Gets a file's type (whether it is a regular file, symlink, etc).
17051  * This is different from the file's content type, see g_file_info_get_content_type().
17052  *
17053  * Returns: a #GFileType for the given file.
17054  */
17055
17056
17057 /**
17058  * g_dbus_node_info_generate_xml:
17059  * @info: A #GDBusNodeInfo.
17060  * @indent: Indentation level.
17061  * @string_builder: A #GString to to append XML data to.
17062  *
17063  * Appends an XML representation of @info (and its children) to @string_builder.
17064  * This function is typically used for generating introspection XML documents at run-time for
17065  * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
17066  *
17067  * Since: 2.26
17068  */
17069
17070
17071 /**
17072  * g_dbus_is_interface_name:
17073  * @string: The string to check.
17074  *
17075  * Checks if @string is a valid D-Bus interface name.
17076  *
17077  * Returns: %TRUE if valid, %FALSE otherwise.
17078  * Since: 2.26
17079  */
17080
17081
17082 /**
17083  * GUnixMountMonitor::mounts-changed:
17084  * @monitor: the object on which the signal is emitted
17085  *
17086  * Emitted when the unix mounts have changed.
17087  */
17088
17089
17090 /**
17091  * g_dbus_address_get_for_bus_sync:
17092  * @bus_type: A #GBusType.
17093  * @cancellable: A #GCancellable or %NULL.
17094  * @error: Return location for error or %NULL.
17095  *
17096  * Synchronously looks up the D-Bus address for the well-known message
17097  * bus instance specified by @bus_type. This may involve using various
17098  * platform specific mechanisms.
17099  *
17100  * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
17101  * Since: 2.26
17102  */
17103
17104
17105 /**
17106  * GInetAddress:is-multicast:
17107  *
17108  * Whether this is a multicast address.
17109  * See g_inet_address_get_is_multicast().
17110  *
17111  * Since: 2.22
17112  */
17113
17114
17115 /**
17116  * GPermission:
17117  *
17118  * #GPermission is an opaque data structure and can only be accessed
17119  * using the following functions.
17120  */
17121
17122
17123 /**
17124  * g_filename_completer_new:
17125  *
17126  * Creates a new filename completer.
17127  *
17128  * Returns: a #GFilenameCompleter.
17129  */
17130
17131
17132 /**
17133  * g_data_output_stream_put_int16:
17134  * @stream: a #GDataOutputStream.
17135  * @data: a #gint16.
17136  * @cancellable: optional #GCancellable object, %NULL to ignore.
17137  * @error: a #GError, %NULL to ignore.
17138  *
17139  * Puts a signed 16-bit integer into the output stream.
17140  *
17141  * Returns: %TRUE if @data was successfully added to the @stream.
17142  */
17143
17144
17145 /**
17146  * g_io_extension_point_lookup:
17147  * @name: the name of the extension point
17148  *
17149  * Looks up an existing extension point.
17150  * registered extension point with the given name
17151  *
17152  * Returns: the #GIOExtensionPoint, or %NULL if there is no
17153  */
17154
17155
17156 /**
17157  * g_dbus_connection_send_message_with_reply_sync:
17158  * @connection: A #GDBusConnection.
17159  * @message: A #GDBusMessage.
17160  * @flags: Flags affecting how the message is sent.
17161  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17162  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
17163  * @cancellable: A #GCancellable or %NULL.
17164  * @error: Return location for error or %NULL.
17165  *
17166  * Synchronously sends @message to the peer represented by @connection
17167  * and blocks the calling thread until a reply is received or the
17168  * timeout is reached. See g_dbus_connection_send_message_with_reply()
17169  * for the asynchronous version of this method.
17170  * Unless @flags contain the
17171  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17172  * will be assigned by @connection and set on @message via
17173  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17174  * serial number used will be written to this location prior to
17175  * submitting the message to the underlying transport.
17176  * If @connection is closed then the operation will fail with
17177  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17178  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
17179  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17180  * Note that @error is only set if a local in-process error
17181  * occured. That is to say that the returned #GDBusMessage object may
17182  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
17183  * g_dbus_message_to_gerror() to transcode this to a #GError.
17184  * See <xref linkend="gdbus-server"/> and <xref
17185  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17186  * low-level API to send and receive UNIX file descriptors.
17187  * Note that @message must be unlocked, unless @flags contain the
17188  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17189  *
17190  * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
17191  * Since: 2.26
17192  */
17193
17194
17195 /**
17196  * GDesktopAppInfo:
17197  *
17198  * Information about an installed application from a desktop file.
17199  */
17200
17201
17202 /**
17203  * g_credentials_to_string:
17204  * @credentials: A #GCredentials object.
17205  *
17206  * Creates a human-readable textual representation of @credentials
17207  * that can be used in logging and debug messages. The format of the
17208  * returned string may change in future GLib release.
17209  *
17210  * Returns: A string that should be freed with g_free().
17211  * Since: 2.26
17212  */
17213
17214
17215 /**
17216  * g_data_input_stream_set_byte_order:
17217  * @stream: a given #GDataInputStream.
17218  * @order: a #GDataStreamByteOrder to set.
17219  *
17220  * This function sets the byte order for the given @stream. All subsequent
17221  * reads from the @stream will be read in the given @order.
17222  */
17223
17224
17225 /**
17226  * g_dbus_message_get_locked:
17227  * @message: A #GDBusMessage.
17228  *
17229  * Checks whether @message is locked. To monitor changes to this
17230  * value, conncet to the #GObject::notify signal to listen for changes
17231  * on the #GDBusMessage:locked property.
17232  *
17233  * Returns: %TRUE if @message is locked, %FALSE otherwise.
17234  * Since: 2.26
17235  */
17236
17237
17238 /**
17239  * GAction:state-type:
17240  *
17241  * The #GVariantType of the state that the action has, or %NULL if the
17242  * action is stateless.
17243  *
17244  * Since: 2.28
17245  */
17246
17247
17248 /**
17249  * g_socket_send_with_blocking:
17250  * @socket: a #GSocket
17251  * @buffer: the buffer containing the data to send.
17252  * @size: the number of bytes to send
17253  * @blocking: whether to do blocking or non-blocking I/O
17254  * @cancellable: a %GCancellable or %NULL
17255  * @error: #GError for error reporting, or %NULL to ignore.
17256  *
17257  * This behaves exactly the same as g_socket_send(), except that
17258  * the choice of blocking or non-blocking behavior is determined by
17259  * the @blocking argument rather than by @socket's properties.
17260  * on error
17261  *
17262  * Returns: Number of bytes written (which may be less than @size), or -1
17263  * Since: 2.26
17264  */
17265
17266
17267 /**
17268  * g_unix_socket_address_abstract_names_supported:
17269  *
17270  * Checks if abstract unix domain socket names are supported.
17271  *
17272  * Returns: %TRUE if supported, %FALSE otherwise
17273  * Since: 2.22
17274  */
17275
17276
17277 /**
17278  * g_bus_unwatch_name:
17279  * @watcher_id: An identifier obtained from g_bus_watch_name()
17280  *
17281  * Stops watching a name.
17282  *
17283  * Since: 2.26
17284  */
17285
17286
17287 /**
17288  * g_socket_connectable_proxy_enumerate:
17289  * @connectable: a #GSocketConnectable
17290  *
17291  * Creates a #GSocketAddressEnumerator for @connectable that will
17292  * return #GProxyAddress<!-- -->es for addresses that you must connect
17293  * to via a proxy.
17294  * If @connectable does not implement
17295  * g_socket_connectable_proxy_enumerate(), this will fall back to
17296  * calling g_socket_connectable_enumerate().
17297  *
17298  * Returns: (transfer full): a new #GSocketAddressEnumerator.
17299  * Since: 2.26
17300  */
17301
17302
17303 /**
17304  * g_dbus_method_invocation_get_interface_name:
17305  * @invocation: A #GDBusMethodInvocation.
17306  *
17307  * Gets the name of the D-Bus interface the method was invoked on.
17308  *
17309  * Returns: A string. Do not free, it is owned by @invocation.
17310  * Since: 2.26
17311  */
17312
17313
17314 /**
17315  * g_memory_input_stream_new:
17316  *
17317  * Creates a new empty #GMemoryInputStream.
17318  *
17319  * Returns: a new #GInputStream
17320  */
17321
17322
17323 /**
17324  * g_resolver_free_targets: (skip)
17325  * @targets: a #GList of #GSrvTarget
17326  *
17327  * Frees @targets (which should be the return value from
17328  * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
17329  * (This is a convenience method; you can also simply free the
17330  * results by hand.)
17331  *
17332  * Since: 2.22
17333  */
17334
17335
17336 /**
17337  * g_cancellable_is_cancelled:
17338  * @cancellable: a #GCancellable or NULL.
17339  *
17340  * Checks if a cancellable job has been cancelled.
17341  * FALSE if called with %NULL or if item is not cancelled.
17342  *
17343  * Returns: %TRUE if @cancellable is cancelled,
17344  */
17345
17346
17347 /**
17348  * g_file_info_get_is_hidden:
17349  * @info: a #GFileInfo.
17350  *
17351  * Checks if a file is hidden.
17352  *
17353  * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
17354  */
17355
17356
17357 /**
17358  * g_dbus_server_start:
17359  * @server: A #GDBusServer.
17360  *
17361  * Starts @server.
17362  *
17363  * Since: 2.26
17364  */
17365
17366
17367 /**
17368  * SECTION:gsocketconnectabl:
17369  * @short_description: Interface for potential socket endpoints
17370  *
17371  * Objects that describe one or more potential socket endpoints
17372  * implement #GSocketConnectable. Callers can then use
17373  * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
17374  * to try out each socket address in turn until one succeeds, as shown
17375  * in the sample code below.
17376  * |[
17377  * MyConnectionType *
17378  * connect_to_host (const char    *hostname,
17379  * guint16        port,
17380  * GCancellable  *cancellable,
17381  * GError       **error)
17382  * {
17383  * MyConnection *conn = NULL;
17384  * GSocketConnectable *addr;
17385  * GSocketAddressEnumerator *enumerator;
17386  * GSocketAddress *sockaddr;
17387  * GError *conn_error = NULL;
17388  * addr = g_network_address_new ("www.gnome.org", 80);
17389  * enumerator = g_socket_connectable_enumerate (addr);
17390  * g_object_unref (addr);
17391  * /<!-- -->* Try each sockaddr until we succeed. Record the first
17392  * * connection error, but not any further ones (since they'll probably
17393  * * be basically the same as the first).
17394  * *<!-- -->/
17395  * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
17396  * {
17397  * g_object_unref (sockaddr);
17398  * }
17399  * g_object_unref (enumerator);
17400  * if (conn)
17401  * {
17402  * if (conn_error)
17403  * {
17404  * /<!-- -->* We couldn't connect to the first address, but we succeeded
17405  * * in connecting to a later address.
17406  * *<!-- -->/
17407  * g_error_free (conn_error);
17408  * }
17409  * return conn;
17410  * }
17411  * else if (error)
17412  * {
17413  * /<!-- -->* Either the initial lookup failed, or else the caller
17414  * * cancelled us.
17415  * *<!-- -->/
17416  * if (conn_error)
17417  * g_error_free (conn_error);
17418  * return NULL;
17419  * }
17420  * else
17421  * {
17422  * g_error_propagate (error, conn_error);
17423  * return NULL;
17424  * }
17425  * }
17426  * ]|
17427  *
17428  * Conn = connect_to_sockaddr (sockaddr, conn_error ? null : &conn_error);
17429  */
17430
17431
17432 /**
17433  * g_dbus_connection_close_sync:
17434  * @connection: A #GDBusConnection.
17435  * @cancellable: A #GCancellable or %NULL.
17436  * @error: Return location for error or %NULL.
17437  *
17438  * Synchronously closees @connection. The calling thread is blocked
17439  * until this is done. See g_dbus_connection_close() for the
17440  * asynchronous version of this method and more details about what it
17441  * does.
17442  *
17443  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
17444  * Since: 2.26
17445  */
17446
17447
17448 /**
17449  * g_settings_get_double:
17450  * @settings: a #GSettings object
17451  * @key: the key to get the value for
17452  * @returns: a double
17453  *
17454  * Gets the value that is stored at @key in @settings.
17455  * A convenience variant of g_settings_get() for doubles.
17456  * It is a programmer error to give a @key that isn't specified as
17457  * having a 'double' type in the schema for @settings.
17458  *
17459  * Since: 2.26
17460  */
17461
17462
17463 /**
17464  * g_app_info_equal:
17465  * @appinfo1: the first #GAppInfo.
17466  * @appinfo2: the second #GAppInfo.
17467  *
17468  * Checks if two #GAppInfo<!-- -->s are equal.
17469  *
17470  * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
17471  */
17472
17473
17474 /**
17475  * g_mount_remount:
17476  * @mount: a #GMount.
17477  * @flags: flags affecting the operation
17478  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
17479  * @cancellable: optional #GCancellable object, %NULL to ignore.
17480  * @callback: a #GAsyncReadyCallback, or %NULL.
17481  * @user_data: user data passed to @callback.
17482  *
17483  * Remounts a mount. This is an asynchronous operation, and is
17484  * finished by calling g_mount_remount_finish() with the @mount
17485  * and #GAsyncResults data returned in the @callback.
17486  * Remounting is useful when some setting affecting the operation
17487  * of the volume has been changed, as these may need a remount to
17488  * take affect. While this is semantically equivalent with unmounting
17489  * and then remounting not all backends might need to actually be
17490  * unmounted.
17491  */
17492
17493
17494 /**
17495  * g_volume_can_mount:
17496  * @volume: a #GVolume.
17497  *
17498  * Checks if a volume can be mounted.
17499  *
17500  * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
17501  */
17502
17503
17504 /**
17505  * g_volume_monitor_get:
17506  *
17507  * Gets the volume monitor used by gio.
17508  * g_object_unref() when done with it.
17509  *
17510  * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
17511  */
17512
17513
17514 /**
17515  * g_file_make_directory_with_parents:
17516  * @file: input #GFile.
17517  * @cancellable: optional #GCancellable object, %NULL to ignore.
17518  * @error: a #GError, or %NULL
17519  *
17520  * Creates a directory and any parent directories that may not exist similar to
17521  * 'mkdir -p'. If the file system does not support creating directories, this
17522  * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
17523  * For a local #GFile the newly created directories will have the default
17524  * (current) ownership and permissions of the current process.
17525  * If @cancellable is not %NULL, then the operation can be cancelled by
17526  * triggering the cancellable object from another thread. If the operation
17527  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
17528  * otherwise.
17529  *
17530  * Returns: %TRUE if all directories have been successfully created, %FALSE
17531  * Since: 2.18
17532  */
17533
17534
17535 /**
17536  * g_buffered_input_stream_peek_buffer:
17537  * @stream: a #GBufferedInputStream
17538  * @count: a #gsize to get the number of bytes available in the buffer
17539  *
17540  * Returns the buffer with the currently available bytes. The returned
17541  * buffer must not be modified and will become invalid when reading from
17542  * the stream or filling the buffer.
17543  *
17544  * Returns: read-only buffer
17545  */
17546
17547
17548 /**
17549  * g_file_query_file_type:
17550  * @file: input #GFile.
17551  * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
17552  * @cancellable: optional #GCancellable object, %NULL to ignore.
17553  *
17554  * Utility function to inspect the #GFileType of a file. This is
17555  * implemented using g_file_query_info() and as such does blocking I/O.
17556  * The primary use case of this method is to check if a file is a regular file,
17557  * directory, or symlink.
17558  * does not exist
17559  *
17560  * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
17561  * Since: 2.18
17562  */
17563
17564
17565 /**
17566  * SECTION:gasyncinitabl:
17567  * @short_description: Asynchronously failable object initialization interface
17568  * @include: gio/gio.h
17569  * @see_also: #GInitable
17570  *
17571  * This is the asynchronous version of #GInitable; it behaves the same
17572  * in all ways except that initialization is asynchronous. For more details
17573  * see the descriptions on #GInitable.
17574  * A class may implement both the #GInitable and #GAsyncInitable interfaces.
17575  * Users of objects implementing this are not intended to use the interface
17576  * method directly; instead it will be used automatically in various ways.
17577  * For C applications you generally just call g_async_initable_new_async()
17578  * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
17579  * g_async_initable_init_async() under the cover, calling back with %NULL and
17580  * a set %GError on failure.
17581  * A typical implementation might look something like this:
17582  * |[
17583  * enum {
17584  * NOT_INITIALIZED,
17585  * INITIALIZING,
17586  * INITIALIZED
17587  * };
17588  * static void
17589  * _foo_ready_cb (Foo *self)
17590  * {
17591  * GList *l;
17592  * self->priv->state = INITIALIZED;
17593  * for (l = self->priv->init_results; l != NULL; l = l->next)
17594  * {
17595  * GSimpleAsyncResult *simple = l->data;
17596  * if (!self->priv->success)
17597  * g_simple_async_result_set_error (simple, ...);
17598  * g_simple_async_result_complete (simple);
17599  * g_object_unref (simple);
17600  * }
17601  * g_list_free (self->priv->init_results);
17602  * self->priv->init_results = NULL;
17603  * }
17604  * static void
17605  * foo_init_async (GAsyncInitable       *initable,
17606  * int                   io_priority,
17607  * GCancellable         *cancellable,
17608  * GAsyncReadyCallback   callback,
17609  * gpointer              user_data)
17610  * {
17611  * Foo *self = FOO (initable);
17612  * GSimpleAsyncResult *simple;
17613  * simple = g_simple_async_result_new (G_OBJECT (initable)
17614  * callback,
17615  * user_data,
17616  * foo_init_async);
17617  * switch (self->priv->state)
17618  * {
17619  * case NOT_INITIALIZED:
17620  * _foo_get_ready (self);
17621  * self->priv->init_results = g_list_append (self->priv->init_results,
17622  * simple);
17623  * self->priv->state = INITIALIZING;
17624  * break;
17625  * case INITIALIZING:
17626  * self->priv->init_results = g_list_append (self->priv->init_results,
17627  * simple);
17628  * break;
17629  * case INITIALIZED:
17630  * if (!self->priv->success)
17631  * g_simple_async_result_set_error (simple, ...);
17632  * g_simple_async_result_complete_in_idle (simple);
17633  * g_object_unref (simple);
17634  * break;
17635  * }
17636  * }
17637  * static gboolean
17638  * foo_init_finish (GAsyncInitable       *initable,
17639  * GAsyncResult         *result,
17640  * GError              **error)
17641  * {
17642  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
17643  * G_OBJECT (initable), foo_init_async), FALSE);
17644  * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
17645  * error))
17646  * return FALSE;
17647  * return TRUE;
17648  * }
17649  * static void
17650  * foo_async_initable_iface_init (gpointer g_iface,
17651  * gpointer data)
17652  * {
17653  * GAsyncInitableIface *iface = g_iface;
17654  * iface->init_async = foo_init_async;
17655  * iface->init_finish = foo_init_finish;
17656  * }
17657  * ]|
17658  */
17659
17660
17661 /**
17662  * g_file_attribute_info_list_new:
17663  *
17664  * Creates a new file attribute info list.
17665  *
17666  * Returns: a #GFileAttributeInfoList.
17667  */
17668
17669
17670 /**
17671  * g_resolver_lookup_by_name_finish:
17672  * @resolver: a #GResolver
17673  * @result: the result passed to your #GAsyncReadyCallback
17674  * @error: return location for a #GError, or %NULL
17675  *
17676  * Retrieves the result of a call to
17677  * g_resolver_lookup_by_name_async().
17678  * If the DNS resolution failed, @error (if non-%NULL) will be set to
17679  * a value from #GResolverError. If the operation was cancelled,
17680  * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
17681  * for more details.
17682  *
17683  * Returns: (element-type GInetAddress) (transfer full): a #GList
17684  * Since: 2.22
17685  */
17686
17687
17688 /**
17689  * g_data_input_stream_get_newline_type:
17690  * @stream: a given #GDataInputStream.
17691  *
17692  * Gets the current newline type for the @stream.
17693  *
17694  * Returns: #GDataStreamNewlineType for the given @stream.
17695  */
17696
17697
17698 /**
17699  * g_volume_eject_with_operation_finish:
17700  * @volume: a #GVolume.
17701  * @result: a #GAsyncResult.
17702  * @error: a #GError location to store the error occuring, or %NULL to ignore.
17703  *
17704  * Finishes ejecting a volume. If any errors occurred during the operation,
17705  *
17706  * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
17707  * Since: 2.22
17708  */
17709
17710
17711 /**
17712  * g_drive_can_poll_for_media:
17713  * @drive: a #GDrive.
17714  *
17715  * Checks if a drive can be polled for media changes.
17716  * %FALSE otherwise.
17717  *
17718  * Returns: %TRUE if the @drive can be polled for media changes,
17719  */
17720
17721
17722 /**
17723  * g_dbus_error_register_error_domain:
17724  * @error_domain_quark_name: The error domain name.
17725  * @quark_volatile: A pointer where to store the #GQuark.
17726  * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
17727  * @num_entries: Number of items to register.
17728  *
17729  * Helper function for associating a #GError error domain with D-Bus error names.
17730  *
17731  * Since: 2.26
17732  */
17733
17734
17735 /**
17736  * g_cancellable_release_fd:
17737  * @cancellable: a #GCancellable
17738  *
17739  * Releases a resources previously allocated by g_cancellable_get_fd()
17740  * or g_cancellable_make_pollfd().
17741  * For compatibility reasons with older releases, calling this function
17742  * is not strictly required, the resources will be automatically freed
17743  * when the @cancellable is finalized. However, the @cancellable will
17744  * block scarce file descriptors until it is finalized if this function
17745  * is not called. This can cause the application to run out of file
17746  * descriptors when many #GCancellables are used at the same time.
17747  *
17748  * Since: 2.22
17749  */
17750
17751
17752 /**
17753  * g_data_input_stream_read_upto:
17754  * @stream: a #GDataInputStream
17755  * @stop_chars: characters to terminate the read
17756  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
17757  * @length: a #gsize to get the length of the data read in
17758  * @cancellable: optional #GCancellable object, %NULL to ignore
17759  * @error: #GError for error reporting
17760  *
17761  * Reads a string from the data input stream, up to the first
17762  * occurrence of any of the stop characters.
17763  * In contrast to g_data_input_stream_read_until(), this function
17764  * does <emphasis>not</emphasis> consume the stop character. You have
17765  * to use g_data_input_stream_read_byte() to get it before calling
17766  * g_data_input_stream_read_upto() again.
17767  * Note that @stop_chars may contain '\0' if @stop_chars_len is
17768  * specified.
17769  * any of the stop characters. Set @length to a #gsize to get the length
17770  * of the string. This function will return %NULL on an error
17771  *
17772  * Returns: a string with the data that was read before encountering
17773  * Since: 2.24
17774  */
17775
17776
17777 /**
17778  * g_inet_address_get_family:
17779  * @address: a #GInetAddress
17780  *
17781  * Gets @address's family
17782  *
17783  * Returns: @address's family
17784  * Since: 2.22
17785  */
17786
17787
17788 /**
17789  * g_filename_completer_get_completions:
17790  * @completer: the filename completer.
17791  * @initial_text: text to be completed.
17792  *
17793  * Gets an array of completion strings for a given initial text.
17794  * This array must be freed by g_strfreev() when finished.
17795  *
17796  * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
17797  */
17798
17799
17800 /**
17801  * g_data_output_stream_get_byte_order:
17802  * @stream: a #GDataOutputStream.
17803  *
17804  * Gets the byte order for the stream.
17805  *
17806  * Returns: the #GDataStreamByteOrder for the @stream.
17807  */
17808
17809
17810 /**
17811  * g_file_info_get_icon:
17812  * @info: a #GFileInfo.
17813  *
17814  * Gets the icon for a file.
17815  *
17816  * Returns: (transfer none): #GIcon for the given @info.
17817  */
17818
17819
17820 /**
17821  * g_filter_output_stream_set_close_base_stream:
17822  * @stream: a #GFilterOutputStream.
17823  * @close_base: %TRUE to close the base stream.
17824  *
17825  * Sets whether the base stream will be closed when @stream is closed.
17826  */
17827
17828
17829 /**
17830  * g_file_set_display_name:
17831  * @file: input #GFile.
17832  * @display_name: a string.
17833  * @cancellable: optional #GCancellable object, %NULL to ignore.
17834  * @error: a #GError, or %NULL
17835  *
17836  * Renames @file to the specified display name.
17837  * The display name is converted from UTF8 to the correct encoding for the target
17838  * filesystem if possible and the @file is renamed to this.
17839  * If you want to implement a rename operation in the user interface the edit name
17840  * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
17841  * widget, and then the result after editing should be passed to g_file_set_display_name().
17842  * On success the resulting converted filename is returned.
17843  * If @cancellable is not %NULL, then the operation can be cancelled by
17844  * triggering the cancellable object from another thread. If the operation
17845  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
17846  * if there was an error.
17847  * Free the returned object with g_object_unref().
17848  *
17849  * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
17850  */
17851
17852
17853 /**
17854  * g_settings_get_has_unapplied:
17855  * @settings: a #GSettings object
17856  * @returns: %TRUE if @settings has unapplied changes
17857  *
17858  * Returns whether the #GSettings object has any unapplied
17859  * changes.  This can only be the case if it is in 'delayed-apply' mode.
17860  *
17861  * Since: 2.26
17862  */
17863
17864
17865 /**
17866  * SECTION:gconverteroutputstrea:
17867  * @short_description: Converter Output Stream
17868  * @include: gio/gio.h
17869  * @see_also: #GOutputStream, #GConverter
17870  *
17871  * Converter output stream implements #GOutputStream and allows
17872  * conversion of data of various types during reading.
17873  */
17874
17875
17876 /**
17877  * g_file_poll_mountable_finish:
17878  * @file: input #GFile.
17879  * @result: a #GAsyncResult.
17880  * @error: a #GError, or %NULL
17881  *
17882  * Finishes a poll operation. See g_file_poll_mountable() for details.
17883  * Finish an asynchronous poll operation that was polled
17884  * with g_file_poll_mountable().
17885  * otherwise.
17886  *
17887  * Returns: %TRUE if the operation finished successfully. %FALSE
17888  * Since: 2.22
17889  */
17890
17891
17892 /**
17893  * g_io_error_quark:
17894  *
17895  * Gets the GIO Error Quark.
17896  *
17897  * Returns: a #GQuark.
17898  */
17899
17900
17901 /**
17902  * g_network_service_get_domain:
17903  * @srv: a #GNetworkService
17904  *
17905  * Gets the domain that @srv serves. This might be either UTF-8 or
17906  * ASCII-encoded, depending on what @srv was created with.
17907  *
17908  * Returns: @srv's domain name
17909  * Since: 2.22
17910  */
17911
17912
17913 /**
17914  * g_file_get_child_for_display_name:
17915  * @file: input #GFile.
17916  * @display_name: string to a possible child.
17917  * @error: #GError.
17918  *
17919  * Gets the child of @file for a given @display_name (i.e. a UTF8
17920  * version of the name). If this function fails, it returns %NULL and @error will be
17921  * set. This is very useful when constructing a GFile for a new file
17922  * and the user entered the filename in the user interface, for instance
17923  * when you select a directory and type a filename in the file selector.
17924  * This call does no blocking i/o.
17925  * %NULL if the display name couldn't be converted.
17926  * Free the returned object with g_object_unref().
17927  *
17928  * Returns: (transfer full): a #GFile to the specified child, or
17929  */
17930
17931
17932 /**
17933  * g_file_info_set_modification_tim:
17934  * @info: a #GFileInfo.
17935  * @mtime: a #GTimeVal.
17936  *
17937  * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
17938  * info to the given time value.
17939  */
17940
17941
17942 /**
17943  * g_socket_get_protocol:
17944  * @socket: a #GSocket.
17945  *
17946  * Gets the socket protocol id the socket was created with.
17947  * In case the protocol is unknown, -1 is returned.
17948  *
17949  * Returns: a protocol id, or -1 if unknown
17950  * Since: 2.22
17951  */
17952
17953
17954 /**
17955  * g_file_query_info_async:
17956  * @file: input #GFile.
17957  * @attributes: an attribute query string.
17958  * @flags: a set of #GFileQueryInfoFlags.
17959  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
17960  * @cancellable: optional #GCancellable object, %NULL to ignore.
17961  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
17962  * @user_data: the data to pass to callback function
17963  *
17964  * Asynchronously gets the requested information about specified @file. The result
17965  * is a #GFileInfo object that contains key-value attributes (such as type or size
17966  * for the file).
17967  * For more details, see g_file_query_info() which is
17968  * the synchronous version of this call.
17969  * When the operation is finished, @callback will be called. You can then call
17970  * g_file_query_info_finish() to get the result of the operation.
17971  */
17972
17973
17974 /**
17975  * g_app_info_remove_supports_type:
17976  * @appinfo: a #GAppInfo.
17977  * @content_type: a string.
17978  * @error: a #GError.
17979  *
17980  * Removes a supported type from an application, if possible.
17981  *
17982  * Returns: %TRUE on success, %FALSE on error.
17983  */
17984
17985
17986 /**
17987  * g_initable_newv:
17988  * @object_type: a #GType supporting #GInitable.
17989  * @n_parameters: the number of parameters in @parameters
17990  * @parameters: the parameters to use to construct the object
17991  * @cancellable: optional #GCancellable object, %NULL to ignore.
17992  * @error: a #GError location to store the error occuring, or %NULL to ignore.
17993  *
17994  * Helper function for constructing #GInitiable object. This is
17995  * similar to g_object_newv() but also initializes the object
17996  * and returns %NULL, setting an error on failure.
17997  *
17998  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
17999  * Since: 2.22
18000  */
18001
18002
18003 /**
18004  * g_unix_output_stream_get_close_fd:
18005  * @stream: a #GUnixOutputStream
18006  *
18007  * Returns whether the file descriptor of @stream will be
18008  * closed when the stream is closed.
18009  *
18010  * Returns: %TRUE if the file descriptor is closed when done
18011  * Since: 2.20
18012  */
18013
18014
18015 /**
18016  * g_settings_get_int:
18017  * @settings: a #GSettings object
18018  * @key: the key to get the value for
18019  * @returns: an integer
18020  *
18021  * Gets the value that is stored at @key in @settings.
18022  * A convenience variant of g_settings_get() for 32-bit integers.
18023  * It is a programmer error to give a @key that isn't specified as
18024  * having a int32 type in the schema for @settings.
18025  *
18026  * Since: 2.26
18027  */
18028
18029
18030 /**
18031  * g_data_input_stream_set_newline_type:
18032  * @stream: a #GDataInputStream.
18033  * @type: the type of new line return as #GDataStreamNewlineType.
18034  *
18035  * Sets the newline type for the @stream.
18036  * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
18037  * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
18038  * "CR LF", and this might block if there is no more data availible.
18039  */
18040
18041
18042 /**
18043  * g_inet_socket_address_new:
18044  * @address: a #GInetAddress
18045  * @port: a port number
18046  *
18047  * Creates a new #GInetSocketAddress for @address and @port.
18048  *
18049  * Returns: a new #GInetSocketAddress
18050  * Since: 2.22
18051  */
18052
18053
18054 /**
18055  * g_dbus_connection_new_for_address_finish:
18056  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
18057  * @error: Return location for error or %NULL.
18058  *
18059  * Finishes an operation started with g_dbus_connection_new_for_address().
18060  *
18061  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
18062  * Since: 2.26
18063  */
18064
18065
18066 /**
18067  * g_srv_target_get_weight:
18068  * @target: a #GSrvTarget
18069  *
18070  * Gets @target's weight. You should not need to look at this;
18071  * #GResolver already sorts the targets according to the algorithm in
18072  * RFC 2782.
18073  *
18074  * Returns: @target's weight
18075  * Since: 2.22
18076  */
18077
18078
18079 /**
18080  * g_application_command_line_get_cwd:
18081  * @cmdline: a #GApplicationCommandLine
18082  *
18083  * Gets the working directory of the command line invocation.  The
18084  * string may contain non-utf8 data.
18085  * It is possible that the remote application did not send a working
18086  * directory, so this may be %NULL.
18087  * The return value should not be modified or freed and is valid for as
18088  * long as @cmdline exists.
18089  *
18090  * Returns: the current directory, or %NULL
18091  * Since: 2.28
18092  */
18093
18094
18095 /**
18096  * g_mount_operation_set_password:
18097  * @op: a #GMountOperation.
18098  * @password: password to set.
18099  *
18100  * Sets the mount operation's password to @password.
18101  */
18102
18103
18104 /**
18105  * g_initable_new:
18106  * @object_type: a #GType supporting #GInitable.
18107  * @cancellable: optional #GCancellable object, %NULL to ignore.
18108  * @error: a #GError location to store the error occuring, or %NULL to ignore.
18109  * @first_property_name: the name of the first property, or %NULL if no properties
18110  * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
18111  *
18112  * Helper function for constructing #GInitiable object. This is
18113  * similar to g_object_new() but also initializes the object
18114  * and returns %NULL, setting an error on failure.
18115  *
18116  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
18117  * Since: 2.22
18118  */
18119
18120
18121 /**
18122  * g_file_info_set_attribute_uint32:
18123  * @info: a #GFileInfo.
18124  * @attribute: a file attribute key.
18125  * @attr_value: an unsigned 32-bit integer.
18126  *
18127  * Sets the @attribute to contain the given @attr_value,
18128  * if possible.
18129  */
18130
18131
18132 /**
18133  * g_volume_get_name:
18134  * @volume: a #GVolume.
18135  *
18136  * Gets the name of @volume.
18137  * be freed with g_free() when no longer needed.
18138  *
18139  * Returns: the name for the given @volume. The returned string should
18140  */
18141
18142
18143 /**
18144  * g_converter_input_stream_new:
18145  * @base_stream: a #GInputStream
18146  * @converter: a #GConverter
18147  *
18148  * Creates a new converter input stream for the @base_stream.
18149  *
18150  * Returns: a new #GInputStream.
18151  */
18152
18153
18154 /**
18155  * SECTION:gsocke:
18156  * @short_description: Low-level socket object
18157  * @include: gio/gio.h
18158  * @see_also: #GInitable
18159  *
18160  * A #GSocket is a low-level networking primitive. It is a more or less
18161  * direct mapping of the BSD socket API in a portable GObject based API.
18162  * It supports both the UNIX socket implementations and winsock2 on Windows.
18163  * #GSocket is the platform independent base upon which the higher level
18164  * network primitives are based. Applications are not typically meant to
18165  * use it directly, but rather through classes like #GSocketClient,
18166  * #GSocketService and #GSocketConnection. However there may be cases where
18167  * direct use of #GSocket is useful.
18168  * #GSocket implements the #GInitable interface, so if it is manually constructed
18169  * by e.g. g_object_new() you must call g_initable_init() and check the
18170  * results before using the object. This is done automatically in
18171  * g_socket_new() and g_socket_new_from_fd(), so these functions can return
18172  * %NULL.
18173  * Sockets operate in two general modes, blocking or non-blocking. When
18174  * in blocking mode all operations block until the requested operation
18175  * is finished or there is an error. In non-blocking mode all calls that
18176  * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
18177  * To know when a call would successfully run you can call g_socket_condition_check(),
18178  * or g_socket_condition_wait(). You can also use g_socket_create_source() and
18179  * attach it to a #GMainContext to get callbacks when I/O is possible.
18180  * Note that all sockets are always set to non blocking mode in the system, and
18181  * blocking mode is emulated in GSocket.
18182  * When working in non-blocking mode applications should always be able to
18183  * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
18184  * function said that I/O was possible. This can easily happen in case
18185  * of a race condition in the application, but it can also happen for other
18186  * reasons. For instance, on Windows a socket is always seen as writable
18187  * until a write returns %G_IO_ERROR_WOULD_BLOCK.
18188  * #GSocket<!-- -->s can be either connection oriented or datagram based.
18189  * For connection oriented types you must first establish a connection by
18190  * either connecting to an address or accepting a connection from another
18191  * address. For connectionless socket types the target/source address is
18192  * specified or received in each I/O operation.
18193  * All socket file descriptors are set to be close-on-exec.
18194  * Note that creating a #GSocket causes the signal %SIGPIPE to be
18195  * ignored for the remainder of the program. If you are writing a
18196  * command-line utility that uses #GSocket, you may need to take into
18197  * account the fact that your program will not automatically be killed
18198  * if it tries to write to %stdout after it has been closed.
18199  *
18200  * Since: 2.22
18201  */
18202
18203
18204 /**
18205  * GFileIcon:file:
18206  *
18207  * The file containing the icon.
18208  */
18209
18210
18211 /**
18212  * g_emblem_new_with_origin:
18213  * @icon: a GIcon containing the icon.
18214  * @origin: a GEmblemOrigin enum defining the emblem's origin
18215  *
18216  * Creates a new emblem for @icon.
18217  *
18218  * Returns: a new #GEmblem.
18219  * Since: 2.18
18220  */
18221
18222
18223 /**
18224  * GDBusServer:client-address:
18225  *
18226  * The D-Bus address that clients can use.
18227  *
18228  * Since: 2.26
18229  */
18230
18231
18232 /**
18233  * g_dbus_node_info_new_for_xml:
18234  * @xml_data: Valid D-Bus introspection XML.
18235  * @error: Return location for error.
18236  *
18237  * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
18238  * with g_dbus_node_info_unref().
18239  *
18240  * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
18241  * Since: 2.26
18242  */
18243
18244
18245 /**
18246  * GMemoryOutputStream:data-size:
18247  *
18248  * Size of data written to the buffer.
18249  *
18250  * Since: 2.24
18251  */
18252
18253
18254 /**
18255  * GDBusConnection:stream:
18256  *
18257  * The underlying #GIOStream used for I/O.
18258  *
18259  * Since: 2.26
18260  */
18261
18262
18263 /**
18264  * g_output_stream_set_pending:
18265  * @stream: a #GOutputStream.
18266  * @error: a #GError location to store the error occuring, or %NULL to ignore.
18267  *
18268  * Sets @stream to have actions pending. If the pending flag is
18269  * already set or @stream is closed, it will return %FALSE and set
18270  *
18271  * Returns: %TRUE if pending was previously unset and is now set.
18272  */
18273
18274
18275 /**
18276  * SECTION:gconverterinputstrea:
18277  * @short_description: Converter Input Stream
18278  * @include: gio/gio.h
18279  * @see_also: #GInputStream, #GConverter
18280  *
18281  * Converter input stream implements #GInputStream and allows
18282  * conversion of data of various types during reading.
18283  */
18284
18285
18286 /**
18287  * g_input_stream_skip:
18288  * @stream: a #GInputStream.
18289  * @count: the number of bytes that will be skipped from the stream
18290  * @cancellable: optional #GCancellable object, %NULL to ignore.
18291  * @error: location to store the error occuring, or %NULL to ignore
18292  *
18293  * Tries to skip @count bytes from the stream. Will block during the operation.
18294  * This is identical to g_input_stream_read(), from a behaviour standpoint,
18295  * but the bytes that are skipped are not returned to the user. Some
18296  * streams have an implementation that is more efficient than reading the data.
18297  * This function is optional for inherited classes, as the default implementation
18298  * emulates it using read.
18299  * If @cancellable is not %NULL, then the operation can be cancelled by
18300  * triggering the cancellable object from another thread. If the operation
18301  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
18302  * operation was partially finished when the operation was cancelled the
18303  * partial result will be returned, without an error.
18304  *
18305  * Returns: Number of bytes skipped, or -1 on error
18306  */
18307
18308
18309 /**
18310  * g_mount_operation_set_password_save:
18311  * @op: a #GMountOperation.
18312  * @save: a set of #GPasswordSave flags.
18313  *
18314  * Sets the state of saving passwords for the mount operation.
18315  */
18316
18317
18318 /**
18319  * g_app_info_launch_default_for_uri:
18320  * @uri: the uri to show
18321  * @launch_context: an optional #GAppLaunchContext.
18322  * @error: a #GError.
18323  *
18324  * Utility function that launches the default application
18325  * registered to handle the specified uri. Synchronous I/O
18326  * is done on the uri to detect the type of the file if
18327  * required.
18328  *
18329  * Returns: %TRUE on success, %FALSE on error.
18330  */
18331
18332
18333 /**
18334  * g_buffered_input_stream_fill_finish:
18335  * @stream: a #GBufferedInputStream
18336  * @result: a #GAsyncResult
18337  * @error: a #GError
18338  *
18339  * Finishes an asynchronous read.
18340  *
18341  * Returns: a #gssize of the read stream, or %-1 on an error.
18342  */
18343
18344
18345 /**
18346  * g_file_info_set_name:
18347  * @info: a #GFileInfo.
18348  * @name: a string containing a name.
18349  *
18350  * Sets the name attribute for the current #GFileInfo.
18351  * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
18352  */
18353
18354
18355 /**
18356  * g_socket_address_new_from_native:
18357  * @native: a pointer to a <type>struct sockaddr</type>
18358  * @len: the size of the memory location pointed to by @native
18359  *
18360  * Creates a #GSocketAddress subclass corresponding to the native
18361  * <type>struct sockaddr</type> @native.
18362  * otherwise %NULL.
18363  *
18364  * Returns: a new #GSocketAddress if @native could successfully be converted,
18365  * Since: 2.22
18366  */
18367
18368
18369 /**
18370  * g_drive_start_finish:
18371  * @drive: a #GDrive.
18372  * @result: a #GAsyncResult.
18373  * @error: a #GError, or %NULL
18374  *
18375  * Finishes starting a drive.
18376  * %FALSE otherwise.
18377  *
18378  * Returns: %TRUE if the drive has been started successfully,
18379  * Since: 2.22
18380  */
18381
18382
18383 /**
18384  * g_settings_range_check:
18385  * @settings: a #GSettings
18386  * @key: the key to check
18387  * @value: the value to check
18388  * @returns: %TRUE if @value is valid for @key
18389  *
18390  * Checks if the given @value is of the correct type and within the
18391  * permitted range for @key.
18392  * This API is not intended to be used by normal programs -- they should
18393  * already know what is permitted by their own schemas.  This API is
18394  * meant to be used by programs such as editors or commandline tools.
18395  * It is a programmer error to give a @key that isn't contained in the
18396  * schema for @settings.
18397  *
18398  * Since: 2.28
18399  */
18400
18401
18402 /**
18403  * g_socket_set_keepalive:
18404  * @socket: a #GSocket.
18405  * @keepalive: Value for the keepalive flag
18406  *
18407  * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
18408  * this flag is set on a socket, the system will attempt to verify that the
18409  * remote socket endpoint is still present if a sufficiently long period of
18410  * time passes with no data being exchanged. If the system is unable to
18411  * verify the presence of the remote endpoint, it will automatically close
18412  * the connection.
18413  * This option is only functional on certain kinds of sockets. (Notably,
18414  * %G_SOCKET_PROTOCOL_TCP sockets.)
18415  * The exact time between pings is system- and protocol-dependent, but will
18416  * normally be at least two hours. Most commonly, you would set this flag
18417  * on a server socket if you want to allow clients to remain idle for long
18418  * periods of time, but also want to ensure that connections are eventually
18419  * garbage-collected if clients crash or become unreachable.
18420  *
18421  * Since: 2.22
18422  */
18423
18424
18425 /**
18426  * SECTION:gprox:
18427  * @short_description: Interface for proxy handling
18428  *
18429  * A #GProxy handles connecting to a remote host via a given type of
18430  * proxy server. It is implemented by the 'gio-proxy' extension point.
18431  * The extensions are named after their proxy protocol name. As an
18432  * example, a SOCKS5 proxy implementation can be retrieved with the
18433  * name 'socks5' using the function
18434  * g_io_extension_point_get_extension_by_name().
18435  *
18436  * Since: 2.26
18437  */
18438
18439
18440 /**
18441  * g_unix_fd_message_steal_fds:
18442  * @message: a #GUnixFDMessage
18443  * @length: pointer to the length of the returned array, or %NULL
18444  *
18445  * Returns the array of file descriptors that is contained in this
18446  * object.
18447  * After this call, the descriptors are no longer contained in
18448  * descriptors have been added).
18449  * The return result of this function must be freed with g_free().
18450  * The caller is also responsible for closing all of the file
18451  * descriptors.
18452  * If @length is non-%NULL then it is set to the number of file
18453  * descriptors in the returned array. The returned array is also
18454  * terminated with -1.
18455  * This function never returns %NULL. In case there are no file
18456  * descriptors contained in @message, an empty array is returned.
18457  *
18458  * Returns: an array of file descriptors
18459  * Since: 2.22
18460  */
18461
18462
18463 /**
18464  * g_file_enumerator_next_file:
18465  * @enumerator: a #GFileEnumerator.
18466  * @cancellable: optional #GCancellable object, %NULL to ignore.
18467  * @error: location to store the error occuring, or %NULL to ignore
18468  *
18469  * Returns information for the next file in the enumerated object.
18470  * Will block until the information is available. The #GFileInfo
18471  * returned from this function will contain attributes that match the
18472  * attribute string that was passed when the #GFileEnumerator was created.
18473  * On error, returns %NULL and sets @error to the error. If the
18474  * enumerator is at the end, %NULL will be returned and @error will
18475  * be unset.
18476  * Free the returned object with g_object_unref() when no longer needed.
18477  *
18478  * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
18479  */
18480
18481
18482 /**
18483  * g_unix_fd_list_get_length:
18484  * @list: a #GUnixFDList
18485  *
18486  * contained within).
18487  *
18488  * Gets the length of @list (ie: the number of file descriptors
18489  * Returns: the length of @list
18490  * Since: 2.24
18491  */
18492
18493
18494 /**
18495  * GDBusServerClass:
18496  * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
18497  *
18498  * Class structure for #GDBusServer.
18499  *
18500  * Since: 2.26
18501  */
18502
18503
18504 /**
18505  * g_socket_speaks_ipv4:
18506  * @socket: a #GSocket
18507  *
18508  * Checks if a socket is capable of speaking IPv4.
18509  * IPv4 sockets are capable of speaking IPv4.  On some operating systems
18510  * and under some combinations of circumstances IPv6 sockets are also
18511  * capable of speaking IPv4.  See RFC 3493 section 3.7 for more
18512  * information.
18513  * No other types of sockets are currently considered as being capable
18514  * of speaking IPv4.
18515  *
18516  * Returns: %TRUE if this socket can be used with IPv4.
18517  * Since: 2.22
18518  */
18519
18520
18521 /**
18522  * g_dbus_message_set_message_type:
18523  * @message: A #GDBusMessage.
18524  * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
18525  *
18526  * Sets @message to be of @type.
18527  *
18528  * Since: 2.26
18529  */
18530
18531
18532 /**
18533  * GAction:enabled:
18534  *
18535  * If @action is currently enabled.
18536  * If the action is disabled then calls to g_action_activate() and
18537  * g_action_set_state() have no effect.
18538  *
18539  * Since: 2.28
18540  */
18541
18542
18543 /**
18544  * GAction:name:
18545  *
18546  * The name of the action.  This is mostly meaningful for identifying
18547  * the action once it has been added to a #GActionGroup.
18548  *
18549  * Since: 2.28
18550  */
18551
18552
18553 /**
18554  * g_unix_mount_guess_should_display:
18555  * @mount_entry: a #GUnixMountEntry
18556  *
18557  * Guesses whether a Unix mount should be displayed in the UI.
18558  *
18559  * Returns: %TRUE if @mount_entry is deemed to be displayable.
18560  */
18561
18562
18563 /**
18564  * g_volume_monitor_get_mount_for_uuid:
18565  * @volume_monitor: a #GVolumeMonitor.
18566  * @uuid: the UUID to look for
18567  *
18568  * Finds a #GMount object by its UUID (see g_mount_get_uuid())
18569  * Free the returned object with g_object_unref().
18570  *
18571  * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
18572  */
18573
18574
18575 /**
18576  * GFileMonitor::changed:
18577  * @monitor: a #GFileMonitor.
18578  * @file: a #GFile.
18579  * @other_file: a #GFile.
18580  * @event_type: a #GFileMonitorEvent.
18581  *
18582  * Emitted when a file has been changed.
18583  */
18584
18585
18586 /**
18587  * g_file_create_readwrite_finish:
18588  * @file: input #GFile
18589  * @res: a #GAsyncResult
18590  * @error: a #GError, or %NULL
18591  *
18592  * Finishes an asynchronous file create operation started with
18593  * g_file_create_readwrite_async().
18594  * Free the returned object with g_object_unref().
18595  *
18596  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
18597  * Since: 2.22
18598  */
18599
18600
18601 /**
18602  * g_converter_output_stream_get_converter:
18603  * @converter_stream: a #GConverterOutputStream
18604  *
18605  * Gets the #GConverter that is used by @converter_stream.
18606  *
18607  * Returns: (transfer none): the converter of the converter output stream
18608  * Since: 2.24
18609  */
18610
18611
18612 /**
18613  * g_file_monitor_set_rate_limit:
18614  * @monitor: a #GFileMonitor.
18615  * @limit_msecs: a integer with the limit in milliseconds to poll for changes.
18616  *
18617  * Sets the rate limit to which the @monitor will report
18618  * consecutive change events to the same file.
18619  */
18620
18621
18622 /**
18623  * g_cancellable_set_error_if_cancelled:
18624  * @cancellable: a #GCancellable object.
18625  * @error: #GError to append error state to.
18626  *
18627  * If the @cancellable is cancelled, sets the error to notify
18628  * that the operation was cancelled.
18629  *
18630  * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not.
18631  */
18632
18633
18634 /**
18635  * g_file_create_finish:
18636  * @file: input #GFile.
18637  * @res: a #GAsyncResult.
18638  * @error: a #GError, or %NULL
18639  *
18640  * Finishes an asynchronous file create operation started with
18641  * g_file_create_async().
18642  * Free the returned object with g_object_unref().
18643  *
18644  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
18645  */
18646
18647
18648 /**
18649  * g_mount_operation_get_password_save:
18650  * @op: a #GMountOperation.
18651  *
18652  * Gets the state of saving passwords for the mount operation.
18653  *
18654  * Returns: a #GPasswordSave flag.
18655  */
18656
18657
18658 /**
18659  * SECTION:gzcompresso:
18660  * @short_description: Zlib compressor
18661  * @include: gio/gio.h
18662  *
18663  * #GZlibCompressor is an implementation of #GConverter that
18664  * compresses data using zlib.
18665  */
18666
18667
18668 /**
18669  * g_buffered_input_stream_new:
18670  * @base_stream: a #GInputStream
18671  *
18672  * Creates a new #GInputStream from the given @base_stream, with
18673  * a buffer set to the default size (4 kilobytes).
18674  *
18675  * Returns: a #GInputStream for the given @base_stream.
18676  */
18677
18678
18679 /**
18680  * g_unix_connection_send_credentials:
18681  * @connection: A #GUnixConnection.
18682  * @cancellable: A #GCancellable or %NULL.
18683  * @error: Return location for error or %NULL.
18684  *
18685  * Passes the credentials of the current user the receiving side
18686  * of the connection. The recieving end has to call
18687  * g_unix_connection_receive_credentials() (or similar) to accept the
18688  * credentials.
18689  * As well as sending the credentials this also writes a single NUL
18690  * byte to the stream, as this is required for credentials passing to
18691  * work on some implementations.
18692  * Other ways to exchange credentials with a foreign peer includes the
18693  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
18694  *
18695  * Returns: %TRUE on success, %FALSE if @error is set.
18696  * Since: 2.26
18697  */
18698
18699
18700 /**
18701  * g_settings_backend_changed:
18702  * @backend: a #GSettingsBackend implementation
18703  * @key: the name of the key
18704  * @origin_tag: the origin tag
18705  *
18706  * Signals that a single key has possibly changed.  Backend
18707  * implementations should call this if a key has possibly changed its
18708  * value.
18709  * '//', and not ending with a slash).
18710  * The implementation must call this function during any call to
18711  * g_settings_backend_write(), before the call returns (except in the
18712  * case that no keys are actually changed and it cares to detect this
18713  * fact).  It may not rely on the existence of a mainloop for
18714  * dispatching the signal later.
18715  * The implementation may call this function at any other time it likes
18716  * in response to other events (such as changes occuring outside of the
18717  * program).  These calls may originate from a mainloop or may originate
18718  * in response to any other action (including from calls to
18719  * g_settings_backend_write()).
18720  * In the case that this call is in response to a call to
18721  * g_settings_backend_write() then @origin_tag must be set to the same
18722  * value that was passed to that call.
18723  *
18724  * Since: 2.26
18725  */
18726
18727
18728 /**
18729  * g_data_input_stream_read_line_finish:
18730  * @stream: a given #GDataInputStream.
18731  * @result: the #GAsyncResult that was provided to the callback.
18732  * @length: a #gsize to get the length of the data read in.
18733  * @error: #GError for error reporting.
18734  *
18735  * Finish an asynchronous call started by
18736  * g_data_input_stream_read_line_async().
18737  * Set @length to a #gsize to get the length of the read line.
18738  * On an error, it will return %NULL and @error will be set. If there's no
18739  * content to read, it will still return %NULL, but @error won't be set.
18740  *
18741  * Returns: a string with the line that was read in (without the newlines).
18742  * Since: 2.20
18743  */
18744
18745
18746 /**
18747  * g_content_type_get_icon:
18748  * @type: a content type string
18749  *
18750  * Gets the icon for a content type.
18751  * object with g_object_unref()
18752  *
18753  * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
18754  */
18755
18756
18757 /**
18758  * GInetAddress:is-mc-node-local:
18759  *
18760  * Whether this is a node-local multicast address.
18761  * See g_inet_address_get_is_mc_node_local().
18762  *
18763  * Since: 2.22
18764  */
18765
18766
18767 /**
18768  * GInetAddress:is-site-local:
18769  *
18770  * Whether this is a site-local address.
18771  * See g_inet_address_get_is_loopback().
18772  *
18773  * Since: 2.22
18774  */
18775
18776
18777 /**
18778  * g_periodic_remove:
18779  * @periodic: a #GPeriodic clock
18780  * @tag: the ID of the callback to remove
18781  *
18782  * Reverse the effect of a previous call to g_periodic_start().
18783  * This function may not be called from a handler of the repair signal,
18784  * but it is perfectly reasonable to call it from a handler of the tick
18785  * signal.
18786  *
18787  * Since: 2.28
18788  */
18789
18790
18791 /**
18792  * g_io_scheduler_cancel_all_jobs:
18793  *
18794  * Cancels all cancellable I/O jobs.
18795  * A job is cancellable if a #GCancellable was passed into
18796  * g_io_scheduler_push_job().
18797  */
18798
18799
18800 /**
18801  * g_unix_fd_list_new:
18802  *
18803  * Creates a new #GUnixFDList containing no file descriptors.
18804  *
18805  * Returns: a new #GUnixFDList
18806  * Since: 2.24
18807  */
18808
18809
18810 /**
18811  * g_network_address_get_hostname:
18812  * @addr: a #GNetworkAddress
18813  *
18814  * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
18815  * depending on what @addr was created with.
18816  *
18817  * Returns: @addr's hostname
18818  * Since: 2.22
18819  */
18820
18821
18822 /**
18823  * SECTION:ginetsocketaddres:
18824  * @short_description: Internet GSocketAddress
18825  *
18826  * An IPv4 or IPv6 socket address; that is, the combination of a
18827  * #GInetAddress and a port number.
18828  */
18829
18830
18831 /**
18832  * GDrive::stop-button:
18833  * @drive: a #GDrive.
18834  *
18835  * Emitted when the physical stop button (if any) of a drive has
18836  * been pressed.
18837  *
18838  * Since: 2.22
18839  */
18840
18841
18842 /**
18843  * SECTION:gsimplepermissio:
18844  * @title: GSimplePermission
18845  * @short_description: a GPermission that doesn't change value
18846  *
18847  * #GSimplePermission is a trivial implementation of #GPermission that
18848  * represents a permission that is either always or never allowed.  The
18849  * value is given at constuction and doesn't change.
18850  * Calling request or release will result in errors.
18851  */
18852
18853
18854 /**
18855  * g_bus_get_finish:
18856  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
18857  * @error: Return location for error or %NULL.
18858  *
18859  * Finishes an operation started with g_bus_get().
18860  * The returned object is a singleton, that is, shared with other
18861  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
18862  * event that you need a private message bus connection, use
18863  * g_dbus_address_get_for_bus() and
18864  * g_dbus_connection_new_for_address().
18865  * Note that the returned #GDBusConnection object will (usually) have
18866  * the #GDBusConnection:exit-on-close property set to %TRUE.
18867  *
18868  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
18869  * Since: 2.26
18870  */
18871
18872
18873 /**
18874  * g_action_group_get_action_state_hint:
18875  * @action_group: a #GActionGroup
18876  * @action_name: the name of the action to query
18877  *
18878  * Requests a hint about the valid range of values for the state of the
18879  * named action within @action_group.
18880  * If %NULL is returned it either means that the action is not stateful
18881  * or that there is no hint about the valid range of values for the
18882  * state of the action.
18883  * If a #GVariant array is returned then each item in the array is a
18884  * returned then the tuple specifies the inclusive lower and upper bound
18885  * of valid values for the state.
18886  * In any case, the information is merely a hint.  It may be possible to
18887  * have a state value outside of the hinted range and setting a value
18888  * within the range may fail.
18889  * The return value (if non-%NULL) should be freed with
18890  * g_variant_unref() when it is no longer required.
18891  *
18892  * Possible value for the state.  if a #gvariant pair (ie: two-tuple) is
18893  * Returns: (transfer full): the state range hint
18894  * Since: 2.28
18895  */
18896
18897
18898 /**
18899  * g_app_info_get_name:
18900  * @appinfo: a #GAppInfo.
18901  *
18902  * Gets the installed name of the application.
18903  *
18904  * Returns: the name of the application for @appinfo.
18905  */
18906
18907
18908 /**
18909  * g_file_info_set_attribute_status:
18910  * @info: a #GFileInfo
18911  * @attribute: a file attribute key
18912  * @status: a #GFileAttributeStatus
18913  *
18914  * Sets the attribute status for an attribute key. This is only
18915  * needed by external code that implement g_file_set_attributes_from_info()
18916  * or similar functions.
18917  * The attribute must exist in @info for this to work. Otherwise %FALSE
18918  * is returned and @info is unchanged.
18919  *
18920  * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
18921  * Since: 2.22
18922  */
18923
18924
18925 /**
18926  * g_file_info_get_etag:
18927  * @info: a #GFileInfo.
18928  *
18929  * Gets the <link linkend="gfile-etag">entity tag</link> for a given
18930  * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
18931  *
18932  * Returns: a string containing the value of the "etag:value" attribute.
18933  */
18934
18935
18936 /**
18937  * g_app_info_get_icon:
18938  * @appinfo: a #GAppInfo.
18939  *
18940  * Gets the icon for the application.
18941  *
18942  * Returns: (transfer none): the default #GIcon for @appinfo.
18943  */
18944
18945
18946 /**
18947  * g_volume_get_activation_root:
18948  * @volume: a #GVolume
18949  *
18950  * Gets the activation root for a #GVolume if it is known ahead of
18951  * mount time. Returns %NULL otherwise. If not %NULL and if @volume
18952  * is mounted, then the result of g_mount_get_root() on the
18953  * #GMount object obtained from g_volume_get_mount() will always
18954  * either be equal or a prefix of what this function returns. In
18955  * other words, in code
18956  * <programlisting>
18957  * GMount *mount;
18958  * GFile *mount_root
18959  * GFile *volume_activation_root;
18960  * mount = g_volume_get_mount (volume); /&ast; mounted, so never NULL &ast;/
18961  * mount_root = g_mount_get_root (mount);
18962  * volume_activation_root = g_volume_get_activation_root(volume); /&ast; assume not NULL &ast;/
18963  * </programlisting>
18964  * then the expression
18965  * <programlisting>
18966  * (g_file_has_prefix (volume_activation_root, mount_root) ||
18967  * </programlisting>
18968  * will always be %TRUE.
18969  * Activation roots are typically used in #GVolumeMonitor
18970  * implementations to find the underlying mount to shadow, see
18971  * g_mount_is_shadowed() for more details.
18972  * g_object_unref() to free.
18973  *
18974  * Returns: (transfer full): the activation root of @volume or %NULL. Use
18975  * Since: 2.18
18976  */
18977
18978
18979 /**
18980  * g_dbus_message_set_destination:
18981  * @message: A #GDBusMessage.
18982  * @value: The value to set.
18983  *
18984  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
18985  *
18986  * Since: 2.26
18987  */
18988
18989
18990 /**
18991  * g_volume_eject:
18992  * @volume: a #GVolume.
18993  * @flags: flags affecting the unmount if required for eject
18994  * @cancellable: optional #GCancellable object, %NULL to ignore.
18995  * @callback: a #GAsyncReadyCallback, or %NULL.
18996  * @user_data: user data that gets passed to @callback
18997  *
18998  * Ejects a volume. This is an asynchronous operation, and is
18999  * finished by calling g_volume_eject_finish() with the @volume
19000  * and #GAsyncResult returned in the @callback.
19001  *
19002  * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
19003  */
19004
19005
19006 /**
19007  * g_dbus_message_new:
19008  *
19009  * Creates a new empty #GDBusMessage.
19010  *
19011  * Returns: A #GDBusMessage. Free with g_object_unref().
19012  * Since: 2.26
19013  */
19014
19015
19016 /**
19017  * g_dbus_message_get_arg0:
19018  * @message: A #GDBusMessage.
19019  *
19020  * Convenience to get the first item in the body of @message.
19021  *
19022  * Returns: The string item or %NULL if the first item in the body of
19023  * Since: 2.26
19024  */
19025
19026
19027 /**
19028  * g_drive_is_media_removable:
19029  * @drive: a #GDrive.
19030  *
19031  * Checks if the @drive supports removable media.
19032  *
19033  * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
19034  */
19035
19036
19037 /**
19038  * g_unix_socket_address_get_address_type:
19039  * @address: a #GInetSocketAddress
19040  *
19041  * Gets @address's type.
19042  *
19043  * Returns: a #GUnixSocketAddressType
19044  * Since: 2.26
19045  */
19046
19047
19048 /**
19049  * g_data_output_stream_put_byte:
19050  * @stream: a #GDataOutputStream.
19051  * @data: a #guchar.
19052  * @cancellable: optional #GCancellable object, %NULL to ignore.
19053  * @error: a #GError, %NULL to ignore.
19054  *
19055  * Puts a byte into the output stream.
19056  *
19057  * Returns: %TRUE if @data was successfully added to the @stream.
19058  */
19059
19060
19061 /**
19062  * g_drive_eject_finish:
19063  * @drive: a #GDrive.
19064  * @result: a #GAsyncResult.
19065  * @error: a #GError, or %NULL
19066  *
19067  * Finishes ejecting a drive.
19068  * %FALSE otherwise.
19069  *
19070  * Returns: %TRUE if the drive has been ejected successfully,
19071  * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
19072  */
19073
19074
19075 /**
19076  * g_app_info_can_delete:
19077  * @appinfo: a #GAppInfo
19078  *
19079  * Obtains the information whether the #GAppInfo can be deleted.
19080  * See g_app_info_delete().
19081  *
19082  * Returns: %TRUE if @appinfo can be deleted
19083  * Since: 2.20
19084  */
19085
19086
19087 /**
19088  * g_dbus_interface_info_generate_xml:
19089  * @info: A #GDBusNodeInfo
19090  * @indent: Indentation level.
19091  * @string_builder: A #GString to to append XML data to.
19092  *
19093  * Appends an XML representation of @info (and its children) to @string_builder.
19094  * This function is typically used for generating introspection XML
19095  * documents at run-time for handling the
19096  * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
19097  * method.
19098  *
19099  * Since: 2.26
19100  */
19101
19102
19103 /**
19104  * g_settings_new:
19105  * @schema: the name of the schema
19106  * @returns: a new #GSettings object
19107  *
19108  * Creates a new #GSettings object with a given schema.
19109  * Signals on the newly created #GSettings object will be dispatched
19110  * via the thread-default #GMainContext in effect at the time of the
19111  * call to g_settings_new().  The new #GSettings will hold a reference
19112  * on the context.  See g_main_context_push_thread_default().
19113  *
19114  * Since: 2.26
19115  */
19116
19117
19118 /**
19119  * g_network_service_get_service:
19120  * @srv: a #GNetworkService
19121  *
19122  * Gets @srv's service name (eg, "ldap").
19123  *
19124  * Returns: @srv's service name
19125  * Since: 2.22
19126  */
19127
19128
19129 /**
19130  * GPeriodicTickFunc:
19131  * @periodic: the #GPeriodic clock that is ticking
19132  * @timestamp: the timestamp at the time of the tick
19133  * @user_data: the user data given to g_periodic_add()
19134  *
19135  * The signature of the callback function that is called when the
19136  * #GPeriodic clock ticks.
19137  * The @timestamp parameter is equal for all callbacks called during a
19138  * particular tick on a given clock.
19139  *
19140  * Since: 2.28
19141  */
19142
19143
19144 /**
19145  * g_vfs_get_file_for_path:
19146  * @vfs: a #GVfs.
19147  * @path: a string containing a VFS path.
19148  *
19149  * Gets a #GFile for @path.
19150  * Free the returned object with g_object_unref().
19151  *
19152  * Returns: (transfer full): a #GFile.
19153  */
19154
19155
19156 /**
19157  * GInetAddress:is-mc-global:
19158  *
19159  * Whether this is a global multicast address.
19160  * See g_inet_address_get_is_mc_global().
19161  *
19162  * Since: 2.22
19163  */
19164
19165
19166 /**
19167  * g_unix_fd_list_append:
19168  * @list: a #GUnixFDList
19169  * @fd: a valid open file descriptor
19170  * @error: a #GError pointer
19171  *
19172  * Adds a file descriptor to @list.
19173  * The file descriptor is duplicated using dup(). You keep your copy
19174  * of the descriptor and the copy contained in @list will be closed
19175  * when @list is finalized.
19176  * A possible cause of failure is exceeding the per-process or
19177  * system-wide file descriptor limit.
19178  * The index of the file descriptor in the list is returned.  If you use
19179  * this index with g_unix_fd_list_get() then you will receive back a
19180  * duplicated copy of the same file descriptor.
19181  * (and @error is set)
19182  *
19183  * Returns: the index of the appended fd in case of success, else -1
19184  * Since: 2.24
19185  */
19186
19187
19188 /**
19189  * g_unix_mount_point_guess_name:
19190  * @mount_point: a #GUnixMountPoint
19191  *
19192  * Guesses the name of a Unix mount point.
19193  * The result is a translated string.
19194  * be freed with g_free()
19195  *
19196  * Returns: A newly allocated string that must
19197  */
19198
19199
19200 /**
19201  * g_dbus_message_lock:
19202  * @message: A #GDBusMessage.
19203  *
19204  * If @message is locked, does nothing. Otherwise locks the message.
19205  *
19206  * Since: 2.26
19207  */
19208
19209
19210 /**
19211  * g_filter_input_stream_set_close_base_stream:
19212  * @stream: a #GFilterInputStream.
19213  * @close_base: %TRUE to close the base stream.
19214  *
19215  * Sets whether the base stream will be closed when @stream is closed.
19216  */
19217
19218
19219 /**
19220  * g_simple_async_result_complete:
19221  * @simple: a #GSimpleAsyncResult.
19222  *
19223  * Completes an asynchronous I/O job immediately. Must be called in
19224  * the thread where the asynchronous result was to be delivered, as it
19225  * invokes the callback directly. If you are in a different thread use
19226  * g_simple_async_result_complete_in_idle().
19227  * Calling this function takes a reference to @simple for as long as
19228  * is needed to complete the call.
19229  */
19230
19231
19232 /**
19233  * g_drive_get_icon:
19234  * @drive: a #GDrive.
19235  *
19236  * Gets the icon for @drive.
19237  * Free the returned object with g_object_unref().
19238  *
19239  * Returns: (transfer full): #GIcon for the @drive.
19240  */
19241
19242
19243 /**
19244  * g_unix_mount_free:
19245  * @mount_entry: a #GUnixMount.
19246  *
19247  * Frees a unix mount.
19248  */
19249
19250
19251 /**
19252  * g_socket_listener_add_any_inet_port:
19253  * @listener: a #GSocketListener
19254  * @source_object: Optional #GObject identifying this source
19255  * @error: a #GError location to store the error occuring, or %NULL to ignore.
19256  *
19257  * Listens for TCP connections on any available port number for both
19258  * IPv6 and IPv4 (if each are available).
19259  * This is useful if you need to have a socket for incoming connections
19260  * but don't care about the specific port number.
19261  * to accept to identify this particular source, which is
19262  * useful if you're listening on multiple addresses and do
19263  * different things depending on what address is connected to.
19264  *
19265  * Returns: the port number, or 0 in case of failure.
19266  * Since: 2.24
19267  */
19268
19269
19270 /**
19271  * g_unix_mount_point_get_fs_type:
19272  * @mount_point: a #GUnixMountPoint.
19273  *
19274  * Gets the file system type for the mount point.
19275  *
19276  * Returns: a string containing the file system type.
19277  */
19278
19279
19280 /**
19281  * g_file_output_stream_query_info:
19282  * @stream: a #GFileOutputStream.
19283  * @attributes: a file attribute query string.
19284  * @cancellable: optional #GCancellable object, %NULL to ignore.
19285  * @error: a #GError, %NULL to ignore.
19286  *
19287  * Queries a file output stream for the given @attributes.
19288  * This function blocks while querying the stream. For the asynchronous
19289  * version of this function, see g_file_output_stream_query_info_async().
19290  * While the stream is blocked, the stream will set the pending flag
19291  * internally, and any other operations on the stream will fail with
19292  * %G_IO_ERROR_PENDING.
19293  * Can fail if the stream was already closed (with @error being set to
19294  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
19295  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
19296  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
19297  * all cases of failure, %NULL will be returned.
19298  * If @cancellable is not %NULL, then the operation can be cancelled by
19299  * triggering the cancellable object from another thread. If the operation
19300  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
19301  * be returned.
19302  *
19303  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
19304  */
19305
19306
19307 /**
19308  * g_data_input_stream_read_until_async:
19309  * @stream: a given #GDataInputStream.
19310  * @stop_chars: characters to terminate the read.
19311  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19312  * @cancellable: optional #GCancellable object, %NULL to ignore.
19313  * @callback: callback to call when the request is satisfied.
19314  * @user_data: the data to pass to callback function.
19315  *
19316  * The asynchronous version of g_data_input_stream_read_until().
19317  * It is an error to have two outstanding calls to this function.
19318  * Note that, in contrast to g_data_input_stream_read_until(),
19319  * this function does not consume the stop character that it finds.  You
19320  * must read it for yourself.
19321  * When the operation is finished, @callback will be called. You
19322  * can then call g_data_input_stream_read_until_finish() to get
19323  * the result of the operation.
19324  * Don't use this function in new code.  Its functionality is
19325  * inconsistent with g_data_input_stream_read_until().  Both functions
19326  * will be marked as deprecated in a future release.  Use
19327  * g_data_input_stream_read_upto_async() instead.
19328  *
19329  * Since: 2.20
19330  */
19331
19332
19333 /**
19334  * g_dbus_error_register_error:
19335  * @error_domain: A #GQuark for a error domain.
19336  * @error_code: An error code.
19337  * @dbus_error_name: A D-Bus error name.
19338  *
19339  * Creates an association to map between @dbus_error_name and
19340  * #GError<!-- -->s specified by @error_domain and @error_code.
19341  * This is typically done in the routine that returns the #GQuark for
19342  * an error domain.
19343  * exists.
19344  *
19345  * Returns: %TRUE if the association was created, %FALSE if it already
19346  * Since: 2.26
19347  */
19348
19349
19350 /**
19351  * GDBusProxy::g-signal:
19352  * @proxy: The #GDBusProxy emitting the signal.
19353  * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
19354  * @signal_name: The name of the signal.
19355  * @parameters: A #GVariant tuple with parameters for the signal.
19356  *
19357  * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
19358  *
19359  * Since: 2.26
19360  */
19361
19362
19363 /**
19364  * g_filename_completer_set_dirs_only:
19365  * @completer: the filename completer.
19366  * @dirs_only: a #gboolean.
19367  *
19368  * If @dirs_only is %TRUE, @completer will only
19369  * complete directory names, and not file names.
19370  */
19371
19372
19373 /**
19374  * g_simple_async_report_gerror_in_idle:
19375  * @object: a #GObject.
19376  * @callback: a #GAsyncReadyCallback.
19377  * @user_data: user data passed to @callback.
19378  * @error: the #GError to report
19379  *
19380  * Reports an error in an idle function. Similar to
19381  * g_simple_async_report_error_in_idle(), but takes a #GError rather
19382  * than building a new one.
19383  */
19384
19385
19386 /**
19387  * g_volume_monitor_get_mounts:
19388  * @volume_monitor: a #GVolumeMonitor.
19389  *
19390  * Gets a list of the mounts on the system.
19391  * The returned list should be freed with g_list_free(), after
19392  * its elements have been unreffed with g_object_unref().
19393  *
19394  * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
19395  */
19396
19397
19398 /**
19399  * g_dbus_proxy_get_connection:
19400  * @proxy: A #GDBusProxy.
19401  *
19402  * Gets the connection @proxy is for.
19403  *
19404  * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
19405  * Since: 2.26
19406  */
19407
19408
19409 /**
19410  * g_win32_input_stream_get_close_handle:
19411  * @stream: a #GWin32InputStream
19412  *
19413  * Returns whether the handle of @stream will be
19414  * closed when the stream is closed.
19415  *
19416  * Returns: %TRUE if the handle is closed when done
19417  * Since: 2.26
19418  */
19419
19420
19421 /**
19422  * g_periodic_block:
19423  * @periodic: a #GPeriodic clock
19424  *
19425  * Temporarily blocks @periodic from running in order to bring it in
19426  * synch with an external time source.
19427  * This function must be called from a handler of the "repair" signal.
19428  * If this function is called, emission of the tick signal will be
19429  * suspended until g_periodic_unblock() is called an equal number of
19430  * times.  Once that happens, the "tick" signal will run immediately and
19431  * future "tick" signals will be emitted relative to the time at which
19432  * the last call to g_periodic_unblock() occured.
19433  *
19434  * Since: 2.28
19435  */
19436
19437
19438 /**
19439  * g_unix_mount_is_system_internal:
19440  * @mount_entry: a #GUnixMount.
19441  *
19442  * Checks if a unix mount is a system path.
19443  *
19444  * Returns: %TRUE if the unix mount is for a system path.
19445  */
19446
19447
19448 /**
19449  * g_settings_list_keys:
19450  * @settings: a #GSettings object
19451  * @returns: (transfer full) (element-type utf8): a list of the keys on @settings
19452  *
19453  * Introspects the list of keys on @settings.
19454  * You should probably not be calling this function from "normal" code
19455  * (since you should already know what keys are in your schema).  This
19456  * function is intended for introspection reasons.
19457  * You should free the return value with g_strfreev() when you are done
19458  * with it.
19459  */
19460
19461
19462 /**
19463  * g_file_info_get_content_type:
19464  * @info: a #GFileInfo.
19465  *
19466  * Gets the file's content type.
19467  *
19468  * Returns: a string containing the file's content type.
19469  */
19470
19471
19472 /**
19473  * g_socket_address_enumerator_next_finish:
19474  * @enumerator: a #GSocketAddressEnumerator
19475  * @result: a #GAsyncResult
19476  * @error: a #GError
19477  *
19478  * Retrieves the result of a completed call to
19479  * g_socket_address_enumerator_next_async(). See
19480  * g_socket_address_enumerator_next() for more information about
19481  * error handling.
19482  * error (in which case *@error will be set) or if there are no
19483  * more addresses.
19484  *
19485  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
19486  */
19487
19488
19489 /**
19490  * g_unix_socket_address_new_abstract:
19491  * @path: the abstract name
19492  * @path_len: the length of @path, or -1
19493  *
19494  * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
19495  * #GUnixSocketAddress for @path.
19496  *
19497  * Returns: a new #GUnixSocketAddress
19498  * Deprecated: Use g_unix_socket_address_new_with_type().
19499  */
19500
19501
19502 /**
19503  * g_file_get_child:
19504  * @file: input #GFile.
19505  * @name: string containing the child's basename.
19506  *
19507  * Gets a child of @file with basename equal to @name.
19508  * Note that the file with that specific name might not exist, but
19509  * you can still have a #GFile that points to it. You can use this
19510  * for instance to create that file.
19511  * This call does no blocking i/o.
19512  * Free the returned object with g_object_unref().
19513  *
19514  * Returns: (transfer full): a #GFile to a child specified by @name.
19515  */
19516
19517
19518 /**
19519  * g_settings_set:
19520  * @settings: a #GSettings object
19521  * @key: the name of the key to set
19522  * @format: a #GVariant format string
19523  * @...: arguments as per @format
19524  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
19525  *
19526  * Sets @key in @settings to @value.
19527  * A convenience function that combines g_settings_set_value() with
19528  * g_variant_new().
19529  * It is a programmer error to give a @key that isn't contained in the
19530  * schema for @settings or for the #GVariantType of @format to mismatch
19531  * the type given in the schema.
19532  *
19533  * Since: 2.26
19534  */
19535
19536
19537 /**
19538  * g_application_set_action_group:
19539  * @application: a #GApplication
19540  * @action_group: a #GActionGroup, or %NULL
19541  *
19542  * Sets or unsets the group of actions associated with the application.
19543  * These actions are the actions that can be remotely invoked.
19544  * It is an error to call this function after the application has been
19545  * registered.
19546  *
19547  * Since: 2.28
19548  */
19549
19550
19551 /**
19552  * g_volume_mount_finish:
19553  * @volume: a #GVolume
19554  * @result: a #GAsyncResult
19555  * @error: a #GError location to store an error, or %NULL to ignore
19556  *
19557  * Finishes mounting a volume. If any errors occured during the operation,
19558  * If the mount operation succeeded, g_volume_get_mount() on @volume
19559  * is guaranteed to return the mount right after calling this
19560  * function; there's no need to listen for the 'mount-added' signal on
19561  * #GVolumeMonitor.
19562  *
19563  * Returns: %TRUE, %FALSE if operation failed.
19564  */
19565
19566
19567 /**
19568  * g_file_find_enclosing_mount:
19569  * @file: input #GFile.
19570  * @cancellable: optional #GCancellable object, %NULL to ignore.
19571  * @error: a #GError.
19572  *
19573  * Gets a #GMount for the #GFile.
19574  * If the #GFileIface for @file does not have a mount (e.g. possibly a
19575  * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
19576  * will be returned.
19577  * If @cancellable is not %NULL, then the operation can be cancelled by
19578  * triggering the cancellable object from another thread. If the operation
19579  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19580  * Free the returned object with g_object_unref().
19581  *
19582  * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
19583  */
19584
19585
19586 /**
19587  * g_settings_set_double:
19588  * @settings: a #GSettings object
19589  * @key: the name of the key to set
19590  * @value: the value to set it to
19591  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
19592  *
19593  * Sets @key in @settings to @value.
19594  * A convenience variant of g_settings_set() for doubles.
19595  * It is a programmer error to give a @key that isn't specified as
19596  * having a 'double' type in the schema for @settings.
19597  *
19598  * Since: 2.26
19599  */
19600
19601
19602 /**
19603  * GThemedIcon:name:
19604  *
19605  * The icon name.
19606  */
19607
19608
19609 /**
19610  * g_data_output_stream_set_byte_order:
19611  * @stream: a #GDataOutputStream.
19612  * @order: a %GDataStreamByteOrder.
19613  *
19614  * Sets the byte order of the data output stream to @order.
19615  */
19616
19617
19618 /**
19619  * g_inet_address_to_string:
19620  * @address: a #GInetAddress
19621  *
19622  * Converts @address to string form.
19623  * freed after use.
19624  *
19625  * Returns: a representation of @address as a string, which should be
19626  * Since: 2.22
19627  */
19628
19629
19630 /**
19631  * g_settings_set_strv:
19632  * @settings: a #GSettings object
19633  * @key: the name of the key to set
19634  * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
19635  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
19636  *
19637  * Sets @key in @settings to @value.
19638  * A convenience variant of g_settings_set() for string arrays.  If
19639  * It is a programmer error to give a @key that isn't specified as
19640  * having an array of strings type in the schema for @settings.
19641  *
19642  * Since: 2.26
19643  */
19644
19645
19646 /**
19647  * g_dbus_method_invocation_return_error_valist:
19648  * @invocation: A #GDBusMethodInvocation.
19649  * @domain: A #GQuark for the #GError error domain.
19650  * @code: The error code.
19651  * @format: printf()-style format.
19652  * @var_args: #va_list of parameters for @format.
19653  *
19654  * Like g_dbus_method_invocation_return_error() but intended for
19655  * language bindings.
19656  * This method will free @invocation, you cannot use it afterwards.
19657  *
19658  * Since: 2.26
19659  */
19660
19661
19662 /**
19663  * g_action_group_action_state_changed:
19664  * @action_group: a #GActionGroup
19665  * @action_name: the name of an action in the group
19666  * @state: the new state of the named action
19667  *
19668  * Emits the #GActionGroup::action-state-changed signal on @action_group.
19669  * This function should only be called by #GActionGroup implementations.
19670  *
19671  * Since: 2.28
19672  */
19673
19674
19675 /**
19676  * SECTION:gfileoutputstrea:
19677  * @short_description: File output streaming operations
19678  * @include: gio/gio.h
19679  * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
19680  *
19681  * GFileOutputStream provides output streams that write their
19682  * content to a file.
19683  * GFileOutputStream implements #GSeekable, which allows the output
19684  * stream to jump to arbitrary positions in the file and to truncate
19685  * the file, provided the filesystem of the file supports these
19686  * operations.
19687  * To find the position of a file output stream, use g_seekable_tell().
19688  * To find out if a file output stream supports seeking, use
19689  * g_seekable_can_seek().To position a file output stream, use
19690  * g_seekable_seek(). To find out if a file output stream supports
19691  * truncating, use g_seekable_can_truncate(). To truncate a file output
19692  * stream, use g_seekable_truncate().
19693  */
19694
19695
19696 /**
19697  * g_file_output_stream_query_info_finish:
19698  * @stream: a #GFileOutputStream.
19699  * @result: a #GAsyncResult.
19700  * @error: a #GError, %NULL to ignore.
19701  *
19702  * Finalizes the asynchronous query started
19703  * by g_file_output_stream_query_info_async().
19704  *
19705  * Returns: (transfer full): A #GFileInfo for the finished query.
19706  */
19707
19708
19709 /**
19710  * g_simple_action_group_insert:
19711  * @simple: a #GSimpleActionGroup
19712  * @action: a #GAction
19713  *
19714  * Adds an action to the action group.
19715  * If the action group already contains an action with the same name as
19716  * The action group takes its own reference on @action.
19717  *
19718  * Since: 2.28
19719  */
19720
19721
19722 /**
19723  * GUnixOutputStream:fd:
19724  *
19725  * The file descriptor that the stream writes to.
19726  *
19727  * Since: 2.20
19728  */
19729
19730
19731 /**
19732  * GDBusAuthObserverClass:
19733  * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
19734  *
19735  * Class structure for #GDBusAuthObserverClass.
19736  *
19737  * Since: 2.26
19738  */
19739
19740
19741 /**
19742  * g_application_command_line_printerr:
19743  * @cmdline: a #GApplicationCommandLine
19744  * @format: a printf-style format string
19745  * @...: arguments, as per @format
19746  *
19747  * Formats a message and prints it using the stderr print handler in the
19748  * invoking process.
19749  * If @cmdline is a local invocation then this is exactly equivalent to
19750  * g_printerr().  If @cmdline is remote then this is equivalent to
19751  * calling g_printerr() in the invoking process.
19752  *
19753  * Since: 2.28
19754  */
19755
19756
19757 /**
19758  * g_data_input_stream_read_int32:
19759  * @stream: a given #GDataInputStream.
19760  * @cancellable: optional #GCancellable object, %NULL to ignore.
19761  * @error: #GError for error reporting.
19762  *
19763  * Reads a signed 32-bit/4-byte value from @stream.
19764  * In order to get the correct byte order for this read operation,
19765  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19766  * If @cancellable is not %NULL, then the operation can be cancelled by
19767  * triggering the cancellable object from another thread. If the operation
19768  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19769  * an error occurred.
19770  *
19771  * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
19772  */
19773
19774
19775 /**
19776  * SECTION:gioschedule:
19777  * @short_description: I/O Scheduler
19778  * @include: gio/gio.h
19779  *
19780  * Schedules asynchronous I/O operations. #GIOScheduler integrates
19781  * into the main event loop (#GMainLoop) and may use threads if they
19782  * are available.
19783  * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
19784  * Each I/O operation has a priority, and the scheduler uses the priorities
19785  * to determine the order in which operations are executed. They are
19786  * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
19787  * Priorities are integers, with lower numbers indicating higher priority.
19788  * It is recommended to choose priorities between %G_PRIORITY_LOW and
19789  * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
19790  * </para>
19791  */
19792
19793
19794 /**
19795  * SECTION:gsocketconnectio:
19796  * @short_description: A socket connection
19797  * @include: gio/gio.h
19798  * @see_also: #GIOStream, #GSocketClient, #GSocketListener
19799  *
19800  * #GSocketConnection is a #GIOStream for a connected socket. They
19801  * can be created either by #GSocketClient when connecting to a host,
19802  * or by #GSocketListener when accepting a new client.
19803  * The type of the #GSocketConnection object returned from these calls
19804  * depends on the type of the underlying socket that is in use. For
19805  * instance, for a TCP/IP connection it will be a #GTcpConnection.
19806  * Chosing what type of object to construct is done with the socket
19807  * connection factory, and it is possible for 3rd parties to register
19808  * custom socket connection types for specific combination of socket
19809  * family/type/protocol using g_socket_connection_factory_register_type().
19810  *
19811  * Since: 2.22
19812  */
19813
19814
19815 /**
19816  * g_file_monitor_directory:
19817  * @file: input #GFile.
19818  * @flags: a set of #GFileMonitorFlags.
19819  * @cancellable: optional #GCancellable object, %NULL to ignore.
19820  * @error: a #GError, or %NULL.
19821  *
19822  * Obtains a directory monitor for the given file.
19823  * This may fail if directory monitoring is not supported.
19824  * If @cancellable is not %NULL, then the operation can be cancelled by
19825  * triggering the cancellable object from another thread. If the operation
19826  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19827  * Free the returned object with g_object_unref().
19828  *
19829  * Virtual: monitor_dir
19830  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
19831  */
19832
19833
19834 /**
19835  * GCharsetConverter:
19836  *
19837  * Conversions between character sets.
19838  */
19839
19840
19841 /**
19842  * g_settings_new_with_backend:
19843  * @schema: the name of the schema
19844  * @backend: the #GSettingsBackend to use
19845  * @returns: a new #GSettings object
19846  *
19847  * Creates a new #GSettings object with a given schema and backend.
19848  * Creating settings objects with an different backend allows accessing settings
19849  * from a database other than the usual one.  For example, it may make
19850  * sense to pass a backend corresponding to the "defaults" settings database on
19851  * the system to get a settings object that modifies the system default
19852  * settings instead of the settings for this user.
19853  *
19854  * Since: 2.26
19855  */
19856
19857
19858 /**
19859  * g_file_dup:
19860  * @file: input #GFile.
19861  *
19862  * Duplicates a #GFile handle. This operation does not duplicate
19863  * the actual file or directory represented by the #GFile; see
19864  * g_file_copy() if attempting to copy a file.
19865  * This call does no blocking i/o.
19866  *
19867  * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
19868  */
19869
19870
19871 /**
19872  * g_unix_mount_is_readonly:
19873  * @mount_entry: a #GUnixMount.
19874  *
19875  * Checks if a unix mount is mounted read only.
19876  *
19877  * Returns: %TRUE if @mount_entry is read only.
19878  */
19879
19880
19881 /**
19882  * g_dbus_method_invocation_return_error:
19883  * @invocation: A #GDBusMethodInvocation.
19884  * @domain: A #GQuark for the #GError error domain.
19885  * @code: The error code.
19886  * @format: printf()-style format.
19887  * @...: Parameters for @format.
19888  *
19889  * Finishes handling a D-Bus method call by returning an error.
19890  * See g_dbus_error_encode_gerror() for details about what error name
19891  * will be returned on the wire. In a nutshell, if the given error is
19892  * registered using g_dbus_error_register_error() the name given
19893  * during registration is used. Otherwise, a name of the form
19894  * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
19895  * used. This provides transparent mapping of #GError between
19896  * applications using GDBus.
19897  * If you are writing an application intended to be portable,
19898  * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
19899  * or use g_dbus_method_invocation_return_dbus_error().
19900  * This method will free @invocation, you cannot use it afterwards.
19901  *
19902  * Since: 2.26
19903  */
19904
19905
19906 /**
19907  * GSimpleAction:state:
19908  *
19909  * The state of the action, or %NULL if the action is stateless.
19910  *
19911  * Since: 2.28
19912  */
19913
19914
19915 /**
19916  * g_mount_eject_with_operation:
19917  * @mount: a #GMount.
19918  * @flags: flags affecting the unmount if required for eject
19919  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
19920  * @cancellable: optional #GCancellable object, %NULL to ignore.
19921  * @callback: a #GAsyncReadyCallback, or %NULL.
19922  * @user_data: user data passed to @callback.
19923  *
19924  * Ejects a mount. This is an asynchronous operation, and is
19925  * finished by calling g_mount_eject_with_operation_finish() with the @mount
19926  * and #GAsyncResult data returned in the @callback.
19927  *
19928  * Since: 2.22
19929  */
19930
19931
19932 /**
19933  * g_simple_action_set_enabled:
19934  * @simple: a #GSimpleAction
19935  * @enabled: whether the action is enabled
19936  *
19937  * Sets the action as enabled or not.
19938  * An action must be enabled in order to be activated or in order to
19939  * have its state changed from outside callers.
19940  *
19941  * Since: 2.28
19942  */
19943
19944
19945 /**
19946  * GDBusConnection::closed:
19947  * @connection: The #GDBusConnection emitting the signal.
19948  * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
19949  * @error: A #GError with more details about the event or %NULL.
19950  *
19951  * Emitted when the connection is closed.
19952  * The cause of this event can be
19953  * <itemizedlist>
19954  * <listitem><para>
19955  * If g_dbus_connection_close() is called. In this case
19956  * </para></listitem>
19957  * <listitem><para>
19958  * If the remote peer closes the connection. In this case
19959  * </para></listitem>
19960  * <listitem><para>
19961  * If the remote peer sends invalid or malformed data. In this
19962  * case @remote_peer_vanished is set to %FALSE and @error
19963  * is set.
19964  * </para></listitem>
19965  * </itemizedlist>
19966  * Upon receiving this signal, you should give up your reference to
19967  * once.
19968  *
19969  * Since: 2.26
19970  */
19971
19972
19973 /**
19974  * g_inet_socket_address_get_address:
19975  * @address: a #GInetSocketAddress
19976  *
19977  * Gets @address's #GInetAddress.
19978  * g_object_ref()'d if it will be stored
19979  *
19980  * Returns: (transfer full): the #GInetAddress for @address, which must be
19981  * Since: 2.22
19982  */
19983
19984
19985 /**
19986  * SECTION:gcredential:
19987  * @short_description: An object containing credentials
19988  * @include: gio/gio.h
19989  *
19990  * The #GCredentials type is a reference-counted wrapper for native
19991  * credentials. This information is typically used for identifying,
19992  * authenticating and authorizing other processes.
19993  * Some operating systems supports looking up the credentials of the
19994  * remote peer of a communication endpoint - see e.g.
19995  * g_socket_get_credentials().
19996  * Some operating systems supports securely sending and receiving
19997  * credentials over a Unix Domain Socket, see
19998  * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
19999  * g_unix_connection_receive_credentials() for details.
20000  * On Linux, the native credential type is a <type>struct ucred</type>
20001  * - see the
20002  * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
20003  * man page for details. This corresponds to
20004  * %G_CREDENTIALS_TYPE_LINUX_UCRED.
20005  * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
20006  * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
20007  */
20008
20009
20010 /**
20011  * GWin32OutputStream:close-handle:
20012  *
20013  * Whether to close the file handle when the stream is closed.
20014  *
20015  * Since: 2.26
20016  */
20017
20018
20019 /**
20020  * g_file_open_readwrite:
20021  * @file: #GFile to open
20022  * @cancellable: a #GCancellable
20023  * @error: a #GError, or %NULL
20024  *
20025  * Opens an existing file for reading and writing. The result is
20026  * a #GFileIOStream that can be used to read and write the contents of the file.
20027  * If @cancellable is not %NULL, then the operation can be cancelled by
20028  * triggering the cancellable object from another thread. If the operation
20029  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20030  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
20031  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
20032  * Other errors are possible too, and depend on what kind of filesystem the file is on.
20033  * Note that in many non-local file cases read and write streams are not supported,
20034  * so make sure you really need to do read and write streaming, rather than
20035  * just opening for reading or writing.
20036  * Free the returned object with g_object_unref().
20037  *
20038  * Returns: (transfer full): #GFileIOStream or %NULL on error.
20039  * Since: 2.22
20040  */
20041
20042
20043 /**
20044  * GVolumeMonitor::volume-removed:
20045  * @volume_monitor: The volume monitor emitting the signal.
20046  * @volume: a #GVolume that was removed.
20047  *
20048  * Emitted when a mountable volume is removed from the system.
20049  */
20050
20051
20052 /**
20053  * g_dbus_error_encode_gerror:
20054  * @error: A #GError.
20055  *
20056  * Creates a D-Bus error name to use for @error. If @error matches
20057  * a registered error (cf. g_dbus_error_register_error()), the corresponding
20058  * D-Bus error name will be returned.
20059  * Otherwise the a name of the form
20060  * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
20061  * will be used. This allows other GDBus applications to map the error
20062  * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
20063  * This function is typically only used in object mappings to put a
20064  * #GError on the wire. Regular applications should not use it.
20065  *
20066  * Returns: A D-Bus error name (never %NULL). Free with g_free().
20067  * Since: 2.26
20068  */
20069
20070
20071 /**
20072  * g_file_set_attribute_int32:
20073  * @file: input #GFile.
20074  * @attribute: a string containing the attribute's name.
20075  * @value: a #gint32 containing the attribute's new value.
20076  * @flags: a #GFileQueryInfoFlags.
20077  * @cancellable: optional #GCancellable object, %NULL to ignore.
20078  * @error: a #GError, or %NULL
20079  *
20080  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
20081  * If @attribute is of a different type, this operation will fail.
20082  * If @cancellable is not %NULL, then the operation can be cancelled by
20083  * triggering the cancellable object from another thread. If the operation
20084  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20085  * in the @file, %FALSE otherwise.
20086  *
20087  * Returns: %TRUE if the @attribute was successfully set to @value
20088  */
20089
20090
20091 /**
20092  * GDBusServer:guid:
20093  *
20094  * The guid of the server.
20095  *
20096  * Since: 2.26
20097  */
20098
20099
20100 /**
20101  * SECTION:gdesktopappinf:
20102  * @short_description: Application information from desktop files
20103  * @include: gio/gdesktopappinfo.h
20104  *
20105  * #GDesktopAppInfo is an implementation of #GAppInfo based on
20106  * desktop files.
20107  * Note that <filename>&lt;gio/gdesktopappinfo.h&gt;</filename> belongs to
20108  * the UNIX-specific GIO interfaces, thus you have to use the
20109  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
20110  */
20111
20112
20113 /**
20114  * g_unix_socket_address_new_with_type:
20115  * @path: the name
20116  * @path_len: the length of @path, or -1
20117  * @type: a #GUnixSocketAddressType
20118  *
20119  * Creates a new #GUnixSocketAddress of type @type with name @path.
20120  * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
20121  * calling g_unix_socket_address_new().
20122  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
20123  * bytes of @path will be copied to the socket's path, and only those
20124  * bytes will be considered part of the name. (If @path_len is -1,
20125  * then @path is assumed to be NUL-terminated.) For example, if @path
20126  * was "test", then calling g_socket_address_get_native_size() on the
20127  * returned socket would return 7 (2 bytes of overhead, 1 byte for the
20128  * abstract-socket indicator byte, and 4 bytes for the name "test").
20129  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
20130  * rest of the path will be padded with 0 bytes, and the entire
20131  * zero-padded buffer will be considered the name. (As above, if
20132  * this case, g_socket_address_get_native_size() will always return
20133  * the full size of a <literal>struct sockaddr_un</literal>, although
20134  * g_unix_socket_address_get_path_len() will still return just the
20135  * length of @path.
20136  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
20137  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
20138  * when connecting to a server created by another process, you must
20139  * use the appropriate type corresponding to how that process created
20140  * its listening socket.
20141  *
20142  * Returns: a new #GUnixSocketAddress
20143  * Since: 2.26
20144  */
20145
20146
20147 /**
20148  * g_application_command_line_get_arguments:
20149  * @cmdline: a #GApplicationCommandLine
20150  * @argc: the length of the arguments array, or %NULL
20151  *
20152  * Gets the list of arguments that was passed on the command line.
20153  * The strings in the array may contain non-utf8 data.
20154  * The return value is %NULL-terminated and should be freed using
20155  * g_strfreev().
20156  *
20157  * Returns: the string array containing the arguments (the argv)
20158  * Since: 2.28
20159  */
20160
20161
20162 /**
20163  * g_io_stream_get_input_stream:
20164  * @stream: a #GIOStream
20165  *
20166  * Gets the input stream for this object. This is used
20167  * for reading.
20168  * Do not free.
20169  *
20170  * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
20171  * Since: 2.22
20172  */
20173
20174
20175 /**
20176  * GDBusServer:address:
20177  *
20178  * The D-Bus address to listen on.
20179  *
20180  * Since: 2.26
20181  */
20182
20183
20184 /**
20185  * g_unix_socket_address_get_path_len:
20186  * @address: a #GInetSocketAddress
20187  *
20188  * Gets the length of @address's path.
20189  * For details, see g_unix_socket_address_get_path().
20190  *
20191  * Returns: the length of the path
20192  * Since: 2.22
20193  */
20194
20195
20196 /**
20197  * SECTION:gfileico:
20198  * @short_description: Icons pointing to an image file
20199  * @include: gio/gio.h
20200  * @see_also: #GIcon, #GLoadableIcon
20201  *
20202  * #GFileIcon specifies an icon by pointing to an image file
20203  * to be used as icon.
20204  */
20205
20206
20207 /**
20208  * g_socket_listener_close:
20209  * @listener: a #GSocketListener
20210  *
20211  * Closes all the sockets in the listener.
20212  *
20213  * Since: 2.22
20214  */
20215
20216
20217 /**
20218  * g_data_input_stream_read_line:
20219  * @stream: a given #GDataInputStream.
20220  * @length: a #gsize to get the length of the data read in.
20221  * @cancellable: optional #GCancellable object, %NULL to ignore.
20222  * @error: #GError for error reporting.
20223  *
20224  * Reads a line from the data input stream.
20225  * If @cancellable is not %NULL, then the operation can be cancelled by
20226  * triggering the cancellable object from another thread. If the operation
20227  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20228  * Set @length to a #gsize to get the length of the read line.
20229  * On an error, it will return %NULL and @error will be set. If there's no
20230  * content to read, it will still return %NULL, but @error won't be set.
20231  *
20232  * Returns: a string with the line that was read in (without the newlines).
20233  */
20234
20235
20236 /**
20237  * SECTION:gvolumemonito:
20238  * @short_description: Volume Monitor
20239  * @include: gio/gio.h
20240  * @see_also: #GFileMonitor
20241  *
20242  * #GVolumeMonitor is for listing the user interesting devices and volumes
20243  * on the computer. In other words, what a file selector or file manager
20244  * would show in a sidebar.
20245  * #GVolumeMonitor is not <link
20246  * linkend="g-main-context-push-thread-default">thread-default-context
20247  * aware</link>, and so should not be used other than from the main
20248  * thread, with no thread-default-context active.
20249  */
20250
20251
20252 /**
20253  * g_dbus_connection_is_closed:
20254  * @connection: A #GDBusConnection.
20255  *
20256  * Gets whether @connection is closed.
20257  *
20258  * Returns: %TRUE if the connection is closed, %FALSE otherwise.
20259  * Since: 2.26
20260  */
20261
20262
20263 /**
20264  * GCancellable::cancelled:
20265  * @cancellable: a #GCancellable.
20266  *
20267  * Emitted when the operation has been cancelled.
20268  * Can be used by implementations of cancellable operations. If the
20269  * operation is cancelled from another thread, the signal will be
20270  * emitted in the thread that cancelled the operation, not the
20271  * thread that is running the operation.
20272  * Note that disconnecting from this signal (or any signal) in a
20273  * multi-threaded program is prone to race conditions. For instance
20274  * it is possible that a signal handler may be invoked even
20275  * <emphasis>after</emphasis> a call to
20276  * g_signal_handler_disconnect() for that handler has already
20277  * returned.
20278  * There is also a problem when cancellation happen
20279  * right before connecting to the signal. If this happens the
20280  * signal will unexpectedly not be emitted, and checking before
20281  * connecting to the signal leaves a race condition where this is
20282  * still happening.
20283  * In order to make it safe and easy to connect handlers there
20284  * g_cancellable_disconnect() which protect against problems
20285  * like this.
20286  * An example of how to us this:
20287  * |[
20288  * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
20289  * if (g_cancellable_set_error_if_cancelled (cancellable))
20290  * return;
20291  * /<!-- -->* Set up all the data needed to be able to
20292  * * handle cancellation of the operation *<!-- -->/
20293  * my_data = my_data_new (...);
20294  * id = 0;
20295  * if (cancellable)
20296  * id = g_cancellable_connect (cancellable,
20297  * G_CALLBACK (cancelled_handler)
20298  * data, NULL);
20299  * /<!-- -->* cancellable operation here... *<!-- -->/
20300  * g_cancellable_disconnect (cancellable, id);
20301  * /<!-- -->* cancelled_handler is never called after this, it
20302  * * is now safe to free the data *<!-- -->/
20303  * my_data_free (my_data);
20304  * ]|
20305  * Note that the cancelled signal is emitted in the thread that
20306  * the user cancelled from, which may be the main thread. So, the
20307  * cancellable signal should not do something that can block.
20308  *
20309  * Are two helper functions: g_cancellable_connect() and
20310  */
20311
20312
20313 /**
20314  * g_file_attribute_info_list_dup:
20315  * @list: a #GFileAttributeInfoList to duplicate.
20316  *
20317  * Makes a duplicate of a file attribute info list.
20318  *
20319  * Returns: a copy of the given @list.
20320  */
20321
20322
20323 /**
20324  * g_app_info_get_commandline:
20325  * @appinfo: a #GAppInfo
20326  *
20327  * Gets the commandline with which the application will be
20328  * started.
20329  * or %NULL if this information is not available
20330  *
20331  * Returns: a string containing the @appinfo's commandline,
20332  * Since: 2.20
20333  */
20334
20335
20336 /**
20337  * g_dbus_interface_info_unref:
20338  * @info: A #GDBusInterfaceInfo.
20339  *
20340  * If @info is statically allocated, does nothing. Otherwise decreases
20341  * the reference count of @info. When its reference count drops to 0,
20342  * the memory used is freed.
20343  *
20344  * Since: 2.26
20345  */
20346
20347
20348 /**
20349  * g_charset_converter_get_num_fallbacks:
20350  * @converter: a #GCharsetConverter
20351  *
20352  * Gets the number of fallbacks that @converter has applied so far.
20353  *
20354  * Returns: the number of fallbacks that @converter has applied
20355  * Since: 2.24
20356  */
20357
20358
20359 /**
20360  * g_file_enumerator_is_closed:
20361  * @enumerator: a #GFileEnumerator.
20362  *
20363  * Checks if the file enumerator has been closed.
20364  *
20365  * Returns: %TRUE if the @enumerator is closed.
20366  */
20367
20368
20369 /**
20370  * g_emblem_new:
20371  * @icon: a GIcon containing the icon.
20372  *
20373  * Creates a new emblem for @icon.
20374  *
20375  * Returns: a new #GEmblem.
20376  * Since: 2.18
20377  */
20378
20379
20380 /**
20381  * g_file_has_uri_scheme:
20382  * @file: input #GFile.
20383  * @uri_scheme: a string containing a URI scheme.
20384  *
20385  * Checks to see if a #GFile has a given URI scheme.
20386  * This call does no blocking i/o.
20387  * given URI scheme, %FALSE if URI scheme is %NULL,
20388  * not supported, or #GFile is invalid.
20389  *
20390  * Returns: %TRUE if #GFile's backend supports the
20391  */
20392
20393
20394 /**
20395  * g_simple_async_result_new_take_error:
20396  * @source_object: (allow-none): a #GObject, or %NULL
20397  * @callback: a #GAsyncReadyCallback
20398  * @user_data: (allow-none): user data passed to @callback
20399  * @error: a #GError
20400  *
20401  * Creates a #GSimpleAsyncResult from an error condition, and takes over the
20402  * caller's ownership of @error, so the caller does not need to free it anymore.
20403  *
20404  * Returns: a #GSimpleAsyncResult
20405  * Since: 2.28
20406  */
20407
20408
20409 /**
20410  * SECTION:gsimpleactiongrou:
20411  * @title: GSimpleActionGroup
20412  * @short_description: a simple GActionGroup implementation
20413  *
20414  * #GSimpleActionGroup is a hash table filled with #GAction objects,
20415  * implementing the #GActionGroup interface.
20416  */
20417
20418
20419 /**
20420  * GPermission:can-release:
20421  *
20422  * %TRUE if it is generally possible to release the permission by calling
20423  * g_permission_release().
20424  */
20425
20426
20427 /**
20428  * SECTION:gwin32inputstrea:
20429  * @short_description: Streaming input operations for Windows file handles
20430  * @include: gio/gwin32inputstream.h
20431  * @see_also: #GInputStream
20432  *
20433  * #GWin32InputStream implements #GInputStream for reading from a
20434  * Windows file handle.
20435  * Note that <filename>&lt;gio/gwin32inputstream.h&gt;</filename> belongs
20436  * to the Windows-specific GIO interfaces, thus you have to use the
20437  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
20438  */
20439
20440
20441 /**
20442  * g_bus_watch_name_on_connection_with_closures:
20443  * @connection: A #GDBusConnection.
20444  * @name: The name (well-known or unique) to watch.
20445  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
20446  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
20447  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
20448  *
20449  * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
20450  * easier binding in other languages.
20451  * g_bus_unwatch_name() to stop watching the name.
20452  *
20453  * Returns: An identifier (never 0) that an be used with
20454  * Rename to: g_bus_watch_name_on_connection
20455  * Since: 2.26
20456  */
20457
20458
20459 /**
20460  * g_file_mount_enclosing_volume:
20461  * @location: input #GFile.
20462  * @flags: flags affecting the operation
20463  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
20464  * @cancellable: optional #GCancellable object, %NULL to ignore.
20465  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
20466  * @user_data: the data to pass to callback function
20467  *
20468  * Starts a @mount_operation, mounting the volume that contains the file @location.
20469  * When this operation has completed, @callback will be called with
20470  * g_file_mount_enclosing_volume_finish().
20471  * If @cancellable is not %NULL, then the operation can be cancelled by
20472  * triggering the cancellable object from another thread. If the operation
20473  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20474  */
20475
20476
20477 /**
20478  * GVolumeMonitor::mount-added:
20479  * @volume_monitor: The volume monitor emitting the signal.
20480  * @mount: a #GMount that was added.
20481  *
20482  * Emitted when a mount is added.
20483  */
20484
20485
20486 /**
20487  * g_settings_get_flags:
20488  * @settings: a #GSettings object
20489  * @key: the key to get the value for
20490  * @returns: the flags value
20491  *
20492  * Gets the value that is stored in @settings for @key and converts it
20493  * to the flags value that it represents.
20494  * In order to use this function the type of the value must be an array
20495  * of strings and it must be marked in the schema file as an flags type.
20496  * It is a programmer error to give a @key that isn't contained in the
20497  * schema for @settings or is not marked as a flags type.
20498  * If the value stored in the configuration database is not a valid
20499  * value for the flags type then this function will return the default
20500  * value.
20501  *
20502  * Since: 2.26
20503  */
20504
20505
20506 /**
20507  * g_file_info_get_attribute_stringv:
20508  * @info: a #GFileInfo.
20509  * @attribute: a file attribute key.
20510  *
20511  * Gets the value of a stringv attribute. If the attribute does
20512  * not contain a stringv, %NULL will be returned.
20513  * %NULL otherwise. Do not free.
20514  *
20515  * Returns: (transfer none): the contents of the @attribute value as a stringv, or
20516  * Since: 2.22
20517  */
20518
20519
20520 /**
20521  * g_file_attribute_matcher_unref:
20522  * @matcher: a #GFileAttributeMatcher.
20523  *
20524  * Unreferences @matcher. If the reference count falls below 1,
20525  * the @matcher is automatically freed.
20526  */
20527
20528
20529 /**
20530  * g_proxy_address_new:
20531  * @inetaddr: The proxy server #GInetAddress.
20532  * @port: The proxy server port.
20533  * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
20534  * @dest_hostname: The destination hostname the the proxy should tunnel to.
20535  * @dest_port: The destination port to tunnel to.
20536  * @username: The username to authenticate to the proxy server (or %NULL).
20537  * @password: The password to authenticate to the proxy server (or %NULL).
20538  *
20539  * Creates a new #GProxyAddress for @inetaddr with @protocol that should
20540  * tunnel through @dest_hostname and @dest_port.
20541  *
20542  * Returns: a new #GProxyAddress
20543  * Since: 2.26
20544  */
20545
20546
20547 /**
20548  * g_file_monitor_emit_event:
20549  * @monitor: a #GFileMonitor.
20550  * @child: a #GFile.
20551  * @other_file: a #GFile.
20552  * @event_type: a set of #GFileMonitorEvent flags.
20553  *
20554  * Emits the #GFileMonitor::changed signal if a change
20555  * has taken place. Should be called from file monitor
20556  * implementations only.
20557  * The signal will be emitted from an idle handler (in the <link
20558  * linkend="g-main-context-push-thread-default">thread-default main
20559  * context</link>).
20560  */
20561
20562
20563 /**
20564  * g_charset_converter_set_use_fallback:
20565  * @converter: a #GCharsetConverter
20566  * @use_fallback: %TRUE to use fallbacks
20567  *
20568  * Sets the #GCharsetConverter:use-fallback property.
20569  *
20570  * Since: 2.24
20571  */
20572
20573
20574 /**
20575  * g_socket_receive_with_blocking:
20576  * @socket: a #GSocket
20577  * @buffer: a buffer to read data into (which should be at least @size bytes long).
20578  * @size: the number of bytes you want to read from the socket
20579  * @blocking: whether to do blocking or non-blocking I/O
20580  * @cancellable: a %GCancellable or %NULL
20581  * @error: #GError for error reporting, or %NULL to ignore.
20582  *
20583  * This behaves exactly the same as g_socket_receive(), except that
20584  * the choice of blocking or non-blocking behavior is determined by
20585  * the @blocking argument rather than by @socket's properties.
20586  *
20587  * Returns: Number of bytes read, or -1 on error
20588  * Since: 2.26
20589  */
20590
20591
20592 /**
20593  * g_win32_input_stream_set_close_handle:
20594  * @stream: a #GWin32InputStream
20595  * @close_handle: %TRUE to close the handle when done
20596  *
20597  * Sets whether the handle of @stream shall be closed
20598  * when the stream is closed.
20599  *
20600  * Since: 2.26
20601  */
20602
20603
20604 /**
20605  * g_mount_get_name:
20606  * @mount: a #GMount.
20607  *
20608  * Gets the name of @mount.
20609  * The returned string should be freed with g_free()
20610  * when no longer needed.
20611  *
20612  * Returns: the name for the given @mount.
20613  */
20614
20615
20616 /**
20617  * g_file_info_set_attribute_boolean:
20618  * @info: a #GFileInfo.
20619  * @attribute: a file attribute key.
20620  * @attr_value: a boolean value.
20621  *
20622  * Sets the @attribute to contain the given @attr_value,
20623  * if possible.
20624  */
20625
20626
20627 /**
20628  * g_mount_eject_with_operation_finish:
20629  * @mount: a #GMount.
20630  * @result: a #GAsyncResult.
20631  * @error: a #GError location to store the error occuring, or %NULL to ignore.
20632  *
20633  * Finishes ejecting a mount. If any errors occurred during the operation,
20634  *
20635  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
20636  * Since: 2.22
20637  */
20638
20639
20640 /**
20641  * SECTION:giomodul:
20642  * @short_description: Loadable GIO Modules
20643  * @include: gio/gio.h
20644  *
20645  * Provides an interface and default functions for loading and unloading
20646  * modules. This is used internally to make GIO extensible, but can also
20647  * be used by others to implement module loading.
20648  */
20649
20650
20651 /**
20652  * g_bus_get:
20653  * @bus_type: A #GBusType.
20654  * @cancellable: A #GCancellable or %NULL.
20655  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
20656  * @user_data: The data to pass to @callback.
20657  *
20658  * Asynchronously connects to the message bus specified by @bus_type.
20659  * When the operation is finished, @callback will be invoked. You can
20660  * then call g_bus_get_finish() to get the result of the operation.
20661  * This is a asynchronous failable function. See g_bus_get_sync() for
20662  * the synchronous version.
20663  *
20664  * Since: 2.26
20665  */
20666
20667
20668 /**
20669  * GInetAddress:is-mc-site-local:
20670  *
20671  * Whether this is a site-local multicast address.
20672  * See g_inet_address_get_is_mc_site_local().
20673  *
20674  * Since: 2.22
20675  */
20676
20677
20678 /**
20679  * g_dbus_method_invocation_get_sender:
20680  * @invocation: A #GDBusMethodInvocation.
20681  *
20682  * Gets the bus name that invoked the method.
20683  *
20684  * Returns: A string. Do not free, it is owned by @invocation.
20685  * Since: 2.26
20686  */
20687
20688
20689 /**
20690  * g_credentials_is_same_user:
20691  * @credentials: A #GCredentials.
20692  * @other_credentials: A #GCredentials.
20693  * @error: Return location for error or %NULL.
20694  *
20695  * Checks if @credentials and @other_credentials is the same user.
20696  * This operation can fail if #GCredentials is not supported on the
20697  * the OS.
20698  * user, %FALSE otherwise or if @error is set.
20699  *
20700  * Returns: %TRUE if @credentials and @other_credentials has the same
20701  * Since: 2.26
20702  */
20703
20704
20705 /**
20706  * g_data_output_stream_put_uint16:
20707  * @stream: a #GDataOutputStream.
20708  * @data: a #guint16.
20709  * @cancellable: optional #GCancellable object, %NULL to ignore.
20710  * @error: a #GError, %NULL to ignore.
20711  *
20712  * Puts an unsigned 16-bit integer into the output stream.
20713  *
20714  * Returns: %TRUE if @data was successfully added to the @stream.
20715  */
20716
20717
20718 /**
20719  * g_dbus_connection_send_message:
20720  * @connection: A #GDBusConnection.
20721  * @message: A #GDBusMessage
20722  * @flags: Flags affecting how the message is sent.
20723  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
20724  * @error: Return location for error or %NULL.
20725  *
20726  * Asynchronously sends @message to the peer represented by @connection.
20727  * Unless @flags contain the
20728  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
20729  * will be assigned by @connection and set on @message via
20730  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
20731  * serial number used will be written to this location prior to
20732  * submitting the message to the underlying transport.
20733  * If @connection is closed then the operation will fail with
20734  * %G_IO_ERROR_CLOSED. If @message is not well-formed,
20735  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
20736  * See <xref linkend="gdbus-server"/> and <xref
20737  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20738  * low-level API to send and receive UNIX file descriptors.
20739  * Note that @message must be unlocked, unless @flags contain the
20740  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
20741  * transmission, %FALSE if @error is set.
20742  *
20743  * Returns: %TRUE if the message was well-formed and queued for
20744  * Since: 2.26
20745  */
20746
20747
20748 /**
20749  * g_icon_equal:
20750  * @icon1: pointer to the first #GIcon.
20751  * @icon2: pointer to the second #GIcon.
20752  *
20753  * Checks if two icons are equal.
20754  *
20755  * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
20756  */
20757
20758
20759 /**
20760  * g_volume_should_automount:
20761  * @volume: a #GVolume
20762  *
20763  * Returns whether the volume should be automatically mounted.
20764  *
20765  * Returns: %TRUE if the volume should be automatically mounted.
20766  */
20767
20768
20769 /**
20770  * g_seekable_tell:
20771  * @seekable: a #GSeekable.
20772  *
20773  * Tells the current position within the stream.
20774  *
20775  * Returns: the offset from the beginning of the buffer.
20776  */
20777
20778
20779 /**
20780  * SECTION:gsimpleactio:
20781  * @title: GSimpleAction
20782  * @short_description: a simple GSimpleAction
20783  *
20784  * A #GSimpleAction is the obvious simple implementation of the #GSimpleAction
20785  * interface.  This is the easiest way to create an action for purposes of
20786  * adding it to a #GSimpleActionGroup.
20787  * See also #GtkAction.
20788  */
20789
20790
20791 /**
20792  * g_socket_listener_add_inet_port:
20793  * @listener: a #GSocketListener
20794  * @port: an IP port number (non-zero)
20795  * @source_object: Optional #GObject identifying this source
20796  * @error: #GError for error reporting, or %NULL to ignore.
20797  *
20798  * Helper function for g_socket_listener_add_address() that
20799  * creates a TCP/IP socket listening on IPv4 and IPv6 (if
20800  * supported) on the specified port on all interfaces.
20801  * to accept to identify this particular source, which is
20802  * useful if you're listening on multiple addresses and do
20803  * different things depending on what address is connected to.
20804  *
20805  * Returns: %TRUE on success, %FALSE on error.
20806  * Since: 2.22
20807  */
20808
20809
20810 /**
20811  * g_dbus_connection_call_finish:
20812  * @connection: A #GDBusConnection.
20813  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
20814  * @error: Return location for error or %NULL.
20815  *
20816  * Finishes an operation started with g_dbus_connection_call().
20817  * return values. Free with g_variant_unref().
20818  *
20819  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20820  * Since: 2.26
20821  */
20822
20823
20824 /**
20825  * g_proxy_resolver_lookup_async:
20826  * @resolver: a #GProxyResolver
20827  * @uri: a URI representing the destination to connect to
20828  * @cancellable: a #GCancellable, or %NULL
20829  * @callback: callback to call after resolution completes
20830  * @user_data: data for @callback
20831  *
20832  * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
20833  * details.
20834  *
20835  * Since: 2.26
20836  */
20837
20838
20839 /**
20840  * SECTION:gsetting:
20841  * @short_description: a high-level API for application settings
20842  *
20843  * The #GSettings class provides a convenient API for storing and retrieving
20844  * application settings.
20845  * When creating a GSettings instance, you have to specify a schema
20846  * that describes the keys in your settings and their types and default
20847  * values, as well as some other information.
20848  * Normally, a schema has as fixed path that determines where the settings
20849  * are stored in the conceptual global tree of settings. However, schemas
20850  * can also be 'relocatable', i.e. not equipped with a fixed path. This is
20851  * useful e.g. when the schema describes an 'account', and you want to be
20852  * able to store a arbitrary number of accounts.
20853  * Unlike other configuration systems (like GConf), GSettings does not
20854  * restrict keys to basic types like strings and numbers. GSettings stores
20855  * values as #GVariant, and allows any #GVariantType for keys. Key names
20856  * are restricted to lowercase characters, numbers and '-'. Furthermore,
20857  * the names must begin with a lowercase character, must not end
20858  * with a '-', and must not contain consecutive dashes. Key names can
20859  * be up to 32 characters long.
20860  * Similar to GConf, the default values in GSettings schemas can be
20861  * localized, but the localized values are stored in gettext catalogs
20862  * and looked up with the domain that is specified in the
20863  * <tag class="attribute">gettext-domain</tag> attribute of the
20864  * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
20865  * elements and the category that is specified in the l10n attribute of the
20866  * <tag class="starttag">key</tag> element.
20867  * GSettings uses schemas in a compact binary form that is created
20868  * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
20869  * utility. The input is a schema description in an XML format that can be
20870  * described by the following DTD:
20871  * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/gschema.dtd"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
20872  * At runtime, schemas are identified by their id (as specified
20873  * in the <tag class="attribute">id</tag> attribute of the
20874  * <tag class="starttag">schema</tag> element). The
20875  * convention for schema ids is to use a dotted name, similar in
20876  * style to a DBus bus name, e.g. "org.gnome.font-rendering".
20877  * In addition to #GVariant types, keys can have types that have enumerated
20878  * types. These can be described by a <tag class="starttag">choice</tag>,
20879  * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
20880  * <xref linkend="schema-enumerated"/>. The underlying type of
20881  * such a key is string, but you can use g_settings_get_enum(),
20882  * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
20883  * access the numeric values corresponding to the string value of enum
20884  * and flags keys.
20885  * <example id="schema-default-values"><title>Default values</title>
20886  * <programlisting><![CDATA[
20887  * <schemalist>
20888  * <schema id="org.gtk.test" path="/tests/" gettext-domain="test">
20889  * <key name="greeting" type="s">
20890  * <default l10n="messages">"Hello, earthlings"</default>
20891  * <summary>A greeting</summary>
20892  * <description>
20893  * Greeting of the invading martians
20894  * </description>
20895  * </key>
20896  * <key name="box" type="(ii)">
20897  * <default>(20,30)</default>
20898  * </key>
20899  * </schema>
20900  * </schemalist>
20901  * ]]></programlisting></example>
20902  * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
20903  * <programlisting><![CDATA[
20904  * <schemalist>
20905  * <enum id="myenum">
20906  * <value nick="first" value="1"/>
20907  * <value nick="second" value="2"/>
20908  * </enum>
20909  * <enum id="myflags">
20910  * <value nick="flag1" value="1"/>
20911  * <value nick="flag2" value="2"/>
20912  * <value nick="flag3" value="4"/>
20913  * </enum>
20914  * <schema id="org.gtk.test">
20915  * <key name="key-with-range" type="i">
20916  * <range min="1" max="100"/>
20917  * <default>10</default>
20918  * </key>
20919  * <key name="key-with-choices" type="s">
20920  * <choices>
20921  * <choice value='Elisabeth'/>
20922  * <choice value='Annabeth'/>
20923  * <choice value='Joe'/>
20924  * </choices>
20925  * <aliases>
20926  * <alias value='Anna' target='Annabeth'/>
20927  * <alias value='Beth' target='Elisabeth'/>
20928  * </aliases>
20929  * <default>'Joe'</default>
20930  * </key>
20931  * <key name='enumerated-key' enum='myenum'>
20932  * <default>'first'</default>
20933  * </key>
20934  * <key name='flags-key' flags='myflags'>
20935  * <default>["flag1",flag2"]</default>
20936  * </key>
20937  * </schema>
20938  * </schemalist>
20939  * ]]></programlisting></example>
20940  * <refsect2>
20941  * <title>Vendor overrides</title>
20942  * <para>
20943  * Default values are defined in the schemas that get installed by
20944  * an application. Sometimes, it is necessary for a vendor or distributor
20945  * to adjust these defaults. Since patching the XML source for the schema
20946  * is inconvenient and error-prone,
20947  * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
20948  * so-called 'vendor override' files. These are keyfiles in the same
20949  * directory as the XML schema sources which can override default values.
20950  * The schema id serves as the group name in the key file, and the values
20951  * are expected in serialized GVariant form, as in the following example:
20952  * <informalexample><programlisting>
20953  * [org.gtk.Example]
20954  * key1='string'
20955  * key2=1.5
20956  * </programlisting></informalexample>
20957  * </para>
20958  * </refsect2>
20959  * <refsect2>
20960  * <title>Binding</title>
20961  * <para>
20962  * A very convenient feature of GSettings lets you bind #GObject properties
20963  * directly to settings, using g_settings_bind(). Once a GObject property
20964  * has been bound to a setting, changes on either side are automatically
20965  * propagated to the other side. GSettings handles details like
20966  * mapping between GObject and GVariant types, and preventing infinite
20967  * cycles.
20968  * </para>
20969  * <para>
20970  * This makes it very easy to hook up a preferences dialog to the
20971  * underlying settings. To make this even more convenient, GSettings
20972  * looks for a boolean property with the name "sensitivity" and
20973  * automatically binds it to the writability of the bound setting.
20974  * If this 'magic' gets in the way, it can be suppressed with the
20975  * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
20976  * </para>
20977  * </refsect2>
20978  */
20979
20980
20981 /**
20982  * g_volume_enumerate_identifiers:
20983  * @volume: a #GVolume
20984  *
20985  * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
20986  * that @volume has. Use g_volume_get_identifer() to obtain
20987  * the identifiers themselves.
20988  * of strings containing kinds of identifiers. Use g_strfreev() to free.
20989  *
20990  * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
20991  */
20992
20993
20994 /**
20995  * g_zlib_decompressor_get_file_info:
20996  * @decompressor: a #GZlibDecompressor
20997  *
20998  * Retrieves the #GFileInfo constructed from the GZIP header data
20999  * of compressed data processed by @compressor, or %NULL if @decompressor's
21000  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
21001  * or the header data was not fully processed yet, or it not present in the
21002  * data stream at all.
21003  *
21004  * Returns: (transfer none): a #GFileInfo, or %NULL
21005  * Since: 2.26
21006  */
21007
21008
21009 /**
21010  * SECTION:ginputstrea:
21011  * @short_description: Base class for implementing streaming input
21012  * @include: gio/gio.h
21013  *
21014  * GInputStream has functions to read from a stream (g_input_stream_read()),
21015  * to close a stream (g_input_stream_close()) and to skip some content
21016  * (g_input_stream_skip()).
21017  * To copy the content of an input stream to an output stream without
21018  * manually handling the reads and writes, use g_output_stream_splice().
21019  * All of these functions have async variants too.
21020  */
21021
21022
21023 /**
21024  * g_permission_impl_update:
21025  * @permission: a #GPermission instance
21026  * @allowed: the new value for the 'allowed' property
21027  * @can_acquire: the new value for the 'can-acquire' property
21028  * @can_release: the new value for the 'can-release' property
21029  *
21030  * This function is called by the #GPermission implementation to update
21031  * the properties of the permission.  You should never call this
21032  * function except from a #GPermission implementation.
21033  * GObject notify signals are generated, as appropriate.
21034  *
21035  * Since: 2.26
21036  */
21037
21038
21039 /**
21040  * g_dbus_method_invocation_return_gerror:
21041  * @invocation: A #GDBusMethodInvocation.
21042  * @error: A #GError.
21043  *
21044  * Like g_dbus_method_invocation_return_error() but takes a #GError
21045  * instead of the error domain, error code and message.
21046  * This method will free @invocation, you cannot use it afterwards.
21047  *
21048  * Since: 2.26
21049  */
21050
21051
21052 /**
21053  * g_settings_list_children:
21054  * @settings: a #GSettings object
21055  * @returns: (transfer full) (element-type utf8): a list of the children on @settings
21056  *
21057  * Gets the list of children on @settings.
21058  * The list is exactly the list of strings for which it is not an error
21059  * to call g_settings_get_child().
21060  * For GSettings objects that are lists, this value can change at any
21061  * time and you should connect to the "children-changed" signal to watch
21062  * request a child after listing it only for it to have been destroyed
21063  * in the meantime.  For this reason, g_settings_get_chuld() may return
21064  * %NULL even for a child that was listed by this function.
21065  * For GSettings objects that are not lists, you should probably not be
21066  * calling this function from "normal" code (since you should already
21067  * know what children are in your schema).  This function may still be
21068  * useful there for introspection reasons, however.
21069  * You should free the return value with g_strfreev() when you are done
21070  * with it.
21071  *
21072  * For those changes.  note that there is a race condition here: you may
21073  */
21074
21075
21076 /**
21077  * g_app_launch_context_get_startup_notify_id:
21078  * @context: a #GAppLaunchContext
21079  * @info: a #GAppInfo
21080  * @files: (element-type GFile): a #GList of of #GFile objects
21081  *
21082  * Initiates startup notification for the application and returns the
21083  * <envvar>DESKTOP_STARTUP_ID</envvar> for the launched operation,
21084  * if supported.
21085  * Startup notification IDs are defined in the <ulink
21086  * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
21087  * FreeDesktop.Org Startup Notifications standard</ulink>.
21088  * not supported.
21089  *
21090  * Returns: a startup notification ID for the application, or %NULL if
21091  */
21092
21093
21094 /**
21095  * g_dbus_address_get_stream_finish:
21096  * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
21097  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
21098  * @error: Return location for error or %NULL.
21099  *
21100  * Finishes an operation started with g_dbus_address_get_stream().
21101  *
21102  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
21103  * Since: 2.26
21104  */
21105
21106
21107 /**
21108  * g_file_set_attribute_string:
21109  * @file: input #GFile.
21110  * @attribute: a string containing the attribute's name.
21111  * @value: a string containing the attribute's value.
21112  * @flags: #GFileQueryInfoFlags.
21113  * @cancellable: optional #GCancellable object, %NULL to ignore.
21114  * @error: a #GError, or %NULL
21115  *
21116  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
21117  * If @attribute is of a different type, this operation will fail.
21118  * If @cancellable is not %NULL, then the operation can be cancelled by
21119  * triggering the cancellable object from another thread. If the operation
21120  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21121  *
21122  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
21123  */
21124
21125
21126 /**
21127  * g_file_read_finish:
21128  * @file: input #GFile.
21129  * @res: a #GAsyncResult.
21130  * @error: a #GError, or %NULL
21131  *
21132  * Finishes an asynchronous file read operation started with
21133  * g_file_read_async().
21134  * Free the returned object with g_object_unref().
21135  *
21136  * Returns: (transfer full): a #GFileInputStream or %NULL on error.
21137  */
21138
21139
21140 /**
21141  * g_socket_client_connect_to_uri_finish:
21142  * @client: a #GSocketClient.
21143  * @result: a #GAsyncResult.
21144  * @error: a #GError location to store the error occuring, or %NULL to ignore.
21145  *
21146  * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
21147  *
21148  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
21149  * Since: 2.26
21150  */
21151
21152
21153 /**
21154  * g_file_load_contents_async:
21155  * @file: input #GFile.
21156  * @cancellable: optional #GCancellable object, %NULL to ignore.
21157  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21158  * @user_data: the data to pass to callback function
21159  *
21160  * Starts an asynchronous load of the @file's contents.
21161  * For more details, see g_file_load_contents() which is
21162  * the synchronous version of this call.
21163  * When the load operation has completed, @callback will be called
21164  * with @user data. To finish the operation, call
21165  * g_file_load_contents_finish() with the #GAsyncResult returned by
21166  * the @callback.
21167  * If @cancellable is not %NULL, then the operation can be cancelled by
21168  * triggering the cancellable object from another thread. If the operation
21169  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21170  */
21171
21172
21173 /**
21174  * g_dbus_connection_call_sync:
21175  * @connection: A #GDBusConnection.
21176  * @bus_name: A unique or well-known bus name.
21177  * @object_path: Path of remote object.
21178  * @interface_name: D-Bus interface to invoke method on.
21179  * @method_name: The name of the method to invoke.
21180  * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
21181  * @reply_type: The expected type of the reply, or %NULL.
21182  * @flags: Flags from the #GDBusCallFlags enumeration.
21183  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
21184  * @cancellable: A #GCancellable or %NULL.
21185  * @error: Return location for error or %NULL.
21186  *
21187  * Synchronously invokes the @method_name method on the
21188  * If @connection is closed then the operation will fail with
21189  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
21190  * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
21191  * contains a value not compatible with the D-Bus protocol, the operation
21192  * fails with %G_IO_ERROR_INVALID_ARGUMENT.
21193  * If @reply_type is non-%NULL then the reply will be checked for having
21194  * this type and an error will be raised if it does not match.  Said
21195  * another way, if you give a @reply_type then any non-%NULL return
21196  * value will be of this type.
21197  * If the @parameters #GVariant is floating, it is consumed.
21198  * This allows convenient 'inline' use of g_variant_new(), e.g.:
21199  * |[
21200  * g_dbus_connection_call_sync (connection,
21201  * "org.freedesktop.StringThings",
21202  * "/org/freedesktop/StringThings",
21203  * "org.freedesktop.StringThings",
21204  * "TwoStrings",
21205  * g_variant_new ("(ss)",
21206  * "Thing One",
21207  * "Thing Two"),
21208  * NULL,
21209  * G_DBUS_CALL_FLAGS_NONE,
21210  * -1,
21211  * NULL,
21212  * &amp;error);
21213  * ]|
21214  * The calling thread is blocked until a reply is received. See
21215  * g_dbus_connection_call() for the asynchronous version of
21216  * this method.
21217  * return values. Free with g_variant_unref().
21218  *
21219  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
21220  * Since: 2.26
21221  */
21222
21223
21224 /**
21225  * g_output_stream_write_all:
21226  * @stream: a #GOutputStream.
21227  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
21228  * @count: the number of bytes to write
21229  * @bytes_written: location to store the number of bytes that was written to the stream
21230  * @cancellable: optional #GCancellable object, %NULL to ignore.
21231  * @error: location to store the error occuring, or %NULL to ignore
21232  *
21233  * Tries to write @count bytes from @buffer into the stream. Will block
21234  * during the operation.
21235  * This function is similar to g_output_stream_write(), except it tries to
21236  * write as many bytes as requested, only stopping on an error.
21237  * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
21238  * is set to @count.
21239  * If there is an error during the operation FALSE is returned and @error
21240  * is set to indicate the error status, @bytes_written is updated to contain
21241  * the number of bytes written into the stream before the error occurred.
21242  *
21243  * Returns: %TRUE on success, %FALSE if there was an error
21244  */
21245
21246
21247 /**
21248  * g_file_monitor_file:
21249  * @file: input #GFile.
21250  * @flags: a set of #GFileMonitorFlags.
21251  * @cancellable: optional #GCancellable object, %NULL to ignore.
21252  * @error: a #GError, or %NULL.
21253  *
21254  * Obtains a file monitor for the given file. If no file notification
21255  * mechanism exists, then regular polling of the file is used.
21256  * If @cancellable is not %NULL, then the operation can be cancelled by
21257  * triggering the cancellable object from another thread. If the operation
21258  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21259  * Free the returned object with g_object_unref().
21260  *
21261  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21262  */
21263
21264
21265 /**
21266  * SECTION:gapplicationcommandlin:
21267  * @title: GApplicationCommandLine
21268  * @short_description: A class representing a command-line invocation of an application
21269  * @see_also: #GApplication
21270  *
21271  * #GApplicationCommandLine represents a command-line invocation of
21272  * an application.  It is created by #GApplication and emitted
21273  * in the #GApplication::command-line signal and virtual function.
21274  * The class contains the list of arguments that the program was invoked
21275  * with.  It is also possible to query if the commandline invocation was
21276  * commandline to this process).
21277  * The exit status of the originally-invoked process may be set and
21278  * messages can be printed to stdout or stderr of that process.  The
21279  * lifecycle of the originally-invoked process is tied to the lifecycle
21280  * dropped).
21281  * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
21282  * <programlisting>
21283  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
21284  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
21285  * </xi:include>
21286  * </programlisting>
21287  * </example>
21288  * <example id="gapplication-example-cmdline2"><title>Complicated commandline handling</title>
21289  * <programlisting>
21290  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
21291  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
21292  * </xi:include>
21293  * </programlisting>
21294  * </example>
21295  *
21296  * Local (ie: the current process is running in direct response to the
21297  * Invocation) or remote (ie: some other process forwarded the
21298  * Of this object (ie: the process exits when the last reference is
21299  */
21300
21301
21302 /**
21303  * g_async_initable_new_finish:
21304  * @initable: the #GAsyncInitable from the callback
21305  * @res: the #GAsyncResult.from the callback
21306  * @error: a #GError location to store the error occuring, or %NULL to ignore.
21307  *
21308  * Finishes the async construction for the various g_async_initable_new calls,
21309  * returning the created object or %NULL on error.
21310  * g_object_unref().
21311  *
21312  * Returns: (transfer full): a newly created #GObject, or %NULL on error. Free with
21313  * Since: 2.22
21314  */
21315
21316
21317 /**
21318  * g_file_output_stream_get_etag:
21319  * @stream: a #GFileOutputStream.
21320  *
21321  * Gets the entity tag for the file when it has been written.
21322  * This must be called after the stream has been written
21323  * and closed, as the etag can change while writing.
21324  *
21325  * Returns: the entity tag for the stream.
21326  */
21327
21328
21329 /**
21330  * g_file_supports_thread_contexts:
21331  * @file: a #GFile.
21332  *
21333  * Checks if @file supports <link
21334  * linkend="g-main-context-push-thread-default-context">thread-default
21335  * contexts</link>. If this returns %FALSE, you cannot perform
21336  * asynchronous operations on @file in a thread that has a
21337  * thread-default context.
21338  *
21339  * Returns: Whether or not @file supports thread-default contexts.
21340  * Since: 2.22
21341  */
21342
21343
21344 /**
21345  * g_file_move:
21346  * @source: #GFile pointing to the source location.
21347  * @destination: #GFile pointing to the destination location.
21348  * @flags: set of #GFileCopyFlags.
21349  * @cancellable: optional #GCancellable object, %NULL to ignore.
21350  * @progress_callback: (scope call): #GFileProgressCallback function for updates.
21351  * @progress_callback_data: (closure): gpointer to user data for the callback function.
21352  * @error: #GError for returning error conditions, or %NULL
21353  *
21354  * Tries to move the file or directory @source to the location specified by @destination.
21355  * If native move operations are supported then this is used, otherwise a copy + delete
21356  * fallback is used. The native implementation may support moving directories (for instance
21357  * on moves inside the same filesystem), but the fallback code does not.
21358  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
21359  * existing @destination file is overwritten.
21360  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
21361  * will be copied as symlinks, otherwise the target of the
21362  * If @cancellable is not %NULL, then the operation can be cancelled by
21363  * triggering the cancellable object from another thread. If the operation
21364  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21365  * If @progress_callback is not %NULL, then the operation can be monitored by
21366  * setting this to a #GFileProgressCallback function. @progress_callback_data
21367  * will be passed to this function. It is guaranteed that this callback will
21368  * be called after all data has been transferred with the total number of bytes
21369  * copied during the operation.
21370  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
21371  * error is returned, independent on the status of the @destination.
21372  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
21373  * error G_IO_ERROR_EXISTS is returned.
21374  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
21375  * error is returned. If trying to overwrite a directory with a directory the
21376  * G_IO_ERROR_WOULD_MERGE error is returned.
21377  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
21378  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
21379  * may be returned (if the native move operation isn't available).
21380  *
21381  * Returns: %TRUE on successful move, %FALSE otherwise.
21382  */
21383
21384
21385 /**
21386  * g_socket_connection_get_local_address:
21387  * @connection: a #GSocketConnection
21388  * @error: #GError for error reporting, or %NULL to ignore.
21389  *
21390  * Try to get the local address of a socket connection.
21391  * Free the returned object with g_object_unref().
21392  *
21393  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
21394  * Since: 2.22
21395  */
21396
21397
21398 /**
21399  * g_buffered_output_stream_new:
21400  * @base_stream: a #GOutputStream.
21401  *
21402  * Creates a new buffered output stream for a base stream.
21403  *
21404  * Returns: a #GOutputStream for the given @base_stream.
21405  */
21406
21407
21408 /**
21409  * g_dbus_proxy_get_object_path:
21410  * @proxy: A #GDBusProxy.
21411  *
21412  * Gets the object path @proxy is for.
21413  *
21414  * Returns: A string owned by @proxy. Do not free.
21415  * Since: 2.26
21416  */
21417
21418
21419 /**
21420  * g_unix_mount_point_is_readonly:
21421  * @mount_point: a #GUnixMountPoint.
21422  *
21423  * Checks if a unix mount point is read only.
21424  *
21425  * Returns: %TRUE if a mount point is read only.
21426  */
21427
21428
21429 /**
21430  * GSocket:timeout:
21431  *
21432  * The timeout in seconds on socket I/O
21433  *
21434  * Since: 2.26
21435  */
21436
21437
21438 /**
21439  * g_dbus_message_get_header:
21440  * @message: A #GDBusMessage.
21441  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
21442  *
21443  * Gets a header field on @message.
21444  * otherwise. Do not free, it is owned by @message.
21445  *
21446  * Returns: A #GVariant with the value if the header was found, %NULL
21447  * Since: 2.26
21448  */
21449
21450
21451 /**
21452  * g_socket_receive_message:
21453  * @socket: a #GSocket
21454  * @address: a pointer to a #GSocketAddress pointer, or %NULL
21455  * @vectors: an array of #GInputVector structs
21456  * @num_vectors: the number of elements in @vectors, or -1
21457  * @messages: a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
21458  * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
21459  * @flags: a pointer to an int containing #GSocketMsgFlags flags
21460  * @cancellable: a %GCancellable or %NULL
21461  * @error: a #GError pointer, or %NULL
21462  *
21463  * Receive data from a socket.  This is the most complicated and
21464  * fully-featured version of this call. For easier use, see
21465  * g_socket_receive() and g_socket_receive_from().
21466  * If @address is non-%NULL then @address will be set equal to the
21467  * source address of the received packet.
21468  * describe the buffers that received data will be scattered into.
21469  * If @num_vectors is -1, then @vectors is assumed to be terminated
21470  * by a #GInputVector with a %NULL buffer pointer.
21471  * As a special case, if @num_vectors is 0 (in which case, @vectors
21472  * may of course be %NULL), then a single byte is received and
21473  * discarded. This is to facilitate the common practice of sending a
21474  * single '\0' byte for the purposes of transferring ancillary data.
21475  * array of #GSocketControlMessage instances or %NULL if no such
21476  * messages was received. These correspond to the control messages
21477  * received from the kernel, one #GSocketControlMessage per message
21478  * from the kernel. This array is %NULL-terminated and must be freed
21479  * by the caller using g_free() after calling g_object_unref() on each
21480  * element. If @messages is %NULL, any control messages received will
21481  * be discarded.
21482  * messages received.
21483  * If both @messages and @num_messages are non-%NULL, then
21484  * for this are available in the #GSocketMsgFlags enum, but the
21485  * values there are the same as the system values, and the flags
21486  * are passed in as-is, so you can pass in system-specific flags too
21487  * (and g_socket_receive_message() may pass system-specific flags out).
21488  * As with g_socket_receive(), data may be discarded if @socket is
21489  * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
21490  * provide enough buffer space to read a complete message. You can pass
21491  * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
21492  * removing it from the receive queue, but there is no portable way to find
21493  * out the length of the message other than by reading it into a
21494  * sufficiently-large buffer.
21495  * If the socket is in blocking mode the call will block until there
21496  * is some data to receive or there is an error. If there is no data
21497  * available and the socket is in non-blocking mode, a
21498  * %G_IO_ERROR_WOULD_BLOCK error will be returned. To be notified when
21499  * data is available, wait for the %G_IO_IN condition.
21500  * On error -1 is returned and @error is set accordingly.
21501  *
21502  * In @messages (ie: not including the %NULL terminator).
21503  * Returns: Number of bytes read, or -1 on error
21504  * Since: 2.22
21505  */
21506
21507
21508 /**
21509  * g_inet_address_get_is_mc_site_local:
21510  * @address: a #GInetAddress
21511  *
21512  * Tests whether @address is a site-local multicast address.
21513  *
21514  * Returns: %TRUE if @address is a site-local multicast address.
21515  * Since: 2.22
21516  */
21517
21518
21519 /**
21520  * g_io_modules_scan_all_in_directory:
21521  * @dirname: pathname for a directory containing modules to scan.
21522  *
21523  * Scans all the modules in the specified directory, ensuring that
21524  * any extension point implemented by a module is registered.
21525  * This may not actually load and initialize all the types in each
21526  * module, some modules may be lazily loaded and initialized when
21527  * an extension point it implementes is used with e.g.
21528  * g_io_extension_point_get_extensions() or
21529  * g_io_extension_point_get_extension_by_name().
21530  * If you need to guarantee that all types are loaded in all the modules,
21531  * use g_io_modules_scan_all_in_directory().
21532  *
21533  * Since: 2.24
21534  */
21535
21536
21537 /**
21538  * g_socket_service_stop:
21539  * @service: a #GSocketService
21540  *
21541  * Stops the service, i.e. stops accepting connections
21542  * from the added sockets when the mainloop runs.
21543  * This call is threadsafe, so it may be called from a thread
21544  * handling an incomming client request.
21545  *
21546  * Since: 2.22
21547  */
21548
21549
21550 /**
21551  * g_settings_new_with_backend_and_path:
21552  * @schema: the name of the schema
21553  * @backend: the #GSettingsBackend to use
21554  * @path: the path to use
21555  * @returns: a new #GSettings object
21556  *
21557  * Creates a new #GSettings object with a given schema, backend and
21558  * path.
21559  * This is a mix of g_settings_new_with_backend() and
21560  * g_settings_new_with_path().
21561  *
21562  * Since: 2.26
21563  */
21564
21565
21566 /**
21567  * g_bus_own_name_with_closures:
21568  * @bus_type: The type of bus to own a name on.
21569  * @name: The well-known name to own.
21570  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
21571  * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
21572  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
21573  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
21574  *
21575  * Version of g_bus_own_name() using closures instead of callbacks for
21576  * easier binding in other languages.
21577  * g_bus_unown_name() to stop owning the name.
21578  *
21579  * Returns: An identifier (never 0) that an be used with
21580  * Rename to: g_bus_own_name
21581  * Since: 2.26
21582  */
21583
21584
21585 /**
21586  * g_vfs_is_active:
21587  * @vfs: a #GVfs.
21588  *
21589  * Checks if the VFS is active.
21590  *
21591  * Returns: %TRUE if construction of the @vfs was successful and it is now active.
21592  */
21593
21594
21595 /**
21596  * g_settings_set_int:
21597  * @settings: a #GSettings object
21598  * @key: the name of the key to set
21599  * @value: the value to set it to
21600  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
21601  *
21602  * Sets @key in @settings to @value.
21603  * A convenience variant of g_settings_set() for 32-bit integers.
21604  * It is a programmer error to give a @key that isn't specified as
21605  * having a int32 type in the schema for @settings.
21606  *
21607  * Since: 2.26
21608  */
21609
21610
21611 /**
21612  * g_file_replace_contents_finish:
21613  * @file: input #GFile.
21614  * @res: a #GAsyncResult.
21615  * @new_etag: (out) (allow-none): a location of a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when it is no longer needed, or %NULL
21616  * @error: a #GError, or %NULL
21617  *
21618  * Finishes an asynchronous replace of the given @file. See
21619  * g_file_replace_contents_async(). Sets @new_etag to the new entity
21620  * tag for the document, if present.
21621  *
21622  * Returns: %TRUE on success, %FALSE on failure.
21623  */
21624
21625
21626 /**
21627  * GDBusConnectionClass:
21628  * @closed: Signal class handler for the #GDBusConnection::closed signal.
21629  *
21630  * Class structure for #GDBusConnection.
21631  *
21632  * Since: 2.26
21633  */
21634
21635
21636 /**
21637  * g_network_address_parse_uri:
21638  * @uri: the hostname and optionally a port
21639  * @default_port: The default port if none is found in the URI
21640  * @error: a pointer to a #GError, or %NULL
21641  *
21642  * Creates a new #GSocketConnectable for connecting to the given
21643  * Using this rather than g_network_address_new() or
21644  * g_network_address_parse_host() allows #GSocketClient to determine
21645  * when to use application-specific proxy protocols.
21646  *
21647  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
21648  * Since: 2.26
21649  */
21650
21651
21652 /**
21653  * g_inet_address_get_is_mc_org_local:
21654  * @address: a #GInetAddress
21655  *
21656  * Tests whether @address is an organization-local multicast address.
21657  *
21658  * Returns: %TRUE if @address is an organization-local multicast address.
21659  * Since: 2.22
21660  */
21661
21662
21663 /**
21664  * g_keyfile_settings_backend_new:
21665  * @filename: the filename of the keyfile
21666  * @root_path: the path under which all settings keys appear
21667  * @root_group: (allow-none): the group name corresponding to
21668  * @returns: (transfer full): a keyfile-backed #GSettingsBackend
21669  *
21670  * Creates a keyfile-backed #GSettingsBackend.
21671  * The filename of the keyfile to use is given by @filename.
21672  * All settings read to or written from the backend must fall under the
21673  * path given in @root_path (which must start and end with a slash and
21674  * not contain two consecutive slashes).  @root_path may be "/".
21675  * If @root_group is non-%NULL then it specifies the name of the keyfile
21676  * group used for keys that are written directly below @root_path.  For
21677  * example, if @root_path is "/apps/example/" and @root_group is
21678  * "toplevel", then settings the key "/apps/example/enabled" to a value
21679  * of %TRUE will cause the following to appear in the keyfile:
21680  * |[
21681  * [toplevel]
21682  * enabled=true
21683  * ]|
21684  * If @root_group is %NULL then it is not permitted to store keys
21685  * directly below the @root_path.
21686  * the name of the subpath (with the final slash stripped) is used as
21687  * the name of the keyfile group.  To continue the example, if
21688  * "/apps/example/profiles/default/font-size" were set to
21689  * 12 then the following would appear in the keyfile:
21690  * |[
21691  * [profiles/default]
21692  * font-size=12
21693  * ]|
21694  * The backend will refuse writes (and return writability as being
21695  * %FALSE) for keys outside of @root_path and, in the event that
21696  * Writes will also be refused if the backend detects that it has the
21697  * writable).
21698  * There is no checking done for your key namespace clashing with the
21699  * syntax of the key file format.  For example, if you have '[' or ']'
21700  * characters in your path names or '=' in your key names you may be in
21701  * trouble.
21702  *
21703  * For keys not stored directly below @root_path (ie: in a sub-path),
21704  * Inability to rewrite the keyfile (ie: the containing directory is not
21705  */
21706
21707
21708 /**
21709  * g_socket_client_add_application_proxy:
21710  * @client: a #GSocketClient
21711  * @protocol: The proxy protocol
21712  *
21713  * Enable proxy protocols to be handled by the application. When the
21714  * indicated proxy protocol is returned by the #GProxyResolver,
21715  * #GSocketClient will consider this protocol as supported but will
21716  * not try find a #GProxy instance to handle handshaking. The
21717  * application must check for this case by calling
21718  * g_socket_connection_get_remote_address() on the returned
21719  * #GSocketConnection, and seeing if it's a #GProxyAddress of the
21720  * appropriate type, to determine whether or not it needs to handle
21721  * the proxy handshaking itself.
21722  * This should be used for proxy protocols that are dialects of
21723  * another protocol such as HTTP proxy. It also allows cohabitation of
21724  * proxy protocols that are reused between protocols. A good example
21725  * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
21726  * be use as generic socket proxy through the HTTP CONNECT method.
21727  */
21728
21729
21730 /**
21731  * g_drive_stop:
21732  * @drive: a #GDrive.
21733  * @flags: flags affecting the unmount if required for stopping.
21734  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
21735  * @cancellable: optional #GCancellable object, %NULL to ignore.
21736  * @callback: a #GAsyncReadyCallback, or %NULL.
21737  * @user_data: user data to pass to @callback
21738  *
21739  * Asynchronously stops a drive.
21740  * When the operation is finished, @callback will be called.
21741  * You can then call g_drive_stop_finish() to obtain the
21742  * result of the operation.
21743  *
21744  * Since: 2.22
21745  */
21746
21747
21748 /**
21749  * g_memory_output_stream_get_data_size:
21750  * @ostream: a #GMemoryOutputStream
21751  *
21752  * Returns the number of bytes from the start up
21753  * to including the last byte written in the stream
21754  * that has not been truncated away.
21755  *
21756  * Returns: the number of bytes written to the stream
21757  * Since: 2.18
21758  */
21759
21760
21761 /**
21762  * g_file_info_get_is_symlink:
21763  * @info: a #GFileInfo.
21764  *
21765  * Checks if a file is a symlink.
21766  *
21767  * Returns: %TRUE if the given @info is a symlink.
21768  */
21769
21770
21771 /**
21772  * g_dbus_message_set_path:
21773  * @message: A #GDBusMessage.
21774  * @value: The value to set.
21775  *
21776  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
21777  *
21778  * Since: 2.26
21779  */
21780
21781
21782 /**
21783  * g_io_stream_set_pending:
21784  * @stream: a #GIOStream
21785  * @error: a #GError location to store the error occuring, or %NULL to ignore
21786  *
21787  * Sets @stream to have actions pending. If the pending flag is
21788  * already set or @stream is closed, it will return %FALSE and set
21789  *
21790  * Returns: %TRUE if pending was previously unset and is now set.
21791  * Since: 2.22
21792  */
21793
21794
21795 /**
21796  * g_socket_service_start:
21797  * @service: a #GSocketService
21798  *
21799  * Starts the service, i.e. start accepting connections
21800  * from the added sockets when the mainloop runs.
21801  * This call is threadsafe, so it may be called from a thread
21802  * handling an incomming client request.
21803  *
21804  * Since: 2.22
21805  */
21806
21807
21808 /**
21809  * g_socket_client_get_enable_proxy:
21810  * @client: a #GSocketClient.
21811  *
21812  * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
21813  *
21814  * Returns: whether proxying is enabled
21815  * Since: 2.26
21816  */
21817
21818
21819 /**
21820  * g_io_stream_close:
21821  * @stream: a #GIOStream
21822  * @cancellable: optional #GCancellable object, %NULL to ignore
21823  * @error: location to store the error occuring, or %NULL to ignore
21824  *
21825  * Closes the stream, releasing resources related to it. This will also
21826  * closes the individual input and output streams, if they are not already
21827  * closed.
21828  * Once the stream is closed, all other operations will return
21829  * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
21830  * return an error.
21831  * Closing a stream will automatically flush any outstanding buffers
21832  * in the stream.
21833  * Streams will be automatically closed when the last reference
21834  * is dropped, but you might want to call this function to make sure
21835  * resources are released as early as possible.
21836  * Some streams might keep the backing store of the stream (e.g. a file
21837  * descriptor) open after the stream is closed. See the documentation for
21838  * the individual stream for details.
21839  * On failure the first error that happened will be reported, but the
21840  * close operation will finish as much as possible. A stream that failed
21841  * to close will still return %G_IO_ERROR_CLOSED for all operations.
21842  * Still, it is important to check and report the error to the user,
21843  * otherwise there might be a loss of data as all data might not be written.
21844  * If @cancellable is not NULL, then the operation can be cancelled by
21845  * triggering the cancellable object from another thread. If the operation
21846  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21847  * Cancelling a close will still leave the stream closed, but some streams
21848  * can use a faster close that doesn't block to e.g. check errors.
21849  * The default implementation of this method just calls close on the
21850  * individual input/output streams.
21851  *
21852  * Returns: %TRUE on success, %FALSE on failure
21853  * Since: 2.22
21854  */
21855
21856
21857 /**
21858  * g_tcp_connection_set_graceful_disconnect:
21859  * @connection: a #GTcpConnection
21860  * @graceful_disconnect: Whether to do graceful disconnects or not
21861  *
21862  * This enabled graceful disconnects on close. A graceful disconnect
21863  * means that we signal the recieving end that the connection is terminated
21864  * and wait for it to close the connection before closing the connection.
21865  * A graceful disconnect means that we can be sure that we successfully sent
21866  * all the outstanding data to the other end, or get an error reported.
21867  * However, it also means we have to wait for all the data to reach the
21868  * other side and for it to acknowledge this by closing the socket, which may
21869  * take a while. For this reason it is disabled by default.
21870  *
21871  * Since: 2.22
21872  */
21873
21874
21875 /**
21876  * g_data_output_stream_put_string:
21877  * @stream: a #GDataOutputStream.
21878  * @str: a string.
21879  * @cancellable: optional #GCancellable object, %NULL to ignore.
21880  * @error: a #GError, %NULL to ignore.
21881  *
21882  * Puts a string into the output stream.
21883  *
21884  * Returns: %TRUE if @string was successfully added to the @stream.
21885  */
21886
21887
21888 /**
21889  * SECTION:gioerro:
21890  * @short_description: Error helper functions
21891  * @include: gio/gio.h
21892  *
21893  * Contains helper functions for reporting errors to the user.
21894  */
21895
21896
21897 /**
21898  * g_unix_credentials_message_is_supported:
21899  *
21900  * Checks if passing a #GCredential on a #GSocket is supported on this platform.
21901  *
21902  * Returns: %TRUE if supported, %FALSE otherwise
21903  * Since: 2.26
21904  */
21905
21906
21907 /**
21908  * g_content_type_is_a:
21909  * @type: a content type string
21910  * @supertype: a content type string
21911  *
21912  * Determines if @type is a subset of @supertype.
21913  * %FALSE otherwise.
21914  *
21915  * Returns: %TRUE if @type is a kind of @supertype,
21916  */
21917
21918
21919
21920 /************************************************************/
21921 /* THIS FILE IS GENERATED DO NOT EDIT */
21922 /************************************************************/