{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- A structure allowing control over commits.

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

module GI.OSTree.Structs.RepoCommitModifier
    ( 

-- * Exported types
    RepoCommitModifier(..)                  ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [ref]("GI.OSTree.Structs.RepoCommitModifier#g:method:ref"), [unref]("GI.OSTree.Structs.RepoCommitModifier#g:method:unref").
-- 
-- ==== Getters
-- /None/.
-- 
-- ==== Setters
-- [setDevinoCache]("GI.OSTree.Structs.RepoCommitModifier#g:method:setDevinoCache"), [setSepolicy]("GI.OSTree.Structs.RepoCommitModifier#g:method:setSepolicy"), [setSepolicyFromCommit]("GI.OSTree.Structs.RepoCommitModifier#g:method:setSepolicyFromCommit"), [setXattrCallback]("GI.OSTree.Structs.RepoCommitModifier#g:method:setXattrCallback").

#if defined(ENABLE_OVERLOADING)
    ResolveRepoCommitModifierMethod         ,
#endif

-- ** new #method:new#

    repoCommitModifierNew                   ,


-- ** ref #method:ref#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierRefMethodInfo         ,
#endif
    repoCommitModifierRef                   ,


-- ** setDevinoCache #method:setDevinoCache#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierSetDevinoCacheMethodInfo,
#endif
    repoCommitModifierSetDevinoCache        ,


-- ** setSepolicy #method:setSepolicy#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierSetSepolicyMethodInfo ,
#endif
    repoCommitModifierSetSepolicy           ,


-- ** setSepolicyFromCommit #method:setSepolicyFromCommit#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierSetSepolicyFromCommitMethodInfo,
#endif
    repoCommitModifierSetSepolicyFromCommit ,


-- ** setXattrCallback #method:setXattrCallback#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierSetXattrCallbackMethodInfo,
#endif
    repoCommitModifierSetXattrCallback      ,


-- ** unref #method:unref#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierUnrefMethodInfo       ,
#endif
    repoCommitModifierUnref                 ,




    ) 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.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.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 qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.OSTree.Callbacks as OSTree.Callbacks
import {-# SOURCE #-} qualified GI.OSTree.Flags as OSTree.Flags
import {-# SOURCE #-} qualified GI.OSTree.Objects.Repo as OSTree.Repo
import {-# SOURCE #-} qualified GI.OSTree.Objects.SePolicy as OSTree.SePolicy
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoDevInoCache as OSTree.RepoDevInoCache

-- | Memory-managed wrapper type.
newtype RepoCommitModifier = RepoCommitModifier (SP.ManagedPtr RepoCommitModifier)
    deriving (RepoCommitModifier -> RepoCommitModifier -> Bool
(RepoCommitModifier -> RepoCommitModifier -> Bool)
-> (RepoCommitModifier -> RepoCommitModifier -> Bool)
-> Eq RepoCommitModifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepoCommitModifier -> RepoCommitModifier -> Bool
$c/= :: RepoCommitModifier -> RepoCommitModifier -> Bool
== :: RepoCommitModifier -> RepoCommitModifier -> Bool
$c== :: RepoCommitModifier -> RepoCommitModifier -> Bool
Eq)

instance SP.ManagedPtrNewtype RepoCommitModifier where
    toManagedPtr :: RepoCommitModifier -> ManagedPtr RepoCommitModifier
toManagedPtr (RepoCommitModifier ManagedPtr RepoCommitModifier
p) = ManagedPtr RepoCommitModifier
p

foreign import ccall "ostree_repo_commit_modifier_get_type" c_ostree_repo_commit_modifier_get_type :: 
    IO GType

type instance O.ParentTypes RepoCommitModifier = '[]
instance O.HasParentTypes RepoCommitModifier

instance B.Types.TypedObject RepoCommitModifier where
    glibType :: IO GType
glibType = IO GType
c_ostree_repo_commit_modifier_get_type

instance B.Types.GBoxed RepoCommitModifier

-- | Convert 'RepoCommitModifier' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe RepoCommitModifier) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ostree_repo_commit_modifier_get_type
    gvalueSet_ :: Ptr GValue -> Maybe RepoCommitModifier -> IO ()
gvalueSet_ Ptr GValue
gv Maybe RepoCommitModifier
P.Nothing = Ptr GValue -> Ptr RepoCommitModifier -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr RepoCommitModifier
forall a. Ptr a
FP.nullPtr :: FP.Ptr RepoCommitModifier)
    gvalueSet_ Ptr GValue
gv (P.Just RepoCommitModifier
obj) = RepoCommitModifier -> (Ptr RepoCommitModifier -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr RepoCommitModifier
obj (Ptr GValue -> Ptr RepoCommitModifier -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe RepoCommitModifier)
gvalueGet_ Ptr GValue
gv = do
        Ptr RepoCommitModifier
ptr <- Ptr GValue -> IO (Ptr RepoCommitModifier)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr RepoCommitModifier)
        if Ptr RepoCommitModifier
ptr Ptr RepoCommitModifier -> Ptr RepoCommitModifier -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr RepoCommitModifier
forall a. Ptr a
FP.nullPtr
        then RepoCommitModifier -> Maybe RepoCommitModifier
forall a. a -> Maybe a
P.Just (RepoCommitModifier -> Maybe RepoCommitModifier)
-> IO RepoCommitModifier -> IO (Maybe RepoCommitModifier)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr RepoCommitModifier -> RepoCommitModifier)
-> Ptr RepoCommitModifier -> IO RepoCommitModifier
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr RepoCommitModifier -> RepoCommitModifier
RepoCommitModifier Ptr RepoCommitModifier
ptr
        else Maybe RepoCommitModifier -> IO (Maybe RepoCommitModifier)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe RepoCommitModifier
forall a. Maybe a
P.Nothing
        
    


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

-- method RepoCommitModifier::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "flags"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifierFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Control options for filter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "commit_filter"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitFilter" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Function that can inspect individual files"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "User data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy_notify"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GDestroyNotify" , sinceVersion = Nothing }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "RepoCommitModifier" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_new" ostree_repo_commit_modifier_new :: 
    CUInt ->                                -- flags : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifierFlags"})
    FunPtr OSTree.Callbacks.C_RepoCommitFilter -> -- commit_filter : TInterface (Name {namespace = "OSTree", name = "RepoCommitFilter"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy_notify : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO (Ptr RepoCommitModifier)

-- | /No description available in the introspection data./
repoCommitModifierNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [OSTree.Flags.RepoCommitModifierFlags]
    -- ^ /@flags@/: Control options for filter
    -> Maybe (OSTree.Callbacks.RepoCommitFilter)
    -- ^ /@commitFilter@/: Function that can inspect individual files
    -> m RepoCommitModifier
    -- ^ __Returns:__ A new commit modifier.
repoCommitModifierNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[RepoCommitModifierFlags]
-> Maybe RepoCommitFilter -> m RepoCommitModifier
repoCommitModifierNew [RepoCommitModifierFlags]
flags Maybe RepoCommitFilter
commitFilter = IO RepoCommitModifier -> m RepoCommitModifier
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoCommitModifier -> m RepoCommitModifier)
-> IO RepoCommitModifier -> m RepoCommitModifier
forall a b. (a -> b) -> a -> b
$ do
    let flags' :: CUInt
flags' = [RepoCommitModifierFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoCommitModifierFlags]
flags
    FunPtr C_RepoCommitFilter
maybeCommitFilter <- case Maybe RepoCommitFilter
commitFilter of
        Maybe RepoCommitFilter
Nothing -> FunPtr C_RepoCommitFilter -> IO (FunPtr C_RepoCommitFilter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_RepoCommitFilter
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just RepoCommitFilter
jCommitFilter -> do
            FunPtr C_RepoCommitFilter
jCommitFilter' <- C_RepoCommitFilter -> IO (FunPtr C_RepoCommitFilter)
OSTree.Callbacks.mk_RepoCommitFilter (Maybe (Ptr (FunPtr C_RepoCommitFilter))
-> RepoCommitFilter_WithClosures -> C_RepoCommitFilter
OSTree.Callbacks.wrap_RepoCommitFilter Maybe (Ptr (FunPtr C_RepoCommitFilter))
forall a. Maybe a
Nothing (RepoCommitFilter -> RepoCommitFilter_WithClosures
OSTree.Callbacks.drop_closures_RepoCommitFilter RepoCommitFilter
jCommitFilter))
            FunPtr C_RepoCommitFilter -> IO (FunPtr C_RepoCommitFilter)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_RepoCommitFilter
jCommitFilter'
    let userData :: Ptr ()
userData = FunPtr C_RepoCommitFilter -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_RepoCommitFilter
maybeCommitFilter
    let destroyNotify :: FunPtr (Ptr a -> IO ())
destroyNotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    Ptr RepoCommitModifier
result <- CUInt
-> FunPtr C_RepoCommitFilter
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO (Ptr RepoCommitModifier)
ostree_repo_commit_modifier_new CUInt
flags' FunPtr C_RepoCommitFilter
maybeCommitFilter Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroyNotify
    Text -> Ptr RepoCommitModifier -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoCommitModifierNew" Ptr RepoCommitModifier
result
    RepoCommitModifier
result' <- ((ManagedPtr RepoCommitModifier -> RepoCommitModifier)
-> Ptr RepoCommitModifier -> IO RepoCommitModifier
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RepoCommitModifier -> RepoCommitModifier
RepoCommitModifier) Ptr RepoCommitModifier
result
    RepoCommitModifier -> IO RepoCommitModifier
forall (m :: * -> *) a. Monad m => a -> m a
return RepoCommitModifier
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method RepoCommitModifier::ref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "RepoCommitModifier" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_ref" ostree_repo_commit_modifier_ref :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    IO (Ptr RepoCommitModifier)

-- | /No description available in the introspection data./
repoCommitModifierRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    RepoCommitModifier
    -> m RepoCommitModifier
repoCommitModifierRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RepoCommitModifier -> m RepoCommitModifier
repoCommitModifierRef RepoCommitModifier
modifier = IO RepoCommitModifier -> m RepoCommitModifier
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoCommitModifier -> m RepoCommitModifier)
-> IO RepoCommitModifier -> m RepoCommitModifier
forall a b. (a -> b) -> a -> b
$ do
    Ptr RepoCommitModifier
modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    Ptr RepoCommitModifier
result <- Ptr RepoCommitModifier -> IO (Ptr RepoCommitModifier)
ostree_repo_commit_modifier_ref Ptr RepoCommitModifier
modifier'
    Text -> Ptr RepoCommitModifier -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoCommitModifierRef" Ptr RepoCommitModifier
result
    RepoCommitModifier
result' <- ((ManagedPtr RepoCommitModifier -> RepoCommitModifier)
-> Ptr RepoCommitModifier -> IO RepoCommitModifier
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RepoCommitModifier -> RepoCommitModifier
RepoCommitModifier) Ptr RepoCommitModifier
result
    RepoCommitModifier -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoCommitModifier
modifier
    RepoCommitModifier -> IO RepoCommitModifier
forall (m :: * -> *) a. Monad m => a -> m a
return RepoCommitModifier
result'

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierRefMethodInfo
instance (signature ~ (m RepoCommitModifier), MonadIO m) => O.OverloadedMethod RepoCommitModifierRefMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierRef

instance O.OverloadedMethodInfo RepoCommitModifierRefMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierRef",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.15/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierRef"
        })


#endif

-- method RepoCommitModifier::set_devino_cache
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Modifier" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cache"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoDevInoCache" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "A hash table caching device,inode to checksums"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_set_devino_cache" ostree_repo_commit_modifier_set_devino_cache :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    Ptr OSTree.RepoDevInoCache.RepoDevInoCache -> -- cache : TInterface (Name {namespace = "OSTree", name = "RepoDevInoCache"})
    IO ()

-- | See the documentation for
-- @ostree_repo_devino_cache_new()@.  This function can
-- then be used for later calls to
-- @ostree_repo_write_directory_to_mtree()@ to optimize commits.
-- 
-- Note if your process has multiple writers, you should use separate
-- @OSTreeRepo@ instances if you want to also use this API.
-- 
-- This function will add a reference to /@cache@/ without copying - you
-- should avoid further mutation of the cache.
-- 
-- /Since: 2017.13/
repoCommitModifierSetDevinoCache ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    RepoCommitModifier
    -- ^ /@modifier@/: Modifier
    -> OSTree.RepoDevInoCache.RepoDevInoCache
    -- ^ /@cache@/: A hash table caching device,inode to checksums
    -> m ()
