GDrive - this represent a piece of hardware connected to the machine. It's generally only created for removable hardware or hardware with removable media.
GDrive is a container class for GVolume objects that stem from the same piece of media. As such, GDrive abstracts a drive with (or without) removable media and provides operations for querying whether media is available, determining whether media change is automatically detected and ejecting the media.
If the GDrive reports that media isn't automatically detected, one can poll for media; typically one should not do this periodically as a poll for media operation is potententially expensive and may spin up the drive creating noise.
GDrive supports starting and stopping drives with authentication support for the former. This can be used to support a diverse set of use cases including connecting/disconnecting iSCSI devices, powering down external disk enclosures and starting/stopping multi-disk devices such as RAID devices. Note that the actual semantics and side-effects of starting/stopping a GDrive may vary according to implementation. To choose the correct verbs in e.g. a file manager, use g_drive_get_start_stop_type().
For porting from GnomeVFS note that there is no equivalent of GDrive in that API.
Emitted when the drive's state has changed.
This signal is emitted when the GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized.
Emitted when the physical eject button (if any) of a drive has been pressed.
Emitted when the physical stop button (if any) of a drive has been pressed.
Checks if a drive can be ejected.
Checks if a drive can be polled for media changes.
Checks if a drive can be started.
Checks if a drive can be started degraded.
Checks if a drive can be stopped.
Asynchronously ejects a drive.
Finishes ejecting a drive.
Ejects a drive. This is an asynchronous operation, and is finished by calling g_drive_eject_with_operation_finish() with the drive and GAsyncResult data returned in the callback.
Finishes ejecting a drive. If any errors occurred during the operation, error will be set to contain the errors and FALSE will be returned.
Gets the kinds of identifiers that drive has. Use g_drive_get_identifier() to obtain the identifiers themselves.
Get the main Gtk struct
Gets the icon for drive.
Gets the identifier of the given kind for drive. The only identifier currently available is G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE
Gets the name of drive.
Gets the sort key for drive, if any.
Gets a hint about how a drive can be started/stopped.
the main Gtk struct as a void*
Gets the icon for drive.
Get a list of mountable volumes for drive.
Checks if the drive has media. Note that the OS may not be polling the drive for media changes; see g_drive_is_media_check_automatic() for more details.
Check if drive has any mountable volumes.
Checks if drive is capabable of automatically detecting media changes.
Checks if the drive supports removable media.
Checks if the GDrive and/or its media is considered removable by the user. See g_drive_is_media_removable().
Asynchronously polls drive to see if media has been inserted or removed.
Finishes an operation started with g_drive_poll_for_media() on a drive.
Asynchronously starts a drive.
Finishes starting a drive.
Asynchronously stops a drive.
Finishes stopping a drive.