gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Interfaces.Drive

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

Exported types

newtype Drive Source #

Memory-managed wrapper type.

Constructors

Drive (ManagedPtr Drive) 

Instances

Instances details
Eq Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

(==) :: Drive -> Drive -> Bool #

(/=) :: Drive -> Drive -> Bool #

GObject Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

ManagedPtrNewtype Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

TypedObject Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

glibType :: IO GType #

HasParentTypes Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

HasAttributeList Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

(info ~ ResolveDriveMethod t Drive, OverloadedMethod info Drive p, HasField t Drive p) => HasField (t :: Symbol) Drive (p :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

getField :: Drive -> p #

(info ~ ResolveDriveMethod t Drive, OverloadedMethodInfo info Drive) => IsLabel t (MethodProxy info Drive) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

fromLabel :: MethodProxy info Drive #

(info ~ ResolveDriveMethod t Drive, OverloadedMethod info Drive p) => IsLabel t (Drive -> p) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

fromLabel :: Drive -> p #

IsGValue (Maybe Drive) Source #

Convert Drive to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Interfaces.Drive

type AttributeList Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

type ParentTypes Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

type SignalList Drive Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

class (GObject o, IsDescendantOf Drive o) => IsDrive o Source #

Type class for types which can be safely cast to Drive, for instance with toDrive.

Instances

Instances details
(GObject o, IsDescendantOf Drive o) => IsDrive o Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

toDrive :: (MonadIO m, IsDrive o) => o -> m Drive Source #

Cast to Drive, for types for which this is known to be safe. For general casts, use castTo.

Methods

type family ResolveDriveMethod (t :: Symbol) o where ... Source #

Equations

ResolveDriveMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveDriveMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveDriveMethod "canEject" o = DriveCanEjectMethodInfo 
ResolveDriveMethod "canPollForMedia" o = DriveCanPollForMediaMethodInfo 
ResolveDriveMethod "canStart" o = DriveCanStartMethodInfo 
ResolveDriveMethod "canStartDegraded" o = DriveCanStartDegradedMethodInfo 
ResolveDriveMethod "canStop" o = DriveCanStopMethodInfo 
ResolveDriveMethod "eject" o = DriveEjectMethodInfo 
ResolveDriveMethod "ejectFinish" o = DriveEjectFinishMethodInfo 
ResolveDriveMethod "ejectWithOperation" o = DriveEjectWithOperationMethodInfo 
ResolveDriveMethod "ejectWithOperationFinish" o = DriveEjectWithOperationFinishMethodInfo 
ResolveDriveMethod "enumerateIdentifiers" o = DriveEnumerateIdentifiersMethodInfo 
ResolveDriveMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveDriveMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveDriveMethod "getv" o = ObjectGetvMethodInfo 
ResolveDriveMethod "hasMedia" o = DriveHasMediaMethodInfo 
ResolveDriveMethod "hasVolumes" o = DriveHasVolumesMethodInfo 
ResolveDriveMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveDriveMethod "isMediaCheckAutomatic" o = DriveIsMediaCheckAutomaticMethodInfo 
ResolveDriveMethod "isMediaRemovable" o = DriveIsMediaRemovableMethodInfo 
ResolveDriveMethod "isRemovable" o = DriveIsRemovableMethodInfo 
ResolveDriveMethod "notify" o = ObjectNotifyMethodInfo 
ResolveDriveMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveDriveMethod "pollForMedia" o = DrivePollForMediaMethodInfo 
ResolveDriveMethod "pollForMediaFinish" o = DrivePollForMediaFinishMethodInfo 
ResolveDriveMethod "ref" o = ObjectRefMethodInfo 
ResolveDriveMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveDriveMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveDriveMethod "start" o = DriveStartMethodInfo 
ResolveDriveMethod "startFinish" o = DriveStartFinishMethodInfo 
ResolveDriveMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveDriveMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveDriveMethod "stop" o = DriveStopMethodInfo 
ResolveDriveMethod "stopFinish" o = DriveStopFinishMethodInfo 
ResolveDriveMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveDriveMethod "unref" o = ObjectUnrefMethodInfo 
ResolveDriveMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveDriveMethod "getData" o = ObjectGetDataMethodInfo 
ResolveDriveMethod "getIcon" o = DriveGetIconMethodInfo 
ResolveDriveMethod "getIdentifier" o = DriveGetIdentifierMethodInfo 
ResolveDriveMethod "getName" o = DriveGetNameMethodInfo 
ResolveDriveMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveDriveMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveDriveMethod "getSortKey" o = DriveGetSortKeyMethodInfo 
ResolveDriveMethod "getStartStopType" o = DriveGetStartStopTypeMethodInfo 
ResolveDriveMethod "getSymbolicIcon" o = DriveGetSymbolicIconMethodInfo 
ResolveDriveMethod "getVolumes" o = DriveGetVolumesMethodInfo 
ResolveDriveMethod "setData" o = ObjectSetDataMethodInfo 
ResolveDriveMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveDriveMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveDriveMethod l o = MethodResolutionFailed l o :: Type 

canEject

data DriveCanEjectMethodInfo Source #

Instances

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanEjectMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveCanEjectMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveCanEject Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if the drive can be ejected, False otherwise.

Checks if a drive can be ejected.

canPollForMedia

data DriveCanPollForMediaMethodInfo Source #

Instances

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanPollForMediaMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveCanPollForMediaMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveCanPollForMedia Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if the drive can be polled for media changes, False otherwise.

Checks if a drive can be polled for media changes.

canStart

data DriveCanStartMethodInfo Source #

Instances

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanStartMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveCanStartMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveCanStart Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if the drive can be started, False otherwise.

Checks if a drive can be started.

Since: 2.22

canStartDegraded

data DriveCanStartDegradedMethodInfo Source #

Instances

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanStartDegradedMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveCanStartDegradedMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveCanStartDegraded Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if the drive can be started degraded, False otherwise.

Checks if a drive can be started degraded.

Since: 2.22

canStop

data DriveCanStopMethodInfo Source #

Instances

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveCanStopMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveCanStopMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveCanStop Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if the drive can be stopped, False otherwise.

Checks if a drive can be stopped.

Since: 2.22

eject

data DriveEjectMethodInfo Source #

Instances

Instances details
(signature ~ ([MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsCancellable b) => OverloadedMethod DriveEjectMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveEjectMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveEject Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) 
=> a

drive: a Drive.

-> [MountUnmountFlags]

flags: flags affecting the unmount if required for eject

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback, or Nothing.

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

Instances details
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DriveEjectFinishMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveEjectFinishMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveEjectFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) 
=> a

drive: a Drive.

-> b

result: a AsyncResult.

-> m ()

(Can throw GError)

Deprecated: (Since version 2.22)Use driveEjectWithOperationFinish instead.

Finishes ejecting a drive.

ejectWithOperation

driveEjectWithOperation Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) 
=> a

