Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Interfaces.Drive
Contents
- Exported types
- Methods
- canEject
- canPollForMedia
- canStart
- canStartDegraded
- canStop
- eject
- ejectFinish
- ejectWithOperation
- ejectWithOperationFinish
- enumerateIdentifiers
- getIcon
- getIdentifier
- getName
- getSortKey
- getStartStopType
- getSymbolicIcon
- getVolumes
- hasMedia
- hasVolumes
- isMediaCheckAutomatic
- isMediaRemovable
- isRemovable
- pollForMedia
- pollForMediaFinish
- start
- startFinish
- stop
- stopFinish
- Signals
Description
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 Volume
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 driveGetStartStopType
.
For porting from GnomeVFS note that there is no
equivalent of GDrive
in that API.
Synopsis
- newtype Drive = Drive (ManagedPtr Drive)
- class (GObject o, IsDescendantOf Drive o) => IsDrive o
- toDrive :: (MonadIO m, IsDrive o) => o -> m Drive
- type family ResolveDriveMethod (t :: Symbol) o where ...
- data DriveCanEjectMethodInfo
- driveCanEject :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveCanPollForMediaMethodInfo
- driveCanPollForMedia :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveCanStartMethodInfo
- driveCanStart :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveCanStartDegradedMethodInfo
- driveCanStartDegraded :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveCanStopMethodInfo
- driveCanStop :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveEjectMethodInfo
- driveEject :: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data DriveEjectFinishMethodInfo
- driveEjectFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
- data DriveEjectWithOperationMethodInfo
- driveEjectWithOperation :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- data DriveEjectWithOperationFinishMethodInfo
- driveEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
- data DriveEnumerateIdentifiersMethodInfo
- driveEnumerateIdentifiers :: (HasCallStack, MonadIO m, IsDrive a) => a -> m [Text]
- data DriveGetIconMethodInfo
- driveGetIcon :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Icon
- data DriveGetIdentifierMethodInfo
- driveGetIdentifier :: (HasCallStack, MonadIO m, IsDrive a) => a -> Text -> m (Maybe Text)
- data DriveGetNameMethodInfo
- driveGetName :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Text
- data DriveGetSortKeyMethodInfo
- driveGetSortKey :: (HasCallStack, MonadIO m, IsDrive a) => a -> m (Maybe Text)
- data DriveGetStartStopTypeMethodInfo
- driveGetStartStopType :: (HasCallStack, MonadIO m, IsDrive a) => a -> m DriveStartStopType
- data DriveGetSymbolicIconMethodInfo
- driveGetSymbolicIcon :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Icon
- data DriveGetVolumesMethodInfo
- driveGetVolumes :: (HasCallStack, MonadIO m, IsDrive a) => a -> m [Volume]
- data DriveHasMediaMethodInfo
- driveHasMedia :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveHasVolumesMethodInfo
- driveHasVolumes :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveIsMediaCheckAutomaticMethodInfo
- driveIsMediaCheckAutomatic :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveIsMediaRemovableMethodInfo
- driveIsMediaRemovable :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DriveIsRemovableMethodInfo
- driveIsRemovable :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
- data DrivePollForMediaMethodInfo
- drivePollForMedia :: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data DrivePollForMediaFinishMethodInfo
- drivePollForMediaFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
- data DriveStartMethodInfo
- driveStart :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [DriveStartFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- data DriveStartFinishMethodInfo
- driveStartFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
- data DriveStopMethodInfo
- driveStop :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- data DriveStopFinishMethodInfo
- driveStopFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
- type DriveChangedCallback = IO ()
- data DriveChangedSignalInfo
- afterDriveChanged :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveChangedCallback) -> m SignalHandlerId
- onDriveChanged :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveChangedCallback) -> m SignalHandlerId
- type DriveDisconnectedCallback = IO ()
- data DriveDisconnectedSignalInfo
- afterDriveDisconnected :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveDisconnectedCallback) -> m SignalHandlerId
- onDriveDisconnected :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveDisconnectedCallback) -> m SignalHandlerId
- type DriveEjectButtonCallback = IO ()
- data DriveEjectButtonSignalInfo
- afterDriveEjectButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveEjectButtonCallback) -> m SignalHandlerId
- onDriveEjectButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveEjectButtonCallback) -> m SignalHandlerId
- type DriveStopButtonCallback = IO ()
- data DriveStopButtonSignalInfo
- afterDriveStopButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveStopButtonCallback) -> m SignalHandlerId
- onDriveStopButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveStopButtonCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Constructors
Drive (ManagedPtr Drive) |
Instances
class (GObject o, IsDescendantOf Drive o) => IsDrive o Source #
Instances
(GObject o, IsDescendantOf Drive o) => IsDrive o Source # | |
Defined in GI.Gio.Interfaces.Drive |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, canEject, canPollForMedia, canStart, canStartDegraded, canStop, eject, ejectFinish, ejectWithOperation, ejectWithOperationFinish, enumerateIdentifiers, forceFloating, freezeNotify, getv, hasMedia, hasVolumes, isFloating, isMediaCheckAutomatic, isMediaRemovable, isRemovable, notify, notifyByPspec, pollForMedia, pollForMediaFinish, ref, refSink, runDispose, start, startFinish, stealData, stealQdata, stop, stopFinish, thawNotify, unref, watchClosure.
Getters
getData, getIcon, getIdentifier, getName, getProperty, getQdata, getSortKey, getStartStopType, getSymbolicIcon, getVolumes.
Setters
type family ResolveDriveMethod (t :: Symbol) o where ... Source #
Equations
canEject
data DriveCanEjectMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanEjectMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveCanEjectMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool |
Checks if a drive can be ejected.
canPollForMedia
data DriveCanPollForMediaMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanPollForMediaMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveCanPollForMediaMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool | Returns: |
Checks if a drive can be polled for media changes.
canStart
data DriveCanStartMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanStartMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveCanStartMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool |
Checks if a drive can be started.
Since: 2.22
canStartDegraded
data DriveCanStartDegradedMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanStartDegradedMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveCanStartDegradedMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
driveCanStartDegraded Source #
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool | Returns: |
Checks if a drive can be started degraded.
Since: 2.22
canStop
data DriveCanStopMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanStopMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveCanStopMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool |
Checks if a drive can be stopped.
Since: 2.22
eject
data DriveEjectMethodInfo Source #
Instances
(signature ~ ([MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsCancellable b) => OverloadedMethod DriveEjectMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveEjectMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) | |
=> a |
|
-> [MountUnmountFlags] |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Deprecated: (Since version 2.22)Use driveEjectWithOperation
instead.
Asynchronously ejects a drive.
When the operation is finished, callback
will be called.
You can then call driveEjectFinish
to obtain the
result of the operation.
ejectFinish
data DriveEjectFinishMethodInfo Source #
Instances
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DriveEjectFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveEjectFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Deprecated: (Since version 2.22)Use driveEjectWithOperationFinish
instead.
Finishes ejecting a drive.
ejectWithOperation
data DriveEjectWithOperationMethodInfo Source #
Instances
(signature ~ ([MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => OverloadedMethod DriveEjectWithOperationMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveEjectWithOperationMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
driveEjectWithOperation Source #
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) | |
=> a |
|
-> [MountUnmountFlags] |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Ejects a drive. This is an asynchronous operation, and is
finished by calling driveEjectWithOperationFinish
with the drive
and AsyncResult
data returned in the callback
.
Since: 2.22
ejectWithOperationFinish
data DriveEjectWithOperationFinishMethodInfo Source #
Instances
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DriveEjectWithOperationFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveEjectWithOperationFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
driveEjectWithOperationFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finishes ejecting a drive. If any errors occurred during the operation,
error
will be set to contain the errors and False
will be returned.
Since: 2.22
enumerateIdentifiers
data DriveEnumerateIdentifiersMethodInfo Source #
Instances
(signature ~ m [Text], MonadIO m, IsDrive a) => OverloadedMethod DriveEnumerateIdentifiersMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveEnumerateIdentifiersMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
driveEnumerateIdentifiers Source #
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m [Text] | Returns: a |
Gets the kinds of identifiers that drive
has.
Use driveGetIdentifier
to obtain the identifiers
themselves.
getIcon
data DriveGetIconMethodInfo Source #
Instances
(signature ~ m Icon, MonadIO m, IsDrive a) => OverloadedMethod DriveGetIconMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveGetIconMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Icon | Returns: |
Gets the icon for drive
.
getIdentifier
data DriveGetIdentifierMethodInfo Source #
Instances
(signature ~ (Text -> m (Maybe Text)), MonadIO m, IsDrive a) => OverloadedMethod DriveGetIdentifierMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveGetIdentifierMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text) | Returns: a newly allocated string containing the
requested identifier, or |
Gets the identifier of the given kind for drive
. The only
identifier currently available is
DRIVE_IDENTIFIER_KIND_UNIX_DEVICE
.
getName
data DriveGetNameMethodInfo Source #
Instances
(signature ~ m Text, MonadIO m, IsDrive a) => OverloadedMethod DriveGetNameMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveGetNameMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Text | Returns: a string containing |
Gets the name of drive
.
getSortKey
data DriveGetSortKeyMethodInfo Source #
Instances
(signature ~ m (Maybe Text), MonadIO m, IsDrive a) => OverloadedMethod DriveGetSortKeyMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveGetSortKeyMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m (Maybe Text) | Returns: Sorting key for |
Gets the sort key for drive
, if any.
Since: 2.32
getStartStopType
data DriveGetStartStopTypeMethodInfo Source #
Instances
(signature ~ m DriveStartStopType, MonadIO m, IsDrive a) => OverloadedMethod DriveGetStartStopTypeMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveGetStartStopTypeMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
driveGetStartStopType Source #
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m DriveStartStopType | Returns: A value from the |
Gets a hint about how a drive can be started/stopped.
Since: 2.22
getSymbolicIcon
data DriveGetSymbolicIconMethodInfo Source #
Instances
(signature ~ m Icon, MonadIO m, IsDrive a) => OverloadedMethod DriveGetSymbolicIconMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveGetSymbolicIconMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Icon | Returns: symbolic |
Gets the icon for drive
.
Since: 2.34
getVolumes
data DriveGetVolumesMethodInfo Source #
Instances
(signature ~ m [Volume], MonadIO m, IsDrive a) => OverloadedMethod DriveGetVolumesMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveGetVolumesMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m [Volume] | Returns: |
Get a list of mountable volumes for drive
.
The returned list should be freed with g_list_free()
, after
its elements have been unreffed with objectUnref
.
hasMedia
data DriveHasMediaMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveHasMediaMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveHasMediaMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool |
Checks if the drive
has media. Note that the OS may not be polling
the drive for media changes; see driveIsMediaCheckAutomatic
for more details.
hasVolumes
data DriveHasVolumesMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveHasVolumesMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveHasVolumesMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool | Returns: |
Check if drive
has any mountable volumes.
isMediaCheckAutomatic
data DriveIsMediaCheckAutomaticMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveIsMediaCheckAutomaticMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveIsMediaCheckAutomaticMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
driveIsMediaCheckAutomatic Source #
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool | Returns: |
Checks if drive
is capable of automatically detecting media changes.
isMediaRemovable
data DriveIsMediaRemovableMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveIsMediaRemovableMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveIsMediaRemovableMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
driveIsMediaRemovable Source #
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool | Returns: |
Checks if the drive
supports removable media.
isRemovable
data DriveIsRemovableMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveIsRemovableMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveIsRemovableMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a) | |
=> a |
|
-> m Bool | Returns: |
Checks if the Drive
and/or its media is considered removable by the user.
See driveIsMediaRemovable
.
Since: 2.50
pollForMedia
data DrivePollForMediaMethodInfo Source #
Instances
(signature ~ (Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsCancellable b) => OverloadedMethod DrivePollForMediaMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DrivePollForMediaMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously polls drive
to see if media has been inserted or removed.
When the operation is finished, callback
will be called.
You can then call drivePollForMediaFinish
to obtain the
result of the operation.
pollForMediaFinish
data DrivePollForMediaFinishMethodInfo Source #
Instances
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DrivePollForMediaFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DrivePollForMediaFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
drivePollForMediaFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finishes an operation started with drivePollForMedia
on a drive.
start
data DriveStartMethodInfo Source #
Instances
(signature ~ ([DriveStartFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => OverloadedMethod DriveStartMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveStartMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) | |
=> a |
|
-> [DriveStartFlags] |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously starts a drive.
When the operation is finished, callback
will be called.
You can then call driveStartFinish
to obtain the
result of the operation.
Since: 2.22
startFinish
data DriveStartFinishMethodInfo Source #
Instances
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DriveStartFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveStartFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finishes starting a drive.
Since: 2.22
stop
data DriveStopMethodInfo Source #
Instances
(signature ~ ([MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => OverloadedMethod DriveStopMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveStopMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) | |
=> a |
|
-> [MountUnmountFlags] |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously stops a drive.
When the operation is finished, callback
will be called.
You can then call driveStopFinish
to obtain the
result of the operation.
Since: 2.22
stopFinish
data DriveStopFinishMethodInfo Source #
Instances
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DriveStopFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.Drive Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DriveStopFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.Drive Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finishes stopping a drive.
Since: 2.22
Signals
changed
type DriveChangedCallback = IO () Source #
Emitted when the drive's state has changed.
data DriveChangedSignalInfo Source #
Instances
SignalInfo DriveChangedSignalInfo Source # | |||||
Defined in GI.Gio.Interfaces.Drive Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DriveChangedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType DriveChangedSignalInfo Source # | |||||
Defined in GI.Gio.Interfaces.Drive |
afterDriveChanged :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
drive #changed callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDriveChanged :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
drive #changed callback
disconnected
type DriveDisconnectedCallback = IO () Source #
This signal is emitted when the Drive
have been
disconnected. If the recipient is holding references to the
object they should release them so the object can be
finalized.
data DriveDisconnectedSignalInfo Source #
Instances
SignalInfo DriveDisconnectedSignalInfo Source # | |||||
Defined in GI.Gio.Interfaces.Drive Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DriveDisconnectedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType DriveDisconnectedSignalInfo Source # | |||||
afterDriveDisconnected :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveDisconnectedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the disconnected signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
drive #disconnected callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDriveDisconnected :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveDisconnectedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the disconnected signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
drive #disconnected callback
ejectButton
type DriveEjectButtonCallback = IO () Source #
Emitted when the physical eject button (if any) of a drive has been pressed.
data DriveEjectButtonSignalInfo Source #
Instances
SignalInfo DriveEjectButtonSignalInfo Source # | |||||
Defined in GI.Gio.Interfaces.Drive Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DriveEjectButtonSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType DriveEjectButtonSignalInfo Source # | |||||
afterDriveEjectButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveEjectButtonCallback) -> m SignalHandlerId Source #
Connect a signal handler for the ejectButton signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
drive #ejectButton callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDriveEjectButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveEjectButtonCallback) -> m SignalHandlerId Source #
Connect a signal handler for the ejectButton signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
drive #ejectButton callback
stopButton
type DriveStopButtonCallback = IO () Source #
Emitted when the physical stop button (if any) of a drive has been pressed.
Since: 2.22
data DriveStopButtonSignalInfo Source #
Instances
SignalInfo DriveStopButtonSignalInfo Source # | |||||
Defined in GI.Gio.Interfaces.Drive Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DriveStopButtonSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType DriveStopButtonSignalInfo Source # | |||||
afterDriveStopButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveStopButtonCallback) -> m SignalHandlerId Source #
Connect a signal handler for the stopButton signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
drive #stopButton callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDriveStopButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveStopButtonCallback) -> m SignalHandlerId Source #
Connect a signal handler for the stopButton signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
drive #stopButton callback