Module gio::functions[][src]

Functions

bus_get

Asynchronously connects to the message bus specified by bus_type.

bus_get_future
bus_get_sync

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.

content_type_can_be_executable

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

content_type_equals

Compares two content types for equality.

content_type_from_mime_type

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

content_type_get_description

Gets the human readable description of the content type.

content_type_get_generic_icon_name

Gets the generic icon name for a content type.

content_type_get_icon

Gets the icon for a content type.

content_type_get_mime_dirsv2_60

Get the list of directories which MIME data is loaded from. See content_type_set_mime_dirs() for details.

content_type_get_mime_type

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

content_type_get_symbolic_icon

Gets the symbolic icon for a content type.

content_type_guess

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 None, in which case the guess will be based solely on the other argument.

content_type_guess_for_tree

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.

content_type_is_a

Determines if type_ is a subset of supertype.

content_type_is_mime_typev2_52

Determines if type_ is a subset of mime_type. Convenience wrapper around content_type_is_a().

content_type_is_unknown

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.

content_type_set_mime_dirsv2_60

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

content_types_get_registered

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

dbus_address_escape_value

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

dbus_address_get_for_bus_sync

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.

dbus_address_get_stream

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.

dbus_address_get_stream_future
dbus_address_get_stream_sync

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.

dbus_generate_guid

Generate a D-Bus GUID that can be used with e.g. DBusConnection::new().

dbus_gvalue_to_gvariant

Converts a glib::Value to a glib::Variant of the type indicated by the type_ parameter.

dbus_gvariant_to_gvalue

Converts a glib::Variant to a glib::Value. If value is floating, it is consumed.

dbus_is_address

Checks if string is a D-Bus address.

dbus_is_guid

Checks if string is a D-Bus GUID.

dbus_is_interface_name

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

dbus_is_member_name

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

dbus_is_name

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

dbus_is_supported_address

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.

dbus_is_unique_name

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

io_error_from_errno

Converts errno.h error codes into GIO error codes. The fallback value IOErrorEnum::Failed is returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead).

io_modules_scan_all_in_directory

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

io_scheduler_cancel_all_jobs

Cancels all cancellable I/O jobs.

keyfile_settings_backend_new

Creates a keyfile-backed SettingsBackend.

memory_settings_backend_new

Creates a memory-backed SettingsBackend.

networking_init

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

null_settings_backend_new

Creates a readonly SettingsBackend.

resources_enumerate_children

Returns all the names of children at the specified path in the set of globally registered resources. The return result is a None terminated list of strings which should be released with g_strfreev().

resources_get_info

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

resources_lookup_data

Looks for a file at the specified path in the set of globally registered resources and returns a glib::Bytes that lets you directly access the data in memory.

resources_open_stream

Looks for a file at the specified path in the set of globally registered resources and returns a InputStream that lets you read the data.

resources_register

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

resources_unregister

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

unix_is_mount_path_system_internalUnix

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.

unix_is_system_device_pathUnix and v2_56

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.

unix_is_system_fs_typeUnix and v2_56

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.