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

Defines a Unix mount point (e.g. \<filename>\/dev\<\/filename>).
This corresponds roughly to a fstab entry.
-}

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.Gio.Structs.UnixMountPoint
    (

-- * Exported types
    UnixMountPoint(..)                      ,
    noUnixMountPoint                        ,


 -- * Methods
-- ** compare #method:compare#

#if ENABLE_OVERLOADING
    UnixMountPointCompareMethodInfo         ,
#endif
    unixMountPointCompare                   ,


-- ** copy #method:copy#

#if ENABLE_OVERLOADING
    UnixMountPointCopyMethodInfo            ,
#endif
    unixMountPointCopy                      ,


-- ** free #method:free#

#if ENABLE_OVERLOADING
    UnixMountPointFreeMethodInfo            ,
#endif
    unixMountPointFree                      ,


-- ** getDevicePath #method:getDevicePath#

#if ENABLE_OVERLOADING
    UnixMountPointGetDevicePathMethodInfo   ,
#endif
    unixMountPointGetDevicePath             ,


-- ** getFsType #method:getFsType#

#if ENABLE_OVERLOADING
    UnixMountPointGetFsTypeMethodInfo       ,
#endif
    unixMountPointGetFsType                 ,


-- ** getMountPath #method:getMountPath#

#if ENABLE_OVERLOADING
    UnixMountPointGetMountPathMethodInfo    ,
#endif
    unixMountPointGetMountPath              ,


-- ** getOptions #method:getOptions#

#if ENABLE_OVERLOADING
    UnixMountPointGetOptionsMethodInfo      ,
#endif
    unixMountPointGetOptions                ,


-- ** guessCanEject #method:guessCanEject#

#if ENABLE_OVERLOADING
    UnixMountPointGuessCanEjectMethodInfo   ,
#endif
    unixMountPointGuessCanEject             ,


-- ** guessIcon #method:guessIcon#

#if ENABLE_OVERLOADING
    UnixMountPointGuessIconMethodInfo       ,
#endif
    unixMountPointGuessIcon                 ,


-- ** guessName #method:guessName#

#if ENABLE_OVERLOADING
    UnixMountPointGuessNameMethodInfo       ,
#endif
    unixMountPointGuessName                 ,


-- ** guessSymbolicIcon #method:guessSymbolicIcon#

#if ENABLE_OVERLOADING
    UnixMountPointGuessSymbolicIconMethodInfo,
#endif
    unixMountPointGuessSymbolicIcon         ,


-- ** isLoopback #method:isLoopback#

#if ENABLE_OVERLOADING
    UnixMountPointIsLoopbackMethodInfo      ,
#endif
    unixMountPointIsLoopback                ,


-- ** isReadonly #method:isReadonly#

#if ENABLE_OVERLOADING
    UnixMountPointIsReadonlyMethodInfo      ,
#endif
    unixMountPointIsReadonly                ,


-- ** isUserMountable #method:isUserMountable#

#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.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.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

-- | Memory-managed wrapper type.
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

-- | A convenience alias for `Nothing` :: `Maybe` `UnixMountPoint`.
noUnixMountPoint :: Maybe UnixMountPoint
noUnixMountPoint = Nothing


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

-- method UnixMountPoint::compare
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "mount1", argType = TInterface (Name {namespace = "Gio", name = "UnixMountPoint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GUnixMount.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mount2", argType = TInterface (Name {namespace = "Gio", name = "UnixMountPoint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GUnixMount.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "g_unix_mount_point_compare" g_unix_mount_point_compare ::
    Ptr UnixMountPoint ->                   -- mount1 : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    Ptr UnixMountPoint ->                   -- mount2 : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO Int32

{- |
Compares two unix mount points.
-}
unixMountPointCompare ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mount1@/: a @/GUnixMount/@. -}
    -> UnixMountPoint
    {- ^ /@mount2@/: a @/GUnixMount/@. -}
    -> m Int32
    {- ^ __Returns:__ 1, 0 or -1 if /@mount1@/ is greater than, equal to,
or less than /@mount2@/, respectively. -}
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

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

foreign import ccall "g_unix_mount_point_copy" g_unix_mount_point_copy ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO (Ptr UnixMountPoint)

{- |
Makes a copy of /@mountPoint@/.

/Since: 2.54/
-}
unixMountPointCopy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint'. -}
    -> m UnixMountPoint
    {- ^ __Returns:__ a new 'GI.Gio.Structs.UnixMountPoint.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

-- method UnixMountPoint::free
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "mount_point", argType = TInterface (Name {namespace = "Gio", name = "UnixMountPoint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "unix mount point to free.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_unix_mount_point_free" g_unix_mount_point_free ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO ()

{- |
Frees a unix mount point.
-}
unixMountPointFree ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: unix mount point to free. -}
    -> 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

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

foreign import ccall "g_unix_mount_point_get_device_path" g_unix_mount_point_get_device_path ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CString

{- |
Gets the device path for a unix mount point.
-}
unixMountPointGetDevicePath ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint'. -}
    -> m [Char]
    {- ^ __Returns:__ a string containing the device path. -}
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

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

foreign import ccall "g_unix_mount_point_get_fs_type" g_unix_mount_point_get_fs_type ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CString

{- |
Gets the file system type for the mount point.
-}
unixMountPointGetFsType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint'. -}
    -> m T.Text
    {- ^ __Returns:__ a string containing the file system type. -}
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

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

foreign import ccall "g_unix_mount_point_get_mount_path" g_unix_mount_point_get_mount_path ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CString

{- |
Gets the mount path for a unix mount point.
-}
unixMountPointGetMountPath ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint'. -}
    -> m [Char]
    {- ^ __Returns:__ a string containing the mount path. -}
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

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

foreign import ccall "g_unix_mount_point_get_options" g_unix_mount_point_get_options ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CString

{- |
Gets the options for the mount point.

/Since: 2.32/
-}
unixMountPointGetOptions ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint'. -}
    -> m T.Text
    {- ^ __Returns:__ a string containing the options. -}
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

-- method UnixMountPoint::guess_can_eject
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "mount_point", argType = TInterface (Name {namespace = "Gio", name = "UnixMountPoint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GUnixMountPoint", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "g_unix_mount_point_guess_can_eject" g_unix_mount_point_guess_can_eject ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CInt

{- |
Guesses whether a Unix mount point can be ejected.
-}
unixMountPointGuessCanEject ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@mountPoint@/ is deemed to be ejectable. -}
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

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

foreign import ccall "g_unix_mount_point_guess_icon" g_unix_mount_point_guess_icon ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO (Ptr Gio.Icon.Icon)

{- |
Guesses the icon of a Unix mount point.
-}
unixMountPointGuessIcon ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint' -}
    -> m Gio.Icon.Icon
    {- ^ __Returns:__ a 'GI.Gio.Interfaces.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

-- method UnixMountPoint::guess_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "mount_point", argType = TInterface (Name {namespace = "Gio", name = "UnixMountPoint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GUnixMountPoint", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "g_unix_mount_point_guess_name" g_unix_mount_point_guess_name ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CString

{- |
Guesses the name of a Unix mount point.
The result is a translated string.
-}
unixMountPointGuessName ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint' -}
    -> m T.Text
    {- ^ __Returns:__ A newly allocated string that must
    be freed with 'GI.GLib.Functions.free' -}
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

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

foreign import ccall "g_unix_mount_point_guess_symbolic_icon" g_unix_mount_point_guess_symbolic_icon ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO (Ptr Gio.Icon.Icon)

{- |
Guesses the symbolic icon of a Unix mount point.

/Since: 2.34/
-}
unixMountPointGuessSymbolicIcon ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint' -}
    -> m Gio.Icon.Icon
    {- ^ __Returns:__ a 'GI.Gio.Interfaces.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

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

foreign import ccall "g_unix_mount_point_is_loopback" g_unix_mount_point_is_loopback ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CInt

{- |
Checks if a unix mount point is a loopback device.
-}
unixMountPointIsLoopback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint'. -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the mount point is a loopback. 'False' otherwise. -}
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

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

foreign import ccall "g_unix_mount_point_is_readonly" g_unix_mount_point_is_readonly ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CInt

{- |
Checks if a unix mount point is read only.
-}
unixMountPointIsReadonly ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint'. -}
    -> m Bool
    {- ^ __Returns:__ 'True' if a mount point is read only. -}
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

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

foreign import ccall "g_unix_mount_point_is_user_mountable" g_unix_mount_point_is_user_mountable ::
    Ptr UnixMountPoint ->                   -- mount_point : TInterface (Name {namespace = "Gio", name = "UnixMountPoint"})
    IO CInt

{- |
Checks if a unix mount point is mountable by the user.
-}
unixMountPointIsUserMountable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    UnixMountPoint
    {- ^ /@mountPoint@/: a 'GI.Gio.Structs.UnixMountPoint.UnixMountPoint'. -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the mount point is user mountable. -}
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) => OL.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