gio.global

Undocumented in source.

Members

Functions

busGet
void busGet(gio.types.BusType busType, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously connects to the message bus specified by bus_type.

busGetFinish
gio.dbus_connection.DBusConnection busGetFinish(gio.async_result.AsyncResult res)

Finishes an operation started with gio.global.busGet.

busGetSync
gio.dbus_connection.DBusConnection busGetSync(gio.types.BusType busType, gio.cancellable.Cancellable cancellable)

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.

busOwnName
uint busOwnName(gio.types.BusType busType, string name, gio.types.BusNameOwnerFlags flags, gobject.closure.Closure busAcquiredClosure, gobject.closure.Closure nameAcquiredClosure, gobject.closure.Closure nameLostClosure)

Version of gio.global.busOwnName using closures instead of callbacks for easier binding in other languages.

busOwnNameOnConnection
uint busOwnNameOnConnection(gio.dbus_connection.DBusConnection connection, string name, gio.types.BusNameOwnerFlags flags, gobject.closure.Closure nameAcquiredClosure, gobject.closure.Closure nameLostClosure)

Version of gio.global.busOwnNameOnConnection using closures instead of callbacks for easier binding in other languages.

busUnownName
void busUnownName(uint ownerId)

Stops owning a name.

busUnwatchName
void busUnwatchName(uint watcherId)

Stops watching a name.

busWatchName
uint busWatchName(gio.types.BusType busType, string name, gio.types.BusNameWatcherFlags flags, gobject.closure.Closure nameAppearedClosure, gobject.closure.Closure nameVanishedClosure)

Version of gio.global.busWatchName using closures instead of callbacks for easier binding in other languages.

busWatchNameOnConnection
uint busWatchNameOnConnection(gio.dbus_connection.DBusConnection connection, string name, gio.types.BusNameWatcherFlags flags, gobject.closure.Closure nameAppearedClosure, gobject.closure.Closure nameVanishedClosure)

Version of gio.global.busWatchNameOnConnection using closures instead of callbacks for easier binding in other languages.

contentTypeCanBeExecutable
bool contentTypeCanBeExecutable(string type)

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).

contentTypeEquals
bool contentTypeEquals(string type1, string type2)

Compares two content types for equality.

contentTypeFromMimeType
string contentTypeFromMimeType(string mimeType)

Tries to find a content type based on the mime type name.

contentTypeGetDescription
string contentTypeGetDescription(string type)

Gets the human readable description of the content type.

contentTypeGetGenericIconName
string contentTypeGetGenericIconName(string type)

Gets the generic icon name for a content type.

contentTypeGetIcon
gio.icon.Icon contentTypeGetIcon(string type)

Gets the icon for a content type.

contentTypeGetMimeDirs
string[] contentTypeGetMimeDirs()

Get the list of directories which MIME data is loaded from. See gio.global.contentTypeSetMimeDirs for details.

contentTypeGetMimeType
string contentTypeGetMimeType(string type)

Gets the mime type for the content type, if one is registered.

contentTypeGetSymbolicIcon
gio.icon.Icon contentTypeGetSymbolicIcon(string type)

Gets the symbolic icon for a content type.

contentTypeGuess
string contentTypeGuess(string filename, ubyte[] data, bool resultUncertain)

Guesses the content type based on example data. If the function is uncertain, result_uncertain will be set to true. Either filename or data may be null, in which case the guess will be based solely on the other argument.

contentTypeGuessForTree
string[] contentTypeGuessForTree(gio.file.File root)

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.

contentTypeIsA
bool contentTypeIsA(string type, string supertype)

Determines if type is a subset of supertype.

contentTypeIsMimeType
bool contentTypeIsMimeType(string type, string mimeType)

Determines if type is a subset of mime_type. Convenience wrapper around gio.global.contentTypeIsA.

contentTypeIsUnknown
bool contentTypeIsUnknown(string type)

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.

contentTypeSetMimeDirs
void contentTypeSetMimeDirs(string[] dirs)

Set the list of directories used by GIO to load the MIME database. If dirs is null, the directories used are the default:

contentTypesGetRegistered
string[] contentTypesGetRegistered()

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).

dbusAddressEscapeValue
string dbusAddressEscapeValue(string string_)