repoCommitModifierSetDevinoCache :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RepoCommitModifier -> RepoDevInoCache -> m ()
repoCommitModifierSetDevinoCache RepoCommitModifier
modifier RepoDevInoCache
cache = 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 RepoCommitModifier
modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    Ptr RepoDevInoCache
cache' <- RepoDevInoCache -> IO (Ptr RepoDevInoCache)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoDevInoCache
cache
    Ptr RepoCommitModifier -> Ptr RepoDevInoCache -> IO ()
ostree_repo_commit_modifier_set_devino_cache Ptr RepoCommitModifier
modifier' Ptr RepoDevInoCache
cache'
    RepoCommitModifier -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoCommitModifier
modifier
    RepoDevInoCache -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoDevInoCache
cache
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierSetDevinoCacheMethodInfo
instance (signature ~ (OSTree.RepoDevInoCache.RepoDevInoCache -> m ()), MonadIO m) => O.OverloadedMethod RepoCommitModifierSetDevinoCacheMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierSetDevinoCache

instance O.OverloadedMethodInfo RepoCommitModifierSetDevinoCacheMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetDevinoCache",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.15/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierSetDevinoCache"
        })


#endif

-- method RepoCommitModifier::set_sepolicy
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An #OstreeRepoCommitModifier"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sepolicy"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "SePolicy" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Policy to use for labeling"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_set_sepolicy" ostree_repo_commit_modifier_set_sepolicy :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    Ptr OSTree.SePolicy.SePolicy ->         -- sepolicy : TInterface (Name {namespace = "OSTree", name = "SePolicy"})
    IO ()