drive: a Drive.

-> [MountUnmountFlags]

flags: flags affecting the unmount if required for eject

-> Maybe b

mountOperation: a MountOperation or Nothing to avoid user interaction.

-> Maybe c

cancellable: optional Cancellable object, Nothing to ignore.

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback, or Nothing.

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

driveEjectWithOperationFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) 
=> a

drive: a Drive.

-> b

result: a AsyncResult.

-> m ()

(Can throw GError)

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

driveEnumerateIdentifiers Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive

-> m [Text]

Returns: a Nothing-terminated array of strings containing kinds of identifiers. Use strfreev to free.

Gets the kinds of identifiers that drive has. Use driveGetIdentifier to obtain the identifiers themselves.

getIcon

data DriveGetIconMethodInfo Source #

Instances

Instances details
(signature ~ m Icon, MonadIO m, IsDrive a) => OverloadedMethod DriveGetIconMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveGetIconMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveGetIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Icon

Returns: Icon for the drive. Free the returned object with objectUnref.

Gets the icon for drive.

getIdentifier

data DriveGetIdentifierMethodInfo Source #

Instances

Instances details
(signature ~ (Text -> m (Maybe Text)), MonadIO m, IsDrive a) => OverloadedMethod DriveGetIdentifierMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveGetIdentifierMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveGetIdentifier Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive

-> Text

kind: the kind of identifier to return

-> m (Maybe Text)

Returns: a newly allocated string containing the requested identifier, or Nothing if the Drive doesn't have this kind of identifier.

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

Instances details
(signature ~ m Text, MonadIO m, IsDrive a) => OverloadedMethod DriveGetNameMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveGetNameMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Text

Returns: a string containing drive's name. The returned string should be freed when no longer needed.

Gets the name of drive.

getSortKey

data DriveGetSortKeyMethodInfo Source #

Instances

Instances details
(signature ~ m (Maybe Text), MonadIO m, IsDrive a) => OverloadedMethod DriveGetSortKeyMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveGetSortKeyMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveGetSortKey Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: A Drive.

-> m (Maybe Text)

