gi-gio-0.2.46.12: GI/Gio/Structs/UnixMountPoint.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
Defines a Unix mount point (e.g. <filename>/dev</filename>).
This corresponds roughly to a fstab entry.
-}
module GI.Gio.Structs.UnixMountPoint
(
-- * Exported types
UnixMountPoint(..) ,
noUnixMountPoint ,
-- * Methods
-- ** unixMountPointCompare
unixMountPointCompare ,
-- ** unixMountPointFree
unixMountPointFree ,
-- ** unixMountPointGetDevicePath
unixMountPointGetDevicePath ,
-- ** unixMountPointGetFsType
unixMountPointGetFsType ,
-- ** unixMountPointGetMountPath
unixMountPointGetMountPath ,
-- ** unixMountPointGetOptions
unixMountPointGetOptions ,
-- ** unixMountPointGuessCanEject
unixMountPointGuessCanEject ,
-- ** unixMountPointGuessIcon
unixMountPointGuessIcon ,
-- ** unixMountPointGuessName
unixMountPointGuessName ,
-- ** unixMountPointGuessSymbolicIcon
unixMountPointGuessSymbolicIcon ,
-- ** unixMountPointIsLoopback
unixMountPointIsLoopback ,
-- ** unixMountPointIsReadonly
unixMountPointIsReadonly ,
-- ** unixMountPointIsUserMountable
unixMountPointIsUserMountable ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gio.Types
import GI.Gio.Callbacks
newtype UnixMountPoint = UnixMountPoint (ForeignPtr UnixMountPoint)
noUnixMountPoint :: Maybe UnixMountPoint
noUnixMountPoint = Nothing
-- method UnixMountPoint::compare
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mount2", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mount2", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_compare" g_unix_mount_point_compare ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
Ptr UnixMountPoint -> -- mount2 : TInterface "Gio" "UnixMountPoint"
IO Int32
unixMountPointCompare ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
UnixMountPoint -> -- mount2
m Int32
unixMountPointCompare _obj mount2 = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
let mount2' = unsafeManagedPtrGetPtr mount2
result <- g_unix_mount_point_compare _obj' mount2'
touchManagedPtr _obj
touchManagedPtr mount2
return result
-- method UnixMountPoint::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_free" g_unix_mount_point_free ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO ()
unixMountPointFree ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m ()
unixMountPointFree _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
g_unix_mount_point_free _obj'
touchManagedPtr _obj
return ()
-- method UnixMountPoint::get_device_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_get_device_path" g_unix_mount_point_get_device_path ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CString
unixMountPointGetDevicePath ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m T.Text
unixMountPointGetDevicePath _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_get_device_path _obj'
checkUnexpectedReturnNULL "g_unix_mount_point_get_device_path" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::get_fs_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CString
unixMountPointGetFsType ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m T.Text
unixMountPointGetFsType _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_get_fs_type _obj'
checkUnexpectedReturnNULL "g_unix_mount_point_get_fs_type" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::get_mount_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_get_mount_path" g_unix_mount_point_get_mount_path ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CString
unixMountPointGetMountPath ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m T.Text
unixMountPointGetMountPath _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_get_mount_path _obj'
checkUnexpectedReturnNULL "g_unix_mount_point_get_mount_path" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::get_options
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_get_options" g_unix_mount_point_get_options ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CString
unixMountPointGetOptions ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m T.Text
unixMountPointGetOptions _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_get_options _obj'
checkUnexpectedReturnNULL "g_unix_mount_point_get_options" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::guess_can_eject
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CInt
unixMountPointGuessCanEject ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m Bool
unixMountPointGuessCanEject _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_guess_can_eject _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::guess_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_guess_icon" g_unix_mount_point_guess_icon ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO (Ptr Icon)
unixMountPointGuessIcon ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m Icon
unixMountPointGuessIcon _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_guess_icon _obj'
checkUnexpectedReturnNULL "g_unix_mount_point_guess_icon" result
result' <- (wrapObject Icon) result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::guess_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_guess_name" g_unix_mount_point_guess_name ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CString
unixMountPointGuessName ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m T.Text
unixMountPointGuessName _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_guess_name _obj'
checkUnexpectedReturnNULL "g_unix_mount_point_guess_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::guess_symbolic_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "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 -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO (Ptr Icon)
unixMountPointGuessSymbolicIcon ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m Icon
unixMountPointGuessSymbolicIcon _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_guess_symbolic_icon _obj'
checkUnexpectedReturnNULL "g_unix_mount_point_guess_symbolic_icon" result
result' <- (wrapObject Icon) result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::is_loopback
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_is_loopback" g_unix_mount_point_is_loopback ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CInt
unixMountPointIsLoopback ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m Bool
unixMountPointIsLoopback _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_is_loopback _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::is_readonly
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_point_is_readonly" g_unix_mount_point_is_readonly ::
Ptr UnixMountPoint -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CInt
unixMountPointIsReadonly ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m Bool
unixMountPointIsReadonly _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_is_readonly _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method UnixMountPoint::is_user_mountable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "UnixMountPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "UnixMountPoint"
IO CInt
unixMountPointIsUserMountable ::
(MonadIO m) =>
UnixMountPoint -> -- _obj
m Bool
unixMountPointIsUserMountable _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_unix_mount_point_is_user_mountable _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'