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
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfaceNested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck to see whether the mount operation is being used
for an anonymous user.intGets a choice from the mount operation.static ClassHandlerGets the domain of the mount operation.static intbooleanCheck to see whether the mount operation is being used
for a TCRYPT hidden volume.booleanCheck to see whether the mount operation is being used
for a TCRYPT system volume.static longstatic TypeSystem.TypeSizeGets a password from the mount operation.intGets the state of saving passwords for the mount operation.intgetPim()Gets a PIM from the mount operation.static longstatic TypeSystem.TypeSizeGet 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".voidreply(int result) Emits the #GMountOperation::reply signal.voidsetAnonymous(boolean anonymous) Sets the mount operation to use an anonymous user if @anonymous is %TRUE.voidsetChoice(int choice) Sets a default choice for the mount operation.voidSets the mount operation's domain.voidSets the mount operation's domain.voidsetIsTcryptHiddenVolume(boolean hidden_volume) Sets the mount operation to use a hidden volume if @hidden_volume is %TRUE.voidsetIsTcryptSystemVolume(boolean system_volume) Sets the mount operation to use a system volume if @system_volume is %TRUE.voidsetPassword(Str password) Sets the mount operation's password to @password.voidsetPassword(String password) Sets the mount operation's password to @password.voidsetPasswordSave(int save) Sets the state of saving passwords for the mount operation.voidsetPim(int pim) Sets the mount operation's PIM to @pim.voidsetUsername(Str username) Sets the user name within @op to @username.voidsetUsername(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, weakUnrefMethods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksMethods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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_ABORTEDcontains 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_PASSWORDcontains 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_REPLYcontains 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_PROGRESScontains 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()
-