2.13 <GDrive>

Interface: <GDrive>

<GDrive> represents a piece of hardware connected to the machine. It’s generally only created for removable hardware or hardware with removable media. For example, an optical disc drive, or a USB flash drive.

<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 potentially 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 drive:get-start-stop-type.

For porting from GnomeVFS note that there is no equivalent of <GDrive> in that API.

Procedures

Method: drive:can-eject? self ⇒ %return
Method: can-eject? self ⇒ %return

Checks if a drive can be ejected.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be ejected, #f otherwise.

Method: drive:can-poll-for-media? self ⇒ %return
Method: can-poll-for-media? self ⇒ %return

Checks if a drive can be polled for media changes.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be polled for media changes, #f otherwise.

Method: drive:can-start-degraded? self ⇒ %return
Method: can-start-degraded? self ⇒ %return

Checks if a drive can be started degraded.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be started degraded, #f otherwise.

Method: drive:can-start? self ⇒ %return
Method: can-start? self ⇒ %return

Checks if a drive can be started.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be started, #f otherwise.

Method: drive:can-stop? self ⇒ %return
Method: can-stop? self ⇒ %return

Checks if a drive can be stopped.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be stopped, #f otherwise.

Method: drive:eject self flags [cancellable] [callback]
Method: eject self flags [cancellable] [callback]

Asynchronously ejects a drive.

When the operation is finished, callback will be called. You can then call drive:eject-finish? to obtain the result of the operation.

self

Passed: a <GDrive>.

a <GDrive>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for eject

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to callback

Method: drive:eject-finish? self result ⇒ %return
Method: eject-finish? self result ⇒ %return

Finishes ejecting a drive.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive has been ejected successfully, #f otherwise.

Method: drive:eject-with-operation self flags [mount-operation] [cancellable] [callback]
Method: eject-with-operation self flags [mount-operation] [cancellable] [callback]

Ejects a drive. This is an asynchronous operation, and is finished by calling drive:eject-with-operation-finish? with the self and <GAsyncResult> data returned in the callback.

self

Passed: a <GDrive>.

a <GDrive>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for eject

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Method: drive:eject-with-operation-finish? self result ⇒ %return
Method: eject-with-operation-finish? self result ⇒ %return

Finishes ejecting a drive. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive was successfully ejected. #f otherwise.

Method: drive:enumerate-identifiers self ⇒ %return
Method: enumerate-identifiers self ⇒ %return

Gets the kinds of identifiers that self has. Use drive:get-identifier to obtain the identifiers themselves.

self

Passed: a <GDrive>.

a <GDrive>

%return

Returned: a vector, each a string.

a #f-terminated array of strings containing kinds of identifiers. Use strfreev to free.

Method: drive:get-icon self ⇒ %return
Method: get-icon self ⇒ %return

Gets the icon for self.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a <GIcon>.

<GIcon> for the self. Free the returned object with object:unref.

Method: drive:get-identifier self kind ⇒ %return
Method: get-identifier self kind ⇒ %return

Gets the identifier of the given kind for self. The only identifier currently available is G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE.

self

Passed: a <GDrive>.

a <GDrive>

kind

Passed: a string.

the kind of identifier to return

%return

Returned: a string, or #f.

a newly allocated string containing the requested identifier, or #f if the <GDrive> doesn’t have this kind of identifier.

Method: drive:get-name self ⇒ %return
Method: get-name self ⇒ %return

Gets the name of self.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a string.

a string containing self’s name. The returned string should be freed when no longer needed.

Method: drive:get-sort-key self ⇒ %return
Method: get-sort-key self ⇒ %return

Gets the sort key for self, if any.

self

Passed: a <GDrive>.

A <GDrive>.

%return

Returned: a string, or #f.

Sorting key for self or #f if no such key is available.

Method: drive:get-start-stop-type self ⇒ %return
Method: get-start-stop-type self ⇒ %return

Gets a hint about how a drive can be started/stopped.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a <GDriveStartStopType>.

A value from the <GDriveStartStopType> enumeration.

Method: drive:get-symbolic-icon self ⇒ %return
Method: get-symbolic-icon self ⇒ %return

Gets the icon for self.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a <GIcon>.

symbolic <GIcon> for the self. Free the returned object with object:unref.

