| Thunar-VFS Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
#include <thunar-vfs/thunar-vfs.h>
ThunarVfsVolumeManager;
ThunarVfsVolumeManager * thunar_vfs_volume_manager_get_default
(void);
ThunarVfsVolume * thunar_vfs_volume_manager_get_volume_by_info
(ThunarVfsVolumeManager *manager,
const ThunarVfsInfo *info);
GList * thunar_vfs_volume_manager_get_volumes
(ThunarVfsVolumeManager *manager);
"volume-mounted" : Run Last "volume-pre-unmount" : Run Last "volume-unmounted" : Run Last "volumes-added" : Run Last "volumes-removed" : Run Last
typedef struct {
/* the list of available volumes */
GList *volumes;
} ThunarVfsVolumeManager;
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. |
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.
|
a ThunarVfsVolumeManager instance. |
|
a ThunarVfsInfo. |
Returns : |
the ThunarVfsVolume, on which info is
located or NULL.
|
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.
|
a ThunarVfsVolumeManager instance. |
Returns : |
the list of volumes known for manager.
|
"volume-mounted" signalvoid user_function (ThunarVfsVolumeManager *manager, ThunarVfsVolume *volume, gpointer user_data) : Run Last
Emitted by manager right after the volume was
successfully mounted.
|
a ThunarVfsVolumeManager instance. |
|
a ThunarVfsVolume instance. |
|
user data set when the signal handler was connected. |
"volume-pre-unmount" signalvoid user_function (ThunarVfsVolumeManager *manager, ThunarVfsVolume *volume, gpointer user_data) : Run Last
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.
|
a ThunarVfsVolumeManager instance. |
|
a ThunarVfsVolume instance. |
|
user data set when the signal handler was connected. |
"volume-unmounted" signalvoid user_function (ThunarVfsVolumeManager *manager, ThunarVfsVolume *volume, gpointer user_data) : Run Last
Emitted by manager right after the volume was
successfully unmounted.
|
a ThunarVfsVolumeManager instance. |
|
a ThunarVfsVolume instance. |
|
user data set when the signal handler was connected. |
"volumes-added" signalvoid user_function (ThunarVfsVolumeManager *manager, gpointer volumes, gpointer user_data) : Run Last
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!
|
a ThunarVfsVolumeManager instance. |
|
a list of ThunarVfsVolumes. |
|
user data set when the signal handler was connected. |
"volumes-removed" signalvoid user_function (ThunarVfsVolumeManager *manager, gpointer volumes, gpointer user_data) : Run Last
Invoked whenever the manager notices that volumes have
been detached from the system.
|
a ThunarVfsVolumeManager instance. |
|
a list of ThunarVfsVolumes. |
|
user data set when the signal handler was connected. |