{-# LANGUAGE TypeApplications #-}


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

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

module GI.OSTree.Objects.RepoFile
    ( 
#if defined(ENABLE_OVERLOADING)
    RepoFileTreeFindChildMethodInfo         ,
#endif

-- * Exported types
    RepoFile(..)                            ,
    IsRepoFile                              ,
    toRepoFile                              ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [appendTo]("GI.Gio.Interfaces.File#g:method:appendTo"), [appendToAsync]("GI.Gio.Interfaces.File#g:method:appendToAsync"), [appendToFinish]("GI.Gio.Interfaces.File#g:method:appendToFinish"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [buildAttributeListForCopy]("GI.Gio.Interfaces.File#g:method:buildAttributeListForCopy"), [copy]("GI.Gio.Interfaces.File#g:method:copy"), [copyAsync]("GI.Gio.Interfaces.File#g:method:copyAsync"), [copyAttributes]("GI.Gio.Interfaces.File#g:method:copyAttributes"), [copyFinish]("GI.Gio.Interfaces.File#g:method:copyFinish"), [create]("GI.Gio.Interfaces.File#g:method:create"), [createAsync]("GI.Gio.Interfaces.File#g:method:createAsync"), [createFinish]("GI.Gio.Interfaces.File#g:method:createFinish"), [createReadwrite]("GI.Gio.Interfaces.File#g:method:createReadwrite"), [createReadwriteAsync]("GI.Gio.Interfaces.File#g:method:createReadwriteAsync"), [createReadwriteFinish]("GI.Gio.Interfaces.File#g:method:createReadwriteFinish"), [delete]("GI.Gio.Interfaces.File#g:method:delete"), [deleteAsync]("GI.Gio.Interfaces.File#g:method:deleteAsync"), [deleteFinish]("GI.Gio.Interfaces.File#g:method:deleteFinish"), [dup]("GI.Gio.Interfaces.File#g:method:dup"), [ejectMountable]("GI.Gio.Interfaces.File#g:method:ejectMountable"), [ejectMountableFinish]("GI.Gio.Interfaces.File#g:method:ejectMountableFinish"), [ejectMountableWithOperation]("GI.Gio.Interfaces.File#g:method:ejectMountableWithOperation"), [ejectMountableWithOperationFinish]("GI.Gio.Interfaces.File#g:method:ejectMountableWithOperationFinish"), [ensureResolved]("GI.OSTree.Objects.RepoFile#g:method:ensureResolved"), [enumerateChildren]("GI.Gio.Interfaces.File#g:method:enumerateChildren"), [enumerateChildrenAsync]("GI.Gio.Interfaces.File#g:method:enumerateChildrenAsync"), [enumerateChildrenFinish]("GI.Gio.Interfaces.File#g:method:enumerateChildrenFinish"), [equal]("GI.Gio.Interfaces.File#g:method:equal"), [findEnclosingMount]("GI.Gio.Interfaces.File#g:method:findEnclosingMount"), [findEnclosingMountAsync]("GI.Gio.Interfaces.File#g:method:findEnclosingMountAsync"), [findEnclosingMountFinish]("GI.Gio.Interfaces.File#g:method:findEnclosingMountFinish"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [hasParent]("GI.Gio.Interfaces.File#g:method:hasParent"), [hasPrefix]("GI.Gio.Interfaces.File#g:method:hasPrefix"), [hasUriScheme]("GI.Gio.Interfaces.File#g:method:hasUriScheme"), [hash]("GI.Gio.Interfaces.File#g:method:hash"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isNative]("GI.Gio.Interfaces.File#g:method:isNative"), [loadBytes]("GI.Gio.Interfaces.File#g:method:loadBytes"), [loadBytesAsync]("GI.Gio.Interfaces.File#g:method:loadBytesAsync"), [loadBytesFinish]("GI.Gio.Interfaces.File#g:method:loadBytesFinish"), [loadContents]("GI.Gio.Interfaces.File#g:method:loadContents"), [loadContentsAsync]("GI.Gio.Interfaces.File#g:method:loadContentsAsync"), [loadContentsFinish]("GI.Gio.Interfaces.File#g:method:loadContentsFinish"), [loadPartialContentsFinish]("GI.Gio.Interfaces.File#g:method:loadPartialContentsFinish"), [makeDirectory]("GI.Gio.Interfaces.File#g:method:makeDirectory"), [makeDirectoryAsync]("GI.Gio.Interfaces.File#g:method:makeDirectoryAsync"), [makeDirectoryFinish]("GI.Gio.Interfaces.File#g:method:makeDirectoryFinish"), [makeDirectoryWithParents]("GI.Gio.Interfaces.File#g:method:makeDirectoryWithParents"), [makeSymbolicLink]("GI.Gio.Interfaces.File#g:method:makeSymbolicLink"), [makeSymbolicLinkAsync]("GI.Gio.Interfaces.File#g:method:makeSymbolicLinkAsync"), [makeSymbolicLinkFinish]("GI.Gio.Interfaces.File#g:method:makeSymbolicLinkFinish"), [measureDiskUsage]("GI.Gio.Interfaces.File#g:method:measureDiskUsage"), [measureDiskUsageFinish]("GI.Gio.Interfaces.File#g:method:measureDiskUsageFinish"), [monitor]("GI.Gio.Interfaces.File#g:method:monitor"), [monitorDirectory]("GI.Gio.Interfaces.File#g:method:monitorDirectory"), [monitorFile]("GI.Gio.Interfaces.File#g:method:monitorFile"), [mountEnclosingVolume]("GI.Gio.Interfaces.File#g:method:mountEnclosingVolume"), [mountEnclosingVolumeFinish]("GI.Gio.Interfaces.File#g:method:mountEnclosingVolumeFinish"), [mountMountable]("GI.Gio.Interfaces.File#g:method:mountMountable"), [mountMountableFinish]("GI.Gio.Interfaces.File#g:method:mountMountableFinish"), [move]("GI.Gio.Interfaces.File#g:method:move"), [moveAsync]("GI.Gio.Interfaces.File#g:method:moveAsync"), [moveFinish]("GI.Gio.Interfaces.File#g:method:moveFinish"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [openReadwrite]("GI.Gio.Interfaces.File#g:method:openReadwrite"), [openReadwriteAsync]("GI.Gio.Interfaces.File#g:method:openReadwriteAsync"), [openReadwriteFinish]("GI.Gio.Interfaces.File#g:method:openReadwriteFinish"), [peekPath]("GI.Gio.Interfaces.File#g:method:peekPath"), [pollMountable]("GI.Gio.Interfaces.File#g:method:pollMountable"), [pollMountableFinish]("GI.Gio.Interfaces.File#g:method:pollMountableFinish"), [queryDefaultHandler]("GI.Gio.Interfaces.File#g:method:queryDefaultHandler"), [queryDefaultHandlerAsync]("GI.Gio.Interfaces.File#g:method:queryDefaultHandlerAsync"), [queryDefaultHandlerFinish]("GI.Gio.Interfaces.File#g:method:queryDefaultHandlerFinish"), [queryExists]("GI.Gio.Interfaces.File#g:method:queryExists"), [queryFileType]("GI.Gio.Interfaces.File#g:method:queryFileType"), [queryFilesystemInfo]("GI.Gio.Interfaces.File#g:method:queryFilesystemInfo"), [queryFilesystemInfoAsync]("GI.Gio.Interfaces.File#g:method:queryFilesystemInfoAsync"), [queryFilesystemInfoFinish]("GI.Gio.Interfaces.File#g:method:queryFilesystemInfoFinish"), [queryInfo]("GI.Gio.Interfaces.File#g:method:queryInfo"), [queryInfoAsync]("GI.Gio.Interfaces.File#g:method:queryInfoAsync"), [queryInfoFinish]("GI.Gio.Interfaces.File#g:method:queryInfoFinish"), [querySettableAttributes]("GI.Gio.Interfaces.File#g:method:querySettableAttributes"), [queryWritableNamespaces]("GI.Gio.Interfaces.File#g:method:queryWritableNamespaces"), [read]("GI.Gio.Interfaces.File#g:method:read"), [readAsync]("GI.Gio.Interfaces.File#g:method:readAsync"), [readFinish]("GI.Gio.Interfaces.File#g:method:readFinish"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [replace]("GI.Gio.Interfaces.File#g:method:replace"), [replaceAsync]("GI.Gio.Interfaces.File#g:method:replaceAsync"), [replaceContents]("GI.Gio.Interfaces.File#g:method:replaceContents"), [replaceContentsAsync]("GI.Gio.Interfaces.File#g:method:replaceContentsAsync"), [replaceContentsBytesAsync]("GI.Gio.Interfaces.File#g:method:replaceContentsBytesAsync"), [replaceContentsFinish]("GI.Gio.Interfaces.File#g:method:replaceContentsFinish"), [replaceFinish]("GI.Gio.Interfaces.File#g:method:replaceFinish"), [replaceReadwrite]("GI.Gio.Interfaces.File#g:method:replaceReadwrite"), [replaceReadwriteAsync]("GI.Gio.Interfaces.File#g:method:replaceReadwriteAsync"), [replaceReadwriteFinish]("GI.Gio.Interfaces.File#g:method:replaceReadwriteFinish"), [resolveRelativePath]("GI.Gio.Interfaces.File#g:method:resolveRelativePath"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [startMountable]("GI.Gio.Interfaces.File#g:method:startMountable"), [startMountableFinish]("GI.Gio.Interfaces.File#g:method:startMountableFinish"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [stopMountable]("GI.Gio.Interfaces.File#g:method:stopMountable"), [stopMountableFinish]("GI.Gio.Interfaces.File#g:method:stopMountableFinish"), [supportsThreadContexts]("GI.Gio.Interfaces.File#g:method:supportsThreadContexts"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [trash]("GI.Gio.Interfaces.File#g:method:trash"), [trashAsync]("GI.Gio.Interfaces.File#g:method:trashAsync"), [trashFinish]("GI.Gio.Interfaces.File#g:method:trashFinish"), [treeFindChild]("GI.OSTree.Objects.RepoFile#g:method:treeFindChild"), [treeGetContents]("GI.OSTree.Objects.RepoFile#g:method:treeGetContents"), [treeGetContentsChecksum]("GI.OSTree.Objects.RepoFile#g:method:treeGetContentsChecksum"), [treeGetMetadata]("GI.OSTree.Objects.RepoFile#g:method:treeGetMetadata"), [treeGetMetadataChecksum]("GI.OSTree.Objects.RepoFile#g:method:treeGetMetadataChecksum"), [treeQueryChild]("GI.OSTree.Objects.RepoFile#g:method:treeQueryChild"), [treeSetMetadata]("GI.OSTree.Objects.RepoFile#g:method:treeSetMetadata"), [unmountMountable]("GI.Gio.Interfaces.File#g:method:unmountMountable"), [unmountMountableFinish]("GI.Gio.Interfaces.File#g:method:unmountMountableFinish"), [unmountMountableWithOperation]("GI.Gio.Interfaces.File#g:method:unmountMountableWithOperation"), [unmountMountableWithOperationFinish]("GI.Gio.Interfaces.File#g:method:unmountMountableWithOperationFinish"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getBasename]("GI.Gio.Interfaces.File#g:method:getBasename"), [getChecksum]("GI.OSTree.Objects.RepoFile#g:method:getChecksum"), [getChild]("GI.Gio.Interfaces.File#g:method:getChild"), [getChildForDisplayName]("GI.Gio.Interfaces.File#g:method:getChildForDisplayName"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getParent]("GI.Gio.Interfaces.File#g:method:getParent"), [getParseName]("GI.Gio.Interfaces.File#g:method:getParseName"), [getPath]("GI.Gio.Interfaces.File#g:method:getPath"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRelativePath]("GI.Gio.Interfaces.File#g:method:getRelativePath"), [getRepo]("GI.OSTree.Objects.RepoFile#g:method:getRepo"), [getRoot]("GI.OSTree.Objects.RepoFile#g:method:getRoot"), [getUri]("GI.Gio.Interfaces.File#g:method:getUri"), [getUriScheme]("GI.Gio.Interfaces.File#g:method:getUriScheme"), [getXattrs]("GI.OSTree.Objects.RepoFile#g:method:getXattrs").
-- 
-- ==== Setters
-- [setAttribute]("GI.Gio.Interfaces.File#g:method:setAttribute"), [setAttributeByteString]("GI.Gio.Interfaces.File#g:method:setAttributeByteString"), [setAttributeInt32]("GI.Gio.Interfaces.File#g:method:setAttributeInt32"), [setAttributeInt64]("GI.Gio.Interfaces.File#g:method:setAttributeInt64"), [setAttributeString]("GI.Gio.Interfaces.File#g:method:setAttributeString"), [setAttributeUint32]("GI.Gio.Interfaces.File#g:method:setAttributeUint32"), [setAttributeUint64]("GI.Gio.Interfaces.File#g:method:setAttributeUint64"), [setAttributesAsync]("GI.Gio.Interfaces.File#g:method:setAttributesAsync"), [setAttributesFinish]("GI.Gio.Interfaces.File#g:method:setAttributesFinish"), [setAttributesFromInfo]("GI.Gio.Interfaces.File#g:method:setAttributesFromInfo"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDisplayName]("GI.Gio.Interfaces.File#g:method:setDisplayName"), [setDisplayNameAsync]("GI.Gio.Interfaces.File#g:method:setDisplayNameAsync"), [setDisplayNameFinish]("GI.Gio.Interfaces.File#g:method:setDisplayNameFinish"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveRepoFileMethod                   ,
#endif

-- ** ensureResolved #method:ensureResolved#

#if defined(ENABLE_OVERLOADING)
    RepoFileEnsureResolvedMethodInfo        ,
#endif
    repoFileEnsureResolved                  ,


-- ** getChecksum #method:getChecksum#

#if defined(ENABLE_OVERLOADING)
    RepoFileGetChecksumMethodInfo           ,
#endif
    repoFileGetChecksum                     ,


-- ** getRepo #method:getRepo#

#if defined(ENABLE_OVERLOADING)
    RepoFileGetRepoMethodInfo               ,
#endif
    repoFileGetRepo                         ,


-- ** getRoot #method:getRoot#

#if defined(ENABLE_OVERLOADING)
    RepoFileGetRootMethodInfo               ,
#endif
    repoFileGetRoot                         ,


-- ** getXattrs #method:getXattrs#

#if defined(ENABLE_OVERLOADING)
    RepoFileGetXattrsMethodInfo             ,
#endif
    repoFileGetXattrs                       ,


-- ** treeGetContents #method:treeGetContents#

#if defined(ENABLE_OVERLOADING)
    RepoFileTreeGetContentsMethodInfo       ,
#endif
    repoFileTreeGetContents                 ,


-- ** treeGetContentsChecksum #method:treeGetContentsChecksum#

#if defined(ENABLE_OVERLOADING)
    RepoFileTreeGetContentsChecksumMethodInfo,
#endif
    repoFileTreeGetContentsChecksum         ,


-- ** treeGetMetadata #method:treeGetMetadata#

#if defined(ENABLE_OVERLOADING)
    RepoFileTreeGetMetadataMethodInfo       ,
#endif
    repoFileTreeGetMetadata                 ,


-- ** treeGetMetadataChecksum #method:treeGetMetadataChecksum#

#if defined(ENABLE_OVERLOADING)
    RepoFileTreeGetMetadataChecksumMethodInfo,
#endif
    repoFileTreeGetMetadataChecksum         ,


-- ** treeQueryChild #method:treeQueryChild#

#if defined(ENABLE_OVERLOADING)
    RepoFileTreeQueryChildMethodInfo        ,
#endif
    repoFileTreeQueryChild                  ,


-- ** treeSetMetadata #method:treeSetMetadata#

#if defined(ENABLE_OVERLOADING)
    RepoFileTreeSetMetadataMethodInfo       ,
#endif
    repoFileTreeSetMetadata                 ,




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.KeyFile as GLib.KeyFile
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GLib.Structs.VariantDict as GLib.VariantDict
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
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 qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import qualified GI.OSTree.Callbacks as OSTree.Callbacks
import {-# SOURCE #-} qualified GI.OSTree.Enums as OSTree.Enums
import {-# SOURCE #-} qualified GI.OSTree.Flags as OSTree.Flags
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.BlobReader as OSTree.BlobReader
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.Repo as OSTree.Repo
import {-# SOURCE #-} qualified GI.OSTree.Objects.SePolicy as OSTree.SePolicy
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.RepoDevInoCache as OSTree.RepoDevInoCache
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

#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Flags as Gio.Flags
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 {-# SOURCE #-} qualified GI.OSTree.Objects.Repo as OSTree.Repo

#endif

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

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

foreign import ccall "ostree_repo_file_get_type"
    c_ostree_repo_file_get_type :: IO B.Types.GType

instance B.Types.TypedObject RepoFile where
    glibType :: IO GType
glibType = IO GType
c_ostree_repo_file_get_type

instance B.Types.GObject RepoFile

-- | Type class for types which can be safely cast to t'RepoFile', for instance with `toRepoFile`.
class (SP.GObject o, O.IsDescendantOf RepoFile o) => IsRepoFile o
instance (SP.GObject o, O.IsDescendantOf RepoFile o) => IsRepoFile o

instance O.HasParentTypes RepoFile
type instance O.ParentTypes RepoFile = '[GObject.Object.Object, Gio.File.File]

-- | Cast to t'RepoFile', for types for which this is known to be safe. For general casts, use 'Data.GI.Base.ManagedPtr.castTo'.
toRepoFile :: (MIO.MonadIO m, IsRepoFile o) => o -> m RepoFile
toRepoFile :: forall (m :: * -> *) o.
(MonadIO m, IsRepoFile o) =>
o -> m RepoFile
toRepoFile = IO RepoFile -> m RepoFile
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO RepoFile -> m RepoFile)
-> (o -> IO RepoFile) -> o -> m RepoFile
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr RepoFile -> RepoFile) -> o -> IO RepoFile
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr RepoFile -> RepoFile
RepoFile

-- | Convert t'RepoFile' to and from t'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe RepoFile) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ostree_repo_file_get_type
    gvalueSet_ :: Ptr GValue -> Maybe RepoFile -> IO ()
gvalueSet_ Ptr GValue
gv Maybe RepoFile
P.Nothing = Ptr GValue -> Ptr RepoFile -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr RepoFile
forall a. Ptr a
FP.nullPtr :: FP.Ptr RepoFile)
    gvalueSet_ Ptr GValue
gv (P.Just RepoFile
obj) = RepoFile -> (Ptr RepoFile -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr RepoFile
obj (Ptr GValue -> Ptr RepoFile -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe RepoFile)
gvalueGet_ Ptr GValue
gv = do
        ptr <- Ptr GValue -> IO (Ptr RepoFile)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr RepoFile)
        if ptr /= FP.nullPtr
        then P.Just <$> B.ManagedPtr.newObject RepoFile ptr
        else return P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveRepoFileMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveRepoFileMethod "appendTo" o = Gio.File.FileAppendToMethodInfo
    ResolveRepoFileMethod "appendToAsync" o = Gio.File.FileAppendToAsyncMethodInfo
    ResolveRepoFileMethod "appendToFinish" o = Gio.File.FileAppendToFinishMethodInfo
    ResolveRepoFileMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveRepoFileMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveRepoFileMethod "buildAttributeListForCopy" o = Gio.File.FileBuildAttributeListForCopyMethodInfo
    ResolveRepoFileMethod "copy" o = Gio.File.FileCopyMethodInfo
    ResolveRepoFileMethod "copyAsync" o = Gio.File.FileCopyAsyncMethodInfo
    ResolveRepoFileMethod "copyAttributes" o = Gio.File.FileCopyAttributesMethodInfo
    ResolveRepoFileMethod "copyFinish" o = Gio.File.FileCopyFinishMethodInfo
    ResolveRepoFileMethod "create" o = Gio.File.FileCreateMethodInfo
    ResolveRepoFileMethod "createAsync" o = Gio.File.FileCreateAsyncMethodInfo
    ResolveRepoFileMethod "createFinish" o = Gio.File.FileCreateFinishMethodInfo
    ResolveRepoFileMethod "createReadwrite" o = Gio.File.FileCreateReadwriteMethodInfo
    ResolveRepoFileMethod "createReadwriteAsync" o = Gio.File.FileCreateReadwriteAsyncMethodInfo
    ResolveRepoFileMethod "createReadwriteFinish" o = Gio.File.FileCreateReadwriteFinishMethodInfo
    ResolveRepoFileMethod "delete" o = Gio.File.FileDeleteMethodInfo
    ResolveRepoFileMethod "deleteAsync" o = Gio.File.FileDeleteAsyncMethodInfo
    ResolveRepoFileMethod "deleteFinish" o = Gio.File.FileDeleteFinishMethodInfo
    ResolveRepoFileMethod "dup" o = Gio.File.FileDupMethodInfo
    ResolveRepoFileMethod "ejectMountable" o = Gio.File.FileEjectMountableMethodInfo
    ResolveRepoFileMethod "ejectMountableFinish" o = Gio.File.FileEjectMountableFinishMethodInfo
    ResolveRepoFileMethod "ejectMountableWithOperation" o = Gio.File.FileEjectMountableWithOperationMethodInfo
    ResolveRepoFileMethod "ejectMountableWithOperationFinish" o = Gio.File.FileEjectMountableWithOperationFinishMethodInfo
    ResolveRepoFileMethod "ensureResolved" o = RepoFileEnsureResolvedMethodInfo
    ResolveRepoFileMethod "enumerateChildren" o = Gio.File.FileEnumerateChildrenMethodInfo
    ResolveRepoFileMethod "enumerateChildrenAsync" o = Gio.File.FileEnumerateChildrenAsyncMethodInfo
    ResolveRepoFileMethod "enumerateChildrenFinish" o = Gio.File.FileEnumerateChildrenFinishMethodInfo
    ResolveRepoFileMethod "equal" o = Gio.File.FileEqualMethodInfo
    ResolveRepoFileMethod "findEnclosingMount" o = Gio.File.FileFindEnclosingMountMethodInfo
    ResolveRepoFileMethod "findEnclosingMountAsync" o = Gio.File.FileFindEnclosingMountAsyncMethodInfo
    ResolveRepoFileMethod "findEnclosingMountFinish" o = Gio.File.FileFindEnclosingMountFinishMethodInfo
    ResolveRepoFileMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveRepoFileMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveRepoFileMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveRepoFileMethod "hasParent" o = Gio.File.FileHasParentMethodInfo
    ResolveRepoFileMethod "hasPrefix" o = Gio.File.FileHasPrefixMethodInfo
    ResolveRepoFileMethod "hasUriScheme" o = Gio.File.FileHasUriSchemeMethodInfo
    ResolveRepoFileMethod "hash" o = Gio.File.FileHashMethodInfo
    ResolveRepoFileMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveRepoFileMethod "isNative" o = Gio.File.FileIsNativeMethodInfo
    ResolveRepoFileMethod "loadBytes" o = Gio.File.FileLoadBytesMethodInfo
    ResolveRepoFileMethod "loadBytesAsync" o = Gio.File.FileLoadBytesAsyncMethodInfo
    ResolveRepoFileMethod "loadBytesFinish" o = Gio.File.FileLoadBytesFinishMethodInfo
    ResolveRepoFileMethod "loadContents" o = Gio.File.FileLoadContentsMethodInfo
    ResolveRepoFileMethod "loadContentsAsync" o = Gio.File.FileLoadContentsAsyncMethodInfo
    ResolveRepoFileMethod "loadContentsFinish" o = Gio.File.FileLoadContentsFinishMethodInfo
    ResolveRepoFileMethod "loadPartialContentsFinish" o = Gio.File.FileLoadPartialContentsFinishMethodInfo
    ResolveRepoFileMethod "makeDirectory" o = Gio.File.FileMakeDirectoryMethodInfo
    ResolveRepoFileMethod "makeDirectoryAsync" o = Gio.File.FileMakeDirectoryAsyncMethodInfo
    ResolveRepoFileMethod "makeDirectoryFinish" o = Gio.File.FileMakeDirectoryFinishMethodInfo
    ResolveRepoFileMethod "makeDirectoryWithParents" o = Gio.File.FileMakeDirectoryWithParentsMethodInfo
    ResolveRepoFileMethod "makeSymbolicLink" o = Gio.File.FileMakeSymbolicLinkMethodInfo
    ResolveRepoFileMethod "makeSymbolicLinkAsync" o = Gio.File.FileMakeSymbolicLinkAsyncMethodInfo
    ResolveRepoFileMethod "makeSymbolicLinkFinish" o = Gio.File.FileMakeSymbolicLinkFinishMethodInfo
    ResolveRepoFileMethod "measureDiskUsage" o = Gio.File.FileMeasureDiskUsageMethodInfo
    ResolveRepoFileMethod "measureDiskUsageFinish" o = Gio.File.FileMeasureDiskUsageFinishMethodInfo
    ResolveRepoFileMethod "monitor" o = Gio.File.FileMonitorMethodInfo
    ResolveRepoFileMethod "monitorDirectory" o = Gio.File.FileMonitorDirectoryMethodInfo
    ResolveRepoFileMethod "monitorFile" o = Gio.File.FileMonitorFileMethodInfo
    ResolveRepoFileMethod "mountEnclosingVolume" o = Gio.File.FileMountEnclosingVolumeMethodInfo
    ResolveRepoFileMethod "mountEnclosingVolumeFinish" o = Gio.File.FileMountEnclosingVolumeFinishMethodInfo
    ResolveRepoFileMethod "mountMountable" o = Gio.File.FileMountMountableMethodInfo
    ResolveRepoFileMethod "mountMountableFinish" o = Gio.File.FileMountMountableFinishMethodInfo
    ResolveRepoFileMethod "move" o = Gio.File.FileMoveMethodInfo
    ResolveRepoFileMethod "moveAsync" o = Gio.File.FileMoveAsyncMethodInfo
    ResolveRepoFileMethod "moveFinish" o = Gio.File.FileMoveFinishMethodInfo
    ResolveRepoFileMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveRepoFileMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveRepoFileMethod "openReadwrite" o = Gio.File.FileOpenReadwriteMethodInfo
    ResolveRepoFileMethod "openReadwriteAsync" o = Gio.File.FileOpenReadwriteAsyncMethodInfo
    ResolveRepoFileMethod "openReadwriteFinish" o = Gio.File.FileOpenReadwriteFinishMethodInfo
    ResolveRepoFileMethod "peekPath" o = Gio.File.FilePeekPathMethodInfo
    ResolveRepoFileMethod "pollMountable" o = Gio.File.FilePollMountableMethodInfo
    ResolveRepoFileMethod "pollMountableFinish" o = Gio.File.FilePollMountableFinishMethodInfo
    ResolveRepoFileMethod "queryDefaultHandler" o = Gio.File.FileQueryDefaultHandlerMethodInfo
    ResolveRepoFileMethod "queryDefaultHandlerAsync" o = Gio.File.FileQueryDefaultHandlerAsyncMethodInfo
    ResolveRepoFileMethod "queryDefaultHandlerFinish" o = Gio.File.FileQueryDefaultHandlerFinishMethodInfo
    ResolveRepoFileMethod "queryExists" o = Gio.File.FileQueryExistsMethodInfo
    ResolveRepoFileMethod "queryFileType" o = Gio.File.FileQueryFileTypeMethodInfo
    ResolveRepoFileMethod "queryFilesystemInfo" o = Gio.File.FileQueryFilesystemInfoMethodInfo
    ResolveRepoFileMethod "queryFilesystemInfoAsync" o = Gio.File.FileQueryFilesystemInfoAsyncMethodInfo
    ResolveRepoFileMethod "queryFilesystemInfoFinish" o = Gio.File.FileQueryFilesystemInfoFinishMethodInfo
    ResolveRepoFileMethod "queryInfo" o = Gio.File.FileQueryInfoMethodInfo
    ResolveRepoFileMethod "queryInfoAsync" o = Gio.File.FileQueryInfoAsyncMethodInfo
    ResolveRepoFileMethod "queryInfoFinish" o = Gio.File.FileQueryInfoFinishMethodInfo
    ResolveRepoFileMethod "querySettableAttributes" o = Gio.File.FileQuerySettableAttributesMethodInfo
    ResolveRepoFileMethod "queryWritableNamespaces" o = Gio.File.FileQueryWritableNamespacesMethodInfo
    ResolveRepoFileMethod "read" o = Gio.File.FileReadMethodInfo
    ResolveRepoFileMethod "readAsync" o = Gio.File.FileReadAsyncMethodInfo
    ResolveRepoFileMethod "readFinish" o = Gio.File.FileReadFinishMethodInfo
    ResolveRepoFileMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveRepoFileMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveRepoFileMethod "replace" o = Gio.File.FileReplaceMethodInfo
    ResolveRepoFileMethod "replaceAsync" o = Gio.File.FileReplaceAsyncMethodInfo
    ResolveRepoFileMethod "replaceContents" o = Gio.File.FileReplaceContentsMethodInfo
    ResolveRepoFileMethod "replaceContentsAsync" o = Gio.File.FileReplaceContentsAsyncMethodInfo
    ResolveRepoFileMethod "replaceContentsBytesAsync" o = Gio.File.FileReplaceContentsBytesAsyncMethodInfo
    ResolveRepoFileMethod "replaceContentsFinish" o = Gio.File.FileReplaceContentsFinishMethodInfo
    ResolveRepoFileMethod "replaceFinish" o = Gio.File.FileReplaceFinishMethodInfo
    ResolveRepoFileMethod "replaceReadwrite" o = Gio.File.FileReplaceReadwriteMethodInfo
    ResolveRepoFileMethod "replaceReadwriteAsync" o = Gio.File.FileReplaceReadwriteAsyncMethodInfo
    ResolveRepoFileMethod "replaceReadwriteFinish" o = Gio.File.FileReplaceReadwriteFinishMethodInfo
    ResolveRepoFileMethod "resolveRelativePath" o = Gio.File.FileResolveRelativePathMethodInfo
    ResolveRepoFileMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveRepoFileMethod "startMountable" o = Gio.File.FileStartMountableMethodInfo
    ResolveRepoFileMethod "startMountableFinish" o = Gio.File.FileStartMountableFinishMethodInfo
    ResolveRepoFileMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveRepoFileMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveRepoFileMethod "stopMountable" o = Gio.File.FileStopMountableMethodInfo
    ResolveRepoFileMethod "stopMountableFinish" o = Gio.File.FileStopMountableFinishMethodInfo
    ResolveRepoFileMethod "supportsThreadContexts" o = Gio.File.FileSupportsThreadContextsMethodInfo
    ResolveRepoFileMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveRepoFileMethod "trash" o = Gio.File.FileTrashMethodInfo
    ResolveRepoFileMethod "trashAsync" o = Gio.File.FileTrashAsyncMethodInfo
    ResolveRepoFileMethod "trashFinish" o = Gio.File.FileTrashFinishMethodInfo
    ResolveRepoFileMethod "treeFindChild" o = RepoFileTreeFindChildMethodInfo
    ResolveRepoFileMethod "treeGetContents" o = RepoFileTreeGetContentsMethodInfo
    ResolveRepoFileMethod "treeGetContentsChecksum" o = RepoFileTreeGetContentsChecksumMethodInfo
    ResolveRepoFileMethod "treeGetMetadata" o = RepoFileTreeGetMetadataMethodInfo
    ResolveRepoFileMethod "treeGetMetadataChecksum" o = RepoFileTreeGetMetadataChecksumMethodInfo
    ResolveRepoFileMethod "treeQueryChild" o = RepoFileTreeQueryChildMethodInfo
    ResolveRepoFileMethod "treeSetMetadata" o = RepoFileTreeSetMetadataMethodInfo
    ResolveRepoFileMethod "unmountMountable" o = Gio.File.FileUnmountMountableMethodInfo
    ResolveRepoFileMethod "unmountMountableFinish" o = Gio.File.FileUnmountMountableFinishMethodInfo
    ResolveRepoFileMethod "unmountMountableWithOperation" o = Gio.File.FileUnmountMountableWithOperationMethodInfo
    ResolveRepoFileMethod "unmountMountableWithOperationFinish" o = Gio.File.FileUnmountMountableWithOperationFinishMethodInfo
    ResolveRepoFileMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveRepoFileMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveRepoFileMethod "getBasename" o = Gio.File.FileGetBasenameMethodInfo
    ResolveRepoFileMethod "getChecksum" o = RepoFileGetChecksumMethodInfo
    ResolveRepoFileMethod "getChild" o = Gio.File.FileGetChildMethodInfo
    ResolveRepoFileMethod "getChildForDisplayName" o = Gio.File.FileGetChildForDisplayNameMethodInfo
    ResolveRepoFileMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveRepoFileMethod "getParent" o = Gio.File.FileGetParentMethodInfo
    ResolveRepoFileMethod "getParseName" o = Gio.File.FileGetParseNameMethodInfo
    ResolveRepoFileMethod "getPath" o = Gio.File.FileGetPathMethodInfo
    ResolveRepoFileMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveRepoFileMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveRepoFileMethod "getRelativePath" o = Gio.File.FileGetRelativePathMethodInfo
    ResolveRepoFileMethod "getRepo" o = RepoFileGetRepoMethodInfo
    ResolveRepoFileMethod "getRoot" o = RepoFileGetRootMethodInfo
    ResolveRepoFileMethod "getUri" o = Gio.File.FileGetUriMethodInfo
    ResolveRepoFileMethod "getUriScheme" o = Gio.File.FileGetUriSchemeMethodInfo
    ResolveRepoFileMethod "getXattrs" o = RepoFileGetXattrsMethodInfo
    ResolveRepoFileMethod "setAttribute" o = Gio.File.FileSetAttributeMethodInfo
    ResolveRepoFileMethod "setAttributeByteString" o = Gio.File.FileSetAttributeByteStringMethodInfo
    ResolveRepoFileMethod "setAttributeInt32" o = Gio.File.FileSetAttributeInt32MethodInfo
    ResolveRepoFileMethod "setAttributeInt64" o = Gio.File.FileSetAttributeInt64MethodInfo
    ResolveRepoFileMethod "setAttributeString" o = Gio.File.FileSetAttributeStringMethodInfo
    ResolveRepoFileMethod "setAttributeUint32" o = Gio.File.FileSetAttributeUint32MethodInfo
    ResolveRepoFileMethod "setAttributeUint64" o = Gio.File.FileSetAttributeUint64MethodInfo
    ResolveRepoFileMethod "setAttributesAsync" o = Gio.File.FileSetAttributesAsyncMethodInfo
    ResolveRepoFileMethod "setAttributesFinish" o = Gio.File.FileSetAttributesFinishMethodInfo
    ResolveRepoFileMethod "setAttributesFromInfo" o = Gio.File.FileSetAttributesFromInfoMethodInfo
    ResolveRepoFileMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveRepoFileMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveRepoFileMethod "setDisplayName" o = Gio.File.FileSetDisplayNameMethodInfo
    ResolveRepoFileMethod "setDisplayNameAsync" o = Gio.File.FileSetDisplayNameAsyncMethodInfo
    ResolveRepoFileMethod "setDisplayNameFinish" o = Gio.File.FileSetDisplayNameFinishMethodInfo
    ResolveRepoFileMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveRepoFileMethod l o = O.MethodResolutionFailed l o

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

#endif

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

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RepoFile
type instance O.AttributeList RepoFile = RepoFileAttributeList
type RepoFileAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList RepoFile = RepoFileSignalList
type RepoFileSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method RepoFile::ensure_resolved
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A repo file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_file_ensure_resolved" ostree_repo_file_ensure_resolved :: 
    Ptr RepoFile ->                         -- self : TInterface (Name {namespace = "OSTree", name = "RepoFile"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Ensure that the backing metadata is loaded.
repoFileEnsureResolved ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -- ^ /@self@/: A repo file
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoFileEnsureResolved :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> m ()
repoFileEnsureResolved a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    onException (do
        _ <- propagateGError $ ostree_repo_file_ensure_resolved self'
        touchManagedPtr self
        return ()
     ) (do
        return ()
     )

#if defined(ENABLE_OVERLOADING)
data RepoFileEnsureResolvedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileEnsureResolvedMethodInfo a signature where
    overloadedMethod = repoFileEnsureResolved

instance O.OverloadedMethodInfo RepoFileEnsureResolvedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileEnsureResolved",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileEnsureResolved"
        })


#endif

-- method RepoFile::get_checksum
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

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

-- | /No description available in the introspection data./
repoFileGetChecksum ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -> m T.Text
repoFileGetChecksum :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> m Text
repoFileGetChecksum a
self = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    result <- ostree_repo_file_get_checksum self'
    checkUnexpectedReturnNULL "repoFileGetChecksum" result
    result' <- cstringToText result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data RepoFileGetChecksumMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileGetChecksumMethodInfo a signature where
    overloadedMethod = repoFileGetChecksum

instance O.OverloadedMethodInfo RepoFileGetChecksumMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileGetChecksum",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileGetChecksum"
        })


#endif

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

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

-- | /No description available in the introspection data./
repoFileGetRepo ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -> m OSTree.Repo.Repo
    -- ^ __Returns:__ Repository
repoFileGetRepo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> m Repo
repoFileGetRepo a
self = IO Repo -> m Repo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    result <- ostree_repo_file_get_repo self'
    checkUnexpectedReturnNULL "repoFileGetRepo" result
    result' <- (newObject OSTree.Repo.Repo) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data RepoFileGetRepoMethodInfo
instance (signature ~ (m OSTree.Repo.Repo), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileGetRepoMethodInfo a signature where
    overloadedMethod = repoFileGetRepo

instance O.OverloadedMethodInfo RepoFileGetRepoMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileGetRepo",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileGetRepo"
        })


#endif

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

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

-- | /No description available in the introspection data./
repoFileGetRoot ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -> m RepoFile
    -- ^ __Returns:__ The root directory for the commit referenced by this file
repoFileGetRoot :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> m RepoFile
repoFileGetRoot a
self = IO RepoFile -> m RepoFile
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoFile -> m RepoFile) -> IO RepoFile -> m RepoFile
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    result <- ostree_repo_file_get_root self'
    checkUnexpectedReturnNULL "repoFileGetRoot" result
    result' <- (newObject RepoFile) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data RepoFileGetRootMethodInfo
instance (signature ~ (m RepoFile), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileGetRootMethodInfo a signature where
    overloadedMethod = repoFileGetRoot

instance O.OverloadedMethodInfo RepoFileGetRootMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileGetRoot",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileGetRoot"
        })


#endif

-- method RepoFile::get_xattrs
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#OstreeRepoFile" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_xattrs"
--           , argType = TVariant
--           , argCType = Just "GVariant**"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the extended attributes"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , argCType = Just "GCancellable*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Cancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

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

-- | /No description available in the introspection data./
repoFileGetXattrs ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: t'GI.OSTree.Objects.RepoFile.RepoFile'
    -> Maybe (b)
    -- ^ /@cancellable@/: Cancellable
    -> m (GVariant)
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoFileGetXattrs :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepoFile a, IsCancellable b) =>
a -> Maybe b -> m GVariant
repoFileGetXattrs a
self Maybe b
cancellable = IO GVariant -> m GVariant
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    outXattrs <- callocMem :: IO (Ptr (Ptr GVariant))
    maybeCancellable <- case cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            return jCancellable'
    onException (do
        _ <- propagateGError $ ostree_repo_file_get_xattrs self' outXattrs maybeCancellable
        outXattrs' <- peek outXattrs
        outXattrs'' <- B.GVariant.wrapGVariantPtr outXattrs'
        touchManagedPtr self
        whenJust cancellable touchManagedPtr
        freeMem outXattrs
        return outXattrs''
     ) (do
        freeMem outXattrs
     )

#if defined(ENABLE_OVERLOADING)
data RepoFileGetXattrsMethodInfo
instance (signature ~ (Maybe (b) -> m (GVariant)), MonadIO m, IsRepoFile a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoFileGetXattrsMethodInfo a signature where
    overloadedMethod = repoFileGetXattrs

instance O.OverloadedMethodInfo RepoFileGetXattrsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileGetXattrs",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileGetXattrs"
        })


#endif

-- XXX Could not generate method RepoFile::tree_find_child
-- Not implemented: Don't know how to allocate "is_dir" of type TBasicType TBoolean
#if defined(ENABLE_OVERLOADING)
-- XXX: Dummy instance, since code generation failed.
-- Please file a bug at http://github.com/haskell-gi/haskell-gi.
data RepoFileTreeFindChildMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "treeFindChild" RepoFile) => O.OverloadedMethod RepoFileTreeFindChildMethodInfo o p where
    overloadedMethod = undefined

instance (o ~ O.UnsupportedMethodError "treeFindChild" RepoFile) => O.OverloadedMethodInfo RepoFileTreeFindChildMethodInfo o where
    overloadedMethodInfo = undefined

#endif

-- method RepoFile::tree_get_contents
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A repo file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just TVariant
-- throws : False
-- Skip return : False

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

-- | This API will return 'P.Nothing' if the file is not \"resolved\" i.e. in a loaded
-- state.  It will also return 'P.Nothing' if this path is not a directory tree.
repoFileTreeGetContents ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -- ^ /@self@/: A repo file
    -> m (Maybe GVariant)
    -- ^ __Returns:__ The GVariant representing the children of this directory.
repoFileTreeGetContents :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> m (Maybe GVariant)
repoFileTreeGetContents a
self = IO (Maybe GVariant) -> m (Maybe GVariant)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GVariant) -> m (Maybe GVariant))
-> IO (Maybe GVariant) -> m (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    result <- ostree_repo_file_tree_get_contents self'
    maybeResult <- convertIfNonNull result $ \Ptr GVariant
result' -> do
        result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
        return result''
    touchManagedPtr self
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data RepoFileTreeGetContentsMethodInfo
instance (signature ~ (m (Maybe GVariant)), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileTreeGetContentsMethodInfo a signature where
    overloadedMethod = repoFileTreeGetContents

instance O.OverloadedMethodInfo RepoFileTreeGetContentsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileTreeGetContents",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileTreeGetContents"
        })


#endif

-- method RepoFile::tree_get_contents_checksum
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A repo file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

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

-- | /No description available in the introspection data./
repoFileTreeGetContentsChecksum ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -- ^ /@self@/: A repo file
    -> m (Maybe T.Text)
    -- ^ __Returns:__ The SHA256 digest of the content object, or 'P.Nothing' if this is not a
    -- directory.
repoFileTreeGetContentsChecksum :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> m (Maybe Text)
repoFileTreeGetContentsChecksum a
self = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    result <- ostree_repo_file_tree_get_contents_checksum self'
    maybeResult <- convertIfNonNull result $ \CString
result' -> do
        result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        return result''
    touchManagedPtr self
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data RepoFileTreeGetContentsChecksumMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileTreeGetContentsChecksumMethodInfo a signature where
    overloadedMethod = repoFileTreeGetContentsChecksum

instance O.OverloadedMethodInfo RepoFileTreeGetContentsChecksumMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileTreeGetContentsChecksum",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileTreeGetContentsChecksum"
        })


#endif

-- method RepoFile::tree_get_metadata
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A repo file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just TVariant
-- throws : False
-- Skip return : False

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

-- | This API will return 'P.Nothing' if the file is not \"resolved\" i.e. in a loaded
-- state.  It will also return 'P.Nothing' if this path is not a directory tree.
repoFileTreeGetMetadata ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -- ^ /@self@/: A repo file
    -> m (Maybe GVariant)
    -- ^ __Returns:__ The GVariant representing the metadata for this directory.
repoFileTreeGetMetadata :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> m (Maybe GVariant)
repoFileTreeGetMetadata a
self = IO (Maybe GVariant) -> m (Maybe GVariant)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GVariant) -> m (Maybe GVariant))
-> IO (Maybe GVariant) -> m (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    result <- ostree_repo_file_tree_get_metadata self'
    maybeResult <- convertIfNonNull result $ \Ptr GVariant
result' -> do
        result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
        return result''
    touchManagedPtr self
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data RepoFileTreeGetMetadataMethodInfo
instance (signature ~ (m (Maybe GVariant)), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileTreeGetMetadataMethodInfo a signature where
    overloadedMethod = repoFileTreeGetMetadata

instance O.OverloadedMethodInfo RepoFileTreeGetMetadataMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileTreeGetMetadata",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileTreeGetMetadata"
        })


#endif

-- method RepoFile::tree_get_metadata_checksum
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A repo file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

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

-- | /No description available in the introspection data./
repoFileTreeGetMetadataChecksum ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -- ^ /@self@/: A repo file
    -> m (Maybe T.Text)
    -- ^ __Returns:__ The SHA256 digest of the metadata object, or 'P.Nothing' if this is not a
    -- directory.
repoFileTreeGetMetadataChecksum :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> m (Maybe Text)
repoFileTreeGetMetadataChecksum a
self = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    result <- ostree_repo_file_tree_get_metadata_checksum self'
    maybeResult <- convertIfNonNull result $ \CString
result' -> do
        result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        return result''
    touchManagedPtr self
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data RepoFileTreeGetMetadataChecksumMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileTreeGetMetadataChecksumMethodInfo a signature where
    overloadedMethod = repoFileTreeGetMetadataChecksum

instance O.OverloadedMethodInfo RepoFileTreeGetMetadataChecksumMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileTreeGetMetadataChecksum",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileTreeGetMetadataChecksum"
        })


#endif

-- method RepoFile::tree_query_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#OstreeRepoFile" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the child number" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "attributes"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "an attribute string to match, see g_file_attribute_matcher_new()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "FileQueryInfoFlags" }
--           , argCType = Just "GFileQueryInfoFlags"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GFileQueryInfoFlags"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_info"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "FileInfo" }
--           , argCType = Just "GFileInfo**"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GFileInfo of the child."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , argCType = Just "GCancellable*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_file_tree_query_child" ostree_repo_file_tree_query_child :: 
    Ptr RepoFile ->                         -- self : TInterface (Name {namespace = "OSTree", name = "RepoFile"})
    Int32 ->                                -- n : TBasicType TInt
    CString ->                              -- attributes : TBasicType TUTF8
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gio", name = "FileQueryInfoFlags"})
    Ptr (Ptr Gio.FileInfo.FileInfo) ->      -- out_info : TInterface (Name {namespace = "Gio", name = "FileInfo"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | /No description available in the introspection data./
repoFileTreeQueryChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: t'GI.OSTree.Objects.RepoFile.RepoFile'
    -> Int32
    -- ^ /@n@/: the child number
    -> T.Text
    -- ^ /@attributes@/: an attribute string to match, see 'GI.Gio.Structs.FileAttributeMatcher.fileAttributeMatcherNew'
    -> [Gio.Flags.FileQueryInfoFlags]
    -- ^ /@flags@/: a t'GI.Gio.Flags.FileQueryInfoFlags'
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing'
    -> m (Gio.FileInfo.FileInfo)
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoFileTreeQueryChild :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepoFile a, IsCancellable b) =>
a -> Int32 -> Text -> [FileQueryInfoFlags] -> Maybe b -> m FileInfo
repoFileTreeQueryChild a
self Int32
n Text
attributes [FileQueryInfoFlags]
flags Maybe b
cancellable = IO FileInfo -> m FileInfo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileInfo -> m FileInfo) -> IO FileInfo -> m FileInfo
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    attributes' <- textToCString attributes
    let flags' = [FileQueryInfoFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [FileQueryInfoFlags]
flags
    outInfo <- callocMem :: IO (Ptr (Ptr Gio.FileInfo.FileInfo))
    maybeCancellable <- case cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            return jCancellable'
    onException (do
        _ <- propagateGError $ ostree_repo_file_tree_query_child self' n attributes' flags' outInfo maybeCancellable
        outInfo' <- peek outInfo
        outInfo'' <- (wrapObject Gio.FileInfo.FileInfo) outInfo'
        touchManagedPtr self
        whenJust cancellable touchManagedPtr
        freeMem attributes'
        freeMem outInfo
        return outInfo''
     ) (do
        freeMem attributes'
        freeMem outInfo
     )

#if defined(ENABLE_OVERLOADING)
data RepoFileTreeQueryChildMethodInfo
instance (signature ~ (Int32 -> T.Text -> [Gio.Flags.FileQueryInfoFlags] -> Maybe (b) -> m (Gio.FileInfo.FileInfo)), MonadIO m, IsRepoFile a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoFileTreeQueryChildMethodInfo a signature where
    overloadedMethod = repoFileTreeQueryChild

instance O.OverloadedMethodInfo RepoFileTreeQueryChildMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileTreeQueryChild",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileTreeQueryChild"
        })


#endif

-- method RepoFile::tree_set_metadata
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoFile" }
--           , argCType = Just "OstreeRepoFile*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A repo file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "checksum"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "metadata"
--           , argType = TVariant
--           , argCType = Just "GVariant*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_file_tree_set_metadata" ostree_repo_file_tree_set_metadata :: 
    Ptr RepoFile ->                         -- self : TInterface (Name {namespace = "OSTree", name = "RepoFile"})
    CString ->                              -- checksum : TBasicType TUTF8
    Ptr GVariant ->                         -- metadata : TVariant
    IO ()