-- | If /@policy@/ is non-'P.Nothing', use it to look up labels to use for
-- \"security.selinux\" extended attributes.
-- 
-- Note that any policy specified this way operates in addition to any
-- extended attributes provided via
-- 'GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetXattrCallback'.  However if both
-- specify a value for \"security.selinux\", then the one from the
-- policy wins.
repoCommitModifierSetSepolicy ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.SePolicy.IsSePolicy a) =>
    RepoCommitModifier
    -- ^ /@modifier@/: An t'GI.OSTree.Structs.RepoCommitModifier.RepoCommitModifier'
    -> Maybe (a)
    -- ^ /@sepolicy@/: Policy to use for labeling
    -> m ()
repoCommitModifierSetSepolicy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSePolicy a) =>
RepoCommitModifier -> Maybe a -> m ()
repoCommitModifierSetSepolicy RepoCommitModifier
modifier Maybe a
sepolicy = 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 RepoCommitModifier
modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    Ptr SePolicy
maybeSepolicy <- case Maybe a
sepolicy of
        Maybe a
Nothing -> Ptr SePolicy -> IO (Ptr SePolicy)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SePolicy
forall a. Ptr a
nullPtr
        Just a
jSepolicy -> do
            Ptr SePolicy
jSepolicy' <- a -> IO (Ptr SePolicy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jSepolicy
            Ptr SePolicy -> IO (Ptr SePolicy)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SePolicy
jSepolicy'
    Ptr RepoCommitModifier -> Ptr SePolicy -> IO ()
ostree_repo_commit_modifier_set_sepolicy Ptr RepoCommitModifier
modifier' Ptr SePolicy
maybeSepolicy
    RepoCommitModifier -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoCommitModifier
modifier
    Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
sepolicy a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierSetSepolicyMethodInfo
instance (signature ~ (Maybe (a) -> m ()), MonadIO m, OSTree.SePolicy.IsSePolicy a) => O.OverloadedMethod RepoCommitModifierSetSepolicyMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierSetSepolicy

instance O.OverloadedMethodInfo RepoCommitModifierSetSepolicyMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetSepolicy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.15/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierSetSepolicy"
        })


#endif

-- method RepoCommitModifier::set_sepolicy_from_commit
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Commit modifier" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "OSTree repo containing @rev"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rev"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Find SELinux policy from this base commit"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_set_sepolicy_from_commit" ostree_repo_commit_modifier_set_sepolicy_from_commit :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    Ptr OSTree.Repo.Repo ->                 -- repo : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CString ->                              -- rev : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | In many cases, one wants to create a \"derived\" commit from base commit.
-- SELinux policy labels are part of that base commit.  This API allows
-- one to easily set up SELinux labeling from a base commit.
-- 
-- /Since: 2020.4/
repoCommitModifierSetSepolicyFromCommit ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a, Gio.Cancellable.IsCancellable b) =>
    RepoCommitModifier
    -- ^ /@modifier@/: Commit modifier
    -> a
    -- ^ /@repo@/: OSTree repo containing /@rev@/
    -> T.Text
    -- ^ /@rev@/: Find SELinux policy from this base commit
    -> Maybe (b)
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoCommitModifierSetSepolicyFromCommit :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
RepoCommitModifier -> a -> Text -> Maybe b -> m ()
repoCommitModifierSetSepolicyFromCommit RepoCommitModifier
modifier a
repo Text
rev Maybe b
cancellable = 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 RepoCommitModifier
modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    Ptr Repo
repo' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
    CString
rev' <- Text -> IO CString
textToCString Text
rev
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr RepoCommitModifier
-> Ptr Repo
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_commit_modifier_set_sepolicy_from_commit Ptr RepoCommitModifier
modifier' Ptr Repo
repo' CString
rev' Ptr Cancellable
maybeCancellable
        RepoCommitModifier -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoCommitModifier
modifier
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
rev'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
rev'
     )

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierSetSepolicyFromCommitMethodInfo
instance (signature ~ (a -> T.Text -> Maybe (b) -> m ()), MonadIO m, OSTree.Repo.IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoCommitModifierSetSepolicyFromCommitMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierSetSepolicyFromCommit

instance O.OverloadedMethodInfo RepoCommitModifierSetSepolicyFromCommitMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetSepolicyFromCommit",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.15/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierSetSepolicyFromCommit"
        })


#endif

-- method RepoCommitModifier::set_xattr_callback
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An #OstreeRepoCommitModifier"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "OSTree" , name = "RepoCommitModifierXattrCallback" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Function to be invoked, should return extended attributes for path"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 3
--           , argDestroy = 2
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Destroy notification"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Data for @callback:"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_set_xattr_callback" ostree_repo_commit_modifier_set_xattr_callback :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    FunPtr OSTree.Callbacks.C_RepoCommitModifierXattrCallback -> -- callback : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifierXattrCallback"})
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | If set, this function should return extended attributes to use for
-- the given path.  This is useful for things like ACLs and SELinux,
-- where a build system can label the files as it\'s committing to the
-- repository.
repoCommitModifierSetXattrCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    RepoCommitModifier
    -- ^ /@modifier@/: An t'GI.OSTree.Structs.RepoCommitModifier.RepoCommitModifier'
    -> OSTree.Callbacks.RepoCommitModifierXattrCallback
    -- ^ /@callback@/: Function to be invoked, should return extended attributes for path
    -> m ()
repoCommitModifierSetXattrCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RepoCommitModifier -> RepoCommitModifierXattrCallback -> m ()
repoCommitModifierSetXattrCallback RepoCommitModifier
modifier RepoCommitModifierXattrCallback
callback = 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 RepoCommitModifier
modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    FunPtr C_RepoCommitModifierXattrCallback
callback' <- C_RepoCommitModifierXattrCallback
-> IO (FunPtr C_RepoCommitModifierXattrCallback)
OSTree.Callbacks.mk_RepoCommitModifierXattrCallback (Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback))
-> RepoCommitModifierXattrCallback_WithClosures
-> C_RepoCommitModifierXattrCallback
OSTree.Callbacks.wrap_RepoCommitModifierXattrCallback Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback))
forall a. Maybe a
Nothing (RepoCommitModifierXattrCallback
-> RepoCommitModifierXattrCallback_WithClosures
OSTree.Callbacks.drop_closures_RepoCommitModifierXattrCallback RepoCommitModifierXattrCallback
callback))
    let userData :: Ptr ()
userData = FunPtr C_RepoCommitModifierXattrCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_RepoCommitModifierXattrCallback
callback'
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    Ptr RepoCommitModifier
-> FunPtr C_RepoCommitModifierXattrCallback
-> FunPtr C_DestroyNotify
-> C_DestroyNotify
ostree_repo_commit_modifier_set_xattr_callback Ptr RepoCommitModifier
modifier' FunPtr C_RepoCommitModifierXattrCallback
callback' FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroy Ptr ()
userData
    RepoCommitModifier -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoCommitModifier
modifier
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierSetXattrCallbackMethodInfo
instance (signature ~ (OSTree.Callbacks.RepoCommitModifierXattrCallback -> m ()), MonadIO m) => O.OverloadedMethod RepoCommitModifierSetXattrCallbackMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierSetXattrCallback

instance O.OverloadedMethodInfo RepoCommitModifierSetXattrCallbackMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetXattrCallback",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.15/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierSetXattrCallback"
        })


#endif

-- method RepoCommitModifier::unref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_unref" ostree_repo_commit_modifier_unref :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    IO ()

-- | /No description available in the introspection data./
repoCommitModifierUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    RepoCommitModifier
    -> m ()
repoCommitModifierUnref :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RepoCommitModifier -> m ()
repoCommitModifierUnref RepoCommitModifier
modifier = 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 RepoCommitModifier
modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    Ptr RepoCommitModifier -> IO ()
ostree_repo_commit_modifier_unref Ptr RepoCommitModifier
modifier'
    RepoCommitModifier -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoCommitModifier
modifier
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod RepoCommitModifierUnrefMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierUnref

instance O.OverloadedMethodInfo RepoCommitModifierUnrefMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierUnref",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.15/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierUnref"
        })


#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveRepoCommitModifierMethod (t :: Symbol) (o :: *) :: * where
    ResolveRepoCommitModifierMethod "ref" o = RepoCommitModifierRefMethodInfo
    ResolveRepoCommitModifierMethod "unref" o = RepoCommitModifierUnrefMethodInfo
    ResolveRepoCommitModifierMethod "setDevinoCache" o = RepoCommitModifierSetDevinoCacheMethodInfo
    ResolveRepoCommitModifierMethod "setSepolicy" o = RepoCommitModifierSetSepolicyMethodInfo
    ResolveRepoCommitModifierMethod "setSepolicyFromCommit" o = RepoCommitModifierSetSepolicyFromCommitMethodInfo
    ResolveRepoCommitModifierMethod "setXattrCallback" o = RepoCommitModifierSetXattrCallbackMethodInfo
    ResolveRepoCommitModifierMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveRepoCommitModifierMethod t RepoCommitModifier, O.OverloadedMethod info RepoCommitModifier p) => OL.IsLabel t (RepoCommitModifier -> 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 ~ ResolveRepoCommitModifierMethod t RepoCommitModifier, O.OverloadedMethod info RepoCommitModifier p, R.HasField t RepoCommitModifier p) => R.HasField t RepoCommitModifier p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveRepoCommitModifierMethod t RepoCommitModifier, O.OverloadedMethodInfo info RepoCommitModifier) => OL.IsLabel t (O.MethodProxy info RepoCommitModifier) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif