gi-gio-2.0.24: Gio bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.UnixMountMonitor

Contents

Description

Watches GUnixMounts for changes.

Synopsis

Exported types

class (GObject o, IsDescendantOf UnixMountMonitor o) => IsUnixMountMonitor o Source #

Type class for types which can be safely cast to UnixMountMonitor, for instance with toUnixMountMonitor.

toUnixMountMonitor :: (MonadIO m, IsUnixMountMonitor o) => o -> m UnixMountMonitor Source #

Cast to UnixMountMonitor, for types for which this is known to be safe. For general casts, use castTo.

Methods

get

unixMountMonitorGet Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m UnixMountMonitor

Returns: the UnixMountMonitor.

Gets the UnixMountMonitor for the current thread-default main context.

The mount monitor can be used to monitor for changes to the list of mounted filesystems as well as the list of mount points (ie: fstab entries).

You must only call objectUnref on the return value from under the same main context as you called this function.

Since: 2.44

new

unixMountMonitorNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m UnixMountMonitor

Returns: a UnixMountMonitor.

Deprecated: (Since version 2.44)Use unixMountMonitorGet instead.

Deprecated alias for unixMountMonitorGet.

This function was never a true constructor, which is why it was renamed.

setRateLimit

unixMountMonitorSetRateLimit Source #

Arguments

:: (HasCallStack, MonadIO m, IsUnixMountMonitor a) 
=> a

mountMonitor: a UnixMountMonitor

-> Int32

limitMsec: a integer with the limit in milliseconds to poll for changes.

-> m () 

Deprecated: (Since version 2.44)This function does nothing. Don't call it.

This function does nothing.

Before 2.44, this was a partially-effective way of controlling the rate at which events would be reported under some uncommon circumstances. Since mountMonitor is a singleton, it also meant that calling this function would have side effects for other users of the monitor.

Since: 2.18

Signals

mountpointsChanged

type C_UnixMountMonitorMountpointsChangedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type UnixMountMonitorMountpointsChangedCallback = IO () Source #

Emitted when the unix mount points have changed.

afterUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountpointsChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “mountpoints-changed” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after unixMountMonitor #mountpointsChanged callback

onUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountpointsChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “mountpoints-changed” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on unixMountMonitor #mountpointsChanged callback

mountsChanged

type C_UnixMountMonitorMountsChangedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type UnixMountMonitorMountsChangedCallback = IO () Source #

Emitted when the unix mounts have changed.

afterUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountsChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “mounts-changed” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after unixMountMonitor #mountsChanged callback

onUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountsChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “mounts-changed” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on unixMountMonitor #mountsChanged callback