Returns: Sorting key for drive or Nothing if no such key is available.

Gets the sort key for drive, if any.

Since: 2.32

getStartStopType

driveGetStartStopType Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m DriveStartStopType

Returns: A value from the DriveStartStopType enumeration.

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

Since: 2.22

getSymbolicIcon

data DriveGetSymbolicIconMethodInfo Source #

Instances

Instances details
(signature ~ m Icon, MonadIO m, IsDrive a) => OverloadedMethod DriveGetSymbolicIconMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveGetSymbolicIconMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveGetSymbolicIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Icon

Returns: symbolic Icon for the drive. Free the returned object with objectUnref.

Gets the icon for drive.

Since: 2.34

getVolumes

data DriveGetVolumesMethodInfo Source #

Instances

Instances details
(signature ~ m [Volume], MonadIO m, IsDrive a) => OverloadedMethod DriveGetVolumesMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveGetVolumesMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveGetVolumes Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m [Volume]

Returns: List containing any Volume objects on the given drive.

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

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveHasMediaMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveHasMediaMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveHasMedia Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if drive has media, False otherwise.

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

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveHasVolumesMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveHasVolumesMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveHasVolumes Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if the drive contains volumes, False otherwise.

Check if drive has any mountable volumes.

isMediaCheckAutomatic

driveIsMediaCheckAutomatic Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if the drive is capable of automatically detecting media changes, False otherwise.

Checks if drive is capable of automatically detecting media changes.

isMediaRemovable

data DriveIsMediaRemovableMethodInfo Source #

Instances

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveIsMediaRemovableMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveIsMediaRemovableMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveIsMediaRemovable Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if drive supports removable media, False otherwise.

Checks if the drive supports removable media.

isRemovable

data DriveIsRemovableMethodInfo Source #

Instances

Instances details
(signature ~ m Bool, MonadIO m, IsDrive a) => OverloadedMethod DriveIsRemovableMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveIsRemovableMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveIsRemovable Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a) 
=> a

drive: a Drive.

-> m Bool

Returns: True if drive and/or its media is considered removable, False otherwise.

Checks if the Drive and/or its media is considered removable by the user. See driveIsMediaRemovable.

Since: 2.50

pollForMedia

data DrivePollForMediaMethodInfo Source #

Instances

Instances details
(signature ~ (Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsCancellable b) => OverloadedMethod DrivePollForMediaMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DrivePollForMediaMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

drivePollForMedia Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) 
=> a

drive: a Drive.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback, or Nothing.

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

Instances details
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DrivePollForMediaFinishMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DrivePollForMediaFinishMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

drivePollForMediaFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) 
=> a

drive: a Drive.

-> b

result: a AsyncResult.

-> m ()

(Can throw GError)

Finishes an operation started with drivePollForMedia on a drive.

start

data DriveStartMethodInfo Source #

Instances

Instances details
(signature ~ ([DriveStartFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => OverloadedMethod DriveStartMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveStartMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveStart Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) 
=> a

drive: a Drive.

-> [DriveStartFlags]

flags: flags affecting the start operation.

-> Maybe b

mountOperation: a MountOperation or Nothing to avoid user interaction.

-> Maybe c

cancellable: optional Cancellable object, Nothing to ignore.

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback, or Nothing.

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

Instances details
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DriveStartFinishMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveStartFinishMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveStartFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) 
=> a

drive: a Drive.

-> b

result: a AsyncResult.

-> m ()

(Can throw GError)

Finishes starting a drive.

Since: 2.22

stop

data DriveStopMethodInfo Source #

Instances

Instances details
(signature ~ ([MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => OverloadedMethod DriveStopMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveStopMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveStop Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) 
=> a

drive: a Drive.

-> [MountUnmountFlags]

flags: flags affecting the unmount if required for stopping.

-> Maybe b

mountOperation: a MountOperation or Nothing to avoid user interaction.

-> Maybe c

cancellable: optional Cancellable object, Nothing to ignore.

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback, or Nothing.

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

Instances details
(signature ~ (b -> m ()), MonadIO m, IsDrive a, IsAsyncResult b) => OverloadedMethod DriveStopFinishMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo DriveStopFinishMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Interfaces.Drive

driveStopFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) 
=> a

drive: a Drive.

-> b

result: a AsyncResult.

-> m ()

(Can throw GError)

Finishes stopping a drive.

Since: 2.22

Signals

changed

type DriveChangedCallback = IO () Source #

Emitted when the drive's state has changed.

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.

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.

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

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