GMountOperation
Object used for authentication and user interaction
gMountOperationNew()gMountOperationGetUsername(object)gMountOperationSetUsername(object, username)gMountOperationGetPassword(object)gMountOperationSetPassword(object, password)gMountOperationGetAnonymous(object)gMountOperationSetAnonymous(object, anonymous)gMountOperationGetDomain(object)gMountOperationSetDomain(object, domain)gMountOperationGetPasswordSave(object)gMountOperationSetPasswordSave(object, save)gMountOperationGetChoice(object)gMountOperationSetChoice(object, choice)gMountOperationReply(object, result)gMountOperation()
GFlags +----GAskPasswordFlags GEnum +----GPasswordSave GObject +----GMountOperation GEnum +----GMountOperationResult
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 gDriveStart and
gDriveStop.
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 GMountOperation for details.
GMountOperationClass for providing authentication methods for mounting operations, such as mounting a file locally, or authenticating with a server.
gMountOperation is the equivalent of gMountOperationNew.
GAskPasswordFlagsGAskPasswordFlags are used to request specific information from the
user, or to notify the user of their choices in an authentication
situation.
need-passwordoperation requires a password.
need-usernameoperation requires a username.
need-domainoperation requires a domain.
saving-supportedoperation supports saving settings.
anonymous-supportedoperation supports anonymous users.
GPasswordSaveGPasswordSave is used to indicate the lifespan of a saved password.
Gvfs stores passwords in the Gnome keyring when this flag allows it
to, and later retrieves it again from there.
nevernever save a password.
for-sessionsave a password for the session.
permanentlysave a password permanently.
GMountOperationResultGMountOperationResult is returned as a result when a request for
information is send by the mounting operation.
handledThe request was fulfilled and the user specified data is now available
abortedThe user requested the mount operation to be aborted
unhandledThe request was unhandled (i.e. not implemented)
aborted(user.data)Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.
Implementations of GMountOperation should handle this signal by dismissing open password dialogs. Since 2.20
user.datauser data set when the signal handler was connected.
ask-password(op, message, default.user, default.domain, flags, user.data)Emitted when a mount operation asks the user for a password.
If the message contains a line break, the first line should be
presented as a heading. For example, it may be used as the
primary text in a GtkMessageDialog.
opa GMountOperation requesting a password.
messagestring containing a message to display to the user.
default.userstring containing the default user name.
default.domainstring containing the default domain.
flagsa set of GAskPasswordFlags.
user.datauser data set when the signal handler was connected.
ask-question(op, message, choices, user.data)Emitted when asking the user a question and gives a list of choices for the user to choose from.
If the message contains a line break, the first line should be
presented as a heading. For example, it may be used as the
primary text in a GtkMessageDialog.
opa GMountOperation asking a question.
messagestring containing a message to display to the user.
choicesa list of strings for each possible choice.
user.datauser data set when the signal handler was connected.
reply(op, result, user.data)Emitted when the user has replied to the mount operation.
opresulta GMountOperationResult indicating how the request was handled
user.datauser data set when the signal handler was connected.
show-processes(op, message, processes, choices, user.data)Emitted when one or more processes are blocking an operation
e.g. unmounting/ejecting a GMount or stopping a GDrive.
Note that this signal may be emitted several times to update the
list of blocking processes as processes close files. The
application should only respond with gMountOperationReply to
the latest signal (setting "choice" to the choice
the user made).
If the message contains a line break, the first line should be
presented as a heading. For example, it may be used as the
primary text in a GtkMessageDialog.
Since 2.22
opmessagestring containing a message to display to the user.
processesa list of GPid for processes blocking the operation.
choicesa list of strings for each possible choice.
user.datauser data set when the signal handler was connected.
anonymous [logical : Read / Write]Whether to use an anonymous user when authenticating. Default value: FALSE
choice [integer : Read / Write]The index of the user's choice when a question is asked during the
mount operation. See the "ask-question" signal.
Allowed values: >= 0 Default value: 0
domain [character : * : Read / Write]The domain to use for the mount operation. Default value: NULL
password [character : * : Read / Write]The password that is used for authentication when carrying out the mount operation. Default value: NULL
password-save [GPasswordSave : Read / Write]Determines if and how the password information should be saved. Default value: G_PASSWORD_SAVE_NEVER
username [character : * : Read / Write]The user name that is used for authentication when carrying out the mount operation. Default value: NULL
Derived by RGtkGen from GTK+ documentation
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.