Method: drive:get-volumes self ⇒ %return
Method: get-volumes self ⇒ %return

Get a list of mountable volumes for self.

The returned list should be freed with g_list_free(), after its elements have been unreffed with object:unref.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a list, each a <GVolume>.

GList containing any <GVolume> objects on the given self.

Method: drive:has-media? self ⇒ %return
Method: has-media? self ⇒ %return

Checks if the self has media. Note that the OS may not be polling the drive for media changes; see drive:is-media-check-automatic? for more details.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if self has media, #f otherwise.

Method: drive:has-volumes? self ⇒ %return
Method: has-volumes? self ⇒ %return

Check if self has any mountable volumes.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self contains volumes, #f otherwise.

Method: drive:is-media-check-automatic? self ⇒ %return
Method: is-media-check-automatic? self ⇒ %return

Checks if self is capable of automatically detecting media changes.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self is capable of automatically detecting media changes, #f otherwise.

Method: drive:is-media-removable? self ⇒ %return
Method: is-media-removable? self ⇒ %return

Checks if the self supports removable media.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if self supports removable media, #f otherwise.

Method: drive:is-removable? self ⇒ %return
Method: is-removable? self ⇒ %return

Checks if the <GDrive> and/or its media is considered removable by the user. See drive:is-media-removable?.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if self and/or its media is considered removable, #f otherwise.

Method: drive:poll-for-media self [cancellable] [callback]
Method: poll-for-media self [cancellable] [callback]

Asynchronously polls self to see if media has been inserted or removed.

When the operation is finished, callback will be called. You can then call drive:poll-for-media-finish? to obtain the result of the operation.

self

Passed: a <GDrive>.

a <GDrive>.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to callback

Method: drive:poll-for-media-finish? self result ⇒ %return
Method: poll-for-media-finish? self result ⇒ %return

Finishes an operation started with drive:poll-for-media on a drive.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive has been poll_for_mediaed successfully, #f otherwise.

Method: drive:start self flags [mount-operation] [cancellable] [callback]
Method: start self flags [mount-operation] [cancellable] [callback]

Asynchronously starts a drive.

When the operation is finished, callback will be called. You can then call drive:start-finish? to obtain the result of the operation.

self

Passed: a <GDrive>.

a <GDrive>.

flags

Passed: a <GDriveStartFlags>, or a list of its symbols, or one of them.

flags affecting the start operation.

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to callback

Method: drive:start-finish? self result ⇒ %return
Method: start-finish? self result ⇒ %return

Finishes starting a drive.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive has been started successfully, #f otherwise.

Method: drive:stop self flags [mount-operation] [cancellable] [callback]
Method: stop self flags [mount-operation] [cancellable] [callback]

Asynchronously stops a drive.

When the operation is finished, callback will be called. You can then call drive:stop-finish? to obtain the result of the operation.

self

Passed: a <GDrive>.

a <GDrive>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for stopping.

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to callback

Method: drive:stop-finish? self result ⇒ %return
Method: stop-finish? self result ⇒ %return

Finishes stopping a drive.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive has been stopped successfully, #f otherwise.

Signals

Signal: drive:changed

Connect a handler with (connect object drive:changed handler). It is called as (handler self).

Emitted when the drive’s state has changed.

self

Passed: a <GDrive>.

Signal: drive:disconnected

Connect a handler with (connect object drive:disconnected handler). It is called as (handler self).

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.

self

Passed: a <GDrive>.

Signal: drive:eject-button

Connect a handler with (connect object drive:eject-button handler). It is called as (handler self).

Emitted when the physical eject button (if any) of a drive has been pressed.

self

Passed: a <GDrive>.

Signal: drive:stop-button

Connect a handler with (connect object drive:stop-button handler). It is called as (handler self).

Emitted when the physical stop button (if any) of a drive has been pressed.

self

Passed: a <GDrive>.

Virtual methods

Virtual method: drive:do-can-eject implementor self ⇒ %return

Checks if a drive can be ejected.

To override it in a new class, give register-type #:vfuncs `((can-eject . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be ejected, #f otherwise.

Virtual method: drive:do-can-poll-for-media implementor self ⇒ %return

Checks if a drive can be polled for media changes.

To override it in a new class, give register-type #:vfuncs `((can-poll-for-media . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be polled for media changes, #f otherwise.

Virtual method: drive:do-can-start implementor self ⇒ %return

Checks if a drive can be started.

To override it in a new class, give register-type #:vfuncs `((can-start . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be started, #f otherwise.

Virtual method: drive:do-can-start-degraded implementor self ⇒ %return

Checks if a drive can be started degraded.

To override it in a new class, give register-type #:vfuncs `((can-start-degraded . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be started degraded, #f otherwise.

Virtual method: drive:do-can-stop implementor self ⇒ %return

Checks if a drive can be stopped.

To override it in a new class, give register-type #:vfuncs `((can-stop . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self can be stopped, #f otherwise.

Virtual method: drive:do-changed implementor self

Signal emitted when the drive is changed.

To override it in a new class, give register-type #:vfuncs `((changed . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

Virtual method: drive:do-disconnected implementor self

The removed signal that 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.

To override it in a new class, give register-type #:vfuncs `((disconnected . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

Virtual method: drive:do-eject implementor self flags [cancellable] [callback]

Asynchronously ejects a drive.

When the operation is finished, callback will be called. You can then call drive:eject-finish? to obtain the result of the operation.

To override it in a new class, give register-type #:vfuncs `((eject . ,procedure)). The procedure is called as (procedure self flags cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for eject

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to callback

Virtual method: drive:do-eject-button implementor self

Signal emitted when the physical eject button (if any) of a drive have been pressed.

To override it in a new class, give register-type #:vfuncs `((eject-button . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

Virtual method: drive:do-eject-finish implementor self result ⇒ %return

Finishes ejecting a drive.

To override it in a new class, give register-type #:vfuncs `((eject-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive has been ejected successfully, #f otherwise.

Virtual method: drive:do-eject-with-operation implementor self flags [mount-operation] [cancellable] [callback]

Ejects a drive. This is an asynchronous operation, and is finished by calling drive:eject-with-operation-finish? with the self and <GAsyncResult> data returned in the callback.

To override it in a new class, give register-type #:vfuncs `((eject-with-operation . ,procedure)). The procedure is called as (procedure self flags mount-operation cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for eject

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Virtual method: drive:do-eject-with-operation-finish implementor self result ⇒ %return

Finishes ejecting a drive. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

To override it in a new class, give register-type #:vfuncs `((eject-with-operation-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive was successfully ejected. #f otherwise.

Virtual method: drive:do-enumerate-identifiers implementor self ⇒ %return

Gets the kinds of identifiers that self has. Use drive:get-identifier to obtain the identifiers themselves.

To override it in a new class, give register-type #:vfuncs `((enumerate-identifiers . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>

%return

Returned: a vector, each a string.

a #f-terminated array of strings containing kinds of identifiers. Use strfreev to free.

Virtual method: drive:do-get-icon implementor self ⇒ %return

Gets the icon for self.

To override it in a new class, give register-type #:vfuncs `((get-icon . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a <GIcon>.

<GIcon> for the self. Free the returned object with object:unref.

Virtual method: drive:do-get-identifier implementor self kind ⇒ %return

Gets the identifier of the given kind for self. The only identifier currently available is G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE.

To override it in a new class, give register-type #:vfuncs `((get-identifier . ,procedure)). The procedure is called as (procedure self kind) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>

kind

Passed: a string.

the kind of identifier to return

%return

Returned: a string, or #f.

a newly allocated string containing the requested identifier, or #f if the <GDrive> doesn’t have this kind of identifier.

Virtual method: drive:do-get-name implementor self ⇒ %return

Gets the name of self.

To override it in a new class, give register-type #:vfuncs `((get-name . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a string.

a string containing self’s name. The returned string should be freed when no longer needed.

Virtual method: drive:do-get-sort-key implementor self ⇒ %return

Gets the sort key for self, if any.

To override it in a new class, give register-type #:vfuncs `((get-sort-key . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

A <GDrive>.

%return

Returned: a string, or #f.

Sorting key for self or #f if no such key is available.

Virtual method: drive:do-get-start-stop-type implementor self ⇒ %return

Gets a hint about how a drive can be started/stopped.