Escape string so it can appear in a D-Bus address as the value part of a key-value pair.

dbusAddressGetForBusSync
string dbusAddressGetForBusSync(gio.types.BusType busType, gio.cancellable.Cancellable cancellable)

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.

dbusAddressGetStream
void dbusAddressGetStream(string address, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

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.

dbusAddressGetStreamFinish
gio.iostream.IOStream dbusAddressGetStreamFinish(gio.async_result.AsyncResult res, string outGuid)

Finishes an operation started with gio.global.dbusAddressGetStream.

dbusAddressGetStreamSync
gio.iostream.IOStream dbusAddressGetStreamSync(string address, string outGuid, gio.cancellable.Cancellable cancellable)

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.

dbusEscapeObjectPath
string dbusEscapeObjectPath(string s)

This is a language binding friendly version of gio.global.dbusEscapeObjectPathBytestring.

dbusEscapeObjectPathBytestring
string dbusEscapeObjectPathBytestring(ubyte[] bytes)

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.

dbusGenerateGuid
string dbusGenerateGuid()

Generate a D-Bus GUID that can be used with e.g. gio.dbus_connection.DBusConnection.new_.

dbusGvalueToGvariant
glib.variant.VariantG dbusGvalueToGvariant(gobject.value.Value gvalue, glib.variant_type.VariantType type)

Converts a #GValue to a #GVariant of the type indicated by the type parameter.

dbusGvariantToGvalue
void dbusGvariantToGvalue(glib.variant.VariantG value, gobject.value.Value outGvalue)

Converts a #GVariant to a #GValue. If value is floating, it is consumed.

dbusIsAddress
bool dbusIsAddress(string string_)

Checks if string is a D-Bus address.

dbusIsErrorName
bool dbusIsErrorName(string string_)

Check whether string is a valid D-Bus error name.

dbusIsGuid
bool dbusIsGuid(string string_)

Checks if string is a D-Bus GUID.

dbusIsInterfaceName
bool dbusIsInterfaceName(string string_)

Checks if string is a valid D-Bus interface name.

dbusIsMemberName
bool dbusIsMemberName(string string_)

Checks if string is a valid D-Bus member (e.g. signal or method) name.

dbusIsName
bool dbusIsName(string string_)

Checks if string is a valid D-Bus bus name (either unique or well-known).

dbusIsSupportedAddress
bool dbusIsSupportedAddress(string string_)

Like gio.global.dbusIsAddress 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.

dbusIsUniqueName
bool dbusIsUniqueName(string string_)

Checks if string is a valid D-Bus unique bus name.

dbusUnescapeObjectPath
ubyte[] dbusUnescapeObjectPath(string s)

Unescapes an string that was previously escaped with gio.global.dbusEscapeObjectPath. If the string is in a format that could not have been returned by gio.global.dbusEscapeObjectPath, this function returns null.

ioErrorFromErrno
gio.types.IOErrorEnum ioErrorFromErrno(int errNo)

Converts errno.h error codes into GIO error codes.

ioErrorFromFileError
gio.types.IOErrorEnum ioErrorFromFileError(glib.types.FileError fileError)

Converts #GFileError error codes into GIO error codes.

ioErrorQuark
glib.types.Quark ioErrorQuark()

Gets the GIO Error Quark.

ioModulesScanAllInDirectory
void ioModulesScanAllInDirectory(string dirname)

Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.

ioModulesScanAllInDirectoryWithScope
void ioModulesScanAllInDirectoryWithScope(string dirname, gio.iomodule_scope.IOModuleScope scope_)

Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.

ioSchedulerCancelAllJobs
void ioSchedulerCancelAllJobs()

Cancels all cancellable I/O jobs.

ioSchedulerPushJob
void ioSchedulerPushJob(gio.types.IOSchedulerJobFunc jobFunc, int ioPriority, gio.cancellable.Cancellable cancellable)

Schedules the I/O job to run in another thread.

keyfileSettingsBackendNew
gio.settings_backend.SettingsBackend keyfileSettingsBackendNew(string filename, string rootPath, string rootGroup)

Creates a keyfile-backed #GSettingsBackend.

memorySettingsBackendNew
gio.settings_backend.SettingsBackend memorySettingsBackendNew()

Creates a memory-backed #GSettingsBackend.

networkingInit
void networkingInit()

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).

