Checks if action-name is valid.
action-name is valid if it consists only of alphanumeric
characters, plus - and .. The empty string is not a valid
action name.
It is an error to call this function with a non-UTF-8 action-name.
action-name must not be NULL.
Passed: a string.
a potential action name
Returned: a boolean.
TRUE if action-name is valid
Parses a detailed action name into its separate name and target components.
Detailed action names can have three formats.
The first format is used to represent an action name with no target
value and consists of just an action name containing no whitespace nor
the characters :, ( or ). For example:
app.action.
The second format is used to represent an action with a target value
that is a non-empty string consisting only of alphanumerics, plus
- and .. In that case, the action name and target value
are separated by a double colon (::). For example:
app.action::target.
The third format is used to represent an action with any type of target
value, including strings. The target value follows the action name,
surrounded in parens. For example: app.action(42). The target
value is parsed using variant:parse. If
a tuple-typed value is desired, it must be specified in the same way,
resulting in two sets of parens, for example:
app.action((1,2,3)). A string target can be specified this way
as well: app.action('target'). For strings, this third format
must be used if target value is empty or contains characters other than
alphanumerics, - and ..
If this function returns TRUE, a non-NULL value is
guaranteed to be returned in action-name (if a pointer is passed
in). A NULL value may still be returned in target-value,
as the detailed-name may not contain a target.
If returned, the <GVariant> in
target-value is guaranteed to not be floating.
Passed: a string.
a detailed action name
Returned: a boolean.
TRUE if successful, else FALSE with error set
Returned: a string.
the action name
Returned: a <GVariant>, or #f.
the target value, or NULL for no target
Formats a detailed action name from action-name and target-value.
It is an error to call this function with an invalid action name.
This function is the opposite of action:parse-detailed-name. It will produce a
string that can be parsed back to the action-name and
target-value by that function.
See that function for the types of strings that will be printed by this function.
Passed: a string.
a valid action name
Passed, or left out: a <GVariant>, or
#f.
a <GVariant> target value, or NULL
Returned: a string.
a detailed format string
Creates a new <GAppInfo> from the given
information.
Note that for commandline, the quoting rules of the Exec
key of the
freedesktop.org
Desktop Entry Specification are applied. For example, if the
commandline contains percent-encoded URIs, the percent-character
must be doubled in order to prevent it from being swallowed by
Exec key unquoting. See
the
specification for exact quoting rules.
Passed: a file name, as a string.
the command line to use
Passed: a string, or #f.
the application name, or NULL to use commandline
Passed: a <GAppInfoCreateFlags>, or a
list of its symbols, or one of them.
flags that can specify details of the created
<GAppInfo>
Returned: a <GAppInfo>.
new <GAppInfo> for given command.
Gets a list of all of the applications currently registered on this system.
For desktop files, this includes applications that have
‘NoDisplay=true‘
set or are excluded from display by means of
‘OnlyShowIn‘
or
‘NotShowIn‘.
See app-info:should-show?.
The returned list does not include applications which have the ‘Hidden‘ key set.
Returned: a list, each a <GAppInfo>.
a newly allocated list of references to
<GAppInfo>s.
Gets a list of all <GAppInfo>s for a given content
type, including the recommended and fallback
<GAppInfo>s. See app-info:get-recommended-for-type and
app-info:get-fallback-for-type.
Passed: a string.
the content type to find a <GAppInfo> for
Returned: a list, each a <GAppInfo>.
list of <GAppInfo>s for given content-type.
Gets the default <GAppInfo> for a given content
type.
Passed: a string.
the content type to find a <GAppInfo> for
Passed: a boolean.
if TRUE, the <GAppInfo> is expected to
support URIs
Returned: a <GAppInfo>, or #f.
<GAppInfo> for given content-type or
NULL on error.
Asynchronously gets the default <GAppInfo> for a
given content type.
Passed: a string.
the content type to find a <GAppInfo> for
Passed: a boolean.
if TRUE, the <GAppInfo> is expected to
support URIs
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes a default <GAppInfo> lookup started by
app-info:get-default-for-type-async.
If no #<GAppInfo> is found, then error will
be set to Gio.IOErrorEnum.NOT_FOUND.
Passed: a <GAsyncResult>.
the async result
Returned: a <GAppInfo>.
<GAppInfo> for given content-type or
NULL on error.
Gets the default application for handling URIs with the given URI scheme.
A URI scheme is the initial part of the URI, up to but not including the
:. For example, http, ftp or sip.
Passed: a string.
a string containing a URI scheme.
Returned: a <GAppInfo>, or #f.
<GAppInfo> for given uri-scheme or
NULL on error.
Asynchronously gets the default application for handling URIs with the
given URI scheme. A URI scheme is the initial part of the URI, up to
but not including the :, e.g. http, ftp or
sip.
Passed: a string.
a string containing a URI scheme.
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes a default <GAppInfo> lookup started by
app-info:get-default-for-uri-scheme-async.
If no <GAppInfo> is found, then error will
be set to Gio.IOErrorEnum.NOT_FOUND.
Passed: a <GAsyncResult>.
the async result
Returned: a <GAppInfo>.
<GAppInfo> for given uri-scheme or
NULL on error.
Gets a list of fallback <GAppInfo>s for a given
content type, i.e. those applications which claim to support the given
content type by MIME type subclassing and not directly.
Passed: a string.
the content type to find a <GAppInfo> for
Returned: a list, each a <GAppInfo>.
list of <GAppInfo>s for given content-type
or NULL on error.
Gets a list of recommended <GAppInfo>s for a given
content type, i.e. those applications which claim to support the given
content type exactly, and not by MIME type subclassing.
Note that the first application of the list is the last used one, i.e.
the last one for which app-info:set-as-last-used-for-type? has
been called.
Passed: a string.
the content type to find a <GAppInfo> for
Returned: a list, each a <GAppInfo>.
list of <GAppInfo>s for given content-type
or NULL on error.
Async version of app-info:launch-default-for-uri?.
This version is useful if you are interested in receiving error information in the case where the application is sandboxed and the portal may present an application chooser dialog to the user.
This is also useful if you want to be sure that the D-Bus–activated applications are really started before termination and if you are interested in receiving error information from their activation.
Passed: a string.
the uri to show
Passed, or left out: a
<GAppLaunchContext>, or #f.
optional launch context
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes an asynchronous launch-default-for-uri operation.
Passed: a <GAsyncResult>.
the async result
Returned: a boolean.
TRUE if the launch was successful, FALSE if error is
set
Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if required.
The D-Bus–activated applications don’t have to be started if your
application terminates too soon after this function. To prevent this,
use app-info:launch-default-for-uri-async
instead.
Passed: a string.
the uri to show
Passed, or left out: a
<GAppLaunchContext>, or #f.
optional launch context
Returned: a boolean.
TRUE on success, FALSE on error.
Removes all changes to the type associations done by app-info:set-as-default-for-type?,
app-info:set-as-default-for-extension?,
app-info:add-supports-type? or
app-info:remove-supports-type?.
Passed: a string.
a content type
Asynchronously connects to the message bus specified by bus-type.
When the operation is finished, callback will be invoked. You can
then call bus-get-finish to get the result
of the operation.
This is an asynchronous failable function. See
bus-get-sync for the synchronous version.
Passed: a <GBusType>, or one of its symbols.
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is satisfied
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
the data to pass to callback
Finishes an operation started with bus-get.
The returned object is a singleton, that is, shared with other callers
of bus-get and
bus-get-sync for bus-type. In the
event that you need a private message bus connection, use
dbus-address-get-for-bus-sync
and dbus-connection:new-for-address with
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
Note that the returned <GDBusConnection>
object will (usually) have the dbus-connection:exit-on-close property set to
#t.
Passed: a <GAsyncResult>.
a <GAsyncResult> obtained from the
GAsyncReadyCallback passed to
bus-get
Returned: a <GDBusConnection>.
a <GDBusConnection> or #f if
error is set. Free with object:unref.
Synchronously connects to the message bus specified by bus-type. Note that the returned object may shared with other callers, e.g. if two separate parts of a process calls this function with the same bus-type, they will share the same object.
This is a synchronous failable function. See
bus-get and
bus-get-finish for the asynchronous
version.
The returned object is a singleton, that is, shared with other callers
of bus-get and
bus-get-sync for bus-type. In the
event that you need a private message bus connection, use
dbus-address-get-for-bus-sync
and dbus-connection:new-for-address with
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
Note that the returned <GDBusConnection>
object will (usually) have the dbus-connection:exit-on-close property set to
#t.
Passed: a <GBusType>, or one of its symbols.
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f
Returned: a <GDBusConnection>.
a <GDBusConnection> or #f if
error is set. Free with object:unref.
Requests ownership of name on the bus specified by bus-type.
It asynchronously calls name-acquired-handler and name-lost-handler when the name is acquired and lost, respectively.
Callbacks will be invoked in the thread-default main context (see
main-context:push-thread-default) of the
thread you are calling this function from.
You are guaranteed that one of the name-acquired-handler and name-lost-handler callbacks will be invoked after calling this function — there are three possible cases:
NULL connection (if a connection
to the bus can’t be made).
When you are done owning the name, call
bus-unown-name with the owner ID this
function returns.
If the name is acquired or lost (for example another application could
acquire the name if you allow replacement or the application currently
owning the name exits), the handlers are also invoked. If the
<GDBusConnection> that is used for
attempting to own the name closes, then name-lost-handler is
invoked since it is no longer possible for other processes to access the
process.
You cannot use bus-own-name several times for
the same name (unless interleaved with calls to
bus-unown-name) — only the first call will
work.
Another guarantee is that invocations of name-acquired-handler and name-lost-handler are guaranteed to alternate; that is, if name-acquired-handler is invoked then you are guaranteed that the next time one of the handlers is invoked, it will be name-lost-handler. The reverse is also true.
If you plan on exporting objects (using, for example,
dbus-connection:register-object), note that it is
generally too late to export the objects in name-acquired-handler.
Instead, you can do this in bus-acquired-handler since you are
guaranteed that this will run before name is requested from the
bus.
This behavior makes it very simple to write applications that want to own names and export objects. Simply register objects to be exported in bus-acquired-handler and unregister the objects (if any) in name-lost-handler.
Passed: a <GBusType>, or one of its symbols.
the type of bus to own a name on
Passed: a string.
the well-known name to own
Passed: a <GBusNameOwnerFlags>, or a
list of its symbols, or one of them.
a set of flags with ownership options
Passed, or left out: a <GClosure>, or
#f.
Passed, or left out: a <GClosure>, or
#f.
Passed, or left out: a <GClosure>, or
#f.
Returned: an unsigned 32-bit integer.
an identifier (never 0) that can be used with
bus-unown-name to stop owning the name
handler to invoke when connected to the bus of type bus-type, or
NULL to ignore
See GBusAcquiredCallback for how it is
called.
handler to invoke when name is acquired, or NULL to ignore
See GBusNameAcquiredCallback for
how it is called.
handler to invoke when name is lost, or NULL to ignore
See GBusNameLostCallback for how it is
called.
user data to pass to handlers
function for freeing user-data
See GDestroyNotify for how it is
called.
Like bus-own-name but takes a
<GDBusConnection> instead of a
<GBusType>.
Passed: a <GDBusConnection>.
a bus connection
Passed: a string.
the well-known name to own
Passed: a <GBusNameOwnerFlags>, or a
list of its symbols, or one of them.
a set of flags with ownership options
Passed, or left out: a <GClosure>, or
#f.
Passed, or left out: a <GClosure>, or
#f.
Returned: an unsigned 32-bit integer.
an identifier (never 0) that can be used with
bus-unown-name to stop owning the name
handler to invoke when name is acquired, or NULL to ignore
See GBusNameAcquiredCallback for
how it is called.
handler to invoke when name is lost, or NULL to ignore
See GBusNameLostCallback for how it is
called.
user data to pass to handlers
function for freeing user-data
See GDestroyNotify for how it is
called.
Stops owning a name.
Note that there may still be D-Bus traffic to process (relating to
owning and unowning the name) in the current thread-default
<GMainContext> after this function has
returned. You should continue to iterate the
<GMainContext> until the
GDestroyNotify function passed to
bus-own-name is called, in order to avoid
memory leaks through callbacks queued on the
<GMainContext> after it’s stopped being
iterated.
Passed: an unsigned 32-bit integer.
an identifier obtained from bus-own-name
Stops watching a name.
Note that there may still be D-Bus traffic to process (relating to
watching and unwatching the name) in the current thread-default
<GMainContext> after this function has
returned. You should continue to iterate the
<GMainContext> until the
GDestroyNotify function passed to
bus-watch-name is called, in order to avoid
memory leaks through callbacks queued on the
<GMainContext> after it’s stopped being
iterated.
Passed: an unsigned 32-bit integer.
An identifier obtained from bus-watch-name
Starts watching name on the bus specified by bus-type and
calls name-appeared-handler and name-vanished-handler when
the name is known to have an owner respectively known to lose its owner.
Callbacks will be invoked in the thread-default main context (see
main-context:push-thread-default) of the
thread you are calling this function from.
You are guaranteed that one of the handlers will be invoked after
calling this function. When you are done watching the name, just call
bus-unwatch-name with the watcher id this
function returns.
If the name vanishes or appears (for example the application owning the
name could restart), the handlers are also invoked. If the
<GDBusConnection> that is used for watching
the name disconnects, then name-vanished-handler is invoked since
it is no longer possible to access the name.
Another guarantee is that invocations of name-appeared-handler and name-vanished-handler are guaranteed to alternate; that is, if name-appeared-handler is invoked then you are guaranteed that the next time one of the handlers is invoked, it will be name-vanished-handler. The reverse is also true.
This behavior makes it very simple to write applications that want to take action when a certain name exists. Basically, the application should create object proxies in name-appeared-handler and destroy them again (if any) in name-vanished-handler.
Passed: a <GBusType>, or one of its symbols.
The type of bus to watch a name on.
Passed: a string.
The name (well-known or unique) to watch.
Passed: a <GBusNameWatcherFlags>, or a
list of its symbols, or one of them.
Flags from the <GBusNameWatcherFlags>
enumeration.
Passed, or left out: a <GClosure>, or
#f.
Passed, or left out: a <GClosure>, or
#f.
Returned: an unsigned 32-bit integer.
An identifier (never 0) that can be used with
bus-unwatch-name to stop watching the
name.
Handler to invoke when name is known to exist or #f.
See GBusNameAppearedCallback for
how it is called.
Handler to invoke when name is known to not exist or #f.
See GBusNameVanishedCallback for
how it is called.
User data to pass to handlers.
Function for freeing user-data or #f.
See GDestroyNotify for how it is
called.
Like bus-watch-name but takes a
<GDBusConnection> instead of a
<GBusType>.
Passed: a <GDBusConnection>.
Passed: a string.
The name (well-known or unique) to watch.
Passed: a <GBusNameWatcherFlags>, or a
list of its symbols, or one of them.
Flags from the <GBusNameWatcherFlags>
enumeration.
Passed, or left out: a <GClosure>, or
#f.
Passed, or left out: a <GClosure>, or
#f.
Returned: an unsigned 32-bit integer.
An identifier (never 0) that can be used with
bus-unwatch-name to stop watching the
name.
Handler to invoke when name is known to exist or #f.
See GBusNameAppearedCallback for
how it is called.
Handler to invoke when name is known to not exist or #f.
See GBusNameVanishedCallback for
how it is called.
User data to pass to handlers.
Function for freeing user-data or #f.
See GDestroyNotify for how it is
called.
Checks if a content type can be executable. Note that for instance things like text files can be executables (i.e. scripts and batch files).
Passed: a string.
a content type string
Returned: a boolean.
#t if the file type corresponds to a type that can be executable,
#f otherwise.
Compares two content types for equality.
Passed: a string.
a content type string
Passed: a string.
a content type string
Returned: a boolean.
#t if the two strings are identical or equivalent, #f
otherwise.
Tries to find a content type based on the mime type name.
Passed: a string.
a mime type string
Returned: a string, or #f.
Newly allocated string with content type or #f. Free with
byte-array:free
Gets the human readable description of the content type.
Passed: a string.
a content type string
Returned: a string.
a short description of the content type type. Free the returned
string with byte-array:free
Gets the generic icon name for a content type.
See the shared-mime-info specification for more on the generic icon name.
Passed: a string.
a content type string
Returned: a string, or #f.
the registered generic icon name for the given type, or #f
if unknown. Free with byte-array:free
Gets the icon for a content type.
Passed: a string.
a content type string
Returned: a <GIcon>.
<GIcon> corresponding to the content type. Free the
returned object with object:unref
Get the list of directories which MIME data is loaded from. See
content-type-set-mime-dirs for
details.
Returned: a vector, each a string.
#f-terminated list of directories to load MIME data from,
including any mime/ subdirectory, and with the first directory to
try listed first
Gets the mime type for the content type, if one is registered.
Passed: a string.
a content type string
Returned: a string, or #f.
the registered mime type for the given type, or #f if
unknown; free with byte-array:free.
Gets the symbolic icon for a content type.
Passed: a string.
a content type string
Returned: a <GIcon>.
symbolic <GIcon> corresponding to the content type.
Free the returned object with object:unref
Guesses the content type based on example data. If the function is
uncertain, result-uncertain will be set to #t. Either
filename or data may be #f, in which case the guess
will be based solely on the other argument.
Passed: a file name, as a string, or #f.
a path, or #f
Passed: a bytevector, or a list or vector, each an unsigned 8-bit
integer, or #f.
a stream of data, or #f
Returned: a string.
a string indicating a guessed content type for the given data. Free
with byte-array:free
Returned: a boolean.
return location for the certainty of the result, or #f
Not passed: guile-gi gives the length of data.
the size of data
Tries to guess the type of the tree with root root, by looking at the files it contains. The result is an array of content types, with the best guess coming first.
The types returned all have the form x-content/foo, e.g. x-content/audio-cdda (for audio CDs) or x-content/image-dcf (for a camera memory card). See the shared-mime-info specification for more on x-content types.
This function is useful in the implementation of mount:guess-content-type.
Determines if type is a subset of supertype.
Passed: a string.
a content type string
Passed: a string.
a content type string
Returned: a boolean.
#t if type is a kind of supertype, #f
otherwise.
Determines if type is a subset of mime-type. Convenience
wrapper around content-type-is-a?.
Passed: a string.
a content type string
Passed: a string.
a mime type string
Returned: a boolean.
#t if type is a kind of mime-type, #f
otherwise.
Checks if the content type is the generic "unknown" type. On UNIX this is the "application/octet-stream" mimetype, while on win32 it is "*" and on OSX it is a dynamic type or octet-stream.
Passed: a string.
a content type string
Returned: a boolean.
#t if the type is the unknown type.
Set the list of directories used by GIO to load the MIME database. If
dirs is #f, the directories used are the default:
mime subdirectory of the directory in $XDG_DATA_HOME
mime subdirectory of every directory in $XDG_DATA_DIRS
This function is intended to be used when writing tests that depend on information stored in the MIME database, in order to control the data.
Typically, in case your tests use G_TEST_OPTION_ISOLATE_DIRS, but
they depend on the system’s MIME database, you should call this function
with dirs set to #f before calling g_test_init(),
for instance:
// Load MIME data from the system g_content_type_set_mime_dirs (NULL); // Isolate the environment g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL); … return g_test_run ();
Passed, or left out: a list or vector, each a string, or #f.
#f-terminated list of directories to load MIME data from,
including any mime/ subdirectory, and with the first directory to
try listed first
Gets a list of strings containing all the registered content types known
to the system. The list and its data should be freed using
g_list_free_full (list, g_free).
Returned: a list, each a string.
list of the registered content types
Escape string so it can appear in a D-Bus address as the value part of a key-value pair.
For instance, if string is /run/bus-for-:0, this function
would return /run/bus-for-%3A0, which could be used in a D-Bus
address like
unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0.
Passed: a string.
an unescaped string to be included in a D-Bus address as the value in a key-value pair
Returned: a string.
a copy of string with all non-optionally-escaped bytes escaped
Synchronously looks up the D-Bus address for the well-known message bus instance specified by bus-type. This may involve using various platform specific mechanisms.
The returned address will be in the D-Bus address format.
Passed: a <GBusType>, or one of its symbols.
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f
Returned: a string.
a valid D-Bus address string for bus-type or #f if
error is set
Asynchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation. address must be in the D-Bus address format.
When the operation is finished, callback will be invoked. You can
then call
dbus-address-get-stream-finish
to get the result of the operation.
This is an asynchronous failable function. See
dbus-address-get-stream-sync
for the synchronous version.
Passed: a string.
A valid D-Bus address.
Passed, or left out: a <GCancellable>, or
#f.
A <GCancellable> or #f.
Passed, or left out: a procedure, or #f.
A GAsyncReadyCallback to call when the
request is satisfied.
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
Data to pass to callback.
Finishes an operation started with
dbus-address-get-stream.
A server is not required to set a GUID, so out-guid may be set to
#f even on success.
Passed: a <GAsyncResult>.
A <GAsyncResult> obtained from the
GAsyncReadyCallback passed to
dbus-address-get-stream.
Returned: a <GIOStream>.
A <GIOStream> or #f if error is set.
Returned: a string, or #f.
#f or return location to store the GUID extracted from
address, if any.
Synchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation. address must be in the D-Bus address format.
A server is not required to set a GUID, so out-guid may be set to
#f even on success.
This is a synchronous failable function. See
dbus-address-get-stream for the
asynchronous version.
Passed: a string.
A valid D-Bus address.
Passed, or left out: a <GCancellable>, or
#f.
A <GCancellable> or #f.
Returned: a <GIOStream>.
A <GIOStream> or #f if error is set.
Returned: a string, or #f.
#f or return location to store the GUID extracted from
address, if any.
Looks up the value of an annotation.
The cost of this function is O(n) in number of annotations.
Passed: a list or vector, each a
<GDBusAnnotationInfo>, or #f.
A #f-terminated array of annotations or #f.
Passed: a string.
The name of the annotation to look up.
Returned: a string, or #f.
The value or #f if not found. Do not free, it is owned by
annotations.
Creates a D-Bus error name to use for error.
If error matches a registered error (see dbus-error:register-error?), the corresponding D-Bus
error name will be returned.
Otherwise the a name of the form
org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE
will be used. This allows other GDBus applications to map the error on
the wire back to a <GError> using
dbus-error:new-for-dbus-error.
This function is typically only used in object mappings to put a
<GError> on the wire. Regular applications
should not use it.
Passed: a <GError>.
an error
Returned: a string.
a D-Bus error name
Gets the D-Bus error name used for error, if any.
This function is guaranteed to return a D-Bus error name for all
<GError>s returned from functions handling
remote method calls (for example, dbus-connection:call-finish) unless dbus-error:strip-remote-error? has already been
used on error.
Passed: a <GError>.
an error
Returned: a string, or #f.
an allocated string, or NULL if the D-Bus error name could not be
found
Checks if error represents an error received via D-Bus from a remote peer.
If so, use dbus-error:get-remote-error to get the name of the
error.
Passed: a <GError>.
an error
Returned: a boolean.
true if error represents an error from a remote peer; false otherwise
Creates a <GError> based on the contents of
dbus-error-name and dbus-error-message.
Errors registered with dbus-error:register-error? will be looked up using
dbus-error-name and if a match is found, the error domain and code
is used. Applications can use dbus-error:get-remote-error to recover
dbus-error-name.
If a match against a registered error is not found and the D-Bus error
name is in a form as returned by dbus-error:encode-gerror the error domain and code
encoded in the name is used to create the
<GError>. Also, dbus-error-name is added
to the error message such that it can be recovered with
dbus-error:get-remote-error.
Otherwise, a <GError> with the error code
Gio.IOErrorEnum.DBUS_ERROR in the
<GIOErrorEnum> error domain is returned. Also,
dbus-error-name is added to the error message such that it can be
recovered with dbus-error:get-remote-error.
In all three cases, dbus-error-name can always be recovered from
the returned <GError> using the
dbus-error:get-remote-error
function (unless dbus-error:strip-remote-error? hasn’t been used on
the returned error).
This function is typically only used in object mappings to prepare
<GError> instances for applications. Regular
applications should not use it.
Returned: an unsigned 32-bit integer.
Creates an association mapping between dbus-error-name and
<GError>s specified by error-domain and
error-code.
This is typically done in the function that returns the
GLib.Quark for an error domain.
Passed: an unsigned 32-bit integer.
a GLib.Quark for an error domain
Passed: a 32-bit integer.
an error code
Passed: a string.
a D-Bus error name
Returned: a boolean.
true if the association was created, false if it already exists
Looks for extra information in the error message used to recover the D-Bus error name and strips it if found.
If stripped, the message field in error will correspond exactly to what was received on the wire.
This is typically used when presenting errors to the end user.
Passed: a <GError>.
an error
Returned: a boolean.
true if information was stripped; false otherwise
Destroys an association previously set up with dbus-error:register-error?.
Passed: an unsigned 32-bit integer.
a GLib.Quark for an error domain
Passed: a 32-bit integer.
an error code
Passed: a string.
a D-Bus error name
Returned: a boolean.
true if the association was destroyed, false if it wasn’t found
This is a language binding friendly version of
dbus-escape-object-path-bytestring.
Passed: a string.
the string to escape
Returned: a string.
an escaped version of s. Free with
byte-array:free.
Escapes bytes for use in a D-Bus object path component. bytes is an array of zero or more nonzero bytes in an unspecified encoding, followed by a single zero byte.
The escaping method consists of replacing all non-alphanumeric
characters (see g_ascii_isalnum()) with their hexadecimal value
preceded by an underscore (_). For example: foo.bar.baz
will become foo_2ebar_2ebaz.
This method is appropriate to use when the input is nearly a valid object path component but is not when your input is far from being a valid object path component. Other escaping algorithms are also valid to use with D-Bus object paths.
This can be reversed with
dbus-unescape-object-path.
Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.
the string of bytes to escape
Returned: a string.
an escaped version of bytes. Free with
byte-array:free.
Generate a D-Bus GUID that can be used with e.g.
dbus-connection:new.
See the D-Bus specification regarding what strings are valid D-Bus GUIDs. The specification refers to these as ‘UUIDs’ whereas GLib (for historical reasons) refers to them as ‘GUIDs’. The terms are interchangeable.
Note that D-Bus GUIDs do not follow RFC 4122.
Returned: a string.
A valid D-Bus GUID. Free with byte-array:free.
Converts a <GValue> to a
<GVariant> of the type indicated by the
type parameter.
The conversion is using the following rules:
G_TYPE_STRING: ’s’, ’o’, ’g’ or ’ay’
G_TYPE_STRV: ’as’, ’ao’ or ’aay’
G_TYPE_BOOLEAN: ’b’
G_TYPE_UCHAR: ’y’
G_TYPE_INT: ’i’, ’n’
G_TYPE_UINT: ’u’, ’q’
G_TYPE_INT64: ’x’
G_TYPE_UINT64: ’t’
G_TYPE_DOUBLE: ’d’
G_TYPE_VARIANT: Any <GVariantType>
This can fail if e.g. gvalue is of type G_TYPE_STRING and
type is ’i’, i.e. G_VARIANT_TYPE_INT32. It will also fail
for any GType (including e.g. G_TYPE_OBJECT and
G_TYPE_BOXED derived-types) not in the table above.
Note that if gvalue is of type G_TYPE_VARIANT and its value
is #f, the empty <GVariant> instance
(never #f) for type is returned (e.g. 0 for scalar types,
the empty string for string types, ’/’ for object path types, the empty
array for any array type and so on).
See the dbus-gvariant-to-gvalue!
function for how to convert a <GVariant> to a
<GValue>.
Passed: a <GValue>.
A <GValue> to convert to a
<GVariant>
Passed: a <GVariantType>.
Returned: a <GVariant>.
A <GVariant> (never floating) of
<GVariantType> type holding the
data from gvalue or an empty <GVariant>
in case of failure. Free with variant:unref.
Converts a <GVariant> to a
<GValue>. If value is floating, it is
consumed.
The rules specified in the
dbus-gvalue-to-gvariant function
are used - this function is essentially its reverse form. So, a
<GVariant> containing any basic or string
array type will be converted to a <GValue>
containing a basic value or string array. Any other
<GVariant> (handle, variant, tuple, dict
entry) will be converted to a <GValue>
containing that <GVariant>.
The conversion never fails - a valid
<GValue> is always returned in
out-gvalue.
Passed: a <GVariant>.
A <GVariant>.
Passed, filled in, and returned: a <GValue>.
Return location pointing to a zero-filled (uninitialized)
<GValue>.
Checks if string is a D-Bus address.
This doesn’t check if string is actually supported by
<GDBusServer> or
<GDBusConnection> - use
dbus-is-supported-address? to do
more checks.
Passed: a string.
A string.
Returned: a boolean.
#t if string is a valid D-Bus address, #f otherwise.
Check whether string is a valid D-Bus error name.
This function returns the same result as
dbus-is-interface-name?, because
D-Bus error names are defined to have exactly the same syntax as
interface names.
Passed: a string.
The string to check.
Returned: a boolean.
#t if valid, #f otherwise.
Checks if string is a D-Bus GUID.
See the documentation for
dbus-generate-guid for more information
about the format of a GUID.
Passed: a string.
The string to check.
Returned: a boolean.
#t if string is a GUID, #f otherwise.
Checks if string is a valid D-Bus interface name.
Passed: a string.
The string to check.
Returned: a boolean.
#t if valid, #f otherwise.
Checks if string is a valid D-Bus member (e.g. signal or method) name.
Passed: a string.
The string to check.
Returned: a boolean.
#t if valid, #f otherwise.
Checks if string is a valid D-Bus bus name (either unique or well-known).
Passed: a string.
The string to check.
Returned: a boolean.
#t if valid, #f otherwise.
Like dbus-is-address? but also checks if
the library supports the transports in string and that key/value
pairs for each transport are valid. See the specification of the
D-Bus
address format.
Passed: a string.
A string.
Returned: a boolean.
#t if string is a valid D-Bus address that is supported by
this library, #f if error is set.
Checks if string is a valid D-Bus unique bus name.
Passed: a string.
The string to check.
Returned: a boolean.
#t if valid, #f otherwise.
Unescapes an string that was previously escaped with
dbus-escape-object-path. If the
string is in a format that could not have been returned by
dbus-escape-object-path, this
function returns #f.
Encoding alphanumeric characters which do not need to be encoded is not
allowed (e.g _63 is not valid, the string should contain c
instead).
Passed: a string.
the string to unescape
Returned: a bytevector, or #f.
an unescaped version of s, or #f if s is not a string
returned from
dbus-escape-object-path. Free
with byte-array:free.
Creates a new <GDtlsClientConnection>
wrapping base-socket which is assumed to communicate with the
server identified by server-identity.
Passed: a <GDatagramBased>.
the <GDatagramBased> to wrap
Passed, or left out: a
<GSocketConnectable>, or #f.
the expected identity of the server
Returned: a <GDtlsClientConnection>.
the new <GDtlsClientConnection>, or
#f on error
Creates a new <GDtlsServerConnection>
wrapping base-socket.
Passed: a <GDatagramBased>.
the <GDatagramBased> to wrap
Passed, or left out: a <GTlsCertificate>,
or #f.
the default server certificate, or #f
Returned: a <GDtlsServerConnection>.
the new <GDtlsServerConnection>, or
#f on error
Constructs a <GFile> from a vector of elements using
the correct separator for filenames.
Using this function is equivalent to calling
build-filenamev, followed by
file-new-for-path on the result.
Creates a <GFile> with the given argument from the
command line. The value of arg can be either a URI, an absolute
path or a relative path resolved relative to the current working
directory. This operation never fails, but the returned object might
not support any I/O operation if arg points to a malformed path.
Note that on Windows, this function expects its argument to be in UTF-8
– not the system code page. This means that you should not use this
function with string from argv as it is passed to main().
g_win32_get_command_line() will return a UTF-8 version of the
commandline. <GApplication> also uses UTF-8
but application-command-line:create-file-for-arg may
be more useful for you there. It is also always possible to use this
function with GOptionContext arguments of type
filename.
Passed: a file name, as a string.
a command line string
Returned: a <GFile>.
a new <GFile>. Free the returned object with
object:unref.
Creates a <GFile> with the given argument from the
command line.
This function is similar to
file-new-for-commandline-arg
except that it allows for passing the current working directory as an
argument instead of using the current working directory of the process.
This is useful if the commandline argument was given in a context other than the invocation of the current process.
Constructs a <GFile> for a given path. This
operation never fails, but the returned object might not support any I/O
operation if path is malformed.
Passed: a file name, as a string.
a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
Returned: a <GFile>.
a new <GFile> for the given path. Free the
returned object with object:unref.
Constructs a <GFile> for a given URI. This operation
never fails, but the returned object might not support any I/O operation
if uri is malformed or if the uri type is not supported.
Passed: a string.
a UTF-8 string containing a URI
Returned: a <GFile>.
a new <GFile> for the given uri. Free the
returned object with object:unref.
Opens a file in the preferred directory for temporary files (as returned
by get-tmp-dir) and returns a
<GFile> and
<GFileIOStream> pointing to it.
tmpl should be a string in the GLib file name encoding containing
a sequence of six ’X’ characters, and containing no directory
components. If it is #f, a default template is used.
Unlike the other <GFile> constructors, this will
return #f if a temporary file could not be created.
Passed, or left out: a file name, as a string, or #f.
Template for the file name, as in
file-open-tmp, or #f for a
default template
Returned: a <GFile>.
a new <GFile>. Free the returned object with
object:unref.
Returned: a <GFileIOStream>.
on return, a <GFileIOStream> for the created
file
Asynchronously opens a file in the preferred directory for temporary
files (as returned by get-tmp-dir) as
file-new-tmp.
tmpl should be a string in the GLib file name encoding containing
a sequence of six ’X’ characters, and containing no directory
components. If it is #f, a default template is used.
Passed: a file name, as a string, or #f.
Template for the file name, as in
file-open-tmp, or #f for a
default template
Passed: a 32-bit integer.
the I/O priority of the request
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Asynchronously creates a directory in the preferred directory for
temporary files (as returned by
get-tmp-dir) as
dir-make-tmp.
tmpl should be a string in the GLib file name encoding containing
a sequence of six ’X’ characters, and containing no directory
components. If it is #f, a default template is used.
Passed: a file name, as a string, or #f.
Template for the file name, as in
dir-make-tmp, or #f for a default
template
Passed: a 32-bit integer.
the I/O priority of the request
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes a temporary directory creation started by
file-new-tmp-dir-async.
Passed: a <GAsyncResult>.
Returned: a <GFile>.
a new <GFile>. Free the returned object with
object:unref.
Finishes a temporary file creation started by
file-new-tmp-async.
Passed: a <GAsyncResult>.
Returned: a <GFile>.
a new <GFile>. Free the returned object with
object:unref.
Returned: a <GFileIOStream>.
on return, a <GFileIOStream> for the created
file
Constructs a <GFile> with the given parse-name
(i.e. something given by file:get-parse-name). This operation never fails, but
the returned object might not support any I/O operation if the
parse-name cannot be parsed.
Deserializes a <GIcon> previously serialized using
icon:serialize.
Passed: a <GVariant>.
a <GVariant> created with icon:serialize
Returned: a <GIcon>, or #f.
a <GIcon>, or #f when deserialization fails.
Generate a <GIcon> instance from str. This
function can fail if str is not valid - see icon:to-string for discussion.
If your application or library provides one or more
<GIcon> implementations you need to ensure that each
GType is registered with the type system prior to calling
icon-new-for-string.
Passed: a string.
A string obtained via icon:to-string.
Returned: a <GIcon>.
An object implementing the <GIcon> interface or
#f if error is set.
Converts errno.h error codes into GIO error codes.
The fallback value failed is returned for
error codes not currently handled (but note that future GLib releases
may return a more specific value instead).
As errno is global and may be modified by intermediate function
calls, you should save its value immediately after the call returns, and
use the saved value instead of errno:
int saved_errno; ret = read (blah); saved_errno = errno; g_io_error_from_errno (saved_errno);
Passed: a 32-bit integer.
Error number as defined in errno.h.
Returned: a <GIOErrorEnum>.
<GIOErrorEnum> value for the given
errno.h error number
Converts <%GFileError> error codes into GIO
error codes.
Passed: a <%GFileError>, or one of its
symbols.
Returned: a <GIOErrorEnum>.
<GIOErrorEnum> value for the given
<%GFileError> error value.
Gets the GIO Error Quark.
Returned: an unsigned 32-bit integer.
a GQuark.
Loads all the modules in the specified directory.
If don’t require all modules to be initialized (and thus registering all
gtypes) then you can use
io-modules-scan-all-in-directory
which allows delayed/lazy loading of modules.
Passed: a file name, as a string.
pathname for a directory containing modules to load.
Returned: a list, each a <GIOModule>.
a list of GIOModules loaded from the directory, All the modules
are loaded into memory, if you want to unload them (enabling on-demand
loading) you must call type-module:unuse on all the modules. Free the list
with g_list_free().
Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
This may not actually load and initialize all the types in each module,
some modules may be lazily loaded and initialized when an extension
point it implements is used with e.g.
g_io_extension_point_get_extensions() or
g_io_extension_point_get_extension_by_name().
If you need to guarantee that all types are loaded in all the modules,
use
io-modules-load-all-in-directory.
Passed: a file name, as a string.
pathname for a directory containing modules to scan.
Creates a keyfile-backed
<GSettingsBackend>.
The filename of the keyfile to use is given by filename.
All settings read to or written from the backend must fall under the
path given in root-path (which must start and end with a slash and
not contain two consecutive slashes). root-path may be
"/".
If root-group is non-NULL then it specifies the name of the
keyfile group used for keys that are written directly below
root-path. For example, if root-path is
"/apps/example/" and root-group is "toplevel", then
setting the key "/apps/example/enabled" to true will cause the
following to appear in the keyfile:
[toplevel] enabled=true
If root-group is NULL then it is not permitted to store
keys directly below the root-path.
For keys not stored directly below root-path (ie: in a sub-path),
the name of the subpath (with the final slash stripped) is used as the
name of the keyfile group. To continue the example, if
"/apps/example/profiles/default/font-size" were set to 12
then the following would appear in the keyfile:
[profiles/default] font-size=12
The backend will refuse writes (and return writability as being false)
for keys outside of root-path and, in the event that
root-group is NULL, also for keys directly under
root-path. Writes will also be refused if the backend detects
that it has the inability to rewrite the keyfile (ie: the containing
directory is not writable).
There is no checking done for your key namespace clashing with the
syntax of the key file format. For example, if you have [ or
] characters in your path names or = in your key names you
may be in trouble.
The backend reads default values from a keyfile called defaults
in the directory specified by the
GKeyfileSettingsBackend:defaults-dir property, and a list of
locked keys from a text file with the name locks in the same
location.
Passed: a string.
the filename of the keyfile
Passed: a string.
the path under which all settings keys appear
Passed, or left out: a string, or #f.
the group name corresponding to root-path, or NULL to
disallow storing keys directly beneath root-path
Returned: a <GSettingsBackend>.
a keyfile-backed <GSettingsBackend>
Gets a reference to the default
<GMemoryMonitor> for the system.
Returned: a <GMemoryMonitor>.
a new reference to the default
<GMemoryMonitor>
Creates a memory-backed
<GSettingsBackend>.
This backend allows changes to settings, but does not write them to any backing storage, so the next time you run your application, the memory backend will start out with the default values again.
Returned: a <GSettingsBackend>.
a newly created <GSettingsBackend>
Gets the default <GNetworkMonitor> for the
system.
Returned: a <GNetworkMonitor>.
a <GNetworkMonitor>, which will be a dummy
object if no network monitor is available
Initializes the platform networking libraries (eg, on Windows, this
calls WSAStartup()). GLib will call this itself if it is needed,
so you only need to call it if you directly call system networking
functions (without calling any GLib networking functions first).
Creates a readonly <GSettingsBackend>.
This backend does not allow changes to settings, so all settings will always have their default values.
Returned: a <GSettingsBackend>.
a newly created <GSettingsBackend>
Utility method for
<GPollableInputStream> and
<GPollableOutputStream>
implementations. Creates a new <GSource> that
expects a callback of type
GPollableSourceFunc. The new source
does not actually do anything on its own; use source:add-child-source to add other sources to
it to cause it to trigger.
Utility method for
<GPollableInputStream> and
<GPollableOutputStream>
implementations. Creates a new <GSource>, as
with pollable-source-new, but also
attaching child-source (with a dummy callback), and
cancellable, if they are non-#f.
Passed: a <GObject>.
the stream associated with the new source
Passed, or left out: a <GSource>, or
#f.
optional child source to attach
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> to attach
Returned: a <GSource>.
the new <GSource>.
Tries to read from stream, as with input-stream:read! (if blocking is #t) or
pollable-input-stream:read-nonblocking! (if
blocking is #f). This can be used to more easily share
code between blocking and non-blocking implementations of a method.
If blocking is #f, then stream must be a
<GPollableInputStream> for which
pollable-input-stream:can-poll? returns #t, or else
the behavior is undefined. If blocking is #t, then
stream does not need to be a
<GPollableInputStream>.
Passed: a <GInputStream>.
Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.
a buffer to read data into
Passed: a boolean.
whether to do blocking I/O
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Returned: a 64-bit integer.
the number of bytes read, or -1 on error.
Not passed: guile-gi gives the length of buffer.
the number of bytes to read
Tries to write to stream, as with output-stream:write (if blocking is #t) or
pollable-output-stream:write-nonblocking (if
blocking is #f). This can be used to more easily share
code between blocking and non-blocking implementations of a method.
If blocking is #f, then stream must be a
<GPollableOutputStream> for which
pollable-output-stream:can-poll? returns #t or else
the behavior is undefined. If blocking is #t, then
stream does not need to be a
<GPollableOutputStream>.
Passed: a <GOutputStream>.
Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.
the buffer containing the data to write.
Passed: a boolean.
whether to do blocking I/O
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Returned: a 64-bit integer.
the number of bytes written, or -1 on error.
Not passed: guile-gi gives the length of buffer.
the number of bytes to write
Tries to write count bytes to stream, as with
output-stream:write-all, but using
pollable-stream-write rather than
output-stream:write.
On a successful write of count bytes, #t is returned, and
bytes-written is set to count.
If there is an error during the operation (including
would-block in the non-blocking case),
#f is returned and error is set to indicate the error
status, bytes-written is updated to contain the number of bytes
written into the stream before the error occurred.
As with pollable-stream-write, if
blocking is #f, then stream must be a
<GPollableOutputStream> for which
pollable-output-stream:can-poll? returns #t or else
the behavior is undefined. If blocking is #t, then
stream does not need to be a
<GPollableOutputStream>.
Passed: a <GOutputStream>.
Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.
the buffer containing the data to write.
Passed: a boolean.
whether to do blocking I/O
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Returned: a boolean.
#t on success, #f if there was an error
Returned: an unsigned 64-bit integer.
location to store the number of bytes that was written to the stream
Not passed: guile-gi gives the length of buffer.
the number of bytes to write
Gets a reference to the default
<GPowerProfileMonitor> for the system.
Returned: a <GPowerProfileMonitor>.
a new reference to the default
<GPowerProfileMonitor>
Find the gio-proxy extension point for a proxy implementation
that supports the specified protocol.
Gets the default <GProxyResolver> for the
system.
Returned: a <GProxyResolver>.
the default <GProxyResolver>, which will be
a dummy object if no proxy resolver is available
Gets the <GResolver> Error Quark.
Returned: an unsigned 32-bit integer.
a GQuark.
Gets the <GResource> Error Quark.
Returned: an unsigned 32-bit integer.
a GLib.Quark
Loads a binary resource bundle and creates a
<GResource> representation of it, allowing you to
query it for data.
If you want to use this resource in the global resource namespace you
need to register it with
resources-register.
If filename is empty or the data in it is corrupt,
internal will be returned. If
filename doesn’t exist, or there is an error in reading it, an
error from mapped-file:new will be
returned.
Passed: a file name, as a string.
the path of a filename to load, in the GLib filename encoding
Returned: a <GResource>.
a new <GResource>, or NULL on error
Returns all the names of children at the specified path in the set of globally registered resources.
The return result is a NULL terminated list of strings which
should be released with strfreev.
lookup-flags controls the behaviour of the lookup.
Passed: a string.
A path name inside the resource
Passed: a <GResourceLookupFlags>, or a
list of its symbols, or one of them.
Returned: a vector, each a string.
an array of constant strings
Looks for a file at the specified path in the set of globally registered resources and if found returns information about it.
lookup-flags controls the behaviour of the lookup.
Passed: a string.
A path name inside the resource
Passed: a <GResourceLookupFlags>, or a
list of its symbols, or one of them.
Returned: a boolean.
TRUE if the file was found, FALSE if there were errors
Returned: an unsigned 64-bit integer.
a location to place the length of the contents of the file, or
NULL if the length is not needed
Returned: an unsigned 32-bit integer.
a location to place the <GResourceFlags>
about the file, or NULL if the flags are not needed
Returns whether the specified path in the set of globally registered resources has children.
Passed: a string.
A pathname
Returned: a boolean.
#t if patch has children
Looks for a file at the specified path in the set of globally
registered resources and returns a <GBytes>
that lets you directly access the data in memory.
The data is always followed by a zero byte, so you can safely use the
data as a C string. However, that byte is not included in the size of
the <GBytes>.
For uncompressed resource files this is a pointer directly into the resource bundle, which is typically in some read-only data section in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data.
lookup-flags controls the behaviour of the lookup.
Passed: a string.
A path name inside the resource
Passed: a <GResourceLookupFlags>, or a
list of its symbols, or one of them.
Returned: a <GBytes>.
<GBytes> or NULL on error
Looks for a file at the specified path in the set of globally
registered resources and returns a
<GInputStream> that lets you read the data.
lookup-flags controls the behaviour of the lookup.
Passed: a string.
A path name inside the resource
Passed: a <GResourceLookupFlags>, or a
list of its symbols, or one of them.
Returned: a <GInputStream>.
<GInputStream> or NULL on error
Registers the resource with the process-global set of resources.
Once a resource is registered the files in it can be accessed with the
global resource lookup functions like
resources-lookup-data.
Passed: a <GResource>.
Unregisters the resource from the process-global set of resources.
Passed: a <GResource>.
Gets the default system schema source.
This function is not required for normal uses of
<GSettings> but it may be useful to authors of
plugin management systems or to those who want to introspect the content
of schemas.
If no schemas are installed, #f will be returned.
The returned source may actually consist of multiple schema sources from
different directories, depending on which directories were given in
XDG_DATA_DIRS and GSETTINGS_SCHEMA_DIR. For this reason,
all lookups performed against the default source should probably be done
recursively.
Returned: a <GSettingsSchemaSource>,
or #f.
the default schema source
Gets the default <GTlsBackend> for the system.
Returned: a <GTlsBackend>.
a <GTlsBackend>, which will be a dummy object
if no TLS backend is available
Gets the TLS channel binding error quark.
Returned: an unsigned 32-bit integer.
a GQuark.
Creates a new <GTlsClientConnection>
wrapping base-io-stream (which must have pollable input and output
streams) which is assumed to communicate with the server identified by
server-identity.
See the documentation for tls-connection:base-io-stream for restrictions on when
application code can run operations on the base-io-stream after
this function has returned.
Passed: a <GIOStream>.
the <GIOStream> to wrap
Passed, or left out: a
<GSocketConnectable>, or #f.
the expected identity of the server
Returned: a <GTlsClientConnection>.
the new <GTlsClientConnection>, or
#f on error
Gets the TLS error quark.
Returned: an unsigned 32-bit integer.
a GQuark.
Creates a new <GTlsFileDatabase> which
uses anchor certificate authorities in anchors to verify
certificate chains.
The certificates in anchors must be PEM encoded.
Passed: a file name, as a string.
filename of anchor certificate authorities.
Returned: a <GTlsFileDatabase>.
the new <GTlsFileDatabase>, or #f
on error
Creates a new <GTlsServerConnection>
wrapping base-io-stream (which must have pollable input and output
streams).
See the documentation for tls-connection:base-io-stream for restrictions on when
application code can run operations on the base-io-stream after
this function has returned.
Passed: a <GIOStream>.
the <GIOStream> to wrap
Passed, or left out: a <GTlsCertificate>,
or #f.
the default server certificate, or #f
Returned: a <GTlsServerConnection>.
the new <GTlsServerConnection>, or
#f on error