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 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. 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 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.Array parameter of type GLib.Pid is not supported

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: <Error class: unknown class>

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, <Error class: unknown class>, <Error class: unknown class>) -> 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 reply(result: MountOperationResult)

Emits the #GMountOperation::reply signal.