From cf1ec9b5a97b8814022327f39506dac94385e2f5 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Tue, 28 Apr 2009 00:03:04 +0200 Subject: Add docs for the gio.Mount class --- docs/Makefile.am | 6 +- docs/reference/pygio-classes.xml | 1 + docs/reference/pygio-mount.xml | 653 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 658 insertions(+), 2 deletions(-) create mode 100644 docs/reference/pygio-mount.xml diff --git a/docs/Makefile.am b/docs/Makefile.am index d7b6bcf..b25fedc 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -28,6 +28,7 @@ HTML_FILES = \ html/class-giofileenumerator.html \ html/class-giofileicon.html \ html/class-gioicon.html \ + html/class-giomount.html \ html/class-gioseekable.html \ html/class-giosimpleasyncresult.html \ html/class-giovolume.html \ @@ -66,13 +67,14 @@ XML_FILES = \ reference/pygio-drive.xml \ reference/pygio-emblem.xml \ reference/pygio-emblemedicon.xml \ - reference/pygio-icon.xml \ reference/pygio-file.xml \ reference/pygio-fileattributeinfo.xml \ reference/pygio-fileenumerator.xml \ reference/pygio-fileicon.xml \ - reference/pygio-simpleasyncresult.xml \ + reference/pygio-icon.xml \ + reference/pygio-mount.xml \ reference/pygio-seekable.xml \ + reference/pygio-simpleasyncresult.xml \ reference/pygio-volume.xml \ reference/pygio-volumemonitor.xml diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml index 209d4b0..78643eb 100644 --- a/docs/reference/pygio-classes.xml +++ b/docs/reference/pygio-classes.xml @@ -19,6 +19,7 @@ + diff --git a/docs/reference/pygio-mount.xml b/docs/reference/pygio-mount.xml new file mode 100644 index 0000000..0ea320d --- /dev/null +++ b/docs/reference/pygio-mount.xml @@ -0,0 +1,653 @@ + + + + + + gio.Mount + Mount management + + + + Synopsis + + + gio.Mount + gobject.GInterface + + + can_eject + + + can_unmount + + + + eject + callback + flagsgio.MOUNT_UNMOUNT_NONE + cancellableNone + user_dataNone + + + eject_finish + result + + + get_drive + + + + get_icon + + + + get_name + + + + get_root + + + + get_uuid + + + + get_volume + + + + remount + callback + flagsgio.MOUNT_UNMOUNT_NONE + mount_operationNone + cancellableNone + user_dataNone + + + remount_finish + result + + + unmount + callback + flagsgio.MOUNT_UNMOUNT_NONE + cancellableNone + user_dataNone + + + unmount_finish + result + + + + + + + + Ancestry + ++-- gobject.GInterface + +-- gio.Mount + + + + + + Prerequisites + + gio.Mount requires + gobject.GObject + + + + + gio.Mount Signal Prototypes + + gobject.GObject Signal Prototypes + + + + "changed" + + callback + mount + user_param1 + ... + + + + + "unmounted" + + callback + mount + user_param1 + ... + + + + + + + + + Description + + + The gio.Mount + interface represents user-visible mounts. Note, when porting from GnomeVFS, + gio.Mount + is the moral equivalent of GnomeVFSVolume. + + + + gio.Mount + is a "mounted" filesystem that you can access. Mounted is in quotes because + it's not the same as a unix mount, it might be a gvfs mount, but you can still + access the files on it if you use GIO. Might or might not be related to a volume object. + + + Unmounting a GMount instance is an asynchronous operation. For more information + about asynchronous operations, see GAsyncReady and GSimpleAsyncReady. To unmount + a gio.Mount instance, + first call + g_mount_unmount() + with (at least) the GMount instance and a GAsyncReadyCallback. The callback will + be fired when the operation has resolved (either with success or failure), and a + GAsyncReady structure will be passed to the callback. That callback should then call + g_mount_unmount_finish() + with the GMount and the GAsyncReady data to see if the operation was completed successfully. + If an error is present when g_mount_unmount_finish() is called, then it will be filled + with any error information. + + + + + Methods + + + gio.Mount.can_eject + + + can_eject + + + + + + Returns : + True if the mount can be ejected, + False otherwise. + + + + + + The can_eject() method checks if a mount can be ejected. + + + + + gio.Mount.can_unmount + + + can_unmount + + + + + + Returns : + True if the mount can be unmounted, + False otherwise. + + + + + + The can_eject() method checks if a mount can be unmounted. + + + + + gio.Mount.eject + + + eject + callback + flagsgio.MOUNT_UNMOUNT_NONE + cancellableNone + user_dataNone + + + + + callback : + A GAsyncReadyCallback to call when the request is satisfied. + + + + flags : + flags affecting the unmount if required for eject + . + + + + cancellable : + Optional + gio.Cancellable + object, None to ignore. + + + + user_data : + The data to pass to callback function. + + + + + + The eject() method asynchronously ejects a mount. + + + When the operation is finished, callback will be called. You can then call + gio.Mount.eject_finish() + to obtain the result of the operation. + + + + + gio.Mount.eject_finish + + + eject_finish + result + + + + + result : + a gio.AsyncResult. + + + + Returns : + True if the mount has been ejected + successfully, False otherwise. + + + + + + The eject_finish() method finishes ejecting a mount. + + + + + gio.Mount.get_drive + + + get_drive + + + + + + Returns : + gio.Drive + or None if mount is not associated with a volume or a drive. + + + + + + The get_drive() method gets the drive for the mount. + + + This is a convenience method for getting the + gio.Volume + and then using that object to get the + gio.Drive. + + + + + gio.Mount.get_icon + + + get_icon + + + + + + Returns : + gio.Icon + for the mount. + + + + + + The get_icon() method gets the icon for mount. + + + + + gio.Mount.get_name + + + get_name + + + + + + Returns : + the name for the given mount. + + + + + + The get_name() method gets the name of mount. + + + + + gio.Mount.get_root + + + get_root + + + + + + Returns : + a gio.File. + + + + + + The get_root() method gets the root directory on mount. + + + + + gio.Mount.get_uuid + + + get_uuid + + + + + + Returns : + the UUID for mount or None + if no UUID can be computed. + + + + + + The get_uuid() method gets the UUID for the mount. + The reference is typically based on the file system UUID for the mount in + question and should be considered an opaque string. Returns None + if there is no UUID available + + + + + gio.Mount.get_volume + + + get_volume + + + + + + Returns : + a gio.Volume + or None if mount is not associated with a volume. + + + + + + The get_volume() method gets the volume for the mount. + + + + + gio.Mount.remount + + + remount + callback + flagsgio.MOUNT_UNMOUNT_NONE + mount_operationNone + cancellableNone + user_dataNone + + + + + callback : + A GAsyncReadyCallback to call when the request is satisfied. + + + + flags : + flags affecting the unmount if required for eject + . + + + + mount_operation : + a gio.MountOperation + or None to avoid user interaction. + + + + cancellable : + Optional + gio.Cancellable + object, None to ignore. + + + + user_data : + The data to pass to callback function. + + + + + + The remount() method asynchronously remounts a mount. + + + When the operation is finished, callback will be called. You can then call + gio.Mount.remount_finish() + to obtain the result of the operation. + + + + + gio.Mount.remount_finish + + + remount_finish + result + + + + + result : + a gio.AsyncResult. + + + + Returns : + True if the mount has been remounted + successfully, False otherwise. + + + + + + The remount_finish() method finishes remounting a mount. + + + + + gio.Mount.unmount + + + unmount + callback + flagsgio.MOUNT_UNMOUNT_NONE + cancellableNone + user_dataNone + + + + + callback : + A GAsyncReadyCallback to call when the request is satisfied. + + + + flags : + flags affecting the unmount if required for eject + . + + + + cancellable : + Optional + gio.Cancellable + object, None to ignore. + + + + user_data : + The data to pass to callback function. + + + + + + The unmount() method asynchronously unmounts a mount. + + + When the operation is finished, callback will be called. You can then call + gio.Mount.unmount_finish() + to obtain the result of the operation. + + + + + gio.Mount.unmount_finish + + + unmount_finish + result + + + + + result : + a gio.AsyncResult. + + + + Returns : + True if the mount has been unmounted + successfully, False otherwise. + + + + + + The unmount_finish() method finishes unmounting a mount. + + + + + + Signals + + + The "changed" gio.Mount Signal + + callback + mount + user_param1 + ... + + + + + mount : + the mount + + + user_param1 : + the first user parameter (if any) specified + with the connect() + method + + + ... : + additional user parameters (if any) + + + + + Emitted when the mount has been changed. + + + + + The "unmounted" gio.Mount Signal + + callback + mount + user_param1 + ... + + + + + mount : + the mount + + + user_param1 : + the first user parameter (if any) specified + with the connect() + method + + + ... : + additional user parameters (if any) + + + + + This signal is emitted when the + gio.Mount + have been unmounted. + + + + + -- cgit