Authentication methods for mountable locations. More...
#include <giomm/mountoperation.h>
Public Member Functions | |
virtual | ~MountOperation () |
GMountOperation* | gobj () |
Provides access to the underlying C GObject. | |
const GMountOperation* | gobj () const |
Provides access to the underlying C GObject. | |
GMountOperation* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
Glib::ustring | get_username () const |
Get the user name from the mount operation. | |
void | set_username (const Glib::ustring& username) |
Sets the user name within op to username. | |
Glib::ustring | get_password () const |
Gets a password from the mount operation. | |
void | set_password (const Glib::ustring& password) |
Sets the mount operation's password to password. | |
bool | get_anonymous () const |
Check to see whether the mount operation is being used for an anonymous user. | |
void | set_anonymous (bool anonymous=true) |
Sets the mount operation to use an anonymous user if anonymous is true . | |
Glib::ustring | get_domain () const |
Gets the domain of the mount operation. | |
void | set_domain (const Glib::ustring& domain) |
Sets the mount operation's domain. | |
PasswordSave | get_password_save () const |
Gets the state of saving passwords for the mount operation. | |
void | set_password_save (PasswordSave password_save) |
Sets the state of saving passwords for the mount operation. | |
int | get_choice () const |
Gets a choice from the mount operation. | |
void | set_choice (int choice) |
Sets a default choice for the mount operation. | |
void | reply (MountOperationResult result) |
Emits the MountOperation::reply signal. | |
Glib::SignalProxy4< void, const Glib::ustring&, const Glib::ustring&, const Glib::ustring &, AskPasswordFlags > | signal_ask_password () |
Glib::SignalProxy2< void, const Glib::ustring&, const Glib::StringArrayHandle& > | signal_ask_question () |
Glib::SignalProxy1< void, MountOperationResult > | signal_reply () |
Glib::SignalProxy0< void > | signal_aborted () |
Glib::PropertyProxy < Glib::ustring > | property_username () |
The user name. | |
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_username () const |
The user name. | |
Glib::PropertyProxy < Glib::ustring > | property_password () |
The password. | |
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_password () const |
The password. | |
Glib::PropertyProxy< bool > | property_anonymous () |
Whether to use an anonymous user. | |
Glib::PropertyProxy_ReadOnly < bool > | property_anonymous () const |
Whether to use an anonymous user. | |
Glib::PropertyProxy < Glib::ustring > | property_domain () |
The domain of the mount operation. | |
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_domain () const |
The domain of the mount operation. | |
Glib::PropertyProxy< PasswordSave > | property_password_save () |
How passwords should be saved. | |
Glib::PropertyProxy_ReadOnly < PasswordSave > | property_password_save () const |
How passwords should be saved. | |
Glib::PropertyProxy< int > | property_choice () |
The users choice. | |
Glib::PropertyProxy_ReadOnly< int > | property_choice () const |
The users choice. | |
Static Public Member Functions | |
static Glib::RefPtr < MountOperation > | create () |
Protected Member Functions | |
MountOperation () | |
virtual void | on_ask_password (const Glib::ustring& message, const Glib::ustring& default_user, const Glib::ustring& default_domain, AskPasswordFlags flags) |
virtual void | on_ask_question (const Glib::ustring& message, const Glib::StringArrayHandle& choices) |
virtual void | on_reply (MountOperationResult result) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gio::MountOperation > | wrap (GMountOperation* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
Authentication methods for mountable locations.
MountOperation provides a mechanism for authenticating mountable operations, such as loop mounting files, hard drive partitions or server locations.
Mounting operations are handed a MountOperation that they can use if they require any privileges or authentication for their volumes to be mounted (e.g. a hard disk partition or an encrypted filesystem), or if they are implementing a remote server protocol which requires user credentials such as FTP or WebDAV.
Developers should instantiate a subclass of this that implements all the various callbacks to show the required dialogs.
virtual Gio::MountOperation::~MountOperation | ( | ) | [virtual] |
Gio::MountOperation::MountOperation | ( | ) | [protected] |
static Glib::RefPtr<MountOperation> Gio::MountOperation::create | ( | ) | [static] |
bool Gio::MountOperation::get_anonymous | ( | ) | const |
Check to see whether the mount operation is being used for an anonymous user.
true
if mount operation is anonymous. int Gio::MountOperation::get_choice | ( | ) | const |
Gets a choice from the mount operation.
Glib::ustring Gio::MountOperation::get_domain | ( | ) | const |
Gets the domain of the mount operation.
Glib::ustring Gio::MountOperation::get_password | ( | ) | const |
Gets a password from the mount operation.
PasswordSave Gio::MountOperation::get_password_save | ( | ) | const |
Gets the state of saving passwords for the mount operation.
Glib::ustring Gio::MountOperation::get_username | ( | ) | const |
Get the user name from the mount operation.
const GMountOperation* Gio::MountOperation::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase.
GMountOperation* Gio::MountOperation::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase.
GMountOperation* Gio::MountOperation::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
virtual void Gio::MountOperation::on_ask_password | ( | const Glib::ustring& | message, | |
const Glib::ustring& | default_user, | |||
const Glib::ustring& | default_domain, | |||
AskPasswordFlags | flags | |||
) | [protected, virtual] |
virtual void Gio::MountOperation::on_ask_question | ( | const Glib::ustring& | message, | |
const Glib::StringArrayHandle& | choices | |||
) | [protected, virtual] |
virtual void Gio::MountOperation::on_reply | ( | MountOperationResult | result | ) | [protected, virtual] |
Glib::PropertyProxy_ReadOnly<bool> Gio::MountOperation::property_anonymous | ( | ) | const |
Whether to use an anonymous user.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> Gio::MountOperation::property_anonymous | ( | ) |
Whether to use an anonymous user.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<int> Gio::MountOperation::property_choice | ( | ) | const |
The users choice.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<int> Gio::MountOperation::property_choice | ( | ) |
The users choice.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Glib::ustring> Gio::MountOperation::property_domain | ( | ) | const |
The domain of the mount operation.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> Gio::MountOperation::property_domain | ( | ) |
The domain of the mount operation.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Glib::ustring> Gio::MountOperation::property_password | ( | ) | const |
The password.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> Gio::MountOperation::property_password | ( | ) |
The password.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<PasswordSave> Gio::MountOperation::property_password_save | ( | ) | const |
How passwords should be saved.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<PasswordSave> Gio::MountOperation::property_password_save | ( | ) |
How passwords should be saved.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Glib::ustring> Gio::MountOperation::property_username | ( | ) | const |
The user name.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> Gio::MountOperation::property_username | ( | ) |
The user name.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void Gio::MountOperation::reply | ( | MountOperationResult | result | ) |
Emits the MountOperation::reply signal.
result | A MountOperationResult. |
void Gio::MountOperation::set_anonymous | ( | bool | anonymous = true |
) |
Sets the mount operation to use an anonymous user if anonymous is true
.
anonymous | Boolean value. |
void Gio::MountOperation::set_choice | ( | int | choice | ) |
Sets a default choice for the mount operation.
choice | An integer. |
void Gio::MountOperation::set_domain | ( | const Glib::ustring& | domain | ) |
Sets the mount operation's domain.
domain | The domain to set. |
void Gio::MountOperation::set_password | ( | const Glib::ustring& | password | ) |
Sets the mount operation's password to password.
password | Password to set. |
void Gio::MountOperation::set_password_save | ( | PasswordSave | password_save | ) |
Sets the state of saving passwords for the mount operation.
save | A set of PasswordSave flags. |
void Gio::MountOperation::set_username | ( | const Glib::ustring& | username | ) |
Sets the user name within op to username.
username | Input username. |
Glib::SignalProxy0< void > Gio::MountOperation::signal_aborted | ( | ) |
void on_my_aborted()
Glib::SignalProxy4< void,const Glib::ustring&,const Glib::ustring&,const Glib::ustring&,AskPasswordFlags > Gio::MountOperation::signal_ask_password | ( | ) |
void on_my_ask_password(const Glib::ustring& message, const Glib::ustring& default_user, const Glib::ustring& default_domain, AskPasswordFlags flags)
Glib::SignalProxy2< void,const Glib::ustring&,const Glib::StringArrayHandle& > Gio::MountOperation::signal_ask_question | ( | ) |
void on_my_ask_question(const Glib::ustring& message, const Glib::StringArrayHandle& choices)
Glib::SignalProxy1< void,MountOperationResult > Gio::MountOperation::signal_reply | ( | ) |
void on_my_reply(MountOperationResult result)
Glib::RefPtr< Gio::MountOperation > wrap | ( | GMountOperation * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |