class Gio::MountOperation
- Gio::MountOperation
- GObject::Object
- Reference
- Object
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 Gio::Mount
objects – for example it is also used in Gio::Drive#start
and
Gio::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 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.
Direct Known Subclasses
Defined in:
lib/gi-crystal/src/auto/gio-2.0/mount_operation.crConstructors
-
.new : self
Creates a new mount operation.
- .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)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. - #aborted_signal
-
#anonymous : Bool
Check to see whether the mount operation is being used for an anonymous user.
-
#anonymous=(anonymous : Bool) : Nil
Sets the mount operation to use an anonymous user if anonymous is
true
. - #anonymous? : Bool
- #ask_password_signal
- #ask_question_signal
-
#choice : Int32
Gets a choice from the mount operation.
-
#choice=(choice : Int32) : Nil
Sets a default choice for the mount operation.
-
#domain : String | Nil
Gets the domain of the mount operation.
- #domain=(value : String) : String
-
#domain=(value : Nil) : Nil
Set
#domain
property to nil. -
#domain=(domain : String | Nil) : Nil
Sets the mount operation's domain.
-
#domain? : String | Nil
Same as
#domain
, but can return nil. -
#hash(hasher)
See
Object#hash(hasher)
-
#is_tcrypt_hidden_volume : Bool
Check to see whether the mount operation is being used for a TCRYPT hidden volume.
-
#is_tcrypt_hidden_volume=(hidden_volume : Bool) : Nil
Sets the mount operation to use a hidden volume if hidden_volume is
true
. - #is_tcrypt_hidden_volume? : Bool
-
#is_tcrypt_system_volume : Bool
Check to see whether the mount operation is being used for a TCRYPT system volume.
-
#is_tcrypt_system_volume=(system_volume : Bool) : Nil
Sets the mount operation to use a system volume if system_volume is
true
. - #is_tcrypt_system_volume? : Bool
-
#password : String | Nil
Gets a password from the mount operation.
- #password=(value : String) : String
-
#password=(value : Nil) : Nil
Set
#password
property to nil. -
#password=(password : String | Nil) : Nil
Sets the mount operation's password to password.
-
#password? : String | Nil
Same as
#password
, but can return nil. -
#password_save : Gio::PasswordSave
Gets the state of saving passwords for the mount operation.
-
#password_save=(save : Gio::PasswordSave) : Nil
Sets the state of saving passwords for the mount operation.
-
#pim : UInt32
Gets a PIM from the mount operation.
-
#pim=(pim : UInt32) : Nil
Sets the mount operation's PIM to pim.
-
#reply(result : Gio::MountOperationResult) : Nil
Emits the #GMountOperation::reply signal.
- #reply_signal
- #show_processes_signal
- #show_unmount_progress_signal
-
#username : String | Nil
Get the user name from the mount operation.
- #username=(value : String) : String
-
#username=(value : Nil) : Nil
Set
#username
property to nil. -
#username=(username : String | Nil) : Nil
Sets the user name within op to username.
-
#username? : String | Nil
Same as
#username
, but can return nil.
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
Class Method Detail
Instance Method Detail
Returns true
if this reference is the same as other. Invokes same?
.
Check to see whether the mount operation is being used for an anonymous user.
Sets the mount operation to use an anonymous user if anonymous is true
.
Check to see whether the mount operation is being used for a TCRYPT system volume.
Sets the mount operation to use a system volume if system_volume is true
.
Sets the state of saving passwords for the mount operation.