![]() |
![]() |
![]() |
Thunar-VFS Reference Manual | ![]() |
---|
ThunarVfsVolumeThunarVfsVolume — |
#include <thunar-vfs/thunar-vfs.h> enum ThunarVfsVolumeKind; enum ThunarVfsVolumeStatus; ThunarVfsVolumeIface; 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_removable (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_get_free_space (ThunarVfsVolume *volume, ThunarVfsFileSize *free_space_return); const gchar* thunar_vfs_volume_lookup_icon_name (ThunarVfsVolume *volume, GtkIconTheme *icon_theme); void thunar_vfs_volume_changed (ThunarVfsVolume *volume);
typedef enum { THUNAR_VFS_VOLUME_KIND_UNKNOWN, THUNAR_VFS_VOLUME_KIND_CDROM, THUNAR_VFS_VOLUME_KIND_DVD, THUNAR_VFS_VOLUME_KIND_FLOPPY, THUNAR_VFS_VOLUME_KIND_HARDDISK, THUNAR_VFS_VOLUME_KIND_USBSTICK, } ThunarVfsVolumeKind;
Describes the type of a VFS volume.
THUNAR_VFS_VOLUME_KIND_UNKNOWN |
Unknown volume. |
THUNAR_VFS_VOLUME_KIND_CDROM |
CD drives. |
THUNAR_VFS_VOLUME_KIND_DVD |
DVD drives. |
THUNAR_VFS_VOLUME_KIND_FLOPPY |
Floppy drives. |
THUNAR_VFS_VOLUME_KIND_HARDDISK |
Hard disk drives. |
THUNAR_VFS_VOLUME_KIND_USBSTICK |
USB sticks. |
typedef enum /*< flags >*/ { THUNAR_VFS_VOLUME_STATUS_MOUNTED = 1 << 0, THUNAR_VFS_VOLUME_STATUS_PRESENT = 1 << 1, } ThunarVfsVolumeStatus;
Describes the current status of a VFS volume.
THUNAR_VFS_VOLUME_STATUS_MOUNTED |
Whether or not the media is currently mounted. |
THUNAR_VFS_VOLUME_STATUS_PRESENT |
Whether or not a medium is present. |
typedef struct { GTypeInterface __parent__; /* methods */ ThunarVfsVolumeKind (*get_kind) (ThunarVfsVolume *volume); const gchar *(*get_name) (ThunarVfsVolume *volume); ThunarVfsVolumeStatus (*get_status) (ThunarVfsVolume *volume); ThunarVfsPath *(*get_mount_point) (ThunarVfsVolume *volume); gboolean (*get_free_space) (ThunarVfsVolume *volume, ThunarVfsFileSize *free_space_return); const gchar *(*lookup_icon_name) (ThunarVfsVolume *volume, GtkIconTheme *icon_theme); /* signals */ void (*changed) (ThunarVfsVolume *volume); } ThunarVfsVolumeIface;
ThunarVfsVolumeKind thunar_vfs_volume_get_kind (ThunarVfsVolume *volume);
Returns the kind of drive/device representd by volume
.
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.
volume : |
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.
volume : |
a ThunarVfsVolume instance. |
Returns : | the status for volume .
|
ThunarVfsPath* thunar_vfs_volume_get_mount_point (ThunarVfsVolume *volume);
volume : |
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.
volume : |
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.
volume : |
a ThunarVfsVolume instance. |
Returns : | TRUE if volume is present, else FALSE .
|
gboolean thunar_vfs_volume_is_removable (ThunarVfsVolume *volume);
Determines whether volume
is a removable device, for example
a CD-ROM or a floppy drive.
volume : |
a ThunarVfsVolume instance. |
Returns : | TRUE if volume is a removable device, else FALSE .
|
gboolean thunar_vfs_volume_get_free_space (ThunarVfsVolume *volume, ThunarVfsFileSize *free_space_return);
Tries to determine the number of available bytes on the specified
volume
and places the result to the memory pointed to by
free_space_return
. The returned amount of bytes represents the
space available to the current user, which may be different from
the total free amount.
If volume
is unable to determine the free space, FALSE
will be
returned and free_space_return
won't be set.
volume : |
a ThunarVfsVolume instance. |
free_space_return : |
location to store the free space to. |
Returns : | TRUE if the free amount was determined successfully,
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.
volume : |
a ThunarVfsVolume instance. |
icon_theme : |
a GtkIconTheme instance. |
Returns : | the icon name. |
void thunar_vfs_volume_changed (ThunarVfsVolume *volume);
Emits the "changed" signal on volume
. This function should
only be used by implementations of the ThunarVfsVolume
interface.
volume : |
a ThunarVfsVolume instance. |
<< Part VI. Volume Handling | ThunarVfsVolumeManager >> |