{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Structs.UnixMountPoint
(
UnixMountPoint(..) ,
noUnixMountPoint ,
#if defined(ENABLE_OVERLOADING)
ResolveUnixMountPointMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
UnixMountPointCompareMethodInfo ,
#endif
unixMountPointCompare ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointCopyMethodInfo ,
#endif
unixMountPointCopy ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointFreeMethodInfo ,
#endif
unixMountPointFree ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointGetDevicePathMethodInfo ,
#endif
unixMountPointGetDevicePath ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointGetFsTypeMethodInfo ,
#endif
unixMountPointGetFsType ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointGetMountPathMethodInfo ,
#endif
unixMountPointGetMountPath ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointGetOptionsMethodInfo ,
#endif
unixMountPointGetOptions ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointGuessCanEjectMethodInfo ,
#endif
unixMountPointGuessCanEject ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointGuessIconMethodInfo ,
#endif
unixMountPointGuessIcon ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointGuessNameMethodInfo ,
#endif
unixMountPointGuessName ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointGuessSymbolicIconMethodInfo,
#endif
unixMountPointGuessSymbolicIcon ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointIsLoopbackMethodInfo ,
#endif
unixMountPointIsLoopback ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointIsReadonlyMethodInfo ,
#endif
unixMountPointIsReadonly ,
#if defined(ENABLE_OVERLOADING)
UnixMountPointIsUserMountableMethodInfo ,
#endif
unixMountPointIsUserMountable ,
) 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.GClosure as B.GClosure
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.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
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 GHC.OverloadedLabels as OL
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Icon as Gio.Icon
newtype UnixMountPoint = UnixMountPoint (ManagedPtr UnixMountPoint)
deriving (UnixMountPoint -> UnixMountPoint -> Bool
(UnixMountPoint -> UnixMountPoint -> Bool)
-> (UnixMountPoint -> UnixMountPoint -> Bool) -> Eq UnixMountPoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnixMountPoint -> UnixMountPoint -> Bool
$c/= :: UnixMountPoint -> UnixMountPoint -> Bool
== :: UnixMountPoint -> UnixMountPoint -> Bool
$c== :: UnixMountPoint -> UnixMountPoint -> Bool
Eq)
foreign import ccall "g_unix_mount_point_get_type" c_g_unix_mount_point_get_type ::
IO GType
instance BoxedObject UnixMountPoint where
boxedType :: UnixMountPoint -> IO GType
boxedType _ = IO GType
c_g_unix_mount_point_get_type
instance B.GValue.IsGValue UnixMountPoint where
toGValue :: UnixMountPoint -> IO GValue
toGValue o :: UnixMountPoint
o = do
GType
gtype <- IO GType
c_g_unix_mount_point_get_type
UnixMountPoint -> (Ptr UnixMountPoint -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr UnixMountPoint
o (GType
-> (GValue -> Ptr UnixMountPoint -> IO ())
-> Ptr UnixMountPoint
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr UnixMountPoint -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
fromGValue :: GValue -> IO UnixMountPoint
fromGValue gv :: GValue
gv = do
Ptr UnixMountPoint
ptr <- GValue -> IO (Ptr UnixMountPoint)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr UnixMountPoint)
(ManagedPtr UnixMountPoint -> UnixMountPoint)
-> Ptr UnixMountPoint -> IO UnixMountPoint
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr UnixMountPoint -> UnixMountPoint
UnixMountPoint Ptr UnixMountPoint
ptr
noUnixMountPoint :: Maybe UnixMountPoint
noUnixMountPoint :: Maybe UnixMountPoint
noUnixMountPoint = Maybe UnixMountPoint
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList UnixMountPoint
type instance O.AttributeList UnixMountPoint = UnixMountPointAttributeList
type UnixMountPointAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "g_unix_mount_point_compare" g_unix_mount_point_compare ::
Ptr UnixMountPoint ->
Ptr UnixMountPoint ->
IO Int32
unixMountPointCompare ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> UnixMountPoint
-> m Int32
unixMountPointCompare :: UnixMountPoint -> UnixMountPoint -> m Int32
unixMountPointCompare mount1 :: UnixMountPoint
mount1 mount2 :: UnixMountPoint
mount2 = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mount1' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mount1
Ptr UnixMountPoint
mount2' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mount2
Int32
result <- Ptr UnixMountPoint -> Ptr UnixMountPoint -> IO Int32
g_unix_mount_point_compare Ptr UnixMountPoint
mount1' Ptr UnixMountPoint
mount2'
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mount1
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mount2
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data UnixMountPointCompareMethodInfo
instance (signature ~ (UnixMountPoint -> m Int32), MonadIO m) => O.MethodInfo UnixMountPointCompareMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointCompare
#endif
foreign import ccall "g_unix_mount_point_copy" g_unix_mount_point_copy ::
Ptr UnixMountPoint ->
IO (Ptr UnixMountPoint)
unixMountPointCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m UnixMountPoint
unixMountPointCopy :: UnixMountPoint -> m UnixMountPoint
unixMountPointCopy mountPoint :: UnixMountPoint
mountPoint = IO UnixMountPoint -> m UnixMountPoint
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UnixMountPoint -> m UnixMountPoint)
-> IO UnixMountPoint -> m UnixMountPoint
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
Ptr UnixMountPoint
result <- Ptr UnixMountPoint -> IO (Ptr UnixMountPoint)
g_unix_mount_point_copy Ptr UnixMountPoint
mountPoint'
Text -> Ptr UnixMountPoint -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "unixMountPointCopy" Ptr UnixMountPoint
result
UnixMountPoint
result' <- ((ManagedPtr UnixMountPoint -> UnixMountPoint)
-> Ptr UnixMountPoint -> IO UnixMountPoint
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UnixMountPoint -> UnixMountPoint
UnixMountPoint) Ptr UnixMountPoint
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
UnixMountPoint -> IO UnixMountPoint
forall (m :: * -> *) a. Monad m => a -> m a
return UnixMountPoint
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointCopyMethodInfo
instance (signature ~ (m UnixMountPoint), MonadIO m) => O.MethodInfo UnixMountPointCopyMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointCopy
#endif
foreign import ccall "g_unix_mount_point_free" g_unix_mount_point_free ::
Ptr UnixMountPoint ->
IO ()
unixMountPointFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m ()
unixMountPointFree :: UnixMountPoint -> m ()
unixMountPointFree mountPoint :: UnixMountPoint
mountPoint = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
Ptr UnixMountPoint -> IO ()
g_unix_mount_point_free Ptr UnixMountPoint
mountPoint'
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UnixMountPointFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo UnixMountPointFreeMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointFree
#endif
foreign import ccall "g_unix_mount_point_get_device_path" g_unix_mount_point_get_device_path ::
Ptr UnixMountPoint ->
IO CString
unixMountPointGetDevicePath ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m [Char]
unixMountPointGetDevicePath :: UnixMountPoint -> m [Char]
unixMountPointGetDevicePath mountPoint :: UnixMountPoint
mountPoint = IO [Char] -> m [Char]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Char] -> m [Char]) -> IO [Char] -> m [Char]
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CString
result <- Ptr UnixMountPoint -> IO CString
g_unix_mount_point_get_device_path Ptr UnixMountPoint
mountPoint'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "unixMountPointGetDevicePath" CString
result
[Char]
result' <- HasCallStack => CString -> IO [Char]
CString -> IO [Char]
cstringToString CString
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
[Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointGetDevicePathMethodInfo
instance (signature ~ (m [Char]), MonadIO m) => O.MethodInfo UnixMountPointGetDevicePathMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointGetDevicePath
#endif
foreign import ccall "g_unix_mount_point_get_fs_type" g_unix_mount_point_get_fs_type ::
Ptr UnixMountPoint ->
IO CString
unixMountPointGetFsType ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m T.Text
unixMountPointGetFsType :: UnixMountPoint -> m Text
unixMountPointGetFsType mountPoint :: UnixMountPoint
mountPoint = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CString
result <- Ptr UnixMountPoint -> IO CString
g_unix_mount_point_get_fs_type Ptr UnixMountPoint
mountPoint'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "unixMountPointGetFsType" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointGetFsTypeMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo UnixMountPointGetFsTypeMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointGetFsType
#endif
foreign import ccall "g_unix_mount_point_get_mount_path" g_unix_mount_point_get_mount_path ::
Ptr UnixMountPoint ->
IO CString
unixMountPointGetMountPath ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m [Char]
unixMountPointGetMountPath :: UnixMountPoint -> m [Char]
unixMountPointGetMountPath mountPoint :: UnixMountPoint
mountPoint = IO [Char] -> m [Char]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Char] -> m [Char]) -> IO [Char] -> m [Char]
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CString
result <- Ptr UnixMountPoint -> IO CString
g_unix_mount_point_get_mount_path Ptr UnixMountPoint
mountPoint'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "unixMountPointGetMountPath" CString
result
[Char]
result' <- HasCallStack => CString -> IO [Char]
CString -> IO [Char]
cstringToString CString
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
[Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointGetMountPathMethodInfo
instance (signature ~ (m [Char]), MonadIO m) => O.MethodInfo UnixMountPointGetMountPathMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointGetMountPath
#endif
foreign import ccall "g_unix_mount_point_get_options" g_unix_mount_point_get_options ::
Ptr UnixMountPoint ->
IO CString
unixMountPointGetOptions ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m T.Text
unixMountPointGetOptions :: UnixMountPoint -> m Text
unixMountPointGetOptions mountPoint :: UnixMountPoint
mountPoint = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CString
result <- Ptr UnixMountPoint -> IO CString
g_unix_mount_point_get_options Ptr UnixMountPoint
mountPoint'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "unixMountPointGetOptions" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointGetOptionsMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo UnixMountPointGetOptionsMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointGetOptions
#endif
foreign import ccall "g_unix_mount_point_guess_can_eject" g_unix_mount_point_guess_can_eject ::
Ptr UnixMountPoint ->
IO CInt
unixMountPointGuessCanEject ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m Bool
unixMountPointGuessCanEject :: UnixMountPoint -> m Bool
unixMountPointGuessCanEject mountPoint :: UnixMountPoint
mountPoint = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CInt
result <- Ptr UnixMountPoint -> IO CInt
g_unix_mount_point_guess_can_eject Ptr UnixMountPoint
mountPoint'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointGuessCanEjectMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo UnixMountPointGuessCanEjectMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointGuessCanEject
#endif
foreign import ccall "g_unix_mount_point_guess_icon" g_unix_mount_point_guess_icon ::
Ptr UnixMountPoint ->
IO (Ptr Gio.Icon.Icon)
unixMountPointGuessIcon ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m Gio.Icon.Icon
unixMountPointGuessIcon :: UnixMountPoint -> m Icon
unixMountPointGuessIcon mountPoint :: UnixMountPoint
mountPoint = IO Icon -> m Icon
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Icon -> m Icon) -> IO Icon -> m Icon
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
Ptr Icon
result <- Ptr UnixMountPoint -> IO (Ptr Icon)
g_unix_mount_point_guess_icon Ptr UnixMountPoint
mountPoint'
Text -> Ptr Icon -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "unixMountPointGuessIcon" Ptr Icon
result
Icon
result' <- ((ManagedPtr Icon -> Icon) -> Ptr Icon -> IO Icon
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Icon -> Icon
Gio.Icon.Icon) Ptr Icon
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Icon -> IO Icon
forall (m :: * -> *) a. Monad m => a -> m a
return Icon
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointGuessIconMethodInfo
instance (signature ~ (m Gio.Icon.Icon), MonadIO m) => O.MethodInfo UnixMountPointGuessIconMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointGuessIcon
#endif
foreign import ccall "g_unix_mount_point_guess_name" g_unix_mount_point_guess_name ::
Ptr UnixMountPoint ->
IO CString
unixMountPointGuessName ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m T.Text
unixMountPointGuessName :: UnixMountPoint -> m Text
unixMountPointGuessName mountPoint :: UnixMountPoint
mountPoint = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CString
result <- Ptr UnixMountPoint -> IO CString
g_unix_mount_point_guess_name Ptr UnixMountPoint
mountPoint'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "unixMountPointGuessName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointGuessNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo UnixMountPointGuessNameMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointGuessName
#endif
foreign import ccall "g_unix_mount_point_guess_symbolic_icon" g_unix_mount_point_guess_symbolic_icon ::
Ptr UnixMountPoint ->
IO (Ptr Gio.Icon.Icon)
unixMountPointGuessSymbolicIcon ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m Gio.Icon.Icon
unixMountPointGuessSymbolicIcon :: UnixMountPoint -> m Icon
unixMountPointGuessSymbolicIcon mountPoint :: UnixMountPoint
mountPoint = IO Icon -> m Icon
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Icon -> m Icon) -> IO Icon -> m Icon
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
Ptr Icon
result <- Ptr UnixMountPoint -> IO (Ptr Icon)
g_unix_mount_point_guess_symbolic_icon Ptr UnixMountPoint
mountPoint'
Text -> Ptr Icon -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "unixMountPointGuessSymbolicIcon" Ptr Icon
result
Icon
result' <- ((ManagedPtr Icon -> Icon) -> Ptr Icon -> IO Icon
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Icon -> Icon
Gio.Icon.Icon) Ptr Icon
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Icon -> IO Icon
forall (m :: * -> *) a. Monad m => a -> m a
return Icon
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointGuessSymbolicIconMethodInfo
instance (signature ~ (m Gio.Icon.Icon), MonadIO m) => O.MethodInfo UnixMountPointGuessSymbolicIconMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointGuessSymbolicIcon
#endif
foreign import ccall "g_unix_mount_point_is_loopback" g_unix_mount_point_is_loopback ::
Ptr UnixMountPoint ->
IO CInt
unixMountPointIsLoopback ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m Bool
unixMountPointIsLoopback :: UnixMountPoint -> m Bool
unixMountPointIsLoopback mountPoint :: UnixMountPoint
mountPoint = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CInt
result <- Ptr UnixMountPoint -> IO CInt
g_unix_mount_point_is_loopback Ptr UnixMountPoint
mountPoint'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointIsLoopbackMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo UnixMountPointIsLoopbackMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointIsLoopback
#endif
foreign import ccall "g_unix_mount_point_is_readonly" g_unix_mount_point_is_readonly ::
Ptr UnixMountPoint ->
IO CInt
unixMountPointIsReadonly ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m Bool
unixMountPointIsReadonly :: UnixMountPoint -> m Bool
unixMountPointIsReadonly mountPoint :: UnixMountPoint
mountPoint = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CInt
result <- Ptr UnixMountPoint -> IO CInt
g_unix_mount_point_is_readonly Ptr UnixMountPoint
mountPoint'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointIsReadonlyMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo UnixMountPointIsReadonlyMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointIsReadonly
#endif
foreign import ccall "g_unix_mount_point_is_user_mountable" g_unix_mount_point_is_user_mountable ::
Ptr UnixMountPoint ->
IO CInt
unixMountPointIsUserMountable ::
(B.CallStack.HasCallStack, MonadIO m) =>
UnixMountPoint
-> m Bool
unixMountPointIsUserMountable :: UnixMountPoint -> m Bool
unixMountPointIsUserMountable mountPoint :: UnixMountPoint
mountPoint = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr UnixMountPoint
mountPoint' <- UnixMountPoint -> IO (Ptr UnixMountPoint)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr UnixMountPoint
mountPoint
CInt
result <- Ptr UnixMountPoint -> IO CInt
g_unix_mount_point_is_user_mountable Ptr UnixMountPoint
mountPoint'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
UnixMountPoint -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr UnixMountPoint
mountPoint
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data UnixMountPointIsUserMountableMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo UnixMountPointIsUserMountableMethodInfo UnixMountPoint signature where
overloadedMethod = unixMountPointIsUserMountable
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveUnixMountPointMethod (t :: Symbol) (o :: *) :: * where
ResolveUnixMountPointMethod "compare" o = UnixMountPointCompareMethodInfo
ResolveUnixMountPointMethod "copy" o = UnixMountPointCopyMethodInfo
ResolveUnixMountPointMethod "free" o = UnixMountPointFreeMethodInfo
ResolveUnixMountPointMethod "guessCanEject" o = UnixMountPointGuessCanEjectMethodInfo
ResolveUnixMountPointMethod "guessIcon" o = UnixMountPointGuessIconMethodInfo
ResolveUnixMountPointMethod "guessName" o = UnixMountPointGuessNameMethodInfo
ResolveUnixMountPointMethod "guessSymbolicIcon" o = UnixMountPointGuessSymbolicIconMethodInfo
ResolveUnixMountPointMethod "isLoopback" o = UnixMountPointIsLoopbackMethodInfo
ResolveUnixMountPointMethod "isReadonly" o = UnixMountPointIsReadonlyMethodInfo
ResolveUnixMountPointMethod "isUserMountable" o = UnixMountPointIsUserMountableMethodInfo
ResolveUnixMountPointMethod "getDevicePath" o = UnixMountPointGetDevicePathMethodInfo
ResolveUnixMountPointMethod "getFsType" o = UnixMountPointGetFsTypeMethodInfo
ResolveUnixMountPointMethod "getMountPath" o = UnixMountPointGetMountPathMethodInfo
ResolveUnixMountPointMethod "getOptions" o = UnixMountPointGetOptionsMethodInfo
ResolveUnixMountPointMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveUnixMountPointMethod t UnixMountPoint, O.MethodInfo info UnixMountPoint p) => OL.IsLabel t (UnixMountPoint -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif