{-# LINE 2 "./System/GIO/Volumes/Drive.chs" #-}
module System.GIO.Volumes.Drive (
Drive(..),
DriveClass,
DriveStartStopType (..),
DriveStartFlags (..),
driveGetName,
driveGetIcon,
driveHasVolumes,
driveGetVolumes,
driveCanEject,
driveGetStartStopType,
driveCanStart,
driveCanStartDegraded,
driveCanStop,
driveCanPollForMedia,
drivePollForMedia,
driveHasMedia,
driveIsMediaCheckAutomatic,
driveIsMediaRemovable,
driveEjectWithOperation,
driveEjectWithOperationFinish,
driveStart,
driveStartFinish,
driveStopFinish,
driveEnumerateIdentifiers,
driveGetIdentifier,
driveChanged,
driveDisconnected,
driveEjectButton,
driveStopButton,
) where
import Control.Monad
import Data.Maybe (fromMaybe)
import System.GIO.Enums
import System.Glib.Attributes
import System.Glib.FFI
import System.Glib.Flags
import System.Glib.GError
import System.Glib.GList
import System.Glib.GObject
import System.Glib.Properties
import System.Glib.Signals
import System.Glib.UTFString
import System.GIO.Async.AsyncResult
{-# LINE 113 "./System/GIO/Volumes/Drive.chs" #-}
import System.GIO.Signals
{-# LINE 114 "./System/GIO/Volumes/Drive.chs" #-}
import System.GIO.Types
{-# LINE 115 "./System/GIO/Volumes/Drive.chs" #-}
{-# LINE 117 "./System/GIO/Volumes/Drive.chs" #-}
driveGetName :: (DriveClass drive, GlibString string) => drive
-> IO string
driveGetName :: forall drive string.
(DriveClass drive, GlibString string) =>
drive -> IO string
driveGetName drive
drive =
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO (Ptr CChar)) -> IO (Ptr CChar)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO (Ptr CChar)) -> IO (Ptr CChar))
-> (Ptr Drive -> IO (Ptr CChar)) -> IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO (Ptr CChar)
g_drive_get_name Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr CChar -> IO string
forall s. GlibString s => Ptr CChar -> IO s
readUTFString
driveGetIcon :: DriveClass drive => drive
-> IO Icon
driveGetIcon :: forall drive. DriveClass drive => drive -> IO Icon
driveGetIcon drive
drive =
(ForeignPtr Icon -> Icon, FinalizerPtr Icon)
-> IO (Ptr Icon) -> IO Icon
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr Icon -> Icon, FinalizerPtr Icon)
forall {a}. (ForeignPtr Icon -> Icon, FinalizerPtr a)
mkIcon (IO (Ptr Icon) -> IO Icon) -> IO (Ptr Icon) -> IO Icon
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO (Ptr Icon)) -> IO (Ptr Icon)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO (Ptr Icon)) -> IO (Ptr Icon))
-> (Ptr Drive -> IO (Ptr Icon)) -> IO (Ptr Icon)
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO (Ptr Icon)
g_drive_get_icon Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveHasVolumes :: DriveClass drive => drive
-> IO Bool
driveHasVolumes :: forall drive. DriveClass drive => drive -> IO Bool
driveHasVolumes drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_has_volumes Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveGetVolumes :: DriveClass drive => drive
-> IO [Volume]
driveGetVolumes :: forall drive. DriveClass drive => drive -> IO [Volume]
driveGetVolumes drive
drive = do
Ptr ()
glistPtr <- (\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO (Ptr ())) -> IO (Ptr ())
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr Drive -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO (Ptr ())
g_drive_get_volumes Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
[Ptr Volume]
volumePtrs <- Ptr () -> IO [Ptr Volume]
forall a. Ptr () -> IO [Ptr a]
fromGList Ptr ()
glistPtr
(Ptr Volume -> IO Volume) -> [Ptr Volume] -> IO [Volume]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ForeignPtr Volume -> Volume, FinalizerPtr Volume)
-> IO (Ptr Volume) -> IO Volume
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr Volume -> Volume, FinalizerPtr Volume)
forall {a}. (ForeignPtr Volume -> Volume, FinalizerPtr a)
mkVolume (IO (Ptr Volume) -> IO Volume)
-> (Ptr Volume -> IO (Ptr Volume)) -> Ptr Volume -> IO Volume
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr Volume -> IO (Ptr Volume)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return) [Ptr Volume]
volumePtrs
driveCanEject :: DriveClass drive => drive
-> IO Bool
driveCanEject :: forall drive. DriveClass drive => drive -> IO Bool
driveCanEject drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_can_eject Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveGetStartStopType :: DriveClass drive => drive
-> IO DriveStartStopType
driveGetStartStopType :: forall drive. DriveClass drive => drive -> IO DriveStartStopType
driveGetStartStopType drive
drive =
(CInt -> DriveStartStopType) -> IO CInt -> IO DriveStartStopType
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> DriveStartStopType
forall a. Enum a => Int -> a
toEnum (Int -> DriveStartStopType)
-> (CInt -> Int) -> CInt -> DriveStartStopType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (IO CInt -> IO DriveStartStopType)
-> IO CInt -> IO DriveStartStopType
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_get_start_stop_type Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveCanStart :: DriveClass drive => drive
-> IO Bool
driveCanStart :: forall drive. DriveClass drive => drive -> IO Bool
driveCanStart drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_can_start Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveCanStartDegraded :: DriveClass drive => drive
-> IO Bool
driveCanStartDegraded :: forall drive. DriveClass drive => drive -> IO Bool
driveCanStartDegraded drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_can_start_degraded Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveCanStop :: DriveClass drive => drive
-> IO Bool
driveCanStop :: forall drive. DriveClass drive => drive -> IO Bool
driveCanStop drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_can_stop Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveCanPollForMedia :: DriveClass drive => drive
-> IO Bool
driveCanPollForMedia :: forall drive. DriveClass drive => drive -> IO Bool
driveCanPollForMedia drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_can_poll_for_media Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
drivePollForMedia :: DriveClass drive => drive
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
drivePollForMedia :: forall drive.
DriveClass drive =>
drive -> Maybe Cancellable -> AsyncReadyCallback -> IO ()
drivePollForMedia drive
drive Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(Drive ForeignPtr Drive
arg1) (Cancellable ForeignPtr Cancellable
arg2) GAsyncReadyCallback
arg3 Ptr ()
arg4 -> ForeignPtr Drive -> (Ptr Drive -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO ()) -> IO ()) -> (Ptr Drive -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr Drive
-> Ptr Cancellable -> GAsyncReadyCallback -> Ptr () -> IO ()
g_drive_poll_for_media Ptr Drive
argPtr1 Ptr Cancellable
argPtr2 GAsyncReadyCallback
arg3 Ptr ()
arg4)
{-# LINE 204 "./System/GIO/Volumes/Drive.chs" #-}
(drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
drivePollForMediaFinish :: DriveClass drive => drive
-> AsyncResult
-> IO ()
drivePollForMediaFinish :: forall drive. DriveClass drive => drive -> AsyncResult -> IO ()
drivePollForMediaFinish drive
drive AsyncResult
result =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(Drive ForeignPtr Drive
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr Drive -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_drive_poll_for_media_finish Ptr Drive
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 218 "./System/GIO/Volumes/Drive.chs" #-}
(drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
AsyncResult
result
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
driveHasMedia :: DriveClass drive => drive
-> IO Bool
driveHasMedia :: forall drive. DriveClass drive => drive -> IO Bool
driveHasMedia drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_has_media Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveIsMediaCheckAutomatic :: DriveClass drive => drive
-> IO Bool
driveIsMediaCheckAutomatic :: forall drive. DriveClass drive => drive -> IO Bool
driveIsMediaCheckAutomatic drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_is_media_check_automatic Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveIsMediaRemovable :: DriveClass drive => drive
-> IO Bool
driveIsMediaRemovable :: forall drive. DriveClass drive => drive -> IO Bool
driveIsMediaRemovable drive
drive =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO CInt
g_drive_is_media_removable Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
driveEjectWithOperation :: DriveClass drive
=> drive
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
driveEjectWithOperation :: forall drive.
DriveClass drive =>
drive
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
driveEjectWithOperation drive
drive [MountUnmountFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(Drive ForeignPtr Drive
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr Drive -> (Ptr Drive -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO ()) -> IO ()) -> (Ptr Drive -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr Drive
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_drive_eject_with_operation Ptr Drive
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 258 "./System/GIO/Volumes/Drive.chs" #-}
(drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([MountUnmountFlags] -> Int) -> [MountUnmountFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [MountUnmountFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [MountUnmountFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
driveEjectWithOperationFinish :: DriveClass drive
=> drive
-> AsyncResult
-> IO ()
driveEjectWithOperationFinish :: forall drive. DriveClass drive => drive -> AsyncResult -> IO ()
driveEjectWithOperationFinish drive
drive AsyncResult
result =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(Drive ForeignPtr Drive
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr Drive -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_drive_eject_with_operation_finish Ptr Drive
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 276 "./System/GIO/Volumes/Drive.chs" #-}
(drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
AsyncResult
result
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
driveStart :: DriveClass drive
=> drive
-> [DriveStartFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
driveStart :: forall drive.
DriveClass drive =>
drive
-> [DriveStartFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
driveStart drive
drive [DriveStartFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(Drive ForeignPtr Drive
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr Drive -> (Ptr Drive -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO ()) -> IO ()) -> (Ptr Drive -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr Drive
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_drive_start Ptr Drive
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 295 "./System/GIO/Volumes/Drive.chs" #-}
(drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([DriveStartFlags] -> Int) -> [DriveStartFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [DriveStartFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [DriveStartFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
driveStartFinish :: DriveClass drive
=> drive
-> AsyncResult
-> IO ()
driveStartFinish :: forall drive. DriveClass drive => drive -> AsyncResult -> IO ()
driveStartFinish drive
drive AsyncResult
result =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(Drive ForeignPtr Drive
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr Drive -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_drive_start_finish Ptr Drive
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 312 "./System/GIO/Volumes/Drive.chs" #-}
(drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
AsyncResult
result
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
driveStop :: DriveClass drive
=> drive
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
driveStop :: forall drive.
DriveClass drive =>
drive
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
driveStop drive
drive [MountUnmountFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(Drive ForeignPtr Drive
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr Drive -> (Ptr Drive -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO ()) -> IO ()) -> (Ptr Drive -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr Drive
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_drive_stop Ptr Drive
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 331 "./System/GIO/Volumes/Drive.chs" #-}
(drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([MountUnmountFlags] -> Int) -> [MountUnmountFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [MountUnmountFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [MountUnmountFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
driveStopFinish :: DriveClass drive
=> drive
-> AsyncResult
-> IO ()
driveStopFinish :: forall drive. DriveClass drive => drive -> AsyncResult -> IO ()
driveStopFinish drive
drive AsyncResult
result =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(Drive ForeignPtr Drive
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr Drive -> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO CInt) -> IO CInt)
-> (Ptr Drive -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr Drive -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_drive_stop_finish Ptr Drive
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 348 "./System/GIO/Volumes/Drive.chs" #-}
(drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
AsyncResult
result
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
driveEnumerateIdentifiers :: (DriveClass drive, GlibString string) => drive
-> IO [string]
driveEnumerateIdentifiers :: forall drive string.
(DriveClass drive, GlibString string) =>
drive -> IO [string]
driveEnumerateIdentifiers drive
drive =
(\(Drive ForeignPtr Drive
arg1) -> ForeignPtr Drive
-> (Ptr Drive -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar))
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar)))
-> (Ptr Drive -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar))
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> IO (Ptr (Ptr CChar))
g_drive_enumerate_identifiers Ptr Drive
argPtr1) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive)
IO (Ptr (Ptr CChar))
-> (Ptr (Ptr CChar) -> IO [string]) -> IO [string]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr (Ptr CChar) -> IO [string]
forall s. GlibString s => Ptr (Ptr CChar) -> IO [s]
readUTFStringArray0
driveGetIdentifier :: (DriveClass drive, GlibString string) => drive
-> string
-> IO string
driveGetIdentifier :: forall drive string.
(DriveClass drive, GlibString string) =>
drive -> string -> IO string
driveGetIdentifier drive
drive string
kind =
string -> (Ptr CChar -> IO string) -> IO string
forall a. string -> (Ptr CChar -> IO a) -> IO a
forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
withUTFString string
kind ((Ptr CChar -> IO string) -> IO string)
-> (Ptr CChar -> IO string) -> IO string
forall a b. (a -> b) -> a -> b
$ \ Ptr CChar
kindPtr ->
(\(Drive ForeignPtr Drive
arg1) Ptr CChar
arg2 -> ForeignPtr Drive -> (Ptr Drive -> IO (Ptr CChar)) -> IO (Ptr CChar)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Drive
arg1 ((Ptr Drive -> IO (Ptr CChar)) -> IO (Ptr CChar))
-> (Ptr Drive -> IO (Ptr CChar)) -> IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ \Ptr Drive
argPtr1 ->Ptr Drive -> Ptr CChar -> IO (Ptr CChar)
g_drive_get_identifier Ptr Drive
argPtr1 Ptr CChar
arg2) (drive -> Drive
forall o. DriveClass o => o -> Drive
toDrive drive
drive) Ptr CChar
kindPtr
IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr CChar -> IO string
forall s. GlibString s => Ptr CChar -> IO s
readUTFString
driveChanged :: DriveClass drive => Signal drive (Drive -> IO ())
driveChanged :: forall drive. DriveClass drive => Signal drive (Drive -> IO ())
driveChanged = (Bool -> drive -> (Drive -> IO ()) -> IO (ConnectId drive))
-> Signal drive (Drive -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (SignalName
-> Bool -> drive -> (Drive -> IO ()) -> IO (ConnectId drive)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
SignalName -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT__NONE SignalName
"drive-changed")
driveDisconnected :: DriveClass drive => Signal drive (Drive -> IO ())
driveDisconnected :: forall drive. DriveClass drive => Signal drive (Drive -> IO ())
driveDisconnected = (Bool -> drive -> (Drive -> IO ()) -> IO (ConnectId drive))
-> Signal drive (Drive -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (SignalName
-> Bool -> drive -> (Drive -> IO ()) -> IO (ConnectId drive)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
SignalName -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT__NONE SignalName
"drive-disconnected")
driveEjectButton :: DriveClass drive => Signal drive (Drive -> IO ())
driveEjectButton :: forall drive. DriveClass drive => Signal drive (Drive -> IO ())
driveEjectButton = (Bool -> drive -> (Drive -> IO ()) -> IO (ConnectId drive))
-> Signal drive (Drive -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (SignalName
-> Bool -> drive -> (Drive -> IO ()) -> IO (ConnectId drive)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
SignalName -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT__NONE SignalName
"drive-eject-button")
driveStopButton :: DriveClass drive => Signal drive (Drive -> IO ())
driveStopButton :: forall drive. DriveClass drive => Signal drive (Drive -> IO ())
driveStopButton = (Bool -> drive -> (Drive -> IO ()) -> IO (ConnectId drive))
-> Signal drive (Drive -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (SignalName
-> Bool -> drive -> (Drive -> IO ()) -> IO (ConnectId drive)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
SignalName -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT__NONE SignalName
"drive-stop-button")
foreign import ccall safe "g_drive_get_name"
g_drive_get_name :: ((Ptr Drive) -> (IO (Ptr CChar)))
foreign import ccall safe "g_drive_get_icon"
g_drive_get_icon :: ((Ptr Drive) -> (IO (Ptr Icon)))
foreign import ccall safe "g_drive_has_volumes"
g_drive_has_volumes :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_get_volumes"
g_drive_get_volumes :: ((Ptr Drive) -> (IO (Ptr ())))
foreign import ccall safe "g_drive_can_eject"
g_drive_can_eject :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_get_start_stop_type"
g_drive_get_start_stop_type :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_can_start"
g_drive_can_start :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_can_start_degraded"
g_drive_can_start_degraded :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_can_stop"
g_drive_can_stop :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_can_poll_for_media"
g_drive_can_poll_for_media :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_poll_for_media"
g_drive_poll_for_media :: ((Ptr Drive) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))
foreign import ccall safe "g_drive_poll_for_media_finish"
g_drive_poll_for_media_finish :: ((Ptr Drive) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_drive_has_media"
g_drive_has_media :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_is_media_check_automatic"
g_drive_is_media_check_automatic :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_is_media_removable"
g_drive_is_media_removable :: ((Ptr Drive) -> (IO CInt))
foreign import ccall safe "g_drive_eject_with_operation"
g_drive_eject_with_operation :: ((Ptr Drive) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_drive_eject_with_operation_finish"
g_drive_eject_with_operation_finish :: ((Ptr Drive) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_drive_start"
g_drive_start :: ((Ptr Drive) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_drive_start_finish"
g_drive_start_finish :: ((Ptr Drive) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_drive_stop"
g_drive_stop :: ((Ptr Drive) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_drive_stop_finish"
g_drive_stop_finish :: ((Ptr Drive) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_drive_enumerate_identifiers"
g_drive_enumerate_identifiers :: ((Ptr Drive) -> (IO (Ptr (Ptr CChar))))
foreign import ccall safe "g_drive_get_identifier"
g_drive_get_identifier :: ((Ptr Drive) -> ((Ptr CChar) -> (IO (Ptr CChar))))