-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

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

module GI.OSTree.Callbacks
    ( 

 -- * Signals
-- ** BootloaderInterfaceGetNameFieldCallback #signal:BootloaderInterfaceGetNameFieldCallback#

    BootloaderInterfaceGetNameFieldCallback ,
    C_BootloaderInterfaceGetNameFieldCallback,
    dynamic_BootloaderInterfaceGetNameFieldCallback,
    genClosure_BootloaderInterfaceGetNameFieldCallback,
    mk_BootloaderInterfaceGetNameFieldCallback,
    noBootloaderInterfaceGetNameFieldCallback,
    wrap_BootloaderInterfaceGetNameFieldCallback,


-- ** BootloaderInterfaceIsAtomicFieldCallback #signal:BootloaderInterfaceIsAtomicFieldCallback#

    BootloaderInterfaceIsAtomicFieldCallback,
    C_BootloaderInterfaceIsAtomicFieldCallback,
    dynamic_BootloaderInterfaceIsAtomicFieldCallback,
    genClosure_BootloaderInterfaceIsAtomicFieldCallback,
    mk_BootloaderInterfaceIsAtomicFieldCallback,
    noBootloaderInterfaceIsAtomicFieldCallback,
    wrap_BootloaderInterfaceIsAtomicFieldCallback,


-- ** BootloaderInterfacePostBlsSyncFieldCallback #signal:BootloaderInterfacePostBlsSyncFieldCallback#

    BootloaderInterfacePostBlsSyncFieldCallback,
    C_BootloaderInterfacePostBlsSyncFieldCallback,
    dynamic_BootloaderInterfacePostBlsSyncFieldCallback,
    mk_BootloaderInterfacePostBlsSyncFieldCallback,
    noBootloaderInterfacePostBlsSyncFieldCallback,


-- ** BootloaderInterfaceQueryFieldCallback #signal:BootloaderInterfaceQueryFieldCallback#

    BootloaderInterfaceQueryFieldCallback   ,
    C_BootloaderInterfaceQueryFieldCallback ,
    dynamic_BootloaderInterfaceQueryFieldCallback,
    mk_BootloaderInterfaceQueryFieldCallback,
    noBootloaderInterfaceQueryFieldCallback ,


-- ** CmdPrivateVTableOstreeFinalizeStagedFieldCallback #signal:CmdPrivateVTableOstreeFinalizeStagedFieldCallback#

    C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback,
    CmdPrivateVTableOstreeFinalizeStagedFieldCallback,
    dynamic_CmdPrivateVTableOstreeFinalizeStagedFieldCallback,
    mk_CmdPrivateVTableOstreeFinalizeStagedFieldCallback,
    noCmdPrivateVTableOstreeFinalizeStagedFieldCallback,


-- ** CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback #signal:CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback#

    C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback,
    CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback,
    dynamic_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback,
    mk_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback,
    noCmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback,


-- ** CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback #signal:CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback#

    C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback,
    CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback,
    dynamic_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback,
    mk_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback,
    noCmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback,


-- ** CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback #signal:CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback#

    C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback,
    CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback,
    dynamic_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback,
    mk_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback,
    noCmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback,


-- ** CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback #signal:CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback#

    C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback,
    CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback,
    dynamic_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback,
    mk_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback,
    noCmdPrivateVTableOstreeStaticDeltaDumpFieldCallback,


-- ** CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback #signal:CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback#

    C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback,
    CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback,
    dynamic_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback,
    mk_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback,
    noCmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback,


-- ** CmdPrivateVTableOstreeSystemGeneratorFieldCallback #signal:CmdPrivateVTableOstreeSystemGeneratorFieldCallback#

    C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback,
    CmdPrivateVTableOstreeSystemGeneratorFieldCallback,
    dynamic_CmdPrivateVTableOstreeSystemGeneratorFieldCallback,
    mk_CmdPrivateVTableOstreeSystemGeneratorFieldCallback,
    noCmdPrivateVTableOstreeSystemGeneratorFieldCallback,


-- ** RepoCheckoutFilter #signal:RepoCheckoutFilter#

    C_RepoCheckoutFilter                    ,
    RepoCheckoutFilter                      ,
    RepoCheckoutFilter_WithClosures         ,
    drop_closures_RepoCheckoutFilter        ,
    dynamic_RepoCheckoutFilter              ,
    genClosure_RepoCheckoutFilter           ,
    mk_RepoCheckoutFilter                   ,
    noRepoCheckoutFilter                    ,
    noRepoCheckoutFilter_WithClosures       ,
    wrap_RepoCheckoutFilter                 ,


-- ** RepoCommitFilter #signal:RepoCommitFilter#

    C_RepoCommitFilter                      ,
    RepoCommitFilter                        ,
    RepoCommitFilter_WithClosures           ,
    drop_closures_RepoCommitFilter          ,
    dynamic_RepoCommitFilter                ,
    genClosure_RepoCommitFilter             ,
    mk_RepoCommitFilter                     ,
    noRepoCommitFilter                      ,
    noRepoCommitFilter_WithClosures         ,
    wrap_RepoCommitFilter                   ,


-- ** RepoCommitModifierXattrCallback #signal:RepoCommitModifierXattrCallback#

    C_RepoCommitModifierXattrCallback       ,
    RepoCommitModifierXattrCallback         ,
    RepoCommitModifierXattrCallback_WithClosures,
    drop_closures_RepoCommitModifierXattrCallback,
    dynamic_RepoCommitModifierXattrCallback ,
    genClosure_RepoCommitModifierXattrCallback,
    mk_RepoCommitModifierXattrCallback      ,
    noRepoCommitModifierXattrCallback       ,
    noRepoCommitModifierXattrCallback_WithClosures,
    wrap_RepoCommitModifierXattrCallback    ,


-- ** RepoImportArchiveTranslatePathname #signal:RepoImportArchiveTranslatePathname#

    C_RepoImportArchiveTranslatePathname    ,
    RepoImportArchiveTranslatePathname      ,
    RepoImportArchiveTranslatePathname_WithClosures,
    drop_closures_RepoImportArchiveTranslatePathname,
    dynamic_RepoImportArchiveTranslatePathname,
    genClosure_RepoImportArchiveTranslatePathname,
    mk_RepoImportArchiveTranslatePathname   ,
    noRepoImportArchiveTranslatePathname    ,
    noRepoImportArchiveTranslatePathname_WithClosures,
    wrap_RepoImportArchiveTranslatePathname ,




    ) 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.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.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 GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.FileInfo as Gio.FileInfo
