ThunarVfsVolume

ThunarVfsVolume

Functions

Signals

void changed Run Last
void mounted Run Last
void pre-unmount Run Last
void unmounted Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── ThunarVfsVolume

Includes

#include <thunar-vfs/thunar-vfs.h>

Description

Functions

thunar_vfs_volume_get_kind ()

ThunarVfsVolumeKind
thunar_vfs_volume_get_kind (ThunarVfsVolume *volume);

Returns the kind of drive/device representd by volume .

Parameters

volume

a ThunarVfsVolume instance.

 

Returns

the kind of volume .


thunar_vfs_volume_get_name ()

const gchar *
thunar_vfs_volume_get_name (ThunarVfsVolume *volume);


thunar_vfs_volume_get_status ()

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.

Parameters

volume

a ThunarVfsVolume instance.

 

Returns

the status for volume .


thunar_vfs_volume_get_mount_point ()

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().

Parameters

volume

a ThunarVfsVolume instance.

 

Returns

the path which identifies the path where the volume will be mounted (or is already mounted).


thunar_vfs_volume_is_mounted ()

gboolean
thunar_vfs_volume_is_mounted (ThunarVfsVolume *volume);

Determines whether volume is currently mounted into the filesystem hierarchy.

Parameters

volume

a ThunarVfsVolume instance.

 

Returns

TRUE if volume is mounted, else FALSE.


thunar_vfs_volume_is_present ()

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.

Parameters

volume

a ThunarVfsVolume instance.

 

Returns

TRUE if volume is present, else FALSE.


thunar_vfs_volume_is_ejectable ()

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.

Parameters

volume

a ThunarVfsVolume instance.

 

Returns

whether the medium for volume can be ejected.


thunar_vfs_volume_is_removable ()

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.

Parameters

volume

a ThunarVfsVolume instance.

 

Returns

TRUE if volume is a removable device, else FALSE.


thunar_vfs_volume_lookup_icon_name ()

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.

Parameters

volume

a ThunarVfsVolume instance.

 

icon_theme

a GtkIconTheme instance.

 

Returns

the icon name.


thunar_vfs_volume_eject ()

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!

Parameters

volume

a ThunarVfsVolume instance.

 

window

a GtkWindow or NULL.

 

error

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.


thunar_vfs_volume_mount ()

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!

Parameters

volume

a ThunarVfsVolume instance.

 

window

a GtkWindow or NULL.

 

error

return location for errors or NULL.

 

Returns

TRUE if the medium for volume was successfully mounted or was already mounted previously, else FALSE.


thunar_vfs_volume_unmount ()

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!

Parameters

volume

a ThunarVfsVolume instance.

 

window

a GtkWindow or NULL.

 

error

return location for errors or NULL.

 

Returns

TRUE if the medium for volume was successfully unmounted or wasn't mounted previously, else FALSE.

Types and Values

enum ThunarVfsVolumeKind

Describes the type of a VFS volume.

Members

THUNAR_VFS_VOLUME_KIND_UNKNOWN

Unknown volume.

 

THUNAR_VFS_VOLUME_KIND_CDROM

CD-ROMs.

 

THUNAR_VFS_VOLUME_KIND_CDR

CD-Rs.

 

THUNAR_VFS_VOLUME_KIND_CDRW

CD-RWs.

 

THUNAR_VFS_VOLUME_KIND_DVDROM

DVD-ROMs.

 

THUNAR_VFS_VOLUME_KIND_DVDRAM

DVD-RAMs.

 

THUNAR_VFS_VOLUME_KIND_DVDR

DVD-Rs.

 

THUNAR_VFS_VOLUME_KIND_DVDRW

DVD-RWs.

 

THUNAR_VFS_VOLUME_KIND_DVDPLUSR

DVD+Rs.

 

THUNAR_VFS_VOLUME_KIND_DVDPLUSRW

DVD+RWs.

 

THUNAR_VFS_VOLUME_KIND_FLOPPY

Floppy drives.

 

THUNAR_VFS_VOLUME_KIND_HARDDISK

Hard disk drives.

 

THUNAR_VFS_VOLUME_KIND_USBSTICK

USB sticks.

 

THUNAR_VFS_VOLUME_KIND_AUDIO_PLAYER

Portable audio players (i.e. iPod).

 

THUNAR_VFS_VOLUME_KIND_AUDIO_CD

Audio CDs.

 

THUNAR_VFS_VOLUME_KIND_MEMORY_CARD

Memory cards.

 

THUNAR_VFS_VOLUME_KIND_REMOVABLE_DISK

Other removable disks.

 

enum ThunarVfsVolumeStatus

Describes the current status of a VFS volume.

Members

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.

 

THUNAR_VFS_VOLUME_STATUS_MOUNTABLE

Whether or not the media can be mounted.

 

ThunarVfsVolume

typedef struct _ThunarVfsVolume ThunarVfsVolume;

Signal Details

The “changed” signal

void
user_function (ThunarVfsVolume *volume,
               gpointer         user_data)

Emitted whenever the state of volume changed.

Parameters

volume

the ThunarVfsVolume instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “mounted” signal

void
user_function (ThunarVfsVolume *volume,
               gpointer         user_data)

Emitted by volume after a successfull mount operation.

Parameters

volume

the ThunarVfsVolume instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “pre-unmount” signal

void
user_function (ThunarVfsVolume *volume,
               gpointer         user_data)

Emitted by volume right before an attempt is made to unmount the volume .

Parameters

volume

the ThunarVfsVolume instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “unmounted” signal

void
user_function (ThunarVfsVolume *volume,
               gpointer         user_data)

Emitted by volume right after the volume was successfully unmounted.

Parameters

volume

the ThunarVfsVolume instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last