module GI.OSTree.Objects.RepoFile
(
RepoFile(..) ,
IsRepoFile ,
toRepoFile ,
noRepoFile ,
RepoFileEnsureResolvedMethodInfo ,
repoFileEnsureResolved ,
RepoFileGetChecksumMethodInfo ,
repoFileGetChecksum ,
RepoFileGetRepoMethodInfo ,
repoFileGetRepo ,
RepoFileGetRootMethodInfo ,
repoFileGetRoot ,
RepoFileGetXattrsMethodInfo ,
repoFileGetXattrs ,
RepoFileTreeFindChildMethodInfo ,
repoFileTreeFindChild ,
RepoFileTreeGetContentsMethodInfo ,
repoFileTreeGetContents ,
RepoFileTreeGetContentsChecksumMethodInfo,
repoFileTreeGetContentsChecksum ,
RepoFileTreeGetMetadataMethodInfo ,
repoFileTreeGetMetadata ,
RepoFileTreeGetMetadataChecksumMethodInfo,
repoFileTreeGetMetadataChecksum ,
RepoFileTreeQueryChildMethodInfo ,
repoFileTreeQueryChild ,
RepoFileTreeSetMetadataMethodInfo ,
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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 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 qualified GI.OSTree.Objects.Repo as OSTree.Repo
newtype RepoFile = RepoFile (ManagedPtr RepoFile)
foreign import ccall "ostree_repo_file_get_type"
c_ostree_repo_file_get_type :: IO GType
instance GObject RepoFile where
gobjectType _ = c_ostree_repo_file_get_type
class GObject o => IsRepoFile o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError RepoFile a) =>
IsRepoFile a
#endif
instance IsRepoFile RepoFile
instance GObject.Object.IsObject RepoFile
instance Gio.File.IsFile RepoFile
toRepoFile :: IsRepoFile o => o -> IO RepoFile
toRepoFile = unsafeCastTo RepoFile
noRepoFile :: Maybe RepoFile
noRepoFile = Nothing
type family ResolveRepoFileMethod (t :: Symbol) (o :: *) :: * 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 "copy" o = Gio.File.FileCopyMethodInfo
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 "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 "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 "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 "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 "pollMountable" o = Gio.File.FilePollMountableMethodInfo
ResolveRepoFileMethod "pollMountableFinish" o = Gio.File.FilePollMountableFinishMethodInfo
ResolveRepoFileMethod "queryDefaultHandler" o = Gio.File.FileQueryDefaultHandlerMethodInfo
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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveRepoFileMethod "replaceFinish" o = Gio.File.FileReplaceFinishMethodInfo
ResolveRepoFileMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
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 "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.MethodInfo info RepoFile p) => O.IsLabelProxy t (RepoFile -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveRepoFileMethod t RepoFile, O.MethodInfo info RepoFile p) => O.IsLabel t (RepoFile -> p) where
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
instance O.HasAttributeList RepoFile
type instance O.AttributeList RepoFile = RepoFileAttributeList
type RepoFileAttributeList = ('[ ] :: [(Symbol, *)])
type instance O.SignalList RepoFile = RepoFileSignalList
type RepoFileSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "ostree_repo_file_ensure_resolved" ostree_repo_file_ensure_resolved ::
Ptr RepoFile ->
Ptr (Ptr GError) ->
IO CInt
repoFileEnsureResolved ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> m ()
repoFileEnsureResolved self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
onException (do
_ <- propagateGError $ ostree_repo_file_ensure_resolved self'
touchManagedPtr self
return ()
) (do
return ()
)
data RepoFileEnsureResolvedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileEnsureResolvedMethodInfo a signature where
overloadedMethod _ = repoFileEnsureResolved
foreign import ccall "ostree_repo_file_get_checksum" ostree_repo_file_get_checksum ::
Ptr RepoFile ->
IO CString
repoFileGetChecksum ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> m T.Text
repoFileGetChecksum self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- ostree_repo_file_get_checksum self'
checkUnexpectedReturnNULL "repoFileGetChecksum" result
result' <- cstringToText result
touchManagedPtr self
return result'
data RepoFileGetChecksumMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileGetChecksumMethodInfo a signature where
overloadedMethod _ = repoFileGetChecksum
foreign import ccall "ostree_repo_file_get_repo" ostree_repo_file_get_repo ::
Ptr RepoFile ->
IO (Ptr OSTree.Repo.Repo)
repoFileGetRepo ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> m OSTree.Repo.Repo
repoFileGetRepo self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- ostree_repo_file_get_repo self'
checkUnexpectedReturnNULL "repoFileGetRepo" result
result' <- (newObject OSTree.Repo.Repo) result
touchManagedPtr self
return result'
data RepoFileGetRepoMethodInfo
instance (signature ~ (m OSTree.Repo.Repo), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileGetRepoMethodInfo a signature where
overloadedMethod _ = repoFileGetRepo
foreign import ccall "ostree_repo_file_get_root" ostree_repo_file_get_root ::
Ptr RepoFile ->
IO (Ptr RepoFile)
repoFileGetRoot ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> m RepoFile
repoFileGetRoot self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- ostree_repo_file_get_root self'
checkUnexpectedReturnNULL "repoFileGetRoot" result
result' <- (newObject RepoFile) result
touchManagedPtr self
return result'
data RepoFileGetRootMethodInfo
instance (signature ~ (m RepoFile), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileGetRootMethodInfo a signature where
overloadedMethod _ = repoFileGetRoot
foreign import ccall "ostree_repo_file_get_xattrs" ostree_repo_file_get_xattrs ::
Ptr RepoFile ->
Ptr GVariant ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoFileGetXattrs ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a, Gio.Cancellable.IsCancellable b) =>
a
-> GVariant
-> Maybe (b)
-> m ()
repoFileGetXattrs self outXattrs cancellable = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
outXattrs' <- unsafeManagedPtrGetPtr outXattrs
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_repo_file_get_xattrs self' outXattrs' maybeCancellable
touchManagedPtr self
touchManagedPtr outXattrs
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
data RepoFileGetXattrsMethodInfo
instance (signature ~ (GVariant -> Maybe (b) -> m ()), MonadIO m, IsRepoFile a, Gio.Cancellable.IsCancellable b) => O.MethodInfo RepoFileGetXattrsMethodInfo a signature where
overloadedMethod _ = repoFileGetXattrs
foreign import ccall "ostree_repo_file_tree_find_child" ostree_repo_file_tree_find_child ::
Ptr RepoFile ->
CString ->
CInt ->
Ptr GVariant ->
IO Int32
repoFileTreeFindChild ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> T.Text
-> Bool
-> GVariant
-> m Int32
repoFileTreeFindChild self name isDir outContainer = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
name' <- textToCString name
let isDir' = (fromIntegral . fromEnum) isDir
outContainer' <- unsafeManagedPtrGetPtr outContainer
result <- ostree_repo_file_tree_find_child self' name' isDir' outContainer'
touchManagedPtr self
touchManagedPtr outContainer
freeMem name'
return result
data RepoFileTreeFindChildMethodInfo
instance (signature ~ (T.Text -> Bool -> GVariant -> m Int32), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileTreeFindChildMethodInfo a signature where
overloadedMethod _ = repoFileTreeFindChild
foreign import ccall "ostree_repo_file_tree_get_contents" ostree_repo_file_tree_get_contents ::
Ptr RepoFile ->
IO (Ptr GVariant)
repoFileTreeGetContents ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> m GVariant
repoFileTreeGetContents self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- ostree_repo_file_tree_get_contents self'
checkUnexpectedReturnNULL "repoFileTreeGetContents" result
result' <- wrapGVariantPtr result
touchManagedPtr self
return result'
data RepoFileTreeGetContentsMethodInfo
instance (signature ~ (m GVariant), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileTreeGetContentsMethodInfo a signature where
overloadedMethod _ = repoFileTreeGetContents
foreign import ccall "ostree_repo_file_tree_get_contents_checksum" ostree_repo_file_tree_get_contents_checksum ::
Ptr RepoFile ->
IO CString
repoFileTreeGetContentsChecksum ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> m T.Text
repoFileTreeGetContentsChecksum self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- ostree_repo_file_tree_get_contents_checksum self'
checkUnexpectedReturnNULL "repoFileTreeGetContentsChecksum" result
result' <- cstringToText result
touchManagedPtr self
return result'
data RepoFileTreeGetContentsChecksumMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileTreeGetContentsChecksumMethodInfo a signature where
overloadedMethod _ = repoFileTreeGetContentsChecksum
foreign import ccall "ostree_repo_file_tree_get_metadata" ostree_repo_file_tree_get_metadata ::
Ptr RepoFile ->
IO (Ptr GVariant)
repoFileTreeGetMetadata ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> m GVariant
repoFileTreeGetMetadata self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- ostree_repo_file_tree_get_metadata self'
checkUnexpectedReturnNULL "repoFileTreeGetMetadata" result
result' <- wrapGVariantPtr result
touchManagedPtr self
return result'
data RepoFileTreeGetMetadataMethodInfo
instance (signature ~ (m GVariant), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileTreeGetMetadataMethodInfo a signature where
overloadedMethod _ = repoFileTreeGetMetadata
foreign import ccall "ostree_repo_file_tree_get_metadata_checksum" ostree_repo_file_tree_get_metadata_checksum ::
Ptr RepoFile ->
IO CString
repoFileTreeGetMetadataChecksum ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> m T.Text
repoFileTreeGetMetadataChecksum self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- ostree_repo_file_tree_get_metadata_checksum self'
checkUnexpectedReturnNULL "repoFileTreeGetMetadataChecksum" result
result' <- cstringToText result
touchManagedPtr self
return result'
data RepoFileTreeGetMetadataChecksumMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileTreeGetMetadataChecksumMethodInfo a signature where
overloadedMethod _ = repoFileTreeGetMetadataChecksum
foreign import ccall "ostree_repo_file_tree_query_child" ostree_repo_file_tree_query_child ::
Ptr RepoFile ->
Int32 ->
CString ->
CUInt ->
Ptr Gio.FileInfo.FileInfo ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
repoFileTreeQueryChild ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a, Gio.FileInfo.IsFileInfo b, Gio.Cancellable.IsCancellable c) =>
a
-> Int32
-> T.Text
-> [Gio.Flags.FileQueryInfoFlags]
-> b
-> Maybe (c)
-> m ()
repoFileTreeQueryChild self n attributes flags outInfo cancellable = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
attributes' <- textToCString attributes
let flags' = gflagsToWord flags
outInfo' <- unsafeManagedPtrCastPtr outInfo
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_repo_file_tree_query_child self' n attributes' flags' outInfo' maybeCancellable
touchManagedPtr self
touchManagedPtr outInfo
whenJust cancellable touchManagedPtr
freeMem attributes'
return ()
) (do
freeMem attributes'
)
data RepoFileTreeQueryChildMethodInfo
instance (signature ~ (Int32 -> T.Text -> [Gio.Flags.FileQueryInfoFlags] -> b -> Maybe (c) -> m ()), MonadIO m, IsRepoFile a, Gio.FileInfo.IsFileInfo b, Gio.Cancellable.IsCancellable c) => O.MethodInfo RepoFileTreeQueryChildMethodInfo a signature where
overloadedMethod _ = repoFileTreeQueryChild
foreign import ccall "ostree_repo_file_tree_set_metadata" ostree_repo_file_tree_set_metadata ::
Ptr RepoFile ->
CString ->
Ptr GVariant ->
IO ()
repoFileTreeSetMetadata ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFile a) =>
a
-> T.Text
-> GVariant
-> m ()
repoFileTreeSetMetadata self checksum metadata = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
checksum' <- textToCString checksum
metadata' <- unsafeManagedPtrGetPtr metadata
ostree_repo_file_tree_set_metadata self' checksum' metadata'
touchManagedPtr self
touchManagedPtr metadata
freeMem checksum'
return ()
data RepoFileTreeSetMetadataMethodInfo
instance (signature ~ (T.Text -> GVariant -> m ()), MonadIO m, IsRepoFile a) => O.MethodInfo RepoFileTreeSetMetadataMethodInfo a signature where
overloadedMethod _ = repoFileTreeSetMetadata