![]() |
![]() |
![]() |
Thunar-VFS Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#include <thunar-vfs/thunar-vfs.h> enum ThunarVfsVolumeKind; enum ThunarVfsVolumeStatus; ThunarVfsVolume; ThunarVfsVolumeKind thunar_vfs_volume_get_kind (ThunarVfsVolume *volume); const gchar * thunar_vfs_volume_get_name (ThunarVfsVolume *volume); ThunarVfsVolumeStatus thunar_vfs_volume_get_status (ThunarVfsVolume *volume); ThunarVfsPath * thunar_vfs_volume_get_mount_point (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_is_mounted (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_is_present (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_is_ejectable (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_is_removable (ThunarVfsVolume *volume); const gchar * thunar_vfs_volume_lookup_icon_name (ThunarVfsVolume *volume, GtkIconTheme *icon_theme); gboolean thunar_vfs_volume_eject (ThunarVfsVolume *volume, GtkWidget *window, GError **error); gboolean thunar_vfs_volume_mount (ThunarVfsVolume *volume, GtkWidget *window, GError **error); gboolean thunar_vfs_volume_unmount (ThunarVfsVolume *volume, GtkWidget *window, GError **error);
typedef enum { THUNAR_VFS_VOLUME_KIND_UNKNOWN, THUNAR_VFS_VOLUME_KIND_CDROM, THUNAR_VFS_VOLUME_KIND_CDR, THUNAR_VFS_VOLUME_KIND_CDRW, THUNAR_VFS_VOLUME_KIND_DVDROM, THUNAR_VFS_VOLUME_KIND_DVDRAM, THUNAR_VFS_VOLUME_KIND_DVDR, THUNAR_VFS_VOLUME_KIND_DVDRW, THUNAR_VFS_VOLUME_KIND_DVDPLUSR, THUNAR_VFS_VOLUME_KIND_DVDPLUSRW, THUNAR_VFS_VOLUME_KIND_FLOPPY, THUNAR_VFS_VOLUME_KIND_HARDDISK, THUNAR_VFS_VOLUME_KIND_USBSTICK, THUNAR_VFS_VOLUME_KIND_AUDIO_PLAYER, THUNAR_VFS_VOLUME_KIND_AUDIO_CD, THUNAR_VFS_VOLUME_KIND_MEMORY_CARD, THUNAR_VFS_VOLUME_KIND_REMOVABLE_DISK, } ThunarVfsVolumeKind;
Describes the type of a VFS volume.
Unknown volume. | |
CD-ROMs. | |
CD-Rs. | |
CD-RWs. | |
DVD-ROMs. | |
DVD-RAMs. | |
DVD-Rs. | |
DVD-RWs. | |
DVD+Rs. | |
DVD+RWs. | |
Floppy drives. | |
Hard disk drives. | |
USB sticks. | |
Portable audio players (i.e. iPod). | |
Audio CDs. | |
Memory cards. | |
Other removable disks. |
typedef enum /*< flags >*/ { THUNAR_VFS_VOLUME_STATUS_MOUNTED = 1 << 0, THUNAR_VFS_VOLUME_STATUS_PRESENT = 1 << 1, THUNAR_VFS_VOLUME_STATUS_MOUNTABLE = 1 << 2, } ThunarVfsVolumeStatus;
Describes the current status of a VFS volume.
ThunarVfsVolumeKind thunar_vfs_volume_get_kind (ThunarVfsVolume *volume);
Returns the kind of drive/device representd by volume
.
|
a ThunarVfsVolume instance. |
Returns : |
the kind of volume .
|
const gchar * thunar_vfs_volume_get_name (ThunarVfsVolume *volume);
Returns the name of the volume
. This is usually the
name of the device or the label of the medium, if a
medium is present.
|
a ThunarVfsVolume instance. |
Returns : |
the name of volume .
|
ThunarVfsVolumeStatus thunar_vfs_volume_get_status (ThunarVfsVolume *volume);
Determines the current status of the volume
, e.g. whether
or not the volume
is currently mounted, or whether a
medium is present.
|
a ThunarVfsVolume instance. |
Returns : |
the status for volume .
|
ThunarVfsPath * thunar_vfs_volume_get_mount_point (ThunarVfsVolume *volume);
Determines the current mount point for volume
. If volume
is mounted this will be the location at which it is currently
mounted. Else it will be the location where volume
is most
probably being mounted. Note that this location may change
during a call to thunar_vfs_volume_mount()
, so be sure to
check the mount point after the call to thunar_vfs_volume_mount()
.
|
a ThunarVfsVolume instance. |
Returns : |
the path which identifies the path where the volume will be mounted (or is already mounted). |
gboolean thunar_vfs_volume_is_mounted (ThunarVfsVolume *volume);
Determines whether volume
is currently mounted into the
filesystem hierarchy.
|
a ThunarVfsVolume instance. |
Returns : |
TRUE if volume is mounted, else FALSE .
|
gboolean thunar_vfs_volume_is_present (ThunarVfsVolume *volume);
Determines whether a medium is currently inserted for
volume
, e.g. for a CD-ROM drive, this will be TRUE
only if a disc is present in the slot.
|
a ThunarVfsVolume instance. |
Returns : |
TRUE if volume is present, else FALSE .
|
gboolean thunar_vfs_volume_is_ejectable (ThunarVfsVolume *volume);
Determines whether the current user is allowed to eject the medium
for volume
. This method should return TRUE
only if a medium is
present and the volume
is removable. Still, there's no warranty
that a call to thunar_vfs_volume_eject()
will succeed.
|
a ThunarVfsVolume instance. |
Returns : |
whether the medium for volume can be ejected.
|
gboolean thunar_vfs_volume_is_removable (ThunarVfsVolume *volume);
Determines whether volume
is a removable device, for example
a CD-ROM, an USB stick or a floppy drive.
|
a ThunarVfsVolume instance. |
Returns : |
TRUE if volume is a removable device, else FALSE .
|
const gchar * thunar_vfs_volume_lookup_icon_name (ThunarVfsVolume *volume, GtkIconTheme *icon_theme);
Tries to find a suitable icon for volume
in the given icon_theme
and
returns its name. If no suitable icon is found in icon_theme
, then
a fallback icon name will be returned. This way you can always count
on this method to return a valid string.
|
a ThunarVfsVolume instance. |
|
a GtkIconTheme instance. |
Returns : |
the icon name. |
gboolean thunar_vfs_volume_eject (ThunarVfsVolume *volume, GtkWidget *window, GError **error);
Tries to eject the medium present for volume
(or atleast to
unmount the volume
).
If ejecting volume
requires some complex user interaction
(basicly everything else than displaying an error dialog), it
should popup a modal dialog on window
(or on the default
GdkScreen if window
is NULL
). But be aware, that if an
implementation of ThunarVfsVolume performs user interaction
during a call to this method, it must implement this method
in a reentrant fashion!
|
a ThunarVfsVolume instance. |
|
a GtkWindow or NULL .
|
|
return location for errors or NULL .
|
Returns : |
TRUE if the medium for volume was successfully
ejected (or atleast the volume was unmounted
successfully), else FALSE .
|
gboolean thunar_vfs_volume_mount (ThunarVfsVolume *volume, GtkWidget *window, GError **error);
Tries to mount volume
. Will return TRUE
if either volume
was already mounted previously to this method invokation or
volume
was successfully mounted now.
If mounting volume
requires some complex user interaction
(basicly everything else than displaying an error dialog), it
should popup a modal dialog on window
(or on the default
GdkScreen if window
is NULL
). But be aware, that if an
implementation of ThunarVfsVolume performs user interaction
during a call to this method, it must implement this method
in a reentrant fashion!
|
a ThunarVfsVolume instance. |
|
a GtkWindow or NULL .
|
|
return location for errors or NULL .
|
Returns : |
TRUE if the medium for volume was successfully
mounted or was already mounted previously, else
FALSE .
|
gboolean thunar_vfs_volume_unmount (ThunarVfsVolume *volume, GtkWidget *window, GError **error);
Tries to unmount volume
. Will return TRUE
if either volume
was already unmounted previously to this method invokation or
volume
was successfully unmounted now.
If unmounting volume
requires some complex user interaction
(basicly everything else than displaying an error dialog), it
should popup a modal dialog on window
(or on the default
GdkScreen if window
is NULL
). But be aware, that if an
implementation of ThunarVfsVolume performs user interaction
during a call to this method, it must implement this method
in a reentrant fashion!
|
a ThunarVfsVolume instance. |
|
a GtkWindow or NULL .
|
|
return location for errors or NULL .
|
Returns : |
TRUE if the medium for volume was successfully
unmounted or wasn't mounted previously, else
FALSE .
|
"changed"
signalvoid user_function (ThunarVfsVolume *volume, gpointer user_data) : Run Last
Emitted whenever the state of volume
changed.
|
the ThunarVfsVolume instance. |
|
user data set when the signal handler was connected. |
"mounted"
signalvoid user_function (ThunarVfsVolume *volume, gpointer user_data) : Run Last
Emitted by volume
after a successfull mount
operation.
|
the ThunarVfsVolume instance. |
|
user data set when the signal handler was connected. |
"pre-unmount"
signalvoid user_function (ThunarVfsVolume *volume, gpointer user_data) : Run Last
Emitted by volume
right before an attempt
is made to unmount the volume
.
|
the ThunarVfsVolume instance. |
|
user data set when the signal handler was connected. |
"unmounted"
signalvoid user_function (ThunarVfsVolume *volume, gpointer user_data) : Run Last
Emitted by volume
right after the volume
was successfully unmounted.
|
the ThunarVfsVolume instance. |
|
user data set when the signal handler was connected. |