nullSettingsBackendNew
gio.settings_backend.SettingsBackend nullSettingsBackendNew()

Creates a readonly #GSettingsBackend.

pollableSourceNew
glib.source.Source pollableSourceNew(gobject.object.ObjectG pollableStream)

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 glib.source.Source.addChildSource to add other sources to it to cause it to trigger.

pollableSourceNewFull
glib.source.Source pollableSourceNewFull(gobject.object.ObjectG pollableStream, glib.source.Source childSource, gio.cancellable.Cancellable cancellable)

Utility method for #GPollableInputStream and #GPollableOutputStream implementations. Creates a new #GSource, as with gio.global.pollableSourceNew, but also attaching child_source (with a dummy callback), and cancellable, if they are non-null.

pollableStreamRead
ptrdiff_t pollableStreamRead(gio.input_stream.InputStream stream, ubyte[] buffer, bool blocking, gio.cancellable.Cancellable cancellable)

Tries to read from stream, as with gio.input_stream.InputStream.read (if blocking is true) or gio.pollable_input_stream.PollableInputStream.readNonblocking (if blocking is false). This can be used to more easily share code between blocking and non-blocking implementations of a method.

pollableStreamWrite
ptrdiff_t pollableStreamWrite(gio.output_stream.OutputStream stream, ubyte[] buffer, bool blocking, gio.cancellable.Cancellable cancellable)

Tries to write to stream, as with gio.output_stream.OutputStream.write (if blocking is true) or gio.pollable_output_stream.PollableOutputStream.writeNonblocking (if blocking is false). This can be used to more easily share code between blocking and non-blocking implementations of a method.

pollableStreamWriteAll
bool pollableStreamWriteAll(gio.output_stream.OutputStream stream, ubyte[] buffer, bool blocking, size_t bytesWritten, gio.cancellable.Cancellable cancellable)

Tries to write count bytes to stream, as with gio.output_stream.OutputStream.writeAll, but using gio.global.pollableStreamWrite rather than gio.output_stream.OutputStream.write.

resourcesEnumerateChildren
string[] resourcesEnumerateChildren(string path, gio.types.ResourceLookupFlags lookupFlags)

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 glib.global.strfreev.

resourcesGetInfo
bool resourcesGetInfo(string path, gio.types.ResourceLookupFlags lookupFlags, size_t size, uint flags)

Looks for a file at the specified path in the set of globally registered resources and if found returns information about it.

resourcesLookupData
glib.bytes.Bytes resourcesLookupData(string path, gio.types.ResourceLookupFlags lookupFlags)

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.

resourcesOpenStream
gio.input_stream.InputStream resourcesOpenStream(string path, gio.types.ResourceLookupFlags lookupFlags)

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.

resourcesRegister
void resourcesRegister(gio.resource.Resource resource)

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 gio.global.resourcesLookupData.

resourcesUnregister
void resourcesUnregister(gio.resource.Resource resource)

Unregisters the resource from the process-global set of resources.

simpleAsyncReportGerrorInIdle
void simpleAsyncReportGerrorInIdle(gobject.object.ObjectG object, gio.types.AsyncReadyCallback callback, glib.error.ErrorG error)

Reports an error in an idle function. Similar to gio.global.simpleAsyncReportErrorInIdle, but takes a #GError rather than building a new one.

unixIsMountPathSystemInternal
bool unixIsMountPathSystemInternal(string mountPath)

Determines if mount_path is considered an implementation of the OS. This is primarily used for hiding mountable and mounted volumes that only are used in the OS and has little to no relevance to the casual user.

unixIsSystemDevicePath
bool unixIsSystemDevicePath(string devicePath)

Determines if device_path is considered a block device path which is only used in implementation of the OS. This is primarily used for hiding mounted volumes that are intended as APIs for programs to read, and system administrators at a shell; rather than something that should, for example, appear in a GUI. For example, the Linux /proc filesystem.

unixIsSystemFsType
bool unixIsSystemFsType(string fsType)

Determines if fs_type is considered a type of file system which is only used in implementation of the OS. This is primarily used for hiding mounted volumes that are intended as APIs for programs to read, and system administrators at a shell; rather than something that should, for example, appear in a GUI. For example, the Linux /proc filesystem.

