{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.OSTree.Objects.Sysroot
(
Sysroot(..) ,
IsSysroot ,
toSysroot ,
noSysroot ,
#if defined(ENABLE_OVERLOADING)
ResolveSysrootMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SysrootCleanupMethodInfo ,
#endif
sysrootCleanup ,
#if defined(ENABLE_OVERLOADING)
SysrootCleanupPruneRepoMethodInfo ,
#endif
sysrootCleanupPruneRepo ,
#if defined(ENABLE_OVERLOADING)
SysrootDeployTreeMethodInfo ,
#endif
sysrootDeployTree ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentSetKargsMethodInfo ,
#endif
sysrootDeploymentSetKargs ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentSetMutableMethodInfo ,
#endif
sysrootDeploymentSetMutable ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentSetPinnedMethodInfo ,
#endif
sysrootDeploymentSetPinned ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentUnlockMethodInfo ,
#endif
sysrootDeploymentUnlock ,
#if defined(ENABLE_OVERLOADING)
SysrootEnsureInitializedMethodInfo ,
#endif
sysrootEnsureInitialized ,
#if defined(ENABLE_OVERLOADING)
SysrootGetBootedDeploymentMethodInfo ,
#endif
sysrootGetBootedDeployment ,
#if defined(ENABLE_OVERLOADING)
SysrootGetBootversionMethodInfo ,
#endif
sysrootGetBootversion ,
#if defined(ENABLE_OVERLOADING)
SysrootGetDeploymentDirectoryMethodInfo ,
#endif
sysrootGetDeploymentDirectory ,
#if defined(ENABLE_OVERLOADING)
SysrootGetDeploymentDirpathMethodInfo ,
#endif
sysrootGetDeploymentDirpath ,
sysrootGetDeploymentOriginPath ,
#if defined(ENABLE_OVERLOADING)
SysrootGetDeploymentsMethodInfo ,
#endif
sysrootGetDeployments ,
#if defined(ENABLE_OVERLOADING)
SysrootGetFdMethodInfo ,
#endif
sysrootGetFd ,
#if defined(ENABLE_OVERLOADING)
SysrootGetMergeDeploymentMethodInfo ,
#endif
sysrootGetMergeDeployment ,
#if defined(ENABLE_OVERLOADING)
SysrootGetPathMethodInfo ,
#endif
sysrootGetPath ,
#if defined(ENABLE_OVERLOADING)
SysrootGetRepoMethodInfo ,
#endif
sysrootGetRepo ,
#if defined(ENABLE_OVERLOADING)
SysrootGetStagedDeploymentMethodInfo ,
#endif
sysrootGetStagedDeployment ,
#if defined(ENABLE_OVERLOADING)
SysrootGetSubbootversionMethodInfo ,
#endif
sysrootGetSubbootversion ,
#if defined(ENABLE_OVERLOADING)
SysrootInitOsnameMethodInfo ,
#endif
sysrootInitOsname ,
#if defined(ENABLE_OVERLOADING)
SysrootLoadMethodInfo ,
#endif
sysrootLoad ,
#if defined(ENABLE_OVERLOADING)
SysrootLoadIfChangedMethodInfo ,
#endif
sysrootLoadIfChanged ,
#if defined(ENABLE_OVERLOADING)
SysrootLockMethodInfo ,
#endif
sysrootLock ,
#if defined(ENABLE_OVERLOADING)
SysrootLockAsyncMethodInfo ,
#endif
sysrootLockAsync ,
#if defined(ENABLE_OVERLOADING)
SysrootLockFinishMethodInfo ,
#endif
sysrootLockFinish ,
sysrootNew ,
sysrootNewDefault ,
#if defined(ENABLE_OVERLOADING)
SysrootOriginNewFromRefspecMethodInfo ,
#endif
sysrootOriginNewFromRefspec ,
#if defined(ENABLE_OVERLOADING)
SysrootPrepareCleanupMethodInfo ,
#endif
sysrootPrepareCleanup ,
#if defined(ENABLE_OVERLOADING)
SysrootQueryDeploymentsForMethodInfo ,
#endif
sysrootQueryDeploymentsFor ,
#if defined(ENABLE_OVERLOADING)
SysrootRepoMethodInfo ,
#endif
sysrootRepo ,
#if defined(ENABLE_OVERLOADING)
SysrootSimpleWriteDeploymentMethodInfo ,
#endif
sysrootSimpleWriteDeployment ,
#if defined(ENABLE_OVERLOADING)
SysrootStageTreeMethodInfo ,
#endif
sysrootStageTree ,
#if defined(ENABLE_OVERLOADING)
SysrootTryLockMethodInfo ,
#endif
sysrootTryLock ,
#if defined(ENABLE_OVERLOADING)
SysrootUnloadMethodInfo ,
#endif
sysrootUnload ,
#if defined(ENABLE_OVERLOADING)
SysrootUnlockMethodInfo ,
#endif
sysrootUnlock ,
#if defined(ENABLE_OVERLOADING)
SysrootWriteDeploymentsMethodInfo ,
#endif
sysrootWriteDeployments ,
#if defined(ENABLE_OVERLOADING)
SysrootWriteDeploymentsWithOptionsMethodInfo,
#endif
sysrootWriteDeploymentsWithOptions ,
#if defined(ENABLE_OVERLOADING)
SysrootWriteOriginFileMethodInfo ,
#endif
sysrootWriteOriginFile ,
#if defined(ENABLE_OVERLOADING)
SysrootPathPropertyInfo ,
#endif
constructSysrootPath ,
getSysrootPath ,
#if defined(ENABLE_OVERLOADING)
sysrootPath ,
#endif
C_SysrootJournalMsgCallback ,
SysrootJournalMsgCallback ,
#if defined(ENABLE_OVERLOADING)
SysrootJournalMsgSignalInfo ,
#endif
afterSysrootJournalMsg ,
genClosure_SysrootJournalMsg ,
mk_SysrootJournalMsgCallback ,
noSysrootJournalMsgCallback ,
onSysrootJournalMsg ,
wrap_SysrootJournalMsgCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Structs.KeyFile as GLib.KeyFile
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.OSTree.Enums as OSTree.Enums
import {-# SOURCE #-} qualified GI.OSTree.Flags as OSTree.Flags
import {-# SOURCE #-} qualified GI.OSTree.Objects.Deployment as OSTree.Deployment
import {-# SOURCE #-} qualified GI.OSTree.Objects.Repo as OSTree.Repo
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoPruneOptions as OSTree.RepoPruneOptions
import {-# SOURCE #-} qualified GI.OSTree.Structs.SysrootWriteDeploymentsOpts as OSTree.SysrootWriteDeploymentsOpts
newtype Sysroot = Sysroot (ManagedPtr Sysroot)
deriving (Sysroot -> Sysroot -> Bool
(Sysroot -> Sysroot -> Bool)
-> (Sysroot -> Sysroot -> Bool) -> Eq Sysroot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Sysroot -> Sysroot -> Bool
$c/= :: Sysroot -> Sysroot -> Bool
== :: Sysroot -> Sysroot -> Bool
$c== :: Sysroot -> Sysroot -> Bool
Eq)
foreign import ccall "ostree_sysroot_get_type"
c_ostree_sysroot_get_type :: IO GType
instance GObject Sysroot where
gobjectType :: IO GType
gobjectType = IO GType
c_ostree_sysroot_get_type
instance B.GValue.IsGValue Sysroot where
toGValue :: Sysroot -> IO GValue
toGValue o :: Sysroot
o = do
GType
gtype <- IO GType
c_ostree_sysroot_get_type
Sysroot -> (Ptr Sysroot -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Sysroot
o (GType
-> (GValue -> Ptr Sysroot -> IO ()) -> Ptr Sysroot -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Sysroot -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Sysroot
fromGValue gv :: GValue
gv = do
Ptr Sysroot
ptr <- GValue -> IO (Ptr Sysroot)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Sysroot)
(ManagedPtr Sysroot -> Sysroot) -> Ptr Sysroot -> IO Sysroot
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Sysroot -> Sysroot
Sysroot Ptr Sysroot
ptr
class (GObject o, O.IsDescendantOf Sysroot o) => IsSysroot o
instance (GObject o, O.IsDescendantOf Sysroot o) => IsSysroot o
instance O.HasParentTypes Sysroot
type instance O.ParentTypes Sysroot = '[GObject.Object.Object]
toSysroot :: (MonadIO m, IsSysroot o) => o -> m Sysroot
toSysroot :: o -> m Sysroot
toSysroot = IO Sysroot -> m Sysroot
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sysroot -> m Sysroot) -> (o -> IO Sysroot) -> o -> m Sysroot
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Sysroot -> Sysroot) -> o -> IO Sysroot
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Sysroot -> Sysroot
Sysroot
noSysroot :: Maybe Sysroot
noSysroot :: Maybe Sysroot
noSysroot = Maybe Sysroot
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSysrootMethod (t :: Symbol) (o :: *) :: * where
ResolveSysrootMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSysrootMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSysrootMethod "cleanup" o = SysrootCleanupMethodInfo
ResolveSysrootMethod "cleanupPruneRepo" o = SysrootCleanupPruneRepoMethodInfo
ResolveSysrootMethod "deployTree" o = SysrootDeployTreeMethodInfo
ResolveSysrootMethod "deploymentSetKargs" o = SysrootDeploymentSetKargsMethodInfo
ResolveSysrootMethod "deploymentSetMutable" o = SysrootDeploymentSetMutableMethodInfo
ResolveSysrootMethod "deploymentSetPinned" o = SysrootDeploymentSetPinnedMethodInfo
ResolveSysrootMethod "deploymentUnlock" o = SysrootDeploymentUnlockMethodInfo
ResolveSysrootMethod "ensureInitialized" o = SysrootEnsureInitializedMethodInfo
ResolveSysrootMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSysrootMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSysrootMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSysrootMethod "initOsname" o = SysrootInitOsnameMethodInfo
ResolveSysrootMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSysrootMethod "load" o = SysrootLoadMethodInfo
ResolveSysrootMethod "loadIfChanged" o = SysrootLoadIfChangedMethodInfo
ResolveSysrootMethod "lock" o = SysrootLockMethodInfo
ResolveSysrootMethod "lockAsync" o = SysrootLockAsyncMethodInfo
ResolveSysrootMethod "lockFinish" o = SysrootLockFinishMethodInfo
ResolveSysrootMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSysrootMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSysrootMethod "originNewFromRefspec" o = SysrootOriginNewFromRefspecMethodInfo
ResolveSysrootMethod "prepareCleanup" o = SysrootPrepareCleanupMethodInfo
ResolveSysrootMethod "queryDeploymentsFor" o = SysrootQueryDeploymentsForMethodInfo
ResolveSysrootMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSysrootMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSysrootMethod "repo" o = SysrootRepoMethodInfo
ResolveSysrootMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSysrootMethod "simpleWriteDeployment" o = SysrootSimpleWriteDeploymentMethodInfo
ResolveSysrootMethod "stageTree" o = SysrootStageTreeMethodInfo
ResolveSysrootMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSysrootMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSysrootMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSysrootMethod "tryLock" o = SysrootTryLockMethodInfo
ResolveSysrootMethod "unload" o = SysrootUnloadMethodInfo
ResolveSysrootMethod "unlock" o = SysrootUnlockMethodInfo
ResolveSysrootMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSysrootMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSysrootMethod "writeDeployments" o = SysrootWriteDeploymentsMethodInfo
ResolveSysrootMethod "writeDeploymentsWithOptions" o = SysrootWriteDeploymentsWithOptionsMethodInfo
ResolveSysrootMethod "writeOriginFile" o = SysrootWriteOriginFileMethodInfo
ResolveSysrootMethod "getBootedDeployment" o = SysrootGetBootedDeploymentMethodInfo
ResolveSysrootMethod "getBootversion" o = SysrootGetBootversionMethodInfo
ResolveSysrootMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSysrootMethod "getDeploymentDirectory" o = SysrootGetDeploymentDirectoryMethodInfo
ResolveSysrootMethod "getDeploymentDirpath" o = SysrootGetDeploymentDirpathMethodInfo
ResolveSysrootMethod "getDeployments" o = SysrootGetDeploymentsMethodInfo
ResolveSysrootMethod "getFd" o = SysrootGetFdMethodInfo
ResolveSysrootMethod "getMergeDeployment" o = SysrootGetMergeDeploymentMethodInfo
ResolveSysrootMethod "getPath" o = SysrootGetPathMethodInfo
ResolveSysrootMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSysrootMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSysrootMethod "getRepo" o = SysrootGetRepoMethodInfo
ResolveSysrootMethod "getStagedDeployment" o = SysrootGetStagedDeploymentMethodInfo
ResolveSysrootMethod "getSubbootversion" o = SysrootGetSubbootversionMethodInfo
ResolveSysrootMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSysrootMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSysrootMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSysrootMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSysrootMethod t Sysroot, O.MethodInfo info Sysroot p) => OL.IsLabel t (Sysroot -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type SysrootJournalMsgCallback =
T.Text
-> IO ()
noSysrootJournalMsgCallback :: Maybe SysrootJournalMsgCallback
noSysrootJournalMsgCallback :: Maybe SysrootJournalMsgCallback
noSysrootJournalMsgCallback = Maybe SysrootJournalMsgCallback
forall a. Maybe a
Nothing
type C_SysrootJournalMsgCallback =
Ptr () ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_SysrootJournalMsgCallback :: C_SysrootJournalMsgCallback -> IO (FunPtr C_SysrootJournalMsgCallback)
genClosure_SysrootJournalMsg :: MonadIO m => SysrootJournalMsgCallback -> m (GClosure C_SysrootJournalMsgCallback)
genClosure_SysrootJournalMsg :: SysrootJournalMsgCallback
-> m (GClosure C_SysrootJournalMsgCallback)
genClosure_SysrootJournalMsg cb :: SysrootJournalMsgCallback
cb = IO (GClosure C_SysrootJournalMsgCallback)
-> m (GClosure C_SysrootJournalMsgCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SysrootJournalMsgCallback)
-> m (GClosure C_SysrootJournalMsgCallback))
-> IO (GClosure C_SysrootJournalMsgCallback)
-> m (GClosure C_SysrootJournalMsgCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SysrootJournalMsgCallback
cb' = SysrootJournalMsgCallback -> C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback SysrootJournalMsgCallback
cb
C_SysrootJournalMsgCallback
-> IO (FunPtr C_SysrootJournalMsgCallback)
mk_SysrootJournalMsgCallback C_SysrootJournalMsgCallback
cb' IO (FunPtr C_SysrootJournalMsgCallback)
-> (FunPtr C_SysrootJournalMsgCallback
-> IO (GClosure C_SysrootJournalMsgCallback))
-> IO (GClosure C_SysrootJournalMsgCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SysrootJournalMsgCallback
-> IO (GClosure C_SysrootJournalMsgCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SysrootJournalMsgCallback ::
SysrootJournalMsgCallback ->
C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback :: SysrootJournalMsgCallback -> C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback _cb :: SysrootJournalMsgCallback
_cb _ msg :: CString
msg _ = do
Text
msg' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
msg
SysrootJournalMsgCallback
_cb Text
msg'
onSysrootJournalMsg :: (IsSysroot a, MonadIO m) => a -> SysrootJournalMsgCallback -> m SignalHandlerId
onSysrootJournalMsg :: a -> SysrootJournalMsgCallback -> m SignalHandlerId
onSysrootJournalMsg obj :: a
obj cb :: SysrootJournalMsgCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SysrootJournalMsgCallback
cb' = SysrootJournalMsgCallback -> C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback SysrootJournalMsgCallback
cb
FunPtr C_SysrootJournalMsgCallback
cb'' <- C_SysrootJournalMsgCallback
-> IO (FunPtr C_SysrootJournalMsgCallback)
mk_SysrootJournalMsgCallback C_SysrootJournalMsgCallback
cb'
a
-> Text
-> FunPtr C_SysrootJournalMsgCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "journal-msg" FunPtr C_SysrootJournalMsgCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterSysrootJournalMsg :: (IsSysroot a, MonadIO m) => a -> SysrootJournalMsgCallback -> m SignalHandlerId
afterSysrootJournalMsg :: a -> SysrootJournalMsgCallback -> m SignalHandlerId
afterSysrootJournalMsg obj :: a
obj cb :: SysrootJournalMsgCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SysrootJournalMsgCallback
cb' = SysrootJournalMsgCallback -> C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback SysrootJournalMsgCallback
cb
FunPtr C_SysrootJournalMsgCallback
cb'' <- C_SysrootJournalMsgCallback
-> IO (FunPtr C_SysrootJournalMsgCallback)
mk_SysrootJournalMsgCallback C_SysrootJournalMsgCallback
cb'
a
-> Text
-> FunPtr C_SysrootJournalMsgCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "journal-msg" FunPtr C_SysrootJournalMsgCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data SysrootJournalMsgSignalInfo
instance SignalInfo SysrootJournalMsgSignalInfo where
type HaskellCallbackType SysrootJournalMsgSignalInfo = SysrootJournalMsgCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SysrootJournalMsgCallback cb
cb'' <- mk_SysrootJournalMsgCallback cb'
connectSignalFunPtr obj "journal-msg" cb'' connectMode detail
#endif
getSysrootPath :: (MonadIO m, IsSysroot o) => o -> m Gio.File.File
getSysrootPath :: o -> m File
getSysrootPath obj :: o
obj = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe File) -> IO File
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getSysrootPath" (IO (Maybe File) -> IO File) -> IO (Maybe File) -> IO File
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "path" ManagedPtr File -> File
Gio.File.File
constructSysrootPath :: (IsSysroot o, Gio.File.IsFile a) => a -> IO (GValueConstruct o)
constructSysrootPath :: a -> IO (GValueConstruct o)
constructSysrootPath val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "path" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
#if defined(ENABLE_OVERLOADING)
data SysrootPathPropertyInfo
instance AttrInfo SysrootPathPropertyInfo where
type AttrAllowedOps SysrootPathPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SysrootPathPropertyInfo = IsSysroot
type AttrSetTypeConstraint SysrootPathPropertyInfo = Gio.File.IsFile
type AttrTransferTypeConstraint SysrootPathPropertyInfo = Gio.File.IsFile
type AttrTransferType SysrootPathPropertyInfo = Gio.File.File
type AttrGetType SysrootPathPropertyInfo = Gio.File.File
type AttrLabel SysrootPathPropertyInfo = "path"
type AttrOrigin SysrootPathPropertyInfo = Sysroot
attrGet = getSysrootPath
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gio.File.File v
attrConstruct = constructSysrootPath
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Sysroot
type instance O.AttributeList Sysroot = SysrootAttributeList
type SysrootAttributeList = ('[ '("path", SysrootPathPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
sysrootPath :: AttrLabelProxy "path"
sysrootPath = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Sysroot = SysrootSignalList
type SysrootSignalList = ('[ '("journalMsg", SysrootJournalMsgSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "ostree_sysroot_new" ostree_sysroot_new ::
Ptr Gio.File.File ->
IO (Ptr Sysroot)
sysrootNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
Maybe (a)
-> m Sysroot
sysrootNew :: Maybe a -> m Sysroot
sysrootNew path :: Maybe a
path = IO Sysroot -> m Sysroot
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sysroot -> m Sysroot) -> IO Sysroot -> m Sysroot
forall a b. (a -> b) -> a -> b
$ do
Ptr File
maybePath <- case Maybe a
path of
Nothing -> Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
Just jPath :: a
jPath -> do
Ptr File
jPath' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jPath
Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jPath'
Ptr Sysroot
result <- Ptr File -> IO (Ptr Sysroot)
ostree_sysroot_new Ptr File
maybePath
Text -> Ptr Sysroot -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootNew" Ptr Sysroot
result
Sysroot
result' <- ((ManagedPtr Sysroot -> Sysroot) -> Ptr Sysroot -> IO Sysroot
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Sysroot -> Sysroot
Sysroot) Ptr Sysroot
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
path a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Sysroot -> IO Sysroot
forall (m :: * -> *) a. Monad m => a -> m a
return Sysroot
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_sysroot_new_default" ostree_sysroot_new_default ::
IO (Ptr Sysroot)
sysrootNewDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Sysroot
sysrootNewDefault :: m Sysroot
sysrootNewDefault = IO Sysroot -> m Sysroot
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sysroot -> m Sysroot) -> IO Sysroot -> m Sysroot
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
result <- IO (Ptr Sysroot)
ostree_sysroot_new_default
Text -> Ptr Sysroot -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootNewDefault" Ptr Sysroot
result
Sysroot
result' <- ((ManagedPtr Sysroot -> Sysroot) -> Ptr Sysroot -> IO Sysroot
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Sysroot -> Sysroot
Sysroot) Ptr Sysroot
result
Sysroot -> IO Sysroot
forall (m :: * -> *) a. Monad m => a -> m a
return Sysroot
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_sysroot_cleanup" ostree_sysroot_cleanup ::
Ptr Sysroot ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootCleanup ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
sysrootCleanup :: a -> Maybe b -> m ()
sysrootCleanup self :: a
self cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_cleanup Ptr Sysroot
self' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootCleanupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootCleanupMethodInfo a signature where
overloadedMethod = sysrootCleanup
#endif
foreign import ccall "ostree_sysroot_cleanup_prune_repo" ostree_sysroot_cleanup_prune_repo ::
Ptr Sysroot ->
Ptr OSTree.RepoPruneOptions.RepoPruneOptions ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootCleanupPruneRepo ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> OSTree.RepoPruneOptions.RepoPruneOptions
-> Maybe (b)
-> m ((Int32, Int32, Word64))
sysrootCleanupPruneRepo :: a -> RepoPruneOptions -> Maybe b -> m (Int32, Int32, Word64)
sysrootCleanupPruneRepo sysroot :: a
sysroot options :: RepoPruneOptions
options cancellable :: Maybe b
cancellable = IO (Int32, Int32, Word64) -> m (Int32, Int32, Word64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Word64) -> m (Int32, Int32, Word64))
-> IO (Int32, Int32, Word64) -> m (Int32, Int32, Word64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
sysroot' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sysroot
Ptr RepoPruneOptions
options' <- RepoPruneOptions -> IO (Ptr RepoPruneOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoPruneOptions
options
Ptr Int32
outObjectsTotal <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
outObjectsPruned <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Word64
outPrunedObjectSizeTotal <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO (Int32, Int32, Word64) -> IO () -> IO (Int32, Int32, Word64)
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr RepoPruneOptions
-> Ptr Int32
-> Ptr Int32
-> Ptr Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_cleanup_prune_repo Ptr Sysroot
sysroot' Ptr RepoPruneOptions
options' Ptr Int32
outObjectsTotal Ptr Int32
outObjectsPruned Ptr Word64
outPrunedObjectSizeTotal Ptr Cancellable
maybeCancellable
Int32
outObjectsTotal' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
outObjectsTotal
Int32
outObjectsPruned' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
outObjectsPruned
Word64
outPrunedObjectSizeTotal' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
outPrunedObjectSizeTotal
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sysroot
RepoPruneOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RepoPruneOptions
options
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsTotal
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsPruned
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outPrunedObjectSizeTotal
(Int32, Int32, Word64) -> IO (Int32, Int32, Word64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
outObjectsTotal', Int32
outObjectsPruned', Word64
outPrunedObjectSizeTotal')
) (do
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsTotal
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
outObjectsPruned
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
outPrunedObjectSizeTotal
)
#if defined(ENABLE_OVERLOADING)
data SysrootCleanupPruneRepoMethodInfo
instance (signature ~ (OSTree.RepoPruneOptions.RepoPruneOptions -> Maybe (b) -> m ((Int32, Int32, Word64))), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootCleanupPruneRepoMethodInfo a signature where
overloadedMethod = sysrootCleanupPruneRepo
#endif
foreign import ccall "ostree_sysroot_deploy_tree" ostree_sysroot_deploy_tree ::
Ptr Sysroot ->
CString ->
CString ->
Ptr GLib.KeyFile.KeyFile ->
Ptr OSTree.Deployment.Deployment ->
Ptr CString ->
Ptr (Ptr OSTree.Deployment.Deployment) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeployTree ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> T.Text
-> Maybe (GLib.KeyFile.KeyFile)
-> Maybe (b)
-> Maybe ([T.Text])
-> Maybe (c)
-> m (OSTree.Deployment.Deployment)
sysrootDeployTree :: a
-> Maybe Text
-> Text
-> Maybe KeyFile
-> Maybe b
-> Maybe [Text]
-> Maybe c
-> m Deployment
sysrootDeployTree self :: a
self osname :: Maybe Text
osname revision :: Text
revision origin :: Maybe KeyFile
origin providedMergeDeployment :: Maybe b
providedMergeDeployment overrideKernelArgv :: Maybe [Text]
overrideKernelArgv cancellable :: Maybe c
cancellable = IO Deployment -> m Deployment
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Deployment -> m Deployment) -> IO Deployment -> m Deployment
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeOsname <- case Maybe Text
osname of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jOsname :: Text
jOsname -> do
CString
jOsname' <- Text -> IO CString
textToCString Text
jOsname
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jOsname'
CString
revision' <- Text -> IO CString
textToCString Text
revision
Ptr KeyFile
maybeOrigin <- case Maybe KeyFile
origin of
Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
nullPtr
Just jOrigin :: KeyFile
jOrigin -> do
Ptr KeyFile
jOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jOrigin
Ptr KeyFile -> IO (Ptr KeyFile)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
jOrigin'
Ptr Deployment
maybeProvidedMergeDeployment <- case Maybe b
providedMergeDeployment of
Nothing -> Ptr Deployment -> IO (Ptr Deployment)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
forall a. Ptr a
nullPtr
Just jProvidedMergeDeployment :: b
jProvidedMergeDeployment -> do
Ptr Deployment
jProvidedMergeDeployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProvidedMergeDeployment
Ptr Deployment -> IO (Ptr Deployment)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
jProvidedMergeDeployment'
Ptr CString
maybeOverrideKernelArgv <- case Maybe [Text]
overrideKernelArgv of
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just jOverrideKernelArgv :: [Text]
jOverrideKernelArgv -> do
Ptr CString
jOverrideKernelArgv' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jOverrideKernelArgv
Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jOverrideKernelArgv'
Ptr (Ptr Deployment)
outNewDeployment <- IO (Ptr (Ptr Deployment))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO Deployment -> IO () -> IO Deployment
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> CString
-> CString
-> Ptr KeyFile
-> Ptr Deployment
-> Ptr CString
-> Ptr (Ptr Deployment)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_deploy_tree Ptr Sysroot
self' CString
maybeOsname CString
revision' Ptr KeyFile
maybeOrigin Ptr Deployment
maybeProvidedMergeDeployment Ptr CString
maybeOverrideKernelArgv Ptr (Ptr Deployment)
outNewDeployment Ptr Cancellable
maybeCancellable
Ptr Deployment
outNewDeployment' <- Ptr (Ptr Deployment) -> IO (Ptr Deployment)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Deployment)
outNewDeployment
Deployment
outNewDeployment'' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Deployment -> Deployment
OSTree.Deployment.Deployment) Ptr Deployment
outNewDeployment'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe KeyFile -> (KeyFile -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe KeyFile
origin KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
providedMergeDeployment b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeOsname
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
revision'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOverrideKernelArgv
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOverrideKernelArgv
Ptr (Ptr Deployment) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Deployment)
outNewDeployment
Deployment -> IO Deployment
forall (m :: * -> *) a. Monad m => a -> m a
return Deployment
outNewDeployment''
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeOsname
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
revision'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOverrideKernelArgv
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOverrideKernelArgv
Ptr (Ptr Deployment) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Deployment)
outNewDeployment
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeployTreeMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> Maybe (GLib.KeyFile.KeyFile) -> Maybe (b) -> Maybe ([T.Text]) -> Maybe (c) -> m (OSTree.Deployment.Deployment)), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.MethodInfo SysrootDeployTreeMethodInfo a signature where
overloadedMethod = sysrootDeployTree
#endif
foreign import ccall "ostree_sysroot_deployment_set_kargs" ostree_sysroot_deployment_set_kargs ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
Ptr CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeploymentSetKargs ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> [T.Text]
-> Maybe (c)
-> m ()
sysrootDeploymentSetKargs :: a -> b -> [Text] -> Maybe c -> m ()
sysrootDeploymentSetKargs self :: a
self deployment :: b
deployment newKargs :: [Text]
newKargs cancellable :: Maybe c
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Deployment
deployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
deployment
Ptr CString
newKargs' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
newKargs
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr Deployment
-> Ptr CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_deployment_set_kargs Ptr Sysroot
self' Ptr Deployment
deployment' Ptr CString
newKargs' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
deployment
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
newKargs'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
newKargs'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
newKargs'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
newKargs'
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentSetKargsMethodInfo
instance (signature ~ (b -> [T.Text] -> Maybe (c) -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.MethodInfo SysrootDeploymentSetKargsMethodInfo a signature where
overloadedMethod = sysrootDeploymentSetKargs
#endif
foreign import ccall "ostree_sysroot_deployment_set_mutable" ostree_sysroot_deployment_set_mutable ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeploymentSetMutable ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Bool
-> Maybe (c)
-> m ()
sysrootDeploymentSetMutable :: a -> b -> Bool -> Maybe c -> m ()
sysrootDeploymentSetMutable self :: a
self deployment :: b
deployment isMutable :: Bool
isMutable cancellable :: Maybe c
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Deployment
deployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
deployment
let isMutable' :: CInt
isMutable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
isMutable
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr Deployment
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_deployment_set_mutable Ptr Sysroot
self' Ptr Deployment
deployment' CInt
isMutable' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
deployment
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentSetMutableMethodInfo
instance (signature ~ (b -> Bool -> Maybe (c) -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.MethodInfo SysrootDeploymentSetMutableMethodInfo a signature where
overloadedMethod = sysrootDeploymentSetMutable
#endif
foreign import ccall "ostree_sysroot_deployment_set_pinned" ostree_sysroot_deployment_set_pinned ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
CInt ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeploymentSetPinned ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) =>
a
-> b
-> Bool
-> m ()
sysrootDeploymentSetPinned :: a -> b -> Bool -> m ()
sysrootDeploymentSetPinned self :: a
self deployment :: b
deployment isPinned :: Bool
isPinned = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Deployment
deployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
deployment
let isPinned' :: CInt
isPinned' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
isPinned
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr Deployment -> CInt -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_deployment_set_pinned Ptr Sysroot
self' Ptr Deployment
deployment' CInt
isPinned'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
deployment
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentSetPinnedMethodInfo
instance (signature ~ (b -> Bool -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) => O.MethodInfo SysrootDeploymentSetPinnedMethodInfo a signature where
overloadedMethod = sysrootDeploymentSetPinned
#endif
foreign import ccall "ostree_sysroot_deployment_unlock" ostree_sysroot_deployment_unlock ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeploymentUnlock ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> OSTree.Enums.DeploymentUnlockedState
-> Maybe (c)
-> m ()
sysrootDeploymentUnlock :: a -> b -> DeploymentUnlockedState -> Maybe c -> m ()
sysrootDeploymentUnlock self :: a
self deployment :: b
deployment unlockedState :: DeploymentUnlockedState
unlockedState cancellable :: Maybe c
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Deployment
deployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
deployment
let unlockedState' :: CUInt
unlockedState' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (DeploymentUnlockedState -> Int)
-> DeploymentUnlockedState
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DeploymentUnlockedState -> Int
forall a. Enum a => a -> Int
fromEnum) DeploymentUnlockedState
unlockedState
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr Deployment
-> CUInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_deployment_unlock Ptr Sysroot
self' Ptr Deployment
deployment' CUInt
unlockedState' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
deployment
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentUnlockMethodInfo
instance (signature ~ (b -> OSTree.Enums.DeploymentUnlockedState -> Maybe (c) -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.MethodInfo SysrootDeploymentUnlockMethodInfo a signature where
overloadedMethod = sysrootDeploymentUnlock
#endif
foreign import ccall "ostree_sysroot_ensure_initialized" ostree_sysroot_ensure_initialized ::
Ptr Sysroot ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootEnsureInitialized ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
sysrootEnsureInitialized :: a -> Maybe b -> m ()
sysrootEnsureInitialized self :: a
self cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_ensure_initialized Ptr Sysroot
self' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootEnsureInitializedMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootEnsureInitializedMethodInfo a signature where
overloadedMethod = sysrootEnsureInitialized
#endif
foreign import ccall "ostree_sysroot_get_booted_deployment" ostree_sysroot_get_booted_deployment ::
Ptr Sysroot ->
IO (Ptr OSTree.Deployment.Deployment)
sysrootGetBootedDeployment ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m OSTree.Deployment.Deployment
sysrootGetBootedDeployment :: a -> m Deployment
sysrootGetBootedDeployment self :: a
self = IO Deployment -> m Deployment
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Deployment -> m Deployment) -> IO Deployment -> m Deployment
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Deployment
result <- Ptr Sysroot -> IO (Ptr Deployment)
ostree_sysroot_get_booted_deployment Ptr Sysroot
self'
Text -> Ptr Deployment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootGetBootedDeployment" Ptr Deployment
result
Deployment
result' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Deployment -> Deployment
OSTree.Deployment.Deployment) Ptr Deployment
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Deployment -> IO Deployment
forall (m :: * -> *) a. Monad m => a -> m a
return Deployment
result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetBootedDeploymentMethodInfo
instance (signature ~ (m OSTree.Deployment.Deployment), MonadIO m, IsSysroot a) => O.MethodInfo SysrootGetBootedDeploymentMethodInfo a signature where
overloadedMethod = sysrootGetBootedDeployment
#endif
foreign import ccall "ostree_sysroot_get_bootversion" ostree_sysroot_get_bootversion ::
Ptr Sysroot ->
IO Int32
sysrootGetBootversion ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m Int32
sysrootGetBootversion :: a -> m Int32
sysrootGetBootversion self :: a
self = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Int32
result <- Ptr Sysroot -> IO Int32
ostree_sysroot_get_bootversion Ptr Sysroot
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data SysrootGetBootversionMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSysroot a) => O.MethodInfo SysrootGetBootversionMethodInfo a signature where
overloadedMethod = sysrootGetBootversion
#endif
foreign import ccall "ostree_sysroot_get_deployment_directory" ostree_sysroot_get_deployment_directory ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
IO (Ptr Gio.File.File)
sysrootGetDeploymentDirectory ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) =>
a
-> b
-> m Gio.File.File
sysrootGetDeploymentDirectory :: a -> b -> m File
sysrootGetDeploymentDirectory self :: a
self deployment :: b
deployment = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Deployment
deployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
deployment
Ptr File
result <- Ptr Sysroot -> Ptr Deployment -> IO (Ptr File)
ostree_sysroot_get_deployment_directory Ptr Sysroot
self' Ptr Deployment
deployment'
Text -> Ptr File -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootGetDeploymentDirectory" Ptr File
result
File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
deployment
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetDeploymentDirectoryMethodInfo
instance (signature ~ (b -> m Gio.File.File), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) => O.MethodInfo SysrootGetDeploymentDirectoryMethodInfo a signature where
overloadedMethod = sysrootGetDeploymentDirectory
#endif
foreign import ccall "ostree_sysroot_get_deployment_dirpath" ostree_sysroot_get_deployment_dirpath ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
IO CString
sysrootGetDeploymentDirpath ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) =>
a
-> b
-> m T.Text
sysrootGetDeploymentDirpath :: a -> b -> m Text
sysrootGetDeploymentDirpath self :: a
self deployment :: b
deployment = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Deployment
deployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
deployment
CString
result <- Ptr Sysroot -> Ptr Deployment -> IO CString
ostree_sysroot_get_deployment_dirpath Ptr Sysroot
self' Ptr Deployment
deployment'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootGetDeploymentDirpath" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
deployment
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetDeploymentDirpathMethodInfo
instance (signature ~ (b -> m T.Text), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) => O.MethodInfo SysrootGetDeploymentDirpathMethodInfo a signature where
overloadedMethod = sysrootGetDeploymentDirpath
#endif
foreign import ccall "ostree_sysroot_get_deployments" ostree_sysroot_get_deployments ::
Ptr Sysroot ->
IO (Ptr (GPtrArray (Ptr OSTree.Deployment.Deployment)))
sysrootGetDeployments ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m [OSTree.Deployment.Deployment]
sysrootGetDeployments :: a -> m [Deployment]
sysrootGetDeployments self :: a
self = IO [Deployment] -> m [Deployment]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Deployment] -> m [Deployment])
-> IO [Deployment] -> m [Deployment]
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr (GPtrArray (Ptr Deployment))
result <- Ptr Sysroot -> IO (Ptr (GPtrArray (Ptr Deployment)))
ostree_sysroot_get_deployments Ptr Sysroot
self'
Text -> Ptr (GPtrArray (Ptr Deployment)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootGetDeployments" Ptr (GPtrArray (Ptr Deployment))
result
[Ptr Deployment]
result' <- Ptr (GPtrArray (Ptr Deployment)) -> IO [Ptr Deployment]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr Deployment))
result
[Deployment]
result'' <- (Ptr Deployment -> IO Deployment)
-> [Ptr Deployment] -> IO [Deployment]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Deployment -> Deployment
OSTree.Deployment.Deployment) [Ptr Deployment]
result'
Ptr (GPtrArray (Ptr Deployment)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Deployment))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
[Deployment] -> IO [Deployment]
forall (m :: * -> *) a. Monad m => a -> m a
return [Deployment]
result''
#if defined(ENABLE_OVERLOADING)
data SysrootGetDeploymentsMethodInfo
instance (signature ~ (m [OSTree.Deployment.Deployment]), MonadIO m, IsSysroot a) => O.MethodInfo SysrootGetDeploymentsMethodInfo a signature where
overloadedMethod = sysrootGetDeployments
#endif
foreign import ccall "ostree_sysroot_get_fd" ostree_sysroot_get_fd ::
Ptr Sysroot ->
IO Int32
sysrootGetFd ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m Int32
sysrootGetFd :: a -> m Int32
sysrootGetFd self :: a
self = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Int32
result <- Ptr Sysroot -> IO Int32
ostree_sysroot_get_fd Ptr Sysroot
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data SysrootGetFdMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSysroot a) => O.MethodInfo SysrootGetFdMethodInfo a signature where
overloadedMethod = sysrootGetFd
#endif
foreign import ccall "ostree_sysroot_get_merge_deployment" ostree_sysroot_get_merge_deployment ::
Ptr Sysroot ->
CString ->
IO (Ptr OSTree.Deployment.Deployment)
sysrootGetMergeDeployment ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> Maybe (T.Text)
-> m OSTree.Deployment.Deployment
sysrootGetMergeDeployment :: a -> Maybe Text -> m Deployment
sysrootGetMergeDeployment self :: a
self osname :: Maybe Text
osname = IO Deployment -> m Deployment
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Deployment -> m Deployment) -> IO Deployment -> m Deployment
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeOsname <- case Maybe Text
osname of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jOsname :: Text
jOsname -> do
CString
jOsname' <- Text -> IO CString
textToCString Text
jOsname
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jOsname'
Ptr Deployment
result <- Ptr Sysroot -> CString -> IO (Ptr Deployment)
ostree_sysroot_get_merge_deployment Ptr Sysroot
self' CString
maybeOsname
Text -> Ptr Deployment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootGetMergeDeployment" Ptr Deployment
result
Deployment
result' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Deployment -> Deployment
OSTree.Deployment.Deployment) Ptr Deployment
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeOsname
Deployment -> IO Deployment
forall (m :: * -> *) a. Monad m => a -> m a
return Deployment
result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetMergeDeploymentMethodInfo
instance (signature ~ (Maybe (T.Text) -> m OSTree.Deployment.Deployment), MonadIO m, IsSysroot a) => O.MethodInfo SysrootGetMergeDeploymentMethodInfo a signature where
overloadedMethod = sysrootGetMergeDeployment
#endif
foreign import ccall "ostree_sysroot_get_path" ostree_sysroot_get_path ::
Ptr Sysroot ->
IO (Ptr Gio.File.File)
sysrootGetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m Gio.File.File
sysrootGetPath :: a -> m File
sysrootGetPath self :: a
self = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
result <- Ptr Sysroot -> IO (Ptr File)
ostree_sysroot_get_path Ptr Sysroot
self'
Text -> Ptr File -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootGetPath" Ptr File
result
File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetPathMethodInfo
instance (signature ~ (m Gio.File.File), MonadIO m, IsSysroot a) => O.MethodInfo SysrootGetPathMethodInfo a signature where
overloadedMethod = sysrootGetPath
#endif
foreign import ccall "ostree_sysroot_get_repo" ostree_sysroot_get_repo ::
Ptr Sysroot ->
Ptr (Ptr OSTree.Repo.Repo) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootGetRepo ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m (OSTree.Repo.Repo)
sysrootGetRepo :: a -> Maybe b -> m Repo
sysrootGetRepo self :: a
self cancellable :: Maybe b
cancellable = IO Repo -> m Repo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr (Ptr Repo)
outRepo <- IO (Ptr (Ptr Repo))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr OSTree.Repo.Repo))
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO Repo -> IO () -> IO Repo
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr (Ptr Repo) -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_get_repo Ptr Sysroot
self' Ptr (Ptr Repo)
outRepo Ptr Cancellable
maybeCancellable
Ptr Repo
outRepo' <- Ptr (Ptr Repo) -> IO (Ptr Repo)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Repo)
outRepo
Repo
outRepo'' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Repo -> Repo
OSTree.Repo.Repo) Ptr Repo
outRepo'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr (Ptr Repo) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Repo)
outRepo
Repo -> IO Repo
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
outRepo''
) (do
Ptr (Ptr Repo) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Repo)
outRepo
)
#if defined(ENABLE_OVERLOADING)
data SysrootGetRepoMethodInfo
instance (signature ~ (Maybe (b) -> m (OSTree.Repo.Repo)), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootGetRepoMethodInfo a signature where
overloadedMethod = sysrootGetRepo
#endif
foreign import ccall "ostree_sysroot_get_staged_deployment" ostree_sysroot_get_staged_deployment ::
Ptr Sysroot ->
IO (Ptr OSTree.Deployment.Deployment)
sysrootGetStagedDeployment ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m OSTree.Deployment.Deployment
sysrootGetStagedDeployment :: a -> m Deployment
sysrootGetStagedDeployment self :: a
self = IO Deployment -> m Deployment
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Deployment -> m Deployment) -> IO Deployment -> m Deployment
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Deployment
result <- Ptr Sysroot -> IO (Ptr Deployment)
ostree_sysroot_get_staged_deployment Ptr Sysroot
self'
Text -> Ptr Deployment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootGetStagedDeployment" Ptr Deployment
result
Deployment
result' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Deployment -> Deployment
OSTree.Deployment.Deployment) Ptr Deployment
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Deployment -> IO Deployment
forall (m :: * -> *) a. Monad m => a -> m a
return Deployment
result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetStagedDeploymentMethodInfo
instance (signature ~ (m OSTree.Deployment.Deployment), MonadIO m, IsSysroot a) => O.MethodInfo SysrootGetStagedDeploymentMethodInfo a signature where
overloadedMethod = sysrootGetStagedDeployment
#endif
foreign import ccall "ostree_sysroot_get_subbootversion" ostree_sysroot_get_subbootversion ::
Ptr Sysroot ->
IO Int32
sysrootGetSubbootversion ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m Int32
sysrootGetSubbootversion :: a -> m Int32
sysrootGetSubbootversion self :: a
self = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Int32
result <- Ptr Sysroot -> IO Int32
ostree_sysroot_get_subbootversion Ptr Sysroot
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data SysrootGetSubbootversionMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSysroot a) => O.MethodInfo SysrootGetSubbootversionMethodInfo a signature where
overloadedMethod = sysrootGetSubbootversion
#endif
foreign import ccall "ostree_sysroot_init_osname" ostree_sysroot_init_osname ::
Ptr Sysroot ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootInitOsname ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m ()
sysrootInitOsname :: a -> Text -> Maybe b -> m ()
sysrootInitOsname self :: a
self osname :: Text
osname cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
osname' <- Text -> IO CString
textToCString Text
osname
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> CString -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_init_osname Ptr Sysroot
self' CString
osname' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
osname'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
osname'
)
#if defined(ENABLE_OVERLOADING)
data SysrootInitOsnameMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootInitOsnameMethodInfo a signature where
overloadedMethod = sysrootInitOsname
#endif
foreign import ccall "ostree_sysroot_load" ostree_sysroot_load ::
Ptr Sysroot ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootLoad ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
sysrootLoad :: a -> Maybe b -> m ()
sysrootLoad self :: a
self cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_load Ptr Sysroot
self' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootLoadMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootLoadMethodInfo a signature where
overloadedMethod = sysrootLoad
#endif
foreign import ccall "ostree_sysroot_load_if_changed" ostree_sysroot_load_if_changed ::
Ptr Sysroot ->
CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootLoadIfChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Bool
-> Maybe (b)
-> m ()
sysrootLoadIfChanged :: a -> Bool -> Maybe b -> m ()
sysrootLoadIfChanged self :: a
self outChanged :: Bool
outChanged cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let outChanged' :: CInt
outChanged' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
outChanged
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> CInt -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_load_if_changed Ptr Sysroot
self' CInt
outChanged' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootLoadIfChangedMethodInfo
instance (signature ~ (Bool -> Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootLoadIfChangedMethodInfo a signature where
overloadedMethod = sysrootLoadIfChanged
#endif
foreign import ccall "ostree_sysroot_lock" ostree_sysroot_lock ::
Ptr Sysroot ->
Ptr (Ptr GError) ->
IO CInt
sysrootLock ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m ()
sysrootLock :: a -> m ()
sysrootLock self :: a
self = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_lock Ptr Sysroot
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootLockMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSysroot a) => O.MethodInfo SysrootLockMethodInfo a signature where
overloadedMethod = sysrootLock
#endif
foreign import ccall "ostree_sysroot_lock_async" ostree_sysroot_lock_async ::
Ptr Sysroot ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
sysrootLockAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
sysrootLockAsync :: a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
sysrootLockAsync self :: a
self cancellable :: Maybe b
cancellable callback :: Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
Just jCallback :: AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Sysroot
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
ostree_sysroot_lock_async Ptr Sysroot
self' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SysrootLockAsyncMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootLockAsyncMethodInfo a signature where
overloadedMethod = sysrootLockAsync
#endif
foreign import ccall "ostree_sysroot_lock_finish" ostree_sysroot_lock_finish ::
Ptr Sysroot ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
sysrootLockFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
sysrootLockFinish :: a -> b -> m ()
sysrootLockFinish self :: a
self result_ :: b
result_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_lock_finish Ptr Sysroot
self' Ptr AsyncResult
result_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootLockFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSysroot a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo SysrootLockFinishMethodInfo a signature where
overloadedMethod = sysrootLockFinish
#endif
foreign import ccall "ostree_sysroot_origin_new_from_refspec" ostree_sysroot_origin_new_from_refspec ::
Ptr Sysroot ->
CString ->
IO (Ptr GLib.KeyFile.KeyFile)
sysrootOriginNewFromRefspec ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> T.Text
-> m GLib.KeyFile.KeyFile
sysrootOriginNewFromRefspec :: a -> Text -> m KeyFile
sysrootOriginNewFromRefspec self :: a
self refspec :: Text
refspec = IO KeyFile -> m KeyFile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO KeyFile -> m KeyFile) -> IO KeyFile -> m KeyFile
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
refspec' <- Text -> IO CString
textToCString Text
refspec
Ptr KeyFile
result <- Ptr Sysroot -> CString -> IO (Ptr KeyFile)
ostree_sysroot_origin_new_from_refspec Ptr Sysroot
self' CString
refspec'
Text -> Ptr KeyFile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootOriginNewFromRefspec" Ptr KeyFile
result
KeyFile
result' <- ((ManagedPtr KeyFile -> KeyFile) -> Ptr KeyFile -> IO KeyFile
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr KeyFile -> KeyFile
GLib.KeyFile.KeyFile) Ptr KeyFile
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
refspec'
KeyFile -> IO KeyFile
forall (m :: * -> *) a. Monad m => a -> m a
return KeyFile
result'
#if defined(ENABLE_OVERLOADING)
data SysrootOriginNewFromRefspecMethodInfo
instance (signature ~ (T.Text -> m GLib.KeyFile.KeyFile), MonadIO m, IsSysroot a) => O.MethodInfo SysrootOriginNewFromRefspecMethodInfo a signature where
overloadedMethod = sysrootOriginNewFromRefspec
#endif
foreign import ccall "ostree_sysroot_prepare_cleanup" ostree_sysroot_prepare_cleanup ::
Ptr Sysroot ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootPrepareCleanup ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
sysrootPrepareCleanup :: a -> Maybe b -> m ()
sysrootPrepareCleanup self :: a
self cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_prepare_cleanup Ptr Sysroot
self' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootPrepareCleanupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootPrepareCleanupMethodInfo a signature where
overloadedMethod = sysrootPrepareCleanup
#endif
foreign import ccall "ostree_sysroot_query_deployments_for" ostree_sysroot_query_deployments_for ::
Ptr Sysroot ->
CString ->
Ptr (Ptr OSTree.Deployment.Deployment) ->
Ptr (Ptr OSTree.Deployment.Deployment) ->
IO ()
sysrootQueryDeploymentsFor ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> Maybe (T.Text)
-> m ((OSTree.Deployment.Deployment, OSTree.Deployment.Deployment))
sysrootQueryDeploymentsFor :: a -> Maybe Text -> m (Deployment, Deployment)
sysrootQueryDeploymentsFor self :: a
self osname :: Maybe Text
osname = IO (Deployment, Deployment) -> m (Deployment, Deployment)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Deployment, Deployment) -> m (Deployment, Deployment))
-> IO (Deployment, Deployment) -> m (Deployment, Deployment)
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeOsname <- case Maybe Text
osname of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jOsname :: Text
jOsname -> do
CString
jOsname' <- Text -> IO CString
textToCString Text
jOsname
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jOsname'
Ptr (Ptr Deployment)
outPending <- IO (Ptr (Ptr Deployment))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
Ptr (Ptr Deployment)
outRollback <- IO (Ptr (Ptr Deployment))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
Ptr Sysroot
-> CString -> Ptr (Ptr Deployment) -> Ptr (Ptr Deployment) -> IO ()
ostree_sysroot_query_deployments_for Ptr Sysroot
self' CString
maybeOsname Ptr (Ptr Deployment)
outPending Ptr (Ptr Deployment)
outRollback
Ptr Deployment
outPending' <- Ptr (Ptr Deployment) -> IO (Ptr Deployment)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Deployment)
outPending
Deployment
outPending'' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Deployment -> Deployment
OSTree.Deployment.Deployment) Ptr Deployment
outPending'
Ptr Deployment
outRollback' <- Ptr (Ptr Deployment) -> IO (Ptr Deployment)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Deployment)
outRollback
Deployment
outRollback'' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Deployment -> Deployment
OSTree.Deployment.Deployment) Ptr Deployment
outRollback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeOsname
Ptr (Ptr Deployment) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Deployment)
outPending
Ptr (Ptr Deployment) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Deployment)
outRollback
(Deployment, Deployment) -> IO (Deployment, Deployment)
forall (m :: * -> *) a. Monad m => a -> m a
return (Deployment
outPending'', Deployment
outRollback'')
#if defined(ENABLE_OVERLOADING)
data SysrootQueryDeploymentsForMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ((OSTree.Deployment.Deployment, OSTree.Deployment.Deployment))), MonadIO m, IsSysroot a) => O.MethodInfo SysrootQueryDeploymentsForMethodInfo a signature where
overloadedMethod = sysrootQueryDeploymentsFor
#endif
foreign import ccall "ostree_sysroot_repo" ostree_sysroot_repo ::
Ptr Sysroot ->
IO (Ptr OSTree.Repo.Repo)
sysrootRepo ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m OSTree.Repo.Repo
sysrootRepo :: a -> m Repo
sysrootRepo self :: a
self = IO Repo -> m Repo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Repo
result <- Ptr Sysroot -> IO (Ptr Repo)
ostree_sysroot_repo Ptr Sysroot
self'
Text -> Ptr Repo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootRepo" Ptr Repo
result
Repo
result' <- ((ManagedPtr Repo -> Repo) -> Ptr Repo -> IO Repo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Repo -> Repo
OSTree.Repo.Repo) Ptr Repo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Repo -> IO Repo
forall (m :: * -> *) a. Monad m => a -> m a
return Repo
result'
#if defined(ENABLE_OVERLOADING)
data SysrootRepoMethodInfo
instance (signature ~ (m OSTree.Repo.Repo), MonadIO m, IsSysroot a) => O.MethodInfo SysrootRepoMethodInfo a signature where
overloadedMethod = sysrootRepo
#endif
foreign import ccall "ostree_sysroot_simple_write_deployment" ostree_sysroot_simple_write_deployment ::
Ptr Sysroot ->
CString ->
Ptr OSTree.Deployment.Deployment ->
Ptr OSTree.Deployment.Deployment ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootSimpleWriteDeployment ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, OSTree.Deployment.IsDeployment c, Gio.Cancellable.IsCancellable d) =>
a
-> Maybe (T.Text)
-> b
-> Maybe (c)
-> [OSTree.Flags.SysrootSimpleWriteDeploymentFlags]
-> Maybe (d)
-> m ()
sysrootSimpleWriteDeployment :: a
-> Maybe Text
-> b
-> Maybe c
-> [SysrootSimpleWriteDeploymentFlags]
-> Maybe d
-> m ()
sysrootSimpleWriteDeployment sysroot :: a
sysroot osname :: Maybe Text
osname newDeployment :: b
newDeployment mergeDeployment :: Maybe c
mergeDeployment flags :: [SysrootSimpleWriteDeploymentFlags]
flags cancellable :: Maybe d
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
sysroot' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sysroot
CString
maybeOsname <- case Maybe Text
osname of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jOsname :: Text
jOsname -> do
CString
jOsname' <- Text -> IO CString
textToCString Text
jOsname
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jOsname'
Ptr Deployment
newDeployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
newDeployment
Ptr Deployment
maybeMergeDeployment <- case Maybe c
mergeDeployment of
Nothing -> Ptr Deployment -> IO (Ptr Deployment)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
forall a. Ptr a
nullPtr
Just jMergeDeployment :: c
jMergeDeployment -> do
Ptr Deployment
jMergeDeployment' <- c -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jMergeDeployment
Ptr Deployment -> IO (Ptr Deployment)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
jMergeDeployment'
let flags' :: CUInt
flags' = [SysrootSimpleWriteDeploymentFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SysrootSimpleWriteDeploymentFlags]
flags
Ptr Cancellable
maybeCancellable <- case Maybe d
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: d
jCancellable -> do
Ptr Cancellable
jCancellable' <- d -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> CString
-> Ptr Deployment
-> Ptr Deployment
-> CUInt
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_simple_write_deployment Ptr Sysroot
sysroot' CString
maybeOsname Ptr Deployment
newDeployment' Ptr Deployment
maybeMergeDeployment CUInt
flags' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sysroot
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
newDeployment
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
mergeDeployment c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe d -> (d -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe d
cancellable d -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeOsname
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeOsname
)
#if defined(ENABLE_OVERLOADING)
data SysrootSimpleWriteDeploymentMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> Maybe (c) -> [OSTree.Flags.SysrootSimpleWriteDeploymentFlags] -> Maybe (d) -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, OSTree.Deployment.IsDeployment c, Gio.Cancellable.IsCancellable d) => O.MethodInfo SysrootSimpleWriteDeploymentMethodInfo a signature where
overloadedMethod = sysrootSimpleWriteDeployment
#endif
foreign import ccall "ostree_sysroot_stage_tree" ostree_sysroot_stage_tree ::
Ptr Sysroot ->
CString ->
CString ->
Ptr GLib.KeyFile.KeyFile ->
Ptr OSTree.Deployment.Deployment ->
Ptr CString ->
Ptr (Ptr OSTree.Deployment.Deployment) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootStageTree ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> T.Text
-> Maybe (GLib.KeyFile.KeyFile)
-> Maybe (b)
-> Maybe ([T.Text])
-> Maybe (c)
-> m (OSTree.Deployment.Deployment)
sysrootStageTree :: a
-> Maybe Text
-> Text
-> Maybe KeyFile
-> Maybe b
-> Maybe [Text]
-> Maybe c
-> m Deployment
sysrootStageTree self :: a
self osname :: Maybe Text
osname revision :: Text
revision origin :: Maybe KeyFile
origin mergeDeployment :: Maybe b
mergeDeployment overrideKernelArgv :: Maybe [Text]
overrideKernelArgv cancellable :: Maybe c
cancellable = IO Deployment -> m Deployment
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Deployment -> m Deployment) -> IO Deployment -> m Deployment
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeOsname <- case Maybe Text
osname of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jOsname :: Text
jOsname -> do
CString
jOsname' <- Text -> IO CString
textToCString Text
jOsname
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jOsname'
CString
revision' <- Text -> IO CString
textToCString Text
revision
Ptr KeyFile
maybeOrigin <- case Maybe KeyFile
origin of
Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
nullPtr
Just jOrigin :: KeyFile
jOrigin -> do
Ptr KeyFile
jOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jOrigin
Ptr KeyFile -> IO (Ptr KeyFile)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
jOrigin'
Ptr Deployment
maybeMergeDeployment <- case Maybe b
mergeDeployment of
Nothing -> Ptr Deployment -> IO (Ptr Deployment)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
forall a. Ptr a
nullPtr
Just jMergeDeployment :: b
jMergeDeployment -> do
Ptr Deployment
jMergeDeployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jMergeDeployment
Ptr Deployment -> IO (Ptr Deployment)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
jMergeDeployment'
Ptr CString
maybeOverrideKernelArgv <- case Maybe [Text]
overrideKernelArgv of
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just jOverrideKernelArgv :: [Text]
jOverrideKernelArgv -> do
Ptr CString
jOverrideKernelArgv' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jOverrideKernelArgv
Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jOverrideKernelArgv'
Ptr (Ptr Deployment)
outNewDeployment <- IO (Ptr (Ptr Deployment))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO Deployment -> IO () -> IO Deployment
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> CString
-> CString
-> Ptr KeyFile
-> Ptr Deployment
-> Ptr CString
-> Ptr (Ptr Deployment)
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_stage_tree Ptr Sysroot
self' CString
maybeOsname CString
revision' Ptr KeyFile
maybeOrigin Ptr Deployment
maybeMergeDeployment Ptr CString
maybeOverrideKernelArgv Ptr (Ptr Deployment)
outNewDeployment Ptr Cancellable
maybeCancellable
Ptr Deployment
outNewDeployment' <- Ptr (Ptr Deployment) -> IO (Ptr Deployment)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Deployment)
outNewDeployment
Deployment
outNewDeployment'' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Deployment -> Deployment
OSTree.Deployment.Deployment) Ptr Deployment
outNewDeployment'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe KeyFile -> (KeyFile -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe KeyFile
origin KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
mergeDeployment b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeOsname
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
revision'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOverrideKernelArgv
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOverrideKernelArgv
Ptr (Ptr Deployment) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Deployment)
outNewDeployment
Deployment -> IO Deployment
forall (m :: * -> *) a. Monad m => a -> m a
return Deployment
outNewDeployment''
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeOsname
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
revision'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOverrideKernelArgv
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOverrideKernelArgv
Ptr (Ptr Deployment) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Deployment)
outNewDeployment
)
#if defined(ENABLE_OVERLOADING)
data SysrootStageTreeMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> Maybe (GLib.KeyFile.KeyFile) -> Maybe (b) -> Maybe ([T.Text]) -> Maybe (c) -> m (OSTree.Deployment.Deployment)), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.MethodInfo SysrootStageTreeMethodInfo a signature where
overloadedMethod = sysrootStageTree
#endif
foreign import ccall "ostree_sysroot_try_lock" ostree_sysroot_try_lock ::
Ptr Sysroot ->
Ptr CInt ->
Ptr (Ptr GError) ->
IO CInt
sysrootTryLock ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m (Bool)
sysrootTryLock :: a -> m Bool
sysrootTryLock self :: a
self = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CInt
outAcquired <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
IO Bool -> IO () -> IO Bool
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot -> Ptr CInt -> Ptr (Ptr GError) -> IO CInt
ostree_sysroot_try_lock Ptr Sysroot
self' Ptr CInt
outAcquired
CInt
outAcquired' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
outAcquired
let outAcquired'' :: Bool
outAcquired'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
outAcquired'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outAcquired
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
outAcquired''
) (do
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
outAcquired
)
#if defined(ENABLE_OVERLOADING)
data SysrootTryLockMethodInfo
instance (signature ~ (m (Bool)), MonadIO m, IsSysroot a) => O.MethodInfo SysrootTryLockMethodInfo a signature where
overloadedMethod = sysrootTryLock
#endif
foreign import ccall "ostree_sysroot_unload" ostree_sysroot_unload ::
Ptr Sysroot ->
IO ()
sysrootUnload ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m ()
sysrootUnload :: a -> m ()
sysrootUnload self :: a
self = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Sysroot -> IO ()
ostree_sysroot_unload Ptr Sysroot
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SysrootUnloadMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSysroot a) => O.MethodInfo SysrootUnloadMethodInfo a signature where
overloadedMethod = sysrootUnload
#endif
foreign import ccall "ostree_sysroot_unlock" ostree_sysroot_unlock ::
Ptr Sysroot ->
IO ()
sysrootUnlock ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m ()
sysrootUnlock :: a -> m ()
sysrootUnlock self :: a
self = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Sysroot -> IO ()
ostree_sysroot_unlock Ptr Sysroot
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SysrootUnlockMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSysroot a) => O.MethodInfo SysrootUnlockMethodInfo a signature where
overloadedMethod = sysrootUnlock
#endif
foreign import ccall "ostree_sysroot_write_deployments" ostree_sysroot_write_deployments ::
Ptr Sysroot ->
Ptr (GPtrArray (Ptr OSTree.Deployment.Deployment)) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootWriteDeployments ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> [OSTree.Deployment.Deployment]
-> Maybe (b)
-> m ()
sysrootWriteDeployments :: a -> [Deployment] -> Maybe b -> m ()
sysrootWriteDeployments self :: a
self newDeployments :: [Deployment]
newDeployments cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
[Ptr Deployment]
newDeployments' <- (Deployment -> IO (Ptr Deployment))
-> [Deployment] -> IO [Ptr Deployment]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Deployment -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Deployment]
newDeployments
Ptr (GPtrArray (Ptr Deployment))
newDeployments'' <- [Ptr Deployment] -> IO (Ptr (GPtrArray (Ptr Deployment)))
forall a. [Ptr a] -> IO (Ptr (GPtrArray (Ptr a)))
packGPtrArray [Ptr Deployment]
newDeployments'
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr (GPtrArray (Ptr Deployment))
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_write_deployments Ptr Sysroot
self' Ptr (GPtrArray (Ptr Deployment))
newDeployments'' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
(Deployment -> IO ()) -> [Deployment] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Deployment -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Deployment]
newDeployments
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr (GPtrArray (Ptr Deployment)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Deployment))
newDeployments''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr (GPtrArray (Ptr Deployment)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Deployment))
newDeployments''
)
#if defined(ENABLE_OVERLOADING)
data SysrootWriteDeploymentsMethodInfo
instance (signature ~ ([OSTree.Deployment.Deployment] -> Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootWriteDeploymentsMethodInfo a signature where
overloadedMethod = sysrootWriteDeployments
#endif
foreign import ccall "ostree_sysroot_write_deployments_with_options" ostree_sysroot_write_deployments_with_options ::
Ptr Sysroot ->
Ptr (GPtrArray (Ptr OSTree.Deployment.Deployment)) ->
Ptr OSTree.SysrootWriteDeploymentsOpts.SysrootWriteDeploymentsOpts ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootWriteDeploymentsWithOptions ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> [OSTree.Deployment.Deployment]
-> OSTree.SysrootWriteDeploymentsOpts.SysrootWriteDeploymentsOpts
-> Maybe (b)
-> m ()
sysrootWriteDeploymentsWithOptions :: a -> [Deployment] -> SysrootWriteDeploymentsOpts -> Maybe b -> m ()
sysrootWriteDeploymentsWithOptions self :: a
self newDeployments :: [Deployment]
newDeployments opts :: SysrootWriteDeploymentsOpts
opts cancellable :: Maybe b
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
[Ptr Deployment]
newDeployments' <- (Deployment -> IO (Ptr Deployment))
-> [Deployment] -> IO [Ptr Deployment]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Deployment -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Deployment]
newDeployments
Ptr (GPtrArray (Ptr Deployment))
newDeployments'' <- [Ptr Deployment] -> IO (Ptr (GPtrArray (Ptr Deployment)))
forall a. [Ptr a] -> IO (Ptr (GPtrArray (Ptr a)))
packGPtrArray [Ptr Deployment]
newDeployments'
Ptr SysrootWriteDeploymentsOpts
opts' <- SysrootWriteDeploymentsOpts -> IO (Ptr SysrootWriteDeploymentsOpts)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SysrootWriteDeploymentsOpts
opts
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr (GPtrArray (Ptr Deployment))
-> Ptr SysrootWriteDeploymentsOpts
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_write_deployments_with_options Ptr Sysroot
self' Ptr (GPtrArray (Ptr Deployment))
newDeployments'' Ptr SysrootWriteDeploymentsOpts
opts' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
(Deployment -> IO ()) -> [Deployment] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Deployment -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Deployment]
newDeployments
SysrootWriteDeploymentsOpts -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SysrootWriteDeploymentsOpts
opts
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr (GPtrArray (Ptr Deployment)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Deployment))
newDeployments''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr (GPtrArray (Ptr Deployment)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Deployment))
newDeployments''
)
#if defined(ENABLE_OVERLOADING)
data SysrootWriteDeploymentsWithOptionsMethodInfo
instance (signature ~ ([OSTree.Deployment.Deployment] -> OSTree.SysrootWriteDeploymentsOpts.SysrootWriteDeploymentsOpts -> Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SysrootWriteDeploymentsWithOptionsMethodInfo a signature where
overloadedMethod = sysrootWriteDeploymentsWithOptions
#endif
foreign import ccall "ostree_sysroot_write_origin_file" ostree_sysroot_write_origin_file ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
Ptr GLib.KeyFile.KeyFile ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootWriteOriginFile ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Maybe (GLib.KeyFile.KeyFile)
-> Maybe (c)
-> m ()
sysrootWriteOriginFile :: a -> b -> Maybe KeyFile -> Maybe c -> m ()
sysrootWriteOriginFile sysroot :: a
sysroot deployment :: b
deployment newOrigin :: Maybe KeyFile
newOrigin cancellable :: Maybe c
cancellable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sysroot
sysroot' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sysroot
Ptr Deployment
deployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
deployment
Ptr KeyFile
maybeNewOrigin <- case Maybe KeyFile
newOrigin of
Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
nullPtr
Just jNewOrigin :: KeyFile
jNewOrigin -> do
Ptr KeyFile
jNewOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jNewOrigin
Ptr KeyFile -> IO (Ptr KeyFile)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
jNewOrigin'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Sysroot
-> Ptr Deployment
-> Ptr KeyFile
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
ostree_sysroot_write_origin_file Ptr Sysroot
sysroot' Ptr Deployment
deployment' Ptr KeyFile
maybeNewOrigin Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sysroot
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
deployment
Maybe KeyFile -> (KeyFile -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe KeyFile
newOrigin KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootWriteOriginFileMethodInfo
instance (signature ~ (b -> Maybe (GLib.KeyFile.KeyFile) -> Maybe (c) -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.MethodInfo SysrootWriteOriginFileMethodInfo a signature where
overloadedMethod = sysrootWriteOriginFile
#endif
foreign import ccall "ostree_sysroot_get_deployment_origin_path" ostree_sysroot_get_deployment_origin_path ::
Ptr Gio.File.File ->
IO (Ptr Gio.File.File)
sysrootGetDeploymentOriginPath ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
a
-> m Gio.File.File
sysrootGetDeploymentOriginPath :: a -> m File
sysrootGetDeploymentOriginPath deploymentPath :: a
deploymentPath = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
Ptr File
deploymentPath' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
deploymentPath
Ptr File
result <- Ptr File -> IO (Ptr File)
ostree_sysroot_get_deployment_origin_path Ptr File
deploymentPath'
Text -> Ptr File -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "sysrootGetDeploymentOriginPath" Ptr File
result
File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
deploymentPath
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'
#if defined(ENABLE_OVERLOADING)
#endif