Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GMountOperation
provides a mechanism for interacting with the user.
It can be used for authenticating mountable operations, such as loop
mounting files, hard drive partitions or server locations. It can
also be used to ask the user questions or show a list of applications
preventing unmount or eject operations from completing.
Note that GMountOperation
is used for more than just Mount
objects – for example it is also used in driveStart
and
driveStop
.
Users should instantiate a subclass of this that implements all the
various callbacks to show the required dialogs, such as
`GtkMountOperation`.
If no user interaction is desired (for example when automounting
filesystems at login time), usually NULL
can be passed, see each method
taking a GMountOperation
for details.
Throughout the API, the term ‘TCRYPT’ is used to mean ‘compatible with TrueCrypt and VeraCrypt’. TrueCrypt is a discontinued system for encrypting file containers, partitions or whole disks, typically used with Windows. VeraCrypt is a maintained fork of TrueCrypt with various improvements and auditing fixes.
Synopsis
- newtype MountOperation = MountOperation (ManagedPtr MountOperation)
- class (GObject o, IsDescendantOf MountOperation o) => IsMountOperation o
- toMountOperation :: (MonadIO m, IsMountOperation o) => o -> m MountOperation
- mountOperationGetAnonymous :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool
- mountOperationGetChoice :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Int32
- mountOperationGetDomain :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m (Maybe Text)
- mountOperationGetIsTcryptHiddenVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool
- mountOperationGetIsTcryptSystemVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool
- mountOperationGetPassword :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m (Maybe Text)
- mountOperationGetPasswordSave :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m PasswordSave
- mountOperationGetPim :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Word32
- mountOperationGetUsername :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m (Maybe Text)
- mountOperationNew :: (HasCallStack, MonadIO m) => m MountOperation
- mountOperationReply :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> MountOperationResult -> m ()
- mountOperationSetAnonymous :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m ()
- mountOperationSetChoice :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Int32 -> m ()
- mountOperationSetDomain :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Maybe Text -> m ()
- mountOperationSetIsTcryptHiddenVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m ()
- mountOperationSetIsTcryptSystemVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m ()
- mountOperationSetPassword :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Maybe Text -> m ()
- mountOperationSetPasswordSave :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> PasswordSave -> m ()
- mountOperationSetPim :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Word32 -> m ()
- mountOperationSetUsername :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Maybe Text -> m ()
- constructMountOperationAnonymous :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o)
- getMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> m Bool
- setMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> Bool -> m ()
- constructMountOperationChoice :: (IsMountOperation o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> m Int32
- setMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> Int32 -> m ()
- clearMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m ()
- constructMountOperationDomain :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)
- getMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text)
- setMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()
- constructMountOperationIsTcryptHiddenVolume :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o)
- getMountOperationIsTcryptHiddenVolume :: (MonadIO m, IsMountOperation o) => o -> m Bool
- setMountOperationIsTcryptHiddenVolume :: (MonadIO m, IsMountOperation o) => o -> Bool -> m ()
- constructMountOperationIsTcryptSystemVolume :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o)
- getMountOperationIsTcryptSystemVolume :: (MonadIO m, IsMountOperation o) => o -> m Bool
- setMountOperationIsTcryptSystemVolume :: (MonadIO m, IsMountOperation o) => o -> Bool -> m ()
- clearMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m ()
- constructMountOperationPassword :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)
- getMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text)
- setMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()
- constructMountOperationPasswordSave :: (IsMountOperation o, MonadIO m) => PasswordSave -> m (GValueConstruct o)
- getMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> m PasswordSave
- setMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> PasswordSave -> m ()
- constructMountOperationPim :: (IsMountOperation o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getMountOperationPim :: (MonadIO m, IsMountOperation o) => o -> m Word32
- setMountOperationPim :: (MonadIO m, IsMountOperation o) => o -> Word32 -> m ()
- clearMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m ()
- constructMountOperationUsername :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)
- getMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text)
- setMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()
- type MountOperationAbortedCallback = IO ()
- afterMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAbortedCallback) -> m SignalHandlerId
- onMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAbortedCallback) -> m SignalHandlerId
- type MountOperationAskPasswordCallback = Text -> Text -> Text -> [AskPasswordFlags] -> IO ()
- afterMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskPasswordCallback) -> m SignalHandlerId
- onMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskPasswordCallback) -> m SignalHandlerId
- type MountOperationAskQuestionCallback = Text -> [Text] -> IO ()
- afterMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskQuestionCallback) -> m SignalHandlerId
- onMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskQuestionCallback) -> m SignalHandlerId
- type MountOperationReplyCallback = MountOperationResult -> IO ()
- afterMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationReplyCallback) -> m SignalHandlerId
- onMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationReplyCallback) -> m SignalHandlerId
- type MountOperationShowProcessesCallback = Text -> [Int32] -> [Text] -> IO ()
- afterMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowProcessesCallback) -> m SignalHandlerId
- onMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowProcessesCallback) -> m SignalHandlerId
- type MountOperationShowUnmountProgressCallback = Text -> Int64 -> Int64 -> IO ()
- afterMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowUnmountProgressCallback) -> m SignalHandlerId
- onMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowUnmountProgressCallback) -> m SignalHandlerId
Exported types
newtype MountOperation Source #
Memory-managed wrapper type.
Instances
Eq MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation (==) :: MountOperation -> MountOperation -> Bool # (/=) :: MountOperation -> MountOperation -> Bool # | |
GObject MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation | |
ManagedPtrNewtype MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation | |
TypedObject MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation | |
HasParentTypes MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation | |
IsGValue (Maybe MountOperation) Source # | Convert |
Defined in GI.Gio.Objects.MountOperation gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe MountOperation -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe MountOperation) # | |
type ParentTypes MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation type ParentTypes MountOperation = '[Object] |
class (GObject o, IsDescendantOf MountOperation o) => IsMountOperation o Source #
Type class for types which can be safely cast to MountOperation
, for instance with toMountOperation
.
Instances
(GObject o, IsDescendantOf MountOperation o) => IsMountOperation o Source # | |
Defined in GI.Gio.Objects.MountOperation |
toMountOperation :: (MonadIO m, IsMountOperation o) => o -> m MountOperation Source #
Cast to MountOperation
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, reply, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAnonymous, getChoice, getData, getDomain, getIsTcryptHiddenVolume, getIsTcryptSystemVolume, getPassword, getPasswordSave, getPim, getProperty, getQdata, getUsername.
Setters
setAnonymous, setChoice, setData, setDataFull, setDomain, setIsTcryptHiddenVolume, setIsTcryptSystemVolume, setPassword, setPasswordSave, setPim, setProperty, setUsername.
getAnonymous
mountOperationGetAnonymous Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m Bool | Returns: |
Check to see whether the mount operation is being used for an anonymous user.
getChoice
mountOperationGetChoice Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m Int32 | Returns: an integer containing an index of the user's choice from
the choice's list, or |
Gets a choice from the mount operation.
getDomain
mountOperationGetDomain Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m (Maybe Text) | Returns: a string set to the domain. |
Gets the domain of the mount operation.
getIsTcryptHiddenVolume
mountOperationGetIsTcryptHiddenVolume Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m Bool | Returns: |
Check to see whether the mount operation is being used for a TCRYPT hidden volume.
Since: 2.58
getIsTcryptSystemVolume
mountOperationGetIsTcryptSystemVolume Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m Bool | Returns: |
Check to see whether the mount operation is being used for a TCRYPT system volume.
Since: 2.58
getPassword
mountOperationGetPassword Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m (Maybe Text) | Returns: a string containing the password within |
Gets a password from the mount operation.
getPasswordSave
mountOperationGetPasswordSave Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m PasswordSave | Returns: a |
Gets the state of saving passwords for the mount operation.
getPim
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m Word32 | Returns: The VeraCrypt PIM within |
Gets a PIM from the mount operation.
Since: 2.58
getUsername
mountOperationGetUsername Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> m (Maybe Text) | Returns: a string containing the user name. |
Get the user name from the mount operation.
new
:: (HasCallStack, MonadIO m) | |
=> m MountOperation | Returns: a |
Creates a new mount operation.
reply
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> MountOperationResult |
|
-> m () |
Emits the MountOperation::reply signal.
setAnonymous
mountOperationSetAnonymous Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the mount operation to use an anonymous user if anonymous
is True
.
setChoice
mountOperationSetChoice Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets a default choice for the mount operation.
setDomain
mountOperationSetDomain Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the mount operation's domain.
setIsTcryptHiddenVolume
mountOperationSetIsTcryptHiddenVolume Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the mount operation to use a hidden volume if hiddenVolume
is True
.
Since: 2.58
setIsTcryptSystemVolume
mountOperationSetIsTcryptSystemVolume Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the mount operation to use a system volume if systemVolume
is True
.
Since: 2.58
setPassword
mountOperationSetPassword Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the mount operation's password to password
.
setPasswordSave
mountOperationSetPasswordSave Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> PasswordSave |
|
-> m () |
Sets the state of saving passwords for the mount operation.
setPim
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the mount operation's PIM to pim
.
Since: 2.58
setUsername
mountOperationSetUsername Source #
:: (HasCallStack, MonadIO m, IsMountOperation a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the user name within op
to username
.
Properties
anonymous
Whether to use an anonymous user when authenticating.
constructMountOperationAnonymous :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “anonymous
” property. This is rarely needed directly, but it is used by new
.
getMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> m Bool Source #
Get the value of the “anonymous
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #anonymous
setMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> Bool -> m () Source #
Set the value of the “anonymous
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #anonymous:=
value ]
choice
The index of the user's choice when a question is asked during the mount operation. See the MountOperation::askQuestion signal.
constructMountOperationChoice :: (IsMountOperation o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “choice
” property. This is rarely needed directly, but it is used by new
.
getMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> m Int32 Source #
Get the value of the “choice
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #choice
setMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> Int32 -> m () Source #
Set the value of the “choice
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #choice:=
value ]
domain
The domain to use for the mount operation.
clearMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m () Source #
Set the value of the “domain
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#domain
constructMountOperationDomain :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “domain
” property. This is rarely needed directly, but it is used by new
.
getMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text) Source #
Get the value of the “domain
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #domain
setMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> Text -> m () Source #
Set the value of the “domain
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #domain:=
value ]
isTcryptHiddenVolume
Whether the device to be unlocked is a TCRYPT hidden volume. See the VeraCrypt documentation.
Since: 2.58
constructMountOperationIsTcryptHiddenVolume :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “is-tcrypt-hidden-volume
” property. This is rarely needed directly, but it is used by new
.
getMountOperationIsTcryptHiddenVolume :: (MonadIO m, IsMountOperation o) => o -> m Bool Source #
Get the value of the “is-tcrypt-hidden-volume
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #isTcryptHiddenVolume
setMountOperationIsTcryptHiddenVolume :: (MonadIO m, IsMountOperation o) => o -> Bool -> m () Source #
Set the value of the “is-tcrypt-hidden-volume
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #isTcryptHiddenVolume:=
value ]
isTcryptSystemVolume
Whether the device to be unlocked is a TCRYPT system volume. In this context, a system volume is a volume with a bootloader and operating system installed. This is only supported for Windows operating systems. For further documentation, see the VeraCrypt documentation.
Since: 2.58
constructMountOperationIsTcryptSystemVolume :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “is-tcrypt-system-volume
” property. This is rarely needed directly, but it is used by new
.
getMountOperationIsTcryptSystemVolume :: (MonadIO m, IsMountOperation o) => o -> m Bool Source #
Get the value of the “is-tcrypt-system-volume
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #isTcryptSystemVolume
setMountOperationIsTcryptSystemVolume :: (MonadIO m, IsMountOperation o) => o -> Bool -> m () Source #
Set the value of the “is-tcrypt-system-volume
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #isTcryptSystemVolume:=
value ]
password
The password that is used for authentication when carrying out the mount operation.
clearMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m () Source #
Set the value of the “password
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#password
constructMountOperationPassword :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “password
” property. This is rarely needed directly, but it is used by new
.
getMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text) Source #
Get the value of the “password
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #password
setMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> Text -> m () Source #
Set the value of the “password
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #password:=
value ]
passwordSave
Determines if and how the password information should be saved.
constructMountOperationPasswordSave :: (IsMountOperation o, MonadIO m) => PasswordSave -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “password-save
” property. This is rarely needed directly, but it is used by new
.
getMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> m PasswordSave Source #
Get the value of the “password-save
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #passwordSave
setMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> PasswordSave -> m () Source #
Set the value of the “password-save
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #passwordSave:=
value ]
pim
The VeraCrypt PIM value, when unlocking a VeraCrypt volume. See the VeraCrypt documentation.html).
Since: 2.58
constructMountOperationPim :: (IsMountOperation o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “pim
” property. This is rarely needed directly, but it is used by new
.
getMountOperationPim :: (MonadIO m, IsMountOperation o) => o -> m Word32 Source #
Get the value of the “pim
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #pim
setMountOperationPim :: (MonadIO m, IsMountOperation o) => o -> Word32 -> m () Source #
Set the value of the “pim
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #pim:=
value ]
username
The user name that is used for authentication when carrying out the mount operation.
clearMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m () Source #
Set the value of the “username
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#username
constructMountOperationUsername :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “username
” property. This is rarely needed directly, but it is used by new
.
getMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text) Source #
Get the value of the “username
” property.
When overloading is enabled, this is equivalent to
get
mountOperation #username
setMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> Text -> m () Source #
Set the value of the “username
” property.
When overloading is enabled, this is equivalent to
set
mountOperation [ #username:=
value ]
Signals
aborted
type MountOperationAbortedCallback = IO () Source #
Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.
Implementations of GMountOperation should handle this signal by dismissing open password dialogs.
Since: 2.20
afterMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAbortedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the aborted signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
mountOperation #aborted 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.
onMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAbortedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the aborted signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
mountOperation #aborted callback
askPassword
type MountOperationAskPasswordCallback Source #
= Text |
|
-> Text |
|
-> Text |
|
-> [AskPasswordFlags] |
|
-> IO () |
Emitted when a mount operation asks the user for a password.
If the message contains a line break, the first line should be
presented as a heading. For example, it may be used as the
primary text in a GtkMessageDialog
.
afterMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskPasswordCallback) -> m SignalHandlerId Source #
Connect a signal handler for the askPassword signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
mountOperation #askPassword 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.
onMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskPasswordCallback) -> m SignalHandlerId Source #
Connect a signal handler for the askPassword signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
mountOperation #askPassword callback
askQuestion
type MountOperationAskQuestionCallback Source #
= Text |
|
-> [Text] |
|
-> IO () |
Emitted when asking the user a question and gives a list of choices for the user to choose from.
If the message contains a line break, the first line should be
presented as a heading. For example, it may be used as the
primary text in a GtkMessageDialog
.
afterMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskQuestionCallback) -> m SignalHandlerId Source #
Connect a signal handler for the askQuestion signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
mountOperation #askQuestion 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.
onMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskQuestionCallback) -> m SignalHandlerId Source #
Connect a signal handler for the askQuestion signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
mountOperation #askQuestion callback
reply
type MountOperationReplyCallback Source #
= MountOperationResult |
|
-> IO () |
Emitted when the user has replied to the mount operation.
afterMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationReplyCallback) -> m SignalHandlerId Source #
Connect a signal handler for the reply signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
mountOperation #reply 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.
onMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationReplyCallback) -> m SignalHandlerId Source #
Connect a signal handler for the reply signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
mountOperation #reply callback
showProcesses
type MountOperationShowProcessesCallback Source #
= Text |
|
-> [Int32] |
|
-> [Text] |
|
-> IO () |
Emitted when one or more processes are blocking an operation
e.g. unmounting/ejecting a Mount
or stopping a Drive
.
Note that this signal may be emitted several times to update the
list of blocking processes as processes close files. The
application should only respond with mountOperationReply
to
the latest signal (setting MountOperation:choice to the choice
the user made).
If the message contains a line break, the first line should be
presented as a heading. For example, it may be used as the
primary text in a GtkMessageDialog
.
Since: 2.22
afterMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowProcessesCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showProcesses signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
mountOperation #showProcesses 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.
onMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowProcessesCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showProcesses signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
mountOperation #showProcesses callback
showUnmountProgress
type MountOperationShowUnmountProgressCallback Source #
= Text |
|
-> Int64 |
|
-> Int64 |
|
-> IO () |
Emitted when an unmount operation has been busy for more than some time (typically 1.5 seconds).
When unmounting or ejecting a volume, the kernel might need to flush
pending data in its buffers to the volume stable storage, and this operation
can take a considerable amount of time. This signal may be emitted several
times as long as the unmount operation is outstanding, and then one
last time when the operation is completed, with bytesLeft
set to zero.
Implementations of GMountOperation should handle this signal by
showing an UI notification, and then dismiss it, or show another notification
of completion, when bytesLeft
reaches zero.
If the message contains a line break, the first line should be
presented as a heading. For example, it may be used as the
primary text in a GtkMessageDialog
.
Since: 2.34
afterMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowUnmountProgressCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showUnmountProgress signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
mountOperation #showUnmountProgress 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.
onMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowUnmountProgressCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showUnmountProgress signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
mountOperation #showUnmountProgress callback