{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#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
Repo(..) ,
IsRepo ,
toRepo ,
#if defined(ENABLE_OVERLOADING)
ResolveRepoMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
RepoAbortTransactionMethodInfo ,
#endif
repoAbortTransaction ,
#if defined(ENABLE_OVERLOADING)
RepoAddGpgSignatureSummaryMethodInfo ,
#endif
repoAddGpgSignatureSummary ,
#if defined(ENABLE_OVERLOADING)
RepoAppendGpgSignatureMethodInfo ,
#endif
repoAppendGpgSignature ,
#if defined(ENABLE_OVERLOADING)
RepoCheckoutAtMethodInfo ,
#endif
repoCheckoutAt ,
#if defined(ENABLE_OVERLOADING)
RepoCheckoutGcMethodInfo ,
#endif
repoCheckoutGc ,
#if defined(ENABLE_OVERLOADING)
RepoCheckoutTreeMethodInfo ,
#endif
repoCheckoutTree ,
#if defined(ENABLE_OVERLOADING)
RepoCommitTransactionMethodInfo ,
#endif
repoCommitTransaction ,
#if defined(ENABLE_OVERLOADING)
RepoCopyConfigMethodInfo ,
#endif
repoCopyConfig ,
#if defined(ENABLE_OVERLOADING)
RepoCreateMethodInfo ,
#endif
repoCreate ,
repoCreateAt ,
#if defined(ENABLE_OVERLOADING)
RepoDeleteObjectMethodInfo ,
#endif
repoDeleteObject ,
#if defined(ENABLE_OVERLOADING)
RepoEqualMethodInfo ,
#endif
repoEqual ,
#if defined(ENABLE_OVERLOADING)
RepoFindRemotesAsyncMethodInfo ,
#endif
repoFindRemotesAsync ,
#if defined(ENABLE_OVERLOADING)
RepoFindRemotesFinishMethodInfo ,
#endif
repoFindRemotesFinish ,
#if defined(ENABLE_OVERLOADING)
RepoFsckObjectMethodInfo ,
#endif
repoFsckObject ,
#if defined(ENABLE_OVERLOADING)
RepoGetBootloaderMethodInfo ,
#endif
repoGetBootloader ,
#if defined(ENABLE_OVERLOADING)
RepoGetCollectionIdMethodInfo ,
#endif
repoGetCollectionId ,
#if defined(ENABLE_OVERLOADING)
RepoGetConfigMethodInfo ,
#endif
repoGetConfig ,
#if defined(ENABLE_OVERLOADING)
RepoGetDefaultRepoFindersMethodInfo ,
#endif
repoGetDefaultRepoFinders ,
#if defined(ENABLE_OVERLOADING)
RepoGetDfdMethodInfo ,
#endif
repoGetDfd ,
#if defined(ENABLE_OVERLOADING)
RepoGetDisableFsyncMethodInfo ,
#endif
repoGetDisableFsync ,
#if defined(ENABLE_OVERLOADING)
RepoGetMinFreeSpaceBytesMethodInfo ,
#endif
repoGetMinFreeSpaceBytes ,
#if defined(ENABLE_OVERLOADING)
RepoGetModeMethodInfo ,
#endif
repoGetMode ,
#if defined(ENABLE_OVERLOADING)
RepoGetParentMethodInfo ,
#endif
repoGetParent ,
#if defined(ENABLE_OVERLOADING)
RepoGetPathMethodInfo ,
#endif
repoGetPath ,
#if defined(ENABLE_OVERLOADING)
RepoGetRemoteBooleanOptionMethodInfo ,
#endif
repoGetRemoteBooleanOption ,
#if defined(ENABLE_OVERLOADING)
RepoGetRemoteListOptionMethodInfo ,
#endif
repoGetRemoteListOption ,
#if defined(ENABLE_OVERLOADING)
RepoGetRemoteOptionMethodInfo ,
#endif
repoGetRemoteOption ,
#if defined(ENABLE_OVERLOADING)
RepoGpgSignDataMethodInfo ,
#endif
repoGpgSignData ,
#if defined(ENABLE_OVERLOADING)
RepoGpgVerifyDataMethodInfo ,
#endif
repoGpgVerifyData ,
#if defined(ENABLE_OVERLOADING)
RepoHasObjectMethodInfo ,
#endif
repoHasObject ,
#if defined(ENABLE_OVERLOADING)
RepoHashMethodInfo ,
#endif
repoHash ,
#if defined(ENABLE_OVERLOADING)
RepoImportObjectFromMethodInfo ,
#endif
repoImportObjectFrom ,
#if defined(ENABLE_OVERLOADING)
RepoImportObjectFromWithTrustMethodInfo ,
#endif
repoImportObjectFromWithTrust ,
#if defined(ENABLE_OVERLOADING)
RepoIsSystemMethodInfo ,
#endif
repoIsSystem ,
#if defined(ENABLE_OVERLOADING)
RepoIsWritableMethodInfo ,
#endif
repoIsWritable ,
#if defined(ENABLE_OVERLOADING)
RepoListStaticDeltaIndexesMethodInfo ,
#endif
repoListStaticDeltaIndexes ,
#if defined(ENABLE_OVERLOADING)
RepoListStaticDeltaNamesMethodInfo ,
#endif
repoListStaticDeltaNames ,
#if defined(ENABLE_OVERLOADING)
RepoLoadCommitMethodInfo ,
#endif
repoLoadCommit ,
#if defined(ENABLE_OVERLOADING)
RepoLoadFileMethodInfo ,
#endif
repoLoadFile ,
#if defined(ENABLE_OVERLOADING)
RepoLoadObjectStreamMethodInfo ,
#endif
repoLoadObjectStream ,
#if defined(ENABLE_OVERLOADING)
RepoLoadVariantMethodInfo ,
#endif
repoLoadVariant ,
#if defined(ENABLE_OVERLOADING)
RepoLoadVariantIfExistsMethodInfo ,
#endif
repoLoadVariantIfExists ,
#if defined(ENABLE_OVERLOADING)
RepoLockPopMethodInfo ,
#endif
repoLockPop ,
#if defined(ENABLE_OVERLOADING)
RepoLockPushMethodInfo ,
#endif
repoLockPush ,
#if defined(ENABLE_OVERLOADING)
RepoMarkCommitPartialMethodInfo ,
#endif
repoMarkCommitPartial ,
#if defined(ENABLE_OVERLOADING)
RepoMarkCommitPartialReasonMethodInfo ,
#endif
repoMarkCommitPartialReason ,
repoModeFromString ,
repoNew ,
repoNewDefault ,
repoNewForSysrootPath ,
#if defined(ENABLE_OVERLOADING)
RepoOpenMethodInfo ,
#endif
repoOpen ,
repoOpenAt ,
#if defined(ENABLE_OVERLOADING)
RepoPrepareTransactionMethodInfo ,
#endif
repoPrepareTransaction ,
#if defined(ENABLE_OVERLOADING)
RepoPruneMethodInfo ,
#endif
repoPrune ,
#if defined(ENABLE_OVERLOADING)
RepoPruneFromReachableMethodInfo ,
#endif
repoPruneFromReachable ,
#if defined(ENABLE_OVERLOADING)
RepoPruneStaticDeltasMethodInfo ,
#endif
repoPruneStaticDeltas ,
#if defined(ENABLE_OVERLOADING)
RepoPullMethodInfo ,
#endif
repoPull ,
repoPullDefaultConsoleProgressChanged ,
#if defined(ENABLE_OVERLOADING)
RepoPullFromRemotesAsyncMethodInfo ,
#endif
repoPullFromRemotesAsync ,
#if defined(ENABLE_OVERLOADING)
RepoPullFromRemotesFinishMethodInfo ,
#endif
repoPullFromRemotesFinish ,
#if defined(ENABLE_OVERLOADING)
RepoPullOneDirMethodInfo ,
#endif
repoPullOneDir ,
#if defined(ENABLE_OVERLOADING)
RepoPullWithOptionsMethodInfo ,
#endif
repoPullWithOptions ,
#if defined(ENABLE_OVERLOADING)
RepoQueryObjectStorageSizeMethodInfo ,
#endif
repoQueryObjectStorageSize ,
#if defined(ENABLE_OVERLOADING)
RepoReadCommitMethodInfo ,
#endif
repoReadCommit ,
#if defined(ENABLE_OVERLOADING)
RepoReadCommitDetachedMetadataMethodInfo,
#endif
repoReadCommitDetachedMetadata ,
#if defined(ENABLE_OVERLOADING)
RepoRegenerateSummaryMethodInfo ,
#endif
repoRegenerateSummary ,
#if defined(ENABLE_OVERLOADING)
RepoReloadConfigMethodInfo ,
#endif
repoReloadConfig ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteAddMethodInfo ,
#endif
repoRemoteAdd ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteChangeMethodInfo ,
#endif
repoRemoteChange ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteDeleteMethodInfo ,
#endif
repoRemoteDelete ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteFetchSummaryMethodInfo ,
#endif
repoRemoteFetchSummary ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteFetchSummaryWithOptionsMethodInfo,
#endif
repoRemoteFetchSummaryWithOptions ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteGetGpgKeysMethodInfo ,
#endif
repoRemoteGetGpgKeys ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteGetGpgVerifyMethodInfo ,
#endif
repoRemoteGetGpgVerify ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteGetGpgVerifySummaryMethodInfo ,
#endif
repoRemoteGetGpgVerifySummary ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteGetUrlMethodInfo ,
#endif
repoRemoteGetUrl ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteGpgImportMethodInfo ,
#endif
repoRemoteGpgImport ,
#if defined(ENABLE_OVERLOADING)
RepoRemoteListMethodInfo ,
#endif
repoRemoteList ,
#if defined(ENABLE_OVERLOADING)
RepoResolveCollectionRefMethodInfo ,
#endif
repoResolveCollectionRef ,
#if defined(ENABLE_OVERLOADING)
RepoResolveKeyringForCollectionMethodInfo,
#endif
repoResolveKeyringForCollection ,
#if defined(ENABLE_OVERLOADING)
RepoResolveRevMethodInfo ,
#endif
repoResolveRev ,
#if defined(ENABLE_OVERLOADING)
RepoResolveRevExtMethodInfo ,
#endif
repoResolveRevExt ,
#if defined(ENABLE_OVERLOADING)
RepoScanHardlinksMethodInfo ,
#endif
repoScanHardlinks ,
#if defined(ENABLE_OVERLOADING)
RepoSetAliasRefImmediateMethodInfo ,
#endif
repoSetAliasRefImmediate ,
#if defined(ENABLE_OVERLOADING)
RepoSetCacheDirMethodInfo ,
#endif
repoSetCacheDir ,
#if defined(ENABLE_OVERLOADING)
RepoSetCollectionIdMethodInfo ,
#endif
repoSetCollectionId ,
#if defined(ENABLE_OVERLOADING)
RepoSetCollectionRefImmediateMethodInfo ,
#endif
repoSetCollectionRefImmediate ,
#if defined(ENABLE_OVERLOADING)
RepoSetDisableFsyncMethodInfo ,
#endif
repoSetDisableFsync ,
#if defined(ENABLE_OVERLOADING)
RepoSetRefImmediateMethodInfo ,
#endif
repoSetRefImmediate ,
#if defined(ENABLE_OVERLOADING)
RepoSignCommitMethodInfo ,
#endif
repoSignCommit ,
#if defined(ENABLE_OVERLOADING)
RepoSignDeltaMethodInfo ,
#endif
repoSignDelta ,
#if defined(ENABLE_OVERLOADING)
RepoSignatureVerifyCommitDataMethodInfo ,
#endif
repoSignatureVerifyCommitData ,
#if defined(ENABLE_OVERLOADING)
RepoStaticDeltaExecuteOfflineMethodInfo ,
#endif
repoStaticDeltaExecuteOffline ,
#if defined(ENABLE_OVERLOADING)
RepoStaticDeltaExecuteOfflineWithSignatureMethodInfo,
#endif
repoStaticDeltaExecuteOfflineWithSignature,
#if defined(ENABLE_OVERLOADING)
RepoStaticDeltaGenerateMethodInfo ,
#endif
repoStaticDeltaGenerate ,
#if defined(ENABLE_OVERLOADING)
RepoStaticDeltaReindexMethodInfo ,
#endif
repoStaticDeltaReindex ,
#if defined(ENABLE_OVERLOADING)
RepoStaticDeltaVerifySignatureMethodInfo,
#endif
repoStaticDeltaVerifySignature ,
#if defined(ENABLE_OVERLOADING)
RepoTransactionSetCollectionRefMethodInfo,
#endif
repoTransactionSetCollectionRef ,
#if defined(ENABLE_OVERLOADING)
RepoTransactionSetRefMethodInfo ,
#endif
repoTransactionSetRef ,
#if defined(ENABLE_OVERLOADING)
RepoTransactionSetRefspecMethodInfo ,
#endif
repoTransactionSetRefspec ,
repoTraverseParentsGetCommits ,
#if defined(ENABLE_OVERLOADING)
RepoVerifyCommitMethodInfo ,
#endif
repoVerifyCommit ,
#if defined(ENABLE_OVERLOADING)
RepoVerifyCommitExtMethodInfo ,
#endif
repoVerifyCommitExt ,
#if defined(ENABLE_OVERLOADING)
RepoVerifyCommitForRemoteMethodInfo ,
#endif
repoVerifyCommitForRemote ,
#if defined(ENABLE_OVERLOADING)
RepoVerifySummaryMethodInfo ,
#endif
repoVerifySummary ,
#if defined(ENABLE_OVERLOADING)
RepoWriteArchiveToMtreeMethodInfo ,
#endif
repoWriteArchiveToMtree ,
#if defined(ENABLE_OVERLOADING)
RepoWriteArchiveToMtreeFromFdMethodInfo ,
#endif
repoWriteArchiveToMtreeFromFd ,
#if defined(ENABLE_OVERLOADING)
RepoWriteCommitMethodInfo ,
#endif
repoWriteCommit ,
#if defined(ENABLE_OVERLOADING)
RepoWriteCommitDetachedMetadataMethodInfo,
#endif
repoWriteCommitDetachedMetadata ,
#if defined(ENABLE_OVERLOADING)
RepoWriteCommitWithTimeMethodInfo ,
#endif
repoWriteCommitWithTime ,
#if defined(ENABLE_OVERLOADING)
RepoWriteConfigMethodInfo ,
#endif
repoWriteConfig ,
#if defined(ENABLE_OVERLOADING)
RepoWriteContentMethodInfo ,
#endif
repoWriteContent ,
#if defined(ENABLE_OVERLOADING)
RepoWriteContentAsyncMethodInfo ,
#endif
repoWriteContentAsync ,
#if defined(ENABLE_OVERLOADING)
RepoWriteContentFinishMethodInfo ,
#endif
repoWriteContentFinish ,
#if defined(ENABLE_OVERLOADING)
RepoWriteContentTrustedMethodInfo ,
#endif
repoWriteContentTrusted ,
#if defined(ENABLE_OVERLOADING)
RepoWriteDfdToMtreeMethodInfo ,
#endif
repoWriteDfdToMtree ,
#if defined(ENABLE_OVERLOADING)
RepoWriteDirectoryToMtreeMethodInfo ,
#endif
repoWriteDirectoryToMtree ,
#if defined(ENABLE_OVERLOADING)
RepoWriteMetadataMethodInfo ,
#endif
repoWriteMetadata ,
#if defined(ENABLE_OVERLOADING)
RepoWriteMetadataAsyncMethodInfo ,
#endif
repoWriteMetadataAsync ,
#if defined(ENABLE_OVERLOADING)
RepoWriteMetadataFinishMethodInfo ,
#endif
repoWriteMetadataFinish ,
#if defined(ENABLE_OVERLOADING)
RepoWriteMetadataStreamTrustedMethodInfo,
#endif
repoWriteMetadataStreamTrusted ,
#if defined(ENABLE_OVERLOADING)
RepoWriteMetadataTrustedMethodInfo ,
#endif
repoWriteMetadataTrusted ,
#if defined(ENABLE_OVERLOADING)
RepoWriteMtreeMethodInfo ,
#endif
repoWriteMtree ,
#if defined(ENABLE_OVERLOADING)
RepoWriteRegfileMethodInfo ,
#endif
repoWriteRegfile ,
#if defined(ENABLE_OVERLOADING)
RepoWriteRegfileInlineMethodInfo ,
#endif
repoWriteRegfileInline ,
#if defined(ENABLE_OVERLOADING)
RepoWriteSymlinkMethodInfo ,
#endif
repoWriteSymlink ,
#if defined(ENABLE_OVERLOADING)
RepoPathPropertyInfo ,
#endif
constructRepoPath ,
getRepoPath ,
#if defined(ENABLE_OVERLOADING)
repoPath ,
#endif
#if defined(ENABLE_OVERLOADING)
RepoRemotesConfigDirPropertyInfo ,
#endif
constructRepoRemotesConfigDir ,
getRepoRemotesConfigDir ,
#if defined(ENABLE_OVERLOADING)
repoRemotesConfigDir ,
#endif
#if defined(ENABLE_OVERLOADING)
RepoSysrootPathPropertyInfo ,
#endif
constructRepoSysrootPath ,
getRepoSysrootPath ,
#if defined(ENABLE_OVERLOADING)
repoSysrootPath ,
#endif
RepoGpgVerifyResultCallback ,
#if defined(ENABLE_OVERLOADING)
RepoGpgVerifyResultSignalInfo ,
#endif
afterRepoGpgVerifyResult ,
onRepoGpgVerifyResult ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GLib.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.Interfaces.Sign as OSTree.Sign
import {-# SOURCE #-} qualified GI.OSTree.Objects.AsyncProgress as OSTree.AsyncProgress
import {-# SOURCE #-} qualified GI.OSTree.Objects.ContentWriter as OSTree.ContentWriter
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
newtype Repo = Repo (SP.ManagedPtr Repo)
deriving (Repo -> Repo -> Bool
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)
instance SP.ManagedPtrNewtype Repo where
toManagedPtr :: Repo -> ManagedPtr Repo
toManagedPtr (Repo ManagedPtr Repo
p) = ManagedPtr Repo
p
foreign import ccall "ostree_repo_get_type"
c_ostree_repo_get_type :: IO B.Types.GType
instance B.Types.TypedObject Repo where
glibType :: IO GType
glibType = IO GType
c_ostree_repo_get_type
instance B.Types.GObject Repo
class (SP.GObject o, O.IsDescendantOf Repo o) => IsRepo o
instance (SP.GObject o, O.IsDescendantOf Repo o) => IsRepo o
instance O.HasParentTypes Repo
type instance O.ParentTypes Repo = '[GObject.Object.Object]
toRepo :: (MIO.MonadIO m, IsRepo o) => o -> m Repo
toRepo :: forall (m :: * -> *) o. (MonadIO m, IsRepo o) => o -> m Repo
toRepo = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Repo -> Repo
Repo
instance B.GValue.IsGValue (Maybe Repo) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ostree_repo_get_type
gvalueSet_ :: Ptr GValue -> Maybe Repo -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Repo
P.Nothing = forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr Repo)
gvalueSet_ Ptr GValue
gv (P.Just Repo
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Repo
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Repo)
gvalueGet_ Ptr GValue
gv = do
Ptr Repo
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Repo)
if Ptr Repo
ptr forall a. Eq a => a -> a -> Bool
/= forall a. Ptr a
FP.nullPtr
then forall a. a -> Maybe a
P.Just forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> 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
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.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 "gpgSignData" o = RepoGpgSignDataMethodInfo
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 "listStaticDeltaIndexes" o = RepoListStaticDeltaIndexesMethodInfo
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 "lockPop" o = RepoLockPopMethodInfo
ResolveRepoMethod "lockPush" o = RepoLockPushMethodInfo
ResolveRepoMethod "markCommitPartial" o = RepoMarkCommitPartialMethodInfo
ResolveRepoMethod "markCommitPartialReason" o = RepoMarkCommitPartialReasonMethodInfo
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 "remoteGetGpgKeys" o = RepoRemoteGetGpgKeysMethodInfo
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 "signatureVerifyCommitData" o = RepoSignatureVerifyCommitDataMethodInfo
ResolveRepoMethod "staticDeltaExecuteOffline" o = RepoStaticDeltaExecuteOfflineMethodInfo
ResolveRepoMethod "staticDeltaExecuteOfflineWithSignature" o = RepoStaticDeltaExecuteOfflineWithSignatureMethodInfo
ResolveRepoMethod "staticDeltaGenerate" o = RepoStaticDeltaGenerateMethodInfo
ResolveRepoMethod "staticDeltaReindex" o = RepoStaticDeltaReindexMethodInfo
ResolveRepoMethod "staticDeltaVerifySignature" o = RepoStaticDeltaVerifySignatureMethodInfo
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 "writeArchiveToMtreeFromFd" o = RepoWriteArchiveToMtreeFromFdMethodInfo
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 "writeRegfile" o = RepoWriteRegfileMethodInfo
ResolveRepoMethod "writeRegfileInline" o = RepoWriteRegfileInlineMethodInfo
ResolveRepoMethod "writeSymlink" o = RepoWriteSymlinkMethodInfo
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.OverloadedMethod 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
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveRepoMethod t Repo, O.OverloadedMethod info Repo p, R.HasField t Repo p) => R.HasField t Repo p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveRepoMethod t Repo, O.OverloadedMethodInfo info Repo) => OL.IsLabel t (O.MethodProxy info Repo) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type RepoGpgVerifyResultCallback =
T.Text
-> OSTree.GpgVerifyResult.GpgVerifyResult
-> IO ()
type C_RepoGpgVerifyResultCallback =
Ptr Repo ->
CString ->
Ptr OSTree.GpgVerifyResult.GpgVerifyResult ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_RepoGpgVerifyResultCallback :: C_RepoGpgVerifyResultCallback -> IO (FunPtr C_RepoGpgVerifyResultCallback)
wrap_RepoGpgVerifyResultCallback ::
GObject a => (a -> RepoGpgVerifyResultCallback) ->
C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback :: forall a.
GObject a =>
(a -> RepoGpgVerifyResultCallback) -> C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback a -> RepoGpgVerifyResultCallback
gi'cb Ptr Repo
gi'selfPtr CString
checksum Ptr GpgVerifyResult
result_ Ptr ()
_ = do
Text
checksum' <- HasCallStack => CString -> IO Text
cstringToText CString
checksum
GpgVerifyResult
result_' <- (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_
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Repo
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \Repo
gi'self -> a -> RepoGpgVerifyResultCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce Repo
gi'self) Text
checksum' GpgVerifyResult
result_'
onRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> ((?self :: a) => RepoGpgVerifyResultCallback) -> m SignalHandlerId
onRepoGpgVerifyResult :: forall a (m :: * -> *).
(IsRepo a, MonadIO m) =>
a
-> ((?self::a) => RepoGpgVerifyResultCallback) -> m SignalHandlerId
onRepoGpgVerifyResult a
obj (?self::a) => RepoGpgVerifyResultCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> RepoGpgVerifyResultCallback
wrapped a
self = let ?self = a
self in (?self::a) => RepoGpgVerifyResultCallback
cb
let wrapped' :: C_RepoGpgVerifyResultCallback
wrapped' = forall a.
GObject a =>
(a -> RepoGpgVerifyResultCallback) -> C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback a -> RepoGpgVerifyResultCallback
wrapped
FunPtr C_RepoGpgVerifyResultCallback
wrapped'' <- C_RepoGpgVerifyResultCallback
-> IO (FunPtr C_RepoGpgVerifyResultCallback)
mk_RepoGpgVerifyResultCallback C_RepoGpgVerifyResultCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"gpg-verify-result" FunPtr C_RepoGpgVerifyResultCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing
afterRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> ((?self :: a) => RepoGpgVerifyResultCallback) -> m SignalHandlerId
afterRepoGpgVerifyResult :: forall a (m :: * -> *).
(IsRepo a, MonadIO m) =>
a
-> ((?self::a) => RepoGpgVerifyResultCallback) -> m SignalHandlerId
afterRepoGpgVerifyResult a
obj (?self::a) => RepoGpgVerifyResultCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> RepoGpgVerifyResultCallback
wrapped a
self = let ?self = a
self in (?self::a) => RepoGpgVerifyResultCallback
cb
let wrapped' :: C_RepoGpgVerifyResultCallback
wrapped' = forall a.
GObject a =>
(a -> RepoGpgVerifyResultCallback) -> C_RepoGpgVerifyResultCallback
wrap_RepoGpgVerifyResultCallback a -> RepoGpgVerifyResultCallback
wrapped
FunPtr C_RepoGpgVerifyResultCallback
wrapped'' <- C_RepoGpgVerifyResultCallback
-> IO (FunPtr C_RepoGpgVerifyResultCallback)
mk_RepoGpgVerifyResultCallback C_RepoGpgVerifyResultCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"gpg-verify-result" FunPtr C_RepoGpgVerifyResultCallback
wrapped'' SignalConnectMode
SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo::gpg-verify-result"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#g:signal:gpgVerifyResult"})
#endif
getRepoPath :: (MonadIO m, IsRepo o) => o -> m Gio.File.File
getRepoPath :: forall (m :: * -> *) o. (MonadIO m, IsRepo o) => o -> m File
getRepoPath o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getRepoPath" forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"path" ManagedPtr File -> File
Gio.File.File
constructRepoPath :: (IsRepo o, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructRepoPath :: forall o (m :: * -> *) a.
(IsRepo o, MonadIO m, IsFile a) =>
a -> m (GValueConstruct o)
constructRepoPath a
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"path" (forall a. a -> Maybe a
P.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
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.path"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#g:attr:path"
})
#endif
getRepoRemotesConfigDir :: (MonadIO m, IsRepo o) => o -> m (Maybe T.Text)
getRepoRemotesConfigDir :: forall (m :: * -> *) o.
(MonadIO m, IsRepo o) =>
o -> m (Maybe Text)
getRepoRemotesConfigDir o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"remotes-config-dir"
constructRepoRemotesConfigDir :: (IsRepo o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructRepoRemotesConfigDir :: forall o (m :: * -> *).
(IsRepo o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructRepoRemotesConfigDir Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"remotes-config-dir" (forall a. a -> Maybe a
P.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
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.remotesConfigDir"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#g:attr:remotesConfigDir"
})
#endif
getRepoSysrootPath :: (MonadIO m, IsRepo o) => o -> m (Maybe Gio.File.File)
getRepoSysrootPath :: forall (m :: * -> *) o.
(MonadIO m, IsRepo o) =>
o -> m (Maybe File)
getRepoSysrootPath o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"sysroot-path" ManagedPtr File -> File
Gio.File.File
constructRepoSysrootPath :: (IsRepo o, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructRepoSysrootPath :: forall o (m :: * -> *) a.
(IsRepo o, MonadIO m, IsFile a) =>
a -> m (GValueConstruct o)
constructRepoSysrootPath a
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"sysroot-path" (forall a. a -> Maybe a
P.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
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.sysrootPath"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#g:attr:sysrootPath"
})
#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
foreign import ccall "ostree_repo_new" ostree_repo_new ::
Ptr Gio.File.File ->
IO (Ptr Repo)
repoNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
a
-> m Repo
repoNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
a -> m Repo
repoNew a
path = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr File
path' <- 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'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoNew" Ptr Repo
result
Repo
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_repo_new_default" ostree_repo_new_default ::
IO (Ptr Repo)
repoNewDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Repo
repoNewDefault :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Repo
repoNewDefault = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
result <- IO (Ptr Repo)
ostree_repo_new_default
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoNewDefault" Ptr Repo
result
Repo
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_repo_new_for_sysroot_path" ostree_repo_new_for_sysroot_path ::
Ptr Gio.File.File ->
Ptr Gio.File.File ->
IO (Ptr Repo)
repoNewForSysrootPath ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a, Gio.File.IsFile b) =>
a
-> b
-> m Repo
repoNewForSysrootPath :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFile a, IsFile b) =>
a -> b -> m Repo
repoNewForSysrootPath a
repoPath b
sysrootPath = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr File
repoPath' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repoPath
Ptr File
sysrootPath' <- 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'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoNewForSysrootPath" Ptr Repo
result
Repo
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repoPath
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
sysrootPath
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_repo_abort_transaction" ostree_repo_abort_transaction ::
Ptr Repo ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoAbortTransaction ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
repoAbortTransaction :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m ()
repoAbortTransaction a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
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.OverloadedMethod RepoAbortTransactionMethodInfo a signature where
overloadedMethod = repoAbortTransaction
instance O.OverloadedMethodInfo RepoAbortTransactionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoAbortTransaction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoAbortTransaction"
})
#endif
foreign import ccall "ostree_repo_add_gpg_signature_summary" ostree_repo_add_gpg_signature_summary ::
Ptr Repo ->
Ptr CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoAddGpgSignatureSummary ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> [T.Text]
-> Maybe (T.Text)
-> Maybe (b)
-> m ()
repoAddGpgSignatureSummary :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> [Text] -> Maybe Text -> Maybe b -> m ()
repoAddGpgSignatureSummary a
self [Text]
keyId Maybe Text
homedir Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jHomedir -> do
CString
jHomedir' <- Text -> IO CString
textToCString Text
jHomedir
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jHomedir'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
forall a. Ptr a -> IO ()
freeMem CString
maybeHomedir
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
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.OverloadedMethod RepoAddGpgSignatureSummaryMethodInfo a signature where
overloadedMethod = repoAddGpgSignatureSummary
instance O.OverloadedMethodInfo RepoAddGpgSignatureSummaryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoAddGpgSignatureSummary",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoAddGpgSignatureSummary"
})
#endif
foreign import ccall "ostree_repo_append_gpg_signature" ostree_repo_append_gpg_signature ::
Ptr Repo ->
CString ->
Ptr GLib.Bytes.Bytes ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoAppendGpgSignature ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> GLib.Bytes.Bytes
-> Maybe (b)
-> m ()
repoAppendGpgSignature :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Bytes -> Maybe b -> m ()
repoAppendGpgSignature a
self Text
commitChecksum Bytes
signatureBytes Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
commitChecksum' <- Text -> IO CString
textToCString Text
commitChecksum
Ptr Bytes
signatureBytes' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
signatureBytes
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
signatureBytes
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
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.OverloadedMethod RepoAppendGpgSignatureMethodInfo a signature where
overloadedMethod = repoAppendGpgSignature
instance O.OverloadedMethodInfo RepoAppendGpgSignatureMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoAppendGpgSignature",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoAppendGpgSignature"
})
#endif
foreign import ccall "ostree_repo_checkout_at" ostree_repo_checkout_at ::
Ptr Repo ->
Ptr OSTree.RepoCheckoutAtOptions.RepoCheckoutAtOptions ->
Int32 ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoCheckoutAt ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (OSTree.RepoCheckoutAtOptions.RepoCheckoutAtOptions)
-> Int32
-> T.Text
-> T.Text
-> Maybe (b)
-> m ()
repoCheckoutAt :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> Maybe RepoCheckoutAtOptions
-> Int32
-> Text
-> Text
-> Maybe b
-> m ()
repoCheckoutAt a
self Maybe RepoCheckoutAtOptions
options Int32
destinationDfd Text
destinationPath Text
commit Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr RepoCheckoutAtOptions
maybeOptions <- case Maybe RepoCheckoutAtOptions
options of
Maybe RepoCheckoutAtOptions
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just RepoCheckoutAtOptions
jOptions -> do
Ptr RepoCheckoutAtOptions
jOptions' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCheckoutAtOptions
jOptions
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
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RepoCheckoutAtOptions
options forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
destinationPath'
forall a. Ptr a -> IO ()
freeMem CString
commit'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
destinationPath'
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.OverloadedMethod RepoCheckoutAtMethodInfo a signature where
overloadedMethod = repoCheckoutAt
instance O.OverloadedMethodInfo RepoCheckoutAtMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoCheckoutAt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoCheckoutAt"
})
#endif
foreign import ccall "ostree_repo_checkout_gc" ostree_repo_checkout_gc ::
Ptr Repo ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoCheckoutGc ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
repoCheckoutGc :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m ()
repoCheckoutGc a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
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.OverloadedMethod RepoCheckoutGcMethodInfo a signature where
overloadedMethod = repoCheckoutGc
instance O.OverloadedMethodInfo RepoCheckoutGcMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoCheckoutGc",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoCheckoutGc"
})
#endif
foreign import ccall "ostree_repo_checkout_tree" ostree_repo_checkout_tree ::
Ptr Repo ->
CUInt ->
CUInt ->
Ptr Gio.File.File ->
Ptr OSTree.RepoFile.RepoFile ->
Ptr Gio.FileInfo.FileInfo ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
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
-> OSTree.Enums.RepoCheckoutMode
-> OSTree.Enums.RepoCheckoutOverwriteMode
-> b
-> c
-> d
-> Maybe (e)
-> m ()
repoCheckoutTree :: forall (m :: * -> *) a b c d e.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsRepoFile c,
IsFileInfo d, IsCancellable e) =>
a
-> RepoCheckoutMode
-> RepoCheckoutOverwriteMode
-> b
-> c
-> d
-> Maybe e
-> m ()
repoCheckoutTree a
self RepoCheckoutMode
mode RepoCheckoutOverwriteMode
overwriteMode b
destination c
source d
sourceInfo Maybe e
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let mode' :: CUInt
mode' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) RepoCheckoutMode
mode
let overwriteMode' :: CUInt
overwriteMode' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) RepoCheckoutOverwriteMode
overwriteMode
Ptr File
destination' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
destination
Ptr RepoFile
source' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
source
Ptr FileInfo
sourceInfo' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
sourceInfo
Ptr Cancellable
maybeCancellable <- case Maybe e
cancellable of
Maybe e
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just e
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr e
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
destination
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
source
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr d
sourceInfo
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe e
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
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.OverloadedMethod RepoCheckoutTreeMethodInfo a signature where
overloadedMethod = repoCheckoutTree
instance O.OverloadedMethodInfo RepoCheckoutTreeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoCheckoutTree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoCheckoutTree"
})
#endif
foreign import ccall "ostree_repo_commit_transaction" ostree_repo_commit_transaction ::
Ptr Repo ->
Ptr OSTree.RepoTransactionStats.RepoTransactionStats ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoCommitTransaction ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m (OSTree.RepoTransactionStats.RepoTransactionStats)
repoCommitTransaction :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m RepoTransactionStats
repoCommitTransaction a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr RepoTransactionStats
outStats <- forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
56 :: IO (Ptr OSTree.RepoTransactionStats.RepoTransactionStats)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RepoTransactionStats -> RepoTransactionStats
OSTree.RepoTransactionStats.RepoTransactionStats) Ptr RepoTransactionStats
outStats
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return RepoTransactionStats
outStats'
) (do
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.OverloadedMethod RepoCommitTransactionMethodInfo a signature where
overloadedMethod = repoCommitTransaction
instance O.OverloadedMethodInfo RepoCommitTransactionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoCommitTransaction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoCommitTransaction"
})
#endif
foreign import ccall "ostree_repo_copy_config" ostree_repo_copy_config ::
Ptr Repo ->
IO (Ptr GLib.KeyFile.KeyFile)
repoCopyConfig ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m GLib.KeyFile.KeyFile
repoCopyConfig :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m KeyFile
repoCopyConfig a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoCopyConfig" Ptr KeyFile
result
KeyFile
result' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr KeyFile -> KeyFile
GLib.KeyFile.KeyFile) Ptr KeyFile
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoCopyConfigMethodInfo a signature where
overloadedMethod = repoCopyConfig
instance O.OverloadedMethodInfo RepoCopyConfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoCopyConfig",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoCopyConfig"
})
#endif
foreign import ccall "ostree_repo_create" ostree_repo_create ::
Ptr Repo ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoCreate ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.RepoMode
-> Maybe (b)
-> m ()
repoCreate :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> RepoMode -> Maybe b -> m ()
repoCreate a
self RepoMode
mode Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let mode' :: CUInt
mode' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) RepoMode
mode
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
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.OverloadedMethod RepoCreateMethodInfo a signature where
overloadedMethod = repoCreate
instance O.OverloadedMethodInfo RepoCreateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoCreate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoCreate"
})
#endif
foreign import ccall "ostree_repo_delete_object" ostree_repo_delete_object ::
Ptr Repo ->
CUInt ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoDeleteObject ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> Maybe (b)
-> m ()
repoDeleteObject :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> ObjectType -> Text -> Maybe b -> m ()
repoDeleteObject a
self ObjectType
objtype Text
sha256 Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. 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
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
sha256'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
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.OverloadedMethod RepoDeleteObjectMethodInfo a signature where
overloadedMethod = repoDeleteObject
instance O.OverloadedMethodInfo RepoDeleteObjectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoDeleteObject",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoDeleteObject"
})
#endif
foreign import ccall "ostree_repo_equal" ostree_repo_equal ::
Ptr Repo ->
Ptr Repo ->
IO CInt
repoEqual ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, IsRepo b) =>
a
-> b
-> m Bool
repoEqual :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsRepo b) =>
a -> b -> m Bool
repoEqual a
a b
b = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
a' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
a
Ptr Repo
b' <- 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' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
a
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
b
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.OverloadedMethod RepoEqualMethodInfo a signature where
overloadedMethod = repoEqual
instance O.OverloadedMethodInfo RepoEqualMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoEqual",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoEqual"
})
#endif
foreign import ccall "ostree_repo_find_remotes_async" ostree_repo_find_remotes_async ::
Ptr Repo ->
Ptr (Ptr OSTree.CollectionRef.CollectionRef) ->
Ptr GVariant ->
Ptr (Ptr OSTree.RepoFinder.RepoFinder) ->
Ptr OSTree.AsyncProgress.AsyncProgress ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
repoFindRemotesAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) =>
a
-> [OSTree.CollectionRef.CollectionRef]
-> Maybe (GVariant)
-> [OSTree.RepoFinder.RepoFinder]
-> Maybe (b)
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
repoFindRemotesAsync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b,
IsCancellable c) =>
a
-> [CollectionRef]
-> Maybe GVariant
-> [RepoFinder]
-> Maybe b
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
repoFindRemotesAsync a
self [CollectionRef]
refs Maybe GVariant
options [RepoFinder]
finders Maybe b
progress Maybe c
cancellable Maybe AsyncReadyCallback
callback = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
[Ptr CollectionRef]
refs' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [CollectionRef]
refs
Ptr (Ptr CollectionRef)
refs'' <- forall a. [Ptr a] -> IO (Ptr (Ptr a))
packZeroTerminatedPtrArray [Ptr CollectionRef]
refs'
Ptr GVariant
maybeOptions <- case Maybe GVariant
options of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jOptions -> do
Ptr GVariant
jOptions' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jOptions
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jOptions'
[Ptr RepoFinder]
finders' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [RepoFinder]
finders
Ptr (Ptr RepoFinder)
finders'' <- forall a. [Ptr a] -> IO (Ptr (Ptr a))
packZeroTerminatedPtrArray [Ptr RepoFinder]
finders'
Ptr AsyncProgress
maybeProgress <- case Maybe b
progress of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jProgress -> do
Ptr AsyncProgress
jProgress' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProgress
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AsyncProgress
jProgress'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return (forall a b. Ptr a -> FunPtr b
castPtrToFunPtr forall a. Ptr a
nullPtr)
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- 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 (forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = 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 forall a. Ptr a
userData
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [CollectionRef]
refs
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
options forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [RepoFinder]
finders
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
progress forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CollectionRef)
refs''
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr RepoFinder)
finders''
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.OverloadedMethod RepoFindRemotesAsyncMethodInfo a signature where
overloadedMethod = repoFindRemotesAsync
instance O.OverloadedMethodInfo RepoFindRemotesAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoFindRemotesAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoFindRemotesAsync"
})
#endif
foreign import ccall "ostree_repo_find_remotes_finish" ostree_repo_find_remotes_finish ::
Ptr Repo ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr (Ptr OSTree.RepoFinderResult.RepoFinderResult))
repoFindRemotesFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m [OSTree.RepoFinderResult.RepoFinderResult]
repoFindRemotesFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) =>
a -> b -> m [RepoFinderResult]
repoFindRemotesFinish a
self b
result_ = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr AsyncResult
result_' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
forall a b. IO a -> IO b -> IO a
onException (do
Ptr (Ptr RepoFinderResult)
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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_'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoFindRemotesFinish" Ptr (Ptr RepoFinderResult)
result
[Ptr RepoFinderResult]
result' <- forall a. Ptr (Ptr a) -> IO [Ptr a]
unpackZeroTerminatedPtrArray Ptr (Ptr RepoFinderResult)
result
[RepoFinderResult]
result'' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RepoFinderResult -> RepoFinderResult
OSTree.RepoFinderResult.RepoFinderResult) [Ptr RepoFinderResult]
result'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr RepoFinderResult)
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
forall (m :: * -> *) a. Monad m => a -> m a
return [RepoFinderResult]
result''
) (do
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.OverloadedMethod RepoFindRemotesFinishMethodInfo a signature where
overloadedMethod = repoFindRemotesFinish
instance O.OverloadedMethodInfo RepoFindRemotesFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoFindRemotesFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoFindRemotesFinish"
})
#endif
foreign import ccall "ostree_repo_fsck_object" ostree_repo_fsck_object ::
Ptr Repo ->
CUInt ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoFsckObject ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> Maybe (b)
-> m ()
repoFsckObject :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> ObjectType -> Text -> Maybe b -> m ()
repoFsckObject a
self ObjectType
objtype Text
sha256 Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. 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
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
sha256'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
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.OverloadedMethod RepoFsckObjectMethodInfo a signature where
overloadedMethod = repoFsckObject
instance O.OverloadedMethodInfo RepoFsckObjectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoFsckObject",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoFsckObject"
})
#endif
foreign import ccall "ostree_repo_get_bootloader" ostree_repo_get_bootloader ::
Ptr Repo ->
IO CString
repoGetBootloader ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m T.Text
repoGetBootloader :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m Text
repoGetBootloader a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoGetBootloader" CString
result
Text
result' <- HasCallStack => CString -> IO Text
cstringToText CString
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetBootloaderMethodInfo a signature where
overloadedMethod = repoGetBootloader
instance O.OverloadedMethodInfo RepoGetBootloaderMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetBootloader",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetBootloader"
})
#endif
foreign import ccall "ostree_repo_get_collection_id" ostree_repo_get_collection_id ::
Ptr Repo ->
IO CString
repoGetCollectionId ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m (Maybe T.Text)
repoGetCollectionId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m (Maybe Text)
repoGetCollectionId a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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 <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
cstringToText CString
result'
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetCollectionIdMethodInfo a signature where
overloadedMethod = repoGetCollectionId
instance O.OverloadedMethodInfo RepoGetCollectionIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetCollectionId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetCollectionId"
})
#endif
foreign import ccall "ostree_repo_get_config" ostree_repo_get_config ::
Ptr Repo ->
IO (Ptr GLib.KeyFile.KeyFile)
repoGetConfig ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m GLib.KeyFile.KeyFile
repoGetConfig :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m KeyFile
repoGetConfig a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoGetConfig" Ptr KeyFile
result
KeyFile
result' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr KeyFile -> KeyFile
GLib.KeyFile.KeyFile) Ptr KeyFile
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetConfigMethodInfo a signature where
overloadedMethod = repoGetConfig
instance O.OverloadedMethodInfo RepoGetConfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetConfig",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetConfig"
})
#endif
foreign import ccall "ostree_repo_get_default_repo_finders" ostree_repo_get_default_repo_finders ::
Ptr Repo ->
IO (Ptr CString)
repoGetDefaultRepoFinders ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m [T.Text]
repoGetDefaultRepoFinders :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m [Text]
repoGetDefaultRepoFinders a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoGetDefaultRepoFinders" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetDefaultRepoFindersMethodInfo a signature where
overloadedMethod = repoGetDefaultRepoFinders
instance O.OverloadedMethodInfo RepoGetDefaultRepoFindersMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetDefaultRepoFinders",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetDefaultRepoFinders"
})
#endif
foreign import ccall "ostree_repo_get_dfd" ostree_repo_get_dfd ::
Ptr Repo ->
IO Int32
repoGetDfd ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m Int32
repoGetDfd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m Int32
repoGetDfd a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetDfdMethodInfo a signature where
overloadedMethod = repoGetDfd
instance O.OverloadedMethodInfo RepoGetDfdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetDfd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetDfd"
})
#endif
foreign import ccall "ostree_repo_get_disable_fsync" ostree_repo_get_disable_fsync ::
Ptr Repo ->
IO CInt
repoGetDisableFsync ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m Bool
repoGetDisableFsync :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m Bool
repoGetDisableFsync a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetDisableFsyncMethodInfo a signature where
overloadedMethod = repoGetDisableFsync
instance O.OverloadedMethodInfo RepoGetDisableFsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetDisableFsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetDisableFsync"
})
#endif
foreign import ccall "ostree_repo_get_min_free_space_bytes" ostree_repo_get_min_free_space_bytes ::
Ptr Repo ->
Ptr Word64 ->
Ptr (Ptr GError) ->
IO CInt
repoGetMinFreeSpaceBytes ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m (Word64)
repoGetMinFreeSpaceBytes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m Word64
repoGetMinFreeSpaceBytes a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Word64
outReservedBytes <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr Word64 -> Ptr (Ptr GError) -> IO CInt
ostree_repo_get_min_free_space_bytes Ptr Repo
self' Ptr Word64
outReservedBytes
Word64
outReservedBytes' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
outReservedBytes
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outReservedBytes
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
outReservedBytes'
) (do
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outReservedBytes
)
#if defined(ENABLE_OVERLOADING)
data RepoGetMinFreeSpaceBytesMethodInfo
instance (signature ~ (m (Word64)), MonadIO m, IsRepo a) => O.OverloadedMethod RepoGetMinFreeSpaceBytesMethodInfo a signature where
overloadedMethod = repoGetMinFreeSpaceBytes
instance O.OverloadedMethodInfo RepoGetMinFreeSpaceBytesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetMinFreeSpaceBytes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetMinFreeSpaceBytes"
})
#endif
foreign import ccall "ostree_repo_get_mode" ostree_repo_get_mode ::
Ptr Repo ->
IO CUInt
repoGetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m OSTree.Enums.RepoMode
repoGetMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m RepoMode
repoGetMode a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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' = (forall a. Enum a => Int -> a
toEnum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetModeMethodInfo a signature where
overloadedMethod = repoGetMode
instance O.OverloadedMethodInfo RepoGetModeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetMode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetMode"
})
#endif
foreign import ccall "ostree_repo_get_parent" ostree_repo_get_parent ::
Ptr Repo ->
IO (Ptr Repo)
repoGetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m Repo
repoGetParent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m Repo
repoGetParent a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoGetParent" Ptr Repo
result
Repo
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetParentMethodInfo a signature where
overloadedMethod = repoGetParent
instance O.OverloadedMethodInfo RepoGetParentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetParent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetParent"
})
#endif
foreign import ccall "ostree_repo_get_path" ostree_repo_get_path ::
Ptr Repo ->
IO (Ptr Gio.File.File)
repoGetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m Gio.File.File
repoGetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m File
repoGetPath a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoGetPath" Ptr File
result
File
result' <- (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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoGetPathMethodInfo a signature where
overloadedMethod = repoGetPath
instance O.OverloadedMethodInfo RepoGetPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetPath"
})
#endif
foreign import ccall "ostree_repo_get_remote_boolean_option" ostree_repo_get_remote_boolean_option ::
Ptr Repo ->
CString ->
CString ->
CInt ->
Ptr CInt ->
Ptr (Ptr GError) ->
IO CInt
repoGetRemoteBooleanOption ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> T.Text
-> Bool
-> m (Bool)
repoGetRemoteBooleanOption :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Text -> Bool -> m Bool
repoGetRemoteBooleanOption a
self Text
remoteName Text
optionName Bool
defaultValue = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
defaultValue
Ptr CInt
outValue <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
outValue
let outValue'' :: Bool
outValue'' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
outValue'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem CString
optionName'
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outValue
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
outValue''
) (do
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem CString
optionName'
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.OverloadedMethod RepoGetRemoteBooleanOptionMethodInfo a signature where
overloadedMethod = repoGetRemoteBooleanOption
instance O.OverloadedMethodInfo RepoGetRemoteBooleanOptionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetRemoteBooleanOption",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetRemoteBooleanOption"
})
#endif
foreign import ccall "ostree_repo_get_remote_list_option" ostree_repo_get_remote_list_option ::
Ptr Repo ->
CString ->
CString ->
Ptr (Ptr CString) ->
Ptr (Ptr GError) ->
IO CInt
repoGetRemoteListOption ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> T.Text
-> m ([T.Text])
repoGetRemoteListOption :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Text -> m [Text]
repoGetRemoteListOption a
self Text
remoteName Text
optionName = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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 <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr CString))
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr CString)
outValue
[Text]
outValue'' <- HasCallStack => Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
outValue'
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
outValue'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outValue'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem CString
optionName'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CString)
outValue
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
outValue''
) (do
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem CString
optionName'
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.OverloadedMethod RepoGetRemoteListOptionMethodInfo a signature where
overloadedMethod = repoGetRemoteListOption
instance O.OverloadedMethodInfo RepoGetRemoteListOptionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetRemoteListOption",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetRemoteListOption"
})
#endif
foreign import ccall "ostree_repo_get_remote_option" ostree_repo_get_remote_option ::
Ptr Repo ->
CString ->
CString ->
CString ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
repoGetRemoteOption ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> T.Text
-> Maybe (T.Text)
-> m (T.Text)
repoGetRemoteOption :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Text -> Maybe Text -> m Text
repoGetRemoteOption a
self Text
remoteName Text
optionName Maybe Text
defaultValue = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jDefaultValue -> do
CString
jDefaultValue' <- Text -> IO CString
textToCString Text
jDefaultValue
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jDefaultValue'
Ptr CString
outValue <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outValue
Text
outValue'' <- HasCallStack => CString -> IO Text
cstringToText CString
outValue'
forall a. Ptr a -> IO ()
freeMem CString
outValue'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem CString
optionName'
forall a. Ptr a -> IO ()
freeMem CString
maybeDefaultValue
forall a. Ptr a -> IO ()
freeMem Ptr CString
outValue
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outValue''
) (do
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem CString
optionName'
forall a. Ptr a -> IO ()
freeMem CString
maybeDefaultValue
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.OverloadedMethod RepoGetRemoteOptionMethodInfo a signature where
overloadedMethod = repoGetRemoteOption
instance O.OverloadedMethodInfo RepoGetRemoteOptionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGetRemoteOption",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGetRemoteOption"
})
#endif
foreign import ccall "ostree_repo_gpg_sign_data" ostree_repo_gpg_sign_data ::
Ptr Repo ->
Ptr GLib.Bytes.Bytes ->
Ptr GLib.Bytes.Bytes ->
Ptr CString ->
CString ->
Ptr (Ptr GLib.Bytes.Bytes) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoGpgSignData ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> GLib.Bytes.Bytes
-> GLib.Bytes.Bytes
-> [T.Text]
-> Maybe (T.Text)
-> Maybe (b)
-> m (GLib.Bytes.Bytes)
repoGpgSignData :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Bytes -> Bytes -> [Text] -> Maybe Text -> Maybe b -> m Bytes
repoGpgSignData a
self Bytes
data_ Bytes
oldSignatures [Text]
keyId Maybe Text
homedir Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Bytes
data_' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
data_
Ptr Bytes
oldSignatures' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
oldSignatures
Ptr CString
keyId' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
keyId
CString
maybeHomedir <- case Maybe Text
homedir of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jHomedir -> do
CString
jHomedir' <- Text -> IO CString
textToCString Text
jHomedir
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jHomedir'
Ptr (Ptr Bytes)
outSignatures <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.Bytes.Bytes))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr Bytes
-> Ptr Bytes
-> Ptr CString
-> CString
-> Ptr (Ptr Bytes)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_gpg_sign_data Ptr Repo
self' Ptr Bytes
data_' Ptr Bytes
oldSignatures' Ptr CString
keyId' CString
maybeHomedir Ptr (Ptr Bytes)
outSignatures Ptr Cancellable
maybeCancellable
Ptr Bytes
outSignatures' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Bytes)
outSignatures
Bytes
outSignatures'' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
outSignatures'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
data_
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
oldSignatures
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
forall a. Ptr a -> IO ()
freeMem CString
maybeHomedir
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSignatures
forall (m :: * -> *) a. Monad m => a -> m a
return Bytes
outSignatures''
) (do
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
forall a. Ptr a -> IO ()
freeMem Ptr CString
keyId'
forall a. Ptr a -> IO ()
freeMem CString
maybeHomedir
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSignatures
)
#if defined(ENABLE_OVERLOADING)
data RepoGpgSignDataMethodInfo
instance (signature ~ (GLib.Bytes.Bytes -> GLib.Bytes.Bytes -> [T.Text] -> Maybe (T.Text) -> Maybe (b) -> m (GLib.Bytes.Bytes)), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoGpgSignDataMethodInfo a signature where
overloadedMethod = repoGpgSignData
instance O.OverloadedMethodInfo RepoGpgSignDataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGpgSignData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGpgSignData"
})
#endif
foreign import ccall "ostree_repo_gpg_verify_data" ostree_repo_gpg_verify_data ::
Ptr Repo ->
CString ->
Ptr GLib.Bytes.Bytes ->
Ptr GLib.Bytes.Bytes ->
Ptr Gio.File.File ->
Ptr Gio.File.File ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr OSTree.GpgVerifyResult.GpgVerifyResult)
repoGpgVerifyData ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.File.IsFile c, Gio.Cancellable.IsCancellable d) =>
a
-> Maybe (T.Text)
-> GLib.Bytes.Bytes
-> GLib.Bytes.Bytes
-> Maybe (b)
-> Maybe (c)
-> Maybe (d)
-> m OSTree.GpgVerifyResult.GpgVerifyResult
repoGpgVerifyData :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c,
IsCancellable d) =>
a
-> Maybe Text
-> Bytes
-> Bytes
-> Maybe b
-> Maybe c
-> Maybe d
-> m GpgVerifyResult
repoGpgVerifyData a
self Maybe Text
remoteName Bytes
data_ Bytes
signatures Maybe b
keyringdir Maybe c
extraKeyring Maybe d
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeRemoteName <- case Maybe Text
remoteName of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jRemoteName -> do
CString
jRemoteName' <- Text -> IO CString
textToCString Text
jRemoteName
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jRemoteName'
Ptr Bytes
data_' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
data_
Ptr Bytes
signatures' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
signatures
Ptr File
maybeKeyringdir <- case Maybe b
keyringdir of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jKeyringdir -> do
Ptr File
jKeyringdir' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jKeyringdir
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jKeyringdir'
Ptr File
maybeExtraKeyring <- case Maybe c
extraKeyring of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jExtraKeyring -> do
Ptr File
jExtraKeyring' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jExtraKeyring
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jExtraKeyring'
Ptr Cancellable
maybeCancellable <- case Maybe d
cancellable of
Maybe d
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just d
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Ptr GpgVerifyResult
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoGpgVerifyData" Ptr GpgVerifyResult
result
GpgVerifyResult
result' <- (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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
data_
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
signatures
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
keyringdir forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
extraKeyring forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe d
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeRemoteName
forall (m :: * -> *) a. Monad m => a -> m a
return GpgVerifyResult
result'
) (do
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.OverloadedMethod RepoGpgVerifyDataMethodInfo a signature where
overloadedMethod = repoGpgVerifyData
instance O.OverloadedMethodInfo RepoGpgVerifyDataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoGpgVerifyData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoGpgVerifyData"
})
#endif
foreign import ccall "ostree_repo_has_object" ostree_repo_has_object ::
Ptr Repo ->
CUInt ->
CString ->
Ptr CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoHasObject ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> Maybe (b)
-> m (Bool)
repoHasObject :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> ObjectType -> Text -> Maybe b -> m Bool
repoHasObject a
self ObjectType
objtype Text
checksum Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr CInt
outHaveObject <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
outHaveObject
let outHaveObject'' :: Bool
outHaveObject'' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
outHaveObject'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outHaveObject
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
outHaveObject''
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
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.OverloadedMethod RepoHasObjectMethodInfo a signature where
overloadedMethod = repoHasObject
instance O.OverloadedMethodInfo RepoHasObjectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoHasObject",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoHasObject"
})
#endif
foreign import ccall "ostree_repo_hash" ostree_repo_hash ::
Ptr Repo ->
IO Word32
repoHash ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m Word32
repoHash :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m Word32
repoHash a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- 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'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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.OverloadedMethod RepoHashMethodInfo a signature where
overloadedMethod = repoHash
instance O.OverloadedMethodInfo RepoHashMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoHash",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoHash"
})
#endif
foreign import ccall "ostree_repo_import_object_from" ostree_repo_import_object_from ::
Ptr Repo ->
Ptr Repo ->
CUInt ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoImportObjectFrom ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, IsRepo b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> OSTree.Enums.ObjectType
-> T.Text
-> Maybe (c)
-> m ()
repoImportObjectFrom :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) =>
a -> b -> ObjectType -> Text -> Maybe c -> m ()
repoImportObjectFrom a
self b
source ObjectType
objtype Text
checksum Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Repo
source' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
source
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. 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
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError 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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
source
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
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.OverloadedMethod RepoImportObjectFromMethodInfo a signature where
overloadedMethod = repoImportObjectFrom
instance O.OverloadedMethodInfo RepoImportObjectFromMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoImportObjectFrom",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoImportObjectFrom"
})
#endif
foreign import ccall "ostree_repo_import_object_from_with_trust" ostree_repo_import_object_from_with_trust ::
Ptr Repo ->
Ptr Repo ->
CUInt ->
CString ->
CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoImportObjectFromWithTrust ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, IsRepo b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> OSTree.Enums.ObjectType
-> T.Text
-> Bool
-> Maybe (c)
-> m ()
repoImportObjectFromWithTrust :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) =>
a -> b -> ObjectType -> Text -> Bool -> Maybe c -> m ()
repoImportObjectFromWithTrust a
self b
source ObjectType
objtype Text
checksum Bool
trusted Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Repo
source' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
source
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
let trusted' :: CInt
trusted' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
trusted
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr Repo
-> CUInt
-> CString
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_import_object_from_with_trust Ptr Repo
self' Ptr Repo
source' CUInt
objtype' CString
checksum' CInt
trusted' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
source
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoImportObjectFromWithTrustMethodInfo
instance (signature ~ (b -> OSTree.Enums.ObjectType -> T.Text -> Bool -> Maybe (c) -> m ()), MonadIO m, IsRepo a, IsRepo b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoImportObjectFromWithTrustMethodInfo a signature where
overloadedMethod = repoImportObjectFromWithTrust
instance O.OverloadedMethodInfo RepoImportObjectFromWithTrustMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoImportObjectFromWithTrust",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoImportObjectFromWithTrust"
})
#endif
foreign import ccall "ostree_repo_is_system" ostree_repo_is_system ::
Ptr Repo ->
IO CInt
repoIsSystem ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m Bool
repoIsSystem :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m Bool
repoIsSystem a
repo = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
repo' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
CInt
result <- Ptr Repo -> IO CInt
ostree_repo_is_system Ptr Repo
repo'
let result' :: Bool
result' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data RepoIsSystemMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRepo a) => O.OverloadedMethod RepoIsSystemMethodInfo a signature where
overloadedMethod = repoIsSystem
instance O.OverloadedMethodInfo RepoIsSystemMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoIsSystem",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoIsSystem"
})
#endif
foreign import ccall "ostree_repo_is_writable" ostree_repo_is_writable ::
Ptr Repo ->
Ptr (Ptr GError) ->
IO CInt
repoIsWritable ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m ()
repoIsWritable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m ()
repoIsWritable a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr (Ptr GError) -> IO CInt
ostree_repo_is_writable Ptr Repo
self'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoIsWritableMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoIsWritableMethodInfo a signature where
overloadedMethod = repoIsWritable
instance O.OverloadedMethodInfo RepoIsWritableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoIsWritable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoIsWritable"
})
#endif
#if defined(ENABLE_OVERLOADING)
data RepoListCollectionRefsMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "listCollectionRefs" Repo) => O.OverloadedMethod RepoListCollectionRefsMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "listCollectionRefs" Repo) => O.OverloadedMethodInfo RepoListCollectionRefsMethodInfo o where
overloadedMethodInfo = undefined
#endif
#if defined(ENABLE_OVERLOADING)
data RepoListCommitObjectsStartingWithMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "listCommitObjectsStartingWith" Repo) => O.OverloadedMethod RepoListCommitObjectsStartingWithMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "listCommitObjectsStartingWith" Repo) => O.OverloadedMethodInfo RepoListCommitObjectsStartingWithMethodInfo o where
overloadedMethodInfo = undefined
#endif
#if defined(ENABLE_OVERLOADING)
data RepoListObjectsMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "listObjects" Repo) => O.OverloadedMethod RepoListObjectsMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "listObjects" Repo) => O.OverloadedMethodInfo RepoListObjectsMethodInfo o where
overloadedMethodInfo = undefined
#endif
#if defined(ENABLE_OVERLOADING)
data RepoListRefsMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "listRefs" Repo) => O.OverloadedMethod RepoListRefsMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "listRefs" Repo) => O.OverloadedMethodInfo RepoListRefsMethodInfo o where
overloadedMethodInfo = undefined
#endif
#if defined(ENABLE_OVERLOADING)
data RepoListRefsExtMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "listRefsExt" Repo) => O.OverloadedMethod RepoListRefsExtMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "listRefsExt" Repo) => O.OverloadedMethodInfo RepoListRefsExtMethodInfo o where
overloadedMethodInfo = undefined
#endif
foreign import ccall "ostree_repo_list_static_delta_indexes" ostree_repo_list_static_delta_indexes ::
Ptr Repo ->
Ptr (Ptr (GPtrArray CString)) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoListStaticDeltaIndexes ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ([T.Text])
repoListStaticDeltaIndexes :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m [Text]
repoListStaticDeltaIndexes a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr (Ptr (GPtrArray CString))
outIndexes <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr (GPtrArray CString)))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr (Ptr (GPtrArray CString))
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_list_static_delta_indexes Ptr Repo
self' Ptr (Ptr (GPtrArray CString))
outIndexes Ptr Cancellable
maybeCancellable
Ptr (GPtrArray CString)
outIndexes' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr (GPtrArray CString))
outIndexes
[CString]
outIndexes'' <- forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray CString)
outIndexes'
[Text]
outIndexes''' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
cstringToText [CString]
outIndexes''
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray CString)
outIndexes'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr (GPtrArray CString))
outIndexes
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
outIndexes'''
) (do
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr (GPtrArray CString))
outIndexes
)
#if defined(ENABLE_OVERLOADING)
data RepoListStaticDeltaIndexesMethodInfo
instance (signature ~ (Maybe (b) -> m ([T.Text])), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoListStaticDeltaIndexesMethodInfo a signature where
overloadedMethod = repoListStaticDeltaIndexes
instance O.OverloadedMethodInfo RepoListStaticDeltaIndexesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoListStaticDeltaIndexes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoListStaticDeltaIndexes"
})
#endif
foreign import ccall "ostree_repo_list_static_delta_names" ostree_repo_list_static_delta_names ::
Ptr Repo ->
Ptr (Ptr (GPtrArray CString)) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoListStaticDeltaNames ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ([T.Text])
repoListStaticDeltaNames :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m [Text]
repoListStaticDeltaNames a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr (Ptr (GPtrArray CString))
outDeltas <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr (GPtrArray CString)))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr (Ptr (GPtrArray CString))
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_list_static_delta_names Ptr Repo
self' Ptr (Ptr (GPtrArray CString))
outDeltas Ptr Cancellable
maybeCancellable
Ptr (GPtrArray CString)
outDeltas' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr (GPtrArray CString))
outDeltas
[CString]
outDeltas'' <- forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray CString)
outDeltas'
[Text]
outDeltas''' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
cstringToText [CString]
outDeltas''
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray CString)
outDeltas'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr (GPtrArray CString))
outDeltas
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
outDeltas'''
) (do
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr (GPtrArray CString))
outDeltas
)
#if defined(ENABLE_OVERLOADING)
data RepoListStaticDeltaNamesMethodInfo
instance (signature ~ (Maybe (b) -> m ([T.Text])), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoListStaticDeltaNamesMethodInfo a signature where
overloadedMethod = repoListStaticDeltaNames
instance O.OverloadedMethodInfo RepoListStaticDeltaNamesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoListStaticDeltaNames",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoListStaticDeltaNames"
})
#endif
foreign import ccall "ostree_repo_load_commit" ostree_repo_load_commit ::
Ptr Repo ->
CString ->
Ptr (Ptr GVariant) ->
Ptr CUInt ->
Ptr (Ptr GError) ->
IO CInt
repoLoadCommit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> m ((GVariant, [OSTree.Flags.RepoCommitState]))
repoLoadCommit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> m (GVariant, [RepoCommitState])
repoLoadCommit a
self Text
checksum = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr (Ptr GVariant)
outCommit <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GVariant))
Ptr CUInt
outState <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr (Ptr GVariant)
-> Ptr CUInt
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_load_commit Ptr Repo
self' CString
checksum' Ptr (Ptr GVariant)
outCommit Ptr CUInt
outState
Ptr GVariant
outCommit' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr GVariant)
outCommit
GVariant
outCommit'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
outCommit'
CUInt
outState' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
outState
let outState'' :: [RepoCommitState]
outState'' = forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
outState'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outCommit
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
outState
forall (m :: * -> *) a. Monad m => a -> m a
return (GVariant
outCommit'', [RepoCommitState]
outState'')
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outCommit
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
outState
)
#if defined(ENABLE_OVERLOADING)
data RepoLoadCommitMethodInfo
instance (signature ~ (T.Text -> m ((GVariant, [OSTree.Flags.RepoCommitState]))), MonadIO m, IsRepo a) => O.OverloadedMethod RepoLoadCommitMethodInfo a signature where
overloadedMethod = repoLoadCommit
instance O.OverloadedMethodInfo RepoLoadCommitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoLoadCommit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoLoadCommit"
})
#endif
foreign import ccall "ostree_repo_load_file" ostree_repo_load_file ::
Ptr Repo ->
CString ->
Ptr (Ptr Gio.InputStream.InputStream) ->
Ptr (Ptr Gio.FileInfo.FileInfo) ->
Ptr (Ptr GVariant) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoLoadFile ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m ((Maybe Gio.InputStream.InputStream, Maybe Gio.FileInfo.FileInfo, Maybe GVariant))
repoLoadFile :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> Text
-> Maybe b
-> m (Maybe InputStream, Maybe FileInfo, Maybe GVariant)
repoLoadFile a
self Text
checksum Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr (Ptr InputStream)
outInput <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gio.InputStream.InputStream))
Ptr (Ptr FileInfo)
outFileInfo <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gio.FileInfo.FileInfo))
Ptr (Ptr GVariant)
outXattrs <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GVariant))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr (Ptr InputStream)
-> Ptr (Ptr FileInfo)
-> Ptr (Ptr GVariant)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_load_file Ptr Repo
self' CString
checksum' Ptr (Ptr InputStream)
outInput Ptr (Ptr FileInfo)
outFileInfo Ptr (Ptr GVariant)
outXattrs Ptr Cancellable
maybeCancellable
Ptr InputStream
outInput' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr InputStream)
outInput
Maybe InputStream
maybeOutInput' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr InputStream
outInput' forall a b. (a -> b) -> a -> b
$ \Ptr InputStream
outInput'' -> do
InputStream
outInput''' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr InputStream -> InputStream
Gio.InputStream.InputStream) Ptr InputStream
outInput''
forall (m :: * -> *) a. Monad m => a -> m a
return InputStream
outInput'''
Ptr FileInfo
outFileInfo' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr FileInfo)
outFileInfo
Maybe FileInfo
maybeOutFileInfo' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FileInfo
outFileInfo' forall a b. (a -> b) -> a -> b
$ \Ptr FileInfo
outFileInfo'' -> do
FileInfo
outFileInfo''' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr FileInfo -> FileInfo
Gio.FileInfo.FileInfo) Ptr FileInfo
outFileInfo''
forall (m :: * -> *) a. Monad m => a -> m a
return FileInfo
outFileInfo'''
Ptr GVariant
outXattrs' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr GVariant)
outXattrs
Maybe GVariant
maybeOutXattrs' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GVariant
outXattrs' forall a b. (a -> b) -> a -> b
$ \Ptr GVariant
outXattrs'' -> do
GVariant
outXattrs''' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
outXattrs''
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
outXattrs'''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr InputStream)
outInput
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr FileInfo)
outFileInfo
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outXattrs
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe InputStream
maybeOutInput', Maybe FileInfo
maybeOutFileInfo', Maybe GVariant
maybeOutXattrs')
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr InputStream)
outInput
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr FileInfo)
outFileInfo
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outXattrs
)
#if defined(ENABLE_OVERLOADING)
data RepoLoadFileMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ((Maybe Gio.InputStream.InputStream, Maybe Gio.FileInfo.FileInfo, Maybe GVariant))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoLoadFileMethodInfo a signature where
overloadedMethod = repoLoadFile
instance O.OverloadedMethodInfo RepoLoadFileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoLoadFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoLoadFile"
})
#endif
foreign import ccall "ostree_repo_load_object_stream" ostree_repo_load_object_stream ::
Ptr Repo ->
CUInt ->
CString ->
Ptr (Ptr Gio.InputStream.InputStream) ->
Ptr Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoLoadObjectStream ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> Maybe (b)
-> m ((Gio.InputStream.InputStream, Word64))
repoLoadObjectStream :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> ObjectType -> Text -> Maybe b -> m (InputStream, Word64)
repoLoadObjectStream a
self ObjectType
objtype Text
checksum Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr (Ptr InputStream)
outInput <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gio.InputStream.InputStream))
Ptr Word64
outSize <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr (Ptr InputStream)
-> Ptr Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_load_object_stream Ptr Repo
self' CUInt
objtype' CString
checksum' Ptr (Ptr InputStream)
outInput Ptr Word64
outSize Ptr Cancellable
maybeCancellable
Ptr InputStream
outInput' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr InputStream)
outInput
InputStream
outInput'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr InputStream -> InputStream
Gio.InputStream.InputStream) Ptr InputStream
outInput'
Word64
outSize' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
outSize
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr InputStream)
outInput
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outSize
forall (m :: * -> *) a. Monad m => a -> m a
return (InputStream
outInput'', Word64
outSize')
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr InputStream)
outInput
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outSize
)
#if defined(ENABLE_OVERLOADING)
data RepoLoadObjectStreamMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> Maybe (b) -> m ((Gio.InputStream.InputStream, Word64))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoLoadObjectStreamMethodInfo a signature where
overloadedMethod = repoLoadObjectStream
instance O.OverloadedMethodInfo RepoLoadObjectStreamMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoLoadObjectStream",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoLoadObjectStream"
})
#endif
foreign import ccall "ostree_repo_load_variant" ostree_repo_load_variant ::
Ptr Repo ->
CUInt ->
CString ->
Ptr (Ptr GVariant) ->
Ptr (Ptr GError) ->
IO CInt
repoLoadVariant ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> m (GVariant)
repoLoadVariant :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> ObjectType -> Text -> m GVariant
repoLoadVariant a
self ObjectType
objtype Text
sha256 = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
sha256' <- Text -> IO CString
textToCString Text
sha256
Ptr (Ptr GVariant)
outVariant <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GVariant))
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr (Ptr GVariant)
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_load_variant Ptr Repo
self' CUInt
objtype' CString
sha256' Ptr (Ptr GVariant)
outVariant
Ptr GVariant
outVariant' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr GVariant)
outVariant
GVariant
outVariant'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
outVariant'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
sha256'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outVariant
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
outVariant''
) (do
forall a. Ptr a -> IO ()
freeMem CString
sha256'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outVariant
)
#if defined(ENABLE_OVERLOADING)
data RepoLoadVariantMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> m (GVariant)), MonadIO m, IsRepo a) => O.OverloadedMethod RepoLoadVariantMethodInfo a signature where
overloadedMethod = repoLoadVariant
instance O.OverloadedMethodInfo RepoLoadVariantMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoLoadVariant",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoLoadVariant"
})
#endif
foreign import ccall "ostree_repo_load_variant_if_exists" ostree_repo_load_variant_if_exists ::
Ptr Repo ->
CUInt ->
CString ->
Ptr (Ptr GVariant) ->
Ptr (Ptr GError) ->
IO CInt
repoLoadVariantIfExists ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> m ((Maybe GVariant))
repoLoadVariantIfExists :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> ObjectType -> Text -> m (Maybe GVariant)
repoLoadVariantIfExists a
self ObjectType
objtype Text
sha256 = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
sha256' <- Text -> IO CString
textToCString Text
sha256
Ptr (Ptr GVariant)
outVariant <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GVariant))
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr (Ptr GVariant)
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_load_variant_if_exists Ptr Repo
self' CUInt
objtype' CString
sha256' Ptr (Ptr GVariant)
outVariant
Ptr GVariant
outVariant' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr GVariant)
outVariant
Maybe GVariant
maybeOutVariant' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GVariant
outVariant' forall a b. (a -> b) -> a -> b
$ \Ptr GVariant
outVariant'' -> do
GVariant
outVariant''' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
outVariant''
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
outVariant'''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
sha256'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outVariant
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GVariant
maybeOutVariant'
) (do
forall a. Ptr a -> IO ()
freeMem CString
sha256'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outVariant
)
#if defined(ENABLE_OVERLOADING)
data RepoLoadVariantIfExistsMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> m ((Maybe GVariant))), MonadIO m, IsRepo a) => O.OverloadedMethod RepoLoadVariantIfExistsMethodInfo a signature where
overloadedMethod = repoLoadVariantIfExists
instance O.OverloadedMethodInfo RepoLoadVariantIfExistsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoLoadVariantIfExists",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoLoadVariantIfExists"
})
#endif
foreign import ccall "ostree_repo_lock_pop" ostree_repo_lock_pop ::
Ptr Repo ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoLockPop ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.RepoLockType
-> Maybe (b)
-> m ()
repoLockPop :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> RepoLockType -> Maybe b -> m ()
repoLockPop a
self RepoLockType
lockType Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let lockType' :: CUInt
lockType' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) RepoLockType
lockType
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CUInt -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_lock_pop Ptr Repo
self' CUInt
lockType' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoLockPopMethodInfo
instance (signature ~ (OSTree.Enums.RepoLockType -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoLockPopMethodInfo a signature where
overloadedMethod = repoLockPop
instance O.OverloadedMethodInfo RepoLockPopMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoLockPop",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoLockPop"
})
#endif
foreign import ccall "ostree_repo_lock_push" ostree_repo_lock_push ::
Ptr Repo ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoLockPush ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.RepoLockType
-> Maybe (b)
-> m ()
repoLockPush :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> RepoLockType -> Maybe b -> m ()
repoLockPush a
self RepoLockType
lockType Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let lockType' :: CUInt
lockType' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) RepoLockType
lockType
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CUInt -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_lock_push Ptr Repo
self' CUInt
lockType' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoLockPushMethodInfo
instance (signature ~ (OSTree.Enums.RepoLockType -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoLockPushMethodInfo a signature where
overloadedMethod = repoLockPush
instance O.OverloadedMethodInfo RepoLockPushMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoLockPush",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoLockPush"
})
#endif
foreign import ccall "ostree_repo_mark_commit_partial" ostree_repo_mark_commit_partial ::
Ptr Repo ->
CString ->
CInt ->
Ptr (Ptr GError) ->
IO CInt
repoMarkCommitPartial ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> Bool
-> m ()
repoMarkCommitPartial :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Bool -> m ()
repoMarkCommitPartial a
self Text
checksum Bool
isPartial = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
let isPartial' :: CInt
isPartial' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
isPartial
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CString -> CInt -> Ptr (Ptr GError) -> IO CInt
ostree_repo_mark_commit_partial Ptr Repo
self' CString
checksum' CInt
isPartial'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoMarkCommitPartialMethodInfo
instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoMarkCommitPartialMethodInfo a signature where
overloadedMethod = repoMarkCommitPartial
instance O.OverloadedMethodInfo RepoMarkCommitPartialMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoMarkCommitPartial",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoMarkCommitPartial"
})
#endif
foreign import ccall "ostree_repo_mark_commit_partial_reason" ostree_repo_mark_commit_partial_reason ::
Ptr Repo ->
CString ->
CInt ->
CUInt ->
Ptr (Ptr GError) ->
IO CInt
repoMarkCommitPartialReason ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> Bool
-> [OSTree.Flags.RepoCommitState]
-> m ()
repoMarkCommitPartialReason :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Bool -> [RepoCommitState] -> m ()
repoMarkCommitPartialReason a
self Text
checksum Bool
isPartial [RepoCommitState]
inState = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
let isPartial' :: CInt
isPartial' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
isPartial
let inState' :: CUInt
inState' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoCommitState]
inState
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CString -> CInt -> CUInt -> Ptr (Ptr GError) -> IO CInt
ostree_repo_mark_commit_partial_reason Ptr Repo
self' CString
checksum' CInt
isPartial' CUInt
inState'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoMarkCommitPartialReasonMethodInfo
instance (signature ~ (T.Text -> Bool -> [OSTree.Flags.RepoCommitState] -> m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoMarkCommitPartialReasonMethodInfo a signature where
overloadedMethod = repoMarkCommitPartialReason
instance O.OverloadedMethodInfo RepoMarkCommitPartialReasonMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoMarkCommitPartialReason",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoMarkCommitPartialReason"
})
#endif
foreign import ccall "ostree_repo_open" ostree_repo_open ::
Ptr Repo ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoOpen ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
repoOpen :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m ()
repoOpen a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_open Ptr Repo
self' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoOpenMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoOpenMethodInfo a signature where
overloadedMethod = repoOpen
instance O.OverloadedMethodInfo RepoOpenMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoOpen",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoOpen"
})
#endif
foreign import ccall "ostree_repo_prepare_transaction" ostree_repo_prepare_transaction ::
Ptr Repo ->
Ptr CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoPrepareTransaction ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m (Bool)
repoPrepareTransaction :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m Bool
repoPrepareTransaction a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CInt
outTransactionResume <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr CInt -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_prepare_transaction Ptr Repo
self' Ptr CInt
outTransactionResume Ptr Cancellable
maybeCancellable
CInt
outTransactionResume' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
outTransactionResume
let outTransactionResume'' :: Bool
outTransactionResume'' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
outTransactionResume'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outTransactionResume
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
outTransactionResume''
) (do
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outTransactionResume
)
#if defined(ENABLE_OVERLOADING)
data RepoPrepareTransactionMethodInfo
instance (signature ~ (Maybe (b) -> m (Bool)), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoPrepareTransactionMethodInfo a signature where
overloadedMethod = repoPrepareTransaction
instance O.OverloadedMethodInfo RepoPrepareTransactionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPrepareTransaction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPrepareTransaction"
})
#endif
foreign import ccall "ostree_repo_prune" ostree_repo_prune ::
Ptr Repo ->
CUInt ->
Int32 ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoPrune ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> [OSTree.Flags.RepoPruneFlags]
-> Int32
-> Maybe (b)
-> m ((Int32, Int32, Word64))
repoPrune :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> [RepoPruneFlags] -> Int32 -> Maybe b -> m (Int32, Int32, Word64)
repoPrune a
self [RepoPruneFlags]
flags Int32
depth Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoPruneFlags]
flags
Ptr Int32
outObjectsTotal <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
outObjectsPruned <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Word64
outPrunedObjectSizeTotal <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> Int32
-> Ptr Int32
-> Ptr Int32
-> Ptr Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_prune Ptr Repo
self' CUInt
flags' Int32
depth Ptr Int32
outObjectsTotal Ptr Int32
outObjectsPruned Ptr Word64
outPrunedObjectSizeTotal Ptr Cancellable
maybeCancellable
Int32
outObjectsTotal' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
outObjectsTotal
Int32
outObjectsPruned' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
outObjectsPruned
Word64
outPrunedObjectSizeTotal' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
outPrunedObjectSizeTotal
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsTotal
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsPruned
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outPrunedObjectSizeTotal
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
outObjectsTotal', Int32
outObjectsPruned', Word64
outPrunedObjectSizeTotal')
) (do
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsTotal
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsPruned
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outPrunedObjectSizeTotal
)
#if defined(ENABLE_OVERLOADING)
data RepoPruneMethodInfo
instance (signature ~ ([OSTree.Flags.RepoPruneFlags] -> Int32 -> Maybe (b) -> m ((Int32, Int32, Word64))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoPruneMethodInfo a signature where
overloadedMethod = repoPrune
instance O.OverloadedMethodInfo RepoPruneMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPrune",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPrune"
})
#endif
foreign import ccall "ostree_repo_prune_from_reachable" ostree_repo_prune_from_reachable ::
Ptr Repo ->
Ptr OSTree.RepoPruneOptions.RepoPruneOptions ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoPruneFromReachable ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.RepoPruneOptions.RepoPruneOptions
-> Maybe (b)
-> m ((Int32, Int32, Word64))
repoPruneFromReachable :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> RepoPruneOptions -> Maybe b -> m (Int32, Int32, Word64)
repoPruneFromReachable a
self RepoPruneOptions
options Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr RepoPruneOptions
options' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoPruneOptions
options
Ptr Int32
outObjectsTotal <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
outObjectsPruned <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Word64
outPrunedObjectSizeTotal <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr RepoPruneOptions
-> Ptr Int32
-> Ptr Int32
-> Ptr Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_prune_from_reachable Ptr Repo
self' Ptr RepoPruneOptions
options' Ptr Int32
outObjectsTotal Ptr Int32
outObjectsPruned Ptr Word64
outPrunedObjectSizeTotal Ptr Cancellable
maybeCancellable
Int32
outObjectsTotal' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
outObjectsTotal
Int32
outObjectsPruned' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
outObjectsPruned
Word64
outPrunedObjectSizeTotal' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
outPrunedObjectSizeTotal
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoPruneOptions
options
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsTotal
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsPruned
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outPrunedObjectSizeTotal
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
outObjectsTotal', Int32
outObjectsPruned', Word64
outPrunedObjectSizeTotal')
) (do
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsTotal
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsPruned
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outPrunedObjectSizeTotal
)
#if defined(ENABLE_OVERLOADING)
data RepoPruneFromReachableMethodInfo
instance (signature ~ (OSTree.RepoPruneOptions.RepoPruneOptions -> Maybe (b) -> m ((Int32, Int32, Word64))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoPruneFromReachableMethodInfo a signature where
overloadedMethod = repoPruneFromReachable
instance O.OverloadedMethodInfo RepoPruneFromReachableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPruneFromReachable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPruneFromReachable"
})
#endif
foreign import ccall "ostree_repo_prune_static_deltas" ostree_repo_prune_static_deltas ::
Ptr Repo ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoPruneStaticDeltas ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (T.Text)
-> Maybe (b)
-> m ()
repoPruneStaticDeltas :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe Text -> Maybe b -> m ()
repoPruneStaticDeltas a
self Maybe Text
commit Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeCommit <- case Maybe Text
commit of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jCommit -> do
CString
jCommit' <- Text -> IO CString
textToCString Text
jCommit
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jCommit'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_prune_static_deltas Ptr Repo
self' CString
maybeCommit Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeCommit
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeCommit
)
#if defined(ENABLE_OVERLOADING)
data RepoPruneStaticDeltasMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoPruneStaticDeltasMethodInfo a signature where
overloadedMethod = repoPruneStaticDeltas
instance O.OverloadedMethodInfo RepoPruneStaticDeltasMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPruneStaticDeltas",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPruneStaticDeltas"
})
#endif
foreign import ccall "ostree_repo_pull" ostree_repo_pull ::
Ptr Repo ->
CString ->
Ptr CString ->
CUInt ->
Ptr OSTree.AsyncProgress.AsyncProgress ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoPull ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> Maybe ([T.Text])
-> [OSTree.Flags.RepoPullFlags]
-> Maybe (b)
-> Maybe (c)
-> m ()
repoPull :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b,
IsCancellable c) =>
a
-> Text
-> Maybe [Text]
-> [RepoPullFlags]
-> Maybe b
-> Maybe c
-> m ()
repoPull a
self Text
remoteName Maybe [Text]
refsToFetch [RepoPullFlags]
flags Maybe b
progress Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
remoteName' <- Text -> IO CString
textToCString Text
remoteName
Ptr CString
maybeRefsToFetch <- case Maybe [Text]
refsToFetch of
Maybe [Text]
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just [Text]
jRefsToFetch -> do
Ptr CString
jRefsToFetch' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jRefsToFetch
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jRefsToFetch'
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoPullFlags]
flags
Ptr AsyncProgress
maybeProgress <- case Maybe b
progress of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jProgress -> do
Ptr AsyncProgress
jProgress' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProgress
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AsyncProgress
jProgress'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr CString
-> CUInt
-> Ptr AsyncProgress
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_pull Ptr Repo
self' CString
remoteName' Ptr CString
maybeRefsToFetch CUInt
flags' Ptr AsyncProgress
maybeProgress Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
progress forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeRefsToFetch
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeRefsToFetch
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeRefsToFetch
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeRefsToFetch
)
#if defined(ENABLE_OVERLOADING)
data RepoPullMethodInfo
instance (signature ~ (T.Text -> Maybe ([T.Text]) -> [OSTree.Flags.RepoPullFlags] -> Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoPullMethodInfo a signature where
overloadedMethod = repoPull
instance O.OverloadedMethodInfo RepoPullMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPull",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPull"
})
#endif
foreign import ccall "ostree_repo_pull_from_remotes_async" ostree_repo_pull_from_remotes_async ::
Ptr Repo ->
Ptr (Ptr OSTree.RepoFinderResult.RepoFinderResult) ->
Ptr GVariant ->
Ptr OSTree.AsyncProgress.AsyncProgress ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
repoPullFromRemotesAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) =>
a
-> [OSTree.RepoFinderResult.RepoFinderResult]
-> Maybe (GVariant)
-> Maybe (b)
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
repoPullFromRemotesAsync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b,
IsCancellable c) =>
a
-> [RepoFinderResult]
-> Maybe GVariant
-> Maybe b
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
repoPullFromRemotesAsync a
self [RepoFinderResult]
results Maybe GVariant
options Maybe b
progress Maybe c
cancellable Maybe AsyncReadyCallback
callback = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
[Ptr RepoFinderResult]
results' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [RepoFinderResult]
results
Ptr (Ptr RepoFinderResult)
results'' <- forall a. [Ptr a] -> IO (Ptr (Ptr a))
packZeroTerminatedPtrArray [Ptr RepoFinderResult]
results'
Ptr GVariant
maybeOptions <- case Maybe GVariant
options of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jOptions -> do
Ptr GVariant
jOptions' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jOptions
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jOptions'
Ptr AsyncProgress
maybeProgress <- case Maybe b
progress of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jProgress -> do
Ptr AsyncProgress
jProgress' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProgress
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AsyncProgress
jProgress'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return (forall a b. Ptr a -> FunPtr b
castPtrToFunPtr forall a. Ptr a
nullPtr)
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- 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 (forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = forall a. Ptr a
nullPtr
Ptr Repo
-> Ptr (Ptr RepoFinderResult)
-> Ptr GVariant
-> Ptr AsyncProgress
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
ostree_repo_pull_from_remotes_async Ptr Repo
self' Ptr (Ptr RepoFinderResult)
results'' Ptr GVariant
maybeOptions Ptr AsyncProgress
maybeProgress Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback forall a. Ptr a
userData
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [RepoFinderResult]
results
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
options forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
progress forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr RepoFinderResult)
results''
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RepoPullFromRemotesAsyncMethodInfo
instance (signature ~ ([OSTree.RepoFinderResult.RepoFinderResult] -> Maybe (GVariant) -> Maybe (b) -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoPullFromRemotesAsyncMethodInfo a signature where
overloadedMethod = repoPullFromRemotesAsync
instance O.OverloadedMethodInfo RepoPullFromRemotesAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPullFromRemotesAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPullFromRemotesAsync"
})
#endif
foreign import ccall "ostree_repo_pull_from_remotes_finish" ostree_repo_pull_from_remotes_finish ::
Ptr Repo ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
repoPullFromRemotesFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
repoPullFromRemotesFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) =>
a -> b -> m ()
repoPullFromRemotesFinish a
self b
result_ = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr AsyncResult
result_' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
ostree_repo_pull_from_remotes_finish Ptr Repo
self' Ptr AsyncResult
result_'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoPullFromRemotesFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod RepoPullFromRemotesFinishMethodInfo a signature where
overloadedMethod = repoPullFromRemotesFinish
instance O.OverloadedMethodInfo RepoPullFromRemotesFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPullFromRemotesFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPullFromRemotesFinish"
})
#endif
foreign import ccall "ostree_repo_pull_one_dir" ostree_repo_pull_one_dir ::
Ptr Repo ->
CString ->
CString ->
Ptr CString ->
CUInt ->
Ptr OSTree.AsyncProgress.AsyncProgress ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoPullOneDir ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> T.Text
-> Maybe ([T.Text])
-> [OSTree.Flags.RepoPullFlags]
-> Maybe (b)
-> Maybe (c)
-> m ()
repoPullOneDir :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b,
IsCancellable c) =>
a
-> Text
-> Text
-> Maybe [Text]
-> [RepoPullFlags]
-> Maybe b
-> Maybe c
-> m ()
repoPullOneDir a
self Text
remoteName Text
dirToPull Maybe [Text]
refsToFetch [RepoPullFlags]
flags Maybe b
progress Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
remoteName' <- Text -> IO CString
textToCString Text
remoteName
CString
dirToPull' <- Text -> IO CString
textToCString Text
dirToPull
Ptr CString
maybeRefsToFetch <- case Maybe [Text]
refsToFetch of
Maybe [Text]
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just [Text]
jRefsToFetch -> do
Ptr CString
jRefsToFetch' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jRefsToFetch
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jRefsToFetch'
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoPullFlags]
flags
Ptr AsyncProgress
maybeProgress <- case Maybe b
progress of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jProgress -> do
Ptr AsyncProgress
jProgress' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProgress
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AsyncProgress
jProgress'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> Ptr CString
-> CUInt
-> Ptr AsyncProgress
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_pull_one_dir Ptr Repo
self' CString
remoteName' CString
dirToPull' Ptr CString
maybeRefsToFetch CUInt
flags' Ptr AsyncProgress
maybeProgress Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
progress forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem CString
dirToPull'
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeRefsToFetch
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeRefsToFetch
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem CString
dirToPull'
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeRefsToFetch
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeRefsToFetch
)
#if defined(ENABLE_OVERLOADING)
data RepoPullOneDirMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe ([T.Text]) -> [OSTree.Flags.RepoPullFlags] -> Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoPullOneDirMethodInfo a signature where
overloadedMethod = repoPullOneDir
instance O.OverloadedMethodInfo RepoPullOneDirMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPullOneDir",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPullOneDir"
})
#endif
foreign import ccall "ostree_repo_pull_with_options" ostree_repo_pull_with_options ::
Ptr Repo ->
CString ->
Ptr GVariant ->
Ptr OSTree.AsyncProgress.AsyncProgress ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoPullWithOptions ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> GVariant
-> Maybe (b)
-> Maybe (c)
-> m ()
repoPullWithOptions :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b,
IsCancellable c) =>
a -> Text -> GVariant -> Maybe b -> Maybe c -> m ()
repoPullWithOptions a
self Text
remoteNameOrBaseurl GVariant
options Maybe b
progress Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
remoteNameOrBaseurl' <- Text -> IO CString
textToCString Text
remoteNameOrBaseurl
Ptr GVariant
options' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
options
Ptr AsyncProgress
maybeProgress <- case Maybe b
progress of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jProgress -> do
Ptr AsyncProgress
jProgress' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProgress
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AsyncProgress
jProgress'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr GVariant
-> Ptr AsyncProgress
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_pull_with_options Ptr Repo
self' CString
remoteNameOrBaseurl' Ptr GVariant
options' Ptr AsyncProgress
maybeProgress Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
options
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
progress forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
remoteNameOrBaseurl'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
remoteNameOrBaseurl'
)
#if defined(ENABLE_OVERLOADING)
data RepoPullWithOptionsMethodInfo
instance (signature ~ (T.Text -> GVariant -> Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsRepo a, OSTree.AsyncProgress.IsAsyncProgress b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoPullWithOptionsMethodInfo a signature where
overloadedMethod = repoPullWithOptions
instance O.OverloadedMethodInfo RepoPullWithOptionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoPullWithOptions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoPullWithOptions"
})
#endif
foreign import ccall "ostree_repo_query_object_storage_size" ostree_repo_query_object_storage_size ::
Ptr Repo ->
CUInt ->
CString ->
Ptr Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoQueryObjectStorageSize ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> Maybe (b)
-> m (Word64)
repoQueryObjectStorageSize :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> ObjectType -> Text -> Maybe b -> m Word64
repoQueryObjectStorageSize a
self ObjectType
objtype Text
sha256 Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
sha256' <- Text -> IO CString
textToCString Text
sha256
Ptr Word64
outSize <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_query_object_storage_size Ptr Repo
self' CUInt
objtype' CString
sha256' Ptr Word64
outSize Ptr Cancellable
maybeCancellable
Word64
outSize' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
outSize
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
sha256'
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outSize
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
outSize'
) (do
forall a. Ptr a -> IO ()
freeMem CString
sha256'
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outSize
)
#if defined(ENABLE_OVERLOADING)
data RepoQueryObjectStorageSizeMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> Maybe (b) -> m (Word64)), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoQueryObjectStorageSizeMethodInfo a signature where
overloadedMethod = repoQueryObjectStorageSize
instance O.OverloadedMethodInfo RepoQueryObjectStorageSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoQueryObjectStorageSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoQueryObjectStorageSize"
})
#endif
foreign import ccall "ostree_repo_read_commit" ostree_repo_read_commit ::
Ptr Repo ->
CString ->
Ptr (Ptr Gio.File.File) ->
Ptr CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoReadCommit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m ((Gio.File.File, T.Text))
repoReadCommit :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Maybe b -> m (File, Text)
repoReadCommit a
self Text
ref Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
ref' <- Text -> IO CString
textToCString Text
ref
Ptr (Ptr File)
outRoot <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gio.File.File))
Ptr CString
outCommit <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr (Ptr File)
-> Ptr CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_read_commit Ptr Repo
self' CString
ref' Ptr (Ptr File)
outRoot Ptr CString
outCommit Ptr Cancellable
maybeCancellable
Ptr File
outRoot' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr File)
outRoot
File
outRoot'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
outRoot'
CString
outCommit' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outCommit
Text
outCommit'' <- HasCallStack => CString -> IO Text
cstringToText CString
outCommit'
forall a. Ptr a -> IO ()
freeMem CString
outCommit'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
ref'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr File)
outRoot
forall a. Ptr a -> IO ()
freeMem Ptr CString
outCommit
forall (m :: * -> *) a. Monad m => a -> m a
return (File
outRoot'', Text
outCommit'')
) (do
forall a. Ptr a -> IO ()
freeMem CString
ref'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr File)
outRoot
forall a. Ptr a -> IO ()
freeMem Ptr CString
outCommit
)
#if defined(ENABLE_OVERLOADING)
data RepoReadCommitMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ((Gio.File.File, T.Text))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoReadCommitMethodInfo a signature where
overloadedMethod = repoReadCommit
instance O.OverloadedMethodInfo RepoReadCommitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoReadCommit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoReadCommit"
})
#endif
foreign import ccall "ostree_repo_read_commit_detached_metadata" ostree_repo_read_commit_detached_metadata ::
Ptr Repo ->
CString ->
Ptr (Ptr GVariant) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoReadCommitDetachedMetadata ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m ((Maybe GVariant))
repoReadCommitDetachedMetadata :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Maybe b -> m (Maybe GVariant)
repoReadCommitDetachedMetadata a
self Text
checksum Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr (Ptr GVariant)
outMetadata <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GVariant))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr (Ptr GVariant)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_read_commit_detached_metadata Ptr Repo
self' CString
checksum' Ptr (Ptr GVariant)
outMetadata Ptr Cancellable
maybeCancellable
Ptr GVariant
outMetadata' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr GVariant)
outMetadata
Maybe GVariant
maybeOutMetadata' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GVariant
outMetadata' forall a b. (a -> b) -> a -> b
$ \Ptr GVariant
outMetadata'' -> do
GVariant
outMetadata''' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
outMetadata''
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
outMetadata'''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outMetadata
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GVariant
maybeOutMetadata'
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
outMetadata
)
#if defined(ENABLE_OVERLOADING)
data RepoReadCommitDetachedMetadataMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ((Maybe GVariant))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoReadCommitDetachedMetadataMethodInfo a signature where
overloadedMethod = repoReadCommitDetachedMetadata
instance O.OverloadedMethodInfo RepoReadCommitDetachedMetadataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoReadCommitDetachedMetadata",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoReadCommitDetachedMetadata"
})
#endif
foreign import ccall "ostree_repo_regenerate_summary" ostree_repo_regenerate_summary ::
Ptr Repo ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoRegenerateSummary ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (GVariant)
-> Maybe (b)
-> m ()
repoRegenerateSummary :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe GVariant -> Maybe b -> m ()
repoRegenerateSummary a
self Maybe GVariant
additionalMetadata Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr GVariant
maybeAdditionalMetadata <- case Maybe GVariant
additionalMetadata of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jAdditionalMetadata -> do
Ptr GVariant
jAdditionalMetadata' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jAdditionalMetadata
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jAdditionalMetadata'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr GVariant -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_regenerate_summary Ptr Repo
self' Ptr GVariant
maybeAdditionalMetadata Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
additionalMetadata forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoRegenerateSummaryMethodInfo
instance (signature ~ (Maybe (GVariant) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoRegenerateSummaryMethodInfo a signature where
overloadedMethod = repoRegenerateSummary
instance O.OverloadedMethodInfo RepoRegenerateSummaryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRegenerateSummary",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRegenerateSummary"
})
#endif
foreign import ccall "ostree_repo_reload_config" ostree_repo_reload_config ::
Ptr Repo ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoReloadConfig ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
repoReloadConfig :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m ()
repoReloadConfig a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_reload_config Ptr Repo
self' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoReloadConfigMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoReloadConfigMethodInfo a signature where
overloadedMethod = repoReloadConfig
instance O.OverloadedMethodInfo RepoReloadConfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoReloadConfig",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoReloadConfig"
})
#endif
foreign import ccall "ostree_repo_remote_add" ostree_repo_remote_add ::
Ptr Repo ->
CString ->
CString ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteAdd ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (T.Text)
-> Maybe (GVariant)
-> Maybe (b)
-> m ()
repoRemoteAdd :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Maybe Text -> Maybe GVariant -> Maybe b -> m ()
repoRemoteAdd a
self Text
name Maybe Text
url Maybe GVariant
options Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
name' <- Text -> IO CString
textToCString Text
name
CString
maybeUrl <- case Maybe Text
url of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jUrl -> do
CString
jUrl' <- Text -> IO CString
textToCString Text
jUrl
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUrl'
Ptr GVariant
maybeOptions <- case Maybe GVariant
options of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jOptions -> do
Ptr GVariant
jOptions' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jOptions
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jOptions'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> Ptr GVariant
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_remote_add Ptr Repo
self' CString
name' CString
maybeUrl Ptr GVariant
maybeOptions Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
options forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem CString
maybeUrl
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem CString
maybeUrl
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteAddMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> Maybe (GVariant) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoRemoteAddMethodInfo a signature where
overloadedMethod = repoRemoteAdd
instance O.OverloadedMethodInfo RepoRemoteAddMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteAdd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteAdd"
})
#endif
foreign import ccall "ostree_repo_remote_change" ostree_repo_remote_change ::
Ptr Repo ->
Ptr Gio.File.File ->
CUInt ->
CString ->
CString ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteChange ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (b)
-> OSTree.Enums.RepoRemoteChange
-> T.Text
-> Maybe (T.Text)
-> Maybe (GVariant)
-> Maybe (c)
-> m ()
repoRemoteChange :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) =>
a
-> Maybe b
-> RepoRemoteChange
-> Text
-> Maybe Text
-> Maybe GVariant
-> Maybe c
-> m ()
repoRemoteChange a
self Maybe b
sysroot RepoRemoteChange
changeop Text
name Maybe Text
url Maybe GVariant
options Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
maybeSysroot <- case Maybe b
sysroot of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jSysroot -> do
Ptr File
jSysroot' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSysroot
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jSysroot'
let changeop' :: CUInt
changeop' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) RepoRemoteChange
changeop
CString
name' <- Text -> IO CString
textToCString Text
name
CString
maybeUrl <- case Maybe Text
url of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jUrl -> do
CString
jUrl' <- Text -> IO CString
textToCString Text
jUrl
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUrl'
Ptr GVariant
maybeOptions <- case Maybe GVariant
options of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jOptions -> do
Ptr GVariant
jOptions' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jOptions
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jOptions'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr File
-> CUInt
-> CString
-> CString
-> Ptr GVariant
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_remote_change Ptr Repo
self' Ptr File
maybeSysroot CUInt
changeop' CString
name' CString
maybeUrl Ptr GVariant
maybeOptions Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
sysroot forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
options forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem CString
maybeUrl
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem CString
maybeUrl
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteChangeMethodInfo
instance (signature ~ (Maybe (b) -> OSTree.Enums.RepoRemoteChange -> T.Text -> Maybe (T.Text) -> Maybe (GVariant) -> Maybe (c) -> m ()), MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoRemoteChangeMethodInfo a signature where
overloadedMethod = repoRemoteChange
instance O.OverloadedMethodInfo RepoRemoteChangeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteChange",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteChange"
})
#endif
foreign import ccall "ostree_repo_remote_delete" ostree_repo_remote_delete ::
Ptr Repo ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteDelete ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m ()
repoRemoteDelete :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Maybe b -> m ()
repoRemoteDelete a
self Text
name Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_remote_delete Ptr Repo
self' CString
name' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
name'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteDeleteMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoRemoteDeleteMethodInfo a signature where
overloadedMethod = repoRemoteDelete
instance O.OverloadedMethodInfo RepoRemoteDeleteMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteDelete",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteDelete"
})
#endif
foreign import ccall "ostree_repo_remote_fetch_summary" ostree_repo_remote_fetch_summary ::
Ptr Repo ->
CString ->
Ptr (Ptr GLib.Bytes.Bytes) ->
Ptr (Ptr GLib.Bytes.Bytes) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteFetchSummary ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m ((GLib.Bytes.Bytes, GLib.Bytes.Bytes))
repoRemoteFetchSummary :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Maybe b -> m (Bytes, Bytes)
repoRemoteFetchSummary a
self Text
name Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr (Ptr Bytes)
outSummary <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.Bytes.Bytes))
Ptr (Ptr Bytes)
outSignatures <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.Bytes.Bytes))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr (Ptr Bytes)
-> Ptr (Ptr Bytes)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_remote_fetch_summary Ptr Repo
self' CString
name' Ptr (Ptr Bytes)
outSummary Ptr (Ptr Bytes)
outSignatures Ptr Cancellable
maybeCancellable
Ptr Bytes
outSummary' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Bytes)
outSummary
Bytes
outSummary'' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
outSummary'
Ptr Bytes
outSignatures' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Bytes)
outSignatures
Bytes
outSignatures'' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
outSignatures'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSummary
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSignatures
forall (m :: * -> *) a. Monad m => a -> m a
return (Bytes
outSummary'', Bytes
outSignatures'')
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSummary
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSignatures
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteFetchSummaryMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ((GLib.Bytes.Bytes, GLib.Bytes.Bytes))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoRemoteFetchSummaryMethodInfo a signature where
overloadedMethod = repoRemoteFetchSummary
instance O.OverloadedMethodInfo RepoRemoteFetchSummaryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteFetchSummary",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteFetchSummary"
})
#endif
foreign import ccall "ostree_repo_remote_fetch_summary_with_options" ostree_repo_remote_fetch_summary_with_options ::
Ptr Repo ->
CString ->
Ptr GVariant ->
Ptr (Ptr GLib.Bytes.Bytes) ->
Ptr (Ptr GLib.Bytes.Bytes) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteFetchSummaryWithOptions ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (GVariant)
-> Maybe (b)
-> m ((GLib.Bytes.Bytes, GLib.Bytes.Bytes))
repoRemoteFetchSummaryWithOptions :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Maybe GVariant -> Maybe b -> m (Bytes, Bytes)
repoRemoteFetchSummaryWithOptions a
self Text
name Maybe GVariant
options Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr GVariant
maybeOptions <- case Maybe GVariant
options of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jOptions -> do
Ptr GVariant
jOptions' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jOptions
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jOptions'
Ptr (Ptr Bytes)
outSummary <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.Bytes.Bytes))
Ptr (Ptr Bytes)
outSignatures <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.Bytes.Bytes))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr GVariant
-> Ptr (Ptr Bytes)
-> Ptr (Ptr Bytes)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_remote_fetch_summary_with_options Ptr Repo
self' CString
name' Ptr GVariant
maybeOptions Ptr (Ptr Bytes)
outSummary Ptr (Ptr Bytes)
outSignatures Ptr Cancellable
maybeCancellable
Ptr Bytes
outSummary' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Bytes)
outSummary
Bytes
outSummary'' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
outSummary'
Ptr Bytes
outSignatures' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Bytes)
outSignatures
Bytes
outSignatures'' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
outSignatures'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
options forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSummary
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSignatures
forall (m :: * -> *) a. Monad m => a -> m a
return (Bytes
outSummary'', Bytes
outSignatures'')
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSummary
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Bytes)
outSignatures
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteFetchSummaryWithOptionsMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> Maybe (b) -> m ((GLib.Bytes.Bytes, GLib.Bytes.Bytes))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoRemoteFetchSummaryWithOptionsMethodInfo a signature where
overloadedMethod = repoRemoteFetchSummaryWithOptions
instance O.OverloadedMethodInfo RepoRemoteFetchSummaryWithOptionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteFetchSummaryWithOptions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteFetchSummaryWithOptions"
})
#endif
foreign import ccall "ostree_repo_remote_get_gpg_keys" ostree_repo_remote_get_gpg_keys ::
Ptr Repo ->
CString ->
Ptr CString ->
Ptr (Ptr (GPtrArray (Ptr GVariant))) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteGetGpgKeys ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (T.Text)
-> Maybe ([T.Text])
-> Maybe (b)
-> m ([GVariant])
repoRemoteGetGpgKeys :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe Text -> Maybe [Text] -> Maybe b -> m [GVariant]
repoRemoteGetGpgKeys a
self Maybe Text
name Maybe [Text]
keyIds Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeName <- case Maybe Text
name of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jName -> do
CString
jName' <- Text -> IO CString
textToCString Text
jName
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jName'
Ptr CString
maybeKeyIds <- case Maybe [Text]
keyIds of
Maybe [Text]
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just [Text]
jKeyIds -> do
Ptr CString
jKeyIds' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jKeyIds
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jKeyIds'
Ptr (Ptr (GPtrArray (Ptr GVariant)))
outKeys <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr (GPtrArray (Ptr GVariant))))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr CString
-> Ptr (Ptr (GPtrArray (Ptr GVariant)))
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_remote_get_gpg_keys Ptr Repo
self' CString
maybeName Ptr CString
maybeKeyIds Ptr (Ptr (GPtrArray (Ptr GVariant)))
outKeys Ptr Cancellable
maybeCancellable
Ptr (GPtrArray (Ptr GVariant))
outKeys' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr (GPtrArray (Ptr GVariant)))
outKeys
[Ptr GVariant]
outKeys'' <- forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr GVariant))
outKeys'
[GVariant]
outKeys''' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr [Ptr GVariant]
outKeys''
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr GVariant))
outKeys'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeName
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeKeyIds
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeKeyIds
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr (GPtrArray (Ptr GVariant)))
outKeys
forall (m :: * -> *) a. Monad m => a -> m a
return [GVariant]
outKeys'''
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeName
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeKeyIds
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeKeyIds
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr (GPtrArray (Ptr GVariant)))
outKeys
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteGetGpgKeysMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe ([T.Text]) -> Maybe (b) -> m ([GVariant])), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoRemoteGetGpgKeysMethodInfo a signature where
overloadedMethod = repoRemoteGetGpgKeys
instance O.OverloadedMethodInfo RepoRemoteGetGpgKeysMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteGetGpgKeys",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteGetGpgKeys"
})
#endif
foreign import ccall "ostree_repo_remote_get_gpg_verify" ostree_repo_remote_get_gpg_verify ::
Ptr Repo ->
CString ->
Ptr CInt ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteGetGpgVerify ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> m (Bool)
repoRemoteGetGpgVerify :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> m Bool
repoRemoteGetGpgVerify a
self Text
name = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr CInt
outGpgVerify <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CString -> Ptr CInt -> Ptr (Ptr GError) -> IO CInt
ostree_repo_remote_get_gpg_verify Ptr Repo
self' CString
name' Ptr CInt
outGpgVerify
CInt
outGpgVerify' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
outGpgVerify
let outGpgVerify'' :: Bool
outGpgVerify'' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
outGpgVerify'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outGpgVerify
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
outGpgVerify''
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outGpgVerify
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteGetGpgVerifyMethodInfo
instance (signature ~ (T.Text -> m (Bool)), MonadIO m, IsRepo a) => O.OverloadedMethod RepoRemoteGetGpgVerifyMethodInfo a signature where
overloadedMethod = repoRemoteGetGpgVerify
instance O.OverloadedMethodInfo RepoRemoteGetGpgVerifyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteGetGpgVerify",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteGetGpgVerify"
})
#endif
foreign import ccall "ostree_repo_remote_get_gpg_verify_summary" ostree_repo_remote_get_gpg_verify_summary ::
Ptr Repo ->
CString ->
Ptr CInt ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteGetGpgVerifySummary ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> m (Bool)
repoRemoteGetGpgVerifySummary :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> m Bool
repoRemoteGetGpgVerifySummary a
self Text
name = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr CInt
outGpgVerifySummary <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CString -> Ptr CInt -> Ptr (Ptr GError) -> IO CInt
ostree_repo_remote_get_gpg_verify_summary Ptr Repo
self' CString
name' Ptr CInt
outGpgVerifySummary
CInt
outGpgVerifySummary' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
outGpgVerifySummary
let outGpgVerifySummary'' :: Bool
outGpgVerifySummary'' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
outGpgVerifySummary'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outGpgVerifySummary
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
outGpgVerifySummary''
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outGpgVerifySummary
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteGetGpgVerifySummaryMethodInfo
instance (signature ~ (T.Text -> m (Bool)), MonadIO m, IsRepo a) => O.OverloadedMethod RepoRemoteGetGpgVerifySummaryMethodInfo a signature where
overloadedMethod = repoRemoteGetGpgVerifySummary
instance O.OverloadedMethodInfo RepoRemoteGetGpgVerifySummaryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteGetGpgVerifySummary",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteGetGpgVerifySummary"
})
#endif
foreign import ccall "ostree_repo_remote_get_url" ostree_repo_remote_get_url ::
Ptr Repo ->
CString ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteGetUrl ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> m (T.Text)
repoRemoteGetUrl :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> m Text
repoRemoteGetUrl a
self Text
name = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr CString
outUrl <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CString -> Ptr CString -> Ptr (Ptr GError) -> IO CInt
ostree_repo_remote_get_url Ptr Repo
self' CString
name' Ptr CString
outUrl
CString
outUrl' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outUrl
Text
outUrl'' <- HasCallStack => CString -> IO Text
cstringToText CString
outUrl'
forall a. Ptr a -> IO ()
freeMem CString
outUrl'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outUrl
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outUrl''
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outUrl
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteGetUrlMethodInfo
instance (signature ~ (T.Text -> m (T.Text)), MonadIO m, IsRepo a) => O.OverloadedMethod RepoRemoteGetUrlMethodInfo a signature where
overloadedMethod = repoRemoteGetUrl
instance O.OverloadedMethodInfo RepoRemoteGetUrlMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteGetUrl",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteGetUrl"
})
#endif
foreign import ccall "ostree_repo_remote_gpg_import" ostree_repo_remote_gpg_import ::
Ptr Repo ->
CString ->
Ptr Gio.InputStream.InputStream ->
Ptr CString ->
Ptr Word32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoRemoteGpgImport ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> Maybe (b)
-> Maybe ([T.Text])
-> Maybe (c)
-> m (Word32)
repoRemoteGpgImport :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsInputStream b,
IsCancellable c) =>
a -> Text -> Maybe b -> Maybe [Text] -> Maybe c -> m Word32
repoRemoteGpgImport a
self Text
name Maybe b
sourceStream Maybe [Text]
keyIds Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr InputStream
maybeSourceStream <- case Maybe b
sourceStream of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jSourceStream -> do
Ptr InputStream
jSourceStream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSourceStream
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr InputStream
jSourceStream'
Ptr CString
maybeKeyIds <- case Maybe [Text]
keyIds of
Maybe [Text]
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just [Text]
jKeyIds -> do
Ptr CString
jKeyIds' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jKeyIds
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jKeyIds'
Ptr Word32
outImported <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr InputStream
-> Ptr CString
-> Ptr Word32
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_remote_gpg_import Ptr Repo
self' CString
name' Ptr InputStream
maybeSourceStream Ptr CString
maybeKeyIds Ptr Word32
outImported Ptr Cancellable
maybeCancellable
Word32
outImported' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
outImported
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
sourceStream forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeKeyIds
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeKeyIds
forall a. Ptr a -> IO ()
freeMem Ptr Word32
outImported
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
outImported'
) (do
forall a. Ptr a -> IO ()
freeMem CString
name'
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeKeyIds
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeKeyIds
forall a. Ptr a -> IO ()
freeMem Ptr Word32
outImported
)
#if defined(ENABLE_OVERLOADING)
data RepoRemoteGpgImportMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Maybe ([T.Text]) -> Maybe (c) -> m (Word32)), MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoRemoteGpgImportMethodInfo a signature where
overloadedMethod = repoRemoteGpgImport
instance O.OverloadedMethodInfo RepoRemoteGpgImportMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteGpgImport",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteGpgImport"
})
#endif
foreign import ccall "ostree_repo_remote_list" ostree_repo_remote_list ::
Ptr Repo ->
Ptr Word32 ->
IO (Ptr CString)
repoRemoteList ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> m [T.Text]
repoRemoteList :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> m [Text]
repoRemoteList a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Word32
outNRemotes <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr CString
result <- Ptr Repo -> Ptr Word32 -> IO (Ptr CString)
ostree_repo_remote_list Ptr Repo
self' Ptr Word32
outNRemotes
Word32
outNRemotes' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
outNRemotes
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoRemoteList" Ptr CString
result
[Text]
result' <- (forall a.
(HasCallStack, Integral a) =>
a -> Ptr CString -> IO [Text]
unpackUTF8CArrayWithLength Word32
outNRemotes') Ptr CString
result
(forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Word32
outNRemotes') forall a. Ptr a -> IO ()
freeMem Ptr CString
result
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem Ptr Word32
outNRemotes
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data RepoRemoteListMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsRepo a) => O.OverloadedMethod RepoRemoteListMethodInfo a signature where
overloadedMethod = repoRemoteList
instance O.OverloadedMethodInfo RepoRemoteListMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoRemoteList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoRemoteList"
})
#endif
#if defined(ENABLE_OVERLOADING)
data RepoRemoteListCollectionRefsMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "remoteListCollectionRefs" Repo) => O.OverloadedMethod RepoRemoteListCollectionRefsMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "remoteListCollectionRefs" Repo) => O.OverloadedMethodInfo RepoRemoteListCollectionRefsMethodInfo o where
overloadedMethodInfo = undefined
#endif
#if defined(ENABLE_OVERLOADING)
data RepoRemoteListRefsMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "remoteListRefs" Repo) => O.OverloadedMethod RepoRemoteListRefsMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "remoteListRefs" Repo) => O.OverloadedMethodInfo RepoRemoteListRefsMethodInfo o where
overloadedMethodInfo = undefined
#endif
foreign import ccall "ostree_repo_resolve_collection_ref" ostree_repo_resolve_collection_ref ::
Ptr Repo ->
Ptr OSTree.CollectionRef.CollectionRef ->
CInt ->
CUInt ->
Ptr CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoResolveCollectionRef ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.CollectionRef.CollectionRef
-> Bool
-> [OSTree.Flags.RepoResolveRevExtFlags]
-> Maybe (b)
-> m ((Maybe T.Text))
repoResolveCollectionRef :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> CollectionRef
-> Bool
-> [RepoResolveRevExtFlags]
-> Maybe b
-> m (Maybe Text)
repoResolveCollectionRef a
self CollectionRef
ref Bool
allowNoent [RepoResolveRevExtFlags]
flags Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CollectionRef
ref' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectionRef
ref
let allowNoent' :: CInt
allowNoent' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
allowNoent
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoResolveRevExtFlags]
flags
Ptr CString
outRev <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr CollectionRef
-> CInt
-> CUInt
-> Ptr CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_resolve_collection_ref Ptr Repo
self' Ptr CollectionRef
ref' CInt
allowNoent' CUInt
flags' Ptr CString
outRev Ptr Cancellable
maybeCancellable
CString
outRev' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outRev
Maybe Text
maybeOutRev' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
outRev' forall a b. (a -> b) -> a -> b
$ \CString
outRev'' -> do
Text
outRev''' <- HasCallStack => CString -> IO Text
cstringToText CString
outRev''
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outRev'''
forall a. Ptr a -> IO ()
freeMem CString
outRev'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectionRef
ref
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr CString
outRev
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeOutRev'
) (do
forall a. Ptr a -> IO ()
freeMem Ptr CString
outRev
)
#if defined(ENABLE_OVERLOADING)
data RepoResolveCollectionRefMethodInfo
instance (signature ~ (OSTree.CollectionRef.CollectionRef -> Bool -> [OSTree.Flags.RepoResolveRevExtFlags] -> Maybe (b) -> m ((Maybe T.Text))), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoResolveCollectionRefMethodInfo a signature where
overloadedMethod = repoResolveCollectionRef
instance O.OverloadedMethodInfo RepoResolveCollectionRefMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoResolveCollectionRef",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoResolveCollectionRef"
})
#endif
foreign import ccall "ostree_repo_resolve_keyring_for_collection" ostree_repo_resolve_keyring_for_collection ::
Ptr Repo ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr OSTree.Remote.Remote)
repoResolveKeyringForCollection ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m OSTree.Remote.Remote
repoResolveKeyringForCollection :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Maybe b -> m Remote
repoResolveKeyringForCollection a
self Text
collectionId Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
collectionId' <- Text -> IO CString
textToCString Text
collectionId
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Remote
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr Remote)
ostree_repo_resolve_keyring_for_collection Ptr Repo
self' CString
collectionId' Ptr Cancellable
maybeCancellable
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoResolveKeyringForCollection" Ptr Remote
result
Remote
result' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Remote -> Remote
OSTree.Remote.Remote) Ptr Remote
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
collectionId'
forall (m :: * -> *) a. Monad m => a -> m a
return Remote
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
collectionId'
)
#if defined(ENABLE_OVERLOADING)
data RepoResolveKeyringForCollectionMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m OSTree.Remote.Remote), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoResolveKeyringForCollectionMethodInfo a signature where
overloadedMethod = repoResolveKeyringForCollection
instance O.OverloadedMethodInfo RepoResolveKeyringForCollectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoResolveKeyringForCollection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoResolveKeyringForCollection"
})
#endif
foreign import ccall "ostree_repo_resolve_rev" ostree_repo_resolve_rev ::
Ptr Repo ->
CString ->
CInt ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
repoResolveRev ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> Bool
-> m ((Maybe T.Text))
repoResolveRev :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Bool -> m (Maybe Text)
repoResolveRev a
self Text
refspec Bool
allowNoent = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
refspec' <- Text -> IO CString
textToCString Text
refspec
let allowNoent' :: CInt
allowNoent' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
allowNoent
Ptr CString
outRev <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString -> CInt -> Ptr CString -> Ptr (Ptr GError) -> IO CInt
ostree_repo_resolve_rev Ptr Repo
self' CString
refspec' CInt
allowNoent' Ptr CString
outRev
CString
outRev' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outRev
Maybe Text
maybeOutRev' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
outRev' forall a b. (a -> b) -> a -> b
$ \CString
outRev'' -> do
Text
outRev''' <- HasCallStack => CString -> IO Text
cstringToText CString
outRev''
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outRev'''
forall a. Ptr a -> IO ()
freeMem CString
outRev'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
refspec'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outRev
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeOutRev'
) (do
forall a. Ptr a -> IO ()
freeMem CString
refspec'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outRev
)
#if defined(ENABLE_OVERLOADING)
data RepoResolveRevMethodInfo
instance (signature ~ (T.Text -> Bool -> m ((Maybe T.Text))), MonadIO m, IsRepo a) => O.OverloadedMethod RepoResolveRevMethodInfo a signature where
overloadedMethod = repoResolveRev
instance O.OverloadedMethodInfo RepoResolveRevMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoResolveRev",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoResolveRev"
})
#endif
foreign import ccall "ostree_repo_resolve_rev_ext" ostree_repo_resolve_rev_ext ::
Ptr Repo ->
CString ->
CInt ->
CUInt ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
repoResolveRevExt ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> Bool
-> [OSTree.Flags.RepoResolveRevExtFlags]
-> m ((Maybe T.Text))
repoResolveRevExt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Bool -> [RepoResolveRevExtFlags] -> m (Maybe Text)
repoResolveRevExt a
self Text
refspec Bool
allowNoent [RepoResolveRevExtFlags]
flags = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
refspec' <- Text -> IO CString
textToCString Text
refspec
let allowNoent' :: CInt
allowNoent' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
allowNoent
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoResolveRevExtFlags]
flags
Ptr CString
outRev <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CInt
-> CUInt
-> Ptr CString
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_resolve_rev_ext Ptr Repo
self' CString
refspec' CInt
allowNoent' CUInt
flags' Ptr CString
outRev
CString
outRev' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outRev
Maybe Text
maybeOutRev' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
outRev' forall a b. (a -> b) -> a -> b
$ \CString
outRev'' -> do
Text
outRev''' <- HasCallStack => CString -> IO Text
cstringToText CString
outRev''
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outRev'''
forall a. Ptr a -> IO ()
freeMem CString
outRev'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
refspec'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outRev
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeOutRev'
) (do
forall a. Ptr a -> IO ()
freeMem CString
refspec'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outRev
)
#if defined(ENABLE_OVERLOADING)
data RepoResolveRevExtMethodInfo
instance (signature ~ (T.Text -> Bool -> [OSTree.Flags.RepoResolveRevExtFlags] -> m ((Maybe T.Text))), MonadIO m, IsRepo a) => O.OverloadedMethod RepoResolveRevExtMethodInfo a signature where
overloadedMethod = repoResolveRevExt
instance O.OverloadedMethodInfo RepoResolveRevExtMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoResolveRevExt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoResolveRevExt"
})
#endif
foreign import ccall "ostree_repo_scan_hardlinks" ostree_repo_scan_hardlinks ::
Ptr Repo ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoScanHardlinks ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
repoScanHardlinks :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe b -> m ()
repoScanHardlinks a
self Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_repo_scan_hardlinks Ptr Repo
self' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoScanHardlinksMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoScanHardlinksMethodInfo a signature where
overloadedMethod = repoScanHardlinks
instance O.OverloadedMethodInfo RepoScanHardlinksMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoScanHardlinks",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoScanHardlinks"
})
#endif
foreign import ccall "ostree_repo_set_alias_ref_immediate" ostree_repo_set_alias_ref_immediate ::
Ptr Repo ->
CString ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoSetAliasRefImmediate ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (T.Text)
-> T.Text
-> Maybe (T.Text)
-> Maybe (b)
-> m ()
repoSetAliasRefImmediate :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe Text -> Text -> Maybe Text -> Maybe b -> m ()
repoSetAliasRefImmediate a
self Maybe Text
remote Text
ref Maybe Text
target Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeRemote <- case Maybe Text
remote of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jRemote -> do
CString
jRemote' <- Text -> IO CString
textToCString Text
jRemote
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jRemote'
CString
ref' <- Text -> IO CString
textToCString Text
ref
CString
maybeTarget <- case Maybe Text
target of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jTarget -> do
CString
jTarget' <- Text -> IO CString
textToCString Text
jTarget
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jTarget'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_set_alias_ref_immediate Ptr Repo
self' CString
maybeRemote CString
ref' CString
maybeTarget Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeRemote
forall a. Ptr a -> IO ()
freeMem CString
ref'
forall a. Ptr a -> IO ()
freeMem CString
maybeTarget
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeRemote
forall a. Ptr a -> IO ()
freeMem CString
ref'
forall a. Ptr a -> IO ()
freeMem CString
maybeTarget
)
#if defined(ENABLE_OVERLOADING)
data RepoSetAliasRefImmediateMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> Maybe (T.Text) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoSetAliasRefImmediateMethodInfo a signature where
overloadedMethod = repoSetAliasRefImmediate
instance O.OverloadedMethodInfo RepoSetAliasRefImmediateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSetAliasRefImmediate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSetAliasRefImmediate"
})
#endif
foreign import ccall "ostree_repo_set_cache_dir" ostree_repo_set_cache_dir ::
Ptr Repo ->
Int32 ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoSetCacheDir ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Int32
-> T.Text
-> Maybe (b)
-> m ()
repoSetCacheDir :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Int32 -> Text -> Maybe b -> m ()
repoSetCacheDir a
self Int32
dfd Text
path Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
path' <- Text -> IO CString
textToCString Text
path
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Int32
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_set_cache_dir Ptr Repo
self' Int32
dfd CString
path' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
path'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
path'
)
#if defined(ENABLE_OVERLOADING)
data RepoSetCacheDirMethodInfo
instance (signature ~ (Int32 -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoSetCacheDirMethodInfo a signature where
overloadedMethod = repoSetCacheDir
instance O.OverloadedMethodInfo RepoSetCacheDirMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSetCacheDir",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSetCacheDir"
})
#endif
foreign import ccall "ostree_repo_set_collection_id" ostree_repo_set_collection_id ::
Ptr Repo ->
CString ->
Ptr (Ptr GError) ->
IO CInt
repoSetCollectionId ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> Maybe (T.Text)
-> m ()
repoSetCollectionId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Maybe Text -> m ()
repoSetCollectionId a
self Maybe Text
collectionId = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeCollectionId <- case Maybe Text
collectionId of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jCollectionId -> do
CString
jCollectionId' <- Text -> IO CString
textToCString Text
jCollectionId
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jCollectionId'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> CString -> Ptr (Ptr GError) -> IO CInt
ostree_repo_set_collection_id Ptr Repo
self' CString
maybeCollectionId
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
maybeCollectionId
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeCollectionId
)
#if defined(ENABLE_OVERLOADING)
data RepoSetCollectionIdMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoSetCollectionIdMethodInfo a signature where
overloadedMethod = repoSetCollectionId
instance O.OverloadedMethodInfo RepoSetCollectionIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSetCollectionId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSetCollectionId"
})
#endif
foreign import ccall "ostree_repo_set_collection_ref_immediate" ostree_repo_set_collection_ref_immediate ::
Ptr Repo ->
Ptr OSTree.CollectionRef.CollectionRef ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoSetCollectionRefImmediate ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.CollectionRef.CollectionRef
-> Maybe (T.Text)
-> Maybe (b)
-> m ()
repoSetCollectionRefImmediate :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> CollectionRef -> Maybe Text -> Maybe b -> m ()
repoSetCollectionRefImmediate a
self CollectionRef
ref Maybe Text
checksum Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CollectionRef
ref' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectionRef
ref
CString
maybeChecksum <- case Maybe Text
checksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jChecksum -> do
CString
jChecksum' <- Text -> IO CString
textToCString Text
jChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jChecksum'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr CollectionRef
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_set_collection_ref_immediate Ptr Repo
self' Ptr CollectionRef
ref' CString
maybeChecksum Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectionRef
ref
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeChecksum
)
#if defined(ENABLE_OVERLOADING)
data RepoSetCollectionRefImmediateMethodInfo
instance (signature ~ (OSTree.CollectionRef.CollectionRef -> Maybe (T.Text) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoSetCollectionRefImmediateMethodInfo a signature where
overloadedMethod = repoSetCollectionRefImmediate
instance O.OverloadedMethodInfo RepoSetCollectionRefImmediateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSetCollectionRefImmediate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSetCollectionRefImmediate"
})
#endif
foreign import ccall "ostree_repo_set_disable_fsync" ostree_repo_set_disable_fsync ::
Ptr Repo ->
CInt ->
IO ()
repoSetDisableFsync ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> Bool
-> m ()
repoSetDisableFsync :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Bool -> m ()
repoSetDisableFsync a
self Bool
disableFsync = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let disableFsync' :: CInt
disableFsync' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
disableFsync
Ptr Repo -> CInt -> IO ()
ostree_repo_set_disable_fsync Ptr Repo
self' CInt
disableFsync'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RepoSetDisableFsyncMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoSetDisableFsyncMethodInfo a signature where
overloadedMethod = repoSetDisableFsync
instance O.OverloadedMethodInfo RepoSetDisableFsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSetDisableFsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSetDisableFsync"
})
#endif
foreign import ccall "ostree_repo_set_ref_immediate" ostree_repo_set_ref_immediate ::
Ptr Repo ->
CString ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoSetRefImmediate ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (T.Text)
-> T.Text
-> Maybe (T.Text)
-> Maybe (b)
-> m ()
repoSetRefImmediate :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Maybe Text -> Text -> Maybe Text -> Maybe b -> m ()
repoSetRefImmediate a
self Maybe Text
remote Text
ref Maybe Text
checksum Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeRemote <- case Maybe Text
remote of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jRemote -> do
CString
jRemote' <- Text -> IO CString
textToCString Text
jRemote
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jRemote'
CString
ref' <- Text -> IO CString
textToCString Text
ref
CString
maybeChecksum <- case Maybe Text
checksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jChecksum -> do
CString
jChecksum' <- Text -> IO CString
textToCString Text
jChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jChecksum'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_set_ref_immediate Ptr Repo
self' CString
maybeRemote CString
ref' CString
maybeChecksum Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeRemote
forall a. Ptr a -> IO ()
freeMem CString
ref'
forall a. Ptr a -> IO ()
freeMem CString
maybeChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeRemote
forall a. Ptr a -> IO ()
freeMem CString
ref'
forall a. Ptr a -> IO ()
freeMem CString
maybeChecksum
)
#if defined(ENABLE_OVERLOADING)
data RepoSetRefImmediateMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> Maybe (T.Text) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoSetRefImmediateMethodInfo a signature where
overloadedMethod = repoSetRefImmediate
instance O.OverloadedMethodInfo RepoSetRefImmediateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSetRefImmediate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSetRefImmediate"
})
#endif
foreign import ccall "ostree_repo_sign_commit" ostree_repo_sign_commit ::
Ptr Repo ->
CString ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoSignCommit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> T.Text
-> Maybe (T.Text)
-> Maybe (b)
-> m ()
repoSignCommit :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Text -> Maybe Text -> Maybe b -> m ()
repoSignCommit a
self Text
commitChecksum Text
keyId Maybe Text
homedir Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
commitChecksum' <- Text -> IO CString
textToCString Text
commitChecksum
CString
keyId' <- Text -> IO CString
textToCString Text
keyId
CString
maybeHomedir <- case Maybe Text
homedir of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jHomedir -> do
CString
jHomedir' <- Text -> IO CString
textToCString Text
jHomedir
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jHomedir'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_sign_commit Ptr Repo
self' CString
commitChecksum' CString
keyId' CString
maybeHomedir Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
forall a. Ptr a -> IO ()
freeMem CString
keyId'
forall a. Ptr a -> IO ()
freeMem CString
maybeHomedir
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
forall a. Ptr a -> IO ()
freeMem CString
keyId'
forall a. Ptr a -> IO ()
freeMem CString
maybeHomedir
)
#if defined(ENABLE_OVERLOADING)
data RepoSignCommitMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoSignCommitMethodInfo a signature where
overloadedMethod = repoSignCommit
instance O.OverloadedMethodInfo RepoSignCommitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSignCommit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSignCommit"
})
#endif
foreign import ccall "ostree_repo_sign_delta" ostree_repo_sign_delta ::
Ptr Repo ->
CString ->
CString ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoSignDelta ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> Maybe (b)
-> m ()
repoSignDelta :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Text -> Text -> Text -> Maybe b -> m ()
repoSignDelta a
self Text
fromCommit Text
toCommit Text
keyId Text
homedir Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
fromCommit' <- Text -> IO CString
textToCString Text
fromCommit
CString
toCommit' <- Text -> IO CString
textToCString Text
toCommit
CString
keyId' <- Text -> IO CString
textToCString Text
keyId
CString
homedir' <- Text -> IO CString
textToCString Text
homedir
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> CString
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_sign_delta Ptr Repo
self' CString
fromCommit' CString
toCommit' CString
keyId' CString
homedir' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
fromCommit'
forall a. Ptr a -> IO ()
freeMem CString
toCommit'
forall a. Ptr a -> IO ()
freeMem CString
keyId'
forall a. Ptr a -> IO ()
freeMem CString
homedir'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
fromCommit'
forall a. Ptr a -> IO ()
freeMem CString
toCommit'
forall a. Ptr a -> IO ()
freeMem CString
keyId'
forall a. Ptr a -> IO ()
freeMem CString
homedir'
)
#if defined(ENABLE_OVERLOADING)
data RepoSignDeltaMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoSignDeltaMethodInfo a signature where
overloadedMethod = repoSignDelta
instance O.OverloadedMethodInfo RepoSignDeltaMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSignDelta",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSignDelta"
})
#endif
foreign import ccall "ostree_repo_signature_verify_commit_data" ostree_repo_signature_verify_commit_data ::
Ptr Repo ->
CString ->
Ptr GLib.Bytes.Bytes ->
Ptr GLib.Bytes.Bytes ->
CUInt ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
repoSignatureVerifyCommitData ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> GLib.Bytes.Bytes
-> GLib.Bytes.Bytes
-> [OSTree.Flags.RepoVerifyFlags]
-> m ((Maybe T.Text))
repoSignatureVerifyCommitData :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Bytes -> Bytes -> [RepoVerifyFlags] -> m (Maybe Text)
repoSignatureVerifyCommitData a
self Text
remoteName Bytes
commitData Bytes
commitMetadata [RepoVerifyFlags]
flags = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
remoteName' <- Text -> IO CString
textToCString Text
remoteName
Ptr Bytes
commitData' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
commitData
Ptr Bytes
commitMetadata' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
commitMetadata
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoVerifyFlags]
flags
Ptr CString
outResults <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr Bytes
-> Ptr Bytes
-> CUInt
-> Ptr CString
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_signature_verify_commit_data Ptr Repo
self' CString
remoteName' Ptr Bytes
commitData' Ptr Bytes
commitMetadata' CUInt
flags' Ptr CString
outResults
CString
outResults' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outResults
Maybe Text
maybeOutResults' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
outResults' forall a b. (a -> b) -> a -> b
$ \CString
outResults'' -> do
Text
outResults''' <- HasCallStack => CString -> IO Text
cstringToText CString
outResults''
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outResults'''
forall a. Ptr a -> IO ()
freeMem CString
outResults'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
commitData
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
commitMetadata
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outResults
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeOutResults'
) (do
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outResults
)
#if defined(ENABLE_OVERLOADING)
data RepoSignatureVerifyCommitDataMethodInfo
instance (signature ~ (T.Text -> GLib.Bytes.Bytes -> GLib.Bytes.Bytes -> [OSTree.Flags.RepoVerifyFlags] -> m ((Maybe T.Text))), MonadIO m, IsRepo a) => O.OverloadedMethod RepoSignatureVerifyCommitDataMethodInfo a signature where
overloadedMethod = repoSignatureVerifyCommitData
instance O.OverloadedMethodInfo RepoSignatureVerifyCommitDataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoSignatureVerifyCommitData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoSignatureVerifyCommitData"
})
#endif
foreign import ccall "ostree_repo_static_delta_execute_offline" ostree_repo_static_delta_execute_offline ::
Ptr Repo ->
Ptr Gio.File.File ->
CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoStaticDeltaExecuteOffline ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Bool
-> Maybe (c)
-> m ()
repoStaticDeltaExecuteOffline :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) =>
a -> b -> Bool -> Maybe c -> m ()
repoStaticDeltaExecuteOffline a
self b
dirOrFile Bool
skipValidation Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
dirOrFile' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dirOrFile
let skipValidation' :: CInt
skipValidation' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
skipValidation
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr File
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_static_delta_execute_offline Ptr Repo
self' Ptr File
dirOrFile' CInt
skipValidation' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dirOrFile
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoStaticDeltaExecuteOfflineMethodInfo
instance (signature ~ (b -> Bool -> Maybe (c) -> m ()), MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoStaticDeltaExecuteOfflineMethodInfo a signature where
overloadedMethod = repoStaticDeltaExecuteOffline
instance O.OverloadedMethodInfo RepoStaticDeltaExecuteOfflineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoStaticDeltaExecuteOffline",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoStaticDeltaExecuteOffline"
})
#endif
foreign import ccall "ostree_repo_static_delta_execute_offline_with_signature" ostree_repo_static_delta_execute_offline_with_signature ::
Ptr Repo ->
Ptr Gio.File.File ->
Ptr OSTree.Sign.Sign ->
CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoStaticDeltaExecuteOfflineWithSignature ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, OSTree.Sign.IsSign c, Gio.Cancellable.IsCancellable d) =>
a
-> b
-> c
-> Bool
-> Maybe (d)
-> m ()
repoStaticDeltaExecuteOfflineWithSignature :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsSign c,
IsCancellable d) =>
a -> b -> c -> Bool -> Maybe d -> m ()
repoStaticDeltaExecuteOfflineWithSignature a
self b
dirOrFile c
sign Bool
skipValidation Maybe d
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
dirOrFile' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dirOrFile
Ptr Sign
sign' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
sign
let skipValidation' :: CInt
skipValidation' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
skipValidation
Ptr Cancellable
maybeCancellable <- case Maybe d
cancellable of
Maybe d
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just d
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr File
-> Ptr Sign
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_static_delta_execute_offline_with_signature Ptr Repo
self' Ptr File
dirOrFile' Ptr Sign
sign' CInt
skipValidation' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dirOrFile
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
sign
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe d
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoStaticDeltaExecuteOfflineWithSignatureMethodInfo
instance (signature ~ (b -> c -> Bool -> Maybe (d) -> m ()), MonadIO m, IsRepo a, Gio.File.IsFile b, OSTree.Sign.IsSign c, Gio.Cancellable.IsCancellable d) => O.OverloadedMethod RepoStaticDeltaExecuteOfflineWithSignatureMethodInfo a signature where
overloadedMethod = repoStaticDeltaExecuteOfflineWithSignature
instance O.OverloadedMethodInfo RepoStaticDeltaExecuteOfflineWithSignatureMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoStaticDeltaExecuteOfflineWithSignature",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoStaticDeltaExecuteOfflineWithSignature"
})
#endif
foreign import ccall "ostree_repo_static_delta_generate" ostree_repo_static_delta_generate ::
Ptr Repo ->
CUInt ->
CString ->
CString ->
Ptr GVariant ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoStaticDeltaGenerate ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.StaticDeltaGenerateOpt
-> Maybe (T.Text)
-> T.Text
-> Maybe (GVariant)
-> Maybe (GVariant)
-> Maybe (b)
-> m ()
repoStaticDeltaGenerate :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> StaticDeltaGenerateOpt
-> Maybe Text
-> Text
-> Maybe GVariant
-> Maybe GVariant
-> Maybe b
-> m ()
repoStaticDeltaGenerate a
self StaticDeltaGenerateOpt
opt Maybe Text
from Text
to Maybe GVariant
metadata Maybe GVariant
params Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let opt' :: CUInt
opt' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) StaticDeltaGenerateOpt
opt
CString
maybeFrom <- case Maybe Text
from of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jFrom -> do
CString
jFrom' <- Text -> IO CString
textToCString Text
jFrom
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jFrom'
CString
to' <- Text -> IO CString
textToCString Text
to
Ptr GVariant
maybeMetadata <- case Maybe GVariant
metadata of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jMetadata -> do
Ptr GVariant
jMetadata' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jMetadata
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jMetadata'
Ptr GVariant
maybeParams <- case Maybe GVariant
params of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jParams -> do
Ptr GVariant
jParams' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParams
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jParams'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> CString
-> Ptr GVariant
-> Ptr GVariant
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_static_delta_generate Ptr Repo
self' CUInt
opt' CString
maybeFrom CString
to' Ptr GVariant
maybeMetadata Ptr GVariant
maybeParams Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
metadata forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
params forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeFrom
forall a. Ptr a -> IO ()
freeMem CString
to'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeFrom
forall a. Ptr a -> IO ()
freeMem CString
to'
)
#if defined(ENABLE_OVERLOADING)
data RepoStaticDeltaGenerateMethodInfo
instance (signature ~ (OSTree.Enums.StaticDeltaGenerateOpt -> Maybe (T.Text) -> T.Text -> Maybe (GVariant) -> Maybe (GVariant) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoStaticDeltaGenerateMethodInfo a signature where
overloadedMethod = repoStaticDeltaGenerate
instance O.OverloadedMethodInfo RepoStaticDeltaGenerateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoStaticDeltaGenerate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoStaticDeltaGenerate"
})
#endif
foreign import ccall "ostree_repo_static_delta_reindex" ostree_repo_static_delta_reindex ::
Ptr Repo ->
CUInt ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoStaticDeltaReindex ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.StaticDeltaIndexFlags
-> T.Text
-> Maybe (b)
-> m ()
repoStaticDeltaReindex :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> StaticDeltaIndexFlags -> Text -> Maybe b -> m ()
repoStaticDeltaReindex a
repo StaticDeltaIndexFlags
flags Text
optToCommit Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
repo' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repo
let flags' :: CUInt
flags' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) StaticDeltaIndexFlags
flags
CString
optToCommit' <- Text -> IO CString
textToCString Text
optToCommit
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_static_delta_reindex Ptr Repo
repo' CUInt
flags' CString
optToCommit' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repo
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
optToCommit'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
optToCommit'
)
#if defined(ENABLE_OVERLOADING)
data RepoStaticDeltaReindexMethodInfo
instance (signature ~ (OSTree.Enums.StaticDeltaIndexFlags -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoStaticDeltaReindexMethodInfo a signature where
overloadedMethod = repoStaticDeltaReindex
instance O.OverloadedMethodInfo RepoStaticDeltaReindexMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoStaticDeltaReindex",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoStaticDeltaReindex"
})
#endif
foreign import ccall "ostree_repo_static_delta_verify_signature" ostree_repo_static_delta_verify_signature ::
Ptr Repo ->
CString ->
Ptr OSTree.Sign.Sign ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
repoStaticDeltaVerifySignature ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.Sign.IsSign b) =>
a
-> T.Text
-> b
-> m ((Maybe T.Text))
repoStaticDeltaVerifySignature :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsSign b) =>
a -> Text -> b -> m (Maybe Text)
repoStaticDeltaVerifySignature a
self Text
deltaId b
sign = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
deltaId' <- Text -> IO CString
textToCString Text
deltaId
Ptr Sign
sign' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
sign
Ptr CString
outSuccessMessage <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr Sign
-> Ptr CString
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_static_delta_verify_signature Ptr Repo
self' CString
deltaId' Ptr Sign
sign' Ptr CString
outSuccessMessage
CString
outSuccessMessage' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outSuccessMessage
Maybe Text
maybeOutSuccessMessage' <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
outSuccessMessage' forall a b. (a -> b) -> a -> b
$ \CString
outSuccessMessage'' -> do
Text
outSuccessMessage''' <- HasCallStack => CString -> IO Text
cstringToText CString
outSuccessMessage''
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outSuccessMessage'''
forall a. Ptr a -> IO ()
freeMem CString
outSuccessMessage'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
sign
forall a. Ptr a -> IO ()
freeMem CString
deltaId'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outSuccessMessage
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeOutSuccessMessage'
) (do
forall a. Ptr a -> IO ()
freeMem CString
deltaId'
forall a. Ptr a -> IO ()
freeMem Ptr CString
outSuccessMessage
)
#if defined(ENABLE_OVERLOADING)
data RepoStaticDeltaVerifySignatureMethodInfo
instance (signature ~ (T.Text -> b -> m ((Maybe T.Text))), MonadIO m, IsRepo a, OSTree.Sign.IsSign b) => O.OverloadedMethod RepoStaticDeltaVerifySignatureMethodInfo a signature where
overloadedMethod = repoStaticDeltaVerifySignature
instance O.OverloadedMethodInfo RepoStaticDeltaVerifySignatureMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoStaticDeltaVerifySignature",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoStaticDeltaVerifySignature"
})
#endif
foreign import ccall "ostree_repo_transaction_set_collection_ref" ostree_repo_transaction_set_collection_ref ::
Ptr Repo ->
Ptr OSTree.CollectionRef.CollectionRef ->
CString ->
IO ()
repoTransactionSetCollectionRef ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> OSTree.CollectionRef.CollectionRef
-> Maybe (T.Text)
-> m ()
repoTransactionSetCollectionRef :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> CollectionRef -> Maybe Text -> m ()
repoTransactionSetCollectionRef a
self CollectionRef
ref Maybe Text
checksum = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CollectionRef
ref' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectionRef
ref
CString
maybeChecksum <- case Maybe Text
checksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jChecksum -> do
CString
jChecksum' <- Text -> IO CString
textToCString Text
jChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jChecksum'
Ptr Repo -> Ptr CollectionRef -> CString -> IO ()
ostree_repo_transaction_set_collection_ref Ptr Repo
self' Ptr CollectionRef
ref' CString
maybeChecksum
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectionRef
ref
forall a. Ptr a -> IO ()
freeMem CString
maybeChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RepoTransactionSetCollectionRefMethodInfo
instance (signature ~ (OSTree.CollectionRef.CollectionRef -> Maybe (T.Text) -> m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoTransactionSetCollectionRefMethodInfo a signature where
overloadedMethod = repoTransactionSetCollectionRef
instance O.OverloadedMethodInfo RepoTransactionSetCollectionRefMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoTransactionSetCollectionRef",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoTransactionSetCollectionRef"
})
#endif
foreign import ccall "ostree_repo_transaction_set_ref" ostree_repo_transaction_set_ref ::
Ptr Repo ->
CString ->
CString ->
CString ->
IO ()
repoTransactionSetRef ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> Maybe (T.Text)
-> T.Text
-> Maybe (T.Text)
-> m ()
repoTransactionSetRef :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Maybe Text -> Text -> Maybe Text -> m ()
repoTransactionSetRef a
self Maybe Text
remote Text
ref Maybe Text
checksum = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeRemote <- case Maybe Text
remote of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jRemote -> do
CString
jRemote' <- Text -> IO CString
textToCString Text
jRemote
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jRemote'
CString
ref' <- Text -> IO CString
textToCString Text
ref
CString
maybeChecksum <- case Maybe Text
checksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jChecksum -> do
CString
jChecksum' <- Text -> IO CString
textToCString Text
jChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jChecksum'
Ptr Repo -> CString -> CString -> CString -> IO ()
ostree_repo_transaction_set_ref Ptr Repo
self' CString
maybeRemote CString
ref' CString
maybeChecksum
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
maybeRemote
forall a. Ptr a -> IO ()
freeMem CString
ref'
forall a. Ptr a -> IO ()
freeMem CString
maybeChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RepoTransactionSetRefMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> Maybe (T.Text) -> m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoTransactionSetRefMethodInfo a signature where
overloadedMethod = repoTransactionSetRef
instance O.OverloadedMethodInfo RepoTransactionSetRefMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoTransactionSetRef",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoTransactionSetRef"
})
#endif
foreign import ccall "ostree_repo_transaction_set_refspec" ostree_repo_transaction_set_refspec ::
Ptr Repo ->
CString ->
CString ->
IO ()
repoTransactionSetRefspec ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> T.Text
-> Maybe (T.Text)
-> m ()
repoTransactionSetRefspec :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> Text -> Maybe Text -> m ()
repoTransactionSetRefspec a
self Text
refspec Maybe Text
checksum = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
refspec' <- Text -> IO CString
textToCString Text
refspec
CString
maybeChecksum <- case Maybe Text
checksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jChecksum -> do
CString
jChecksum' <- Text -> IO CString
textToCString Text
jChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jChecksum'
Ptr Repo -> CString -> CString -> IO ()
ostree_repo_transaction_set_refspec Ptr Repo
self' CString
refspec' CString
maybeChecksum
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
refspec'
forall a. Ptr a -> IO ()
freeMem CString
maybeChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RepoTransactionSetRefspecMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoTransactionSetRefspecMethodInfo a signature where
overloadedMethod = repoTransactionSetRefspec
instance O.OverloadedMethodInfo RepoTransactionSetRefspecMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoTransactionSetRefspec",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoTransactionSetRefspec"
})
#endif
#if defined(ENABLE_OVERLOADING)
data RepoTraverseCommitMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "traverseCommit" Repo) => O.OverloadedMethod RepoTraverseCommitMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "traverseCommit" Repo) => O.OverloadedMethodInfo RepoTraverseCommitMethodInfo o where
overloadedMethodInfo = undefined
#endif
#if defined(ENABLE_OVERLOADING)
data RepoTraverseReachableRefsMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "traverseReachableRefs" Repo) => O.OverloadedMethod RepoTraverseReachableRefsMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "traverseReachableRefs" Repo) => O.OverloadedMethodInfo RepoTraverseReachableRefsMethodInfo o where
overloadedMethodInfo = undefined
#endif
foreign import ccall "ostree_repo_verify_commit" ostree_repo_verify_commit ::
Ptr Repo ->
CString ->
Ptr Gio.File.File ->
Ptr Gio.File.File ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoVerifyCommit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.File.IsFile c, Gio.Cancellable.IsCancellable d) =>
a
-> T.Text
-> Maybe (b)
-> Maybe (c)
-> Maybe (d)
-> m ()
repoVerifyCommit :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c,
IsCancellable d) =>
a -> Text -> Maybe b -> Maybe c -> Maybe d -> m ()
repoVerifyCommit a
self Text
commitChecksum Maybe b
keyringdir Maybe c
extraKeyring Maybe d
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
commitChecksum' <- Text -> IO CString
textToCString Text
commitChecksum
Ptr File
maybeKeyringdir <- case Maybe b
keyringdir of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jKeyringdir -> do
Ptr File
jKeyringdir' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jKeyringdir
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jKeyringdir'
Ptr File
maybeExtraKeyring <- case Maybe c
extraKeyring of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jExtraKeyring -> do
Ptr File
jExtraKeyring' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jExtraKeyring
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jExtraKeyring'
Ptr Cancellable
maybeCancellable <- case Maybe d
cancellable of
Maybe d
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just d
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr File
-> Ptr File
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_verify_commit Ptr Repo
self' CString
commitChecksum' Ptr File
maybeKeyringdir Ptr File
maybeExtraKeyring Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
keyringdir forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
extraKeyring forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe d
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoVerifyCommitMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Maybe (c) -> Maybe (d) -> m ()), MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.File.IsFile c, Gio.Cancellable.IsCancellable d) => O.OverloadedMethod RepoVerifyCommitMethodInfo a signature where
overloadedMethod = repoVerifyCommit
instance O.OverloadedMethodInfo RepoVerifyCommitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoVerifyCommit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoVerifyCommit"
})
#endif
foreign import ccall "ostree_repo_verify_commit_ext" ostree_repo_verify_commit_ext ::
Ptr Repo ->
CString ->
Ptr Gio.File.File ->
Ptr Gio.File.File ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr OSTree.GpgVerifyResult.GpgVerifyResult)
repoVerifyCommitExt ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, Gio.File.IsFile c, Gio.Cancellable.IsCancellable d) =>
a
-> T.Text
-> Maybe (b)
-> Maybe (c)
-> Maybe (d)
-> m OSTree.GpgVerifyResult.GpgVerifyResult
repoVerifyCommitExt :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c,
IsCancellable d) =>
a -> Text -> Maybe b -> Maybe c -> Maybe d -> m GpgVerifyResult
repoVerifyCommitExt a
self Text
commitChecksum Maybe b
keyringdir Maybe c
extraKeyring Maybe d
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
commitChecksum' <- Text -> IO CString
textToCString Text
commitChecksum
Ptr File
maybeKeyringdir <- case Maybe b
keyringdir of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jKeyringdir -> do
Ptr File
jKeyringdir' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jKeyringdir
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jKeyringdir'
Ptr File
maybeExtraKeyring <- case Maybe c
extraKeyring of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jExtraKeyring -> do
Ptr File
jExtraKeyring' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jExtraKeyring
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jExtraKeyring'
Ptr Cancellable
maybeCancellable <- case Maybe d
cancellable of
Maybe d
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just d
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Ptr GpgVerifyResult
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr File
-> Ptr File
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr GpgVerifyResult)
ostree_repo_verify_commit_ext Ptr Repo
self' CString
commitChecksum' Ptr File
maybeKeyringdir Ptr File
maybeExtraKeyring Ptr Cancellable
maybeCancellable
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoVerifyCommitExt" Ptr GpgVerifyResult
result
GpgVerifyResult
result' <- (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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
keyringdir forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
extraKeyring forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe d
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
forall (m :: * -> *) a. Monad m => a -> m a
return GpgVerifyResult
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoVerifyCommitExtMethodInfo
instance (signature ~ (T.Text -> 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.OverloadedMethod RepoVerifyCommitExtMethodInfo a signature where
overloadedMethod = repoVerifyCommitExt
instance O.OverloadedMethodInfo RepoVerifyCommitExtMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoVerifyCommitExt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoVerifyCommitExt"
})
#endif
foreign import ccall "ostree_repo_verify_commit_for_remote" ostree_repo_verify_commit_for_remote ::
Ptr Repo ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr OSTree.GpgVerifyResult.GpgVerifyResult)
repoVerifyCommitForRemote ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> T.Text
-> Maybe (b)
-> m OSTree.GpgVerifyResult.GpgVerifyResult
repoVerifyCommitForRemote :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Text -> Maybe b -> m GpgVerifyResult
repoVerifyCommitForRemote a
self Text
commitChecksum Text
remoteName Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
commitChecksum' <- Text -> IO CString
textToCString Text
commitChecksum
CString
remoteName' <- Text -> IO CString
textToCString Text
remoteName
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Ptr GpgVerifyResult
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr GpgVerifyResult)
ostree_repo_verify_commit_for_remote Ptr Repo
self' CString
commitChecksum' CString
remoteName' Ptr Cancellable
maybeCancellable
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoVerifyCommitForRemote" Ptr GpgVerifyResult
result
GpgVerifyResult
result' <- (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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall (m :: * -> *) a. Monad m => a -> m a
return GpgVerifyResult
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
commitChecksum'
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
)
#if defined(ENABLE_OVERLOADING)
data RepoVerifyCommitForRemoteMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (b) -> m OSTree.GpgVerifyResult.GpgVerifyResult), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoVerifyCommitForRemoteMethodInfo a signature where
overloadedMethod = repoVerifyCommitForRemote
instance O.OverloadedMethodInfo RepoVerifyCommitForRemoteMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoVerifyCommitForRemote",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoVerifyCommitForRemote"
})
#endif
foreign import ccall "ostree_repo_verify_summary" ostree_repo_verify_summary ::
Ptr Repo ->
CString ->
Ptr GLib.Bytes.Bytes ->
Ptr GLib.Bytes.Bytes ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr OSTree.GpgVerifyResult.GpgVerifyResult)
repoVerifySummary ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> GLib.Bytes.Bytes
-> GLib.Bytes.Bytes
-> Maybe (b)
-> m OSTree.GpgVerifyResult.GpgVerifyResult
repoVerifySummary :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Bytes -> Bytes -> Maybe b -> m GpgVerifyResult
repoVerifySummary a
self Text
remoteName Bytes
summary Bytes
signatures Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
remoteName' <- Text -> IO CString
textToCString Text
remoteName
Ptr Bytes
summary' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
summary
Ptr Bytes
signatures' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
signatures
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Ptr GpgVerifyResult
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr Bytes
-> Ptr Bytes
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr GpgVerifyResult)
ostree_repo_verify_summary Ptr Repo
self' CString
remoteName' Ptr Bytes
summary' Ptr Bytes
signatures' Ptr Cancellable
maybeCancellable
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoVerifySummary" Ptr GpgVerifyResult
result
GpgVerifyResult
result' <- (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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
summary
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
signatures
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
forall (m :: * -> *) a. Monad m => a -> m a
return GpgVerifyResult
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
remoteName'
)
#if defined(ENABLE_OVERLOADING)
data RepoVerifySummaryMethodInfo
instance (signature ~ (T.Text -> GLib.Bytes.Bytes -> GLib.Bytes.Bytes -> Maybe (b) -> m OSTree.GpgVerifyResult.GpgVerifyResult), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoVerifySummaryMethodInfo a signature where
overloadedMethod = repoVerifySummary
instance O.OverloadedMethodInfo RepoVerifySummaryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoVerifySummary",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoVerifySummary"
})
#endif
foreign import ccall "ostree_repo_write_archive_to_mtree" ostree_repo_write_archive_to_mtree ::
Ptr Repo ->
Ptr Gio.File.File ->
Ptr OSTree.MutableTree.MutableTree ->
Ptr OSTree.RepoCommitModifier.RepoCommitModifier ->
CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteArchiveToMtree ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, OSTree.MutableTree.IsMutableTree c, Gio.Cancellable.IsCancellable d) =>
a
-> b
-> c
-> Maybe (OSTree.RepoCommitModifier.RepoCommitModifier)
-> Bool
-> Maybe (d)
-> m ()
repoWriteArchiveToMtree :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c,
IsCancellable d) =>
a -> b -> c -> Maybe RepoCommitModifier -> Bool -> Maybe d -> m ()
repoWriteArchiveToMtree a
self b
archive c
mtree Maybe RepoCommitModifier
modifier Bool
autocreateParents Maybe d
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
archive' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
archive
Ptr MutableTree
mtree' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
mtree
Ptr RepoCommitModifier
maybeModifier <- case Maybe RepoCommitModifier
modifier of
Maybe RepoCommitModifier
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just RepoCommitModifier
jModifier -> do
Ptr RepoCommitModifier
jModifier' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
jModifier
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RepoCommitModifier
jModifier'
let autocreateParents' :: CInt
autocreateParents' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
autocreateParents
Ptr Cancellable
maybeCancellable <- case Maybe d
cancellable of
Maybe d
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just d
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr File
-> Ptr MutableTree
-> Ptr RepoCommitModifier
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_archive_to_mtree Ptr Repo
self' Ptr File
archive' Ptr MutableTree
mtree' Ptr RepoCommitModifier
maybeModifier CInt
autocreateParents' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
archive
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
mtree
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RepoCommitModifier
modifier forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe d
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteArchiveToMtreeMethodInfo
instance (signature ~ (b -> c -> Maybe (OSTree.RepoCommitModifier.RepoCommitModifier) -> Bool -> Maybe (d) -> m ()), MonadIO m, IsRepo a, Gio.File.IsFile b, OSTree.MutableTree.IsMutableTree c, Gio.Cancellable.IsCancellable d) => O.OverloadedMethod RepoWriteArchiveToMtreeMethodInfo a signature where
overloadedMethod = repoWriteArchiveToMtree
instance O.OverloadedMethodInfo RepoWriteArchiveToMtreeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteArchiveToMtree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteArchiveToMtree"
})
#endif
foreign import ccall "ostree_repo_write_archive_to_mtree_from_fd" ostree_repo_write_archive_to_mtree_from_fd ::
Ptr Repo ->
Int32 ->
Ptr OSTree.MutableTree.MutableTree ->
Ptr OSTree.RepoCommitModifier.RepoCommitModifier ->
CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteArchiveToMtreeFromFd ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.MutableTree.IsMutableTree b, Gio.Cancellable.IsCancellable c) =>
a
-> Int32
-> b
-> Maybe (OSTree.RepoCommitModifier.RepoCommitModifier)
-> Bool
-> Maybe (c)
-> m ()
repoWriteArchiveToMtreeFromFd :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsMutableTree b,
IsCancellable c) =>
a
-> Int32
-> b
-> Maybe RepoCommitModifier
-> Bool
-> Maybe c
-> m ()
repoWriteArchiveToMtreeFromFd a
self Int32
fd b
mtree Maybe RepoCommitModifier
modifier Bool
autocreateParents Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr MutableTree
mtree' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
mtree
Ptr RepoCommitModifier
maybeModifier <- case Maybe RepoCommitModifier
modifier of
Maybe RepoCommitModifier
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just RepoCommitModifier
jModifier -> do
Ptr RepoCommitModifier
jModifier' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
jModifier
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RepoCommitModifier
jModifier'
let autocreateParents' :: CInt
autocreateParents' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
autocreateParents
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Int32
-> Ptr MutableTree
-> Ptr RepoCommitModifier
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_archive_to_mtree_from_fd Ptr Repo
self' Int32
fd Ptr MutableTree
mtree' Ptr RepoCommitModifier
maybeModifier CInt
autocreateParents' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
mtree
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RepoCommitModifier
modifier forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteArchiveToMtreeFromFdMethodInfo
instance (signature ~ (Int32 -> b -> Maybe (OSTree.RepoCommitModifier.RepoCommitModifier) -> Bool -> Maybe (c) -> m ()), MonadIO m, IsRepo a, OSTree.MutableTree.IsMutableTree b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteArchiveToMtreeFromFdMethodInfo a signature where
overloadedMethod = repoWriteArchiveToMtreeFromFd
instance O.OverloadedMethodInfo RepoWriteArchiveToMtreeFromFdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteArchiveToMtreeFromFd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteArchiveToMtreeFromFd"
})
#endif
foreign import ccall "ostree_repo_write_commit" ostree_repo_write_commit ::
Ptr Repo ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr OSTree.RepoFile.RepoFile ->
Ptr CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteCommit ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.RepoFile.IsRepoFile b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (GVariant)
-> b
-> Maybe (c)
-> m (T.Text)
repoWriteCommit :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsRepoFile b,
IsCancellable c) =>
a
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe GVariant
-> b
-> Maybe c
-> m Text
repoWriteCommit a
self Maybe Text
parent Maybe Text
subject Maybe Text
body Maybe GVariant
metadata b
root Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeParent <- case Maybe Text
parent of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jParent -> do
CString
jParent' <- Text -> IO CString
textToCString Text
jParent
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jParent'
CString
maybeSubject <- case Maybe Text
subject of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jSubject -> do
CString
jSubject' <- Text -> IO CString
textToCString Text
jSubject
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jSubject'
CString
maybeBody <- case Maybe Text
body of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jBody -> do
CString
jBody' <- Text -> IO CString
textToCString Text
jBody
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jBody'
Ptr GVariant
maybeMetadata <- case Maybe GVariant
metadata of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jMetadata -> do
Ptr GVariant
jMetadata' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jMetadata
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jMetadata'
Ptr RepoFile
root' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
root
Ptr CString
outCommit <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> CString
-> Ptr GVariant
-> Ptr RepoFile
-> Ptr CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_commit Ptr Repo
self' CString
maybeParent CString
maybeSubject CString
maybeBody Ptr GVariant
maybeMetadata Ptr RepoFile
root' Ptr CString
outCommit Ptr Cancellable
maybeCancellable
CString
outCommit' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outCommit
Text
outCommit'' <- HasCallStack => CString -> IO Text
cstringToText CString
outCommit'
forall a. Ptr a -> IO ()
freeMem CString
outCommit'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
metadata forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
root
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeParent
forall a. Ptr a -> IO ()
freeMem CString
maybeSubject
forall a. Ptr a -> IO ()
freeMem CString
maybeBody
forall a. Ptr a -> IO ()
freeMem Ptr CString
outCommit
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outCommit''
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeParent
forall a. Ptr a -> IO ()
freeMem CString
maybeSubject
forall a. Ptr a -> IO ()
freeMem CString
maybeBody
forall a. Ptr a -> IO ()
freeMem Ptr CString
outCommit
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteCommitMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> Maybe (T.Text) -> Maybe (GVariant) -> b -> Maybe (c) -> m (T.Text)), MonadIO m, IsRepo a, OSTree.RepoFile.IsRepoFile b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteCommitMethodInfo a signature where
overloadedMethod = repoWriteCommit
instance O.OverloadedMethodInfo RepoWriteCommitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteCommit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteCommit"
})
#endif
foreign import ccall "ostree_repo_write_commit_detached_metadata" ostree_repo_write_commit_detached_metadata ::
Ptr Repo ->
CString ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteCommitDetachedMetadata ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (GVariant)
-> Maybe (b)
-> m ()
repoWriteCommitDetachedMetadata :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> Text -> Maybe GVariant -> Maybe b -> m ()
repoWriteCommitDetachedMetadata a
self Text
checksum Maybe GVariant
metadata Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr GVariant
maybeMetadata <- case Maybe GVariant
metadata of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jMetadata -> do
Ptr GVariant
jMetadata' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jMetadata
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jMetadata'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr GVariant
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_commit_detached_metadata Ptr Repo
self' CString
checksum' Ptr GVariant
maybeMetadata Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
metadata forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteCommitDetachedMetadataMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoWriteCommitDetachedMetadataMethodInfo a signature where
overloadedMethod = repoWriteCommitDetachedMetadata
instance O.OverloadedMethodInfo RepoWriteCommitDetachedMetadataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteCommitDetachedMetadata",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteCommitDetachedMetadata"
})
#endif
foreign import ccall "ostree_repo_write_commit_with_time" ostree_repo_write_commit_with_time ::
Ptr Repo ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr OSTree.RepoFile.RepoFile ->
Word64 ->
Ptr CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteCommitWithTime ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.RepoFile.IsRepoFile b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (GVariant)
-> b
-> Word64
-> Maybe (c)
-> m (T.Text)
repoWriteCommitWithTime :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsRepoFile b,
IsCancellable c) =>
a
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe GVariant
-> b
-> Word64
-> Maybe c
-> m Text
repoWriteCommitWithTime a
self Maybe Text
parent Maybe Text
subject Maybe Text
body Maybe GVariant
metadata b
root Word64
time Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeParent <- case Maybe Text
parent of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jParent -> do
CString
jParent' <- Text -> IO CString
textToCString Text
jParent
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jParent'
CString
maybeSubject <- case Maybe Text
subject of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jSubject -> do
CString
jSubject' <- Text -> IO CString
textToCString Text
jSubject
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jSubject'
CString
maybeBody <- case Maybe Text
body of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jBody -> do
CString
jBody' <- Text -> IO CString
textToCString Text
jBody
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jBody'
Ptr GVariant
maybeMetadata <- case Maybe GVariant
metadata of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jMetadata -> do
Ptr GVariant
jMetadata' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jMetadata
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jMetadata'
Ptr RepoFile
root' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
root
Ptr CString
outCommit <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> CString
-> CString
-> Ptr GVariant
-> Ptr RepoFile
-> Word64
-> Ptr CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_commit_with_time Ptr Repo
self' CString
maybeParent CString
maybeSubject CString
maybeBody Ptr GVariant
maybeMetadata Ptr RepoFile
root' Word64
time Ptr CString
outCommit Ptr Cancellable
maybeCancellable
CString
outCommit' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CString
outCommit
Text
outCommit'' <- HasCallStack => CString -> IO Text
cstringToText CString
outCommit'
forall a. Ptr a -> IO ()
freeMem CString
outCommit'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
metadata forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
root
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeParent
forall a. Ptr a -> IO ()
freeMem CString
maybeSubject
forall a. Ptr a -> IO ()
freeMem CString
maybeBody
forall a. Ptr a -> IO ()
freeMem Ptr CString
outCommit
forall (m :: * -> *) a. Monad m => a -> m a
return Text
outCommit''
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeParent
forall a. Ptr a -> IO ()
freeMem CString
maybeSubject
forall a. Ptr a -> IO ()
freeMem CString
maybeBody
forall a. Ptr a -> IO ()
freeMem Ptr CString
outCommit
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteCommitWithTimeMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> Maybe (T.Text) -> Maybe (GVariant) -> b -> Word64 -> Maybe (c) -> m (T.Text)), MonadIO m, IsRepo a, OSTree.RepoFile.IsRepoFile b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteCommitWithTimeMethodInfo a signature where
overloadedMethod = repoWriteCommitWithTime
instance O.OverloadedMethodInfo RepoWriteCommitWithTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteCommitWithTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteCommitWithTime"
})
#endif
foreign import ccall "ostree_repo_write_config" ostree_repo_write_config ::
Ptr Repo ->
Ptr GLib.KeyFile.KeyFile ->
Ptr (Ptr GError) ->
IO CInt
repoWriteConfig ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> GLib.KeyFile.KeyFile
-> m ()
repoWriteConfig :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a -> KeyFile -> m ()
repoWriteConfig a
self KeyFile
newConfig = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr KeyFile
newConfig' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
newConfig
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo -> Ptr KeyFile -> Ptr (Ptr GError) -> IO CInt
ostree_repo_write_config Ptr Repo
self' Ptr KeyFile
newConfig'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
newConfig
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteConfigMethodInfo
instance (signature ~ (GLib.KeyFile.KeyFile -> m ()), MonadIO m, IsRepo a) => O.OverloadedMethod RepoWriteConfigMethodInfo a signature where
overloadedMethod = repoWriteConfig
instance O.OverloadedMethodInfo RepoWriteConfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteConfig",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteConfig"
})
#endif
foreign import ccall "ostree_repo_write_content" ostree_repo_write_content ::
Ptr Repo ->
CString ->
Ptr Gio.InputStream.InputStream ->
Word64 ->
Ptr (Ptr Word8) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteContent ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> b
-> Word64
-> Maybe (c)
-> m (ByteString)
repoWriteContent :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsInputStream b,
IsCancellable c) =>
a -> Maybe Text -> b -> Word64 -> Maybe c -> m ByteString
repoWriteContent a
self Maybe Text
expectedChecksum b
objectInput Word64
length_ Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeExpectedChecksum <- case Maybe Text
expectedChecksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jExpectedChecksum -> do
CString
jExpectedChecksum' <- Text -> IO CString
textToCString Text
jExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jExpectedChecksum'
Ptr InputStream
objectInput' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
objectInput
Ptr (Ptr Word8)
outCsum <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word8))
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr InputStream
-> Word64
-> Ptr (Ptr Word8)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_content Ptr Repo
self' CString
maybeExpectedChecksum Ptr InputStream
objectInput' Word64
length_ Ptr (Ptr Word8)
outCsum Ptr Cancellable
maybeCancellable
Ptr Word8
outCsum' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word8)
outCsum
ByteString
outCsum'' <- (forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Integer
32) Ptr Word8
outCsum'
forall a. Ptr a -> IO ()
freeMem Ptr Word8
outCsum'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
objectInput
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word8)
outCsum
forall (m :: * -> *) a. Monad m => a -> m a
return ByteString
outCsum''
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word8)
outCsum
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteContentMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> Word64 -> Maybe (c) -> m (ByteString)), MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteContentMethodInfo a signature where
overloadedMethod = repoWriteContent
instance O.OverloadedMethodInfo RepoWriteContentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteContent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteContent"
})
#endif
foreign import ccall "ostree_repo_write_content_async" ostree_repo_write_content_async ::
Ptr Repo ->
CString ->
Ptr Gio.InputStream.InputStream ->
Word64 ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
repoWriteContentAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> b
-> Word64
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
repoWriteContentAsync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsInputStream b,
IsCancellable c) =>
a
-> Maybe Text
-> b
-> Word64
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
repoWriteContentAsync a
self Maybe Text
expectedChecksum b
object Word64
length_ Maybe c
cancellable Maybe AsyncReadyCallback
callback = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeExpectedChecksum <- case Maybe Text
expectedChecksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jExpectedChecksum -> do
CString
jExpectedChecksum' <- Text -> IO CString
textToCString Text
jExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jExpectedChecksum'
Ptr InputStream
object' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return (forall a b. Ptr a -> FunPtr b
castPtrToFunPtr forall a. Ptr a
nullPtr)
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- 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 (forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = forall a. Ptr a
nullPtr
Ptr Repo
-> CString
-> Ptr InputStream
-> Word64
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
ostree_repo_write_content_async Ptr Repo
self' CString
maybeExpectedChecksum Ptr InputStream
object' Word64
length_ Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback forall a. Ptr a
userData
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RepoWriteContentAsyncMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> Word64 -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteContentAsyncMethodInfo a signature where
overloadedMethod = repoWriteContentAsync
instance O.OverloadedMethodInfo RepoWriteContentAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteContentAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteContentAsync"
})
#endif
foreign import ccall "ostree_repo_write_content_finish" ostree_repo_write_content_finish ::
Ptr Repo ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr Word8 ->
Ptr (Ptr GError) ->
IO CInt
repoWriteContentFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m (Word8)
repoWriteContentFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) =>
a -> b -> m Word8
repoWriteContentFinish a
self b
result_ = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr AsyncResult
result_' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
Ptr Word8
outCsum <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word8)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr AsyncResult -> Ptr Word8 -> Ptr (Ptr GError) -> IO CInt
ostree_repo_write_content_finish Ptr Repo
self' Ptr AsyncResult
result_' Ptr Word8
outCsum
Word8
outCsum' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word8
outCsum
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
forall a. Ptr a -> IO ()
freeMem Ptr Word8
outCsum
forall (m :: * -> *) a. Monad m => a -> m a
return Word8
outCsum'
) (do
forall a. Ptr a -> IO ()
freeMem Ptr Word8
outCsum
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteContentFinishMethodInfo
instance (signature ~ (b -> m (Word8)), MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod RepoWriteContentFinishMethodInfo a signature where
overloadedMethod = repoWriteContentFinish
instance O.OverloadedMethodInfo RepoWriteContentFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteContentFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteContentFinish"
})
#endif
foreign import ccall "ostree_repo_write_content_trusted" ostree_repo_write_content_trusted ::
Ptr Repo ->
CString ->
Ptr Gio.InputStream.InputStream ->
Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteContentTrusted ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> b
-> Word64
-> Maybe (c)
-> m ()
repoWriteContentTrusted :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsInputStream b,
IsCancellable c) =>
a -> Text -> b -> Word64 -> Maybe c -> m ()
repoWriteContentTrusted a
self Text
checksum b
objectInput Word64
length_ Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr InputStream
objectInput' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
objectInput
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Ptr InputStream
-> Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_content_trusted Ptr Repo
self' CString
checksum' Ptr InputStream
objectInput' Word64
length_ Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
objectInput
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteContentTrustedMethodInfo
instance (signature ~ (T.Text -> b -> Word64 -> Maybe (c) -> m ()), MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteContentTrustedMethodInfo a signature where
overloadedMethod = repoWriteContentTrusted
instance O.OverloadedMethodInfo RepoWriteContentTrustedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteContentTrusted",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteContentTrusted"
})
#endif
foreign import ccall "ostree_repo_write_dfd_to_mtree" ostree_repo_write_dfd_to_mtree ::
Ptr Repo ->
Int32 ->
CString ->
Ptr OSTree.MutableTree.MutableTree ->
Ptr OSTree.RepoCommitModifier.RepoCommitModifier ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteDfdToMtree ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.MutableTree.IsMutableTree b, Gio.Cancellable.IsCancellable c) =>
a
-> Int32
-> T.Text
-> b
-> Maybe (OSTree.RepoCommitModifier.RepoCommitModifier)
-> Maybe (c)
-> m ()
repoWriteDfdToMtree :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsMutableTree b,
IsCancellable c) =>
a
-> Int32
-> Text
-> b
-> Maybe RepoCommitModifier
-> Maybe c
-> m ()
repoWriteDfdToMtree a
self Int32
dfd Text
path b
mtree Maybe RepoCommitModifier
modifier Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
path' <- Text -> IO CString
textToCString Text
path
Ptr MutableTree
mtree' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
mtree
Ptr RepoCommitModifier
maybeModifier <- case Maybe RepoCommitModifier
modifier of
Maybe RepoCommitModifier
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just RepoCommitModifier
jModifier -> do
Ptr RepoCommitModifier
jModifier' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
jModifier
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RepoCommitModifier
jModifier'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Int32
-> CString
-> Ptr MutableTree
-> Ptr RepoCommitModifier
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_dfd_to_mtree Ptr Repo
self' Int32
dfd CString
path' Ptr MutableTree
mtree' Ptr RepoCommitModifier
maybeModifier Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
mtree
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RepoCommitModifier
modifier forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
path'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
path'
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteDfdToMtreeMethodInfo
instance (signature ~ (Int32 -> T.Text -> b -> Maybe (OSTree.RepoCommitModifier.RepoCommitModifier) -> Maybe (c) -> m ()), MonadIO m, IsRepo a, OSTree.MutableTree.IsMutableTree b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteDfdToMtreeMethodInfo a signature where
overloadedMethod = repoWriteDfdToMtree
instance O.OverloadedMethodInfo RepoWriteDfdToMtreeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteDfdToMtree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteDfdToMtree"
})
#endif
foreign import ccall "ostree_repo_write_directory_to_mtree" ostree_repo_write_directory_to_mtree ::
Ptr Repo ->
Ptr Gio.File.File ->
Ptr OSTree.MutableTree.MutableTree ->
Ptr OSTree.RepoCommitModifier.RepoCommitModifier ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteDirectoryToMtree ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.File.IsFile b, OSTree.MutableTree.IsMutableTree c, Gio.Cancellable.IsCancellable d) =>
a
-> b
-> c
-> Maybe (OSTree.RepoCommitModifier.RepoCommitModifier)
-> Maybe (d)
-> m ()
repoWriteDirectoryToMtree :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c,
IsCancellable d) =>
a -> b -> c -> Maybe RepoCommitModifier -> Maybe d -> m ()
repoWriteDirectoryToMtree a
self b
dir c
mtree Maybe RepoCommitModifier
modifier Maybe d
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
dir' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dir
Ptr MutableTree
mtree' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
mtree
Ptr RepoCommitModifier
maybeModifier <- case Maybe RepoCommitModifier
modifier of
Maybe RepoCommitModifier
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just RepoCommitModifier
jModifier -> do
Ptr RepoCommitModifier
jModifier' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
jModifier
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RepoCommitModifier
jModifier'
Ptr Cancellable
maybeCancellable <- case Maybe d
cancellable of
Maybe d
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just d
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr File
-> Ptr MutableTree
-> Ptr RepoCommitModifier
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_directory_to_mtree Ptr Repo
self' Ptr File
dir' Ptr MutableTree
mtree' Ptr RepoCommitModifier
maybeModifier Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dir
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
mtree
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RepoCommitModifier
modifier forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe d
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteDirectoryToMtreeMethodInfo
instance (signature ~ (b -> c -> Maybe (OSTree.RepoCommitModifier.RepoCommitModifier) -> Maybe (d) -> m ()), MonadIO m, IsRepo a, Gio.File.IsFile b, OSTree.MutableTree.IsMutableTree c, Gio.Cancellable.IsCancellable d) => O.OverloadedMethod RepoWriteDirectoryToMtreeMethodInfo a signature where
overloadedMethod = repoWriteDirectoryToMtree
instance O.OverloadedMethodInfo RepoWriteDirectoryToMtreeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteDirectoryToMtree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteDirectoryToMtree"
})
#endif
foreign import ccall "ostree_repo_write_metadata" ostree_repo_write_metadata ::
Ptr Repo ->
CUInt ->
CString ->
Ptr GVariant ->
Ptr (Ptr Word8) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteMetadata ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.ObjectType
-> Maybe (T.Text)
-> GVariant
-> Maybe (b)
-> m (ByteString)
repoWriteMetadata :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> ObjectType -> Maybe Text -> GVariant -> Maybe b -> m ByteString
repoWriteMetadata a
self ObjectType
objtype Maybe Text
expectedChecksum GVariant
object Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
maybeExpectedChecksum <- case Maybe Text
expectedChecksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jExpectedChecksum -> do
CString
jExpectedChecksum' <- Text -> IO CString
textToCString Text
jExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jExpectedChecksum'
Ptr GVariant
object' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
object
Ptr (Ptr Word8)
outCsum <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word8))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr GVariant
-> Ptr (Ptr Word8)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_metadata Ptr Repo
self' CUInt
objtype' CString
maybeExpectedChecksum Ptr GVariant
object' Ptr (Ptr Word8)
outCsum Ptr Cancellable
maybeCancellable
Ptr Word8
outCsum' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word8)
outCsum
ByteString
outCsum'' <- (forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Integer
32) Ptr Word8
outCsum'
forall a. Ptr a -> IO ()
freeMem Ptr Word8
outCsum'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
object
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word8)
outCsum
forall (m :: * -> *) a. Monad m => a -> m a
return ByteString
outCsum''
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word8)
outCsum
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteMetadataMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> Maybe (T.Text) -> GVariant -> Maybe (b) -> m (ByteString)), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoWriteMetadataMethodInfo a signature where
overloadedMethod = repoWriteMetadata
instance O.OverloadedMethodInfo RepoWriteMetadataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteMetadata",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteMetadata"
})
#endif
foreign import ccall "ostree_repo_write_metadata_async" ostree_repo_write_metadata_async ::
Ptr Repo ->
CUInt ->
CString ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
repoWriteMetadataAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.ObjectType
-> Maybe (T.Text)
-> GVariant
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
repoWriteMetadataAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> ObjectType
-> Maybe Text
-> GVariant
-> Maybe b
-> Maybe AsyncReadyCallback
-> m ()
repoWriteMetadataAsync a
self ObjectType
objtype Maybe Text
expectedChecksum GVariant
object Maybe b
cancellable Maybe AsyncReadyCallback
callback = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
maybeExpectedChecksum <- case Maybe Text
expectedChecksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jExpectedChecksum -> do
CString
jExpectedChecksum' <- Text -> IO CString
textToCString Text
jExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jExpectedChecksum'
Ptr GVariant
object' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
object
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return (forall a b. Ptr a -> FunPtr b
castPtrToFunPtr forall a. Ptr a
nullPtr)
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- 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 (forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = forall a. Ptr a
nullPtr
Ptr Repo
-> CUInt
-> CString
-> Ptr GVariant
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
ostree_repo_write_metadata_async Ptr Repo
self' CUInt
objtype' CString
maybeExpectedChecksum Ptr GVariant
object' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback forall a. Ptr a
userData
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
object
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RepoWriteMetadataAsyncMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> Maybe (T.Text) -> GVariant -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoWriteMetadataAsyncMethodInfo a signature where
overloadedMethod = repoWriteMetadataAsync
instance O.OverloadedMethodInfo RepoWriteMetadataAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteMetadataAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteMetadataAsync"
})
#endif
foreign import ccall "ostree_repo_write_metadata_finish" ostree_repo_write_metadata_finish ::
Ptr Repo ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr Word8) ->
Ptr (Ptr GError) ->
IO CInt
repoWriteMetadataFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m (ByteString)
repoWriteMetadataFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) =>
a -> b -> m ByteString
repoWriteMetadataFinish a
self b
result_ = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr AsyncResult
result_' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
Ptr (Ptr Word8)
outCsum <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Word8))
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr AsyncResult
-> Ptr (Ptr Word8)
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_metadata_finish Ptr Repo
self' Ptr AsyncResult
result_' Ptr (Ptr Word8)
outCsum
Ptr Word8
outCsum' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Word8)
outCsum
ByteString
outCsum'' <- (forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Integer
32) Ptr Word8
outCsum'
forall a. Ptr a -> IO ()
freeMem Ptr Word8
outCsum'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word8)
outCsum
forall (m :: * -> *) a. Monad m => a -> m a
return ByteString
outCsum''
) (do
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Word8)
outCsum
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteMetadataFinishMethodInfo
instance (signature ~ (b -> m (ByteString)), MonadIO m, IsRepo a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod RepoWriteMetadataFinishMethodInfo a signature where
overloadedMethod = repoWriteMetadataFinish
instance O.OverloadedMethodInfo RepoWriteMetadataFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteMetadataFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteMetadataFinish"
})
#endif
foreign import ccall "ostree_repo_write_metadata_stream_trusted" ostree_repo_write_metadata_stream_trusted ::
Ptr Repo ->
CUInt ->
CString ->
Ptr Gio.InputStream.InputStream ->
Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteMetadataStreamTrusted ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> b
-> Word64
-> Maybe (c)
-> m ()
repoWriteMetadataStreamTrusted :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsInputStream b,
IsCancellable c) =>
a -> ObjectType -> Text -> b -> Word64 -> Maybe c -> m ()
repoWriteMetadataStreamTrusted a
self ObjectType
objtype Text
checksum b
objectInput Word64
length_ Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr InputStream
objectInput' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
objectInput
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr InputStream
-> Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_metadata_stream_trusted Ptr Repo
self' CUInt
objtype' CString
checksum' Ptr InputStream
objectInput' Word64
length_ Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
objectInput
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteMetadataStreamTrustedMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> b -> Word64 -> Maybe (c) -> m ()), MonadIO m, IsRepo a, Gio.InputStream.IsInputStream b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteMetadataStreamTrustedMethodInfo a signature where
overloadedMethod = repoWriteMetadataStreamTrusted
instance O.OverloadedMethodInfo RepoWriteMetadataStreamTrustedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteMetadataStreamTrusted",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteMetadataStreamTrusted"
})
#endif
foreign import ccall "ostree_repo_write_metadata_trusted" ostree_repo_write_metadata_trusted ::
Ptr Repo ->
CUInt ->
CString ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteMetadataTrusted ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.Enums.ObjectType
-> T.Text
-> GVariant
-> Maybe (b)
-> m ()
repoWriteMetadataTrusted :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a -> ObjectType -> Text -> GVariant -> Maybe b -> m ()
repoWriteMetadataTrusted a
self ObjectType
objtype Text
checksum GVariant
variant Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let objtype' :: CUInt
objtype' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) ObjectType
objtype
CString
checksum' <- Text -> IO CString
textToCString Text
checksum
Ptr GVariant
variant' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
variant
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CUInt
-> CString
-> Ptr GVariant
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_metadata_trusted Ptr Repo
self' CUInt
objtype' CString
checksum' Ptr GVariant
variant' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
variant
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
checksum'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
forall a. Ptr a -> IO ()
freeMem CString
checksum'
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteMetadataTrustedMethodInfo
instance (signature ~ (OSTree.Enums.ObjectType -> T.Text -> GVariant -> Maybe (b) -> m ()), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoWriteMetadataTrustedMethodInfo a signature where
overloadedMethod = repoWriteMetadataTrusted
instance O.OverloadedMethodInfo RepoWriteMetadataTrustedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteMetadataTrusted",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteMetadataTrusted"
})
#endif
foreign import ccall "ostree_repo_write_mtree" ostree_repo_write_mtree ::
Ptr Repo ->
Ptr OSTree.MutableTree.MutableTree ->
Ptr (Ptr Gio.File.File) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoWriteMtree ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, OSTree.MutableTree.IsMutableTree b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Maybe (c)
-> m (Gio.File.File)
repoWriteMtree :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsRepo a, IsMutableTree b,
IsCancellable c) =>
a -> b -> Maybe c -> m File
repoWriteMtree a
self b
mtree Maybe c
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr MutableTree
mtree' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
mtree
Ptr (Ptr File)
outFile <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gio.File.File))
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> Ptr MutableTree
-> Ptr (Ptr File)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_repo_write_mtree Ptr Repo
self' Ptr MutableTree
mtree' Ptr (Ptr File)
outFile Ptr Cancellable
maybeCancellable
Ptr File
outFile' <- forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr File)
outFile
File
outFile'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
outFile'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
mtree
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr File)
outFile
forall (m :: * -> *) a. Monad m => a -> m a
return File
outFile''
) (do
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr File)
outFile
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteMtreeMethodInfo
instance (signature ~ (b -> Maybe (c) -> m (Gio.File.File)), MonadIO m, IsRepo a, OSTree.MutableTree.IsMutableTree b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod RepoWriteMtreeMethodInfo a signature where
overloadedMethod = repoWriteMtree
instance O.OverloadedMethodInfo RepoWriteMtreeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteMtree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteMtree"
})
#endif
foreign import ccall "ostree_repo_write_regfile" ostree_repo_write_regfile ::
Ptr Repo ->
CString ->
Word32 ->
Word32 ->
Word32 ->
Word64 ->
Ptr GVariant ->
Ptr (Ptr GError) ->
IO (Ptr OSTree.ContentWriter.ContentWriter)
repoWriteRegfile ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a) =>
a
-> Maybe (T.Text)
-> Word32
-> Word32
-> Word32
-> Word64
-> Maybe (GVariant)
-> m OSTree.ContentWriter.ContentWriter
repoWriteRegfile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepo a) =>
a
-> Maybe Text
-> Word32
-> Word32
-> Word32
-> Word64
-> Maybe GVariant
-> m ContentWriter
repoWriteRegfile a
self Maybe Text
expectedChecksum Word32
uid Word32
gid Word32
mode Word64
contentLen Maybe GVariant
xattrs = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeExpectedChecksum <- case Maybe Text
expectedChecksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jExpectedChecksum -> do
CString
jExpectedChecksum' <- Text -> IO CString
textToCString Text
jExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jExpectedChecksum'
Ptr GVariant
maybeXattrs <- case Maybe GVariant
xattrs of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jXattrs -> do
Ptr GVariant
jXattrs' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jXattrs
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jXattrs'
forall a b. IO a -> IO b -> IO a
onException (do
Ptr ContentWriter
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Word32
-> Word32
-> Word32
-> Word64
-> Ptr GVariant
-> Ptr (Ptr GError)
-> IO (Ptr ContentWriter)
ostree_repo_write_regfile Ptr Repo
self' CString
maybeExpectedChecksum Word32
uid Word32
gid Word32
mode Word64
contentLen Ptr GVariant
maybeXattrs
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoWriteRegfile" Ptr ContentWriter
result
ContentWriter
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr ContentWriter -> ContentWriter
OSTree.ContentWriter.ContentWriter) Ptr ContentWriter
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
xattrs forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return ContentWriter
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteRegfileMethodInfo
instance (signature ~ (Maybe (T.Text) -> Word32 -> Word32 -> Word32 -> Word64 -> Maybe (GVariant) -> m OSTree.ContentWriter.ContentWriter), MonadIO m, IsRepo a) => O.OverloadedMethod RepoWriteRegfileMethodInfo a signature where
overloadedMethod = repoWriteRegfile
instance O.OverloadedMethodInfo RepoWriteRegfileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteRegfile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteRegfile"
})
#endif
foreign import ccall "ostree_repo_write_regfile_inline" ostree_repo_write_regfile_inline ::
Ptr Repo ->
CString ->
Word32 ->
Word32 ->
Word32 ->
Ptr GVariant ->
Ptr Word8 ->
Word32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CString
repoWriteRegfileInline ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (T.Text)
-> Word32
-> Word32
-> Word32
-> Maybe (GVariant)
-> ByteString
-> Maybe (b)
-> m T.Text
repoWriteRegfileInline :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> Maybe Text
-> Word32
-> Word32
-> Word32
-> Maybe GVariant
-> ByteString
-> Maybe b
-> m Text
repoWriteRegfileInline a
self Maybe Text
expectedChecksum Word32
uid Word32
gid Word32
mode Maybe GVariant
xattrs ByteString
buf Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let len :: Word32
len = forall a b. (Integral a, Num b) => a -> b
fromIntegral forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
buf
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeExpectedChecksum <- case Maybe Text
expectedChecksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jExpectedChecksum -> do
CString
jExpectedChecksum' <- Text -> IO CString
textToCString Text
jExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jExpectedChecksum'
Ptr GVariant
maybeXattrs <- case Maybe GVariant
xattrs of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jXattrs -> do
Ptr GVariant
jXattrs' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jXattrs
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jXattrs'
Ptr Word8
buf' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
buf
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Word32
-> Word32
-> Word32
-> Ptr GVariant
-> Ptr Word8
-> Word32
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CString
ostree_repo_write_regfile_inline Ptr Repo
self' CString
maybeExpectedChecksum Word32
uid Word32
gid Word32
mode Ptr GVariant
maybeXattrs Ptr Word8
buf' Word32
len Ptr Cancellable
maybeCancellable
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoWriteRegfileInline" CString
result
Text
result' <- HasCallStack => CString -> IO Text
cstringToText CString
result
forall a. Ptr a -> IO ()
freeMem CString
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
xattrs forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buf'
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buf'
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteRegfileInlineMethodInfo
instance (signature ~ (Maybe (T.Text) -> Word32 -> Word32 -> Word32 -> Maybe (GVariant) -> ByteString -> Maybe (b) -> m T.Text), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoWriteRegfileInlineMethodInfo a signature where
overloadedMethod = repoWriteRegfileInline
instance O.OverloadedMethodInfo RepoWriteRegfileInlineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteRegfileInline",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteRegfileInline"
})
#endif
foreign import ccall "ostree_repo_write_symlink" ostree_repo_write_symlink ::
Ptr Repo ->
CString ->
Word32 ->
Word32 ->
Ptr GVariant ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CString
repoWriteSymlink ::
(B.CallStack.HasCallStack, MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (T.Text)
-> Word32
-> Word32
-> Maybe (GVariant)
-> T.Text
-> Maybe (b)
-> m T.Text
repoWriteSymlink :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
a
-> Maybe Text
-> Word32
-> Word32
-> Maybe GVariant
-> Text
-> Maybe b
-> m Text
repoWriteSymlink a
self Maybe Text
expectedChecksum Word32
uid Word32
gid Maybe GVariant
xattrs Text
symlinkTarget Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Repo
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeExpectedChecksum <- case Maybe Text
expectedChecksum of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jExpectedChecksum -> do
CString
jExpectedChecksum' <- Text -> IO CString
textToCString Text
jExpectedChecksum
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jExpectedChecksum'
Ptr GVariant
maybeXattrs <- case Maybe GVariant
xattrs of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jXattrs -> do
Ptr GVariant
jXattrs' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jXattrs
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jXattrs'
CString
symlinkTarget' <- Text -> IO CString
textToCString Text
symlinkTarget
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr Repo
-> CString
-> Word32
-> Word32
-> Ptr GVariant
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CString
ostree_repo_write_symlink Ptr Repo
self' CString
maybeExpectedChecksum Word32
uid Word32
gid Ptr GVariant
maybeXattrs CString
symlinkTarget' Ptr Cancellable
maybeCancellable
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoWriteSymlink" CString
result
Text
result' <- HasCallStack => CString -> IO Text
cstringToText CString
result
forall a. Ptr a -> IO ()
freeMem CString
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
xattrs forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall a. Ptr a -> IO ()
freeMem CString
symlinkTarget'
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
maybeExpectedChecksum
forall a. Ptr a -> IO ()
freeMem CString
symlinkTarget'
)
#if defined(ENABLE_OVERLOADING)
data RepoWriteSymlinkMethodInfo
instance (signature ~ (Maybe (T.Text) -> Word32 -> Word32 -> Maybe (GVariant) -> T.Text -> Maybe (b) -> m T.Text), MonadIO m, IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoWriteSymlinkMethodInfo a signature where
overloadedMethod = repoWriteSymlink
instance O.OverloadedMethodInfo RepoWriteSymlinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Repo.repoWriteSymlink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Objects-Repo.html#v:repoWriteSymlink"
})
#endif
foreign import ccall "ostree_repo_create_at" ostree_repo_create_at ::
Int32 ->
CString ->
CUInt ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr Repo)
repoCreateAt ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
Int32
-> T.Text
-> OSTree.Enums.RepoMode
-> Maybe (GVariant)
-> Maybe (a)
-> m Repo
repoCreateAt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCancellable a) =>
Int32 -> Text -> RepoMode -> Maybe GVariant -> Maybe a -> m Repo
repoCreateAt Int32
dfd Text
path RepoMode
mode Maybe GVariant
options Maybe a
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
CString
path' <- Text -> IO CString
textToCString Text
path
let mode' :: CUInt
mode' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) RepoMode
mode
Ptr GVariant
maybeOptions <- case Maybe GVariant
options of
Maybe GVariant
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GVariant
jOptions -> do
Ptr GVariant
jOptions' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jOptions
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jOptions'
Ptr Cancellable
maybeCancellable <- case Maybe a
cancellable of
Maybe a
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just a
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Repo
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Int32
-> CString
-> CUInt
-> Ptr GVariant
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr Repo)
ostree_repo_create_at Int32
dfd CString
path' CUInt
mode' Ptr GVariant
maybeOptions Ptr Cancellable
maybeCancellable
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoCreateAt" Ptr Repo
result
Repo
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
options forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
path'
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
path'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_repo_mode_from_string" ostree_repo_mode_from_string ::
CString ->
Ptr CUInt ->
Ptr (Ptr GError) ->
IO CInt
repoModeFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m (OSTree.Enums.RepoMode)
repoModeFromString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m RepoMode
repoModeFromString Text
mode = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
CString
mode' <- Text -> IO CString
textToCString Text
mode
Ptr CUInt
outMode <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ CString -> Ptr CUInt -> Ptr (Ptr GError) -> IO CInt
ostree_repo_mode_from_string CString
mode' Ptr CUInt
outMode
CUInt
outMode' <- forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
outMode
let outMode'' :: RepoMode
outMode'' = (forall a. Enum a => Int -> a
toEnum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
outMode'
forall a. Ptr a -> IO ()
freeMem CString
mode'
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
outMode
forall (m :: * -> *) a. Monad m => a -> m a
return RepoMode
outMode''
) (do
forall a. Ptr a -> IO ()
freeMem CString
mode'
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
outMode
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_repo_open_at" ostree_repo_open_at ::
Int32 ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr Repo)
repoOpenAt ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
Int32
-> T.Text
-> Maybe (a)
-> m Repo
repoOpenAt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCancellable a) =>
Int32 -> Text -> Maybe a -> m Repo
repoOpenAt Int32
dfd Text
path Maybe a
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
CString
path' <- Text -> IO CString
textToCString Text
path
Ptr Cancellable
maybeCancellable <- case Maybe a
cancellable of
Maybe a
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just a
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Repo
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Int32
-> CString -> Ptr Cancellable -> Ptr (Ptr GError) -> IO (Ptr Repo)
ostree_repo_open_at Int32
dfd CString
path' Ptr Cancellable
maybeCancellable
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoOpenAt" Ptr Repo
result
Repo
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
Repo) Ptr Repo
result
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
path'
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'
) (do
forall a. Ptr a -> IO ()
freeMem CString
path'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_repo_pull_default_console_progress_changed" ostree_repo_pull_default_console_progress_changed ::
Ptr OSTree.AsyncProgress.AsyncProgress ->
Ptr () ->
IO ()
repoPullDefaultConsoleProgressChanged ::
(B.CallStack.HasCallStack, MonadIO m, OSTree.AsyncProgress.IsAsyncProgress a) =>
a
-> Ptr ()
-> m ()
repoPullDefaultConsoleProgressChanged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsyncProgress a) =>
a -> Ptr () -> m ()
repoPullDefaultConsoleProgressChanged a
progress Ptr ()
userData = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr AsyncProgress
progress' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
progress
Ptr AsyncProgress -> Ptr () -> IO ()
ostree_repo_pull_default_console_progress_changed Ptr AsyncProgress
progress' Ptr ()
userData
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
progress
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
data RepoTraverseNewParentsMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "traverseNewParents" Repo) => O.OverloadedMethod RepoTraverseNewParentsMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "traverseNewParents" Repo) => O.OverloadedMethodInfo RepoTraverseNewParentsMethodInfo o where
overloadedMethodInfo = undefined
#endif
#if defined(ENABLE_OVERLOADING)
data RepoTraverseNewReachableMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "traverseNewReachable" Repo) => O.OverloadedMethod RepoTraverseNewReachableMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "traverseNewReachable" Repo) => O.OverloadedMethodInfo RepoTraverseNewReachableMethodInfo o where
overloadedMethodInfo = undefined
#endif
foreign import ccall "ostree_repo_traverse_parents_get_commits" ostree_repo_traverse_parents_get_commits ::
Ptr (GHashTable (Ptr ()) (Ptr ())) ->
Ptr GVariant ->
IO (Ptr CString)
repoTraverseParentsGetCommits ::
(B.CallStack.HasCallStack, MonadIO m) =>
Map.Map (Ptr ()) (Ptr ())
-> GVariant
-> m [T.Text]
repoTraverseParentsGetCommits :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Map (Ptr ()) (Ptr ()) -> GVariant -> m [Text]
repoTraverseParentsGetCommits Map (Ptr ()) (Ptr ())
parents GVariant
object = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let parents' :: [(Ptr (), Ptr ())]
parents' = forall k a. Map k a -> [(k, a)]
Map.toList Map (Ptr ()) (Ptr ())
parents
let parents'' :: [(PtrWrapped (Ptr ()), Ptr ())]
parents'' = forall a c b. (a -> c) -> [(a, b)] -> [(c, b)]
mapFirst forall a. Ptr a -> PtrWrapped (Ptr a)
B.GHT.ptrPackPtr [(Ptr (), Ptr ())]
parents'
let parents''' :: [(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
parents''' = forall b c a. (b -> c) -> [(a, b)] -> [(a, c)]
mapSecond forall a. Ptr a -> PtrWrapped (Ptr a)
B.GHT.ptrPackPtr [(PtrWrapped (Ptr ()), Ptr ())]
parents''
Ptr (GHashTable (Ptr ()) (Ptr ()))
parents'''' <- forall a b.
GHashFunc a
-> GEqualFunc a
-> Maybe (GDestroyNotify a)
-> Maybe (GDestroyNotify b)
-> [(PtrWrapped a, PtrWrapped b)]
-> IO (Ptr (GHashTable a b))
packGHashTable forall a. GHashFunc (Ptr a)
gDirectHash forall a. GEqualFunc (Ptr a)
gDirectEqual forall a. Maybe a
Nothing forall a. Maybe a
Nothing [(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
parents'''
Ptr GVariant
object' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
object
Ptr CString
result <- Ptr (GHashTable (Ptr ()) (Ptr ()))
-> Ptr GVariant -> IO (Ptr CString)
ostree_repo_traverse_parents_get_commits Ptr (GHashTable (Ptr ()) (Ptr ()))
parents'''' Ptr GVariant
object'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"repoTraverseParentsGetCommits" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
result
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
object
forall a b. Ptr (GHashTable a b) -> IO ()
unrefGHashTable Ptr (GHashTable (Ptr ()) (Ptr ()))
parents''''
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
#endif