import {-# SOURCE #-} qualified GI.OSTree.Enums as OSTree.Enums
import {-# SOURCE #-} qualified GI.OSTree.Objects.Repo as OSTree.Repo
import {-# SOURCE #-} qualified GI.OSTree.Objects.Sysroot as OSTree.Sysroot
import {-# SOURCE #-} qualified GI.OSTree.Structs.Bootloader as OSTree.Bootloader

-- callback RepoImportArchiveTranslatePathname
{- Callable
  { returnType = Just (TBasicType TUTF8)
  , returnMayBeNull = False
  , returnTransfer = TransferEverything
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "repo"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Repo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Just "Repo" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "stbuf"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "Stat buffer" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "src_path"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "Path in the archive"
                , sinceVersion = Nothing
                }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , 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 = 3
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation
        { rawDocText =
            Just
              "Possibly change a pathname while importing an archive. If %NULL is returned,\nthen @src_path will be used unchanged.  Otherwise, return a new pathname which\nwill be freed via `g_free()`.\n\nThis pathname translation will be performed *before* any processing from an\nactive `OstreeRepoCommitModifier`. Will be invoked for all directory and file\ntypes, first with outer directories, then their sub-files and directories.\n\nNote that enabling pathname translation will always override the setting for\n`use_ostree_convention`."
        , sinceVersion = Just "2017.11"
        }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_RepoImportArchiveTranslatePathname =
    Ptr OSTree.Repo.Repo ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO CString

-- Args: [ Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Just "Repo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "stbuf"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Stat buffer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "src_path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Path in the archive"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , 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 = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_RepoImportArchiveTranslatePathname :: FunPtr C_RepoImportArchiveTranslatePathname -> C_RepoImportArchiveTranslatePathname

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_RepoImportArchiveTranslatePathname ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a) =>
    FunPtr C_RepoImportArchiveTranslatePathname
    -> a
    -- ^ /@repo@/: Repo
    -> Ptr ()
    -- ^ /@stbuf@/: Stat buffer
    -> T.Text
    -- ^ /@srcPath@/: Path in the archive
    -> Ptr ()
    -- ^ /@userData@/: User data
    -> m T.Text
dynamic_RepoImportArchiveTranslatePathname :: FunPtr C_RepoImportArchiveTranslatePathname
-> a -> Ptr () -> Text -> Ptr () -> m Text
dynamic_RepoImportArchiveTranslatePathname FunPtr C_RepoImportArchiveTranslatePathname
__funPtr a
repo Ptr ()
stbuf Text
srcPath Ptr ()
userData = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
repo' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
    CString
srcPath' <- Text -> IO CString
textToCString Text
srcPath
    CString
result <- (FunPtr C_RepoImportArchiveTranslatePathname
-> C_RepoImportArchiveTranslatePathname
__dynamic_C_RepoImportArchiveTranslatePathname FunPtr C_RepoImportArchiveTranslatePathname
__funPtr) Ptr Repo
repo' Ptr ()
stbuf CString
srcPath' Ptr ()
userData
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoImportArchiveTranslatePathname" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
srcPath'
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

-- | Generate a function pointer callable from C code, from a `C_RepoImportArchiveTranslatePathname`.
foreign import ccall "wrapper"
    mk_RepoImportArchiveTranslatePathname :: C_RepoImportArchiveTranslatePathname -> IO (FunPtr C_RepoImportArchiveTranslatePathname)

-- | Possibly change a pathname while importing an archive. If 'P.Nothing' is returned,
-- then /@srcPath@/ will be used unchanged.  Otherwise, return a new pathname which
-- will be freed via @g_free()@.
-- 
-- This pathname translation will be performed *before* any processing from an
-- active @OstreeRepoCommitModifier@. Will be invoked for all directory and file
-- types, first with outer directories, then their sub-files and directories.
-- 
-- Note that enabling pathname translation will always override the setting for
-- @use_ostree_convention@.
-- 
-- /Since: 2017.11/
type RepoImportArchiveTranslatePathname =
    OSTree.Repo.Repo
    -- ^ /@repo@/: Repo
    -> Ptr ()
    -- ^ /@stbuf@/: Stat buffer
    -> T.Text
    -- ^ /@srcPath@/: Path in the archive
    -> IO T.Text

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoImportArchiveTranslatePathname`@.
noRepoImportArchiveTranslatePathname :: Maybe RepoImportArchiveTranslatePathname
noRepoImportArchiveTranslatePathname :: Maybe RepoImportArchiveTranslatePathname
noRepoImportArchiveTranslatePathname = Maybe RepoImportArchiveTranslatePathname
forall a. Maybe a
Nothing

-- | Possibly change a pathname while importing an archive. If 'P.Nothing' is returned,
-- then /@srcPath@/ will be used unchanged.  Otherwise, return a new pathname which
-- will be freed via @g_free()@.
-- 
-- This pathname translation will be performed *before* any processing from an
-- active @OstreeRepoCommitModifier@. Will be invoked for all directory and file
-- types, first with outer directories, then their sub-files and directories.
-- 
-- Note that enabling pathname translation will always override the setting for
-- @use_ostree_convention@.
-- 
-- /Since: 2017.11/
type RepoImportArchiveTranslatePathname_WithClosures =
    OSTree.Repo.Repo
    -- ^ /@repo@/: Repo
    -> Ptr ()
    -- ^ /@stbuf@/: Stat buffer
    -> T.Text
    -- ^ /@srcPath@/: Path in the archive
    -> Ptr ()
    -- ^ /@userData@/: User data
    -> IO T.Text

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoImportArchiveTranslatePathname_WithClosures`@.
noRepoImportArchiveTranslatePathname_WithClosures :: Maybe RepoImportArchiveTranslatePathname_WithClosures
noRepoImportArchiveTranslatePathname_WithClosures :: Maybe RepoImportArchiveTranslatePathname_WithClosures
noRepoImportArchiveTranslatePathname_WithClosures = Maybe RepoImportArchiveTranslatePathname_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_RepoImportArchiveTranslatePathname :: RepoImportArchiveTranslatePathname -> RepoImportArchiveTranslatePathname_WithClosures
drop_closures_RepoImportArchiveTranslatePathname :: RepoImportArchiveTranslatePathname
-> RepoImportArchiveTranslatePathname_WithClosures
drop_closures_RepoImportArchiveTranslatePathname RepoImportArchiveTranslatePathname
_f Repo
repo Ptr ()
stbuf Text
srcPath Ptr ()
_ = RepoImportArchiveTranslatePathname
_f Repo
repo Ptr ()
stbuf Text
srcPath

-- | Wrap the callback into a `GClosure`.
genClosure_RepoImportArchiveTranslatePathname :: MonadIO m => RepoImportArchiveTranslatePathname -> m (GClosure C_RepoImportArchiveTranslatePathname)
genClosure_RepoImportArchiveTranslatePathname :: RepoImportArchiveTranslatePathname
-> m (GClosure C_RepoImportArchiveTranslatePathname)
genClosure_RepoImportArchiveTranslatePathname RepoImportArchiveTranslatePathname
cb = IO (GClosure C_RepoImportArchiveTranslatePathname)
-> m (GClosure C_RepoImportArchiveTranslatePathname)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RepoImportArchiveTranslatePathname)
 -> m (GClosure C_RepoImportArchiveTranslatePathname))
-> IO (GClosure C_RepoImportArchiveTranslatePathname)
-> m (GClosure C_RepoImportArchiveTranslatePathname)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: RepoImportArchiveTranslatePathname_WithClosures
cb' = RepoImportArchiveTranslatePathname
-> RepoImportArchiveTranslatePathname_WithClosures
drop_closures_RepoImportArchiveTranslatePathname RepoImportArchiveTranslatePathname
cb
    let cb'' :: C_RepoImportArchiveTranslatePathname
cb'' = Maybe (Ptr (FunPtr C_RepoImportArchiveTranslatePathname))
-> RepoImportArchiveTranslatePathname_WithClosures
-> C_RepoImportArchiveTranslatePathname
wrap_RepoImportArchiveTranslatePathname Maybe (Ptr (FunPtr C_RepoImportArchiveTranslatePathname))
forall a. Maybe a
Nothing RepoImportArchiveTranslatePathname_WithClosures
cb'
    C_RepoImportArchiveTranslatePathname
-> IO (FunPtr C_RepoImportArchiveTranslatePathname)
mk_RepoImportArchiveTranslatePathname C_RepoImportArchiveTranslatePathname
cb'' IO (FunPtr C_RepoImportArchiveTranslatePathname)
-> (FunPtr C_RepoImportArchiveTranslatePathname
    -> IO (GClosure C_RepoImportArchiveTranslatePathname))
-> IO (GClosure C_RepoImportArchiveTranslatePathname)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RepoImportArchiveTranslatePathname
-> IO (GClosure C_RepoImportArchiveTranslatePathname)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `RepoImportArchiveTranslatePathname` into a `C_RepoImportArchiveTranslatePathname`.
wrap_RepoImportArchiveTranslatePathname ::
    Maybe (Ptr (FunPtr C_RepoImportArchiveTranslatePathname)) ->
    RepoImportArchiveTranslatePathname_WithClosures ->
    C_RepoImportArchiveTranslatePathname
wrap_RepoImportArchiveTranslatePathname :: Maybe (Ptr (FunPtr C_RepoImportArchiveTranslatePathname))
-> RepoImportArchiveTranslatePathname_WithClosures
-> C_RepoImportArchiveTranslatePathname
wrap_RepoImportArchiveTranslatePathname Maybe (Ptr (FunPtr C_RepoImportArchiveTranslatePathname))
funptrptr RepoImportArchiveTranslatePathname_WithClosures
_cb Ptr Repo
repo Ptr ()
stbuf CString
srcPath Ptr ()
userData = do
    Repo
repo' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Repo -> Repo
OSTree.Repo.Repo) Ptr Repo
repo
    Text
srcPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
srcPath
    Text
result <- RepoImportArchiveTranslatePathname_WithClosures
_cb  Repo
repo' Ptr ()
stbuf Text
srcPath' Ptr ()
userData
    Maybe (Ptr (FunPtr C_RepoImportArchiveTranslatePathname)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_RepoImportArchiveTranslatePathname))
funptrptr
    CString
result' <- Text -> IO CString
textToCString Text
result
    CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
result'


-- callback RepoCommitModifierXattrCallback
{- Callable
  { returnType = Just TVariant
  , returnMayBeNull = False
  , returnTransfer = TransferEverything
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "repo"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Repo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "path"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "file_info"
          , argType =
              TInterface Name { namespace = "Gio" , name = "FileInfo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "user_data"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = 3
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_RepoCommitModifierXattrCallback =
    Ptr OSTree.Repo.Repo ->
    CString ->
    Ptr Gio.FileInfo.FileInfo ->
    Ptr () ->
    IO (Ptr GVariant)

-- Args: [ Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "file_info"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "FileInfo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just TVariant
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_RepoCommitModifierXattrCallback :: FunPtr C_RepoCommitModifierXattrCallback -> C_RepoCommitModifierXattrCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_RepoCommitModifierXattrCallback ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a, Gio.FileInfo.IsFileInfo b) =>
    FunPtr C_RepoCommitModifierXattrCallback
    -> a
    -> T.Text
    -> b
    -> Ptr ()
    -> m GVariant
dynamic_RepoCommitModifierXattrCallback :: FunPtr C_RepoCommitModifierXattrCallback
-> a -> Text -> b -> Ptr () -> m GVariant
dynamic_RepoCommitModifierXattrCallback FunPtr C_RepoCommitModifierXattrCallback
__funPtr a
repo Text
path b
fileInfo Ptr ()
userData = IO GVariant -> m GVariant
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
repo' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
    CString
path' <- Text -> IO CString
textToCString Text
path
    Ptr FileInfo
fileInfo' <- b -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
fileInfo
    Ptr GVariant
result <- (FunPtr C_RepoCommitModifierXattrCallback
-> C_RepoCommitModifierXattrCallback
__dynamic_C_RepoCommitModifierXattrCallback FunPtr C_RepoCommitModifierXattrCallback
__funPtr) Ptr Repo
repo' CString
path' Ptr FileInfo
fileInfo' Ptr ()
userData
    Text -> Ptr GVariant -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoCommitModifierXattrCallback" Ptr GVariant
result
    GVariant
result' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
fileInfo
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
    GVariant -> IO GVariant
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result'

-- | Generate a function pointer callable from C code, from a `C_RepoCommitModifierXattrCallback`.
foreign import ccall "wrapper"
    mk_RepoCommitModifierXattrCallback :: C_RepoCommitModifierXattrCallback -> IO (FunPtr C_RepoCommitModifierXattrCallback)

-- | /No description available in the introspection data./
type RepoCommitModifierXattrCallback =
    OSTree.Repo.Repo
    -> T.Text
    -> Gio.FileInfo.FileInfo
    -> IO GVariant

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoCommitModifierXattrCallback`@.
noRepoCommitModifierXattrCallback :: Maybe RepoCommitModifierXattrCallback
noRepoCommitModifierXattrCallback :: Maybe RepoCommitModifierXattrCallback
noRepoCommitModifierXattrCallback = Maybe RepoCommitModifierXattrCallback
forall a. Maybe a
Nothing

-- | /No description available in the introspection data./
type RepoCommitModifierXattrCallback_WithClosures =
    OSTree.Repo.Repo
    -> T.Text
    -> Gio.FileInfo.FileInfo
    -> Ptr ()
    -> IO GVariant

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoCommitModifierXattrCallback_WithClosures`@.
noRepoCommitModifierXattrCallback_WithClosures :: Maybe RepoCommitModifierXattrCallback_WithClosures
noRepoCommitModifierXattrCallback_WithClosures :: Maybe RepoCommitModifierXattrCallback_WithClosures
noRepoCommitModifierXattrCallback_WithClosures = Maybe RepoCommitModifierXattrCallback_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_RepoCommitModifierXattrCallback :: RepoCommitModifierXattrCallback -> RepoCommitModifierXattrCallback_WithClosures
drop_closures_RepoCommitModifierXattrCallback :: RepoCommitModifierXattrCallback
-> RepoCommitModifierXattrCallback_WithClosures
drop_closures_RepoCommitModifierXattrCallback RepoCommitModifierXattrCallback
_f Repo
repo Text
path FileInfo
fileInfo Ptr ()
_ = RepoCommitModifierXattrCallback
_f Repo
repo Text
path FileInfo
fileInfo

-- | Wrap the callback into a `GClosure`.
genClosure_RepoCommitModifierXattrCallback :: MonadIO m => RepoCommitModifierXattrCallback -> m (GClosure C_RepoCommitModifierXattrCallback)
genClosure_RepoCommitModifierXattrCallback :: RepoCommitModifierXattrCallback
-> m (GClosure C_RepoCommitModifierXattrCallback)
genClosure_RepoCommitModifierXattrCallback RepoCommitModifierXattrCallback
cb = IO (GClosure C_RepoCommitModifierXattrCallback)
-> m (GClosure C_RepoCommitModifierXattrCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RepoCommitModifierXattrCallback)
 -> m (GClosure C_RepoCommitModifierXattrCallback))
-> IO (GClosure C_RepoCommitModifierXattrCallback)
-> m (GClosure C_RepoCommitModifierXattrCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: RepoCommitModifierXattrCallback_WithClosures
cb' = RepoCommitModifierXattrCallback
-> RepoCommitModifierXattrCallback_WithClosures
drop_closures_RepoCommitModifierXattrCallback RepoCommitModifierXattrCallback
cb
    let cb'' :: C_RepoCommitModifierXattrCallback
cb'' = Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback))
-> RepoCommitModifierXattrCallback_WithClosures
-> C_RepoCommitModifierXattrCallback
wrap_RepoCommitModifierXattrCallback Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback))
forall a. Maybe a
Nothing RepoCommitModifierXattrCallback_WithClosures
cb'
    C_RepoCommitModifierXattrCallback