unixMountAt
gio.unix_mount_entry.UnixMountEntry unixMountAt(string mountPath, ulong timeRead)

Gets a #GUnixMountEntry for a given mount path. If time_read is set, it will be filled with a unix timestamp for checking if the mounts have changed since with gio.global.unixMountsChangedSince.

unixMountCompare
int unixMountCompare(gio.unix_mount_entry.UnixMountEntry mount1, gio.unix_mount_entry.UnixMountEntry mount2)

Compares two unix mounts.

unixMountCopy
gio.unix_mount_entry.UnixMountEntry unixMountCopy(gio.unix_mount_entry.UnixMountEntry mountEntry)

Makes a copy of mount_entry.

unixMountFor
gio.unix_mount_entry.UnixMountEntry unixMountFor(string filePath, ulong timeRead)

Gets a #GUnixMountEntry for a given file path. If time_read is set, it will be filled with a unix timestamp for checking if the mounts have changed since with gio.global.unixMountsChangedSince.

unixMountFree
void unixMountFree(gio.unix_mount_entry.UnixMountEntry mountEntry)

Frees a unix mount.

unixMountGetDevicePath
string unixMountGetDevicePath(gio.unix_mount_entry.UnixMountEntry mountEntry)

Gets the device path for a unix mount.

unixMountGetFsType
string unixMountGetFsType(gio.unix_mount_entry.UnixMountEntry mountEntry)

Gets the filesystem type for the unix mount.

unixMountGetMountPath
string unixMountGetMountPath(gio.unix_mount_entry.UnixMountEntry mountEntry)

Gets the mount path for a unix mount.

unixMountGetOptions
string unixMountGetOptions(gio.unix_mount_entry.UnixMountEntry mountEntry)

Gets a comma-separated list of mount options for the unix mount. For example, rw,relatime,seclabel,data=ordered.

unixMountGetRootPath
string unixMountGetRootPath(gio.unix_mount_entry.UnixMountEntry mountEntry)

Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes.

unixMountGuessCanEject
bool unixMountGuessCanEject(gio.unix_mount_entry.UnixMountEntry mountEntry)

Guesses whether a Unix mount can be ejected.

unixMountGuessIcon
gio.icon.Icon unixMountGuessIcon(gio.unix_mount_entry.UnixMountEntry mountEntry)

Guesses the icon of a Unix mount.

unixMountGuessName
string unixMountGuessName(gio.unix_mount_entry.UnixMountEntry mountEntry)

Guesses the name of a Unix mount. The result is a translated string.

unixMountGuessShouldDisplay
bool unixMountGuessShouldDisplay(gio.unix_mount_entry.UnixMountEntry mountEntry)

Guesses whether a Unix mount should be displayed in the UI.

unixMountGuessSymbolicIcon
gio.icon.Icon unixMountGuessSymbolicIcon(gio.unix_mount_entry.UnixMountEntry mountEntry)

Guesses the symbolic icon of a Unix mount.

unixMountIsReadonly
bool unixMountIsReadonly(gio.unix_mount_entry.UnixMountEntry mountEntry)

Checks if a unix mount is mounted read only.

unixMountIsSystemInternal
bool unixMountIsSystemInternal(gio.unix_mount_entry.UnixMountEntry mountEntry)

Checks if a Unix mount is a system mount. This is the Boolean OR of gio.global.unixIsSystemFsType, gio.global.unixIsSystemDevicePath and gio.global.unixIsMountPathSystemInternal on mount_entry’s properties.

unixMountPointsChangedSince
bool unixMountPointsChangedSince(ulong time)

Checks if the unix mount points have changed since a given unix time.

unixMountPointsGet
gio.unix_mount_point.UnixMountPoint[] unixMountPointsGet(ulong timeRead)

Gets a #GList of #GUnixMountPoint containing the unix mount points. If time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with gio.global.unixMountPointsChangedSince.

unixMountsChangedSince
bool unixMountsChangedSince(ulong time)

Checks if the unix mounts have changed since a given unix time.

unixMountsGet
gio.unix_mount_entry.UnixMountEntry[] unixMountsGet(ulong timeRead)

Gets a #GList of #GUnixMountEntry containing the unix mounts. If time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with gio.global.unixMountsChangedSince.