    {- |
    Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
    License    : LGPL-2.1
    Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

    'GI.Gio.Objects.VolumeMonitor.VolumeMonitor' 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.

    'GI.Gio.Objects.VolumeMonitor.VolumeMonitor' 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.
    -}

    #define ENABLE_OVERLOADING \
           (!defined(__HADDOCK_VERSION__))

    module GI.Gio.Objects.VolumeMonitor
        (

    -- * Exported types
        VolumeMonitor(..)                       ,
        IsVolumeMonitor                         ,
        toVolumeMonitor                         ,
        noVolumeMonitor                         ,

     -- * Methods
    -- ** adoptOrphanMount #method:adoptOrphanMount#

        volumeMonitorAdoptOrphanMount           ,

    -- ** get #method:get#

        volumeMonitorGet                        ,

    -- ** getConnectedDrives #method:getConnectedDrives#

    #if ENABLE_OVERLOADING
        VolumeMonitorGetConnectedDrivesMethodInfo,
    #endif
        volumeMonitorGetConnectedDrives         ,

    -- ** getMountForUuid #method:getMountForUuid#

    #if ENABLE_OVERLOADING
        VolumeMonitorGetMountForUuidMethodInfo  ,
    #endif
        volumeMonitorGetMountForUuid            ,

    -- ** getMounts #method:getMounts#

    #if ENABLE_OVERLOADING
        VolumeMonitorGetMountsMethodInfo        ,
    #endif
        volumeMonitorGetMounts                  ,

    -- ** getVolumeForUuid #method:getVolumeForUuid#

    #if ENABLE_OVERLOADING
        VolumeMonitorGetVolumeForUuidMethodInfo ,
    #endif
        volumeMonitorGetVolumeForUuid           ,

    -- ** getVolumes #method:getVolumes#

    #if ENABLE_OVERLOADING
        VolumeMonitorGetVolumesMethodInfo       ,
    #endif
        volumeMonitorGetVolumes                 ,

     -- * Signals
    -- ** driveChanged #signal:driveChanged#

        C_VolumeMonitorDriveChangedCallback     ,
        VolumeMonitorDriveChangedCallback       ,
    #if ENABLE_OVERLOADING
        VolumeMonitorDriveChangedSignalInfo     ,
    #endif
        afterVolumeMonitorDriveChanged          ,
        genClosure_VolumeMonitorDriveChanged    ,
        mk_VolumeMonitorDriveChangedCallback    ,
        noVolumeMonitorDriveChangedCallback     ,
        onVolumeMonitorDriveChanged             ,
        wrap_VolumeMonitorDriveChangedCallback  ,

    -- ** driveConnected #signal:driveConnected#

        C_VolumeMonitorDriveConnectedCallback   ,
        VolumeMonitorDriveConnectedCallback     ,
    #if ENABLE_OVERLOADING
        VolumeMonitorDriveConnectedSignalInfo   ,
    #endif
        afterVolumeMonitorDriveConnected        ,
        genClosure_VolumeMonitorDriveConnected  ,
        mk_VolumeMonitorDriveConnectedCallback  ,
        noVolumeMonitorDriveConnectedCallback   ,
        onVolumeMonitorDriveConnected           ,
        wrap_VolumeMonitorDriveConnectedCallback,

    -- ** driveDisconnected #signal:driveDisconnected#

        C_VolumeMonitorDriveDisconnectedCallback,
        VolumeMonitorDriveDisconnectedCallback  ,
    #if ENABLE_OVERLOADING
        VolumeMonitorDriveDisconnectedSignalInfo,
    #endif
        afterVolumeMonitorDriveDisconnected     ,
        genClosure_VolumeMonitorDriveDisconnected,
        mk_VolumeMonitorDriveDisconnectedCallback,
        noVolumeMonitorDriveDisconnectedCallback,
        onVolumeMonitorDriveDisconnected        ,
        wrap_VolumeMonitorDriveDisconnectedCallback,

    -- ** driveEjectButton #signal:driveEjectButton#

        C_VolumeMonitorDriveEjectButtonCallback ,
        VolumeMonitorDriveEjectButtonCallback   ,
    #if ENABLE_OVERLOADING
        VolumeMonitorDriveEjectButtonSignalInfo ,
    #endif
        afterVolumeMonitorDriveEjectButton      ,
        genClosure_VolumeMonitorDriveEjectButton,
        mk_VolumeMonitorDriveEjectButtonCallback,
        noVolumeMonitorDriveEjectButtonCallback ,
        onVolumeMonitorDriveEjectButton         ,
        wrap_VolumeMonitorDriveEjectButtonCallback,

    -- ** driveStopButton #signal:driveStopButton#

        C_VolumeMonitorDriveStopButtonCallback  ,
        VolumeMonitorDriveStopButtonCallback    ,
    #if ENABLE_OVERLOADING
        VolumeMonitorDriveStopButtonSignalInfo  ,
    #endif
        afterVolumeMonitorDriveStopButton       ,
        genClosure_VolumeMonitorDriveStopButton ,
        mk_VolumeMonitorDriveStopButtonCallback ,
        noVolumeMonitorDriveStopButtonCallback  ,
        onVolumeMonitorDriveStopButton          ,
        wrap_VolumeMonitorDriveStopButtonCallback,

    -- ** mountAdded #signal:mountAdded#

        C_VolumeMonitorMountAddedCallback       ,
        VolumeMonitorMountAddedCallback         ,
    #if ENABLE_OVERLOADING
        VolumeMonitorMountAddedSignalInfo       ,
    #endif
        afterVolumeMonitorMountAdded            ,
        genClosure_VolumeMonitorMountAdded      ,
        mk_VolumeMonitorMountAddedCallback      ,
        noVolumeMonitorMountAddedCallback       ,
        onVolumeMonitorMountAdded               ,
        wrap_VolumeMonitorMountAddedCallback    ,

    -- ** mountChanged #signal:mountChanged#

        C_VolumeMonitorMountChangedCallback     ,
        VolumeMonitorMountChangedCallback       ,
    #if ENABLE_OVERLOADING
        VolumeMonitorMountChangedSignalInfo     ,
    #endif
        afterVolumeMonitorMountChanged          ,
        genClosure_VolumeMonitorMountChanged    ,
        mk_VolumeMonitorMountChangedCallback    ,
        noVolumeMonitorMountChangedCallback     ,
        onVolumeMonitorMountChanged             ,
        wrap_VolumeMonitorMountChangedCallback  ,

    -- ** mountPreUnmount #signal:mountPreUnmount#

        C_VolumeMonitorMountPreUnmountCallback  ,
        VolumeMonitorMountPreUnmountCallback    ,
    #if ENABLE_OVERLOADING
        VolumeMonitorMountPreUnmountSignalInfo  ,
    #endif
        afterVolumeMonitorMountPreUnmount       ,
        genClosure_VolumeMonitorMountPreUnmount ,
        mk_VolumeMonitorMountPreUnmountCallback ,
        noVolumeMonitorMountPreUnmountCallback  ,
        onVolumeMonitorMountPreUnmount          ,
        wrap_VolumeMonitorMountPreUnmountCallback,

    -- ** mountRemoved #signal:mountRemoved#

        C_VolumeMonitorMountRemovedCallback     ,
        VolumeMonitorMountRemovedCallback       ,
    #if ENABLE_OVERLOADING
        VolumeMonitorMountRemovedSignalInfo     ,
    #endif
        afterVolumeMonitorMountRemoved          ,
        genClosure_VolumeMonitorMountRemoved    ,
        mk_VolumeMonitorMountRemovedCallback    ,
        noVolumeMonitorMountRemovedCallback     ,
        onVolumeMonitorMountRemoved             ,
        wrap_VolumeMonitorMountRemovedCallback  ,

    -- ** volumeAdded #signal:volumeAdded#

        C_VolumeMonitorVolumeAddedCallback      ,
        VolumeMonitorVolumeAddedCallback        ,
    #if ENABLE_OVERLOADING
        VolumeMonitorVolumeAddedSignalInfo      ,
    #endif
        afterVolumeMonitorVolumeAdded           ,
        genClosure_VolumeMonitorVolumeAdded     ,
        mk_VolumeMonitorVolumeAddedCallback     ,
        noVolumeMonitorVolumeAddedCallback      ,
        onVolumeMonitorVolumeAdded              ,
        wrap_VolumeMonitorVolumeAddedCallback   ,

    -- ** volumeChanged #signal:volumeChanged#

        C_VolumeMonitorVolumeChangedCallback    ,
        VolumeMonitorVolumeChangedCallback      ,
    #if ENABLE_OVERLOADING
        VolumeMonitorVolumeChangedSignalInfo    ,
    #endif
        afterVolumeMonitorVolumeChanged         ,
        genClosure_VolumeMonitorVolumeChanged   ,
        mk_VolumeMonitorVolumeChangedCallback   ,
        noVolumeMonitorVolumeChangedCallback    ,
        onVolumeMonitorVolumeChanged            ,
        wrap_VolumeMonitorVolumeChangedCallback ,

    -- ** volumeRemoved #signal:volumeRemoved#

        C_VolumeMonitorVolumeRemovedCallback    ,
        VolumeMonitorVolumeRemovedCallback      ,
    #if ENABLE_OVERLOADING
        VolumeMonitorVolumeRemovedSignalInfo    ,
    #endif
        afterVolumeMonitorVolumeRemoved         ,
        genClosure_VolumeMonitorVolumeRemoved   ,
        mk_VolumeMonitorVolumeRemovedCallback   ,
        noVolumeMonitorVolumeRemovedCallback    ,
        onVolumeMonitorVolumeRemoved            ,
        wrap_VolumeMonitorVolumeRemovedCallback ,

        ) where

    import Data.GI.Base.ShortPrelude
    import qualified Data.GI.Base.ShortPrelude as SP
    import qualified Data.GI.Base.Overloading as O
    import qualified Prelude as P

    import qualified Data.GI.Base.Attributes as GI.Attributes
    import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
    import qualified Data.GI.Base.GError as B.GError
    import qualified Data.GI.Base.GVariant as B.GVariant
    import qualified Data.GI.Base.GValue as B.GValue
    import qualified Data.GI.Base.GParamSpec as B.GParamSpec
    import qualified Data.GI.Base.CallStack as B.CallStack
    import qualified Data.Text as T
    import qualified Data.ByteString.Char8 as B
    import qualified Data.Map as Map
    import qualified Foreign.Ptr as FP

    import qualified GI.GObject.Objects.Object as GObject.Object
    import {-# SOURCE #-} qualified GI.Gio.Interfaces.Drive as Gio.Drive
    import {-# SOURCE #-} qualified GI.Gio.Interfaces.Mount as Gio.Mount
    import {-# SOURCE #-} qualified GI.Gio.Interfaces.Volume as Gio.Volume

    -- | Memory-managed wrapper type.
    newtype VolumeMonitor = VolumeMonitor (ManagedPtr VolumeMonitor)
    foreign import ccall "g_volume_monitor_get_type"
        c_g_volume_monitor_get_type :: IO GType

    instance GObject VolumeMonitor where
        gobjectType _ = c_g_volume_monitor_get_type

    -- | Type class for types which can be safely cast to `VolumeMonitor`, for instance with `toVolumeMonitor`.
    class GObject o => IsVolumeMonitor o
    #if MIN_VERSION_base(4,9,0)
    instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError VolumeMonitor a) =>
        IsVolumeMonitor a
    #endif
    instance IsVolumeMonitor VolumeMonitor
    instance GObject.Object.IsObject VolumeMonitor

    -- | Cast to `VolumeMonitor`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
    toVolumeMonitor :: (MonadIO m, IsVolumeMonitor o) => o -> m VolumeMonitor
    toVolumeMonitor = liftIO . unsafeCastTo VolumeMonitor

    -- | A convenience alias for `Nothing` :: `Maybe` `VolumeMonitor`.
    noVolumeMonitor :: Maybe VolumeMonitor
    noVolumeMonitor = Nothing

    #if ENABLE_OVERLOADING
    type family ResolveVolumeMonitorMethod (t :: Symbol) (o :: *) :: * where
        ResolveVolumeMonitorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveVolumeMonitorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveVolumeMonitorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveVolumeMonitorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveVolumeMonitorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveVolumeMonitorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveVolumeMonitorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveVolumeMonitorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveVolumeMonitorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveVolumeMonitorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveVolumeMonitorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveVolumeMonitorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveVolumeMonitorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveVolumeMonitorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveVolumeMonitorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveVolumeMonitorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveVolumeMonitorMethod "getConnectedDrives" o = VolumeMonitorGetConnectedDrivesMethodInfo
        ResolveVolumeMonitorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveVolumeMonitorMethod "getMountForUuid" o = VolumeMonitorGetMountForUuidMethodInfo
        ResolveVolumeMonitorMethod "getMounts" o = VolumeMonitorGetMountsMethodInfo
        ResolveVolumeMonitorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveVolumeMonitorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveVolumeMonitorMethod "getVolumeForUuid" o = VolumeMonitorGetVolumeForUuidMethodInfo
        ResolveVolumeMonitorMethod "getVolumes" o = VolumeMonitorGetVolumesMethodInfo
        ResolveVolumeMonitorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveVolumeMonitorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveVolumeMonitorMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolveVolumeMonitorMethod t VolumeMonitor, O.MethodInfo info VolumeMonitor p) => O.IsLabelProxy t (VolumeMonitor -> p) where
        fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

    #if MIN_VERSION_base(4,9,0)
    instance (info ~ ResolveVolumeMonitorMethod t VolumeMonitor, O.MethodInfo info VolumeMonitor p) => O.IsLabel t (VolumeMonitor -> p) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
    #else
        fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
    #endif
    #endif

    #endif

    -- signal VolumeMonitor::drive-changed
    {- |
    Emitted when a drive changes.
    -}
    type VolumeMonitorDriveChangedCallback =
        Gio.Drive.Drive
        {- ^ /@drive@/: the drive that changed -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorDriveChangedCallback`@.
    noVolumeMonitorDriveChangedCallback :: Maybe VolumeMonitorDriveChangedCallback
    noVolumeMonitorDriveChangedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorDriveChangedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Drive.Drive ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorDriveChangedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorDriveChangedCallback :: C_VolumeMonitorDriveChangedCallback -> IO (FunPtr C_VolumeMonitorDriveChangedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorDriveChanged :: VolumeMonitorDriveChangedCallback -> IO Closure
    genClosure_VolumeMonitorDriveChanged cb = do
        let cb' = wrap_VolumeMonitorDriveChangedCallback cb
        mk_VolumeMonitorDriveChangedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorDriveChangedCallback` into a `C_VolumeMonitorDriveChangedCallback`.
    wrap_VolumeMonitorDriveChangedCallback ::
        VolumeMonitorDriveChangedCallback ->
        C_VolumeMonitorDriveChangedCallback
    wrap_VolumeMonitorDriveChangedCallback _cb _ drive _ = do
        drive' <- (newObject Gio.Drive.Drive) drive
        _cb  drive'

    {- |
    Connect a signal handler for the “@drive-changed@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #driveChanged callback
    @
    -}
    onVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
    onVolumeMonitorDriveChanged obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveChangedCallback cb
        cb'' <- mk_VolumeMonitorDriveChangedCallback cb'
        connectSignalFunPtr obj "drive-changed" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@drive-changed@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #driveChanged callback
    @
    -}
    afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
    afterVolumeMonitorDriveChanged obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveChangedCallback cb
        cb'' <- mk_VolumeMonitorDriveChangedCallback cb'
        connectSignalFunPtr obj "drive-changed" cb'' SignalConnectAfter

    -- signal VolumeMonitor::drive-connected
    {- |
    Emitted when a drive is connected to the system.
    -}
    type VolumeMonitorDriveConnectedCallback =
        Gio.Drive.Drive
        {- ^ /@drive@/: a 'GI.Gio.Interfaces.Drive.Drive' that was connected. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorDriveConnectedCallback`@.
    noVolumeMonitorDriveConnectedCallback :: Maybe VolumeMonitorDriveConnectedCallback
    noVolumeMonitorDriveConnectedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorDriveConnectedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Drive.Drive ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorDriveConnectedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorDriveConnectedCallback :: C_VolumeMonitorDriveConnectedCallback -> IO (FunPtr C_VolumeMonitorDriveConnectedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorDriveConnected :: VolumeMonitorDriveConnectedCallback -> IO Closure
    genClosure_VolumeMonitorDriveConnected cb = do
        let cb' = wrap_VolumeMonitorDriveConnectedCallback cb
        mk_VolumeMonitorDriveConnectedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorDriveConnectedCallback` into a `C_VolumeMonitorDriveConnectedCallback`.
    wrap_VolumeMonitorDriveConnectedCallback ::
        VolumeMonitorDriveConnectedCallback ->
        C_VolumeMonitorDriveConnectedCallback
    wrap_VolumeMonitorDriveConnectedCallback _cb _ drive _ = do
        drive' <- (newObject Gio.Drive.Drive) drive
        _cb  drive'

    {- |
    Connect a signal handler for the “@drive-connected@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #driveConnected callback
    @
    -}
    onVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId
    onVolumeMonitorDriveConnected obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveConnectedCallback cb
        cb'' <- mk_VolumeMonitorDriveConnectedCallback cb'
        connectSignalFunPtr obj "drive-connected" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@drive-connected@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #driveConnected callback
    @
    -}
    afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId
    afterVolumeMonitorDriveConnected obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveConnectedCallback cb
        cb'' <- mk_VolumeMonitorDriveConnectedCallback cb'
        connectSignalFunPtr obj "drive-connected" cb'' SignalConnectAfter

    -- signal VolumeMonitor::drive-disconnected
    {- |
    Emitted when a drive is disconnected from the system.
    -}
    type VolumeMonitorDriveDisconnectedCallback =
        Gio.Drive.Drive
        {- ^ /@drive@/: a 'GI.Gio.Interfaces.Drive.Drive' that was disconnected. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorDriveDisconnectedCallback`@.
    noVolumeMonitorDriveDisconnectedCallback :: Maybe VolumeMonitorDriveDisconnectedCallback
    noVolumeMonitorDriveDisconnectedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorDriveDisconnectedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Drive.Drive ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorDriveDisconnectedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorDriveDisconnectedCallback :: C_VolumeMonitorDriveDisconnectedCallback -> IO (FunPtr C_VolumeMonitorDriveDisconnectedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorDriveDisconnected :: VolumeMonitorDriveDisconnectedCallback -> IO Closure
    genClosure_VolumeMonitorDriveDisconnected cb = do
        let cb' = wrap_VolumeMonitorDriveDisconnectedCallback cb
        mk_VolumeMonitorDriveDisconnectedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorDriveDisconnectedCallback` into a `C_VolumeMonitorDriveDisconnectedCallback`.
    wrap_VolumeMonitorDriveDisconnectedCallback ::
        VolumeMonitorDriveDisconnectedCallback ->
        C_VolumeMonitorDriveDisconnectedCallback
    wrap_VolumeMonitorDriveDisconnectedCallback _cb _ drive _ = do
        drive' <- (newObject Gio.Drive.Drive) drive
        _cb  drive'

    {- |
    Connect a signal handler for the “@drive-disconnected@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #driveDisconnected callback
    @
    -}
    onVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId
    onVolumeMonitorDriveDisconnected obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveDisconnectedCallback cb
        cb'' <- mk_VolumeMonitorDriveDisconnectedCallback cb'
        connectSignalFunPtr obj "drive-disconnected" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@drive-disconnected@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #driveDisconnected callback
    @
    -}
    afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId
    afterVolumeMonitorDriveDisconnected obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveDisconnectedCallback cb
        cb'' <- mk_VolumeMonitorDriveDisconnectedCallback cb'
        connectSignalFunPtr obj "drive-disconnected" cb'' SignalConnectAfter

    -- signal VolumeMonitor::drive-eject-button
    {- |
    Emitted when the eject button is pressed on /@drive@/.

    /Since: 2.18/
    -}
    type VolumeMonitorDriveEjectButtonCallback =
        Gio.Drive.Drive
        {- ^ /@drive@/: the drive where the eject button was pressed -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorDriveEjectButtonCallback`@.
    noVolumeMonitorDriveEjectButtonCallback :: Maybe VolumeMonitorDriveEjectButtonCallback
    noVolumeMonitorDriveEjectButtonCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorDriveEjectButtonCallback =
        Ptr () ->                               -- object
        Ptr Gio.Drive.Drive ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorDriveEjectButtonCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorDriveEjectButtonCallback :: C_VolumeMonitorDriveEjectButtonCallback -> IO (FunPtr C_VolumeMonitorDriveEjectButtonCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorDriveEjectButton :: VolumeMonitorDriveEjectButtonCallback -> IO Closure
    genClosure_VolumeMonitorDriveEjectButton cb = do
        let cb' = wrap_VolumeMonitorDriveEjectButtonCallback cb
        mk_VolumeMonitorDriveEjectButtonCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorDriveEjectButtonCallback` into a `C_VolumeMonitorDriveEjectButtonCallback`.
    wrap_VolumeMonitorDriveEjectButtonCallback ::
        VolumeMonitorDriveEjectButtonCallback ->
        C_VolumeMonitorDriveEjectButtonCallback
    wrap_VolumeMonitorDriveEjectButtonCallback _cb _ drive _ = do
        drive' <- (newObject Gio.Drive.Drive) drive
        _cb  drive'

    {- |
    Connect a signal handler for the “@drive-eject-button@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #driveEjectButton callback
    @
    -}
    onVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId
    onVolumeMonitorDriveEjectButton obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveEjectButtonCallback cb
        cb'' <- mk_VolumeMonitorDriveEjectButtonCallback cb'
        connectSignalFunPtr obj "drive-eject-button" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@drive-eject-button@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #driveEjectButton callback
    @
    -}
    afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId
    afterVolumeMonitorDriveEjectButton obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveEjectButtonCallback cb
        cb'' <- mk_VolumeMonitorDriveEjectButtonCallback cb'
        connectSignalFunPtr obj "drive-eject-button" cb'' SignalConnectAfter

    -- signal VolumeMonitor::drive-stop-button
    {- |
    Emitted when the stop button is pressed on /@drive@/.

    /Since: 2.22/
    -}
    type VolumeMonitorDriveStopButtonCallback =
        Gio.Drive.Drive
        {- ^ /@drive@/: the drive where the stop button was pressed -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorDriveStopButtonCallback`@.
    noVolumeMonitorDriveStopButtonCallback :: Maybe VolumeMonitorDriveStopButtonCallback
    noVolumeMonitorDriveStopButtonCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorDriveStopButtonCallback =
        Ptr () ->                               -- object
        Ptr Gio.Drive.Drive ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorDriveStopButtonCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorDriveStopButtonCallback :: C_VolumeMonitorDriveStopButtonCallback -> IO (FunPtr C_VolumeMonitorDriveStopButtonCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorDriveStopButton :: VolumeMonitorDriveStopButtonCallback -> IO Closure
    genClosure_VolumeMonitorDriveStopButton cb = do
        let cb' = wrap_VolumeMonitorDriveStopButtonCallback cb
        mk_VolumeMonitorDriveStopButtonCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorDriveStopButtonCallback` into a `C_VolumeMonitorDriveStopButtonCallback`.
    wrap_VolumeMonitorDriveStopButtonCallback ::
        VolumeMonitorDriveStopButtonCallback ->
        C_VolumeMonitorDriveStopButtonCallback
    wrap_VolumeMonitorDriveStopButtonCallback _cb _ drive _ = do
        drive' <- (newObject Gio.Drive.Drive) drive
        _cb  drive'

    {- |
    Connect a signal handler for the “@drive-stop-button@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #driveStopButton callback
    @
    -}
    onVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId
    onVolumeMonitorDriveStopButton obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveStopButtonCallback cb
        cb'' <- mk_VolumeMonitorDriveStopButtonCallback cb'
        connectSignalFunPtr obj "drive-stop-button" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@drive-stop-button@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #driveStopButton callback
    @
    -}
    afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId
    afterVolumeMonitorDriveStopButton obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorDriveStopButtonCallback cb
        cb'' <- mk_VolumeMonitorDriveStopButtonCallback cb'
        connectSignalFunPtr obj "drive-stop-button" cb'' SignalConnectAfter

    -- signal VolumeMonitor::mount-added
    {- |
    Emitted when a mount is added.
    -}
    type VolumeMonitorMountAddedCallback =
        Gio.Mount.Mount
        {- ^ /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' that was added. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorMountAddedCallback`@.
    noVolumeMonitorMountAddedCallback :: Maybe VolumeMonitorMountAddedCallback
    noVolumeMonitorMountAddedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorMountAddedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Mount.Mount ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorMountAddedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorMountAddedCallback :: C_VolumeMonitorMountAddedCallback -> IO (FunPtr C_VolumeMonitorMountAddedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorMountAdded :: VolumeMonitorMountAddedCallback -> IO Closure
    genClosure_VolumeMonitorMountAdded cb = do
        let cb' = wrap_VolumeMonitorMountAddedCallback cb
        mk_VolumeMonitorMountAddedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorMountAddedCallback` into a `C_VolumeMonitorMountAddedCallback`.
    wrap_VolumeMonitorMountAddedCallback ::
        VolumeMonitorMountAddedCallback ->
        C_VolumeMonitorMountAddedCallback
    wrap_VolumeMonitorMountAddedCallback _cb _ mount _ = do
        mount' <- (newObject Gio.Mount.Mount) mount
        _cb  mount'

    {- |
    Connect a signal handler for the “@mount-added@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #mountAdded callback
    @
    -}
    onVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
    onVolumeMonitorMountAdded obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorMountAddedCallback cb
        cb'' <- mk_VolumeMonitorMountAddedCallback cb'
        connectSignalFunPtr obj "mount-added" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@mount-added@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #mountAdded callback
    @
    -}
    afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
    afterVolumeMonitorMountAdded obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorMountAddedCallback cb
        cb'' <- mk_VolumeMonitorMountAddedCallback cb'
        connectSignalFunPtr obj "mount-added" cb'' SignalConnectAfter

    -- signal VolumeMonitor::mount-changed
    {- |
    Emitted when a mount changes.
    -}
    type VolumeMonitorMountChangedCallback =
        Gio.Mount.Mount
        {- ^ /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' that changed. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorMountChangedCallback`@.
    noVolumeMonitorMountChangedCallback :: Maybe VolumeMonitorMountChangedCallback
    noVolumeMonitorMountChangedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorMountChangedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Mount.Mount ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorMountChangedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorMountChangedCallback :: C_VolumeMonitorMountChangedCallback -> IO (FunPtr C_VolumeMonitorMountChangedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorMountChanged :: VolumeMonitorMountChangedCallback -> IO Closure
    genClosure_VolumeMonitorMountChanged cb = do
        let cb' = wrap_VolumeMonitorMountChangedCallback cb
        mk_VolumeMonitorMountChangedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorMountChangedCallback` into a `C_VolumeMonitorMountChangedCallback`.
    wrap_VolumeMonitorMountChangedCallback ::
        VolumeMonitorMountChangedCallback ->
        C_VolumeMonitorMountChangedCallback
    wrap_VolumeMonitorMountChangedCallback _cb _ mount _ = do
        mount' <- (newObject Gio.Mount.Mount) mount
        _cb  mount'

    {- |
    Connect a signal handler for the “@mount-changed@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #mountChanged callback
    @
    -}
    onVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId
    onVolumeMonitorMountChanged obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorMountChangedCallback cb
        cb'' <- mk_VolumeMonitorMountChangedCallback cb'
        connectSignalFunPtr obj "mount-changed" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@mount-changed@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #mountChanged callback
    @
    -}
    afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId
    afterVolumeMonitorMountChanged obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorMountChangedCallback cb
        cb'' <- mk_VolumeMonitorMountChangedCallback cb'
        connectSignalFunPtr obj "mount-changed" cb'' SignalConnectAfter

    -- signal VolumeMonitor::mount-pre-unmount
    {- |
    May be emitted when a mount is about to be removed.

    This signal depends on the backend and is only emitted if
    GIO was used to unmount.
    -}
    type VolumeMonitorMountPreUnmountCallback =
        Gio.Mount.Mount
        {- ^ /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' that is being unmounted. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorMountPreUnmountCallback`@.
    noVolumeMonitorMountPreUnmountCallback :: Maybe VolumeMonitorMountPreUnmountCallback
    noVolumeMonitorMountPreUnmountCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorMountPreUnmountCallback =
        Ptr () ->                               -- object
        Ptr Gio.Mount.Mount ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorMountPreUnmountCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorMountPreUnmountCallback :: C_VolumeMonitorMountPreUnmountCallback -> IO (FunPtr C_VolumeMonitorMountPreUnmountCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorMountPreUnmount :: VolumeMonitorMountPreUnmountCallback -> IO Closure
    genClosure_VolumeMonitorMountPreUnmount cb = do
        let cb' = wrap_VolumeMonitorMountPreUnmountCallback cb
        mk_VolumeMonitorMountPreUnmountCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorMountPreUnmountCallback` into a `C_VolumeMonitorMountPreUnmountCallback`.
    wrap_VolumeMonitorMountPreUnmountCallback ::
        VolumeMonitorMountPreUnmountCallback ->
        C_VolumeMonitorMountPreUnmountCallback
    wrap_VolumeMonitorMountPreUnmountCallback _cb _ mount _ = do
        mount' <- (newObject Gio.Mount.Mount) mount
        _cb  mount'

    {- |
    Connect a signal handler for the “@mount-pre-unmount@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #mountPreUnmount callback
    @
    -}
    onVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId
    onVolumeMonitorMountPreUnmount obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorMountPreUnmountCallback cb
        cb'' <- mk_VolumeMonitorMountPreUnmountCallback cb'
        connectSignalFunPtr obj "mount-pre-unmount" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@mount-pre-unmount@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #mountPreUnmount callback
    @
    -}
    afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId
    afterVolumeMonitorMountPreUnmount obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorMountPreUnmountCallback cb
        cb'' <- mk_VolumeMonitorMountPreUnmountCallback cb'
        connectSignalFunPtr obj "mount-pre-unmount" cb'' SignalConnectAfter

    -- signal VolumeMonitor::mount-removed
    {- |
    Emitted when a mount is removed.
    -}
    type VolumeMonitorMountRemovedCallback =
        Gio.Mount.Mount
        {- ^ /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' that was removed. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorMountRemovedCallback`@.
    noVolumeMonitorMountRemovedCallback :: Maybe VolumeMonitorMountRemovedCallback
    noVolumeMonitorMountRemovedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorMountRemovedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Mount.Mount ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorMountRemovedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorMountRemovedCallback :: C_VolumeMonitorMountRemovedCallback -> IO (FunPtr C_VolumeMonitorMountRemovedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorMountRemoved :: VolumeMonitorMountRemovedCallback -> IO Closure
    genClosure_VolumeMonitorMountRemoved cb = do
        let cb' = wrap_VolumeMonitorMountRemovedCallback cb
        mk_VolumeMonitorMountRemovedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorMountRemovedCallback` into a `C_VolumeMonitorMountRemovedCallback`.
    wrap_VolumeMonitorMountRemovedCallback ::
        VolumeMonitorMountRemovedCallback ->
        C_VolumeMonitorMountRemovedCallback
    wrap_VolumeMonitorMountRemovedCallback _cb _ mount _ = do
        mount' <- (newObject Gio.Mount.Mount) mount
        _cb  mount'

    {- |
    Connect a signal handler for the “@mount-removed@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #mountRemoved callback
    @
    -}
    onVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId
    onVolumeMonitorMountRemoved obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorMountRemovedCallback cb
        cb'' <- mk_VolumeMonitorMountRemovedCallback cb'
        connectSignalFunPtr obj "mount-removed" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@mount-removed@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #mountRemoved callback
    @
    -}
    afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId
    afterVolumeMonitorMountRemoved obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorMountRemovedCallback cb
        cb'' <- mk_VolumeMonitorMountRemovedCallback cb'
        connectSignalFunPtr obj "mount-removed" cb'' SignalConnectAfter

    -- signal VolumeMonitor::volume-added
    {- |
    Emitted when a mountable volume is added to the system.
    -}
    type VolumeMonitorVolumeAddedCallback =
        Gio.Volume.Volume
        {- ^ /@volume@/: a 'GI.Gio.Interfaces.Volume.Volume' that was added. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorVolumeAddedCallback`@.
    noVolumeMonitorVolumeAddedCallback :: Maybe VolumeMonitorVolumeAddedCallback
    noVolumeMonitorVolumeAddedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorVolumeAddedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Volume.Volume ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorVolumeAddedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorVolumeAddedCallback :: C_VolumeMonitorVolumeAddedCallback -> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorVolumeAdded :: VolumeMonitorVolumeAddedCallback -> IO Closure
    genClosure_VolumeMonitorVolumeAdded cb = do
        let cb' = wrap_VolumeMonitorVolumeAddedCallback cb
        mk_VolumeMonitorVolumeAddedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorVolumeAddedCallback` into a `C_VolumeMonitorVolumeAddedCallback`.
    wrap_VolumeMonitorVolumeAddedCallback ::
        VolumeMonitorVolumeAddedCallback ->
        C_VolumeMonitorVolumeAddedCallback
    wrap_VolumeMonitorVolumeAddedCallback _cb _ volume _ = do
        volume' <- (newObject Gio.Volume.Volume) volume
        _cb  volume'

    {- |
    Connect a signal handler for the “@volume-added@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #volumeAdded callback
    @
    -}
    onVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
    onVolumeMonitorVolumeAdded obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorVolumeAddedCallback cb
        cb'' <- mk_VolumeMonitorVolumeAddedCallback cb'
        connectSignalFunPtr obj "volume-added" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@volume-added@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #volumeAdded callback
    @
    -}
    afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
    afterVolumeMonitorVolumeAdded obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorVolumeAddedCallback cb
        cb'' <- mk_VolumeMonitorVolumeAddedCallback cb'
        connectSignalFunPtr obj "volume-added" cb'' SignalConnectAfter

    -- signal VolumeMonitor::volume-changed
    {- |
    Emitted when mountable volume is changed.
    -}
    type VolumeMonitorVolumeChangedCallback =
        Gio.Volume.Volume
        {- ^ /@volume@/: a 'GI.Gio.Interfaces.Volume.Volume' that changed. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorVolumeChangedCallback`@.
    noVolumeMonitorVolumeChangedCallback :: Maybe VolumeMonitorVolumeChangedCallback
    noVolumeMonitorVolumeChangedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorVolumeChangedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Volume.Volume ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorVolumeChangedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorVolumeChangedCallback :: C_VolumeMonitorVolumeChangedCallback -> IO (FunPtr C_VolumeMonitorVolumeChangedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorVolumeChanged :: VolumeMonitorVolumeChangedCallback -> IO Closure
    genClosure_VolumeMonitorVolumeChanged cb = do
        let cb' = wrap_VolumeMonitorVolumeChangedCallback cb
        mk_VolumeMonitorVolumeChangedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorVolumeChangedCallback` into a `C_VolumeMonitorVolumeChangedCallback`.
    wrap_VolumeMonitorVolumeChangedCallback ::
        VolumeMonitorVolumeChangedCallback ->
        C_VolumeMonitorVolumeChangedCallback
    wrap_VolumeMonitorVolumeChangedCallback _cb _ volume _ = do
        volume' <- (newObject Gio.Volume.Volume) volume
        _cb  volume'

    {- |
    Connect a signal handler for the “@volume-changed@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #volumeChanged callback
    @
    -}
    onVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId
    onVolumeMonitorVolumeChanged obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorVolumeChangedCallback cb
        cb'' <- mk_VolumeMonitorVolumeChangedCallback cb'
        connectSignalFunPtr obj "volume-changed" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@volume-changed@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #volumeChanged callback
    @
    -}
    afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId
    afterVolumeMonitorVolumeChanged obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorVolumeChangedCallback cb
        cb'' <- mk_VolumeMonitorVolumeChangedCallback cb'
        connectSignalFunPtr obj "volume-changed" cb'' SignalConnectAfter

    -- signal VolumeMonitor::volume-removed
    {- |
    Emitted when a mountable volume is removed from the system.
    -}
    type VolumeMonitorVolumeRemovedCallback =
        Gio.Volume.Volume
        {- ^ /@volume@/: a 'GI.Gio.Interfaces.Volume.Volume' that was removed. -}
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VolumeMonitorVolumeRemovedCallback`@.
    noVolumeMonitorVolumeRemovedCallback :: Maybe VolumeMonitorVolumeRemovedCallback
    noVolumeMonitorVolumeRemovedCallback = Nothing

    -- | Type for the callback on the (unwrapped) C side.
    type C_VolumeMonitorVolumeRemovedCallback =
        Ptr () ->                               -- object
        Ptr Gio.Volume.Volume ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_VolumeMonitorVolumeRemovedCallback`.
    foreign import ccall "wrapper"
        mk_VolumeMonitorVolumeRemovedCallback :: C_VolumeMonitorVolumeRemovedCallback -> IO (FunPtr C_VolumeMonitorVolumeRemovedCallback)

    -- | Wrap the callback into a `Closure`.
    genClosure_VolumeMonitorVolumeRemoved :: VolumeMonitorVolumeRemovedCallback -> IO Closure
    genClosure_VolumeMonitorVolumeRemoved cb = do
        let cb' = wrap_VolumeMonitorVolumeRemovedCallback cb
        mk_VolumeMonitorVolumeRemovedCallback cb' >>= newCClosure

    -- | Wrap a `VolumeMonitorVolumeRemovedCallback` into a `C_VolumeMonitorVolumeRemovedCallback`.
    wrap_VolumeMonitorVolumeRemovedCallback ::
        VolumeMonitorVolumeRemovedCallback ->
        C_VolumeMonitorVolumeRemovedCallback
    wrap_VolumeMonitorVolumeRemovedCallback _cb _ volume _ = do
        volume' <- (newObject Gio.Volume.Volume) volume
        _cb  volume'

    {- |
    Connect a signal handler for the “@volume-removed@” signal, to be run before the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.on' volumeMonitor #volumeRemoved callback
    @
    -}
    onVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId
    onVolumeMonitorVolumeRemoved obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorVolumeRemovedCallback cb
        cb'' <- mk_VolumeMonitorVolumeRemovedCallback cb'
        connectSignalFunPtr obj "volume-removed" cb'' SignalConnectBefore

    {- |
    Connect a signal handler for the “@volume-removed@” signal, to be run after the default handler.
    When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

    @
    'Data.GI.Base.Signals.after' volumeMonitor #volumeRemoved callback
    @
    -}
    afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId
    afterVolumeMonitorVolumeRemoved obj cb = liftIO $ do
        let cb' = wrap_VolumeMonitorVolumeRemovedCallback cb
        cb'' <- mk_VolumeMonitorVolumeRemovedCallback cb'
        connectSignalFunPtr obj "volume-removed" cb'' SignalConnectAfter

    #if ENABLE_OVERLOADING
    instance O.HasAttributeList VolumeMonitor
    type instance O.AttributeList VolumeMonitor = VolumeMonitorAttributeList
    type VolumeMonitorAttributeList = ('[ ] :: [(Symbol, *)])
    #endif

    #if ENABLE_OVERLOADING
    #endif

    #if ENABLE_OVERLOADING
    data VolumeMonitorDriveChangedSignalInfo
    instance SignalInfo VolumeMonitorDriveChangedSignalInfo where
        type HaskellCallbackType VolumeMonitorDriveChangedSignalInfo = VolumeMonitorDriveChangedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorDriveChangedCallback cb
            cb'' <- mk_VolumeMonitorDriveChangedCallback cb'
            connectSignalFunPtr obj "drive-changed" cb'' connectMode

    data VolumeMonitorDriveConnectedSignalInfo
    instance SignalInfo VolumeMonitorDriveConnectedSignalInfo where
        type HaskellCallbackType VolumeMonitorDriveConnectedSignalInfo = VolumeMonitorDriveConnectedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorDriveConnectedCallback cb
            cb'' <- mk_VolumeMonitorDriveConnectedCallback cb'
            connectSignalFunPtr obj "drive-connected" cb'' connectMode

    data VolumeMonitorDriveDisconnectedSignalInfo
    instance SignalInfo VolumeMonitorDriveDisconnectedSignalInfo where
        type HaskellCallbackType VolumeMonitorDriveDisconnectedSignalInfo = VolumeMonitorDriveDisconnectedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorDriveDisconnectedCallback cb
            cb'' <- mk_VolumeMonitorDriveDisconnectedCallback cb'
            connectSignalFunPtr obj "drive-disconnected" cb'' connectMode

    data VolumeMonitorDriveEjectButtonSignalInfo
    instance SignalInfo VolumeMonitorDriveEjectButtonSignalInfo where
        type HaskellCallbackType VolumeMonitorDriveEjectButtonSignalInfo = VolumeMonitorDriveEjectButtonCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorDriveEjectButtonCallback cb
            cb'' <- mk_VolumeMonitorDriveEjectButtonCallback cb'
            connectSignalFunPtr obj "drive-eject-button" cb'' connectMode

    data VolumeMonitorDriveStopButtonSignalInfo
    instance SignalInfo VolumeMonitorDriveStopButtonSignalInfo where
        type HaskellCallbackType VolumeMonitorDriveStopButtonSignalInfo = VolumeMonitorDriveStopButtonCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorDriveStopButtonCallback cb
            cb'' <- mk_VolumeMonitorDriveStopButtonCallback cb'
            connectSignalFunPtr obj "drive-stop-button" cb'' connectMode

    data VolumeMonitorMountAddedSignalInfo
    instance SignalInfo VolumeMonitorMountAddedSignalInfo where
        type HaskellCallbackType VolumeMonitorMountAddedSignalInfo = VolumeMonitorMountAddedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorMountAddedCallback cb
            cb'' <- mk_VolumeMonitorMountAddedCallback cb'
            connectSignalFunPtr obj "mount-added" cb'' connectMode

    data VolumeMonitorMountChangedSignalInfo
    instance SignalInfo VolumeMonitorMountChangedSignalInfo where
        type HaskellCallbackType VolumeMonitorMountChangedSignalInfo = VolumeMonitorMountChangedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorMountChangedCallback cb
            cb'' <- mk_VolumeMonitorMountChangedCallback cb'
            connectSignalFunPtr obj "mount-changed" cb'' connectMode

    data VolumeMonitorMountPreUnmountSignalInfo
    instance SignalInfo VolumeMonitorMountPreUnmountSignalInfo where
        type HaskellCallbackType VolumeMonitorMountPreUnmountSignalInfo = VolumeMonitorMountPreUnmountCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorMountPreUnmountCallback cb
            cb'' <- mk_VolumeMonitorMountPreUnmountCallback cb'
            connectSignalFunPtr obj "mount-pre-unmount" cb'' connectMode

    data VolumeMonitorMountRemovedSignalInfo
    instance SignalInfo VolumeMonitorMountRemovedSignalInfo where
        type HaskellCallbackType VolumeMonitorMountRemovedSignalInfo = VolumeMonitorMountRemovedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorMountRemovedCallback cb
            cb'' <- mk_VolumeMonitorMountRemovedCallback cb'
            connectSignalFunPtr obj "mount-removed" cb'' connectMode

    data VolumeMonitorVolumeAddedSignalInfo
    instance SignalInfo VolumeMonitorVolumeAddedSignalInfo where
        type HaskellCallbackType VolumeMonitorVolumeAddedSignalInfo = VolumeMonitorVolumeAddedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorVolumeAddedCallback cb
            cb'' <- mk_VolumeMonitorVolumeAddedCallback cb'
            connectSignalFunPtr obj "volume-added" cb'' connectMode

    data VolumeMonitorVolumeChangedSignalInfo
    instance SignalInfo VolumeMonitorVolumeChangedSignalInfo where
        type HaskellCallbackType VolumeMonitorVolumeChangedSignalInfo = VolumeMonitorVolumeChangedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorVolumeChangedCallback cb
            cb'' <- mk_VolumeMonitorVolumeChangedCallback cb'
            connectSignalFunPtr obj "volume-changed" cb'' connectMode

    data VolumeMonitorVolumeRemovedSignalInfo
    instance SignalInfo VolumeMonitorVolumeRemovedSignalInfo where
        type HaskellCallbackType VolumeMonitorVolumeRemovedSignalInfo = VolumeMonitorVolumeRemovedCallback
        connectSignal _ obj cb connectMode = do
            let cb' = wrap_VolumeMonitorVolumeRemovedCallback cb
            cb'' <- mk_VolumeMonitorVolumeRemovedCallback cb'
            connectSignalFunPtr obj "volume-removed" cb'' connectMode

    type instance O.SignalList VolumeMonitor = VolumeMonitorSignalList
    type VolumeMonitorSignalList = ('[ '("driveChanged", VolumeMonitorDriveChangedSignalInfo), '("driveConnected", VolumeMonitorDriveConnectedSignalInfo), '("driveDisconnected", VolumeMonitorDriveDisconnectedSignalInfo), '("driveEjectButton", VolumeMonitorDriveEjectButtonSignalInfo), '("driveStopButton", VolumeMonitorDriveStopButtonSignalInfo), '("mountAdded", VolumeMonitorMountAddedSignalInfo), '("mountChanged", VolumeMonitorMountChangedSignalInfo), '("mountPreUnmount", VolumeMonitorMountPreUnmountSignalInfo), '("mountRemoved", VolumeMonitorMountRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("volumeAdded", VolumeMonitorVolumeAddedSignalInfo), '("volumeChanged", VolumeMonitorVolumeChangedSignalInfo), '("volumeRemoved", VolumeMonitorVolumeRemovedSignalInfo)] :: [(Symbol, *)])

    #endif

    -- method VolumeMonitor::get_connected_drives
    -- method type : OrdinaryMethod
    -- Args : [Arg {argCName = "volume_monitor", argType = TInterface (Name {namespace = "Gio", name = "VolumeMonitor"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GVolumeMonitor.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
    -- Lengths : []
    -- returnType : Just (TGList (TInterface (Name {namespace = "Gio", name = "Drive"})))
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_volume_monitor_get_connected_drives" g_volume_monitor_get_connected_drives ::
        Ptr VolumeMonitor ->                    -- volume_monitor : TInterface (Name {namespace = "Gio", name = "VolumeMonitor"})
        IO (Ptr (GList (Ptr Gio.Drive.Drive)))

    {- |
    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 'GI.GObject.Objects.Object.objectUnref'.
    -}
    volumeMonitorGetConnectedDrives ::
        (B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
        a
        {- ^ /@volumeMonitor@/: a 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor'. -}
        -> m [Gio.Drive.Drive]
        {- ^ __Returns:__ a 'GI.GLib.Structs.List.List' of connected 'GI.Gio.Interfaces.Drive.Drive' objects. -}
    volumeMonitorGetConnectedDrives volumeMonitor = liftIO $ do
        volumeMonitor' <- unsafeManagedPtrCastPtr volumeMonitor
        result <- g_volume_monitor_get_connected_drives volumeMonitor'
        result' <- unpackGList result
        result'' <- mapM (wrapObject Gio.Drive.Drive) result'
        g_list_free result
        touchManagedPtr volumeMonitor
        return result''

    #if ENABLE_OVERLOADING
    data VolumeMonitorGetConnectedDrivesMethodInfo
    instance (signature ~ (m [Gio.Drive.Drive]), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetConnectedDrivesMethodInfo a signature where
        overloadedMethod _ = volumeMonitorGetConnectedDrives

    #endif

    -- method VolumeMonitor::get_mount_for_uuid
    -- method type : OrdinaryMethod
    -- Args : [Arg {argCName = "volume_monitor", argType = TInterface (Name {namespace = "Gio", name = "VolumeMonitor"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GVolumeMonitor.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uuid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the UUID to look for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
    -- Lengths : []
    -- returnType : Just (TInterface (Name {namespace = "Gio", name = "Mount"}))
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_volume_monitor_get_mount_for_uuid" g_volume_monitor_get_mount_for_uuid ::
        Ptr VolumeMonitor ->                    -- volume_monitor : TInterface (Name {namespace = "Gio", name = "VolumeMonitor"})
        CString ->                              -- uuid : TBasicType TUTF8
        IO (Ptr Gio.Mount.Mount)

    {- |
    Finds a 'GI.Gio.Interfaces.Mount.Mount' object by its UUID (see 'GI.Gio.Interfaces.Mount.mountGetUuid')
    -}
    volumeMonitorGetMountForUuid ::
        (B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
        a
        {- ^ /@volumeMonitor@/: a 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor'. -}
        -> T.Text
        {- ^ /@uuid@/: the UUID to look for -}
        -> m Gio.Mount.Mount
        {- ^ __Returns:__ a 'GI.Gio.Interfaces.Mount.Mount' or 'Nothing' if no such mount is available.
        Free the returned object with 'GI.GObject.Objects.Object.objectUnref'. -}
    volumeMonitorGetMountForUuid volumeMonitor uuid = liftIO $ do
        volumeMonitor' <- unsafeManagedPtrCastPtr volumeMonitor
        uuid' <- textToCString uuid
        result <- g_volume_monitor_get_mount_for_uuid volumeMonitor' uuid'
        checkUnexpectedReturnNULL "volumeMonitorGetMountForUuid" result
        result' <- (wrapObject Gio.Mount.Mount) result
        touchManagedPtr volumeMonitor
        freeMem uuid'
        return result'

    #if ENABLE_OVERLOADING
    data VolumeMonitorGetMountForUuidMethodInfo
    instance (signature ~ (T.Text -> m Gio.Mount.Mount), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetMountForUuidMethodInfo a signature where
        overloadedMethod _ = volumeMonitorGetMountForUuid

    #endif

    -- method VolumeMonitor::get_mounts
    -- method type : OrdinaryMethod
    -- Args : [Arg {argCName = "volume_monitor", argType = TInterface (Name {namespace = "Gio", name = "VolumeMonitor"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GVolumeMonitor.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
    -- Lengths : []
    -- returnType : Just (TGList (TInterface (Name {namespace = "Gio", name = "Mount"})))
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_volume_monitor_get_mounts" g_volume_monitor_get_mounts ::
        Ptr VolumeMonitor ->                    -- volume_monitor : TInterface (Name {namespace = "Gio", name = "VolumeMonitor"})
        IO (Ptr (GList (Ptr Gio.Mount.Mount)))

    {- |
    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 'GI.GObject.Objects.Object.objectUnref'.
    -}
    volumeMonitorGetMounts ::
        (B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
        a
        {- ^ /@volumeMonitor@/: a 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor'. -}
        -> m [Gio.Mount.Mount]
        {- ^ __Returns:__ a 'GI.GLib.Structs.List.List' of 'GI.Gio.Interfaces.Mount.Mount' objects. -}
    volumeMonitorGetMounts volumeMonitor = liftIO $ do
        volumeMonitor' <- unsafeManagedPtrCastPtr volumeMonitor
        result <- g_volume_monitor_get_mounts volumeMonitor'
        result' <- unpackGList result
        result'' <- mapM (wrapObject Gio.Mount.Mount) result'
        g_list_free result
        touchManagedPtr volumeMonitor
        return result''

    #if ENABLE_OVERLOADING
    data VolumeMonitorGetMountsMethodInfo
    instance (signature ~ (m [Gio.Mount.Mount]), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetMountsMethodInfo a signature where
        overloadedMethod _ = volumeMonitorGetMounts

    #endif

    -- method VolumeMonitor::get_volume_for_uuid
    -- method type : OrdinaryMethod
    -- Args : [Arg {argCName = "volume_monitor", argType = TInterface (Name {namespace = "Gio", name = "VolumeMonitor"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GVolumeMonitor.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uuid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the UUID to look for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
    -- Lengths : []
    -- returnType : Just (TInterface (Name {namespace = "Gio", name = "Volume"}))
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_volume_monitor_get_volume_for_uuid" g_volume_monitor_get_volume_for_uuid ::
        Ptr VolumeMonitor ->                    -- volume_monitor : TInterface (Name {namespace = "Gio", name = "VolumeMonitor"})
        CString ->                              -- uuid : TBasicType TUTF8
        IO (Ptr Gio.Volume.Volume)

    {- |
    Finds a 'GI.Gio.Interfaces.Volume.Volume' object by its UUID (see 'GI.Gio.Interfaces.Volume.volumeGetUuid')
    -}
    volumeMonitorGetVolumeForUuid ::
        (B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
        a
        {- ^ /@volumeMonitor@/: a 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor'. -}
        -> T.Text
        {- ^ /@uuid@/: the UUID to look for -}
        -> m Gio.Volume.Volume
        {- ^ __Returns:__ a 'GI.Gio.Interfaces.Volume.Volume' or 'Nothing' if no such volume is available.
        Free the returned object with 'GI.GObject.Objects.Object.objectUnref'. -}
    volumeMonitorGetVolumeForUuid volumeMonitor uuid = liftIO $ do
        volumeMonitor' <- unsafeManagedPtrCastPtr volumeMonitor
        uuid' <- textToCString uuid
        result <- g_volume_monitor_get_volume_for_uuid volumeMonitor' uuid'
        checkUnexpectedReturnNULL "volumeMonitorGetVolumeForUuid" result
        result' <- (wrapObject Gio.Volume.Volume) result
        touchManagedPtr volumeMonitor
        freeMem uuid'
        return result'

    #if ENABLE_OVERLOADING
    data VolumeMonitorGetVolumeForUuidMethodInfo
    instance (signature ~ (T.Text -> m Gio.Volume.Volume), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetVolumeForUuidMethodInfo a signature where
        overloadedMethod _ = volumeMonitorGetVolumeForUuid

    #endif

    -- method VolumeMonitor::get_volumes
    -- method type : OrdinaryMethod
    -- Args : [Arg {argCName = "volume_monitor", argType = TInterface (Name {namespace = "Gio", name = "VolumeMonitor"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GVolumeMonitor.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
    -- Lengths : []
    -- returnType : Just (TGList (TInterface (Name {namespace = "Gio", name = "Volume"})))
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_volume_monitor_get_volumes" g_volume_monitor_get_volumes ::
        Ptr VolumeMonitor ->                    -- volume_monitor : TInterface (Name {namespace = "Gio", name = "VolumeMonitor"})
        IO (Ptr (GList (Ptr Gio.Volume.Volume)))

    {- |
    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 'GI.GObject.Objects.Object.objectUnref'.
    -}
    volumeMonitorGetVolumes ::
        (B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
        a
        {- ^ /@volumeMonitor@/: a 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor'. -}
        -> m [Gio.Volume.Volume]
        {- ^ __Returns:__ a 'GI.GLib.Structs.List.List' of 'GI.Gio.Interfaces.Volume.Volume' objects. -}
    volumeMonitorGetVolumes volumeMonitor = liftIO $ do
        volumeMonitor' <- unsafeManagedPtrCastPtr volumeMonitor
        result <- g_volume_monitor_get_volumes volumeMonitor'
        result' <- unpackGList result
        result'' <- mapM (wrapObject Gio.Volume.Volume) result'
        g_list_free result
        touchManagedPtr volumeMonitor
        return result''

    #if ENABLE_OVERLOADING
    data VolumeMonitorGetVolumesMethodInfo
    instance (signature ~ (m [Gio.Volume.Volume]), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetVolumesMethodInfo a signature where
        overloadedMethod _ = volumeMonitorGetVolumes

    #endif

    -- method VolumeMonitor::adopt_orphan_mount
    -- method type : MemberFunction
    -- Args : [Arg {argCName = "mount", argType = TInterface (Name {namespace = "Gio", name = "Mount"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GMount object to find a parent for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
    -- Lengths : []
    -- returnType : Just (TInterface (Name {namespace = "Gio", name = "Volume"}))
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_volume_monitor_adopt_orphan_mount" g_volume_monitor_adopt_orphan_mount ::
        Ptr Gio.Mount.Mount ->                  -- mount : TInterface (Name {namespace = "Gio", name = "Mount"})
        IO (Ptr Gio.Volume.Volume)

    {-# DEPRECATED volumeMonitorAdoptOrphanMount ["(Since version 2.20)","Instead of using this function, 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor'","implementations should instead create shadow mounts with the URI of","the mount they intend to adopt. See the proxy volume monitor in","gvfs for an example of this. Also see 'GI.Gio.Interfaces.Mount.mountIsShadowed',","'GI.Gio.Interfaces.Mount.mountShadow' and 'GI.Gio.Interfaces.Mount.mountUnshadow' functions."] #-}
    {- |
    This function should be called by any 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor'
    implementation when a new 'GI.Gio.Interfaces.Mount.Mount' object is created that is not
    associated with a 'GI.Gio.Interfaces.Volume.Volume' object. It must be called just before
    emitting the /@mountAdded@/ signal.

    If the return value is not 'Nothing', the caller must associate the
    returned 'GI.Gio.Interfaces.Volume.Volume' object with the 'GI.Gio.Interfaces.Mount.Mount'. This involves returning
    it in its 'GI.Gio.Interfaces.Mount.mountGetVolume' implementation. The caller must
    also listen for the \"removed\" signal on the returned object
    and give up its reference when handling that signal

    Similarly, if implementing 'GI.Gio.Objects.VolumeMonitor.volumeMonitorAdoptOrphanMount',
    the implementor must take a reference to /@mount@/ and return it in
    its 'GI.Gio.Interfaces.Volume.volumeGetMount' implemented. Also, the implementor must
    listen for the \"unmounted\" signal on /@mount@/ and give up its
    reference upon handling that signal.

    There are two main use cases for this function.

    One is when implementing a user space file system driver that reads
    blocks of a block device that is already represented by the native
    volume monitor (for example a CD Audio file system driver). Such
    a driver will generate its own 'GI.Gio.Interfaces.Mount.Mount' object that needs to be
    associated with the 'GI.Gio.Interfaces.Volume.Volume' object that represents the volume.

    The other is for implementing a 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor' whose sole purpose
    is to return 'GI.Gio.Interfaces.Volume.Volume' objects representing entries in the users
    \"favorite servers\" list or similar.
    -}
    volumeMonitorAdoptOrphanMount ::
        (B.CallStack.HasCallStack, MonadIO m, Gio.Mount.IsMount a) =>
        a
        {- ^ /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' object to find a parent for -}
        -> m Gio.Volume.Volume
        {- ^ __Returns:__ the 'GI.Gio.Interfaces.Volume.Volume' object that is the parent for /@mount@/ or 'Nothing'
    if no wants to adopt the 'GI.Gio.Interfaces.Mount.Mount'. -}
    volumeMonitorAdoptOrphanMount mount = liftIO $ do
        mount' <- unsafeManagedPtrCastPtr mount
        result <- g_volume_monitor_adopt_orphan_mount mount'
        checkUnexpectedReturnNULL "volumeMonitorAdoptOrphanMount" result
        result' <- (wrapObject Gio.Volume.Volume) result
        touchManagedPtr mount
        return result'

    #if ENABLE_OVERLOADING
    #endif

    -- method VolumeMonitor::get
    -- method type : MemberFunction
    -- Args : []
    -- Lengths : []
    -- returnType : Just (TInterface (Name {namespace = "Gio", name = "VolumeMonitor"}))
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_volume_monitor_get" g_volume_monitor_get ::
        IO (Ptr VolumeMonitor)

    {- |
    Gets the volume monitor used by gio.
    -}
    volumeMonitorGet ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        m VolumeMonitor
        {- ^ __Returns:__ a reference to the 'GI.Gio.Objects.VolumeMonitor.VolumeMonitor' used by gio. Call
       'GI.GObject.Objects.Object.objectUnref' when done with it. -}
    volumeMonitorGet  = liftIO $ do
        result <- g_volume_monitor_get
        checkUnexpectedReturnNULL "volumeMonitorGet" result
        result' <- (wrapObject VolumeMonitor) result
        return result'

    #if ENABLE_OVERLOADING
    #endif