-> IO (FunPtr C_RepoCommitModifierXattrCallback)
mk_RepoCommitModifierXattrCallback C_RepoCommitModifierXattrCallback
cb'' IO (FunPtr C_RepoCommitModifierXattrCallback)
-> (FunPtr C_RepoCommitModifierXattrCallback
    -> IO (GClosure C_RepoCommitModifierXattrCallback))
-> IO (GClosure C_RepoCommitModifierXattrCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RepoCommitModifierXattrCallback
-> IO (GClosure C_RepoCommitModifierXattrCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `RepoCommitModifierXattrCallback` into a `C_RepoCommitModifierXattrCallback`.
wrap_RepoCommitModifierXattrCallback ::
    Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback)) ->
    RepoCommitModifierXattrCallback_WithClosures ->
    C_RepoCommitModifierXattrCallback
wrap_RepoCommitModifierXattrCallback :: Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback))
-> RepoCommitModifierXattrCallback_WithClosures
-> C_RepoCommitModifierXattrCallback
wrap_RepoCommitModifierXattrCallback Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback))
funptrptr RepoCommitModifierXattrCallback_WithClosures
_cb Ptr Repo
repo CString
path Ptr FileInfo
fileInfo Ptr ()
userData = do
    Repo
repo' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Repo -> Repo
OSTree.Repo.Repo) Ptr Repo
repo
    Text
path' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
path
    FileInfo
fileInfo' <- ((ManagedPtr FileInfo -> FileInfo) -> Ptr FileInfo -> IO FileInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileInfo -> FileInfo
Gio.FileInfo.FileInfo) Ptr FileInfo
fileInfo
    GVariant
result <- RepoCommitModifierXattrCallback_WithClosures
_cb  Repo
repo' Text
path' FileInfo
fileInfo' Ptr ()
userData
    Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_RepoCommitModifierXattrCallback))
funptrptr
    Ptr GVariant
result' <- GVariant -> IO (Ptr GVariant)
B.GVariant.disownGVariant GVariant
result
    Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
result'