To override it in a new class, give register-type #:vfuncs `((get-start-stop-type . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a <GDriveStartStopType>.

A value from the <GDriveStartStopType> enumeration.

Virtual method: drive:do-get-symbolic-icon implementor self ⇒ %return

Gets the icon for self.

To override it in a new class, give register-type #:vfuncs `((get-symbolic-icon . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a <GIcon>.

symbolic <GIcon> for the self. Free the returned object with object:unref.

Virtual method: drive:do-get-volumes implementor self ⇒ %return

Get a list of mountable volumes for self.

The returned list should be freed with g_list_free(), after its elements have been unreffed with object:unref.

To override it in a new class, give register-type #:vfuncs `((get-volumes . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a list, each a <GVolume>.

GList containing any <GVolume> objects on the given self.

Virtual method: drive:do-has-media implementor self ⇒ %return

Checks if the self has media. Note that the OS may not be polling the drive for media changes; see drive:is-media-check-automatic? for more details.

To override it in a new class, give register-type #:vfuncs `((has-media . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if self has media, #f otherwise.

Virtual method: drive:do-has-volumes implementor self ⇒ %return

Check if self has any mountable volumes.

To override it in a new class, give register-type #:vfuncs `((has-volumes . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self contains volumes, #f otherwise.

Virtual method: drive:do-is-media-check-automatic implementor self ⇒ %return

Checks if self is capable of automatically detecting media changes.

To override it in a new class, give register-type #:vfuncs `((is-media-check-automatic . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if the self is capable of automatically detecting media changes, #f otherwise.

Virtual method: drive:do-is-media-removable implementor self ⇒ %return

Checks if the self supports removable media.

To override it in a new class, give register-type #:vfuncs `((is-media-removable . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if self supports removable media, #f otherwise.

Virtual method: drive:do-is-removable implementor self ⇒ %return

Checks if the <GDrive> and/or its media is considered removable by the user. See drive:is-media-removable?.

To override it in a new class, give register-type #:vfuncs `((is-removable . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

%return

Returned: a boolean.

#t if self and/or its media is considered removable, #f otherwise.

Virtual method: drive:do-poll-for-media implementor self [cancellable] [callback]

Asynchronously polls self to see if media has been inserted or removed.

When the operation is finished, callback will be called. You can then call drive:poll-for-media-finish? to obtain the result of the operation.

To override it in a new class, give register-type #:vfuncs `((poll-for-media . ,procedure)). The procedure is called as (procedure self cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to callback

Virtual method: drive:do-poll-for-media-finish implementor self result ⇒ %return

Finishes an operation started with drive:poll-for-media on a drive.

To override it in a new class, give register-type #:vfuncs `((poll-for-media-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive has been poll_for_mediaed successfully, #f otherwise.

Virtual method: drive:do-start implementor self flags [mount-operation] [cancellable] [callback]

Asynchronously starts a drive.

When the operation is finished, callback will be called. You can then call drive:start-finish? to obtain the result of the operation.

To override it in a new class, give register-type #:vfuncs `((start . ,procedure)). The procedure is called as (procedure self flags mount-operation cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

flags

Passed: a <GDriveStartFlags>, or a list of its symbols, or one of them.

flags affecting the start operation.

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to callback

Virtual method: drive:do-start-finish implementor self result ⇒ %return

Finishes starting a drive.

To override it in a new class, give register-type #:vfuncs `((start-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive has been started successfully, #f otherwise.

Virtual method: drive:do-stop implementor self flags [mount-operation] [cancellable] [callback]

Asynchronously stops a drive.

When the operation is finished, callback will be called. You can then call drive:stop-finish? to obtain the result of the operation.

To override it in a new class, give register-type #:vfuncs `((stop . ,procedure)). The procedure is called as (procedure self flags mount-operation cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for stopping.

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to callback

Virtual method: drive:do-stop-button implementor self

Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.

To override it in a new class, give register-type #:vfuncs `((stop-button . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

Virtual method: drive:do-stop-finish implementor self result ⇒ %return

Finishes stopping a drive.

To override it in a new class, give register-type #:vfuncs `((stop-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GDrive>, or its GType number.

self

Passed: a <GDrive>.

a <GDrive>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the drive has been stopped successfully, #f otherwise.