class Gio::MountOperation

Overview

#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 #Gtk::MountOperation. If no user interaction is desired (for example when automounting filesystems at login time), usually nil 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.

Direct Known Subclasses

Defined in:

lib/gi-crystal/src/auto/gio-2.0/mount_operation.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class GObject::Object

bind_property(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags) : GObject::Binding bind_property, bind_property_full(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags, transform_to : GObject::Closure, transform_from : GObject::Closure) : GObject::Binding bind_property_full, data(key : String) : Pointer(Void)? data, finalize finalize, freeze_notify : Nil freeze_notify, getv(names : Enumerable(String), values : Enumerable(_)) : Nil getv, notify(property_name : String) : Nil notify, notify_by_pspec(pspec : GObject::ParamSpec) : Nil notify_by_pspec, notify_signal notify_signal, property(property_name : String, value : _) : Nil property, qdata(quark : UInt32) : Pointer(Void)? qdata, ref_count : UInt32 ref_count, run_dispose : Nil run_dispose, set_data(key : String, data : Pointer(Void)?) : Nil set_data, set_property(property_name : String, value : _) : Nil set_property, steal_data(key : String) : Pointer(Void)? steal_data, steal_qdata(quark : UInt32) : Pointer(Void)? steal_qdata, thaw_notify : Nil thaw_notify, to_unsafe : Pointer(Void) to_unsafe, watch_closure(closure : GObject::Closure) : Nil watch_closure

Constructor methods inherited from class GObject::Object

cast(obj : GObject::Object) : self cast, cast?(obj : GObject::Object) : self? cast?, new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
new
new
, newv(object_type : UInt64, parameters : Enumerable(GObject::Parameter)) : self newv

Class methods inherited from class GObject::Object

compat_control(what : UInt64, data : Pointer(Void)?) : UInt64 compat_control, g_type : UInt64 g_type, interface_find_property(g_iface : GObject::TypeInterface, property_name : String) : GObject::ParamSpec interface_find_property, interface_list_properties(g_iface : GObject::TypeInterface) : Enumerable(GObject::ParamSpec) interface_list_properties

Constructor Detail

def self.new : self #

Creates a new mount operation.


def self.new(*, anonymous : Bool? = nil, choice : Int32? = nil, domain : String? = nil, is_tcrypt_hidden_volume : Bool? = nil, is_tcrypt_system_volume : Bool? = nil, password : String? = nil, password_save : Gio::PasswordSave? = nil, pim : UInt32? = nil, username : String? = nil) #

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def aborted_signal #

def anonymous : Bool #

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


def anonymous=(anonymous : Bool) : Nil #

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


def anonymous? : Bool #

def ask_password_signal #

def ask_question_signal #

def choice : Int32 #

Gets a choice from the mount operation.


def choice=(choice : Int32) : Nil #

Sets a default choice for the mount operation.


def domain : String? #

Gets the domain of the mount operation.


def domain=(value : String) : String #

def domain=(domain : String?) : Nil #

Sets the mount operation's domain.


def is_tcrypt_hidden_volume : Bool #

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


def is_tcrypt_hidden_volume=(hidden_volume : Bool) : Nil #

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


def is_tcrypt_hidden_volume? : Bool #

def is_tcrypt_system_volume : Bool #

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


def is_tcrypt_system_volume=(system_volume : Bool) : Nil #

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


def is_tcrypt_system_volume? : Bool #

def password : String? #

Gets a password from the mount operation.


def password=(value : String) : String #

def password=(password : String?) : Nil #

Sets the mount operation's password to @password.


def password_save : Gio::PasswordSave #

Gets the state of saving passwords for the mount operation.


def password_save=(save : Gio::PasswordSave) : Nil #

Sets the state of saving passwords for the mount operation.


def pim : UInt32 #

Gets a PIM from the mount operation.


def pim=(pim : UInt32) : Nil #

Sets the mount operation's PIM to @pim.


def reply(result : Gio::MountOperationResult) : Nil #

Emits the #GMountOperation::reply signal.


def reply_signal #

def show_processes_signal #

def show_unmount_progress_signal #

def username : String? #

Get the user name from the mount operation.


def username=(value : String) : String #

def username=(username : String?) : Nil #

Sets the user name within @op to @username.