Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
MountOperation
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 MountOperation
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 Nothing
can be
passed, see each method taking a MountOperation
for details.
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 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 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 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 -> 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 -> 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 -> 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 ()
- constructMountOperationDomain :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)
- getMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m 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 ()
- constructMountOperationPassword :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)
- getMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m 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 ()
- constructMountOperationUsername :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)
- getMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m Text
- setMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()
- type C_MountOperationAbortedCallback = Ptr () -> Ptr () -> IO ()
- type MountOperationAbortedCallback = IO ()
- afterMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> MountOperationAbortedCallback -> m SignalHandlerId
- genClosure_MountOperationAborted :: MonadIO m => MountOperationAbortedCallback -> m (GClosure C_MountOperationAbortedCallback)
- mk_MountOperationAbortedCallback :: C_MountOperationAbortedCallback -> IO (FunPtr C_MountOperationAbortedCallback)
- noMountOperationAbortedCallback :: Maybe MountOperationAbortedCallback
- onMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> MountOperationAbortedCallback -> m SignalHandlerId
- wrap_MountOperationAbortedCallback :: MountOperationAbortedCallback -> C_MountOperationAbortedCallback
- type C_MountOperationAskPasswordCallback = Ptr () -> CString -> CString -> CString -> CUInt -> Ptr () -> IO ()
- type MountOperationAskPasswordCallback = Text -> Text -> Text -> [AskPasswordFlags] -> IO ()
- afterMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskPasswordCallback -> m SignalHandlerId
- genClosure_MountOperationAskPassword :: MonadIO m => MountOperationAskPasswordCallback -> m (GClosure C_MountOperationAskPasswordCallback)
- mk_MountOperationAskPasswordCallback :: C_MountOperationAskPasswordCallback -> IO (FunPtr C_MountOperationAskPasswordCallback)
- noMountOperationAskPasswordCallback :: Maybe MountOperationAskPasswordCallback
- onMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskPasswordCallback -> m SignalHandlerId
- wrap_MountOperationAskPasswordCallback :: MountOperationAskPasswordCallback -> C_MountOperationAskPasswordCallback
- type C_MountOperationAskQuestionCallback = Ptr () -> CString -> Ptr CString -> Ptr () -> IO ()
- type MountOperationAskQuestionCallback = Text -> [Text] -> IO ()
- afterMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskQuestionCallback -> m SignalHandlerId
- genClosure_MountOperationAskQuestion :: MonadIO m => MountOperationAskQuestionCallback -> m (GClosure C_MountOperationAskQuestionCallback)
- mk_MountOperationAskQuestionCallback :: C_MountOperationAskQuestionCallback -> IO (FunPtr C_MountOperationAskQuestionCallback)
- noMountOperationAskQuestionCallback :: Maybe MountOperationAskQuestionCallback
- onMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskQuestionCallback -> m SignalHandlerId
- wrap_MountOperationAskQuestionCallback :: MountOperationAskQuestionCallback -> C_MountOperationAskQuestionCallback
- type C_MountOperationReplyCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type MountOperationReplyCallback = MountOperationResult -> IO ()
- afterMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> MountOperationReplyCallback -> m SignalHandlerId
- genClosure_MountOperationReply :: MonadIO m => MountOperationReplyCallback -> m (GClosure C_MountOperationReplyCallback)
- mk_MountOperationReplyCallback :: C_MountOperationReplyCallback -> IO (FunPtr C_MountOperationReplyCallback)
- noMountOperationReplyCallback :: Maybe MountOperationReplyCallback
- onMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> MountOperationReplyCallback -> m SignalHandlerId
- wrap_MountOperationReplyCallback :: MountOperationReplyCallback -> C_MountOperationReplyCallback
- type C_MountOperationShowProcessesCallback = Ptr () -> CString -> Ptr (GArray Int32) -> Ptr CString -> Ptr () -> IO ()
- type MountOperationShowProcessesCallback = Text -> [Int32] -> [Text] -> IO ()
- afterMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowProcessesCallback -> m SignalHandlerId
- genClosure_MountOperationShowProcesses :: MonadIO m => MountOperationShowProcessesCallback -> m (GClosure C_MountOperationShowProcessesCallback)
- mk_MountOperationShowProcessesCallback :: C_MountOperationShowProcessesCallback -> IO (FunPtr C_MountOperationShowProcessesCallback)
- noMountOperationShowProcessesCallback :: Maybe MountOperationShowProcessesCallback
- onMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowProcessesCallback -> m SignalHandlerId
- wrap_MountOperationShowProcessesCallback :: MountOperationShowProcessesCallback -> C_MountOperationShowProcessesCallback
- type C_MountOperationShowUnmountProgressCallback = Ptr () -> CString -> Int64 -> Int64 -> Ptr () -> IO ()
- type MountOperationShowUnmountProgressCallback = Text -> Int64 -> Int64 -> IO ()
- afterMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowUnmountProgressCallback -> m SignalHandlerId
- genClosure_MountOperationShowUnmountProgress :: MonadIO m => MountOperationShowUnmountProgressCallback -> m (GClosure C_MountOperationShowUnmountProgressCallback)
- mk_MountOperationShowUnmountProgressCallback :: C_MountOperationShowUnmountProgressCallback -> IO (FunPtr C_MountOperationShowUnmountProgressCallback)
- noMountOperationShowUnmountProgressCallback :: Maybe MountOperationShowUnmountProgressCallback
- onMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowUnmountProgressCallback -> m SignalHandlerId
- wrap_MountOperationShowUnmountProgressCallback :: MountOperationShowUnmountProgressCallback -> C_MountOperationShowUnmountProgressCallback
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 # | |
IsGValue MountOperation Source # | Convert |
Defined in GI.Gio.Objects.MountOperation toGValue :: MountOperation -> IO GValue # fromGValue :: GValue -> IO MountOperation # | |
ManagedPtrNewtype MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation | |
TypedObject MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation | |
GObject MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation | |
HasParentTypes MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation | |
type ParentTypes MountOperation Source # | |
Defined in GI.Gio.Objects.MountOperation |
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
Overloaded methods
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 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 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 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 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 |
|
-> 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 |
|
-> 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 |
|
-> 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 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.
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 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.
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 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.
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 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 C_MountOperationAbortedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
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 -> 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
genClosure_MountOperationAborted :: MonadIO m => MountOperationAbortedCallback -> m (GClosure C_MountOperationAbortedCallback) Source #
Wrap the callback into a GClosure
.
mk_MountOperationAbortedCallback :: C_MountOperationAbortedCallback -> IO (FunPtr C_MountOperationAbortedCallback) Source #
Generate a function pointer callable from C code, from a C_MountOperationAbortedCallback
.
noMountOperationAbortedCallback :: Maybe MountOperationAbortedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MountOperationAbortedCallback
onMountOperationAborted :: (IsMountOperation a, MonadIO m) => 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
wrap_MountOperationAbortedCallback :: MountOperationAbortedCallback -> C_MountOperationAbortedCallback Source #
Wrap a MountOperationAbortedCallback
into a C_MountOperationAbortedCallback
.
askPassword
type C_MountOperationAskPasswordCallback = Ptr () -> CString -> CString -> CString -> CUInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
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 -> 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
genClosure_MountOperationAskPassword :: MonadIO m => MountOperationAskPasswordCallback -> m (GClosure C_MountOperationAskPasswordCallback) Source #
Wrap the callback into a GClosure
.
mk_MountOperationAskPasswordCallback :: C_MountOperationAskPasswordCallback -> IO (FunPtr C_MountOperationAskPasswordCallback) Source #
Generate a function pointer callable from C code, from a C_MountOperationAskPasswordCallback
.
noMountOperationAskPasswordCallback :: Maybe MountOperationAskPasswordCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MountOperationAskPasswordCallback
onMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => 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
wrap_MountOperationAskPasswordCallback :: MountOperationAskPasswordCallback -> C_MountOperationAskPasswordCallback Source #
askQuestion
type C_MountOperationAskQuestionCallback = Ptr () -> CString -> Ptr CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
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 -> 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
genClosure_MountOperationAskQuestion :: MonadIO m => MountOperationAskQuestionCallback -> m (GClosure C_MountOperationAskQuestionCallback) Source #
Wrap the callback into a GClosure
.
mk_MountOperationAskQuestionCallback :: C_MountOperationAskQuestionCallback -> IO (FunPtr C_MountOperationAskQuestionCallback) Source #
Generate a function pointer callable from C code, from a C_MountOperationAskQuestionCallback
.
noMountOperationAskQuestionCallback :: Maybe MountOperationAskQuestionCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MountOperationAskQuestionCallback
onMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => 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
wrap_MountOperationAskQuestionCallback :: MountOperationAskQuestionCallback -> C_MountOperationAskQuestionCallback Source #
reply
type C_MountOperationReplyCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type MountOperationReplyCallback Source #
= MountOperationResult |
|
-> IO () |
Emitted when the user has replied to the mount operation.
afterMountOperationReply :: (IsMountOperation a, MonadIO m) => 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
genClosure_MountOperationReply :: MonadIO m => MountOperationReplyCallback -> m (GClosure C_MountOperationReplyCallback) Source #
Wrap the callback into a GClosure
.
mk_MountOperationReplyCallback :: C_MountOperationReplyCallback -> IO (FunPtr C_MountOperationReplyCallback) Source #
Generate a function pointer callable from C code, from a C_MountOperationReplyCallback
.
noMountOperationReplyCallback :: Maybe MountOperationReplyCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MountOperationReplyCallback
onMountOperationReply :: (IsMountOperation a, MonadIO m) => 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
wrap_MountOperationReplyCallback :: MountOperationReplyCallback -> C_MountOperationReplyCallback Source #
Wrap a MountOperationReplyCallback
into a C_MountOperationReplyCallback
.
showProcesses
type C_MountOperationShowProcessesCallback = Ptr () -> CString -> Ptr (GArray Int32) -> Ptr CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
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 -> 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
genClosure_MountOperationShowProcesses :: MonadIO m => MountOperationShowProcessesCallback -> m (GClosure C_MountOperationShowProcessesCallback) Source #
Wrap the callback into a GClosure
.
mk_MountOperationShowProcessesCallback :: C_MountOperationShowProcessesCallback -> IO (FunPtr C_MountOperationShowProcessesCallback) Source #
Generate a function pointer callable from C code, from a C_MountOperationShowProcessesCallback
.
noMountOperationShowProcessesCallback :: Maybe MountOperationShowProcessesCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MountOperationShowProcessesCallback
onMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => 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
wrap_MountOperationShowProcessesCallback :: MountOperationShowProcessesCallback -> C_MountOperationShowProcessesCallback Source #
showUnmountProgress
type C_MountOperationShowUnmountProgressCallback = Ptr () -> CString -> Int64 -> Int64 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
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 -> 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
genClosure_MountOperationShowUnmountProgress :: MonadIO m => MountOperationShowUnmountProgressCallback -> m (GClosure C_MountOperationShowUnmountProgressCallback) Source #
Wrap the callback into a GClosure
.
mk_MountOperationShowUnmountProgressCallback :: C_MountOperationShowUnmountProgressCallback -> IO (FunPtr C_MountOperationShowUnmountProgressCallback) Source #
Generate a function pointer callable from C code, from a C_MountOperationShowUnmountProgressCallback
.
noMountOperationShowUnmountProgressCallback :: Maybe MountOperationShowUnmountProgressCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MountOperationShowUnmountProgressCallback
onMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => 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