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

==(other : self) ==, 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) | Nil data, finalize finalize, freeze_notify : Nil freeze_notify, getv(names : Enumerable(String), values : Enumerable(_)) : Nil getv, hash(hasher) hash, 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) | Nil qdata, ref_count : UInt32 ref_count, run_dispose : Nil run_dispose, set_data(key : String, data : Pointer(Void) | Nil) : Nil set_data, set_property(property_name : String, value : _) : Nil set_property, steal_data(key : String) : Pointer(Void) | Nil steal_data, steal_qdata(quark : UInt32) : Pointer(Void) | Nil 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, 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

cast?(obj : GObject::Object) : self | Nil cast?, compat_control(what : UInt64, data : Pointer(Void) | Nil) : 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

Macros inherited from class GObject::Object

previous_vfunc(*args) previous_vfunc, previous_vfunc!(*args) previous_vfunc!, signal(signature) signal

Constructor Detail

def self.new : self #

Creates a new mount operation.


[View source]
def self.new(*, anonymous : Bool | Nil = nil, choice : Int32 | Nil = nil, domain : String | Nil = nil, is_tcrypt_hidden_volume : Bool | Nil = nil, is_tcrypt_system_volume : Bool | Nil = nil, password : String | Nil = nil, password_save : Gio::PasswordSave | Nil = nil, pim : UInt32 | Nil = nil, username : String | Nil = nil) #

[View source]

Class Method Detail

def self.g_type : UInt64 #

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


[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def aborted_signal #

[View source]
def anonymous : Bool #

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


[View source]
def anonymous=(anonymous : Bool) : Nil #

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


[View source]
def anonymous? : Bool #

[View source]
def ask_password_signal #

[View source]
def ask_question_signal #

[View source]
def choice : Int32 #

Gets a choice from the mount operation.


[View source]
def choice=(choice : Int32) : Nil #

Sets a default choice for the mount operation.


[View source]
def domain : String | Nil #

Gets the domain of the mount operation.


[View source]
def domain=(value : String) : String #

[View source]
def domain=(domain : String | Nil) : Nil #

Sets the mount operation's domain.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def is_tcrypt_hidden_volume : Bool #

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


[View source]
def is_tcrypt_hidden_volume=(hidden_volume : Bool) : Nil #

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


[View source]
def is_tcrypt_hidden_volume? : Bool #

[View source]
def is_tcrypt_system_volume : Bool #

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


[View source]
def is_tcrypt_system_volume=(system_volume : Bool) : Nil #

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


[View source]
def is_tcrypt_system_volume? : Bool #

[View source]
def password : String | Nil #

Gets a password from the mount operation.


[View source]
def password=(value : String) : String #

[View source]
def password=(password : String | Nil) : Nil #

Sets the mount operation's password to password.


[View source]
def password_save : Gio::PasswordSave #

Gets the state of saving passwords for the mount operation.


[View source]
def password_save=(save : Gio::PasswordSave) : Nil #

Sets the state of saving passwords for the mount operation.


[View source]
def pim : UInt32 #

Gets a PIM from the mount operation.


[View source]
def pim=(pim : UInt32) : Nil #

Sets the mount operation's PIM to pim.


[View source]
def reply(result : Gio::MountOperationResult) : Nil #

Emits the #GMountOperation::reply signal.


[View source]
def reply_signal #

[View source]
def show_processes_signal #

[View source]
def show_unmount_progress_signal #

[View source]
def username : String | Nil #

Get the user name from the mount operation.


[View source]
def username=(value : String) : String #

[View source]
def username=(username : String | Nil) : Nil #

Sets the user name within op to username.


[View source]