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

class MountOperation : ObjectG {}

Constructors

this
this(GMountOperation* gMountOperation, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new mount operation.

Members

Functions

addOnAborted
gulong addOnAborted(void delegate(MountOperation) dlg, ConnectFlags connectFlags = cast(ConnectFlags)0)

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

addOnAskPassword
gulong addOnAskPassword(void delegate(string, string, string, GAskPasswordFlags, MountOperation) dlg, ConnectFlags connectFlags = cast(ConnectFlags)0)

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

addOnAskQuestion
gulong addOnAskQuestion(void delegate(string, string[], MountOperation) dlg, ConnectFlags connectFlags = cast(ConnectFlags)0)

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

addOnReply
gulong addOnReply(void delegate(GMountOperationResult, MountOperation) dlg, ConnectFlags connectFlags = cast(ConnectFlags)0)

Emitted when the user has replied to the mount operation.

addOnShowProcesses
gulong addOnShowProcesses(void delegate(string, ArrayG, string[], MountOperation) dlg, ConnectFlags connectFlags = cast(ConnectFlags)0)

Emitted when one or more processes are blocking an operation e.g. unmounting/ejecting a GMount or stopping a GDrive

addOnShowUnmountProgress
gulong addOnShowUnmountProgress(void delegate(string, long, long, MountOperation) dlg, ConnectFlags connectFlags = cast(ConnectFlags)0)

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

getAnonymous
bool getAnonymous()

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

getChoice
int getChoice()

Gets a choice from the mount operation.

getDomain
string getDomain()

Gets the domain of the mount operation.

getIsTcryptHiddenVolume
bool getIsTcryptHiddenVolume()

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

getIsTcryptSystemVolume
bool getIsTcryptSystemVolume()

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

getMountOperationStruct
GMountOperation* getMountOperationStruct(bool transferOwnership = false)

Get the main Gtk struct

getPassword
string getPassword()

Gets a password from the mount operation.

getPasswordSave
GPasswordSave getPasswordSave()

Gets the state of saving passwords for the mount operation.

getPim
uint getPim()

Gets a PIM from the mount operation.

getStruct
void* getStruct()

the main Gtk struct as a void*

getUsername
string getUsername()

Get the user name from the mount operation.

reply
void reply(GMountOperationResult result)

Emits the reply signal.

setAnonymous
void setAnonymous(bool anonymous)

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

setChoice
void setChoice(int choice)

Sets a default choice for the mount operation.

setDomain
void setDomain(string domain)

Sets the mount operation's domain.

setIsTcryptHiddenVolume
void setIsTcryptHiddenVolume(bool hiddenVolume)

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

setIsTcryptSystemVolume
void setIsTcryptSystemVolume(bool systemVolume)

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

setPassword
void setPassword(string password)

Sets the mount operation's password to password.

setPasswordSave
void setPasswordSave(GPasswordSave save)

Sets the state of saving passwords for the mount operation.

setPim
void setPim(uint pim)

Sets the mount operation's PIM to pim.

setUsername
void setUsername(string username)

Sets the user name within op to username.

Static functions

getType
GType getType()

Variables

gMountOperation
GMountOperation* gMountOperation;

the main Gtk struct