Class MountOperation.Builder<B extends MountOperation.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
MountOperation.Builder
- Enclosing class:
MountOperation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theMountOperation
object.onAborted
(MountOperation.AbortedCallback handler) Emitted by the backend when e.g.Emitted when a mount operation asks the user for a password.Emitted when asking the user a question and gives a list of choices for the user to choose from.onReply
(MountOperation.ReplyCallback handler) Emitted when the user has replied to the mount operation.Emitted when one or more processes are blocking an operation e.g.Emitted when an unmount operation has been busy for more than some time (typically 1.5 seconds).setAnonymous
(boolean anonymous) Whether to use an anonymous user when authenticating.setChoice
(int choice) The index of the user's choice when a question is asked during the mount operation.The domain to use for the mount operation.setIsTcryptHiddenVolume
(boolean isTcryptHiddenVolume) Whether the device to be unlocked is a TCRYPT hidden volume.setIsTcryptSystemVolume
(boolean isTcryptSystemVolume) Whether the device to be unlocked is a TCRYPT system volume.setPassword
(String password) The password that is used for authentication when carrying out the mount operation.setPasswordSave
(PasswordSave passwordSave) Determines if and how the password information should be saved.setPim
(int pim) The VeraCrypt PIM value, when unlocking a VeraCrypt volume.setUsername
(String username) The user name that is used for authentication when carrying out the mount operation.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theMountOperation
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toMountOperation
.- Overrides:
build
in classGObject.Builder<B extends MountOperation.Builder<B>>
- Returns:
- a new instance of
MountOperation
with the properties that were set in the Builder object.
-
setAnonymous
Whether to use an anonymous user when authenticating.- Parameters:
anonymous
- the value for theanonymous
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setChoice
The index of the user's choice when a question is asked during the mount operation. See theGMountOperation
::ask-question signal.- Parameters:
choice
- the value for thechoice
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDomain
-
setIsTcryptHiddenVolume
Whether the device to be unlocked is a TCRYPT hidden volume. See the VeraCrypt documentation.- Parameters:
isTcryptHiddenVolume
- the value for theis-tcrypt-hidden-volume
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIsTcryptSystemVolume
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.- Parameters:
isTcryptSystemVolume
- the value for theis-tcrypt-system-volume
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPassword
-
setPasswordSave
Determines if and how the password information should be saved.- Parameters:
passwordSave
- the value for thepassword-save
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPim
The VeraCrypt PIM value, when unlocking a VeraCrypt volume. See the VeraCrypt documentation.html).- Parameters:
pim
- the value for thepim
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUsername
-
onAborted
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.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onAskPassword
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
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onAskQuestion
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
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onReply
Emitted when the user has replied to the mount operation.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onShowProcesses
Emitted when one or more processes are blocking an operation e.g. unmounting/ejecting aGMount
or stopping aGDrive
.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 g_mount_operation_reply() to the latest signal (setting
GMountOperation
: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
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onShowUnmountProgress
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
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-