ThunarVfsVolumeManager

ThunarVfsVolumeManager

Functions

Signals

void volume-mounted Run Last
void volume-pre-unmount Run Last
void volume-unmounted Run Last
void volumes-added Run Last
void volumes-removed Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── ThunarVfsVolumeManager

Includes

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

Description

Functions

thunar_vfs_volume_manager_get_default ()

ThunarVfsVolumeManager *
thunar_vfs_volume_manager_get_default (void);

Returns the default, shared ThunarVfsVolumeManager instance for this system. This function automatically determines, which implementation of ThunarVfsVolumeManager should be used for the target system and returns an instance of that class, which is shared among all modules using the volume manager facility.

Call g_object_unref() on the returned object when you are done with it.

Returns

the shared ThunarVfsVolumeManager instance.


thunar_vfs_volume_manager_get_volume_by_info ()

ThunarVfsVolume *
thunar_vfs_volume_manager_get_volume_by_info
                               (ThunarVfsVolumeManager *manager,
                                const ThunarVfsInfo *info);

Tries to lookup the ThunarVfsVolume on which info is located. If manager doesn't know a ThunarVfsVolume for info , NULL will be returned.

The returned ThunarVfsVolume (if any) is owned by manager and must not be freed by the caller.

Parameters

manager

a ThunarVfsVolumeManager instance.

 

info

a ThunarVfsInfo.

 

Returns

the ThunarVfsVolume, on which info is located or NULL.


thunar_vfs_volume_manager_get_volumes ()

GList *
thunar_vfs_volume_manager_get_volumes (ThunarVfsVolumeManager *manager);

Returns all ThunarVfsVolumes currently known for manager . The returned list is owned by manager and should therefore considered constant in the caller.

Parameters

manager

a ThunarVfsVolumeManager instance.

 

Returns

the list of volumes known for manager .

Types and Values

ThunarVfsVolumeManager

typedef struct {
  /* the list of available volumes */
  GList  *volumes;
} ThunarVfsVolumeManager;

Signal Details

The “volume-mounted” signal

void
user_function (ThunarVfsVolumeManager *manager,
               ThunarVfsVolume        *volume,
               gpointer                user_data)

Emitted by manager right after the volume was successfully mounted.

Parameters

manager

a ThunarVfsVolumeManager instance.

 

volume

a ThunarVfsVolume instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “volume-pre-unmount” signal

void
user_function (ThunarVfsVolumeManager *manager,
               ThunarVfsVolume        *volume,
               gpointer                user_data)

Emitted by manager right before an attempt is made to unmount volume . Applications can connect to this signal to perform cleanups, like changing to a different folder if a folder on the volume is currently displayed.

Parameters

manager

a ThunarVfsVolumeManager instance.

 

volume

a ThunarVfsVolume instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “volume-unmounted” signal

void
user_function (ThunarVfsVolumeManager *manager,
               ThunarVfsVolume        *volume,
               gpointer                user_data)

Emitted by manager right after the volume was successfully unmounted.

Parameters

manager

a ThunarVfsVolumeManager instance.

 

volume

a ThunarVfsVolume instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “volumes-added” signal

void
user_function (ThunarVfsVolumeManager *manager,
               gpointer                volumes,
               gpointer                user_data)

Invoked by the manager whenever new volumes have been attached to the system or the administrator changes the /etc/fstab file, or some other condition, depending on the manager implementation.

Note that the implementation should not invoke this method when a volume is mounted, as that's a completely different condition!

Parameters

manager

a ThunarVfsVolumeManager instance.

 

volumes

a list of ThunarVfsVolumes.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “volumes-removed” signal

void
user_function (ThunarVfsVolumeManager *manager,
               gpointer                volumes,
               gpointer                user_data)

Invoked whenever the manager notices that volumes have been detached from the system.

Parameters

manager

a ThunarVfsVolumeManager instance.

 

volumes

a list of ThunarVfsVolumes.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last