Package ch.bailu.gtk.gio
Class MountOperation
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gio.MountOperation
- All Implemented Interfaces:
PointerInterface
- Direct Known Subclasses:
MountOperation
#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 #GMount
objects – for example it is also used in g_drive_start() and
g_drive_stop().
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.
The term ‘TCRYPT’ is used to mean ‘compatible with TrueCrypt and VeraCrypt’.
[TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt) is a discontinued system for
encrypting file containers, partitions or whole disks, typically used with Windows.
[VeraCrypt](https://www.veracrypt.fr/) is a maintained fork of TrueCrypt with various
improvements and auditing fixes.
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 #GMount
objects – for example it is also used in g_drive_start() and
g_drive_stop().
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.
The term ‘TCRYPT’ is used to mean ‘compatible with TrueCrypt and VeraCrypt’.
[TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt) is a discontinued system for
encrypting file containers, partitions or whole disks, typically used with Windows.
[VeraCrypt](https://www.veracrypt.fr/) is a maintained fork of TrueCrypt with various
improvements and auditing fixes.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check to see whether the mount operation is being used
for an anonymous user.int
Gets a choice from the mount operation.static ClassHandler
Gets the domain of the mount operation.static int
boolean
Check to see whether the mount operation is being used
for a TCRYPT hidden volume.boolean
Check to see whether the mount operation is being used
for a TCRYPT system volume.static long
static TypeSystem.TypeSize
Gets a password from the mount operation.int
Gets the state of saving passwords for the mount operation.int
getPim()
Gets a PIM from the mount operation.static long
static TypeSystem.TypeSize
Get the user name from the mount operation.onAborted
(MountOperation.OnAborted signal) Connect to signal "aborted".Connect to signal "ask-password".onReply
(MountOperation.OnReply signal) Connect to signal "reply".Connect to signal "show-unmount-progress".void
reply
(int result) Emits the #GMountOperation::reply signal.void
setAnonymous
(boolean anonymous) Sets the mount operation to use an anonymous user if @anonymous is %TRUE.void
setChoice
(int choice) Sets a default choice for the mount operation.void
Sets the mount operation's domain.void
Sets the mount operation's domain.void
setIsTcryptHiddenVolume
(boolean hidden_volume) Sets the mount operation to use a hidden volume if @hidden_volume is %TRUE.void
setIsTcryptSystemVolume
(boolean system_volume) Sets the mount operation to use a system volume if @system_volume is %TRUE.void
setPassword
(Str password) Sets the mount operation's password to @password.void
setPassword
(String password) Sets the mount operation's password to @password.void
setPasswordSave
(int save) Sets the state of saving passwords for the mount operation.void
setPim
(int pim) Sets the mount operation's PIM to @pim.void
setUsername
(Str username) Sets the user name within @op to @username.void
setUsername
(String username) Sets the user name within @op to @username.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_ABORTED
- See Also:
-
SIGNAL_ON_ASK_PASSWORD
- See Also:
-
SIGNAL_ON_REPLY
- See Also:
-
SIGNAL_ON_SHOW_UNMOUNT_PROGRESS
- See Also:
-
-
Constructor Details
-
MountOperation
-
MountOperation
public MountOperation()Creates a new mount operation.
-
-
Method Details
-
getClassHandler
-
getAnonymous
public boolean getAnonymous()Check to see whether the mount operation is being used
for an anonymous user.- Returns:
- %TRUE if mount operation is anonymous.
-
getChoice
public int getChoice()Gets a choice from the mount operation.- Returns:
- an integer containing an index of the user's choice from the choice's list, or `0`.
-
getDomain
Gets the domain of the mount operation.- Returns:
- a string set to the domain.
-
getIsTcryptHiddenVolume
public boolean getIsTcryptHiddenVolume()Check to see whether the mount operation is being used
for a TCRYPT hidden volume.- Returns:
- %TRUE if mount operation is for hidden volume.
-
getIsTcryptSystemVolume
public boolean getIsTcryptSystemVolume()Check to see whether the mount operation is being used
for a TCRYPT system volume.- Returns:
- %TRUE if mount operation is for system volume.
-
getPassword
Gets a password from the mount operation.- Returns:
- a string containing the password within @op.
-
getPasswordSave
public int getPasswordSave()Gets the state of saving passwords for the mount operation.- Returns:
- a #GPasswordSave flag.
-
getPim
public int getPim()Gets a PIM from the mount operation.- Returns:
- The VeraCrypt PIM within @op.
-
getUsername
Get the user name from the mount operation.- Returns:
- a string containing the user name.
-
reply
public void reply(int result) Emits the #GMountOperation::reply signal.- Parameters:
result
- a #GMountOperationResult
-
setAnonymous
public void setAnonymous(boolean anonymous) Sets the mount operation to use an anonymous user if @anonymous is %TRUE.- Parameters:
anonymous
- boolean value.
-
setChoice
public void setChoice(int choice) Sets a default choice for the mount operation.- Parameters:
choice
- an integer.
-
setDomain
Sets the mount operation's domain.- Parameters:
domain
- the domain to set.
-
setDomain
Sets the mount operation's domain.- Parameters:
domain
- the domain to set.
-
setIsTcryptHiddenVolume
public void setIsTcryptHiddenVolume(boolean hidden_volume) Sets the mount operation to use a hidden volume if @hidden_volume is %TRUE.- Parameters:
hidden_volume
- boolean value.
-
setIsTcryptSystemVolume
public void setIsTcryptSystemVolume(boolean system_volume) Sets the mount operation to use a system volume if @system_volume is %TRUE.- Parameters:
system_volume
- boolean value.
-
setPassword
Sets the mount operation's password to @password.- Parameters:
password
- password to set.
-
setPassword
Sets the mount operation's password to @password.- Parameters:
password
- password to set.
-
setPasswordSave
public void setPasswordSave(int save) Sets the state of saving passwords for the mount operation.- Parameters:
save
- a set of #GPasswordSave flags.
-
setPim
public void setPim(int pim) Sets the mount operation's PIM to @pim.- Parameters:
pim
- an unsigned integer.
-
setUsername
Sets the user name within @op to @username.- Parameters:
username
- input username.
-
setUsername
Sets the user name within @op to @username.- Parameters:
username
- input username.
-
onAborted
Connect to signal "aborted".
SeeMountOperation.OnAborted.onAborted()
for signal description.
FieldSIGNAL_ON_ABORTED
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onAskPassword
Connect to signal "ask-password".
SeeMountOperation.OnAskPassword.onAskPassword(ch.bailu.gtk.type.Str, ch.bailu.gtk.type.Str, ch.bailu.gtk.type.Str, int)
for signal description.
FieldSIGNAL_ON_ASK_PASSWORD
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onReply
Connect to signal "reply".
SeeMountOperation.OnReply.onReply(int)
for signal description.
FieldSIGNAL_ON_REPLY
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onShowUnmountProgress
Connect to signal "show-unmount-progress".
SeeMountOperation.OnShowUnmountProgress.onShowUnmountProgress(ch.bailu.gtk.type.Str, long, long)
for signal description.
FieldSIGNAL_ON_SHOW_UNMOUNT_PROGRESS
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-