#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Structs.UnixMountPoint
(
UnixMountPoint(..) ,
noUnixMountPoint ,
#if ENABLE_OVERLOADING
UnixMountPointCompareMethodInfo ,
#endif
unixMountPointCompare ,
#if ENABLE_OVERLOADING
UnixMountPointCopyMethodInfo ,
#endif
unixMountPointCopy ,
#if ENABLE_OVERLOADING
UnixMountPointFreeMethodInfo ,
#endif
unixMountPointFree ,
#if ENABLE_OVERLOADING
UnixMountPointGetDevicePathMethodInfo ,
#endif
unixMountPointGetDevicePath ,
#if ENABLE_OVERLOADING
UnixMountPointGetFsTypeMethodInfo ,
#endif
unixMountPointGetFsType ,
#if ENABLE_OVERLOADING
UnixMountPointGetMountPathMethodInfo ,
#endif
unixMountPointGetMountPath ,
#if ENABLE_OVERLOADING
UnixMountPointGetOptionsMethodInfo ,
#endif
unixMountPointGetOptions ,
#if ENABLE_OVERLOADING
UnixMountPointGuessCanEjectMethodInfo ,
#endif
unixMountPointGuessCanEject ,
#if ENABLE_OVERLOADING
UnixMountPointGuessIconMethodInfo ,
#endif
unixMountPointGuessIcon ,
#if ENABLE_OVERLOADING
UnixMountPointGuessNameMethodInfo ,
#endif
unixMountPointGuessName ,
#if ENABLE_OVERLOADING
UnixMountPointGuessSymbolicIconMethodInfo,
#endif
unixMountPointGuessSymbolicIcon ,
#if ENABLE_OVERLOADING
UnixMountPointIsLoopbackMethodInfo ,
#endif
unixMountPointIsLoopback ,
#if ENABLE_OVERLOADING
UnixMountPointIsReadonlyMethodInfo ,
#endif
unixMountPointIsReadonly ,
#if 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.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 {-# SOURCE #-} qualified GI.Gio.Interfaces.Icon as Gio.Icon
newtype UnixMountPoint = UnixMountPoint (ManagedPtr UnixMountPoint)
foreign import ccall "g_unix_mount_point_get_type" c_g_unix_mount_point_get_type ::
IO GType
instance BoxedObject UnixMountPoint where
boxedType _ = c_g_unix_mount_point_get_type
noUnixMountPoint :: Maybe UnixMountPoint
noUnixMountPoint = Nothing
#if 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 mount1 mount2 = liftIO $ do
mount1' <- unsafeManagedPtrGetPtr mount1
mount2' <- unsafeManagedPtrGetPtr mount2
result <- g_unix_mount_point_compare mount1' mount2'
touchManagedPtr mount1
touchManagedPtr mount2
return result
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_copy mountPoint'
checkUnexpectedReturnNULL "unixMountPointCopy" result
result' <- (wrapBoxed UnixMountPoint) result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
g_unix_mount_point_free mountPoint'
touchManagedPtr mountPoint
return ()
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_get_device_path mountPoint'
checkUnexpectedReturnNULL "unixMountPointGetDevicePath" result
result' <- cstringToString result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_get_fs_type mountPoint'
checkUnexpectedReturnNULL "unixMountPointGetFsType" result
result' <- cstringToText result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_get_mount_path mountPoint'
checkUnexpectedReturnNULL "unixMountPointGetMountPath" result
result' <- cstringToString result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_get_options mountPoint'
checkUnexpectedReturnNULL "unixMountPointGetOptions" result
result' <- cstringToText result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_guess_can_eject mountPoint'
let result' = (/= 0) result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_guess_icon mountPoint'
checkUnexpectedReturnNULL "unixMountPointGuessIcon" result
result' <- (wrapObject Gio.Icon.Icon) result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_guess_name mountPoint'
checkUnexpectedReturnNULL "unixMountPointGuessName" result
result' <- cstringToText result
freeMem result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_guess_symbolic_icon mountPoint'
checkUnexpectedReturnNULL "unixMountPointGuessSymbolicIcon" result
result' <- (wrapObject Gio.Icon.Icon) result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_is_loopback mountPoint'
let result' = (/= 0) result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_is_readonly mountPoint'
let result' = (/= 0) result
touchManagedPtr mountPoint
return result'
#if 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 mountPoint = liftIO $ do
mountPoint' <- unsafeManagedPtrGetPtr mountPoint
result <- g_unix_mount_point_is_user_mountable mountPoint'
let result' = (/= 0) result
touchManagedPtr mountPoint
return result'
#if ENABLE_OVERLOADING
data UnixMountPointIsUserMountableMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo UnixMountPointIsUserMountableMethodInfo UnixMountPoint signature where
overloadedMethod _ = unixMountPointIsUserMountable
#endif
#if 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) => O.IsLabelProxy t (UnixMountPoint -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveUnixMountPointMethod t UnixMountPoint, O.MethodInfo info UnixMountPoint p) => O.IsLabel t (UnixMountPoint -> 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