{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.OSTree.Structs.DiffDirsOptions
(
DiffDirsOptions(..) ,
newZeroDiffDirsOptions ,
#if defined(ENABLE_OVERLOADING)
ResolveDiffDirsOptionsMethod ,
#endif
clearDiffDirsOptionsDevinoToCsumCache ,
#if defined(ENABLE_OVERLOADING)
diffDirsOptions_devinoToCsumCache ,
#endif
getDiffDirsOptionsDevinoToCsumCache ,
setDiffDirsOptionsDevinoToCsumCache ,
#if defined(ENABLE_OVERLOADING)
diffDirsOptions_ownerGid ,
#endif
getDiffDirsOptionsOwnerGid ,
setDiffDirsOptionsOwnerGid ,
#if defined(ENABLE_OVERLOADING)
diffDirsOptions_ownerUid ,
#endif
getDiffDirsOptionsOwnerUid ,
setDiffDirsOptionsOwnerUid ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 qualified GHC.Records as R
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoDevInoCache as OSTree.RepoDevInoCache
newtype DiffDirsOptions = DiffDirsOptions (SP.ManagedPtr DiffDirsOptions)
deriving (DiffDirsOptions -> DiffDirsOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiffDirsOptions -> DiffDirsOptions -> Bool
$c/= :: DiffDirsOptions -> DiffDirsOptions -> Bool
== :: DiffDirsOptions -> DiffDirsOptions -> Bool
$c== :: DiffDirsOptions -> DiffDirsOptions -> Bool
Eq)
instance SP.ManagedPtrNewtype DiffDirsOptions where
toManagedPtr :: DiffDirsOptions -> ManagedPtr DiffDirsOptions
toManagedPtr (DiffDirsOptions ManagedPtr DiffDirsOptions
p) = ManagedPtr DiffDirsOptions
p
instance BoxedPtr DiffDirsOptions where
boxedPtrCopy :: DiffDirsOptions -> IO DiffDirsOptions
boxedPtrCopy = \DiffDirsOptions
p -> forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DiffDirsOptions
p (forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
92 forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr DiffDirsOptions -> DiffDirsOptions
DiffDirsOptions)
boxedPtrFree :: DiffDirsOptions -> IO ()
boxedPtrFree = \DiffDirsOptions
x -> forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr DiffDirsOptions
x forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr DiffDirsOptions where
boxedPtrCalloc :: IO (Ptr DiffDirsOptions)
boxedPtrCalloc = forall a. Int -> IO (Ptr a)
callocBytes Int
92
newZeroDiffDirsOptions :: MonadIO m => m DiffDirsOptions
newZeroDiffDirsOptions :: forall (m :: * -> *). MonadIO m => m DiffDirsOptions
newZeroDiffDirsOptions = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr DiffDirsOptions -> DiffDirsOptions
DiffDirsOptions
instance tag ~ 'AttrSet => Constructible DiffDirsOptions tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr DiffDirsOptions -> DiffDirsOptions)
-> [AttrOp DiffDirsOptions tag] -> m DiffDirsOptions
new ManagedPtr DiffDirsOptions -> DiffDirsOptions
_ [AttrOp DiffDirsOptions tag]
attrs = do
DiffDirsOptions
o <- forall (m :: * -> *). MonadIO m => m DiffDirsOptions
newZeroDiffDirsOptions
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set DiffDirsOptions
o [AttrOp DiffDirsOptions tag]
attrs
forall (m :: * -> *) a. Monad m => a -> m a
return DiffDirsOptions
o
getDiffDirsOptionsOwnerUid :: MonadIO m => DiffDirsOptions -> m Int32
getDiffDirsOptionsOwnerUid :: forall (m :: * -> *). MonadIO m => DiffDirsOptions -> m Int32
getDiffDirsOptionsOwnerUid DiffDirsOptions
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffDirsOptions
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffDirsOptions
ptr -> do
Int32
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffDirsOptions
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setDiffDirsOptionsOwnerUid :: MonadIO m => DiffDirsOptions -> Int32 -> m ()
setDiffDirsOptionsOwnerUid :: forall (m :: * -> *). MonadIO m => DiffDirsOptions -> Int32 -> m ()
setDiffDirsOptionsOwnerUid DiffDirsOptions
s Int32
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffDirsOptions
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffDirsOptions
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DiffDirsOptions
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data DiffDirsOptionsOwnerUidFieldInfo
instance AttrInfo DiffDirsOptionsOwnerUidFieldInfo where
type AttrBaseTypeConstraint DiffDirsOptionsOwnerUidFieldInfo = (~) DiffDirsOptions
type AttrAllowedOps DiffDirsOptionsOwnerUidFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DiffDirsOptionsOwnerUidFieldInfo = (~) Int32
type AttrTransferTypeConstraint DiffDirsOptionsOwnerUidFieldInfo = (~)Int32
type AttrTransferType DiffDirsOptionsOwnerUidFieldInfo = Int32
type AttrGetType DiffDirsOptionsOwnerUidFieldInfo = Int32
type AttrLabel DiffDirsOptionsOwnerUidFieldInfo = "owner_uid"
type AttrOrigin DiffDirsOptionsOwnerUidFieldInfo = DiffDirsOptions
attrGet = getDiffDirsOptionsOwnerUid
attrSet = setDiffDirsOptionsOwnerUid
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.DiffDirsOptions.ownerUid"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffDirsOptions.html#g:attr:ownerUid"
})
diffDirsOptions_ownerUid :: AttrLabelProxy "ownerUid"
diffDirsOptions_ownerUid = AttrLabelProxy
#endif
getDiffDirsOptionsOwnerGid :: MonadIO m => DiffDirsOptions -> m Int32
getDiffDirsOptionsOwnerGid :: forall (m :: * -> *). MonadIO m => DiffDirsOptions -> m Int32
getDiffDirsOptionsOwnerGid DiffDirsOptions
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffDirsOptions
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffDirsOptions
ptr -> do
Int32
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffDirsOptions
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setDiffDirsOptionsOwnerGid :: MonadIO m => DiffDirsOptions -> Int32 -> m ()
setDiffDirsOptionsOwnerGid :: forall (m :: * -> *). MonadIO m => DiffDirsOptions -> Int32 -> m ()
setDiffDirsOptionsOwnerGid DiffDirsOptions
s Int32
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffDirsOptions
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffDirsOptions
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DiffDirsOptions
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data DiffDirsOptionsOwnerGidFieldInfo
instance AttrInfo DiffDirsOptionsOwnerGidFieldInfo where
type AttrBaseTypeConstraint DiffDirsOptionsOwnerGidFieldInfo = (~) DiffDirsOptions
type AttrAllowedOps DiffDirsOptionsOwnerGidFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DiffDirsOptionsOwnerGidFieldInfo = (~) Int32
type AttrTransferTypeConstraint DiffDirsOptionsOwnerGidFieldInfo = (~)Int32
type AttrTransferType DiffDirsOptionsOwnerGidFieldInfo = Int32
type AttrGetType DiffDirsOptionsOwnerGidFieldInfo = Int32
type AttrLabel DiffDirsOptionsOwnerGidFieldInfo = "owner_gid"
type AttrOrigin DiffDirsOptionsOwnerGidFieldInfo = DiffDirsOptions
attrGet = getDiffDirsOptionsOwnerGid
attrSet = setDiffDirsOptionsOwnerGid
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.DiffDirsOptions.ownerGid"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffDirsOptions.html#g:attr:ownerGid"
})
diffDirsOptions_ownerGid :: AttrLabelProxy "ownerGid"
diffDirsOptions_ownerGid = AttrLabelProxy
#endif
getDiffDirsOptionsDevinoToCsumCache :: MonadIO m => DiffDirsOptions -> m (Maybe OSTree.RepoDevInoCache.RepoDevInoCache)
getDiffDirsOptionsDevinoToCsumCache :: forall (m :: * -> *).
MonadIO m =>
DiffDirsOptions -> m (Maybe RepoDevInoCache)
getDiffDirsOptionsDevinoToCsumCache DiffDirsOptions
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffDirsOptions
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffDirsOptions
ptr -> do
Ptr RepoDevInoCache
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffDirsOptions
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO (Ptr OSTree.RepoDevInoCache.RepoDevInoCache)
Maybe RepoDevInoCache
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr RepoDevInoCache
val forall a b. (a -> b) -> a -> b
$ \Ptr RepoDevInoCache
val' -> do
RepoDevInoCache
val'' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr RepoDevInoCache -> RepoDevInoCache
OSTree.RepoDevInoCache.RepoDevInoCache) Ptr RepoDevInoCache
val'
forall (m :: * -> *) a. Monad m => a -> m a
return RepoDevInoCache
val''
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe RepoDevInoCache
result
setDiffDirsOptionsDevinoToCsumCache :: MonadIO m => DiffDirsOptions -> Ptr OSTree.RepoDevInoCache.RepoDevInoCache -> m ()
setDiffDirsOptionsDevinoToCsumCache :: forall (m :: * -> *).
MonadIO m =>
DiffDirsOptions -> Ptr RepoDevInoCache -> m ()
setDiffDirsOptionsDevinoToCsumCache DiffDirsOptions
s Ptr RepoDevInoCache
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffDirsOptions
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffDirsOptions
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DiffDirsOptions
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Ptr RepoDevInoCache
val :: Ptr OSTree.RepoDevInoCache.RepoDevInoCache)
clearDiffDirsOptionsDevinoToCsumCache :: MonadIO m => DiffDirsOptions -> m ()
clearDiffDirsOptionsDevinoToCsumCache :: forall (m :: * -> *). MonadIO m => DiffDirsOptions -> m ()
clearDiffDirsOptionsDevinoToCsumCache DiffDirsOptions
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffDirsOptions
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffDirsOptions
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DiffDirsOptions
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (forall a. Ptr a
FP.nullPtr :: Ptr OSTree.RepoDevInoCache.RepoDevInoCache)
#if defined(ENABLE_OVERLOADING)
data DiffDirsOptionsDevinoToCsumCacheFieldInfo
instance AttrInfo DiffDirsOptionsDevinoToCsumCacheFieldInfo where
type AttrBaseTypeConstraint DiffDirsOptionsDevinoToCsumCacheFieldInfo = (~) DiffDirsOptions
type AttrAllowedOps DiffDirsOptionsDevinoToCsumCacheFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DiffDirsOptionsDevinoToCsumCacheFieldInfo = (~) (Ptr OSTree.RepoDevInoCache.RepoDevInoCache)
type AttrTransferTypeConstraint DiffDirsOptionsDevinoToCsumCacheFieldInfo = (~)(Ptr OSTree.RepoDevInoCache.RepoDevInoCache)
type AttrTransferType DiffDirsOptionsDevinoToCsumCacheFieldInfo = (Ptr OSTree.RepoDevInoCache.RepoDevInoCache)
type AttrGetType DiffDirsOptionsDevinoToCsumCacheFieldInfo = Maybe OSTree.RepoDevInoCache.RepoDevInoCache
type AttrLabel DiffDirsOptionsDevinoToCsumCacheFieldInfo = "devino_to_csum_cache"
type AttrOrigin DiffDirsOptionsDevinoToCsumCacheFieldInfo = DiffDirsOptions
attrGet = getDiffDirsOptionsDevinoToCsumCache
attrSet = setDiffDirsOptionsDevinoToCsumCache
attrConstruct = undefined
attrClear = clearDiffDirsOptionsDevinoToCsumCache
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Structs.DiffDirsOptions.devinoToCsumCache"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffDirsOptions.html#g:attr:devinoToCsumCache"
})
diffDirsOptions_devinoToCsumCache :: AttrLabelProxy "devinoToCsumCache"
diffDirsOptions_devinoToCsumCache = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DiffDirsOptions
type instance O.AttributeList DiffDirsOptions = DiffDirsOptionsAttributeList
type DiffDirsOptionsAttributeList = ('[ '("ownerUid", DiffDirsOptionsOwnerUidFieldInfo), '("ownerGid", DiffDirsOptionsOwnerGidFieldInfo), '("devinoToCsumCache", DiffDirsOptionsDevinoToCsumCacheFieldInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDiffDirsOptionsMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDiffDirsOptionsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDiffDirsOptionsMethod t DiffDirsOptions, O.OverloadedMethod info DiffDirsOptions p) => OL.IsLabel t (DiffDirsOptions -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDiffDirsOptionsMethod t DiffDirsOptions, O.OverloadedMethod info DiffDirsOptions p, R.HasField t DiffDirsOptions p) => R.HasField t DiffDirsOptions p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDiffDirsOptionsMethod t DiffDirsOptions, O.OverloadedMethodInfo info DiffDirsOptions) => OL.IsLabel t (O.MethodProxy info DiffDirsOptions) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif