Package ch.bailu.gtk.gio
Klasse MountOperation
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gio.MountOperation
- Alle implementierten Schnittstellen:
PointerInterface
- Bekannte direkte Unterklassen:
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 [iface@Gio.Mount]
objects – for example it is also used in [method@Gio.Drive.start] and
[method@Gio.Drive.stop].
Users should instantiate a subclass of this that implements all the
various callbacks to show the required dialogs, such as
[`GtkMountOperation`](https://docs.gtk.org/gtk4/class.MountOperation.html).
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](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 [iface@Gio.Mount]
objects – for example it is also used in [method@Gio.Drive.start] and
[method@Gio.Drive.stop].
Users should instantiate a subclass of this that implements all the
various callbacks to show the required dialogs, such as
[`GtkMountOperation`](https://docs.gtk.org/gtk4/class.MountOperation.html).
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](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.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
static interface
static interface
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final String
static final String
static final String
static final String
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
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.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden 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
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
SIGNAL_ON_ABORTED
- Siehe auch:
-
SIGNAL_ON_ASK_PASSWORD
- Siehe auch:
-
SIGNAL_ON_REPLY
- Siehe auch:
-
SIGNAL_ON_SHOW_UNMOUNT_PROGRESS
- Siehe auch:
-
-
Konstruktordetails
-
MountOperation
-
MountOperation
public MountOperation()Creates a new mount operation.
-
-
Methodendetails
-
getClassHandler
-
getAnonymous
public boolean getAnonymous()Check to see whether the mount operation is being used
for an anonymous user.- Gibt zurück:
- %TRUE if mount operation is anonymous.
-
getChoice
public int getChoice()Gets a choice from the mount operation.- Gibt zurück:
- 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.- Gibt zurück:
- 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.- Gibt zurück:
- %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.- Gibt zurück:
- %TRUE if mount operation is for system volume.
-
getPassword
Gets a password from the mount operation.- Gibt zurück:
- a string containing the password within @op.
-
getPasswordSave
public int getPasswordSave()Gets the state of saving passwords for the mount operation.- Gibt zurück:
- a #GPasswordSave flag.
-
getPim
public int getPim()Gets a PIM from the mount operation.- Gibt zurück:
- The VeraCrypt PIM within @op.
-
getUsername
Get the user name from the mount operation.- Gibt zurück:
- a string containing the user name.
-
reply
public void reply(int result) Emits the #GMountOperation::reply signal.- Parameter:
result
- a #GMountOperationResult
-
setAnonymous
public void setAnonymous(boolean anonymous) Sets the mount operation to use an anonymous user if @anonymous is %TRUE.- Parameter:
anonymous
- boolean value.
-
setChoice
public void setChoice(int choice) Sets a default choice for the mount operation.- Parameter:
choice
- an integer.
-
setDomain
Sets the mount operation's domain.- Parameter:
domain
- the domain to set.
-
setDomain
Sets the mount operation's domain.- Parameter:
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.- Parameter:
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.- Parameter:
system_volume
- boolean value.
-
setPassword
Sets the mount operation's password to @password.- Parameter:
password
- password to set.
-
setPassword
Sets the mount operation's password to @password.- Parameter:
password
- password to set.
-
setPasswordSave
public void setPasswordSave(int save) Sets the state of saving passwords for the mount operation.- Parameter:
save
- a set of #GPasswordSave flags.
-
setPim
public void setPim(int pim) Sets the mount operation's PIM to @pim.- Parameter:
pim
- an unsigned integer.
-
setUsername
Sets the user name within @op to @username.- Parameter:
username
- input username.
-
setUsername
Sets the user name within @op to @username.- Parameter:
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.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
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.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
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.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
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.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
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()
-