-- callback RepoCommitFilter
{- Callable
  { returnType =
      Just
        (TInterface
           Name { namespace = "OSTree" , name = "RepoCommitFilterResult" })
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation
        { rawDocText =
            Just
              "#OstreeRepoCommitFilterResult saying whether or not to commit this file"
        , sinceVersion = Nothing
        }
  , args =
      [ Arg
          { argCName = "repo"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Repo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Just "Repo" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "path"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "Path to file" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "file_info"
          , argType =
              TInterface Name { namespace = "Gio" , name = "FileInfo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "File information" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , 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 = 3
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_RepoCommitFilter =
    Ptr OSTree.Repo.Repo ->
    CString ->
    Ptr Gio.FileInfo.FileInfo ->
    Ptr () ->
    IO CUInt

-- Args: [ Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Just "Repo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Path to file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "file_info"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "FileInfo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "File information" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , 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 = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "RepoCommitFilterResult" })
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_RepoCommitFilter :: FunPtr C_RepoCommitFilter -> C_RepoCommitFilter

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_RepoCommitFilter ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a, Gio.FileInfo.IsFileInfo b) =>
    FunPtr C_RepoCommitFilter
    -> a
    -- ^ /@repo@/: Repo
    -> T.Text
    -- ^ /@path@/: Path to file
    -> b
    -- ^ /@fileInfo@/: File information
    -> Ptr ()
    -- ^ /@userData@/: User data
    -> m OSTree.Enums.RepoCommitFilterResult
    -- ^ __Returns:__ t'GI.OSTree.Enums.RepoCommitFilterResult' saying whether or not to commit this file
dynamic_RepoCommitFilter :: FunPtr C_RepoCommitFilter
-> a -> Text -> b -> Ptr () -> m RepoCommitFilterResult
dynamic_RepoCommitFilter FunPtr C_RepoCommitFilter
__funPtr a
repo Text
path b
fileInfo Ptr ()
userData = IO RepoCommitFilterResult -> m RepoCommitFilterResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoCommitFilterResult -> m RepoCommitFilterResult)
-> IO RepoCommitFilterResult -> m RepoCommitFilterResult
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
repo' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
    CString
path' <- Text -> IO CString
textToCString Text
path
    Ptr FileInfo
fileInfo' <- b -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
fileInfo
    CUInt
result <- (FunPtr C_RepoCommitFilter -> C_RepoCommitFilter
__dynamic_C_RepoCommitFilter FunPtr C_RepoCommitFilter
__funPtr) Ptr Repo
repo' CString
path' Ptr FileInfo
fileInfo' Ptr ()
userData
    let result' :: RepoCommitFilterResult
result' = (Int -> RepoCommitFilterResult
forall a. Enum a => Int -> a
toEnum (Int -> RepoCommitFilterResult)
-> (CUInt -> Int) -> CUInt -> RepoCommitFilterResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
fileInfo
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
    RepoCommitFilterResult -> IO RepoCommitFilterResult
forall (m :: * -> *) a. Monad m => a -> m a
return RepoCommitFilterResult
result'

-- | Generate a function pointer callable from C code, from a `C_RepoCommitFilter`.
foreign import ccall "wrapper"
    mk_RepoCommitFilter :: C_RepoCommitFilter -> IO (FunPtr C_RepoCommitFilter)

-- | /No description available in the introspection data./
type RepoCommitFilter =
    OSTree.Repo.Repo
    -- ^ /@repo@/: Repo
    -> T.Text
    -- ^ /@path@/: Path to file
    -> Gio.FileInfo.FileInfo
    -- ^ /@fileInfo@/: File information
    -> IO OSTree.Enums.RepoCommitFilterResult
    -- ^ __Returns:__ t'GI.OSTree.Enums.RepoCommitFilterResult' saying whether or not to commit this file

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoCommitFilter`@.
noRepoCommitFilter :: Maybe RepoCommitFilter
noRepoCommitFilter :: Maybe RepoCommitFilter
noRepoCommitFilter = Maybe RepoCommitFilter
forall a. Maybe a
Nothing

-- | /No description available in the introspection data./
type RepoCommitFilter_WithClosures =
    OSTree.Repo.Repo
    -- ^ /@repo@/: Repo
    -> T.Text
    -- ^ /@path@/: Path to file
    -> Gio.FileInfo.FileInfo
    -- ^ /@fileInfo@/: File information
    -> Ptr ()
    -- ^ /@userData@/: User data
    -> IO OSTree.Enums.RepoCommitFilterResult
    -- ^ __Returns:__ t'GI.OSTree.Enums.RepoCommitFilterResult' saying whether or not to commit this file

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoCommitFilter_WithClosures`@.
noRepoCommitFilter_WithClosures :: Maybe RepoCommitFilter_WithClosures
noRepoCommitFilter_WithClosures :: Maybe RepoCommitFilter_WithClosures
noRepoCommitFilter_WithClosures = Maybe RepoCommitFilter_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_RepoCommitFilter :: RepoCommitFilter -> RepoCommitFilter_WithClosures
drop_closures_RepoCommitFilter :: RepoCommitFilter -> RepoCommitFilter_WithClosures
drop_closures_RepoCommitFilter RepoCommitFilter
_f Repo
repo Text
path FileInfo
fileInfo Ptr ()
_ = RepoCommitFilter
_f Repo
repo Text
path FileInfo
fileInfo

-- | Wrap the callback into a `GClosure`.
genClosure_RepoCommitFilter :: MonadIO m => RepoCommitFilter -> m (GClosure C_RepoCommitFilter)
genClosure_RepoCommitFilter :: RepoCommitFilter -> m (GClosure C_RepoCommitFilter)
genClosure_RepoCommitFilter RepoCommitFilter
cb = IO (GClosure C_RepoCommitFilter) -> m (GClosure C_RepoCommitFilter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RepoCommitFilter)
 -> m (GClosure C_RepoCommitFilter))
-> IO (GClosure C_RepoCommitFilter)
-> m (GClosure C_RepoCommitFilter)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: RepoCommitFilter_WithClosures
cb' = RepoCommitFilter -> RepoCommitFilter_WithClosures
drop_closures_RepoCommitFilter RepoCommitFilter
cb
    let cb'' :: C_RepoCommitFilter
cb'' = Maybe (Ptr (FunPtr C_RepoCommitFilter))
-> RepoCommitFilter_WithClosures -> C_RepoCommitFilter
wrap_RepoCommitFilter Maybe (Ptr (FunPtr C_RepoCommitFilter))
forall a. Maybe a
Nothing RepoCommitFilter_WithClosures
cb'
    C_RepoCommitFilter -> IO (FunPtr C_RepoCommitFilter)
mk_RepoCommitFilter C_RepoCommitFilter
cb'' IO (FunPtr C_RepoCommitFilter)
-> (FunPtr C_RepoCommitFilter -> IO (GClosure C_RepoCommitFilter))
-> IO (GClosure C_RepoCommitFilter)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RepoCommitFilter -> IO (GClosure C_RepoCommitFilter)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `RepoCommitFilter` into a `C_RepoCommitFilter`.
wrap_RepoCommitFilter ::
    Maybe (Ptr (FunPtr C_RepoCommitFilter)) ->
    RepoCommitFilter_WithClosures ->
    C_RepoCommitFilter
wrap_RepoCommitFilter :: Maybe (Ptr (FunPtr C_RepoCommitFilter))
-> RepoCommitFilter_WithClosures -> C_RepoCommitFilter
wrap_RepoCommitFilter Maybe (Ptr (FunPtr C_RepoCommitFilter))
funptrptr RepoCommitFilter_WithClosures
_cb Ptr Repo
repo CString
path Ptr FileInfo
fileInfo Ptr ()
userData = do
    Repo
repo' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Repo -> Repo
OSTree.Repo.Repo) Ptr Repo
repo
    Text
path' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
path
    FileInfo
fileInfo' <- ((ManagedPtr FileInfo -> FileInfo) -> Ptr FileInfo -> IO FileInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileInfo -> FileInfo
Gio.FileInfo.FileInfo) Ptr FileInfo
fileInfo
    RepoCommitFilterResult
result <- RepoCommitFilter_WithClosures
_cb  Repo
repo' Text
path' FileInfo
fileInfo' Ptr ()
userData
    Maybe (Ptr (FunPtr C_RepoCommitFilter)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_RepoCommitFilter))
funptrptr
    let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (RepoCommitFilterResult -> Int)
-> RepoCommitFilterResult
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RepoCommitFilterResult -> Int
forall a. Enum a => a -> Int
fromEnum) RepoCommitFilterResult
result
    CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'


