MountOperation

open class MountOperation(pointer: <Error class: unknown class><<Error class: unknown class>>)

#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 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.

Skipped during bindings generation

  • signal show-processes: Unsupported parameter processes : GLib.Pid

Constructors

Link copied to clipboard
constructor()

Creates a new mount operation.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open var anonymous: Boolean

Whether to use an anonymous user when authenticating.

Link copied to clipboard
open var choice: Int

The index of the user's choice when a question is asked during the mount operation. See the #GMountOperation::ask-question signal.

Link copied to clipboard
open var domain: String?

The domain to use for the mount operation.

Link copied to clipboard
val gioMountOperationPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Whether the device to be unlocked is a TCRYPT hidden volume. See the VeraCrypt documentation.

Link copied to clipboard

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.

Link copied to clipboard
open var password: String?

The password that is used for authentication when carrying out the mount operation.

Link copied to clipboard

Determines if and how the password information should be saved.

Link copied to clipboard
open var pim: <Error class: unknown class>

The VeraCrypt PIM value, when unlocking a VeraCrypt volume. See the VeraCrypt * documentation.

Link copied to clipboard
open var username: String?

The user name that is used for authentication when carrying out the mount operation.

Functions

Link copied to clipboard
fun connectAborted(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.

Link copied to clipboard
fun connectAskPassword(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (message: String, defaultUser: String, defaultDomain: String, flags: AskPasswordFlags) -> Unit): <Error class: unknown class>

Emitted when a mount operation asks the user for a password.

Link copied to clipboard
fun connectAskQuestion(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (message: String, choices: List<String>) -> Unit): <Error class: unknown class>

Emitted when asking the user a question and gives a list of choices for the user to choose from.

Link copied to clipboard
fun connectReply(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (result: MountOperationResult) -> Unit): <Error class: unknown class>

Emitted when the user has replied to the mount operation.

Link copied to clipboard
fun connectShowUnmountProgress(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (message: String, timeLeft: Long, bytesLeft: Long) -> Unit): <Error class: unknown class>

Emitted when an unmount operation has been busy for more than some time (typically 1.5 seconds).

Link copied to clipboard
open fun getAnonymous(): Boolean

Check to see whether the mount operation is being used for an anonymous user.

Link copied to clipboard
open fun getChoice(): Int

Gets a choice from the mount operation.

Link copied to clipboard
open fun getDomain(): String?

Gets the domain of the mount operation.

Link copied to clipboard

Check to see whether the mount operation is being used for a TCRYPT hidden volume.

Link copied to clipboard

Check to see whether the mount operation is being used for a TCRYPT system volume.

Link copied to clipboard
open fun getPassword(): String?

Gets a password from the mount operation.

Link copied to clipboard

Gets the state of saving passwords for the mount operation.

Link copied to clipboard
open fun getPim(): <Error class: unknown class>

Gets a PIM from the mount operation.

Link copied to clipboard
open fun getUsername(): String?

Get the user name from the mount operation.

Link copied to clipboard
open fun reply(result: MountOperationResult)

Emits the #GMountOperation::reply signal.

Link copied to clipboard
open fun setAnonymous(anonymous: Boolean)

Sets the mount operation to use an anonymous user if @anonymous is true.

Link copied to clipboard
open fun setChoice(choice: Int)

Sets a default choice for the mount operation.

Link copied to clipboard
open fun setDomain(domain: String? = null)

Sets the mount operation's domain.

Link copied to clipboard
open fun setIsTcryptHiddenVolume(hiddenVolume: Boolean)

Sets the mount operation to use a hidden volume if @hidden_volume is true.

Link copied to clipboard
open fun setIsTcryptSystemVolume(systemVolume: Boolean)

Sets the mount operation to use a system volume if @system_volume is true.

Link copied to clipboard
open fun setPassword(password: String? = null)

Sets the mount operation's password to @password.

Link copied to clipboard

Sets the state of saving passwords for the mount operation.

Link copied to clipboard
open fun setPim(pim: <Error class: unknown class>)

Sets the mount operation's PIM to @pim.

Link copied to clipboard
open fun setUsername(username: String? = null)

Sets the user name within @op to @username.