From d281970510d8cd729add6b40d329b745dc0a0783 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Sat, 28 Mar 2009 22:54:36 +0000 Subject: Add gio.Drive in docs. 2009-03-28 Gian Mario Tagliaretti * docs/Makefile.am: * docs/reference/pygio-classes.xml: * docs/reference/pygio-drive.xml: Add gio.Drive in docs. svn path=/trunk/; revision=1036 --- docs/reference/ChangeLog | 7 + docs/reference/pygio-classes.xml | 1 + docs/reference/pygio-drive.xml | 546 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 554 insertions(+) create mode 100644 docs/reference/pygio-drive.xml (limited to 'docs/reference') diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 7ad8485..46be0e7 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,10 @@ +2009-03-28 Gian Mario Tagliaretti + + * docs/Makefile.am: + * docs/reference/pygio-classes.xml: + * docs/reference/pygio-drive.xml: + Add gio.Drive in docs. + 2009-03-25 Gian Mario Tagliaretti * docs/Makefile.am: diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml index e49d65f..90dc71b 100644 --- a/docs/reference/pygio-classes.xml +++ b/docs/reference/pygio-classes.xml @@ -11,6 +11,7 @@ + diff --git a/docs/reference/pygio-drive.xml b/docs/reference/pygio-drive.xml new file mode 100644 index 0000000..73766cd --- /dev/null +++ b/docs/reference/pygio-drive.xml @@ -0,0 +1,546 @@ + + + + + + gio.Drive + Virtual File System drive management. + + + + Synopsis + + + gio.Drive + gobject.GInterface + + + can_eject + + + + can_poll_for_media + + + + eject + callback + flagsgio.MOUNT_UNMOUNT_NONE + cancellableNone + user_dataNone + + + eject_finish + result + + + enumerate_identifiers + + + + get_icon + + + + get_identifier + + + + get_name + + + + get_volumes + + + + has_media + + + + has_volumes + + + + is_media_check_automatic + + + + is_media_removable + + + + poll_for_media + callback + cancellableNone + user_dataNone + + + poll_for_media_finish + result + + + + + + + + Ancestry + ++-- gobject.GInterface + +-- gio.Drive + + + + + + Prerequisites + + gio.Drive requires + gobject.GObject + + + + + Description + + + gio.Drive + - this represent a piece of hardware connected to the machine. Its generally + only created for removable hardware or hardware with removable media. + + + gio.Drive + is a container class for GVolume objects that stem from the same piece of media. + As such, gio.Drive + abstracts a drive with (or without) removable media and provides operations for + querying whether media is available, determing whether media change is automatically + detected and ejecting the media. + + + If the gio.Drive + reports that media isn't automatically detected, one can poll for media; typically + one should not do this periodically as a poll for media operation is potententially + expensive and may spin up the drive creating noise. + + + For porting from GnomeVFS note that there is no equivalent of + gio.Drive + in that API. + + + + + Methods + + + gio.Drive.can_eject + + + can_eject + + + + + + Returns : + True if the drive can be ejected, + False otherwise. + + + + + + The can_eject() method checks if a drive can be ejected. + + + + + gio.Drive.can_poll_for_media + + + can_poll_for_media + + + + + + Returns : + True if the drive can be polled + for media changes, False otherwise. + + + + + + The can_poll_for_media() method checks if a drive + can be polled for media changes. + + + + + gio.Drive.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 drive. + + + When the operation is finished, callback will be called. You can then call + gio.Drive.eject_finish() + to obtain the result of the operation. + + + + + gio.Drive.eject_finish + + + eject_finish + result + + + + + result : + a gio.AsyncResult. + + + + Returns : + True if the drive has been ejected + successfully, False otherwise. + + + + + + The eject_finish() method finishes ejecting a drive. + + + + + gio.Drive.enumerate_identifiers + + + enumerate_identifiers + + + + + + Returns : + a list of strings containing kinds of identifiers. + + + + + + The enumerate_identifiers() method gets the kinds + of identifiers that drive has. Use + gio.Drive.get_identifier() + to obtain the identifiers themselves. + + + + + gio.Drive.get_icon + + + get_icon + + + + + + Returns : + gio.Icon + for the drive. + + + + + + The get_icon() method gets the icon for drive. + + + + + gio.Drive.get_identifier + + + get_identifier + + + + + + Returns : + A string containing the requested identfier, or + None if the + gio.Drive + doesn't have this kind of identifier. + + + + + + The get_identifier() method gets the identifier of + the given kind for drive. + + + + + gio.Drive.get_name + + + get_name + + + + + + Returns : + A string containing drive's name. + + + + + + The get_name() method gets the name of drive. + + + + + gio.Drive.get_volumes + + + get_volumes + + + + + + Returns : + A list containing any + gio.Volume + objects on the given drive. + + + + + + The get_volumes() method get a list of mountable + volumes for drive. + + + + + gio.Drive.has_media + + + has_media + + + + + + Returns : + True if drive has media, + False otherwise. + + + + + The has_media() method checks if the drive + has media. Note that the OS may not be polling the drive for media changes; see + gio.Drive.is_media_check_automatic() + for more details. + + + + + gio.Drive.has_volumes + + + has_volumes + + + + + + Returns : + True if drive contains volumes, + False otherwise. + + + + + The has_volumes() method check if drive has any mountable volumes. + + + + + gio.Drive.is_media_check_automatic + + + is_media_check_automatic + + + + + + Returns : + True if drive is capabable + of automatically detecting media changes, + False otherwise. + + + + + The is_media_check_automatic() method checks if + drive is capabable of automatically detecting media changes. + + + + + gio.Drive.is_media_removable + + + is_media_removable + + + + + + Returns : + True if drive supports removable media, + False otherwise. + + + + + The is_media_removable() method checks if the + drive supports removable media. + + + + + gio.Drive.poll_for_media + + + poll_for_media + + callback + + + cancellableNone + + + user_dataNone + + + + + + callback : + A GAsyncReadyCallback to call when the request is satisfied. + + + + cancellable : + Optional + gio.Cancellable + object, None to ignore. + + + + user_data : + The data to pass to callback function. + + + + + + The poll_for_media() method asynchronously polls + drive to see if media has been inserted or removed. + + + When the operation is finished, callback will be called. You can then call + gio.Drive.poll_for_media_finish() + to obtain the result of the operation. + + + + + gio.Drive.poll_for_media_finish + + + poll_for_media_finish + result + + + + + result : + a gio.AsyncResult. + + + + Returns : + True if the drive has been poll_for_mediaed + successfully, False otherwise. + + + + + + The poll_for_media_finish() method finishes + an operation started with + gio.Drive.poll_for_media() + on a drive. + + + + -- cgit