-- | Replace the metadata checksum and metadata object.
repoFileTreeSetMetadata ::
    (B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
    a
    -- ^ /@self@/: A repo file
    -> T.Text
    -> GVariant
    -> m ()
repoFileTreeSetMetadata :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRepoFile a) =>
a -> Text -> GVariant -> m ()
repoFileTreeSetMetadata a
self Text
checksum GVariant
metadata = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    self' <- a -> IO (Ptr RepoFile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    checksum' <- textToCString checksum
    metadata' <- unsafeManagedPtrGetPtr metadata
    ostree_repo_file_tree_set_metadata self' checksum' metadata'
    touchManagedPtr self
    touchManagedPtr metadata
    freeMem checksum'
    return ()

#if defined(ENABLE_OVERLOADING)
data RepoFileTreeSetMetadataMethodInfo
instance (signature ~ (T.Text -> GVariant -> m ()), MonadIO m, IsRepoFile a) => O.OverloadedMethod RepoFileTreeSetMetadataMethodInfo a signature where
    overloadedMethod = repoFileTreeSetMetadata

instance O.OverloadedMethodInfo RepoFileTreeSetMetadataMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Objects.RepoFile.repoFileTreeSetMetadata",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-RepoFile.html#v:repoFileTreeSetMetadata"
        })


#endif