-- callback RepoCheckoutFilter
{- Callable
  { returnType =
      Just
        (TInterface
           Name { namespace = "OSTree" , name = "RepoCheckoutFilterResult" })
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation
        { rawDocText =
            Just
              "#OstreeRepoCheckoutFilterResult saying whether or not to checkout this file"
        , sinceVersion = Nothing
        }
  , args =
      [ Arg
          { argCName = "repo"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Repo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Just "Repo" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "path"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation
                { rawDocText = Just "Path to file" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "stbuf"
          , argType = TBasicType TPtr
          , direction = DirectionIn
          , mayBeNull = True
          , argDoc =
              Documentation
                { rawDocText = Just "File information" , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , 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 = 3
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation
        { rawDocText = Nothing , sinceVersion = Just "2018.2" }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_RepoCheckoutFilter =
    Ptr OSTree.Repo.Repo ->
    CString ->
    Ptr () ->
    Ptr () ->
    IO CUInt

-- Args: [ Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Just "Repo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Path to file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "stbuf"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "File information" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , 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 = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "RepoCheckoutFilterResult" })
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_RepoCheckoutFilter :: FunPtr C_RepoCheckoutFilter -> C_RepoCheckoutFilter

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_RepoCheckoutFilter ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a) =>
    FunPtr C_RepoCheckoutFilter
    -> a
    -- ^ /@repo@/: Repo
    -> T.Text
    -- ^ /@path@/: Path to file
    -> Ptr ()
    -- ^ /@stbuf@/: File information
    -> Ptr ()
    -- ^ /@userData@/: User data
    -> m OSTree.Enums.RepoCheckoutFilterResult
    -- ^ __Returns:__ t'GI.OSTree.Enums.RepoCheckoutFilterResult' saying whether or not to checkout this file
dynamic_RepoCheckoutFilter :: FunPtr C_RepoCheckoutFilter
-> a -> Text -> Ptr () -> Ptr () -> m RepoCheckoutFilterResult
dynamic_RepoCheckoutFilter FunPtr C_RepoCheckoutFilter
__funPtr a
repo Text
path Ptr ()
stbuf Ptr ()
userData = IO RepoCheckoutFilterResult -> m RepoCheckoutFilterResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoCheckoutFilterResult -> m RepoCheckoutFilterResult)
-> IO RepoCheckoutFilterResult -> m RepoCheckoutFilterResult
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
repo' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
    CString
path' <- Text -> IO CString
textToCString Text
path
    CUInt
result <- (FunPtr C_RepoCheckoutFilter -> C_RepoCheckoutFilter
__dynamic_C_RepoCheckoutFilter FunPtr C_RepoCheckoutFilter
__funPtr) Ptr Repo
repo' CString
path' Ptr ()
stbuf Ptr ()
userData
    let result' :: RepoCheckoutFilterResult
result' = (Int -> RepoCheckoutFilterResult
forall a. Enum a => Int -> a
toEnum (Int -> RepoCheckoutFilterResult)
-> (CUInt -> Int) -> CUInt -> RepoCheckoutFilterResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
    RepoCheckoutFilterResult -> IO RepoCheckoutFilterResult
forall (m :: * -> *) a. Monad m => a -> m a
return RepoCheckoutFilterResult
result'

-- | Generate a function pointer callable from C code, from a `C_RepoCheckoutFilter`.
foreign import ccall "wrapper"
    mk_RepoCheckoutFilter :: C_RepoCheckoutFilter -> IO (FunPtr C_RepoCheckoutFilter)

-- | /No description available in the introspection data./
-- 
-- /Since: 2018.2/
type RepoCheckoutFilter =
    OSTree.Repo.Repo
    -- ^ /@repo@/: Repo
    -> T.Text
    -- ^ /@path@/: Path to file
    -> Ptr ()
    -- ^ /@stbuf@/: File information
    -> IO OSTree.Enums.RepoCheckoutFilterResult
    -- ^ __Returns:__ t'GI.OSTree.Enums.RepoCheckoutFilterResult' saying whether or not to checkout this file

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoCheckoutFilter`@.
noRepoCheckoutFilter :: Maybe RepoCheckoutFilter
noRepoCheckoutFilter :: Maybe RepoCheckoutFilter
noRepoCheckoutFilter = Maybe RepoCheckoutFilter
forall a. Maybe a
Nothing

-- | /No description available in the introspection data./
-- 
-- /Since: 2018.2/
type RepoCheckoutFilter_WithClosures =
    OSTree.Repo.Repo
    -- ^ /@repo@/: Repo
    -> T.Text
    -- ^ /@path@/: Path to file
    -> Ptr ()
    -- ^ /@stbuf@/: File information
    -> Ptr ()
    -- ^ /@userData@/: User data
    -> IO OSTree.Enums.RepoCheckoutFilterResult
    -- ^ __Returns:__ t'GI.OSTree.Enums.RepoCheckoutFilterResult' saying whether or not to checkout this file

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoCheckoutFilter_WithClosures`@.
noRepoCheckoutFilter_WithClosures :: Maybe RepoCheckoutFilter_WithClosures
noRepoCheckoutFilter_WithClosures :: Maybe RepoCheckoutFilter_WithClosures
noRepoCheckoutFilter_WithClosures = Maybe RepoCheckoutFilter_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_RepoCheckoutFilter :: RepoCheckoutFilter -> RepoCheckoutFilter_WithClosures
drop_closures_RepoCheckoutFilter :: RepoCheckoutFilter -> RepoCheckoutFilter_WithClosures
drop_closures_RepoCheckoutFilter RepoCheckoutFilter
_f Repo
repo Text
path Ptr ()
stbuf Ptr ()
_ = RepoCheckoutFilter
_f Repo
repo Text
path Ptr ()
stbuf

-- | Wrap the callback into a `GClosure`.
genClosure_RepoCheckoutFilter :: MonadIO m => RepoCheckoutFilter -> m (GClosure C_RepoCheckoutFilter)
genClosure_RepoCheckoutFilter :: RepoCheckoutFilter -> m (GClosure C_RepoCheckoutFilter)
genClosure_RepoCheckoutFilter RepoCheckoutFilter
cb = IO (GClosure C_RepoCheckoutFilter)
-> m (GClosure C_RepoCheckoutFilter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RepoCheckoutFilter)
 -> m (GClosure C_RepoCheckoutFilter))
-> IO (GClosure C_RepoCheckoutFilter)
-> m (GClosure C_RepoCheckoutFilter)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: RepoCheckoutFilter_WithClosures
cb' = RepoCheckoutFilter -> RepoCheckoutFilter_WithClosures
drop_closures_RepoCheckoutFilter RepoCheckoutFilter
cb
    let cb'' :: C_RepoCheckoutFilter
cb'' = Maybe (Ptr (FunPtr C_RepoCheckoutFilter))
-> RepoCheckoutFilter_WithClosures -> C_RepoCheckoutFilter
wrap_RepoCheckoutFilter Maybe (Ptr (FunPtr C_RepoCheckoutFilter))
forall a. Maybe a
Nothing RepoCheckoutFilter_WithClosures
cb'
    C_RepoCheckoutFilter -> IO (FunPtr C_RepoCheckoutFilter)
mk_RepoCheckoutFilter C_RepoCheckoutFilter
cb'' IO (FunPtr C_RepoCheckoutFilter)
-> (FunPtr C_RepoCheckoutFilter
    -> IO (GClosure C_RepoCheckoutFilter))
-> IO (GClosure C_RepoCheckoutFilter)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RepoCheckoutFilter -> IO (GClosure C_RepoCheckoutFilter)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `RepoCheckoutFilter` into a `C_RepoCheckoutFilter`.
wrap_RepoCheckoutFilter ::
    Maybe (Ptr (FunPtr C_RepoCheckoutFilter)) ->
    RepoCheckoutFilter_WithClosures ->
    C_RepoCheckoutFilter
wrap_RepoCheckoutFilter :: Maybe (Ptr (FunPtr C_RepoCheckoutFilter))
-> RepoCheckoutFilter_WithClosures -> C_RepoCheckoutFilter
wrap_RepoCheckoutFilter Maybe (Ptr (FunPtr C_RepoCheckoutFilter))
funptrptr RepoCheckoutFilter_WithClosures
_cb Ptr Repo
repo CString
path Ptr ()
stbuf Ptr ()
userData = do
    Repo
repo' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Repo -> Repo
OSTree.Repo.Repo) Ptr Repo
repo
    Text
path' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
path
    RepoCheckoutFilterResult
result <- RepoCheckoutFilter_WithClosures
_cb  Repo
repo' Text
path' Ptr ()
stbuf Ptr ()
userData
    Maybe (Ptr (FunPtr C_RepoCheckoutFilter)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_RepoCheckoutFilter))
funptrptr
    let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (RepoCheckoutFilterResult -> Int)
-> RepoCheckoutFilterResult
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RepoCheckoutFilterResult -> Int
forall a. Enum a => a -> Int
fromEnum) RepoCheckoutFilterResult
result
    CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'


-- callback CmdPrivateVTableOstreeSystemGeneratorFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "ostree_cmdline"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "normal_dir"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "early_dir"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "late_dir"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback =
    CString ->
    CString ->
    CString ->
    CString ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "ostree_cmdline"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "normal_dir"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "early_dir"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "late_dir"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , 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 "dynamic" __dynamic_C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback :: FunPtr C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback -> C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CmdPrivateVTableOstreeSystemGeneratorFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback
    -> T.Text
    -> T.Text
    -> T.Text
    -> T.Text
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_CmdPrivateVTableOstreeSystemGeneratorFieldCallback :: FunPtr C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback
-> Text -> Text -> Text -> Text -> m ()
dynamic_CmdPrivateVTableOstreeSystemGeneratorFieldCallback FunPtr C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback
__funPtr Text
ostreeCmdline Text
normalDir Text
earlyDir Text
lateDir = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
ostreeCmdline' <- Text -> IO CString
textToCString Text
ostreeCmdline
    CString
normalDir' <- Text -> IO CString
textToCString Text
normalDir
    CString
earlyDir' <- Text -> IO CString
textToCString Text
earlyDir
    CString
lateDir' <- Text -> IO CString
textToCString Text
lateDir
    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
$ (FunPtr C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback
-> C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback
__dynamic_C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback FunPtr C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback
__funPtr) CString
ostreeCmdline' CString
normalDir' CString
earlyDir' CString
lateDir'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
ostreeCmdline'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
normalDir'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
earlyDir'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
lateDir'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
ostreeCmdline'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
normalDir'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
earlyDir'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
lateDir'
     )

-- | Generate a function pointer callable from C code, from a `C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback`.
foreign import ccall "wrapper"
    mk_CmdPrivateVTableOstreeSystemGeneratorFieldCallback :: C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback -> IO (FunPtr C_CmdPrivateVTableOstreeSystemGeneratorFieldCallback)

-- | /No description available in the introspection data./
type CmdPrivateVTableOstreeSystemGeneratorFieldCallback =
    T.Text
    -> T.Text
    -> T.Text
    -> T.Text
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `CmdPrivateVTableOstreeSystemGeneratorFieldCallback`@.
noCmdPrivateVTableOstreeSystemGeneratorFieldCallback :: Maybe CmdPrivateVTableOstreeSystemGeneratorFieldCallback
noCmdPrivateVTableOstreeSystemGeneratorFieldCallback :: Maybe CmdPrivateVTableOstreeSystemGeneratorFieldCallback
noCmdPrivateVTableOstreeSystemGeneratorFieldCallback = Maybe CmdPrivateVTableOstreeSystemGeneratorFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "repo"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Repo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "delta_id"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "out_exists"
          , argType = TBasicType TBoolean
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , 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 = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback =
    Ptr OSTree.Repo.Repo ->
    CString ->
    CInt ->
    Ptr Gio.Cancellable.Cancellable ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "delta_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_exists"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = False
--           , 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 "dynamic" __dynamic_C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback :: FunPtr C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback -> C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a, Gio.Cancellable.IsCancellable b) =>
    FunPtr C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
    -> a
    -> T.Text
    -> Bool
    -> b
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback :: FunPtr C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
-> a -> Text -> Bool -> b -> m ()
dynamic_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback FunPtr C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
__funPtr a
repo Text
deltaId Bool
outExists 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 Repo
repo' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
    CString
deltaId' <- Text -> IO CString
textToCString Text
deltaId
    let outExists' :: CInt
outExists' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
outExists
    Ptr Cancellable
cancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
cancellable
    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
$ (FunPtr C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
-> C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
__dynamic_C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback FunPtr C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
__funPtr) Ptr Repo
repo' CString
deltaId' CInt
outExists' Ptr Cancellable
cancellable'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
cancellable
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
deltaId'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
deltaId'
     )

-- | Generate a function pointer callable from C code, from a `C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback`.
foreign import ccall "wrapper"
    mk_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback :: C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback -> IO (FunPtr C_CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback)

-- | /No description available in the introspection data./
type CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback =
    OSTree.Repo.Repo
    -> T.Text
    -> Bool
    -> Gio.Cancellable.Cancellable
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback`@.
noCmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback :: Maybe CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
noCmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback :: Maybe CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
noCmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback = Maybe CmdPrivateVTableOstreeStaticDeltaQueryExistsFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "repo"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Repo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "delta_id"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , 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 = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback =
    Ptr OSTree.Repo.Repo ->
    CString ->
    Ptr Gio.Cancellable.Cancellable ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "delta_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = False
--           , 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 "dynamic" __dynamic_C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback :: FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback -> C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a, Gio.Cancellable.IsCancellable b) =>
    FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
    -> a
    -> T.Text
    -> b
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback :: FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
-> a -> Text -> b -> m ()
dynamic_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
__funPtr a
repo Text
deltaId 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 Repo
repo' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
    CString
deltaId' <- Text -> IO CString
textToCString Text
deltaId
    Ptr Cancellable
cancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
cancellable
    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
$ (FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
-> C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
__dynamic_C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
__funPtr) Ptr Repo
repo' CString
deltaId' Ptr Cancellable
cancellable'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
cancellable
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
deltaId'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
deltaId'
     )

-- | Generate a function pointer callable from C code, from a `C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback`.
foreign import ccall "wrapper"
    mk_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback :: C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback -> IO (FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback)

-- | /No description available in the introspection data./
type CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback =
    OSTree.Repo.Repo
    -> T.Text
    -> Gio.Cancellable.Cancellable
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback`@.
noCmdPrivateVTableOstreeStaticDeltaDumpFieldCallback :: Maybe CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
noCmdPrivateVTableOstreeStaticDeltaDumpFieldCallback :: Maybe CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
noCmdPrivateVTableOstreeStaticDeltaDumpFieldCallback = Maybe CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "repo"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Repo" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "delta_id"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , 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 = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback =
    Ptr OSTree.Repo.Repo ->
    CString ->
    Ptr Gio.Cancellable.Cancellable ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "delta_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = False
--           , 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 "dynamic" __dynamic_C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback :: FunPtr C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback -> C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a, Gio.Cancellable.IsCancellable b) =>
    FunPtr C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback
    -> a
    -> T.Text
    -> b
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback :: FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
-> a -> Text -> b -> m ()
dynamic_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
__funPtr a
repo Text
deltaId 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 Repo
repo' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
    CString
deltaId' <- Text -> IO CString
textToCString Text
deltaId
    Ptr Cancellable
cancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
cancellable
    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
$ (FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
-> C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
__dynamic_C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback FunPtr C_CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
__funPtr) Ptr Repo
repo' CString
deltaId' Ptr Cancellable
cancellable'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
cancellable
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
deltaId'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
deltaId'
     )

-- | Generate a function pointer callable from C code, from a `C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback`.
foreign import ccall "wrapper"
    mk_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback :: C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback -> IO (FunPtr C_CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback)

-- | /No description available in the introspection data./
type CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback =
    OSTree.Repo.Repo
    -> T.Text
    -> Gio.Cancellable.Cancellable
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback`@.
noCmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback :: Maybe CmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback
noCmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback :: Maybe CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
noCmdPrivateVTableOstreeStaticDeltaDeleteFieldCallback = Maybe CmdPrivateVTableOstreeStaticDeltaDumpFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "collection_id"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "ref_name"
          , argType = TBasicType TUTF8
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "commit"
          , argType = TVariant
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback =
    CString ->
    CString ->
    Ptr GVariant ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "collection_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ref_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "commit"
--           , argType = TVariant
--           , direction = DirectionIn
--           , mayBeNull = False
--           , 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 "dynamic" __dynamic_C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback :: FunPtr C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback -> C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
    -> T.Text
    -> T.Text
    -> GVariant
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback :: FunPtr C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
-> Text -> Text -> GVariant -> m ()
dynamic_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback FunPtr C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
__funPtr Text
collectionId Text
refName GVariant
commit = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
collectionId' <- Text -> IO CString
textToCString Text
collectionId
    CString
refName' <- Text -> IO CString
textToCString Text
refName
    Ptr GVariant
commit' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
commit
    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
$ (FunPtr C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
-> C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
__dynamic_C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback FunPtr C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
__funPtr) CString
collectionId' CString
refName' Ptr GVariant
commit'
        GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
commit
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
collectionId'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refName'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
collectionId'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refName'
     )

-- | Generate a function pointer callable from C code, from a `C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback`.
foreign import ccall "wrapper"
    mk_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback :: C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback -> IO (FunPtr C_CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback)

-- | /No description available in the introspection data./
type CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback =
    T.Text
    -> T.Text
    -> GVariant
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback`@.
noCmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback :: Maybe CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
noCmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback :: Maybe CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
noCmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback = Maybe CmdPrivateVTableOstreeRepoVerifyBindingsFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "sysroot"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Sysroot" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "bootversion"
          , argType = TBasicType TInt
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "target_fd"
          , argType = TBasicType TInt
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , 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 = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback =
    Ptr OSTree.Sysroot.Sysroot ->
    Int32 ->
    Int32 ->
    Ptr Gio.Cancellable.Cancellable ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "sysroot"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Sysroot" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bootversion"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target_fd"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = False
--           , 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 "dynamic" __dynamic_C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback :: FunPtr C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback -> C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Sysroot.IsSysroot a, Gio.Cancellable.IsCancellable b) =>
    FunPtr C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
    -> a
    -> Int32
    -> Int32
    -> b
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback :: FunPtr C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
-> a -> Int32 -> Int32 -> b -> m ()
dynamic_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback FunPtr C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
__funPtr a
sysroot Int32
bootversion Int32
targetFd 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 Sysroot
sysroot' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sysroot
    Ptr Cancellable
cancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
cancellable
    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
$ (FunPtr C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
-> C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
__dynamic_C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback FunPtr C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
__funPtr) Ptr Sysroot
sysroot' Int32
bootversion Int32
targetFd Ptr Cancellable
cancellable'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sysroot
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
cancellable
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

-- | Generate a function pointer callable from C code, from a `C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback`.
foreign import ccall "wrapper"
    mk_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback :: C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback -> IO (FunPtr C_CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback)

-- | /No description available in the introspection data./
type CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback =
    OSTree.Sysroot.Sysroot
    -> Int32
    -> Int32
    -> Gio.Cancellable.Cancellable
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback`@.
noCmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback :: Maybe CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
noCmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback :: Maybe CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
noCmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback = Maybe CmdPrivateVTableOstreeGenerateGrub2ConfigFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback CmdPrivateVTableOstreeFinalizeStagedFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "sysroot"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Sysroot" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , 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 = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback =
    Ptr OSTree.Sysroot.Sysroot ->
    Ptr Gio.Cancellable.Cancellable ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "sysroot"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Sysroot" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = False
--           , 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 "dynamic" __dynamic_C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback :: FunPtr C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback -> C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CmdPrivateVTableOstreeFinalizeStagedFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Sysroot.IsSysroot a, Gio.Cancellable.IsCancellable b) =>
    FunPtr C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback
    -> a
    -> b
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_CmdPrivateVTableOstreeFinalizeStagedFieldCallback :: FunPtr C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback
-> a -> b -> m ()
dynamic_CmdPrivateVTableOstreeFinalizeStagedFieldCallback FunPtr C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback
__funPtr a
sysroot 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 Sysroot
sysroot' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sysroot
    Ptr Cancellable
cancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
cancellable
    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
$ (FunPtr C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback
-> C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback
__dynamic_C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback FunPtr C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback
__funPtr) Ptr Sysroot
sysroot' Ptr Cancellable
cancellable'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sysroot
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
cancellable
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

-- | Generate a function pointer callable from C code, from a `C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback`.
foreign import ccall "wrapper"
    mk_CmdPrivateVTableOstreeFinalizeStagedFieldCallback :: C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback -> IO (FunPtr C_CmdPrivateVTableOstreeFinalizeStagedFieldCallback)

-- | /No description available in the introspection data./
type CmdPrivateVTableOstreeFinalizeStagedFieldCallback =
    OSTree.Sysroot.Sysroot
    -> Gio.Cancellable.Cancellable
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `CmdPrivateVTableOstreeFinalizeStagedFieldCallback`@.
noCmdPrivateVTableOstreeFinalizeStagedFieldCallback :: Maybe CmdPrivateVTableOstreeFinalizeStagedFieldCallback
noCmdPrivateVTableOstreeFinalizeStagedFieldCallback :: Maybe CmdPrivateVTableOstreeFinalizeStagedFieldCallback
noCmdPrivateVTableOstreeFinalizeStagedFieldCallback = Maybe CmdPrivateVTableOstreeFinalizeStagedFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback BootloaderInterfaceQueryFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "bootloader"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Bootloader" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      , Arg
          { argCName = "out_is_active"
          , argType = TBasicType TBoolean
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , 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 = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_BootloaderInterfaceQueryFieldCallback =
    Ptr OSTree.Bootloader.Bootloader ->
    CInt ->
    Ptr Gio.Cancellable.Cancellable ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "bootloader"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Bootloader" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_is_active"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = False
--           , 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 "dynamic" __dynamic_C_BootloaderInterfaceQueryFieldCallback :: FunPtr C_BootloaderInterfaceQueryFieldCallback -> C_BootloaderInterfaceQueryFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_BootloaderInterfaceQueryFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
    FunPtr C_BootloaderInterfaceQueryFieldCallback
    -> OSTree.Bootloader.Bootloader
    -> Bool
    -> a
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_BootloaderInterfaceQueryFieldCallback :: FunPtr C_BootloaderInterfaceQueryFieldCallback
-> Bootloader -> Bool -> a -> m ()
dynamic_BootloaderInterfaceQueryFieldCallback FunPtr C_BootloaderInterfaceQueryFieldCallback
__funPtr Bootloader
bootloader Bool
outIsActive a
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 Bootloader
bootloader' <- Bootloader -> IO (Ptr Bootloader)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bootloader
bootloader
    let outIsActive' :: CInt
outIsActive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
outIsActive
    Ptr Cancellable
cancellable' <- a -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
cancellable
    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
$ (FunPtr C_BootloaderInterfaceQueryFieldCallback
-> C_BootloaderInterfaceQueryFieldCallback
__dynamic_C_BootloaderInterfaceQueryFieldCallback FunPtr C_BootloaderInterfaceQueryFieldCallback
__funPtr) Ptr Bootloader
bootloader' CInt
outIsActive' Ptr Cancellable
cancellable'
        Bootloader -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bootloader
bootloader
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
cancellable
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

-- | Generate a function pointer callable from C code, from a `C_BootloaderInterfaceQueryFieldCallback`.
foreign import ccall "wrapper"
    mk_BootloaderInterfaceQueryFieldCallback :: C_BootloaderInterfaceQueryFieldCallback -> IO (FunPtr C_BootloaderInterfaceQueryFieldCallback)

-- | /No description available in the introspection data./
type BootloaderInterfaceQueryFieldCallback =
    OSTree.Bootloader.Bootloader
    -> Bool
    -> Gio.Cancellable.Cancellable
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `BootloaderInterfaceQueryFieldCallback`@.
noBootloaderInterfaceQueryFieldCallback :: Maybe BootloaderInterfaceQueryFieldCallback
noBootloaderInterfaceQueryFieldCallback :: Maybe BootloaderInterfaceQueryFieldCallback
noBootloaderInterfaceQueryFieldCallback = Maybe BootloaderInterfaceQueryFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback BootloaderInterfacePostBlsSyncFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "self"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Bootloader" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , 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 = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = True
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_BootloaderInterfacePostBlsSyncFieldCallback =
    Ptr OSTree.Bootloader.Bootloader ->
    Ptr Gio.Cancellable.Cancellable ->
    Ptr (Ptr GError) ->
    IO CInt

-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Bootloader" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = False
--           , 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 "dynamic" __dynamic_C_BootloaderInterfacePostBlsSyncFieldCallback :: FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback -> C_BootloaderInterfacePostBlsSyncFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_BootloaderInterfacePostBlsSyncFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
    FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
    -> OSTree.Bootloader.Bootloader
    -> a
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dynamic_BootloaderInterfacePostBlsSyncFieldCallback :: FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
-> Bootloader -> a -> m ()
dynamic_BootloaderInterfacePostBlsSyncFieldCallback FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
__funPtr Bootloader
self a
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 Bootloader
self' <- Bootloader -> IO (Ptr Bootloader)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bootloader
self
    Ptr Cancellable
cancellable' <- a -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
cancellable
    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
$ (FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
-> C_BootloaderInterfacePostBlsSyncFieldCallback
__dynamic_C_BootloaderInterfacePostBlsSyncFieldCallback FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
__funPtr) Ptr Bootloader
self' Ptr Cancellable
cancellable'
        Bootloader -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bootloader
self
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
cancellable
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

-- | Generate a function pointer callable from C code, from a `C_BootloaderInterfacePostBlsSyncFieldCallback`.
foreign import ccall "wrapper"
    mk_BootloaderInterfacePostBlsSyncFieldCallback :: C_BootloaderInterfacePostBlsSyncFieldCallback -> IO (FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback)

-- | /No description available in the introspection data./
type BootloaderInterfacePostBlsSyncFieldCallback =
    OSTree.Bootloader.Bootloader
    -> Gio.Cancellable.Cancellable
    -> IO ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

-- | A convenience synonym for @`Nothing` :: `Maybe` `BootloaderInterfacePostBlsSyncFieldCallback`@.
noBootloaderInterfacePostBlsSyncFieldCallback :: Maybe BootloaderInterfacePostBlsSyncFieldCallback
noBootloaderInterfacePostBlsSyncFieldCallback :: Maybe BootloaderInterfacePostBlsSyncFieldCallback
noBootloaderInterfacePostBlsSyncFieldCallback = Maybe BootloaderInterfacePostBlsSyncFieldCallback
forall a. Maybe a
Nothing

-- No Haskell->C wrapper generated since the function throws.

-- callback BootloaderInterfaceIsAtomicFieldCallback
{- Callable
  { returnType = Just (TBasicType TBoolean)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "self"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Bootloader" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_BootloaderInterfaceIsAtomicFieldCallback =
    Ptr OSTree.Bootloader.Bootloader ->
    IO CInt

-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Bootloader" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 "dynamic" __dynamic_C_BootloaderInterfaceIsAtomicFieldCallback :: FunPtr C_BootloaderInterfaceIsAtomicFieldCallback -> C_BootloaderInterfaceIsAtomicFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_BootloaderInterfaceIsAtomicFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
    -> OSTree.Bootloader.Bootloader
    -> m Bool
dynamic_BootloaderInterfaceIsAtomicFieldCallback :: FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
-> Bootloader -> m Bool
dynamic_BootloaderInterfaceIsAtomicFieldCallback FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
__funPtr Bootloader
self = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Bootloader
self' <- Bootloader -> IO (Ptr Bootloader)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bootloader
self
    CInt
result <- (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
-> C_BootloaderInterfaceIsAtomicFieldCallback
__dynamic_C_BootloaderInterfaceIsAtomicFieldCallback FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
__funPtr) Ptr Bootloader
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    Bootloader -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bootloader
self
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

-- | Generate a function pointer callable from C code, from a `C_BootloaderInterfaceIsAtomicFieldCallback`.
foreign import ccall "wrapper"
    mk_BootloaderInterfaceIsAtomicFieldCallback :: C_BootloaderInterfaceIsAtomicFieldCallback -> IO (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback)

-- | /No description available in the introspection data./
type BootloaderInterfaceIsAtomicFieldCallback =
    OSTree.Bootloader.Bootloader
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `BootloaderInterfaceIsAtomicFieldCallback`@.
noBootloaderInterfaceIsAtomicFieldCallback :: Maybe BootloaderInterfaceIsAtomicFieldCallback
noBootloaderInterfaceIsAtomicFieldCallback :: Maybe BootloaderInterfaceIsAtomicFieldCallback
noBootloaderInterfaceIsAtomicFieldCallback = Maybe BootloaderInterfaceIsAtomicFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_BootloaderInterfaceIsAtomicFieldCallback :: MonadIO m => BootloaderInterfaceIsAtomicFieldCallback -> m (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
genClosure_BootloaderInterfaceIsAtomicFieldCallback :: BootloaderInterfaceIsAtomicFieldCallback
-> m (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
genClosure_BootloaderInterfaceIsAtomicFieldCallback BootloaderInterfaceIsAtomicFieldCallback
cb = IO (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
-> m (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
 -> m (GClosure C_BootloaderInterfaceIsAtomicFieldCallback))
-> IO (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
-> m (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_BootloaderInterfaceIsAtomicFieldCallback
cb' = Maybe (Ptr (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback))
-> BootloaderInterfaceIsAtomicFieldCallback
-> C_BootloaderInterfaceIsAtomicFieldCallback
wrap_BootloaderInterfaceIsAtomicFieldCallback Maybe (Ptr (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback))
forall a. Maybe a
Nothing BootloaderInterfaceIsAtomicFieldCallback
cb
    C_BootloaderInterfaceIsAtomicFieldCallback
-> IO (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback)
mk_BootloaderInterfaceIsAtomicFieldCallback C_BootloaderInterfaceIsAtomicFieldCallback
cb' IO (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback)
-> (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
    -> IO (GClosure C_BootloaderInterfaceIsAtomicFieldCallback))
-> IO (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
-> IO (GClosure C_BootloaderInterfaceIsAtomicFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `BootloaderInterfaceIsAtomicFieldCallback` into a `C_BootloaderInterfaceIsAtomicFieldCallback`.
wrap_BootloaderInterfaceIsAtomicFieldCallback ::
    Maybe (Ptr (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback)) ->
    BootloaderInterfaceIsAtomicFieldCallback ->
    C_BootloaderInterfaceIsAtomicFieldCallback
wrap_BootloaderInterfaceIsAtomicFieldCallback :: Maybe (Ptr (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback))
-> BootloaderInterfaceIsAtomicFieldCallback
-> C_BootloaderInterfaceIsAtomicFieldCallback
wrap_BootloaderInterfaceIsAtomicFieldCallback Maybe (Ptr (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback))
funptrptr BootloaderInterfaceIsAtomicFieldCallback
_cb Ptr Bootloader
self = do
    Bootloader
self' <- ((ManagedPtr Bootloader -> Bootloader)
-> Ptr Bootloader -> IO Bootloader
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Bootloader -> Bootloader
OSTree.Bootloader.Bootloader) Ptr Bootloader
self
    Bool
result <- BootloaderInterfaceIsAtomicFieldCallback
_cb  Bootloader
self'
    Maybe (Ptr (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BootloaderInterfaceIsAtomicFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback BootloaderInterfaceGetNameFieldCallback
{- Callable
  { returnType = Just (TBasicType TUTF8)
  , returnMayBeNull = False
  , returnTransfer = TransferNothing
  , returnDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , args =
      [ Arg
          { argCName = "self"
          , argType =
              TInterface Name { namespace = "OSTree" , name = "Bootloader" }
          , direction = DirectionIn
          , mayBeNull = False
          , argDoc =
              Documentation { rawDocText = Nothing , sinceVersion = Nothing }
          , argScope = ScopeTypeInvalid
          , argClosure = -1
          , argDestroy = -1
          , argCallerAllocates = False
          , transfer = TransferNothing
          }
      ]
  , skipReturn = False
  , callableThrows = False
  , callableDeprecated = Nothing
  , callableDocumentation =
      Documentation { rawDocText = Nothing , sinceVersion = Nothing }
  , callableResolvable = Nothing
  }
-}
-- | Type for the callback on the (unwrapped) C side.
type C_BootloaderInterfaceGetNameFieldCallback =
    Ptr OSTree.Bootloader.Bootloader ->
    IO CString

-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Bootloader" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 "dynamic" __dynamic_C_BootloaderInterfaceGetNameFieldCallback :: FunPtr C_BootloaderInterfaceGetNameFieldCallback -> C_BootloaderInterfaceGetNameFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_BootloaderInterfaceGetNameFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_BootloaderInterfaceGetNameFieldCallback
    -> OSTree.Bootloader.Bootloader
    -> m T.Text
dynamic_BootloaderInterfaceGetNameFieldCallback :: FunPtr C_BootloaderInterfaceGetNameFieldCallback
-> Bootloader -> m Text
dynamic_BootloaderInterfaceGetNameFieldCallback FunPtr C_BootloaderInterfaceGetNameFieldCallback
__funPtr Bootloader
self = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Bootloader
self' <- Bootloader -> IO (Ptr Bootloader)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bootloader
self
    CString
result <- (FunPtr C_BootloaderInterfaceGetNameFieldCallback
-> C_BootloaderInterfaceGetNameFieldCallback
__dynamic_C_BootloaderInterfaceGetNameFieldCallback FunPtr C_BootloaderInterfaceGetNameFieldCallback
__funPtr) Ptr Bootloader
self'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bootloaderInterfaceGetNameFieldCallback" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    Bootloader -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bootloader
self
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

-- | Generate a function pointer callable from C code, from a `C_BootloaderInterfaceGetNameFieldCallback`.
foreign import ccall "wrapper"
    mk_BootloaderInterfaceGetNameFieldCallback :: C_BootloaderInterfaceGetNameFieldCallback -> IO (FunPtr C_BootloaderInterfaceGetNameFieldCallback)

-- | /No description available in the introspection data./
type BootloaderInterfaceGetNameFieldCallback =
    OSTree.Bootloader.Bootloader
    -> IO T.Text

-- | A convenience synonym for @`Nothing` :: `Maybe` `BootloaderInterfaceGetNameFieldCallback`@.
noBootloaderInterfaceGetNameFieldCallback :: Maybe BootloaderInterfaceGetNameFieldCallback
noBootloaderInterfaceGetNameFieldCallback :: Maybe BootloaderInterfaceGetNameFieldCallback
noBootloaderInterfaceGetNameFieldCallback = Maybe BootloaderInterfaceGetNameFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_BootloaderInterfaceGetNameFieldCallback :: MonadIO m => BootloaderInterfaceGetNameFieldCallback -> m (GClosure C_BootloaderInterfaceGetNameFieldCallback)
genClosure_BootloaderInterfaceGetNameFieldCallback :: BootloaderInterfaceGetNameFieldCallback
-> m (GClosure C_BootloaderInterfaceGetNameFieldCallback)
genClosure_BootloaderInterfaceGetNameFieldCallback BootloaderInterfaceGetNameFieldCallback
cb = IO (GClosure C_BootloaderInterfaceGetNameFieldCallback)
-> m (GClosure C_BootloaderInterfaceGetNameFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BootloaderInterfaceGetNameFieldCallback)
 -> m (GClosure C_BootloaderInterfaceGetNameFieldCallback))
-> IO (GClosure C_BootloaderInterfaceGetNameFieldCallback)
-> m (GClosure C_BootloaderInterfaceGetNameFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_BootloaderInterfaceGetNameFieldCallback
cb' = Maybe (Ptr (FunPtr C_BootloaderInterfaceGetNameFieldCallback))
-> BootloaderInterfaceGetNameFieldCallback
-> C_BootloaderInterfaceGetNameFieldCallback
wrap_BootloaderInterfaceGetNameFieldCallback Maybe (Ptr (FunPtr C_BootloaderInterfaceGetNameFieldCallback))
forall a. Maybe a
Nothing BootloaderInterfaceGetNameFieldCallback
cb
    C_BootloaderInterfaceGetNameFieldCallback
-> IO (FunPtr C_BootloaderInterfaceGetNameFieldCallback)
mk_BootloaderInterfaceGetNameFieldCallback C_BootloaderInterfaceGetNameFieldCallback
cb' IO (FunPtr C_BootloaderInterfaceGetNameFieldCallback)
-> (FunPtr C_BootloaderInterfaceGetNameFieldCallback
    -> IO (GClosure C_BootloaderInterfaceGetNameFieldCallback))
-> IO (GClosure C_BootloaderInterfaceGetNameFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BootloaderInterfaceGetNameFieldCallback
-> IO (GClosure C_BootloaderInterfaceGetNameFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `BootloaderInterfaceGetNameFieldCallback` into a `C_BootloaderInterfaceGetNameFieldCallback`.
wrap_BootloaderInterfaceGetNameFieldCallback ::
    Maybe (Ptr (FunPtr C_BootloaderInterfaceGetNameFieldCallback)) ->
    BootloaderInterfaceGetNameFieldCallback ->
    C_BootloaderInterfaceGetNameFieldCallback
wrap_BootloaderInterfaceGetNameFieldCallback :: Maybe (Ptr (FunPtr C_BootloaderInterfaceGetNameFieldCallback))
-> BootloaderInterfaceGetNameFieldCallback
-> C_BootloaderInterfaceGetNameFieldCallback
wrap_BootloaderInterfaceGetNameFieldCallback Maybe (Ptr (FunPtr C_BootloaderInterfaceGetNameFieldCallback))
funptrptr BootloaderInterfaceGetNameFieldCallback
_cb Ptr Bootloader
self = do
    Bootloader
self' <- ((ManagedPtr Bootloader -> Bootloader)
-> Ptr Bootloader -> IO Bootloader
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Bootloader -> Bootloader
OSTree.Bootloader.Bootloader) Ptr Bootloader
self
    Text
result <- BootloaderInterfaceGetNameFieldCallback
_cb  Bootloader
self'
    Maybe (Ptr (FunPtr C_BootloaderInterfaceGetNameFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BootloaderInterfaceGetNameFieldCallback))
funptrptr
    CString
result' <- Text -> IO CString
textToCString Text
result
    CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
result'