MountOperation
Object Hierarchy:
GLib.MountOperation
GLib.MountOperation
GLib.MountOperation
GLib.Object
GLib.Object
GLib.Object->GLib.MountOperation
Description:
[ CCode ( type_id = "g_mount_operation_get_type ()" ) ]public class MountOperation : Object
MountOperation 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 MountOperation is used for more than just Mount
objects – for example it is also used in start and
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 MountOperation 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.
Content:
Properties:
public bool anonymous { get ; set ; }
Whether to use an anonymous user when authenticating.
public int choice { get ; set ; }
The index of the user's choice when a question is asked during the
mount operation.
public string domain { get ; set ; }
The domain to use for the mount operation.
public bool is_tcrypt_hidden_volume { get ; set ; }
Whether the device to be unlocked is a TCRYPT hidden volume.
public bool is_tcrypt_system_volume { get ; set ; }
Whether the device to be unlocked is a TCRYPT system volume.
public string password { get ; set ; }
The password that is used for authentication when carrying out the
mount operation.
public PasswordSave password_save { get ; set ; }
Determines if and how the password information should be saved.
public uint pim { get ; set ; }
The VeraCrypt PIM value, when unlocking a VeraCrypt volume.
public string username { get ; set ; }
The user name that is used for authentication when carrying out the
mount operation.
Creation methods:
Methods:
public bool get_anonymous ()
Check to see whether the mount operation is being used for an
anonymous user.
public int get_choice ()
Gets a choice from the mount operation.
public unowned string ? get_domain ()
Gets the domain of the mount operation.
public bool get_is_tcrypt_hidden_volume ()
Check to see whether the mount operation is being used for a TCRYPT
hidden volume.
public bool get_is_tcrypt_system_volume ()
Check to see whether the mount operation is being used for a TCRYPT
system volume.
public unowned string ? get_password ()
Gets a password from the mount operation.
public PasswordSave get_password_save ()
Gets the state of saving passwords for the mount operation.
public uint get_pim ()
Gets a PIM from the mount operation.
public unowned string ? get_username ()
Get the user name from the mount operation.
public void set_anonymous (bool anonymous)
Sets the mount operation to use an anonymous user if anonymous
is true .
public void set_choice (int choice)
Sets a default choice for the mount operation.
public void set_domain (string ? domain)
Sets the mount operation's domain.
public void set_is_tcrypt_hidden_volume (bool hidden_volume)
Sets the mount operation to use a hidden volume if hidden_volume
is true .
public void set_is_tcrypt_system_volume (bool system_volume)
Sets the mount operation to use a system volume if system_volume
is true .
public void set_password (string ? password)
Sets the mount operation's password to password
.
public void set_password_save (PasswordSave save)
Sets the state of saving passwords for the mount operation.
public void set_pim (uint pim)
Sets the mount operation's PIM to pim
.
public void set_username (string ? username)
Sets the user name within this to
username
.
Signals:
public virtual signal void aborted ()
Emitted by the backend when e.
public virtual signal void ask_password (string message, string default_user, string default_domain, AskPasswordFlags flags)
Emitted when a mount operation asks the user for a password.
public virtual signal void ask_question (string message, string [] choices)
Emitted when asking the user a question and gives a list of choices
for the user to choose from.
public virtual signal void reply (MountOperationResult result)
Emitted when the user has replied to the mount operation.
public virtual signal void show_processes (string message, Array <Pid > processes, string [] choices)
Emitted when one or more processes are blocking an operation e.
public virtual signal void show_unmount_progress (string message, int64 time_left, int64 bytes_left)
Emitted when an unmount operation has been busy for more than some
time (typically 1.5 seconds).
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref