{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

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

module GI.OSTree.Objects.Repo
    ( 
#if defined(ENABLE_OVERLOADING)
    RepoListCollectionRefsMethodInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoListCommitObjectsStartingWithMethodInfo,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoListObjectsMethodInfo               ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoListRefsMethodInfo                  ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoListRefsExtMethodInfo               ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoRemoteListCollectionRefsMethodInfo  ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoRemoteListRefsMethodInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoTraverseCommitMethodInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoTraverseReachableRefsMethodInfo     ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoTraverseNewParentsMethodInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    RepoTraverseNewReachableMethodInfo      ,
#endif

-- * Exported types
    Repo(..)                                ,
    IsRepo                                  ,
    toRepo                                  ,
    noRepo                                  ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveRepoMethod                       ,
#endif


-- ** abortTransaction #method:abortTransaction#

#if defined(ENABLE_OVERLOADING)
    RepoAbortTransactionMethodInfo          ,
#endif
    repoAbortTransaction                    ,


-- ** addGpgSignatureSummary #method:addGpgSignatureSummary#

#if defined(ENABLE_OVERLOADING)
    RepoAddGpgSignatureSummaryMethodInfo    ,
#endif
    repoAddGpgSignatureSummary              ,


-- ** appendGpgSignature #method:appendGpgSignature#

#if defined(ENABLE_OVERLOADING)
    RepoAppendGpgSignatureMethodInfo        ,
#endif
    repoAppendGpgSignature                  ,


-- ** checkoutAt #method:checkoutAt#

#if defined(ENABLE_OVERLOADING)
    RepoCheckoutAtMethodInfo                ,
#endif
    repoCheckoutAt                          ,


-- ** checkoutGc #method:checkoutGc#

#if defined(ENABLE_OVERLOADING)
    RepoCheckoutGcMethodInfo                ,
#endif
    repoCheckoutGc                          ,


-- ** checkoutTree #method:checkoutTree#

#if defined(ENABLE_OVERLOADING)
    RepoCheckoutTreeMethodInfo              ,
#endif
    repoCheckoutTree                        ,


-- ** commitTransaction #method:commitTransaction#

#if defined(ENABLE_OVERLOADING)
    RepoCommitTransactionMethodInfo         ,
#endif
    repoCommitTransaction                   ,


-- ** copyConfig #method:copyConfig#

#if defined(ENABLE_OVERLOADING)
    RepoCopyConfigMethodInfo                ,
#endif
    repoCopyConfig                          ,


-- ** create #method:create#

#if defined(ENABLE_OVERLOADING)
    RepoCreateMethodInfo                    ,
#endif
    repoCreate                              ,


-- ** createAt #method:createAt#

    repoCreateAt                            ,


-- ** deleteObject #method:deleteObject#

#if defined(ENABLE_OVERLOADING)
    RepoDeleteObjectMethodInfo              ,
#endif
    repoDeleteObject                        ,


-- ** equal #method:equal#

#if defined(ENABLE_OVERLOADING)
    RepoEqualMethodInfo                     ,
#endif
    repoEqual                               ,


-- ** findRemotesAsync #method:findRemotesAsync#

#if defined(ENABLE_OVERLOADING)
    RepoFindRemotesAsyncMethodInfo          ,
#endif
    repoFindRemotesAsync                    ,


-- ** findRemotesFinish #method:findRemotesFinish#

#if defined(ENABLE_OVERLOADING)
    RepoFindRemotesFinishMethodInfo         ,
#endif
    repoFindRemotesFinish                   ,


-- ** fsckObject #method:fsckObject#

#if defined(ENABLE_OVERLOADING)
    RepoFsckObjectMethodInfo                ,
#endif
    repoFsckObject                          ,


-- ** getBootloader #method:getBootloader#

#if defined(ENABLE_OVERLOADING)
    RepoGetBootloaderMethodInfo             ,
#endif
    repoGetBootloader                       ,


-- ** getCollectionId #method:getCollectionId#

#if defined(ENABLE_OVERLOADING)
    RepoGetCollectionIdMethodInfo           ,
#endif
    repoGetCollectionId                     ,


-- ** getConfig #method:getConfig#

#if defined(ENABLE_OVERLOADING)
    RepoGetConfigMethodInfo                 ,
#endif
    repoGetConfig                           ,


-- ** getDefaultRepoFinders #method:getDefaultRepoFinders#

#if defined(ENABLE_OVERLOADING)
    RepoGetDefaultRepoFindersMethodInfo     ,
#endif
    repoGetDefaultRepoFinders               ,


-- ** getDfd #method:getDfd#

#if defined(ENABLE_OVERLOADING)
    RepoGetDfdMethodInfo                    ,
#endif
    repoGetDfd                              ,


-- ** getDisableFsync #method:getDisableFsync#

#if defined(ENABLE_OVERLOADING)
    RepoGetDisableFsyncMethodInfo           ,
#endif
    repoGetDisableFsync                     ,


-- ** getMinFreeSpaceBytes #method:getMinFreeSpaceBytes#

#if defined(ENABLE_OVERLOADING)
    RepoGetMinFreeSpaceBytesMethodInfo      ,
#endif
    repoGetMinFreeSpaceBytes                ,


-- ** getMode #method:getMode#

#if defined(ENABLE_OVERLOADING)
    RepoGetModeMethodInfo                   ,
#endif
    repoGetMode                             ,


-- ** getParent #method:getParent#

#if defined(ENABLE_OVERLOADING)
    RepoGetParentMethodInfo                 ,
#endif
    repoGetParent                           ,


-- ** getPath #method:getPath#

#if defined(ENABLE_OVERLOADING)
    RepoGetPathMethodInfo                   ,
#endif
    repoGetPath                             ,


-- ** getRemoteBooleanOption #method:getRemoteBooleanOption#

#if defined(ENABLE_OVERLOADING)
    RepoGetRemoteBooleanOptionMethodInfo    ,
#endif
    repoGetRemoteBooleanOption              ,


-- ** getRemoteListOption #method:getRemoteListOption#

#if defined(ENABLE_OVERLOADING)
    RepoGetRemoteListOptionMethodInfo       ,
#endif
    repoGetRemoteListOption                 ,


-- ** getRemoteOption #method:getRemoteOption#

#if defined(ENABLE_OVERLOADING)
    RepoGetRemoteOptionMethodInfo           ,
#endif
    repoGetRemoteOption                     ,


-- ** gpgVerifyData #method:gpgVerifyData#

#if defined(ENABLE_OVERLOADING)
    RepoGpgVerifyDataMethodInfo             ,
#endif
    repoGpgVerifyData                       ,


-- ** hasObject #method:hasObject#

#if defined(ENABLE_OVERLOADING)
    RepoHasObjectMethodInfo                 ,
#endif
    repoHasObject                           ,


-- ** hash #method:hash#

#if defined(ENABLE_OVERLOADING)
    RepoHashMethodInfo                      ,
#endif
    repoHash                                ,


-- ** importObjectFrom #method:importObjectFrom#

#if defined(ENABLE_OVERLOADING)
    RepoImportObjectFromMethodInfo          ,
#endif
    repoImportObjectFrom                    ,


-- ** importObjectFromWithTrust #method:importObjectFromWithTrust#

#if defined(ENABLE_OVERLOADING)
    RepoImportObjectFromWithTrustMethodInfo ,
#endif
    repoImportObjectFromWithTrust           ,


-- ** isSystem #method:isSystem#

#if defined(ENABLE_OVERLOADING)
    RepoIsSystemMethodInfo                  ,
#endif
    repoIsSystem                            ,


-- ** isWritable #method:isWritable#

#if defined(ENABLE_OVERLOADING)
    RepoIsWritableMethodInfo                ,
#endif
    repoIsWritable                          ,


-- ** listStaticDeltaNames #method:listStaticDeltaNames#

#if defined(ENABLE_OVERLOADING)
    RepoListStaticDeltaNamesMethodInfo      ,
#endif
    repoListStaticDeltaNames                ,


-- ** loadCommit #method:loadCommit#

#if defined(ENABLE_OVERLOADING)
    RepoLoadCommitMethodInfo                ,
#endif
    repoLoadCommit                          ,


-- ** loadFile #method:loadFile#

#if defined(ENABLE_OVERLOADING)
    RepoLoadFileMethodInfo                  ,
#endif
    repoLoadFile                            ,


-- ** loadObjectStream #method:loadObjectStream#

#if defined(ENABLE_OVERLOADING)
    RepoLoadObjectStreamMethodInfo          ,
#endif
    repoLoadObjectStream                    ,


-- ** loadVariant #method:loadVariant#

#if defined(ENABLE_OVERLOADING)
    RepoLoadVariantMethodInfo               ,
#endif
    repoLoadVariant                         ,


-- ** loadVariantIfExists #method:loadVariantIfExists#

#if defined(ENABLE_OVERLOADING)
    RepoLoadVariantIfExistsMethodInfo       ,
#endif
    repoLoadVariantIfExists                 ,


-- ** markCommitPartial #method:markCommitPartial#

#if defined(ENABLE_OVERLOADING)
    RepoMarkCommitPartialMethodInfo         ,
#endif
    repoMarkCommitPartial                   ,


-- ** modeFromString #method:modeFromString#

    repoModeFromString                      ,


-- ** new #method:new#

    repoNew                                 ,


-- ** newDefault #method:newDefault#

    repoNewDefault                          ,


-- ** newForSysrootPath #method:newForSysrootPath#

    repoNewForSysrootPath                   ,


-- ** open #method:open#

#if defined(ENABLE_OVERLOADING)
    RepoOpenMethodInfo                      ,
#endif
    repoOpen                                ,


-- ** openAt #method:openAt#

    repoOpenAt                              ,


-- ** prepareTransaction #method:prepareTransaction#

#if defined(ENABLE_OVERLOADING)
    RepoPrepareTransactionMethodInfo        ,
#endif
    repoPrepareTransaction                  ,


-- ** prune #method:prune#

#if defined(ENABLE_OVERLOADING)
    RepoPruneMethodInfo                     ,
#endif
    repoPrune                               ,


-- ** pruneFromReachable #method:pruneFromReachable#

#if defined(ENABLE_OVERLOADING)
    RepoPruneFromReachableMethodInfo        ,
#endif
    repoPruneFromReachable                  ,


-- ** pruneStaticDeltas #method:pruneStaticDeltas#

#if defined(ENABLE_OVERLOADING)
    RepoPruneStaticDeltasMethodInfo         ,
#endif
    repoPruneStaticDeltas                   ,


-- ** pull #method:pull#

#if defined(ENABLE_OVERLOADING)
    RepoPullMethodInfo                      ,
#endif
    repoPull                                ,


-- ** pullDefaultConsoleProgressChanged #method:pullDefaultConsoleProgressChanged#

    repoPullDefaultConsoleProgressChanged   ,


-- ** pullFromRemotesAsync #method:pullFromRemotesAsync#

#if defined(ENABLE_OVERLOADING)
    RepoPullFromRemotesAsyncMethodInfo      ,
#endif
    repoPullFromRemotesAsync                ,


-- ** pullFromRemotesFinish #method:pullFromRemotesFinish#

#if defined(ENABLE_OVERLOADING)
    RepoPullFromRemotesFinishMethodInfo     ,
#endif
    repoPullFromRemotesFinish               ,


-- ** pullOneDir #method:pullOneDir#

#if defined(ENABLE_OVERLOADING)
    RepoPullOneDirMethodInfo                ,
#endif
    repoPullOneDir                          ,


-- ** pullWithOptions #method:pullWithOptions#

#if defined(ENABLE_OVERLOADING)
    RepoPullWithOptionsMethodInfo           ,
#endif
    repoPullWithOptions                     ,


-- ** queryObjectStorageSize #method:queryObjectStorageSize#

#if defined(ENABLE_OVERLOADING)
    RepoQueryObjectStorageSizeMethodInfo    ,
#endif
    repoQueryObjectStorageSize              ,


-- ** readCommit #method:readCommit#

#if defined(ENABLE_OVERLOADING)
    RepoReadCommitMethodInfo                ,
#endif
    repoReadCommit                          ,


-- ** readCommitDetachedMetadata #method:readCommitDetachedMetadata#

#if defined(ENABLE_OVERLOADING)
    RepoReadCommitDetachedMetadataMethodInfo,
#endif
    repoReadCommitDetachedMetadata          ,


-- ** regenerateSummary #method:regenerateSummary#

#if defined(ENABLE_OVERLOADING)
    RepoRegenerateSummaryMethodInfo         ,
#endif
    repoRegenerateSummary                   ,


-- ** reloadConfig #method:reloadConfig#

#if defined(ENABLE_OVERLOADING)
    RepoReloadConfigMethodInfo              ,
#endif
    repoReloadConfig                        ,


-- ** remoteAdd #method:remoteAdd#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteAddMethodInfo                 ,
#endif
    repoRemoteAdd                           ,


-- ** remoteChange #method:remoteChange#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteChangeMethodInfo              ,
#endif
    repoRemoteChange                        ,


-- ** remoteDelete #method:remoteDelete#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteDeleteMethodInfo              ,
#endif
    repoRemoteDelete                        ,


-- ** remoteFetchSummary #method:remoteFetchSummary#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteFetchSummaryMethodInfo        ,
#endif
    repoRemoteFetchSummary                  ,


-- ** remoteFetchSummaryWithOptions #method:remoteFetchSummaryWithOptions#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteFetchSummaryWithOptionsMethodInfo,
#endif
    repoRemoteFetchSummaryWithOptions       ,


-- ** remoteGetGpgVerify #method:remoteGetGpgVerify#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteGetGpgVerifyMethodInfo        ,
#endif
    repoRemoteGetGpgVerify                  ,


-- ** remoteGetGpgVerifySummary #method:remoteGetGpgVerifySummary#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteGetGpgVerifySummaryMethodInfo ,
#endif
    repoRemoteGetGpgVerifySummary           ,


-- ** remoteGetUrl #method:remoteGetUrl#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteGetUrlMethodInfo              ,
#endif
    repoRemoteGetUrl                        ,


-- ** remoteGpgImport #method:remoteGpgImport#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteGpgImportMethodInfo           ,
#endif
    repoRemoteGpgImport                     ,


-- ** remoteList #method:remoteList#

#if defined(ENABLE_OVERLOADING)
    RepoRemoteListMethodInfo                ,
#endif
    repoRemoteList                          ,


-- ** resolveCollectionRef #method:resolveCollectionRef#

#if defined(ENABLE_OVERLOADING)
    RepoResolveCollectionRefMethodInfo      ,
#endif
    repoResolveCollectionRef                ,


-- ** resolveKeyringForCollection #method:resolveKeyringForCollection#

#if defined(ENABLE_OVERLOADING)
    RepoResolveKeyringForCollectionMethodInfo,
#endif
    repoResolveKeyringForCollection         ,


-- ** resolveRev #method:resolveRev#

#if defined(ENABLE_OVERLOADING)
    RepoResolveRevMethodInfo                ,
#endif
    repoResolveRev                          ,


-- ** resolveRevExt #method:resolveRevExt#

#if defined(ENABLE_OVERLOADING)
    RepoResolveRevExtMethodInfo             ,
#endif
    repoResolveRevExt                       ,


-- ** scanHardlinks #method:scanHardlinks#

#if defined(ENABLE_OVERLOADING)
    RepoScanHardlinksMethodInfo             ,
#endif
    repoScanHardlinks                       ,


-- ** setAliasRefImmediate #method:setAliasRefImmediate#

#if defined(ENABLE_OVERLOADING)
    RepoSetAliasRefImmediateMethodInfo      ,
#endif
    repoSetAliasRefImmediate                ,


-- ** setCacheDir #method:setCacheDir#

#if defined(ENABLE_OVERLOADING)
    RepoSetCacheDirMethodInfo               ,
#endif
    repoSetCacheDir                         ,


-- ** setCollectionId #method:setCollectionId#

#if defined(ENABLE_OVERLOADING)
    RepoSetCollectionIdMethodInfo           ,
#endif
    repoSetCollectionId                     ,


-- ** setCollectionRefImmediate #method:setCollectionRefImmediate#

#if defined(ENABLE_OVERLOADING)
    RepoSetCollectionRefImmediateMethodInfo ,
#endif
    repoSetCollectionRefImmediate           ,


-- ** setDisableFsync #method:setDisableFsync#

#if defined(ENABLE_OVERLOADING)
    RepoSetDisableFsyncMethodInfo           ,
#endif
    repoSetDisableFsync                     ,


-- ** setRefImmediate #method:setRefImmediate#

#if defined(ENABLE_OVERLOADING)
    RepoSetRefImmediateMethodInfo           ,
#endif
    repoSetRefImmediate                     ,


-- ** signCommit #method:signCommit#

#if defined(ENABLE_OVERLOADING)
    RepoSignCommitMethodInfo                ,
#endif
    repoSignCommit                          ,


-- ** signDelta #method:signDelta#

#if defined(ENABLE_OVERLOADING)
    RepoSignDeltaMethodInfo                 ,
#endif
    repoSignDelta                           ,


-- ** staticDeltaExecuteOffline #method:staticDeltaExecuteOffline#

#if defined(ENABLE_OVERLOADING)
    RepoStaticDeltaExecuteOfflineMethodInfo ,
#endif
    repoStaticDeltaExecuteOffline           ,


-- ** staticDeltaGenerate #method:staticDeltaGenerate#

#if defined(ENABLE_OVERLOADING)
    RepoStaticDeltaGenerateMethodInfo       ,
#endif
    repoStaticDeltaGenerate                 ,


-- ** transactionSetCollectionRef #method:transactionSetCollectionRef#

#if defined(ENABLE_OVERLOADING)
    RepoTransactionSetCollectionRefMethodInfo,
#endif
    repoTransactionSetCollectionRef         ,


-- ** transactionSetRef #method:transactionSetRef#

#if defined(ENABLE_OVERLOADING)
    RepoTransactionSetRefMethodInfo         ,
#endif
    repoTransactionSetRef                   ,


-- ** transactionSetRefspec #method:transactionSetRefspec#

#if defined(ENABLE_OVERLOADING)
    RepoTransactionSetRefspecMethodInfo     ,
#endif
    repoTransactionSetRefspec               ,


-- ** traverseParentsGetCommits #method:traverseParentsGetCommits#

    repoTraverseParentsGetCommits           ,


-- ** verifyCommit #method:verifyCommit#

#if defined(ENABLE_OVERLOADING)
    RepoVerifyCommitMethodInfo              ,
#endif
    repoVerifyCommit                        ,


-- ** verifyCommitExt #method:verifyCommitExt#

#if defined(ENABLE_OVERLOADING)
    RepoVerifyCommitExtMethodInfo           ,
#endif
    repoVerifyCommitExt                     ,


-- ** verifyCommitForRemote #method:verifyCommitForRemote#

#if defined(ENABLE_OVERLOADING)
    RepoVerifyCommitForRemoteMethodInfo     ,
#endif
    repoVerifyCommitForRemote               ,


-- ** verifySummary #method:verifySummary#

#if defined(ENABLE_OVERLOADING)
    RepoVerifySummaryMethodInfo             ,
#endif
    repoVerifySummary                       ,


-- ** writeArchiveToMtree #method:writeArchiveToMtree#

#if defined(ENABLE_OVERLOADING)
    RepoWriteArchiveToMtreeMethodInfo       ,
#endif
    repoWriteArchiveToMtree                 ,


-- ** writeCommit #method:writeCommit#

#if defined(ENABLE_OVERLOADING)
    RepoWriteCommitMethodInfo               ,
#endif
    repoWriteCommit                         ,


-- ** writeCommitDetachedMetadata #method:writeCommitDetachedMetadata#

#if defined(ENABLE_OVERLOADING)
    RepoWriteCommitDetachedMetadataMethodInfo,
#endif
    repoWriteCommitDetachedMetadata         ,


-- ** writeCommitWithTime #method:writeCommitWithTime#

#if defined(ENABLE_OVERLOADING)
    RepoWriteCommitWithTimeMethodInfo       ,
#endif
    repoWriteCommitWithTime                 ,


-- ** writeConfig #method:writeConfig#

#if defined(ENABLE_OVERLOADING)
    RepoWriteConfigMethodInfo               ,
#endif
    repoWriteConfig                         ,


-- ** writeContent #method:writeContent#

#if defined(ENABLE_OVERLOADING)
    RepoWriteContentMethodInfo              ,
#endif
    repoWriteContent                        ,


-- ** writeContentAsync #method:writeContentAsync#

#if defined(ENABLE_OVERLOADING)
    RepoWriteContentAsyncMethodInfo         ,
#endif
    repoWriteContentAsync                   ,


-- ** writeContentFinish #method:writeContentFinish#

#if defined(ENABLE_OVERLOADING)
    RepoWriteContentFinishMethodInfo        ,
#endif
    repoWriteContentFinish                  ,


-- ** writeContentTrusted #method:writeContentTrusted#

#if defined(ENABLE_OVERLOADING)
    RepoWriteContentTrustedMethodInfo       ,
#endif
    repoWriteContentTrusted                 ,


-- ** writeDfdToMtree #method:writeDfdToMtree#

#if defined(ENABLE_OVERLOADING)
    RepoWriteDfdToMtreeMethodInfo           ,
#endif
    repoWriteDfdToMtree                     ,


-- ** writeDirectoryToMtree #method:writeDirectoryToMtree#

#if defined(ENABLE_OVERLOADING)
    RepoWriteDirectoryToMtreeMethodInfo     ,
#endif
    repoWriteDirectoryToMtree               ,


-- ** writeMetadata #method:writeMetadata#

#if defined(ENABLE_OVERLOADING)
    RepoWriteMetadataMethodInfo             ,
#endif
    repoWriteMetadata                       ,


-- ** writeMetadataAsync #method:writeMetadataAsync#

#if defined(ENABLE_OVERLOADING)
    RepoWriteMetadataAsyncMethodInfo        ,
#endif
    repoWriteMetadataAsync                  ,


-- ** writeMetadataFinish #method:writeMetadataFinish#

#if defined(ENABLE_OVERLOADING)
    RepoWriteMetadataFinishMethodInfo       ,
#endif
    repoWriteMetadataFinish                 ,


-- ** writeMetadataStreamTrusted #method:writeMetadataStreamTrusted#

#if defined(ENABLE_OVERLOADING)
    RepoWriteMetadataStreamTrustedMethodInfo,
#endif
    repoWriteMetadataStreamTrusted          ,


-- ** writeMetadataTrusted #method:writeMetadataTrusted#

#if defined(ENABLE_OVERLOADING)
    RepoWriteMetadataTrustedMethodInfo      ,
#endif
    repoWriteMetadataTrusted                ,


-- ** writeMtree #method:writeMtree#

#if defined(ENABLE_OVERLOADING)
    RepoWriteMtreeMethodInfo                ,
#endif
    repoWriteMtree                          ,




 -- * Properties
-- ** path #attr:path#
-- | Path to repository.  Note that if this repository was created
-- via @ostree_repo_new_at()@, this value will refer to a value in
-- the Linux kernel\'s @\/proc\/self\/fd@ directory.  Generally, you
-- should avoid using this property at all; you can gain a reference
-- to the repository\'s directory fd via @ostree_repo_get_dfd()@ and
-- use file-descriptor relative operations.

#if defined(ENABLE_OVERLOADING)
    RepoPathPropertyInfo                    ,
#endif
    constructRepoPath                       ,
    getRepoPath                             ,
#if defined(ENABLE_OVERLOADING)
    repoPath                                ,
#endif


-- ** remotesConfigDir #attr:remotesConfigDir#
-- | Path to directory containing remote definitions.  The default is @NULL@.
-- If a @sysroot-path@ property is defined, this value will default to
-- @${sysroot_path}\/etc\/ostree\/remotes.d@.
-- 
-- This value will only be used for system repositories.

#if defined(ENABLE_OVERLOADING)
    RepoRemotesConfigDirPropertyInfo        ,
#endif
    constructRepoRemotesConfigDir           ,
    getRepoRemotesConfigDir                 ,
#if defined(ENABLE_OVERLOADING)
    repoRemotesConfigDir                    ,
#endif


-- ** sysrootPath #attr:sysrootPath#
-- | A system using libostree for the host has a \"system\" repository; this
-- property will be set for repositories referenced via
-- @ostree_sysroot_repo()@ for example.
-- 
-- You should avoid using this property; if your code is operating
-- on a system repository, use @OstreeSysroot@ and access the repository
-- object via @ostree_sysroot_repo()@.

#if defined(ENABLE_OVERLOADING)
    RepoSysrootPathPropertyInfo             ,
#endif
    constructRepoSysrootPath                ,
    getRepoSysrootPath                      ,
#if defined(ENABLE_OVERLOADING)
    repoSysrootPath                         ,
#endif




 -- * Signals
-- ** gpgVerifyResult #signal:gpgVerifyResult#

    C_RepoGpgVerifyResultCallback           ,
    RepoGpgVerifyResultCallback             ,
#if defined(ENABLE_OVERLOADING)
    RepoGpgVerifyResultSignalInfo           ,
#endif
    afterRepoGpgVerifyResult                ,
    genClosure_RepoGpgVerifyResult          ,
    mk_RepoGpgVerifyResultCallback          ,
    noRepoGpgVerifyResultCallback           ,
    onRepoGpgVerifyResult                   ,
    wrap_RepoGpgVerifyResultCallback        ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
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.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.KeyFile as GLib.KeyFile
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.FileInfo as Gio.FileInfo
import qualified GI.Gio.Objects.InputStream as Gio.InputStream
import {-# SOURCE #-} qualified GI.OSTree.Enums as OSTree.Enums
import {-# SOURCE #-} qualified GI.OSTree.Flags as OSTree.Flags
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.RepoFinder as OSTree.RepoFinder
import {-# SOURCE #-} qualified GI.OSTree.Objects.AsyncProgress as OSTree.AsyncProgress
import {-# SOURCE #-} qualified GI.OSTree.Objects.GpgVerifyResult as OSTree.GpgVerifyResult
import {-# SOURCE #-} qualified GI.OSTree.Objects.MutableTree as OSTree.MutableTree
import {-# SOURCE #-} qualified GI.OSTree.Objects.RepoFile as OSTree.RepoFile
import {-# SOURCE #-} qualified GI.OSTree.Structs.CollectionRef as OSTree.CollectionRef
import {-# SOURCE #-} qualified GI.OSTree.Structs.Remote as OSTree.Remote
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoCheckoutAtOptions as OSTree.RepoCheckoutAtOptions
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoCommitModifier as OSTree.RepoCommitModifier
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoFinderResult as OSTree.RepoFinderResult
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoPruneOptions as OSTree.RepoPruneOptions
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoTransactionStats as OSTree.RepoTransactionStats

-- | Memory-managed wrapper type.
newtype Repo = Repo (ManagedPtr Repo)
    deriving (Repo -> Repo -> Bool
(Repo -> Repo -> Bool) -> (Repo -> Repo -> Bool) -> Eq Repo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Repo -> Repo -> Bool
$c/= :: Repo -> Repo -> Bool
== :: Repo -> Repo -> Bool
$c== :: Repo -> Repo -> Bool
Eq)
foreign import ccall "ostree_repo_get_type"
    c_ostree_repo_get_type :: IO GType

instance GObject Repo where
    gobjectType :: IO GType
gobjectType = IO GType
c_ostree_repo_get_type
    

-- | Convert 'Repo' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue Repo where
    toGValue :: Repo -> IO GValue
toGValue o :: Repo
o = do
        GType
gtype <- IO GType
c_ostree_repo_get_type
        Repo -> (Ptr Repo -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Repo
o (GType -> (GValue -> Ptr Repo -> IO ()) -> Ptr Repo -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Repo -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO Repo
fromGValue gv :: GValue
gv = do
        Ptr Repo
ptr <- GValue -> IO (Ptr Repo)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Repo)
        (ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Repo -> Repo
Repo Ptr Repo
ptr
        
    

-- | Type class for types which can be safely cast to `Repo`, for instance with `toRepo`.
class (GObject o, O.IsDescendantOf Repo o) => IsRepo o
instance (GObject o, O.IsDescendantOf Repo o) => IsRepo o

instance O.HasParentTypes Repo
type instance O.ParentTypes Repo = '[GObject.Object.Object]

-- | Cast to `Repo`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toRepo :: (MonadIO m, IsRepo o) => o -> m Repo
toRepo :: o -> m Repo
toRepo = IO Repo -> m Repo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> (o -> IO Repo) -> o -> m Repo
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Repo -> Repo) -> o -> IO Repo
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Repo -> Repo
Repo

-- | A convenience alias for `Nothing` :: `Maybe` `Repo`.
noRepo :: Maybe Repo
noRepo :: Maybe Repo
noRepo = Maybe Repo
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveRepoMethod (t :: Symbol) (o :: *) :: * where
    ResolveRepoMethod "abortTransaction" o = RepoAbortTransactionMethodInfo
    ResolveRepoMethod "addGpgSignatureSummary" o = RepoAddGpgSignatureSummaryMethodInfo
    ResolveRepoMethod "appendGpgSignature" o = RepoAppendGpgSignatureMethodInfo
    ResolveRepoMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveRepoMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveRepoMethod "checkoutAt" o = RepoCheckoutAtMethodInfo
    ResolveRepoMethod "checkoutGc" o = RepoCheckoutGcMethodInfo
    ResolveRepoMethod "checkoutTree" o = RepoCheckoutTreeMethodInfo
    ResolveRepoMethod "commitTransaction" o = RepoCommitTransactionMethodInfo
    ResolveRepoMethod "copyConfig" o = RepoCopyConfigMethodInfo
    ResolveRepoMethod "create" o = RepoCreateMethodInfo
    ResolveRepoMethod "deleteObject" o = RepoDeleteObjectMethodInfo
    ResolveRepoMethod "equal" o = RepoEqualMethodInfo
    ResolveRepoMethod "findRemotesAsync" o = RepoFindRemotesAsyncMethodInfo
    ResolveRepoMethod "findRemotesFinish" o = RepoFindRemotesFinishMethodInfo
    ResolveRepoMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveRepoMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveRepoMethod "fsckObject" o = RepoFsckObjectMethodInfo
    ResolveRepoMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveRepoMethod "gpgVerifyData" o = RepoGpgVerifyDataMethodInfo
    ResolveRepoMethod "hasObject" o = RepoHasObjectMethodInfo
    ResolveRepoMethod "hash" o = RepoHashMethodInfo
    ResolveRepoMethod "importObjectFrom" o = RepoImportObjectFromMethodInfo
    ResolveRepoMethod "importObjectFromWithTrust" o = RepoImportObjectFromWithTrustMethodInfo
    ResolveRepoMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveRepoMethod "isSystem" o = RepoIsSystemMethodInfo
    ResolveRepoMethod "isWritable" o = RepoIsWritableMethodInfo
    ResolveRepoMethod "listCollectionRefs" o = RepoListCollectionRefsMethodInfo
    ResolveRepoMethod "listCommitObjectsStartingWith" o = RepoListCommitObjectsStartingWithMethodInfo
    ResolveRepoMethod "listObjects" o = RepoListObjectsMethodInfo
    ResolveRepoMethod "listRefs" o = RepoListRefsMethodInfo
    ResolveRepoMethod "listRefsExt" o = RepoListRefsExtMethodInfo
    ResolveRepoMethod "listStaticDeltaNames" o = RepoListStaticDeltaNamesMethodInfo
    ResolveRepoMethod "loadCommit" o = RepoLoadCommitMethodInfo
    ResolveRepoMethod "loadFile" o = RepoLoadFileMethodInfo
    ResolveRepoMethod "loadObjectStream" o = RepoLoadObjectStreamMethodInfo
    ResolveRepoMethod "loadVariant" o = RepoLoadVariantMethodInfo
    ResolveRepoMethod "loadVariantIfExists" o = RepoLoadVariantIfExistsMethodInfo
    ResolveRepoMethod "markCommitPartial" o = RepoMarkCommitPartialMethodInfo
    ResolveRepoMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveRepoMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveRepoMethod "open" o = RepoOpenMethodInfo
    ResolveRepoMethod "prepareTransaction" o = RepoPrepareTransactionMethodInfo
    ResolveRepoMethod "prune" o = RepoPruneMethodInfo
    ResolveRepoMethod "pruneFromReachable" o = RepoPruneFromReachableMethodInfo
    ResolveRepoMethod "pruneStaticDeltas" o = RepoPruneStaticDeltasMethodInfo
    ResolveRepoMethod "pull" o = RepoPullMethodInfo
    ResolveRepoMethod "pullFromRemotesAsync" o = RepoPullFromRemotesAsyncMethodInfo
    ResolveRepoMethod "pullFromRemotesFinish" o = RepoPullFromRemotesFinishMethodInfo
    ResolveRepoMethod "pullOneDir" o = RepoPullOneDirMethodInfo
    ResolveRepoMethod "pullWithOptions" o = RepoPullWithOptionsMethodInfo
    ResolveRepoMethod "queryObjectStorageSize" o = RepoQueryObjectStorageSizeMethodInfo
    ResolveRepoMethod "readCommit" o = RepoReadCommitMethodInfo
    ResolveRepoMethod "readCommitDetachedMetadata" o = RepoReadCommitDetachedMetadataMethodInfo
    ResolveRepoMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveRepoMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveRepoMethod "regenerateSummary" o = RepoRegenerateSummaryMethodInfo
    ResolveRepoMethod "reloadConfig" o = RepoReloadConfigMethodInfo
    ResolveRepoMethod "remoteAdd" o = RepoRemoteAddMethodInfo
    ResolveRepoMethod "remoteChange" o = RepoRemoteChangeMethodInfo
    ResolveRepoMethod "remoteDelete" o = RepoRemoteDeleteMethodInfo
    ResolveRepoMethod "remoteFetchSummary" o = RepoRemoteFetchSummaryMethodInfo
    ResolveRepoMethod "remoteFetchSummaryWithOptions" o = RepoRemoteFetchSummaryWithOptionsMethodInfo
    ResolveRepoMethod "remoteGetGpgVerify" o = RepoRemoteGetGpgVerifyMethodInfo
    ResolveRepoMethod "remoteGetGpgVerifySummary" o = RepoRemoteGetGpgVerifySummaryMethodInfo
    ResolveRepoMethod "remoteGetUrl" o = RepoRemoteGetUrlMethodInfo
    ResolveRepoMethod "remoteGpgImport" o = RepoRemoteGpgImportMethodInfo
    ResolveRepoMethod "remoteList" o = RepoRemoteListMethodInfo
    ResolveRepoMethod "remoteListCollectionRefs" o = RepoRemoteListCollectionRefsMethodInfo
    ResolveRepoMethod "remoteListRefs" o = RepoRemoteListRefsMethodInfo
    ResolveRepoMethod "resolveCollectionRef" o = RepoResolveCollectionRefMethodInfo
    ResolveRepoMethod "resolveKeyringForCollection" o = RepoResolveKeyringForCollectionMethodInfo
    ResolveRepoMethod "resolveRev" o = RepoResolveRevMethodInfo
    ResolveRepoMethod "resolveRevExt" o = RepoResolveRevExtMethodInfo
    ResolveRepoMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveRepoMethod "scanHardlinks" o = RepoScanHardlinksMethodInfo
    ResolveRepoMethod "signCommit" o = RepoSignCommitMethodInfo
    ResolveRepoMethod "signDelta" o = RepoSignDeltaMethodInfo
    ResolveRepoMethod "staticDeltaExecuteOffline" o = RepoStaticDeltaExecuteOfflineMethodInfo
    ResolveRepoMethod "staticDeltaGenerate" o = RepoStaticDeltaGenerateMethodInfo
    ResolveRepoMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveRepoMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveRepoMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveRepoMethod "transactionSetCollectionRef" o = RepoTransactionSetCollectionRefMethodInfo
    ResolveRepoMethod "transactionSetRef" o = RepoTransactionSetRefMethodInfo
    ResolveRepoMethod "transactionSetRefspec" o = RepoTransactionSetRefspecMethodInfo
    ResolveRepoMethod "traverseCommit" o = RepoTraverseCommitMethodInfo
    ResolveRepoMethod "traverseReachableRefs" o = RepoTraverseReachableRefsMethodInfo
    ResolveRepoMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveRepoMethod "verifyCommit" o = RepoVerifyCommitMethodInfo
    ResolveRepoMethod "verifyCommitExt" o = RepoVerifyCommitExtMethodInfo
    ResolveRepoMethod "verifyCommitForRemote" o = RepoVerifyCommitForRemoteMethodInfo
    ResolveRepoMethod "verifySummary" o = RepoVerifySummaryMethodInfo
    ResolveRepoMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveRepoMethod "writeArchiveToMtree" o = RepoWriteArchiveToMtreeMethodInfo
    ResolveRepoMethod "writeCommit" o = RepoWriteCommitMethodInfo
    ResolveRepoMethod "writeCommitDetachedMetadata" o = RepoWriteCommitDetachedMetadataMethodInfo
    ResolveRepoMethod "writeCommitWithTime" o = RepoWriteCommitWithTimeMethodInfo
    ResolveRepoMethod "writeConfig" o = RepoWriteConfigMethodInfo
    ResolveRepoMethod "writeContent" o = RepoWriteContentMethodInfo
    ResolveRepoMethod "writeContentAsync" o = RepoWriteContentAsyncMethodInfo
    ResolveRepoMethod "writeContentFinish" o = RepoWriteContentFinishMethodInfo
    ResolveRepoMethod "writeContentTrusted" o = RepoWriteContentTrustedMethodInfo
    ResolveRepoMethod "writeDfdToMtree" o = RepoWriteDfdToMtreeMethodInfo
    ResolveRepoMethod "writeDirectoryToMtree" o = RepoWriteDirectoryToMtreeMethodInfo
    ResolveRepoMethod "writeMetadata" o = RepoWriteMetadataMethodInfo
    ResolveRepoMethod "writeMetadataAsync" o = RepoWriteMetadataAsyncMethodInfo
    ResolveRepoMethod "writeMetadataFinish" o = RepoWriteMetadataFinishMethodInfo
    ResolveRepoMethod "writeMetadataStreamTrusted" o = RepoWriteMetadataStreamTrustedMethodInfo
    ResolveRepoMethod "writeMetadataTrusted" o = RepoWriteMetadataTrustedMethodInfo
    ResolveRepoMethod "writeMtree" o = RepoWriteMtreeMethodInfo
    ResolveRepoMethod "getBootloader" o = RepoGetBootloaderMethodInfo
    ResolveRepoMethod "getCollectionId" o = RepoGetCollectionIdMethodInfo
    ResolveRepoMethod "getConfig" o = RepoGetConfigMethodInfo
    ResolveRepoMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveRepoMethod "getDefaultRepoFinders" o = RepoGetDefaultRepoFindersMethodInfo
    ResolveRepoMethod "getDfd" o = RepoGetDfdMethodInfo
    ResolveRepoMethod "getDisableFsync" o = RepoGetDisableFsyncMethodInfo
    ResolveRepoMethod "getMinFreeSpaceBytes" o = RepoGetMinFreeSpaceBytesMethodInfo
    ResolveRepoMethod "getMode" o = RepoGetModeMethodInfo
    ResolveRepoMethod "getParent" o = RepoGetParentMethodInfo
    ResolveRepoMethod "getPath" o = RepoGetPathMethodInfo
    ResolveRepoMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveRepoMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveRepoMethod "getRemoteBooleanOption" o = RepoGetRemoteBooleanOptionMethodInfo
    ResolveRepoMethod "getRemoteListOption" o = RepoGetRemoteListOptionMethodInfo
    ResolveRepoMethod "getRemoteOption" o = RepoGetRemoteOptionMethodInfo
    ResolveRepoMethod "setAliasRefImmediate" o = RepoSetAliasRefImmediateMethodInfo
    ResolveRepoMethod "setCacheDir" o = RepoSetCacheDirMethodInfo
    ResolveRepoMethod "setCollectionId" o = RepoSetCollectionIdMethodInfo
    ResolveRepoMethod "setCollectionRefImmediate" o = RepoSetCollectionRefImmediateMethodInfo
    ResolveRepoMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveRepoMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveRepoMethod "setDisableFsync" o = RepoSetDisableFsyncMethodInfo
    ResolveRepoMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveRepoMethod "setRefImmediate" o = RepoSetRefImmediateMethodInfo
    ResolveRepoMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveRepoMethod t Repo, O.MethodInfo info Repo p) => OL.IsLabel t (Repo -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

-- signal Repo::gpg-verify-result
-- | Emitted during a pull operation upon GPG verification (if enabled).
-- Applications can connect to this signal to output the verification
-- results if desired.
-- 
-- The signal will be emitted from whichever t'GI.GLib.Structs.MainContext.MainContext' is the
-- thread-default at the point when 'GI.OSTree.Objects.Repo.repoPullWithOptions'
-- is called.
type RepoGpgVerifyResultCallback =
    T.Text
    -- ^ /@checksum@/: checksum of the signed object
    -> OSTree.GpgVerifyResult.GpgVerifyResult
    -- ^ /@result@/: an t'GI.OSTree.Objects.GpgVerifyResult.GpgVerifyResult'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `RepoGpgVerifyResultCallback`@.
noRepoGpgVerifyResultCallback :: Maybe RepoGpgVerifyResultCallback
noRepoGpgVerifyResultCallback :: Maybe RepoGpgVerifyResultCallback
noRepoGpgVerifyResultCallback = Maybe RepoGpgVerifyResultCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_RepoGpgVerifyResultCallback =
    Ptr () ->                               -- object
    CString ->
    Ptr OSTree.GpgVerifyResult.GpgVerifyResult ->
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_RepoGpgVerifyResult :: MonadIO m => RepoGpgVerifyResultCallback -> m (GClosure C_RepoGpgVerifyResultCallback)
genClosure_RepoGpgVerifyResult :: RepoGpgVerifyResultCallback
-> m (GClosure C_RepoGpgVerifyResultCallback)
genClosure_RepoGpgVerifyResult cb :: RepoGpgVerifyResultCallback
cb = IO (GClosure C_RepoGpgVerifyResultCallback)
-> m (GClosure C_RepoGpgVerifyResultCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RepoGpgVerifyResultCallback)
 -> m (GClosure C_RepoGpgVerifyResultCallback))
-> IO (GClosure C_RepoGpgVerifyResultCallback)
-> m (GClosure C_RepoGpgVerifyResultCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_RepoGpgVerifyResultCallback
cb' = RepoGpgVerifyResultCallback -> C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback RepoGpgVerifyResultCallback
cb
    C_RepoGpgVerifyResultCallback
-> IO (FunPtr C_RepoGpgVerifyResultCallback)
mk_RepoGpgVerifyResultCallback C_RepoGpgVerifyResultCallback
cb' IO (FunPtr C_RepoGpgVerifyResultCallback)
-> (FunPtr C_RepoGpgVerifyResultCallback
    -> IO (GClosure C_RepoGpgVerifyResultCallback))
-> IO (GClosure C_RepoGpgVerifyResultCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RepoGpgVerifyResultCallback
-> IO (GClosure C_RepoGpgVerifyResultCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `RepoGpgVerifyResultCallback` into a `C_RepoGpgVerifyResultCallback`.
wrap_RepoGpgVerifyResultCallback ::
    RepoGpgVerifyResultCallback ->
    C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback :: RepoGpgVerifyResultCallback -> C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback _cb :: RepoGpgVerifyResultCallback
_cb _ checksum :: CString
checksum result_ :: Ptr GpgVerifyResult
result_ _ = do
    Text
checksum' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
checksum
    GpgVerifyResult
result_' <- ((ManagedPtr GpgVerifyResult -> GpgVerifyResult)
-> Ptr GpgVerifyResult -> IO GpgVerifyResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr GpgVerifyResult -> GpgVerifyResult
OSTree.GpgVerifyResult.GpgVerifyResult) Ptr GpgVerifyResult
result_
    RepoGpgVerifyResultCallback
_cb  Text
checksum' GpgVerifyResult
result_'


-- | Connect a signal handler for the [gpgVerifyResult](#signal:gpgVerifyResult) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' repo #gpgVerifyResult callback
-- @
-- 
-- 
onRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> RepoGpgVerifyResultCallback -> m SignalHandlerId
onRepoGpgVerifyResult :: a -> RepoGpgVerifyResultCallback -> m SignalHandlerId
onRepoGpgVerifyResult obj :: a
obj cb :: RepoGpgVerifyResultCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_RepoGpgVerifyResultCallback
cb' = RepoGpgVerifyResultCallback -> C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback RepoGpgVerifyResultCallback
cb
    FunPtr C_RepoGpgVerifyResultCallback
cb'' <- C_RepoGpgVerifyResultCallback
-> IO (FunPtr C_RepoGpgVerifyResultCallback)
mk_RepoGpgVerifyResultCallback C_RepoGpgVerifyResultCallback
cb'
    a
-> Text
-> FunPtr C_RepoGpgVerifyResultCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "gpg-verify-result" FunPtr C_RepoGpgVerifyResultCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [gpgVerifyResult](#signal:gpgVerifyResult) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' repo #gpgVerifyResult callback
-- @
-- 
-- 
afterRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> RepoGpgVerifyResultCallback -> m SignalHandlerId
afterRepoGpgVerifyResult :: a -> RepoGpgVerifyResultCallback -> m SignalHandlerId
afterRepoGpgVerifyResult obj :: a
obj cb :: RepoGpgVerifyResultCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_RepoGpgVerifyResultCallback
cb' = RepoGpgVerifyResultCallback -> C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback RepoGpgVerifyResultCallback
cb
    FunPtr C_RepoGpgVerifyResultCallback
cb'' <- C_RepoGpgVerifyResultCallback
-> IO (FunPtr C_RepoGpgVerifyResultCallback)
mk_RepoGpgVerifyResultCallback C_RepoGpgVerifyResultCallback
cb'
    a
-> Text
-> FunPtr C_RepoGpgVerifyResultCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "gpg-verify-result" FunPtr C_RepoGpgVerifyResultCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data RepoGpgVerifyResultSignalInfo
instance SignalInfo RepoGpgVerifyResultSignalInfo where
    type HaskellCallbackType RepoGpgVerifyResultSignalInfo = RepoGpgVerifyResultCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_RepoGpgVerifyResultCallback cb
        cb'' <- mk_RepoGpgVerifyResultCallback cb'
        connectSignalFunPtr obj "gpg-verify-result" cb'' connectMode detail

#endif

-- VVV Prop "path"
   -- Type: TInterface (Name {namespace = "Gio", name = "File"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@path@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' repo #path
-- @
getRepoPath :: (MonadIO m, IsRepo o) => o -> m Gio.File.File
getRepoPath :: o -> m File
getRepoPath obj :: o
obj = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe File) -> IO File
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getRepoPath" (IO (Maybe File) -> IO File) -> IO (Maybe File) -> IO File
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "path" ManagedPtr File -> File
Gio.File.File

-- | Construct a `GValueConstruct` with valid value for the “@path@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructRepoPath :: (IsRepo o, Gio.File.IsFile a) => a -> IO (GValueConstruct o)
constructRepoPath :: a -> IO (GValueConstruct o)
constructRepoPath val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "path" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

#if defined(ENABLE_OVERLOADING)
data RepoPathPropertyInfo
instance AttrInfo RepoPathPropertyInfo where
    type AttrAllowedOps RepoPathPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint RepoPathPropertyInfo = IsRepo
    type AttrSetTypeConstraint RepoPathPropertyInfo = Gio.File.IsFile
    type AttrTransferTypeConstraint RepoPathPropertyInfo = Gio.File.IsFile
    type AttrTransferType RepoPathPropertyInfo = Gio.File.File
    type AttrGetType RepoPathPropertyInfo = Gio.File.File
    type AttrLabel RepoPathPropertyInfo = "path"
    type AttrOrigin RepoPathPropertyInfo = Repo
    attrGet = getRepoPath
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo Gio.File.File v
    attrConstruct = constructRepoPath
    attrClear = undefined
#endif

-- VVV Prop "remotes-config-dir"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@remotes-config-dir@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' repo #remotesConfigDir
-- @
getRepoRemotesConfigDir :: (MonadIO m, IsRepo o) => o -> m (Maybe T.Text)
getRepoRemotesConfigDir :: o -> m (Maybe Text)
getRepoRemotesConfigDir obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "remotes-config-dir"

-- | Construct a `GValueConstruct` with valid value for the “@remotes-config-dir@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructRepoRemotesConfigDir :: (IsRepo o) => T.Text -> IO (GValueConstruct o)
constructRepoRemotesConfigDir :: Text -> IO (GValueConstruct o)
constructRepoRemotesConfigDir val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "remotes-config-dir" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

#if defined(ENABLE_OVERLOADING)
data RepoRemotesConfigDirPropertyInfo
instance AttrInfo RepoRemotesConfigDirPropertyInfo where
    type AttrAllowedOps RepoRemotesConfigDirPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint RepoRemotesConfigDirPropertyInfo = IsRepo
    type AttrSetTypeConstraint RepoRemotesConfigDirPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint RepoRemotesConfigDirPropertyInfo = (~) T.Text
    type AttrTransferType RepoRemotesConfigDirPropertyInfo = T.Text
    type AttrGetType RepoRemotesConfigDirPropertyInfo = (Maybe T.Text)
    type AttrLabel RepoRemotesConfigDirPropertyInfo = "remotes-config-dir"
    type AttrOrigin RepoRemotesConfigDirPropertyInfo = Repo
    attrGet = getRepoRemotesConfigDir
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructRepoRemotesConfigDir
    attrClear = undefined
#endif

-- VVV Prop "sysroot-path"
   -- Type: TInterface (Name {namespace = "Gio", name = "File"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@sysroot-path@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' repo #sysrootPath
-- @
getRepoSysrootPath :: (MonadIO m, IsRepo o) => o -> m (Maybe Gio.File.File)
getRepoSysrootPath :: o -> m (Maybe File)
getRepoSysrootPath obj :: o
obj = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "sysroot-path" ManagedPtr File -> File
Gio.File.File

-- | Construct a `GValueConstruct` with valid value for the “@sysroot-path@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructRepoSysrootPath :: (IsRepo o, Gio.File.IsFile a) => a -> IO (GValueConstruct o)
constructRepoSysrootPath :: a -> IO (GValueConstruct o)
constructRepoSysrootPath val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "sysroot-path" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

#if defined(ENABLE_OVERLOADING)
data RepoSysrootPathPropertyInfo
instance AttrInfo RepoSysrootPathPropertyInfo where
    type AttrAllowedOps RepoSysrootPathPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint RepoSysrootPathPropertyInfo = IsRepo
    type AttrSetTypeConstraint RepoSysrootPathPropertyInfo = Gio.File.IsFile
    type AttrTransferTypeConstraint RepoSysrootPathPropertyInfo = Gio.File.IsFile
    type AttrTransferType RepoSysrootPathPropertyInfo = Gio.File.File
    type AttrGetType RepoSysrootPathPropertyInfo = (Maybe Gio.File.File)
    type AttrLabel RepoSysrootPathPropertyInfo = "sysroot-path"
    type AttrOrigin RepoSysrootPathPropertyInfo = Repo
    attrGet = getRepoSysrootPath
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo Gio.File.File v
    attrConstruct = constructRepoSysrootPath
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Repo
type instance O.AttributeList Repo = RepoAttributeList
type RepoAttributeList = ('[ '("path", RepoPathPropertyInfo), '("remotesConfigDir", RepoRemotesConfigDirPropertyInfo), '("sysrootPath", RepoSysrootPathPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
repoPath :: AttrLabelProxy "path"
repoPath = AttrLabelProxy

repoRemotesConfigDir :: AttrLabelProxy "remotesConfigDir"
repoRemotesConfigDir = AttrLabelProxy

repoSysrootPath :: AttrLabelProxy "sysrootPath"
repoSysrootPath = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Repo = RepoSignalList
type RepoSignalList = ('[ '("gpgVerifyResult", RepoGpgVerifyResultSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method Repo::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "path"
--           , argType = TInterface Name { namespace = "Gio" , name = "File" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Path to a repository"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "OSTree" , name = "Repo" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_new" ostree_repo_new :: 
    Ptr Gio.File.File ->                    -- path : TInterface (Name {namespace = "Gio", name = "File"})
    IO (Ptr Repo)

-- | /No description available in the introspection data./
repoNew ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
    a
    -- ^ /@path@/: Path to a repository
    -> m Repo
    -- ^ __Returns:__ An accessor object for an OSTree repository located at /@path@/
repoNew :: a -> m Repo
repoNew path :: a
path = IO Repo -> m Repo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
    Ptr File
path' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
    Ptr Repo
result <- Ptr File -> IO (Ptr Repo)
ostree_repo_new Ptr File
path'
    Text -> Ptr Repo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoNew" Ptr Repo
result
    Repo
result' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
    Repo -> IO Repo
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Repo::new_default
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "OSTree" , name = "Repo" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_new_default" ostree_repo_new_default :: 
    IO (Ptr Repo)

-- | If the current working directory appears to be an OSTree
-- repository, create a new t'GI.OSTree.Objects.Repo.Repo' object for accessing it.
-- Otherwise use the path in the OSTREE_REPO environment variable
-- (if defined) or else the default system repository located at
-- \/ostree\/repo.
repoNewDefault ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Repo
    -- ^ __Returns:__ An accessor object for an OSTree repository located at \/ostree\/repo
repoNewDefault :: m Repo
repoNewDefault  = IO Repo -> m Repo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
result <- IO (Ptr Repo)
ostree_repo_new_default
    Text -> Ptr Repo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoNewDefault" Ptr Repo
result
    Repo
result' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
    Repo -> IO Repo
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Repo::new_for_sysroot_path
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "repo_path"
--           , argType = TInterface Name { namespace = "Gio" , name = "File" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Path to a repository"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sysroot_path"
--           , argType = TInterface Name { namespace = "Gio" , name = "File" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Path to the system root"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "OSTree" , name = "Repo" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_new_for_sysroot_path" ostree_repo_new_for_sysroot_path :: 
    Ptr Gio.File.File ->                    -- repo_path : TInterface (Name {namespace = "Gio", name = "File"})
    Ptr Gio.File.File ->                    -- sysroot_path : TInterface (Name {namespace = "Gio", name = "File"})
    IO (Ptr Repo)

-- | Creates a new t'GI.OSTree.Objects.Repo.Repo' instance, taking the system root path explicitly
-- instead of assuming \"\/\".
repoNewForSysrootPath ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a, Gio.File.IsFile b) =>
    a
    -- ^ /@repoPath@/: Path to a repository
    -> b
    -- ^ /@sysrootPath@/: Path to the system root
    -> m Repo
    -- ^ __Returns:__ An accessor object for the OSTree repository located at /@repoPath@/.
repoNewForSysrootPath :: a -> b -> m Repo
repoNewForSysrootPath repoPath :: a
repoPath sysrootPath :: b
sysrootPath = IO Repo -> m Repo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
    Ptr File
repoPath' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repoPath
    Ptr File
sysrootPath' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
sysrootPath
    Ptr Repo
result <- Ptr File -> Ptr File -> IO (Ptr Repo)
ostree_repo_new_for_sysroot_path Ptr File
repoPath' Ptr File
sysrootPath'
    Text -> Ptr Repo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoNewForSysrootPath" Ptr Repo
result
    Repo
result' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repoPath
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
sysrootPath
    Repo -> IO Repo
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Repo::abort_transaction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An #OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_abort_transaction" ostree_repo_abort_transaction :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Abort the active transaction; any staged objects and ref changes will be
-- discarded. You *must* invoke this if you have chosen not to invoke
-- 'GI.OSTree.Objects.Repo.repoCommitTransaction'. Calling this function when not in a
-- transaction will do nothing and return successfully.
repoAbortTransaction ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: An t'GI.OSTree.Objects.Repo.Repo'
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoAbortTransaction :: a -> Maybe b -> m ()
repoAbortTransaction self :: a
self cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_abort_transaction Ptr Repo
self' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepoAbortTransactionMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoAbortTransactionMethodInfo a signature where
    overloadedMethod = repoAbortTransaction

#endif

-- method Repo::add_gpg_signature_summary
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Just "Self" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key_id"
--           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "NULL-terminated array of GPG keys."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "homedir"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "GPG home directory, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GCancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_add_gpg_signature_summary" ostree_repo_add_gpg_signature_summary :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr CString ->                          -- key_id : TCArray True (-1) (-1) (TBasicType TUTF8)
    CString ->                              -- homedir : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Add a GPG signature to a summary file.
repoAddGpgSignatureSummary ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: Self
    -> [T.Text]
    -- ^ /@keyId@/: NULL-terminated array of GPG keys.
    -> Maybe (T.Text)
    -- ^ /@homedir@/: GPG home directory, or 'P.Nothing'
    -> Maybe (b)
    -- ^ /@cancellable@/: A t'GI.Gio.Objects.Cancellable.Cancellable'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoAddGpgSignatureSummary :: a -> [Text] -> Maybe Text -> Maybe b -> m ()
repoAddGpgSignatureSummary self :: a
self keyId :: [Text]
keyId homedir :: Maybe Text
homedir cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CString
keyId' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
keyId
    CString
maybeHomedir <- case Maybe Text
homedir of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jHomedir :: Text
jHomedir -> do
            CString
jHomedir' <- Text -> IO CString
textToCString Text
jHomedir
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jHomedir'
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr CString
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_add_gpg_signature_summary Ptr Repo
self' Ptr CString
keyId' CString
maybeHomedir Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeHomedir
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeHomedir
     )

#if defined(ENABLE_OVERLOADING)
data RepoAddGpgSignatureSummaryMethodInfo
instance (signature ~ ([T.Text] -> Maybe (T.Text) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoAddGpgSignatureSummaryMethodInfo a signature where
    overloadedMethod = repoAddGpgSignatureSummary

#endif

-- method Repo::append_gpg_signature
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Just "Self" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "commit_checksum"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "SHA256 of given commit to sign"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "signature_bytes"
--           , argType = TInterface Name { namespace = "GLib" , name = "Bytes" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Signature data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GCancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_append_gpg_signature" ostree_repo_append_gpg_signature :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CString ->                              -- commit_checksum : TBasicType TUTF8
    Ptr GLib.Bytes.Bytes ->                 -- signature_bytes : TInterface (Name {namespace = "GLib", name = "Bytes"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Append a GPG signature to a commit.
repoAppendGpgSignature ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: Self
    -> T.Text
    -- ^ /@commitChecksum@/: SHA256 of given commit to sign
    -> GLib.Bytes.Bytes
    -- ^ /@signatureBytes@/: Signature data
    -> Maybe (b)
    -- ^ /@cancellable@/: A t'GI.Gio.Objects.Cancellable.Cancellable'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoAppendGpgSignature :: a -> Text -> Bytes -> Maybe b -> m ()
repoAppendGpgSignature self :: a
self commitChecksum :: Text
commitChecksum signatureBytes :: Bytes
signatureBytes cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
commitChecksum' <- Text -> IO CString
textToCString Text
commitChecksum
    Ptr Bytes
signatureBytes' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
signatureBytes
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr Bytes
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_append_gpg_signature Ptr Repo
self' CString
commitChecksum' Ptr Bytes
signatureBytes' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Bytes -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
signatureBytes
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
     )

#if defined(ENABLE_OVERLOADING)
data RepoAppendGpgSignatureMethodInfo
instance (signature ~ (T.Text -> GLib.Bytes.Bytes -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoAppendGpgSignatureMethodInfo a signature where
    overloadedMethod = repoAppendGpgSignature

#endif

-- method Repo::checkout_at
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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 = "options"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCheckoutAtOptions" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Options" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destination_dfd"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Directory FD for destination"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destination_path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Directory for destination"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "commit"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Checksum for commit"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_checkout_at" ostree_repo_checkout_at :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr OSTree.RepoCheckoutAtOptions.RepoCheckoutAtOptions -> -- options : TInterface (Name {namespace = "OSTree", name = "RepoCheckoutAtOptions"})
    Int32 ->                                -- destination_dfd : TBasicType TInt
    CString ->                              -- destination_path : TBasicType TUTF8
    CString ->                              -- commit : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Similar to 'GI.OSTree.Objects.Repo.repoCheckoutTree', but uses directory-relative
-- paths for the destination, uses a new @OstreeRepoCheckoutAtOptions@,
-- and takes a commit checksum and optional subpath pair, rather than
-- requiring use of @GFile@ APIs for the caller.
-- 
-- It also replaces 'GI.OSTree.Objects.Repo.repoCheckoutAt' which was not safe to
-- use with GObject introspection.
-- 
-- Note in addition that unlike 'GI.OSTree.Objects.Repo.repoCheckoutTree', the
-- default is not to use the repository-internal uncompressed objects
-- cache.
repoCheckoutAt ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: Repo
    -> Maybe (OSTree.RepoCheckoutAtOptions.RepoCheckoutAtOptions)
    -- ^ /@options@/: Options
    -> Int32
    -- ^ /@destinationDfd@/: Directory FD for destination
    -> T.Text
    -- ^ /@destinationPath@/: Directory for destination
    -> T.Text
    -- ^ /@commit@/: Checksum for commit
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoCheckoutAt :: a
-> Maybe RepoCheckoutAtOptions
-> Int32
-> Text
-> Text
-> Maybe b
-> m ()
repoCheckoutAt self :: a
self options :: Maybe RepoCheckoutAtOptions
options destinationDfd :: Int32
destinationDfd destinationPath :: Text
destinationPath commit :: Text
commit cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr RepoCheckoutAtOptions
maybeOptions <- case Maybe RepoCheckoutAtOptions
options of
        Nothing -> Ptr RepoCheckoutAtOptions -> IO (Ptr RepoCheckoutAtOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RepoCheckoutAtOptions
forall a. Ptr a
nullPtr
        Just jOptions :: RepoCheckoutAtOptions
jOptions -> do
            Ptr RepoCheckoutAtOptions
jOptions' <- RepoCheckoutAtOptions -> IO (Ptr RepoCheckoutAtOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCheckoutAtOptions
jOptions
            Ptr RepoCheckoutAtOptions -> IO (Ptr RepoCheckoutAtOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RepoCheckoutAtOptions
jOptions'
    CString
destinationPath' <- Text -> IO CString
textToCString Text
destinationPath
    CString
commit' <- Text -> IO CString
textToCString Text
commit
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr RepoCheckoutAtOptions
-> Int32
-> CString
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_checkout_at Ptr Repo
self' Ptr RepoCheckoutAtOptions
maybeOptions Int32
destinationDfd CString
destinationPath' CString
commit' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe RepoCheckoutAtOptions
-> (RepoCheckoutAtOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RepoCheckoutAtOptions
options RepoCheckoutAtOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
destinationPath'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
commit'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
destinationPath'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
commit'
     )

#if defined(ENABLE_OVERLOADING)
data RepoCheckoutAtMethodInfo
instance (signature ~ (Maybe (OSTree.RepoCheckoutAtOptions.RepoCheckoutAtOptions) -> Int32 -> T.Text -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoCheckoutAtMethodInfo a signature where
    overloadedMethod = repoCheckoutAt

#endif

-- method Repo::checkout_gc
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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 = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_checkout_gc" ostree_repo_checkout_gc :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Call this after finishing a succession of checkout operations; it
-- will delete any currently-unused uncompressed objects from the
-- cache.
repoCheckoutGc ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: Repo
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoCheckoutGc :: a -> Maybe b -> m ()
repoCheckoutGc self :: a
self cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_checkout_gc Ptr Repo
self' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepoCheckoutGcMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoCheckoutGcMethodInfo a signature where
    overloadedMethod = repoCheckoutGc

#endif

-- method Repo::checkout_tree
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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 = "mode"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCheckoutMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Options controlling all files"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "overwrite_mode"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCheckoutOverwriteMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Whether or not to overwrite files"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destination"
--           , argType = TInterface Name { namespace = "Gio" , name = "File" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Place tree here" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "source"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Source tree" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "source_info"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "FileInfo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Source info" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_checkout_tree" ostree_repo_checkout_tree :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CUInt ->                                -- mode : TInterface (Name {namespace = "OSTree", name = "RepoCheckoutMode"})
    CUInt ->                                -- overwrite_mode : TInterface (Name {namespace = "OSTree", name = "RepoCheckoutOverwriteMode"})
    Ptr Gio.File.File ->                    -- destination : TInterface (Name {namespace = "Gio", name = "File"})
    Ptr OSTree.RepoFile.RepoFile ->         -- source : TInterface (Name {namespace = "OSTree", name = "RepoFile"})
    Ptr Gio.FileInfo.FileInfo ->            -- source_info : TInterface (Name {namespace = "Gio", name = "FileInfo"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Check out /@source@/ into /@destination@/, which must live on the
-- physical filesystem.  /@source@/ may be any subdirectory of a given
-- commit.  The /@mode@/ and /@overwriteMode@/ allow control over how the
-- files are checked out.
repoCheckoutTree ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, OSTree.RepoFile.IsRepoFile c, Gio.FileInfo.IsFileInfo d, Gio.Cancellable.IsCancellable e) =>
    a
    -- ^ /@self@/: Repo
    -> OSTree.Enums.RepoCheckoutMode
    -- ^ /@mode@/: Options controlling all files
    -> OSTree.Enums.RepoCheckoutOverwriteMode
    -- ^ /@overwriteMode@/: Whether or not to overwrite files
    -> b
    -- ^ /@destination@/: Place tree here
    -> c
    -- ^ /@source@/: Source tree
    -> d
    -- ^ /@sourceInfo@/: Source info
    -> Maybe (e)
    -- ^ /@cancellable@/: Cancellable
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoCheckoutTree :: a
-> RepoCheckoutMode
-> RepoCheckoutOverwriteMode
-> b
-> c
-> d
-> Maybe e
-> m ()
repoCheckoutTree self :: a
self mode :: RepoCheckoutMode
mode overwriteMode :: RepoCheckoutOverwriteMode
overwriteMode destination :: b
destination source :: c
source sourceInfo :: d
sourceInfo cancellable :: Maybe e
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
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (RepoCheckoutMode -> Int) -> RepoCheckoutMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RepoCheckoutMode -> Int
forall a. Enum a => a -> Int
fromEnum) RepoCheckoutMode
mode
    let overwriteMode' :: CUInt
overwriteMode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (RepoCheckoutOverwriteMode -> Int)
-> RepoCheckoutOverwriteMode
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RepoCheckoutOverwriteMode -> Int
forall a. Enum a => a -> Int
fromEnum) RepoCheckoutOverwriteMode
overwriteMode
    Ptr File
destination' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
destination
    Ptr RepoFile
source' <- c -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
source
    Ptr FileInfo
sourceInfo' <- d -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
sourceInfo
    Ptr Cancellable
maybeCancellable <- case Maybe e
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: e
jCancellable -> do
            Ptr Cancellable
jCancellable' <- e -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr e
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CUInt
-> Ptr File
-> Ptr RepoFile
-> Ptr FileInfo
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_checkout_tree Ptr Repo
self' CUInt
mode' CUInt
overwriteMode' Ptr File
destination' Ptr RepoFile
source' Ptr FileInfo
sourceInfo' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
destination
        c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
source
        d -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr d
sourceInfo
        Maybe e -> (e -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe e
cancellable e -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepoCheckoutTreeMethodInfo
instance (signature ~ (OSTree.Enums.RepoCheckoutMode -> OSTree.Enums.RepoCheckoutOverwriteMode -> b -> c -> d -> Maybe (e) -> m ()), MonadIO m, IsRepo a, Gio.File.IsFile b, OSTree.RepoFile.IsRepoFile c, Gio.FileInfo.IsFileInfo d, Gio.Cancellable.IsCancellable e) => O.MethodInfo RepoCheckoutTreeMethodInfo a signature where
    overloadedMethod = repoCheckoutTree

#endif

-- method Repo::commit_transaction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An #OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_stats"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoTransactionStats" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A set of statistics of things\nthat happened during this transaction."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_commit_transaction" ostree_repo_commit_transaction :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr OSTree.RepoTransactionStats.RepoTransactionStats -> -- out_stats : TInterface (Name {namespace = "OSTree", name = "RepoTransactionStats"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Complete the transaction. Any refs set with
-- 'GI.OSTree.Objects.Repo.repoTransactionSetRef' or
-- 'GI.OSTree.Objects.Repo.repoTransactionSetRefspec' will be written out.
-- 
-- Note that if multiple threads are performing writes, all such threads must
-- have terminated before this function is invoked.
-- 
-- Locking: Releases @shared@ lock acquired by @ostree_repo_prepare_transaction()@
-- Multithreading: This function is *not* MT safe; only one transaction can be
-- active at a time.
repoCommitTransaction ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: An t'GI.OSTree.Objects.Repo.Repo'
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m (OSTree.RepoTransactionStats.RepoTransactionStats)
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoCommitTransaction :: a -> Maybe b -> m RepoTransactionStats
repoCommitTransaction self :: a
self cancellable :: Maybe b
cancellable = IO RepoTransactionStats -> m RepoTransactionStats
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoTransactionStats -> m RepoTransactionStats)
-> IO RepoTransactionStats -> m RepoTransactionStats
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr RepoTransactionStats
outStats <- Int -> IO (Ptr RepoTransactionStats)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 56 :: IO (Ptr OSTree.RepoTransactionStats.RepoTransactionStats)
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO RepoTransactionStats -> IO () -> IO RepoTransactionStats
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr RepoTransactionStats
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_commit_transaction Ptr Repo
self' Ptr RepoTransactionStats
outStats Ptr Cancellable
maybeCancellable
        RepoTransactionStats
outStats' <- ((ManagedPtr RepoTransactionStats -> RepoTransactionStats)
-> Ptr RepoTransactionStats -> IO RepoTransactionStats
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RepoTransactionStats -> RepoTransactionStats
OSTree.RepoTransactionStats.RepoTransactionStats) Ptr RepoTransactionStats
outStats
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        RepoTransactionStats -> IO RepoTransactionStats
forall (m :: * -> *) a. Monad m => a -> m a
return RepoTransactionStats
outStats'
     ) (do
        Ptr RepoTransactionStats -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr RepoTransactionStats
outStats
     )

#if defined(ENABLE_OVERLOADING)
data RepoCommitTransactionMethodInfo
instance (signature ~ (Maybe (b) -> m (OSTree.RepoTransactionStats.RepoTransactionStats)), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoCommitTransactionMethodInfo a signature where
    overloadedMethod = repoCommitTransaction

#endif

-- method Repo::copy_config
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GLib" , name = "KeyFile" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_copy_config" ostree_repo_copy_config :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO (Ptr GLib.KeyFile.KeyFile)

-- | /No description available in the introspection data./
repoCopyConfig ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -> m GLib.KeyFile.KeyFile
    -- ^ __Returns:__ A newly-allocated copy of the repository config
repoCopyConfig :: a -> m KeyFile
repoCopyConfig self :: a
self = IO KeyFile -> m KeyFile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO KeyFile -> m KeyFile) -> IO KeyFile -> m KeyFile
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr KeyFile
result <- Ptr Repo -> IO (Ptr KeyFile)
ostree_repo_copy_config Ptr Repo
self'
    Text -> Ptr KeyFile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoCopyConfig" Ptr KeyFile
result
    KeyFile
result' <- ((ManagedPtr KeyFile -> KeyFile) -> Ptr KeyFile -> IO KeyFile
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr KeyFile -> KeyFile
GLib.KeyFile.KeyFile) Ptr KeyFile
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    KeyFile -> IO KeyFile
forall (m :: * -> *) a. Monad m => a -> m a
return KeyFile
result'

#if defined(ENABLE_OVERLOADING)
data RepoCopyConfigMethodInfo
instance (signature ~ (m GLib.KeyFile.KeyFile), MonadIO m, IsRepo a) => O.MethodInfo RepoCopyConfigMethodInfo a signature where
    overloadedMethod = repoCopyConfig

#endif

-- method Repo::create
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An #OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mode"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The mode to store the repository in"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_create" ostree_repo_create :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CUInt ->                                -- mode : TInterface (Name {namespace = "OSTree", name = "RepoMode"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Create the underlying structure on disk for the repository, and call
-- 'GI.OSTree.Objects.Repo.repoOpen' on the result, preparing it for use.
-- 
-- Since version 2016.8, this function will succeed on an existing
-- repository, and finish creating any necessary files in a partially
-- created repository.  However, this function cannot change the mode
-- of an existing repository, and will silently ignore an attempt to
-- do so.
-- 
-- Since 2017.9, \"existing repository\" is defined by the existence of an
-- @objects@ subdirectory.
-- 
-- This function predates 'GI.OSTree.Objects.Repo.repoCreateAt'. It is an error to call
-- this function on a repository initialized via 'GI.OSTree.Objects.Repo.repoOpenAt'.
repoCreate ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: An t'GI.OSTree.Objects.Repo.Repo'
    -> OSTree.Enums.RepoMode
    -- ^ /@mode@/: The mode to store the repository in
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoCreate :: a -> RepoMode -> Maybe b -> m ()
repoCreate self :: a
self mode :: RepoMode
mode cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (RepoMode -> Int) -> RepoMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RepoMode -> Int
forall a. Enum a => a -> Int
fromEnum) RepoMode
mode
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CUInt -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_create Ptr Repo
self' CUInt
mode' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepoCreateMethodInfo
instance (signature ~ (OSTree.Enums.RepoMode -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoCreateMethodInfo a signature where
    overloadedMethod = repoCreate

#endif

-- method Repo::delete_object
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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 = "objtype"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "ObjectType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Object type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sha256"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Checksum" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_delete_object" ostree_repo_delete_object :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CUInt ->                                -- objtype : TInterface (Name {namespace = "OSTree", name = "ObjectType"})
    CString ->                              -- sha256 : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Remove the object of type /@objtype@/ with checksum /@sha256@/
-- from the repository.  An error of type 'GI.Gio.Enums.IOErrorEnumNotFound'
-- is thrown if the object does not exist.
repoDeleteObject ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: Repo
    -> OSTree.Enums.ObjectType
    -- ^ /@objtype@/: Object type
    -> T.Text
    -- ^ /@sha256@/: Checksum
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoDeleteObject :: a -> ObjectType -> Text -> Maybe b -> m ()
repoDeleteObject self :: a
self objtype :: ObjectType
objtype sha256 :: Text
sha256 cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let objtype' :: CUInt
objtype' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ObjectType -> Int) -> ObjectType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ObjectType -> Int
forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
    CString
sha256' <- Text -> IO CString
textToCString Text
sha256
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_delete_object Ptr Repo
self' CUInt
objtype' CString
sha256' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sha256'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sha256'
     )

#if defined(ENABLE_OVERLOADING)
data RepoDeleteObjectMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoDeleteObjectMethodInfo a signature where
    overloadedMethod = repoDeleteObject

#endif

-- method Repo::equal
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "a"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #OstreeRepo" , 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 "ostree_repo_equal" ostree_repo_equal :: 
    Ptr Repo ->                             -- a : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr Repo ->                             -- b : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO CInt

-- | Check whether two opened repositories are the same on disk: if their root
-- directories are the same inode. If /@a@/ or /@b@/ are not open yet (due to
-- 'GI.OSTree.Objects.Repo.repoOpen' not being called on them yet), 'P.False' will be returned.
-- 
-- /Since: 2017.12/
repoEqual ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, IsRepo b) =>
    a
    -- ^ /@a@/: an t'GI.OSTree.Objects.Repo.Repo'
    -> b
    -- ^ /@b@/: an t'GI.OSTree.Objects.Repo.Repo'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@a@/ and /@b@/ are the same repository on disk, 'P.False' otherwise
repoEqual :: a -> b -> m Bool
repoEqual a :: a
a b :: b
b = 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 Repo
a' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
a
    Ptr Repo
b' <- b -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
b
    CInt
result <- Ptr Repo -> Ptr Repo -> IO CInt
ostree_repo_equal Ptr Repo
a' Ptr Repo
b'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
a
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
b
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data RepoEqualMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsRepo a, IsRepo b) => O.MethodInfo RepoEqualMethodInfo a signature where
    overloadedMethod = repoEqual

#endif

-- method Repo::find_remotes_async
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "refs"
--           , argType =
--               TCArray
--                 True
--                 (-1)
--                 (-1)
--                 (TInterface Name { namespace = "OSTree" , name = "CollectionRef" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "non-empty array of collection\8211ref pairs to find remotes for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "options"
--           , argType = TVariant
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a GVariant `a{sv}` with an extensible set of flags"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "finders"
--           , argType =
--               TCArray
--                 True
--                 (-1)
--                 (-1)
--                 (TInterface Name { namespace = "OSTree" , name = "RepoFinder" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "non-empty array of\n   #OstreeRepoFinder instances to use, or %NULL to use the system defaults"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "progress"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "AsyncProgress" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "an #OstreeAsyncProgress to update with the operation\8217s\n   progress, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "asynchronous completion callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 7
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data to pass to @callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_find_remotes_async" ostree_repo_find_remotes_async :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr (Ptr OSTree.CollectionRef.CollectionRef) -> -- refs : TCArray True (-1) (-1) (TInterface (Name {namespace = "OSTree", name = "CollectionRef"}))
    Ptr GVariant ->                         -- options : TVariant
    Ptr (Ptr OSTree.RepoFinder.RepoFinder) -> -- finders : TCArray True (-1) (-1) (TInterface (Name {namespace = "OSTree", name = "RepoFinder"}))
    Ptr OSTree.AsyncProgress.AsyncProgress -> -- progress : TInterface (Name {namespace = "OSTree", name = "AsyncProgress"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Find reachable remote URIs which claim to provide any of the given named
-- /@refs@/. This will search for configured remotes (t'GI.OSTree.Objects.RepoFinderConfig.RepoFinderConfig'),
-- mounted volumes (t'GI.OSTree.Objects.RepoFinderMount.RepoFinderMount') and (if enabled at compile time)
-- local network peers (t'GI.OSTree.Objects.RepoFinderAvahi.RepoFinderAvahi'). In order to use a custom
-- configuration of t'GI.OSTree.Interfaces.RepoFinder.RepoFinder' instances, call
-- 'GI.OSTree.Functions.repoFinderResolveAllAsync' on them individually.
-- 
-- Any remote which is found and which claims to support any of the given /@refs@/
-- will be returned in the results. It is possible that a remote claims to
-- support a given ref, but turns out not to — it is not possible to verify this
-- until 'GI.OSTree.Objects.Repo.repoPullFromRemotesAsync' is called.
-- 
-- The returned results will be sorted with the most useful first — this is
-- typically the remote which claims to provide the most of /@refs@/, at the lowest
-- latency.
-- 
-- Each result contains a list of the subset of /@refs@/ it claims to provide. It
-- is possible for a non-empty list of results to be returned, but for some of
-- /@refs@/ to not be listed in any of the results. Callers must check for this.
-- 
-- Pass the results to 'GI.OSTree.Objects.Repo.repoPullFromRemotesAsync' to pull the given /@refs@/
-- from those remotes.
-- 
-- The following /@options@/ are currently defined:
-- 
--   * @override-commit-ids@ (@as@): Array of specific commit IDs to fetch. The nth
--   commit ID applies to the nth ref, so this must be the same length as /@refs@/, if
--   provided.
--   * @n-network-retries@ (@u@): Number of times to retry each download on
--   receiving a transient network error, such as a socket timeout; default is
--   5, 0 means return errors without retrying. Since: 2018.6
-- 
-- /@finders@/ must be a non-empty 'P.Nothing'-terminated array of the t'GI.OSTree.Interfaces.RepoFinder.RepoFinder'
-- instances to use, or 'P.Nothing' to use the system default set of finders, which
-- will typically be all available finders using their default options (but
-- this is not guaranteed).
-- 
-- GPG verification of commits will be used unconditionally.
-- 
-- This will use the thread-default t'GI.GLib.Structs.MainContext.MainContext', but will not iterate it.
-- 
-- /Since: 2018.6/
repoFindRemotesAsync ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) =>
    a
    -- ^ /@self@/: an t'GI.OSTree.Objects.Repo.Repo'
    -> [OSTree.CollectionRef.CollectionRef]
    -- ^ /@refs@/: non-empty array of collection–ref pairs to find remotes for
    -> Maybe (GVariant)
    -- ^ /@options@/: a GVariant @a{sv}@ with an extensible set of flags
    -> [OSTree.RepoFinder.RepoFinder]
    -- ^ /@finders@/: non-empty array of
    --    t'GI.OSTree.Interfaces.RepoFinder.RepoFinder' instances to use, or 'P.Nothing' to use the system defaults
    -> Maybe (b)
    -- ^ /@progress@/: an t'GI.OSTree.Objects.AsyncProgress.AsyncProgress' to update with the operation’s
    --    progress, or 'P.Nothing'
    -> Maybe (c)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: asynchronous completion callback
    -> m ()
repoFindRemotesAsync :: a
-> [CollectionRef]
-> Maybe GVariant
-> [RepoFinder]
-> Maybe b
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
repoFindRemotesAsync self :: a
self refs :: [CollectionRef]
refs options :: Maybe GVariant
options finders :: [RepoFinder]
finders progress :: Maybe b
progress cancellable :: Maybe c
cancellable callback :: Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    [Ptr CollectionRef]
refs' <- (CollectionRef -> IO (Ptr CollectionRef))
-> [CollectionRef] -> IO [Ptr CollectionRef]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM CollectionRef -> IO (Ptr CollectionRef)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [CollectionRef]
refs
    Ptr (Ptr CollectionRef)
refs'' <- [Ptr CollectionRef] -> IO (Ptr (Ptr CollectionRef))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packZeroTerminatedPtrArray [Ptr CollectionRef]
refs'
    Ptr GVariant
maybeOptions <- case Maybe GVariant
options of
        Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
nullPtr
        Just jOptions :: GVariant
jOptions -> do
            Ptr GVariant
jOptions' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jOptions
            Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jOptions'
    [Ptr RepoFinder]
finders' <- (RepoFinder -> IO (Ptr RepoFinder))
-> [RepoFinder] -> IO [Ptr RepoFinder]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM RepoFinder -> IO (Ptr RepoFinder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [RepoFinder]
finders
    Ptr (Ptr RepoFinder)
finders'' <- [Ptr RepoFinder] -> IO (Ptr (Ptr RepoFinder))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packZeroTerminatedPtrArray [Ptr RepoFinder]
finders'
    Ptr AsyncProgress
maybeProgress <- case Maybe b
progress of
        Nothing -> Ptr AsyncProgress -> IO (Ptr AsyncProgress)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AsyncProgress
forall a. Ptr a
nullPtr
        Just jProgress :: b
jProgress -> do
            Ptr AsyncProgress
jProgress' <- b -> IO (Ptr AsyncProgress)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProgress
            Ptr AsyncProgress -> IO (Ptr AsyncProgress)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AsyncProgress
jProgress'
    Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: c
jCancellable -> do
            Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just jCallback :: AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Repo
-> Ptr (Ptr CollectionRef)
-> Ptr GVariant
-> Ptr (Ptr RepoFinder)
-> Ptr AsyncProgress
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
ostree_repo_find_remotes_async Ptr Repo
self' Ptr (Ptr CollectionRef)
refs'' Ptr GVariant
maybeOptions Ptr (Ptr RepoFinder)
finders'' Ptr AsyncProgress
maybeProgress Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    (CollectionRef -> IO ()) -> [CollectionRef] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ CollectionRef -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [CollectionRef]
refs
    Maybe GVariant -> (GVariant -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
options GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    (RepoFinder -> IO ()) -> [RepoFinder] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ RepoFinder -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [RepoFinder]
finders
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
progress b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Ptr (Ptr CollectionRef) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CollectionRef)
refs''
    Ptr (Ptr RepoFinder) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr RepoFinder)
finders''
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RepoFindRemotesAsyncMethodInfo
instance (signature ~ ([OSTree.CollectionRef.CollectionRef] -> Maybe (GVariant) -> [OSTree.RepoFinder.RepoFinder] -> Maybe (b) -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) => O.MethodInfo RepoFindRemotesAsyncMethodInfo a signature where
    overloadedMethod = repoFindRemotesAsync

#endif

-- method Repo::find_remotes_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the asynchronous result"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TCArray
--                  True
--                  (-1)
--                  (-1)
--                  (TInterface
--                     Name { namespace = "OSTree" , name = "RepoFinderResult" }))
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_find_remotes_finish" ostree_repo_find_remotes_finish :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr (Ptr OSTree.RepoFinderResult.RepoFinderResult))

-- | Finish an asynchronous pull operation started with
-- 'GI.OSTree.Objects.Repo.repoFindRemotesAsync'.
-- 
-- /Since: 2018.6/
repoFindRemotesFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@self@/: an t'GI.OSTree.Objects.Repo.Repo'
    -> b
    -- ^ /@result@/: the asynchronous result
    -> m [OSTree.RepoFinderResult.RepoFinderResult]
    -- ^ __Returns:__ a potentially empty array
    --    of @/OstreeRepoFinderResults/@, followed by a 'P.Nothing' terminator element; or
    --    'P.Nothing' on error /(Can throw 'Data.GI.Base.GError.GError')/
repoFindRemotesFinish :: a -> b -> m [RepoFinderResult]
repoFindRemotesFinish self :: a
self result_ :: b
result_ = IO [RepoFinderResult] -> m [RepoFinderResult]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [RepoFinderResult] -> m [RepoFinderResult])
-> IO [RepoFinderResult] -> m [RepoFinderResult]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO [RepoFinderResult] -> IO () -> IO [RepoFinderResult]
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr (Ptr RepoFinderResult)
result <- (Ptr (Ptr GError) -> IO (Ptr (Ptr RepoFinderResult)))
-> IO (Ptr (Ptr RepoFinderResult))
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr (Ptr RepoFinderResult)))
 -> IO (Ptr (Ptr RepoFinderResult)))
-> (Ptr (Ptr GError) -> IO (Ptr (Ptr RepoFinderResult)))
-> IO (Ptr (Ptr RepoFinderResult))
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr AsyncResult
-> Ptr (Ptr GError)
-> IO (Ptr (Ptr RepoFinderResult))
ostree_repo_find_remotes_finish Ptr Repo
self' Ptr AsyncResult
result_'
        Text -> Ptr (Ptr RepoFinderResult) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoFindRemotesFinish" Ptr (Ptr RepoFinderResult)
result
        [Ptr RepoFinderResult]
result' <- Ptr (Ptr RepoFinderResult) -> IO [Ptr RepoFinderResult]
forall a. Ptr (Ptr a) -> IO [Ptr a]
unpackZeroTerminatedPtrArray Ptr (Ptr RepoFinderResult)
result
        [RepoFinderResult]
result'' <- (Ptr RepoFinderResult -> IO RepoFinderResult)
-> [Ptr RepoFinderResult] -> IO [RepoFinderResult]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr RepoFinderResult -> RepoFinderResult)
-> Ptr RepoFinderResult -> IO RepoFinderResult
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RepoFinderResult -> RepoFinderResult
OSTree.RepoFinderResult.RepoFinderResult) [Ptr RepoFinderResult]
result'
        Ptr (Ptr RepoFinderResult) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr RepoFinderResult)
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        [RepoFinderResult] -> IO [RepoFinderResult]
forall (m :: * -> *) a. Monad m => a -> m a
return [RepoFinderResult]
result''
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepoFindRemotesFinishMethodInfo
instance (signature ~ (b -> m [OSTree.RepoFinderResult.RepoFinderResult]), MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo RepoFindRemotesFinishMethodInfo a signature where
    overloadedMethod = repoFindRemotesFinish

#endif

-- method Repo::fsck_object
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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 = "objtype"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "ObjectType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Object type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sha256"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Checksum" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_fsck_object" ostree_repo_fsck_object :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CUInt ->                                -- objtype : TInterface (Name {namespace = "OSTree", name = "ObjectType"})
    CString ->                              -- sha256 : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Verify consistency of the object; this performs checks only relevant to the
-- immediate object itself, such as checksumming. This API call will not itself
-- traverse metadata objects for example.
-- 
-- /Since: 2017.15/
repoFsckObject ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: Repo
    -> OSTree.Enums.ObjectType
    -- ^ /@objtype@/: Object type
    -> T.Text
    -- ^ /@sha256@/: Checksum
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoFsckObject :: a -> ObjectType -> Text -> Maybe b -> m ()
repoFsckObject self :: a
self objtype :: ObjectType
objtype sha256 :: Text
sha256 cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let objtype' :: CUInt
objtype' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ObjectType -> Int) -> ObjectType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ObjectType -> Int
forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
    CString
sha256' <- Text -> IO CString
textToCString Text
sha256
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_fsck_object Ptr Repo
self' CUInt
objtype' CString
sha256' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sha256'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sha256'
     )

#if defined(ENABLE_OVERLOADING)
data RepoFsckObjectMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoFsckObjectMethodInfo a signature where
    overloadedMethod = repoFsckObject

#endif

-- method Repo::get_bootloader
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #OstreeRepo" , 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 "ostree_repo_get_bootloader" ostree_repo_get_bootloader :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO CString

-- | Get the bootloader configured. See the documentation for the
-- \"sysroot.bootloader\" config key.
-- 
-- /Since: 2019.2/
repoGetBootloader ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: an t'GI.OSTree.Objects.Repo.Repo'
    -> m T.Text
    -- ^ __Returns:__ bootloader configuration for the sysroot
repoGetBootloader :: a -> m Text
repoGetBootloader self :: a
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 Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
result <- Ptr Repo -> IO CString
ostree_repo_get_bootloader Ptr Repo
self'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoGetBootloader" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data RepoGetBootloaderMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsRepo a) => O.MethodInfo RepoGetBootloaderMethodInfo a signature where
    overloadedMethod = repoGetBootloader

#endif

-- method Repo::get_collection_id
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #OstreeRepo" , 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 "ostree_repo_get_collection_id" ostree_repo_get_collection_id :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO CString

-- | Get the collection ID of this repository. See [collection IDs][collection-ids].
-- 
-- /Since: 2018.6/
repoGetCollectionId ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: an t'GI.OSTree.Objects.Repo.Repo'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ collection ID for the repository
repoGetCollectionId :: a -> m (Maybe Text)
repoGetCollectionId self :: a
self = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
result <- Ptr Repo -> IO CString
ostree_repo_get_collection_id Ptr Repo
self'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data RepoGetCollectionIdMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsRepo a) => O.MethodInfo RepoGetCollectionIdMethodInfo a signature where
    overloadedMethod = repoGetCollectionId

#endif

-- method Repo::get_config
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GLib" , name = "KeyFile" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_get_config" ostree_repo_get_config :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO (Ptr GLib.KeyFile.KeyFile)

-- | /No description available in the introspection data./
repoGetConfig ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -> m GLib.KeyFile.KeyFile
    -- ^ __Returns:__ The repository configuration; do not modify
repoGetConfig :: a -> m KeyFile
repoGetConfig self :: a
self = IO KeyFile -> m KeyFile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO KeyFile -> m KeyFile) -> IO KeyFile -> m KeyFile
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr KeyFile
result <- Ptr Repo -> IO (Ptr KeyFile)
ostree_repo_get_config Ptr Repo
self'
    Text -> Ptr KeyFile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoGetConfig" Ptr KeyFile
result
    KeyFile
result' <- ((ManagedPtr KeyFile -> KeyFile) -> Ptr KeyFile -> IO KeyFile
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr KeyFile -> KeyFile
GLib.KeyFile.KeyFile) Ptr KeyFile
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    KeyFile -> IO KeyFile
forall (m :: * -> *) a. Monad m => a -> m a
return KeyFile
result'

#if defined(ENABLE_OVERLOADING)
data RepoGetConfigMethodInfo
instance (signature ~ (m GLib.KeyFile.KeyFile), MonadIO m, IsRepo a) => O.MethodInfo RepoGetConfigMethodInfo a signature where
    overloadedMethod = repoGetConfig

#endif

-- method Repo::get_default_repo_finders
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_get_default_repo_finders" ostree_repo_get_default_repo_finders :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO (Ptr CString)

-- | Get the set of default repo finders configured. See the documentation for
-- the \"core.default-repo-finders\" config key.
-- 
-- /Since: 2018.9/
repoGetDefaultRepoFinders ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: an t'GI.OSTree.Objects.Repo.Repo'
    -> m [T.Text]
    -- ^ __Returns:__ 
    --    'P.Nothing'-terminated array of strings.
repoGetDefaultRepoFinders :: a -> m [Text]
repoGetDefaultRepoFinders self :: a
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 Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CString
result <- Ptr Repo -> IO (Ptr CString)
ostree_repo_get_default_repo_finders Ptr Repo
self'
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoGetDefaultRepoFinders" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'

#if defined(ENABLE_OVERLOADING)
data RepoGetDefaultRepoFindersMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsRepo a) => O.MethodInfo RepoGetDefaultRepoFindersMethodInfo a signature where
    overloadedMethod = repoGetDefaultRepoFinders

#endif

-- method Repo::get_dfd
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_get_dfd" ostree_repo_get_dfd :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO Int32

-- | In some cases it\'s useful for applications to access the repository
-- directly; for example, writing content into @repo\/tmp@ ensures it\'s
-- on the same filesystem.  Another case is detecting the mtime on the
-- repository (to see whether a ref was written).
repoGetDfd ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: Repo
    -> m Int32
    -- ^ __Returns:__ File descriptor for repository root - owned by /@self@/
repoGetDfd :: a -> m Int32
repoGetDfd self :: a
self = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Int32
result <- Ptr Repo -> IO Int32
ostree_repo_get_dfd Ptr Repo
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data RepoGetDfdMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsRepo a) => O.MethodInfo RepoGetDfdMethodInfo a signature where
    overloadedMethod = repoGetDfd

#endif

-- method Repo::get_disable_fsync
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An #OstreeRepo" , 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 "ostree_repo_get_disable_fsync" ostree_repo_get_disable_fsync :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO CInt

-- | For more information see 'GI.OSTree.Objects.Repo.repoSetDisableFsync'.
repoGetDisableFsync ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: An t'GI.OSTree.Objects.Repo.Repo'
    -> m Bool
    -- ^ __Returns:__ Whether or not @/fsync()/@ is enabled for this repo.
repoGetDisableFsync :: a -> m Bool
repoGetDisableFsync self :: a
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 Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr Repo -> IO CInt
ostree_repo_get_disable_fsync Ptr Repo
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data RepoGetDisableFsyncMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRepo a) => O.MethodInfo RepoGetDisableFsyncMethodInfo a signature where
    overloadedMethod = repoGetDisableFsync

#endif

-- method Repo::get_min_free_space_bytes
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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 = "out_reserved_bytes"
--           , argType = TBasicType TUInt64
--           , 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 "ostree_repo_get_min_free_space_bytes" ostree_repo_get_min_free_space_bytes :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Word64 ->                               -- out_reserved_bytes : TBasicType TUInt64
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | /No description available in the introspection data./
repoGetMinFreeSpaceBytes ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -> Word64
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoGetMinFreeSpaceBytes :: a -> Word64 -> m ()
repoGetMinFreeSpaceBytes self :: a
self outReservedBytes :: Word64
outReservedBytes = 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
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Word64 -> Ptr (Ptr GError) -> IO CInt
ostree_repo_get_min_free_space_bytes Ptr Repo
self' Word64
outReservedBytes
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepoGetMinFreeSpaceBytesMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsRepo a) => O.MethodInfo RepoGetMinFreeSpaceBytesMethodInfo a signature where
    overloadedMethod = repoGetMinFreeSpaceBytes

#endif

-- method Repo::get_mode
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "OSTree" , name = "RepoMode" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_get_mode" ostree_repo_get_mode :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO CUInt

-- | /No description available in the introspection data./
repoGetMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -> m OSTree.Enums.RepoMode
repoGetMode :: a -> m RepoMode
repoGetMode self :: a
self = IO RepoMode -> m RepoMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoMode -> m RepoMode) -> IO RepoMode -> m RepoMode
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CUInt
result <- Ptr Repo -> IO CUInt
ostree_repo_get_mode Ptr Repo
self'
    let result' :: RepoMode
result' = (Int -> RepoMode
forall a. Enum a => Int -> a
toEnum (Int -> RepoMode) -> (CUInt -> Int) -> CUInt -> RepoMode
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
self
    RepoMode -> IO RepoMode
forall (m :: * -> *) a. Monad m => a -> m a
return RepoMode
result'

#if defined(ENABLE_OVERLOADING)
data RepoGetModeMethodInfo
instance (signature ~ (m OSTree.Enums.RepoMode), MonadIO m, IsRepo a) => O.MethodInfo RepoGetModeMethodInfo a signature where
    overloadedMethod = repoGetMode

#endif

-- method Repo::get_parent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "OSTree" , name = "Repo" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_get_parent" ostree_repo_get_parent :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO (Ptr Repo)

-- | Before this function can be used, @/ostree_repo_init()/@ must have been
-- called.
repoGetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: Repo
    -> m Repo
    -- ^ __Returns:__ Parent repository, or 'P.Nothing' if none
repoGetParent :: a -> m Repo
repoGetParent self :: a
self = IO Repo -> m Repo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Repo
result <- Ptr Repo -> IO (Ptr Repo)
ostree_repo_get_parent Ptr Repo
self'
    Text -> Ptr Repo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoGetParent" Ptr Repo
result
    Repo
result' <- ((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
Repo) Ptr Repo
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Repo -> IO Repo
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'

#if defined(ENABLE_OVERLOADING)
data RepoGetParentMethodInfo
instance (signature ~ (m Repo), MonadIO m, IsRepo a) => O.MethodInfo RepoGetParentMethodInfo a signature where
    overloadedMethod = repoGetParent

#endif

-- method Repo::get_path
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gio" , name = "File" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_get_path" ostree_repo_get_path :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO (Ptr Gio.File.File)

-- | Note that since the introduction of 'GI.OSTree.Objects.Repo.repoOpenAt', this function may
-- return a process-specific path in @\/proc@ if the repository was created using
-- that API. In general, you should avoid use of this API.
repoGetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: Repo
    -> m Gio.File.File
    -- ^ __Returns:__ Path to repo
repoGetPath :: a -> m File
repoGetPath self :: a
self = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr File
result <- Ptr Repo -> IO (Ptr File)
ostree_repo_get_path Ptr Repo
self'
    Text -> Ptr File -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoGetPath" Ptr File
result
    File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'

#if defined(ENABLE_OVERLOADING)
data RepoGetPathMethodInfo
instance (signature ~ (m Gio.File.File), MonadIO m, IsRepo a) => O.MethodInfo RepoGetPathMethodInfo a signature where
    overloadedMethod = repoGetPath

#endif

-- method Repo::get_remote_boolean_option
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "remote_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Just "Name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "option_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Option" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "default_value"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Value returned if @option_name is not present"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_value"
--           , argType = TBasicType TBoolean
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the result."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_get_remote_boolean_option" ostree_repo_get_remote_boolean_option :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CString ->                              -- remote_name : TBasicType TUTF8
    CString ->                              -- option_name : TBasicType TUTF8
    CInt ->                                 -- default_value : TBasicType TBoolean
    Ptr CInt ->                             -- out_value : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | OSTree remotes are represented by keyfile groups, formatted like:
-- @[remote \"remotename\"]@. This function returns a value named /@optionName@/
-- underneath that group, and returns it as a boolean.
-- If the option is not set, /@outValue@/ will be set to /@defaultValue@/. If an
-- error is returned, /@outValue@/ will be set to 'P.False'.
repoGetRemoteBooleanOption ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: A OstreeRepo
    -> T.Text
    -- ^ /@remoteName@/: Name
    -> T.Text
    -- ^ /@optionName@/: Option
    -> Bool
    -- ^ /@defaultValue@/: Value returned if /@optionName@/ is not present
    -> m (Bool)
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoGetRemoteBooleanOption :: a -> Text -> Text -> Bool -> m Bool
repoGetRemoteBooleanOption self :: a
self remoteName :: Text
remoteName optionName :: Text
optionName defaultValue :: Bool
defaultValue = 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 Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
remoteName' <- Text -> IO CString
textToCString Text
remoteName
    CString
optionName' <- Text -> IO CString
textToCString Text
optionName
    let defaultValue' :: CInt
defaultValue' = (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
defaultValue
    Ptr CInt
outValue <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
    IO Bool -> IO () -> IO Bool
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> CInt
-> Ptr CInt
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_get_remote_boolean_option Ptr Repo
self' CString
remoteName' CString
optionName' CInt
defaultValue' Ptr CInt
outValue
        CInt
outValue' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
outValue
        let outValue'' :: Bool
outValue'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
outValue'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
optionName'
        Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outValue
        Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
outValue''
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
optionName'
        Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outValue
     )

#if defined(ENABLE_OVERLOADING)
data RepoGetRemoteBooleanOptionMethodInfo
instance (signature ~ (T.Text -> T.Text -> Bool -> m (Bool)), MonadIO m, IsRepo a) => O.MethodInfo RepoGetRemoteBooleanOptionMethodInfo a signature where
    overloadedMethod = repoGetRemoteBooleanOption

#endif

-- method Repo::get_remote_list_option
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "remote_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Just "Name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "option_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Option" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_value"
--           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the list\n           of strings. The list should be freed with\n           g_strfreev()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_get_remote_list_option" ostree_repo_get_remote_list_option :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CString ->                              -- remote_name : TBasicType TUTF8
    CString ->                              -- option_name : TBasicType TUTF8
    Ptr (Ptr CString) ->                    -- out_value : TCArray True (-1) (-1) (TBasicType TUTF8)
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | OSTree remotes are represented by keyfile groups, formatted like:
-- @[remote \"remotename\"]@. This function returns a value named /@optionName@/
-- underneath that group, and returns it as a zero terminated array of strings.
-- If the option is not set, or if an error is returned, /@outValue@/ will be set
-- to 'P.Nothing'.
repoGetRemoteListOption ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: A OstreeRepo
    -> T.Text
    -- ^ /@remoteName@/: Name
    -> T.Text
    -- ^ /@optionName@/: Option
    -> m ([T.Text])
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoGetRemoteListOption :: a -> Text -> Text -> m [Text]
repoGetRemoteListOption self :: a
self remoteName :: Text
remoteName optionName :: Text
optionName = 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
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
remoteName' <- Text -> IO CString
textToCString Text
remoteName
    CString
optionName' <- Text -> IO CString
textToCString Text
optionName
    Ptr (Ptr CString)
outValue <- IO (Ptr (Ptr CString))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr CString))
    IO [Text] -> IO () -> IO [Text]
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> Ptr (Ptr CString)
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_get_remote_list_option Ptr Repo
self' CString
remoteName' CString
optionName' Ptr (Ptr CString)
outValue
        Ptr CString
outValue' <- Ptr (Ptr CString) -> IO (Ptr CString)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr CString)
outValue
        [Text]
outValue'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
outValue'
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
outValue'
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
outValue'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
optionName'
        Ptr (Ptr CString) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CString)
outValue
        [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
outValue''
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
optionName'
        Ptr (Ptr CString) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CString)
outValue
     )

#if defined(ENABLE_OVERLOADING)
data RepoGetRemoteListOptionMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ([T.Text])), MonadIO m, IsRepo a) => O.MethodInfo RepoGetRemoteListOptionMethodInfo a signature where
    overloadedMethod = repoGetRemoteListOption

#endif

-- method Repo::get_remote_option
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A OstreeRepo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "remote_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Just "Name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "option_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Option" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "default_value"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Value returned if @option_name is not present"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_value"
--           , argType = TBasicType TUTF8
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Return location for value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_get_remote_option" ostree_repo_get_remote_option :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CString ->                              -- remote_name : TBasicType TUTF8
    CString ->                              -- option_name : TBasicType TUTF8
    CString ->                              -- default_value : TBasicType TUTF8
    Ptr CString ->                          -- out_value : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | OSTree remotes are represented by keyfile groups, formatted like:
-- @[remote \"remotename\"]@. This function returns a value named /@optionName@/
-- underneath that group, or /@defaultValue@/ if the remote exists but not the
-- option name.  If an error is returned, /@outValue@/ will be set to 'P.Nothing'.
repoGetRemoteOption ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: A OstreeRepo
    -> T.Text
    -- ^ /@remoteName@/: Name
    -> T.Text
    -- ^ /@optionName@/: Option
    -> Maybe (T.Text)
    -- ^ /@defaultValue@/: Value returned if /@optionName@/ is not present
    -> m (T.Text)
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoGetRemoteOption :: a -> Text -> Text -> Maybe Text -> m Text
repoGetRemoteOption self :: a
self remoteName :: Text
remoteName optionName :: Text
optionName defaultValue :: Maybe Text
defaultValue = 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
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
remoteName' <- Text -> IO CString
textToCString Text
remoteName
    CString
optionName' <- Text -> IO CString
textToCString Text
optionName
    CString
maybeDefaultValue <- case Maybe Text
defaultValue of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jDefaultValue :: Text
jDefaultValue -> do
            CString
jDefaultValue' <- Text -> IO CString
textToCString Text
jDefaultValue
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jDefaultValue'
    Ptr CString
outValue <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CString)
    IO Text -> IO () -> IO Text
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> CString
-> Ptr CString
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_get_remote_option Ptr Repo
self' CString
remoteName' CString
optionName' CString
maybeDefaultValue Ptr CString
outValue
        CString
outValue' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outValue
        Text
outValue'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
outValue'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
outValue'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
optionName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeDefaultValue
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
outValue
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outValue''
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
optionName'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeDefaultValue
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
outValue
     )

#if defined(ENABLE_OVERLOADING)
data RepoGetRemoteOptionMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> m (T.Text)), MonadIO m, IsRepo a) => O.MethodInfo RepoGetRemoteOptionMethodInfo a signature where
    overloadedMethod = repoGetRemoteOption

#endif

-- method Repo::gpg_verify_data
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Repository" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "remote_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Name of remote" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TInterface Name { namespace = "GLib" , name = "Bytes" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Data as a #GBytes" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "signatures"
--           , argType = TInterface Name { namespace = "GLib" , name = "Bytes" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Signatures as a #GBytes"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "keyringdir"
--           , argType = TInterface Name { namespace = "Gio" , name = "File" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Path to directory GPG keyrings; overrides built-in default if given"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "extra_keyring"
--           , argType = TInterface Name { namespace = "Gio" , name = "File" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Path to additional keyring file (not a directory)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "GpgVerifyResult" })
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_gpg_verify_data" ostree_repo_gpg_verify_data :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CString ->                              -- remote_name : TBasicType TUTF8
    Ptr GLib.Bytes.Bytes ->                 -- data : TInterface (Name {namespace = "GLib", name = "Bytes"})
    Ptr GLib.Bytes.Bytes ->                 -- signatures : TInterface (Name {namespace = "GLib", name = "Bytes"})
    Ptr Gio.File.File ->                    -- keyringdir : TInterface (Name {namespace = "Gio", name = "File"})
    Ptr Gio.File.File ->                    -- extra_keyring : TInterface (Name {namespace = "Gio", name = "File"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr OSTree.GpgVerifyResult.GpgVerifyResult)

-- | Verify /@signatures@/ for /@data@/ using GPG keys in the keyring for
-- /@remoteName@/, and return an t'GI.OSTree.Objects.GpgVerifyResult.GpgVerifyResult'.
-- 
-- The /@remoteName@/ parameter can be 'P.Nothing'. In that case it will do
-- the verifications using GPG keys in the keyrings of all remotes.
repoGpgVerifyData ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.File.IsFile c, Gio.Cancellable.IsCancellable d) =>
    a
    -- ^ /@self@/: Repository
    -> Maybe (T.Text)
    -- ^ /@remoteName@/: Name of remote
    -> GLib.Bytes.Bytes
    -- ^ /@data@/: Data as a t'GI.GLib.Structs.Bytes.Bytes'
    -> GLib.Bytes.Bytes
    -- ^ /@signatures@/: Signatures as a t'GI.GLib.Structs.Bytes.Bytes'
    -> Maybe (b)
    -- ^ /@keyringdir@/: Path to directory GPG keyrings; overrides built-in default if given
    -> Maybe (c)
    -- ^ /@extraKeyring@/: Path to additional keyring file (not a directory)
    -> Maybe (d)
    -- ^ /@cancellable@/: Cancellable
    -> m OSTree.GpgVerifyResult.GpgVerifyResult
    -- ^ __Returns:__ an t'GI.OSTree.Objects.GpgVerifyResult.GpgVerifyResult', or 'P.Nothing' on error /(Can throw 'Data.GI.Base.GError.GError')/
repoGpgVerifyData :: a
-> Maybe Text
-> Bytes
-> Bytes
-> Maybe b
-> Maybe c
-> Maybe d
-> m GpgVerifyResult
repoGpgVerifyData self :: a
self remoteName :: Maybe Text
remoteName data_ :: Bytes
data_ signatures :: Bytes
signatures keyringdir :: Maybe b
keyringdir extraKeyring :: Maybe c
extraKeyring cancellable :: Maybe d
cancellable = IO GpgVerifyResult -> m GpgVerifyResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GpgVerifyResult -> m GpgVerifyResult)
-> IO GpgVerifyResult -> m GpgVerifyResult
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
maybeRemoteName <- case Maybe Text
remoteName of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jRemoteName :: Text
jRemoteName -> do
            CString
jRemoteName' <- Text -> IO CString
textToCString Text
jRemoteName
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jRemoteName'
    Ptr Bytes
data_' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
data_
    Ptr Bytes
signatures' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
signatures
    Ptr File
maybeKeyringdir <- case Maybe b
keyringdir of
        Nothing -> Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
        Just jKeyringdir :: b
jKeyringdir -> do
            Ptr File
jKeyringdir' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jKeyringdir
            Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jKeyringdir'
    Ptr File
maybeExtraKeyring <- case Maybe c
extraKeyring of
        Nothing -> Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
        Just jExtraKeyring :: c
jExtraKeyring -> do
            Ptr File
jExtraKeyring' <- c -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jExtraKeyring
            Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jExtraKeyring'
    Ptr Cancellable
maybeCancellable <- case Maybe d
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: d
jCancellable -> do
            Ptr Cancellable
jCancellable' <- d -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO GpgVerifyResult -> IO () -> IO GpgVerifyResult
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr GpgVerifyResult
result <- (Ptr (Ptr GError) -> IO (Ptr GpgVerifyResult))
-> IO (Ptr GpgVerifyResult)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr GpgVerifyResult))
 -> IO (Ptr GpgVerifyResult))
-> (Ptr (Ptr GError) -> IO (Ptr GpgVerifyResult))
-> IO (Ptr GpgVerifyResult)
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr Bytes
-> Ptr Bytes
-> Ptr File
-> Ptr File
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr GpgVerifyResult)
ostree_repo_gpg_verify_data Ptr Repo
self' CString
maybeRemoteName Ptr Bytes
data_' Ptr Bytes
signatures' Ptr File
maybeKeyringdir Ptr File
maybeExtraKeyring Ptr Cancellable
maybeCancellable
        Text -> Ptr GpgVerifyResult -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repoGpgVerifyData" Ptr GpgVerifyResult
result
        GpgVerifyResult
result' <- ((ManagedPtr GpgVerifyResult -> GpgVerifyResult)
-> Ptr GpgVerifyResult -> IO GpgVerifyResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr GpgVerifyResult -> GpgVerifyResult
OSTree.GpgVerifyResult.GpgVerifyResult) Ptr GpgVerifyResult
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Bytes -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
data_
        Bytes -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
signatures
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
keyringdir b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
extraKeyring c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe d -> (d -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe d
cancellable d -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeRemoteName
        GpgVerifyResult -> IO GpgVerifyResult
forall (m :: * -> *) a. Monad m => a -> m a
return GpgVerifyResult
result'
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeRemoteName
     )

#if defined(ENABLE_OVERLOADING)
data RepoGpgVerifyDataMethodInfo
instance (signature ~ (Maybe (T.Text) -> GLib.Bytes.Bytes -> GLib.Bytes.Bytes -> Maybe (b) -> Maybe (c) -> Maybe (d) -> m OSTree.GpgVerifyResult.GpgVerifyResult), MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.File.IsFile c, Gio.Cancellable.IsCancellable d) => O.MethodInfo RepoGpgVerifyDataMethodInfo a signature where
    overloadedMethod = repoGpgVerifyData

#endif

-- method Repo::has_object
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , 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 = "objtype"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "ObjectType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Object type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "checksum"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "ASCII SHA256 checksum"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_have_object"
--           , argType = TBasicType TBoolean
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE if repository contains object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_has_object" ostree_repo_has_object :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CUInt ->                                -- objtype : TInterface (Name {namespace = "OSTree", name = "ObjectType"})
    CString ->                              -- checksum : TBasicType TUTF8
    Ptr CInt ->                             -- out_have_object : TBasicType TBoolean
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Set /@outHaveObject@/ to 'P.True' if /@self@/ contains the given object;
-- 'P.False' otherwise.
repoHasObject ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: Repo
    -> OSTree.Enums.ObjectType
    -- ^ /@objtype@/: Object type
    -> T.Text
    -- ^ /@checksum@/: ASCII SHA256 checksum
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m (Bool)
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoHasObject :: a -> ObjectType -> Text -> Maybe b -> m Bool
repoHasObject self :: a
self objtype :: ObjectType
objtype checksum :: Text
checksum cancellable :: Maybe b
cancellable = 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 Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let objtype' :: CUInt
objtype' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ObjectType -> Int) -> ObjectType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ObjectType -> Int
forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
    CString
checksum' <- Text -> IO CString
textToCString Text
checksum
    Ptr CInt
outHaveObject <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO Bool -> IO () -> IO Bool
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr CInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_has_object Ptr Repo
self' CUInt
objtype' CString
checksum' Ptr CInt
outHaveObject Ptr Cancellable
maybeCancellable
        CInt
outHaveObject' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
outHaveObject
        let outHaveObject'' :: Bool
outHaveObject'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
outHaveObject'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
checksum'
        Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outHaveObject
        Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
outHaveObject''
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
checksum'
        Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outHaveObject
     )

#if defined(ENABLE_OVERLOADING)
data RepoHasObjectMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> Maybe (b) -> m (Bool)), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoHasObjectMethodInfo a signature where
    overloadedMethod = repoHasObject

#endif

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

foreign import ccall "ostree_repo_hash" ostree_repo_hash :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    IO Word32

-- | Calculate a hash value for the given open repository, suitable for use when
-- putting it into a hash table. It is an error to call this on an t'GI.OSTree.Objects.Repo.Repo'
-- which is not yet open, as a persistent hash value cannot be calculated until
-- the repository is open and the inode of its root directory has been loaded.
-- 
-- This function does no I\/O.
-- 
-- /Since: 2017.12/
repoHash ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
    a
    -- ^ /@self@/: an t'GI.OSTree.Objects.Repo.Repo'
    -> m Word32
    -- ^ __Returns:__ hash value for the t'GI.OSTree.Objects.Repo.Repo'
repoHash :: a -> m Word32
repoHash self :: a
self = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Repo
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Word32
result <- Ptr Repo -> IO Word32
ostree_repo_hash Ptr Repo
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data RepoHashMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsRepo a) => O.MethodInfo RepoHashMethodInfo a signature where
    overloadedMethod = repoHash

#endif

-- method Repo::import_object_from
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Destination repo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "source"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Source repo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "objtype"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "ObjectType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Object type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "checksum"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "checksum" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_import_object_from" ostree_repo_import_object_from :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr Repo ->                             -- source : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CUInt ->                                -- objtype : TInterface (Name {namespace = "OSTree", name = "ObjectType"})
    CString ->                              -- checksum : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Copy object named by /@objtype@/ and /@checksum@/ into /@self@/ from the
-- source repository /@source@/.  If both repositories are of the same
-- type and on the same filesystem, this will simply be a fast Unix
-- hard link operation.
-- 
-- Otherwise, a copy will be performed.
repoImportObjectFrom ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepo a, IsRepo b, Gio.Cancellable.IsCancellable c) =>
    a
    -- ^ /@self@/: Destination repo
    -> b
    -- ^ /@source@/: Source repo
    -> OSTree.Enums.ObjectType
    -- ^ /@objtype@/: Object type
    -> T.Text
    -- ^ /@checksum@/: checksum
    -> Maybe (c)
    -- ^ /@cancellable@/: Cancellable
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoImportObjectFrom :: a -> b -> ObjectType -> Text -> Maybe c -> m ()
repoImportObjectFrom self :: a
self source :: b
source objtype :: ObjectType
objtype checksum :: Text
checksum cancellable :: Maybe c
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
self' <- a -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Repo
source' <- b -> IO (Ptr Repo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
source
    let objtype' :: CUInt
objtype' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ObjectType -> Int) -> ObjectType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ObjectType -> Int
forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
    CString
checksum' <- Text -> IO CString
textToCString Text
checksum
    Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: c
jCancellable -> do
            Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr Repo
-> CUInt
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_import_object_from Ptr Repo
self' Ptr Repo
source' CUInt
objtype' CString
checksum' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
source
        Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
checksum'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
checksum'
     )

#if defined(ENABLE_OVERLOADING)
data RepoImportObjectFromMethodInfo
instance (signature ~ (b -> OSTree.Enums.ObjectType -> T.Text -> Maybe (c) -> m ()), MonadIO m, IsRepo a, IsRepo b, Gio.Cancellable.IsCancellable c) => O.MethodInfo RepoImportObjectFromMethodInfo a signature where
    overloadedMethod = repoImportObjectFrom

#endif

-- method Repo::import_object_from_with_trust
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Destination repo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "source"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Source repo" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "objtype"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "ObjectType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Object type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "checksum"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "checksum" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "trusted"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "If %TRUE, assume the source repo is valid and trusted"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_import_object_from_with_trust" ostree_repo_import_object_from_with_trust :: 
    Ptr Repo ->                             -- self : TInterface (Name {namespace = "OSTree", name = "Repo"})
    Ptr Repo ->                             -- source : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CUInt ->                                -- objtype : TInterface (Name {namespace = "OSTree", name = "ObjectType"})
    CString ->                              -- checksum : TBasicType TUTF8