|
System.Gnome.VFS.Drive | Maintainer | gtk2hs-devel@lists.sourceforge.net
Stability : alpha
Portability : portable (depends on GHC) |
|
|
|
|
|
Description |
|
|
Synopsis |
|
|
|
|
Types
|
|
A container for Volumes.
|
|
data Drive |
Instances | |
|
|
class GObjectClass o => DriveClass o |
| Instances | |
|
|
type DriveID = CULong |
Identifies a Drive
|
|
data DeviceType |
Identifies the device type of a Volume or Drive.
| Instances | |
|
|
Type Conversion
|
|
castToDrive :: GObjectClass obj => obj -> Drive |
|
Drive Comparison
|
|
driveCompare |
:: DriveClass drive | | => drive | a - the first drive
| -> drive | b - the second drive
| -> IO Ordering | the ordering relationship between the drives
| Compares two DriveClass objects a and b. Two DriveClass
objects referring to different drives are guaranteed to not
return EQ when comparing them. If they refer to the same drive EQ
is returned.
The resulting gint should be used to determine the order in which
a and b are displayed in graphical user interfaces.
The comparison algorithm first of all peeks the device type of
a and b, they will be sorted in the following order:
- Magnetic and opto-magnetic drives (ZIP, floppy)
- Optical drives (CD, DVD)
- External drives (USB sticks, music players)
- Mounted hard disks
- Other drives
Afterwards, the display name of a and b is compared using a
locale-sensitive sorting algorithm.
If two drives have the same display name, their unique ID is
compared which can be queried using driveGetID.
|
|
|
Drive Properties
|
|
driveGetActivationURI |
:: DriveClass drive | | => drive | drive - the drive object to query
| -> IO String | the drive's activation URI
| Returns the activation URI of drive.
The returned URI usually refers to a valid location. You can
check the validity of the location by calling
uriFromString with the URI, and checking
whether the return value is not Nothing.
|
|
|
driveGetDevicePath |
:: DriveClass drive | | => drive | drive - the drive object to query
| -> IO (Maybe String) | the drive's device path
| Returns the device path of a Drive object.
For HAL drives, this returns the value of the drive's
block.device key. For UNIX mounts, it returns the mntent's
mnt_fsname entry.
Otherwise, it returns Nothing.
|
|
|
driveGetDeviceType |
|
|
driveGetDisplayName |
:: DriveClass drive | | => drive | drive - the drive object to query
| -> IO String | the drive's display name
| Returns the display name of a Drive object.
|
|
|
driveGetHalUDI |
:: DriveClass drive | | => drive | drive - the drive object to query
| -> IO (Maybe String) | the drive's HAL UDI
| Returns the HAL UDI of a Drive object.
For HAL drives, this matches the value of the info.udi key,
for other drives it is Nothing.
|
|
|
driveGetIcon |
:: DriveClass drive | | => drive | drive - a drive object
| -> IO FilePath | the icon that should be used for this drive
| Returns the icon filename for a Drive object.
|
|
|
driveGetID |
:: DriveClass drive | | => drive | drive - a drive object
| -> IO DriveID | a unique identifier for the drive
| Returns a unique identifier for a Drive object.
|
|
|
Drive State
|
|
driveIsConnected |
:: DriveClass drive | | => drive | drive - a drive object
| -> IO Bool | True if the drive is connected,
False otherwise
| Returns a Bool for whether a drive is connected.
|
|
|
driveIsMounted |
:: DriveClass drive | | => drive | drive - a drive object
| -> IO Bool | True if the drive is mounted,
False otherwise
| Returns a Bool for whether a drive is mounted.
|
|
|
driveIsUserVisible |
:: DriveClass drive | | => drive | drive - a drive object
| -> IO Bool | True if the drive is
user-visible, False otherwise
| Returns a Bool for whether a drive is user-visible. This should
be used by applications to determine whether the drive should be
listed in user interfaces listing available drives.
|
|
|
driveGetMountedVolumes |
:: DriveClass drive | | => drive | drive - a drive object
| -> IO [Volume] | the Volumes currently
mounted on the drive
| Returns a list of mounted volumes for a Drive object.
|
|
|
Drive Operations
|
|
driveEject |
:: DriveClass drive | | => drive | drive - the drive to be ejected
| -> VolumeOpSuccessCallback | successCallback - the
action to be performed on
successful ejection
| -> VolumeOpFailureCallback | failureCallback - the
action to be performed on
failure
| -> IO () | | If drive has associated Volume objects, all of them will be
unmounted by calling volumeUnmount for
each volume in driveGetMountedVolumes, except for the last one,
for which volumeEject is called to
ensure that the drive's media is ejected.
|
|
|
driveMount |
:: DriveClass drive | | => drive | drive - a drive object
| -> VolumeOpSuccessCallback | successCallback - the
action to be performed on
successful mount
| -> VolumeOpFailureCallback | failureCallback - the
action to be performed on
failure
| -> IO () | | Mounts a Drive object.
|
|
|
Drive Signals
|
|
onDriveVolumeMounted |
:: DriveClass drive | | => drive | drive - the drive to connect the signal handler to
| -> (Volume -> IO ()) | handler - the signal handling function
| -> IO (ConnectId drive) | the identifier for the connection
|
|
|
afterDriveVolumeMounted |
:: DriveClass drive | | => drive | drive - the drive to connect the signal handler to
| -> (Volume -> IO ()) | handler - the signal handling function
| -> IO (ConnectId drive) | the identifier for the connection
|
|
|
onDriveVolumePreUnmount |
:: DriveClass drive | | => drive | drive - the drive to connect the signal handler to
| -> (Volume -> IO ()) | handler - the signal handling function
| -> IO (ConnectId drive) | the identifier for the connection
|
|
|
afterDriveVolumePreUnmount |
:: DriveClass drive | | => drive | drive - the drive to connect the signal handler to
| -> (Volume -> IO ()) | handler - the signal handling function
| -> IO (ConnectId drive) | the identifier for the connection
|
|
|
onDriveVolumeUnmounted |
:: DriveClass drive | | => drive | drive - the drive to connect the signal handler to
| -> (Volume -> IO ()) | handler - the signal handling function
| -> IO (ConnectId drive) | the identifier for the connection
|
|
|
afterDriveVolumeUnmounted |
:: DriveClass drive | | => drive | drive - the drive to connect the signal handler to
| -> (Volume -> IO ()) | handler - the signal handling function
| -> IO (ConnectId drive) | the identifier for the connection
|
|
|
Produced by Haddock version 0.8 |