Package ch.bailu.gtk.gio
Class VolumeMonitor
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gio.VolumeMonitor
- All Implemented Interfaces:
PointerInterface
- Direct Known Subclasses:
NativeVolumeMonitor
#GVolumeMonitor is for listing the user interesting devices and volumes
on the computer. In other words, what a file selector or file manager
would show in a sidebar.
#GVolumeMonitor is not
[thread-default-context aware][g-main-context-push-thread-default],
and so should not be used other than from the main thread, with no
thread-default-context active.
In order to receive updates about volumes and mounts monitored through GVFS,
a main loop must be running.
on the computer. In other words, what a file selector or file manager
would show in a sidebar.
#GVolumeMonitor is not
[thread-default-context aware][g-main-context-push-thread-default],
and so should not be used other than from the main thread, with no
thread-default-context active.
In order to receive updates about volumes and mounts monitored through GVFS,
a main loop must be running.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfaceNested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VolumeMonitorget()Gets the volume monitor used by gio.static ClassHandlerGets a list of drives connected to the system.static intgetMountForUuid(Str uuid) Finds a #GMount object by its UUID (see g_mount_get_uuid())getMountForUuid(String uuid) Finds a #GMount object by its UUID (see g_mount_get_uuid())Gets a list of the mounts on the system.static longstatic TypeSystem.TypeSizestatic longstatic TypeSystem.TypeSizegetVolumeForUuid(Str uuid) Finds a #GVolume object by its UUID (see g_volume_get_uuid())getVolumeForUuid(String uuid) Finds a #GVolume object by its UUID (see g_volume_get_uuid())Gets a list of the volumes on the system.Connect to signal "drive-changed".Connect to signal "drive-connected".Connect to signal "drive-disconnected".Connect to signal "drive-eject-button".Connect to signal "drive-stop-button".Connect to signal "mount-added".Connect to signal "mount-changed".Connect to signal "mount-pre-unmount".Connect to signal "mount-removed".Connect to signal "volume-added".Connect to signal "volume-changed".Connect to signal "volume-removed".Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnrefMethods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksMethods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_DRIVE_CHANGED
- See Also:
-
SIGNAL_ON_DRIVE_CONNECTED
- See Also:
-
SIGNAL_ON_DRIVE_DISCONNECTED
- See Also:
-
SIGNAL_ON_DRIVE_EJECT_BUTTON
- See Also:
-
SIGNAL_ON_DRIVE_STOP_BUTTON
- See Also:
-
SIGNAL_ON_MOUNT_ADDED
- See Also:
-
SIGNAL_ON_MOUNT_CHANGED
- See Also:
-
SIGNAL_ON_MOUNT_PRE_UNMOUNT
- See Also:
-
SIGNAL_ON_MOUNT_REMOVED
- See Also:
-
SIGNAL_ON_VOLUME_ADDED
- See Also:
-
SIGNAL_ON_VOLUME_CHANGED
- See Also:
-
SIGNAL_ON_VOLUME_REMOVED
- See Also:
-
-
Constructor Details
-
VolumeMonitor
-
-
Method Details
-
getClassHandler
-
getConnectedDrives
Gets a list of drives connected to the system.
The returned list should be freed with g_list_free(), after
its elements have been unreffed with g_object_unref().- Returns:
- a #GList of connected #GDrive objects.
-
getMountForUuid
Finds a #GMount object by its UUID (see g_mount_get_uuid())- Parameters:
uuid- the UUID to look for- Returns:
- a #GMount or %NULL if no such mount is available. Free the returned object with g_object_unref().
-
getMountForUuid
Finds a #GMount object by its UUID (see g_mount_get_uuid())- Parameters:
uuid- the UUID to look for- Returns:
- a #GMount or %NULL if no such mount is available. Free the returned object with g_object_unref().
-
getMounts
Gets a list of the mounts on the system.
The returned list should be freed with g_list_free(), after
its elements have been unreffed with g_object_unref().- Returns:
- a #GList of #GMount objects.
-
getVolumeForUuid
Finds a #GVolume object by its UUID (see g_volume_get_uuid())- Parameters:
uuid- the UUID to look for- Returns:
- a #GVolume or %NULL if no such volume is available. Free the returned object with g_object_unref().
-
getVolumeForUuid
Finds a #GVolume object by its UUID (see g_volume_get_uuid())- Parameters:
uuid- the UUID to look for- Returns:
- a #GVolume or %NULL if no such volume is available. Free the returned object with g_object_unref().
-
getVolumes
Gets a list of the volumes on the system.
The returned list should be freed with g_list_free(), after
its elements have been unreffed with g_object_unref().- Returns:
- a #GList of #GVolume objects.
-
onDriveChanged
Connect to signal "drive-changed".
SeeVolumeMonitor.OnDriveChanged.onDriveChanged(ch.bailu.gtk.gio.Drive)for signal description.
FieldSIGNAL_ON_DRIVE_CHANGEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onDriveConnected
Connect to signal "drive-connected".
SeeVolumeMonitor.OnDriveConnected.onDriveConnected(ch.bailu.gtk.gio.Drive)for signal description.
FieldSIGNAL_ON_DRIVE_CONNECTEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onDriveDisconnected
Connect to signal "drive-disconnected".
SeeVolumeMonitor.OnDriveDisconnected.onDriveDisconnected(ch.bailu.gtk.gio.Drive)for signal description.
FieldSIGNAL_ON_DRIVE_DISCONNECTEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onDriveEjectButton
Connect to signal "drive-eject-button".
SeeVolumeMonitor.OnDriveEjectButton.onDriveEjectButton(ch.bailu.gtk.gio.Drive)for signal description.
FieldSIGNAL_ON_DRIVE_EJECT_BUTTONcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onDriveStopButton
Connect to signal "drive-stop-button".
SeeVolumeMonitor.OnDriveStopButton.onDriveStopButton(ch.bailu.gtk.gio.Drive)for signal description.
FieldSIGNAL_ON_DRIVE_STOP_BUTTONcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onMountAdded
Connect to signal "mount-added".
SeeVolumeMonitor.OnMountAdded.onMountAdded(ch.bailu.gtk.gio.Mount)for signal description.
FieldSIGNAL_ON_MOUNT_ADDEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onMountChanged
Connect to signal "mount-changed".
SeeVolumeMonitor.OnMountChanged.onMountChanged(ch.bailu.gtk.gio.Mount)for signal description.
FieldSIGNAL_ON_MOUNT_CHANGEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onMountPreUnmount
Connect to signal "mount-pre-unmount".
SeeVolumeMonitor.OnMountPreUnmount.onMountPreUnmount(ch.bailu.gtk.gio.Mount)for signal description.
FieldSIGNAL_ON_MOUNT_PRE_UNMOUNTcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onMountRemoved
Connect to signal "mount-removed".
SeeVolumeMonitor.OnMountRemoved.onMountRemoved(ch.bailu.gtk.gio.Mount)for signal description.
FieldSIGNAL_ON_MOUNT_REMOVEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onVolumeAdded
Connect to signal "volume-added".
SeeVolumeMonitor.OnVolumeAdded.onVolumeAdded(ch.bailu.gtk.gio.Volume)for signal description.
FieldSIGNAL_ON_VOLUME_ADDEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onVolumeChanged
Connect to signal "volume-changed".
SeeVolumeMonitor.OnVolumeChanged.onVolumeChanged(ch.bailu.gtk.gio.Volume)for signal description.
FieldSIGNAL_ON_VOLUME_CHANGEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
onVolumeRemoved
Connect to signal "volume-removed".
SeeVolumeMonitor.OnVolumeRemoved.onVolumeRemoved(ch.bailu.gtk.gio.Volume)for signal description.
FieldSIGNAL_ON_VOLUME_REMOVEDcontains original signal name and can be used as resource reference.- Parameters:
signal- callback function (lambda).- Returns:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
get
Gets the volume monitor used by gio.- Returns:
- a reference to the #GVolumeMonitor used by gio. Call g_object_unref() when done with it.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-