From d8b70dec1e5c09b73ae277f4f5b246315841fb8e Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Fri, 1 May 2009 22:24:33 +0200 Subject: Add docs for the gio.MountOperation class --- docs/Makefile.am | 2 + docs/reference/pygio-classes.xml | 1 + docs/reference/pygio-constants.xml | 107 +++++ docs/reference/pygio-mountoperation.xml | 726 ++++++++++++++++++++++++++++++++ 4 files changed, 836 insertions(+) create mode 100644 docs/reference/pygio-mountoperation.xml diff --git a/docs/Makefile.am b/docs/Makefile.am index b25fedc..eafeb7d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -29,6 +29,7 @@ HTML_FILES = \ html/class-giofileicon.html \ html/class-gioicon.html \ html/class-giomount.html \ + html/class-giomountoperation.html \ html/class-gioseekable.html \ html/class-giosimpleasyncresult.html \ html/class-giovolume.html \ @@ -73,6 +74,7 @@ XML_FILES = \ reference/pygio-fileicon.xml \ reference/pygio-icon.xml \ reference/pygio-mount.xml \ + reference/pygio-mountoperation.xml \ reference/pygio-seekable.xml \ reference/pygio-simpleasyncresult.xml \ reference/pygio-volume.xml \ diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml index 78643eb..fa0823a 100644 --- a/docs/reference/pygio-classes.xml +++ b/docs/reference/pygio-classes.xml @@ -20,6 +20,7 @@ + diff --git a/docs/reference/pygio-constants.xml b/docs/reference/pygio-constants.xml index 7bb0f92..f716e25 100644 --- a/docs/reference/pygio-constants.xml +++ b/docs/reference/pygio-constants.xml @@ -13,6 +13,7 @@ + @@ -24,7 +25,9 @@ + + @@ -32,6 +35,48 @@ Description + + Gio Ask Password Flags Constants + + + Flags that are used to request specific information from the user, or to + notify the user of their choices in an authentication situation. + + + + + gio.ASK_PASSWORD_ANONYMOUS_SUPPORTED + + operation supports anonymous users. + + + + gio.ASK_PASSWORD_NEED_DOMAIN + + operation requires a domain. + + + + gio.ASK_PASSWORD_NEED_PASSWORD + + operation requires a password. + + + + gio.ASK_PASSWORD_NEED_USERNAME + + operation requires a username. + + + + gio.ASK_PASSWORD_SAVING_SUPPORTED + + operation supports saving settings. + + + + + Gio AppInfo Create Flags Constants @@ -1362,6 +1407,68 @@ + + + Gio Mount Operation Result Constants + + + returned as a result when a request for information is send by the mounting operation. + + + + + gio.MOUNT_OPERATION_HANDLED + + The request was fulfilled and the user specified data is now available. + + + + gio.MOUNT_OPERATION_ABORTED + + The user requested the mount operation to be aborted. + + + + gio.MOUNT_OPERATION_UNHANDLED + + The request was unhandled (i.e. not implemented). + + + + + + + Gio Password Save Constants + + + 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. + + + + + gio.PASSWORD_SAVE_FOR_SESSION + + save a password for the session. + + + + gio.PASSWORD_SAVE_NEVER + + never save a password. + + + + gio.PASSWORD_SAVE_PERMANENTLY + + save a password permanently. + + + + diff --git a/docs/reference/pygio-mountoperation.xml b/docs/reference/pygio-mountoperation.xml new file mode 100644 index 0000000..9648097 --- /dev/null +++ b/docs/reference/pygio-mountoperation.xml @@ -0,0 +1,726 @@ + + + + + + gio.MountOperation + Application launch context. + + + + Synopsis + + + gio.MountOperation + gobject.GObject + + + gio.MountOperation + + + + + get_anonymous + + + + get_choice + + + + get_domain + + + + get_password + + + + get_password_save + + + + get_username + + + + replay + result + + + set_anonymous + anonymous + + + set_choice + choice + + + set_domain + domain + + + set_password + password + + + set_password_save + save + + + set_username + username + + + + + + + Ancestry + ++-- gobject.GObject + +-- gio.MountOperation + + + + + + gio.MountOperation Properties + +
+ + + + + + + + "anonymous" + Read/Write + + Whether to use an anonymous user when authenticating. + Default value: False + + + + "choice" + 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" + Read/Write + + The domain to use for the mount operation. Default value: None + + + + "password" + Read/Write + + The password that is used for authentication when carrying out the + mount operation. Default value: None + + + + "password-save" + Read/Write + + Determines if and how the password information should be saved. + Default value: gio.PASSWORD_SAVE_NEVER + + + + "username" + Read/Write + + The user name that is used for authentication when carrying out the + mount operation. Default value: None + + + + + +
+ +
+ + + gio.MountOperation Signal Prototypes + + gobject.GObject Signal Prototypes + + + + "aborted" + + callback + mountoperation + user_param1 + ... + + + + + "ask-password" + + callback + mountoperation + message + default_user + default_domain + flags + user_param1 + ... + + + + + "ask-question" + + callback + mountoperation + message + choices + user_param1 + ... + + + + + "reply" + + callback + mountoperation + result + user_param1 + ... + + + + + + + + + Description + + + The gio.MountOperation + provides a mechanism for authenticating mountable operations, such as loop mounting files, + hard drive partitions or server locations. + + + Mounting operations are handed a + gio.MountOperation + that then 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. + + + Users should instantiate a subclass of this that implements all the various callbacks + to show the required dialogs, such as + gtk.MountOperation. + + + + + Constructor + + + gio.MountOperation + + + + + Returns : + a new + gio.MountOperation. + + + + + + Creates a new mount operation. + + + + + + Methods + + + gio.MountOperation.get_anonymous + + + get_anonymous + + + + + + Returns : + True if mount operation is anonymous. + + + + + + The get_anonymous() method check to see whether + the mount operation is being used for an anonymous user + + + + + gio.MountOperation.get_choice + + + get_choice + + + + + + Returns : + an integer containing an index of the user's + choice from the choice's list, or 0. + + + + + + The get_anonymous() method gets a choice + from the mount operation. + + + + + gio.MountOperation.get_domain + + + get_domain + + + + + + Returns : + a string set to the domain. + + + + + + The get_domain() method gets the domain + of the mount operation. + + + + + gio.MountOperation.get_password + + + get_password + + + + + + Returns : + a string containing the password within + the mountoperation. + + + + + + The get_password() method gets a password + from the mount operation. + + + + + gio.MountOperation.get_password_save + + + get_password_save + + + + + + Returns : + a + + flag. + + + + + + The get_password_save() method gets the state + of saving passwords for the mount operation. + + + + + gio.MountOperation.get_username + + + get_username + + + + + + Returns : + a string containing the user name. + + + + + + The get_username() method get the user + name from the mount operation. + + + + + gio.MountOperation.reply + + + reply + result + + + + + result : + a + + + + + + + The reply() method emits the "reply" signal. + + + + + gio.MountOperation.set_anonymous + + + set_anonymous + anonymous + + + + + anonymous : + boolean value. + + + + + + The set_anonymous() method sets the mount operation + to use an anonymous user if anonymous is True. + + + + + gio.MountOperation.set_choice + + + set_choice + choice + + + + + choice : + an integer. + + + + + + The set_choice() method sets a default choice for the mount operation. + + + + + gio.MountOperation.set_domain + + + set_domain + domain + + + + + domain : + the domain to set. + + + + + + The set_domain() method sets the mount operation's domain. + + + + + gio.MountOperation.set_password + + + set_password + password + + + + + password : + password to set. + + + + + + The set_password() method sets the mount + operation's password to password. + + + + + gio.MountOperation.set_password_save + + + set_password_save + save + + + + + save : + a set of + + + + + + + The set_password_save() method sets the state + of saving passwords for the mount operation. + + + + + gio.MountOperation.set_username + + + set_username + username + + + + + username : + input username. + + + + + + The set_anonymous() method sets the user + name within op to username. + + + + + + Signals + + + The "aborted" gio.MountOperation Signal + + callback + mountoperation + user_param1 + ... + + + + + mountoperation : + the mountoperation + + + user_param1 : + the first user parameter (if any) specified + with the connect() + method + + + ... : + additional user parameters (if any) + + + + + Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress. + Implementations of gio.MountOperation + should handle this signal by dismissing open password dialogs. + + + + + The "ask-password" gio.MountOperation Signal + + callback + mountoperation + message + default_user + default_domain + flags + user_param1 + ... + + + + + mountoperation : + the mountoperation + + + message : + string containing a message to display to the user. + + + default_user : + string containing the default user name. + + + default_domain : + string containing the default domain. + + + flags : + a set of + + + + + user_param1 : + the first user parameter (if any) specified + with the connect() + method + + + ... : + additional user parameters (if any) + + + + + This signal is 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 + gtk.MessageDialog. + + + + + The "ask-question" gio.MountOperation Signal + + callback + mountoperation + message + choices + user_param1 + ... + + + + + mountoperation : + the mountoperation + + + message : + string containing a message to display to the user. + + + choices : + a list of strings for each possible choice. + + + user_param1 : + the first user parameter (if any) specified + with the connect() + method + + + ... : + additional user parameters (if any) + + + + + This signal is 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 + gtk.MessageDialog. + + + + + The "reply" gio.MountOperation Signal + + callback + mountoperation + result + user_param1 + ... + + + + + mountoperation : + the mountoperation + + + result : + a + + indicating how the request was handled + + + user_param1 : + the first user parameter (if any) specified + with the connect() + method + + + ... : + additional user parameters (if any) + + + + + This signal is emitted when the user has replied to the mount operation. + + + + +
-- cgit