{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.OSTree.Objects.Sysroot
(
#if defined(ENABLE_OVERLOADING)
SysrootLoadIfChangedMethodInfo ,
#endif
Sysroot(..) ,
IsSysroot ,
toSysroot ,
#if defined(ENABLE_OVERLOADING)
ResolveSysrootMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SysrootChangeFinalizationMethodInfo ,
#endif
sysrootChangeFinalization ,
#if defined(ENABLE_OVERLOADING)
SysrootCleanupMethodInfo ,
#endif
sysrootCleanup ,
#if defined(ENABLE_OVERLOADING)
SysrootCleanupPruneRepoMethodInfo ,
#endif
sysrootCleanupPruneRepo ,
#if defined(ENABLE_OVERLOADING)
SysrootClearSoftRebootMethodInfo ,
#endif
sysrootClearSoftReboot ,
#if defined(ENABLE_OVERLOADING)
SysrootDeployTreeMethodInfo ,
#endif
sysrootDeployTree ,
#if defined(ENABLE_OVERLOADING)
SysrootDeployTreeWithOptionsMethodInfo ,
#endif
sysrootDeployTreeWithOptions ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentCanSoftRebootMethodInfo,
#endif
sysrootDeploymentCanSoftReboot ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentKexecLoadMethodInfo ,
#endif
sysrootDeploymentKexecLoad ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentSetKargsMethodInfo ,
#endif
sysrootDeploymentSetKargs ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentSetKargsInPlaceMethodInfo,
#endif
sysrootDeploymentSetKargsInPlace ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentSetMutableMethodInfo ,
#endif
sysrootDeploymentSetMutable ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentSetPinnedMethodInfo ,
#endif
sysrootDeploymentSetPinned ,
#if defined(ENABLE_OVERLOADING)
SysrootDeploymentSetSoftRebootMethodInfo,
#endif
sysrootDeploymentSetSoftReboot ,
#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)
SysrootInitializeMethodInfo ,
#endif
sysrootInitialize ,
#if defined(ENABLE_OVERLOADING)
SysrootInitializeWithMountNamespaceMethodInfo,
#endif
sysrootInitializeWithMountNamespace ,
#if defined(ENABLE_OVERLOADING)
SysrootIsBootedMethodInfo ,
#endif
sysrootIsBooted ,
#if defined(ENABLE_OVERLOADING)
SysrootLoadMethodInfo ,
#endif
sysrootLoad ,
#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)
SysrootRequireBootedDeploymentMethodInfo,
#endif
sysrootRequireBootedDeployment ,
#if defined(ENABLE_OVERLOADING)
SysrootSetMountNamespaceInUseMethodInfo ,
#endif
sysrootSetMountNamespaceInUse ,
#if defined(ENABLE_OVERLOADING)
SysrootSimpleWriteDeploymentMethodInfo ,
#endif
sysrootSimpleWriteDeployment ,
#if defined(ENABLE_OVERLOADING)
SysrootStageOverlayInitrdMethodInfo ,
#endif
sysrootStageOverlayInitrd ,
#if defined(ENABLE_OVERLOADING)
SysrootStageTreeMethodInfo ,
#endif
sysrootStageTree ,
#if defined(ENABLE_OVERLOADING)
SysrootStageTreeWithOptionsMethodInfo ,
#endif
sysrootStageTreeWithOptions ,
#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)
SysrootUpdatePostCopyMethodInfo ,
#endif
sysrootUpdatePostCopy ,
#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
SysrootJournalMsgCallback ,
#if defined(ENABLE_OVERLOADING)
SysrootJournalMsgSignalInfo ,
#endif
afterSysrootJournalMsg ,
onSysrootJournalMsg ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.KeyFile as GLib.KeyFile
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GLib.Structs.VariantDict as GLib.VariantDict
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.FileInfo as Gio.FileInfo
import qualified GI.Gio.Objects.InputStream as Gio.InputStream
import qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import qualified GI.OSTree.Callbacks as OSTree.Callbacks
import {-# SOURCE #-} qualified GI.OSTree.Enums as OSTree.Enums
import {-# SOURCE #-} qualified GI.OSTree.Flags as OSTree.Flags
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.BlobReader as OSTree.BlobReader
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.RepoFinder as OSTree.RepoFinder
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.Sign as OSTree.Sign
import {-# SOURCE #-} qualified GI.OSTree.Objects.AsyncProgress as OSTree.AsyncProgress
import {-# SOURCE #-} qualified GI.OSTree.Objects.BootconfigParser as OSTree.BootconfigParser
import {-# SOURCE #-} qualified GI.OSTree.Objects.ContentWriter as OSTree.ContentWriter
import {-# SOURCE #-} qualified GI.OSTree.Objects.Deployment as OSTree.Deployment
import {-# SOURCE #-} qualified GI.OSTree.Objects.GpgVerifyResult as OSTree.GpgVerifyResult
import {-# SOURCE #-} qualified GI.OSTree.Objects.MutableTree as OSTree.MutableTree
import {-# SOURCE #-} qualified GI.OSTree.Objects.Repo as OSTree.Repo
import {-# SOURCE #-} qualified GI.OSTree.Objects.RepoFile as OSTree.RepoFile
import {-# SOURCE #-} qualified GI.OSTree.Objects.SePolicy as OSTree.SePolicy
import {-# SOURCE #-} qualified GI.OSTree.Structs.CollectionRef as OSTree.CollectionRef
import {-# SOURCE #-} qualified GI.OSTree.Structs.Remote as OSTree.Remote
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoCheckoutAtOptions as OSTree.RepoCheckoutAtOptions
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoCommitModifier as OSTree.RepoCommitModifier
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoDevInoCache as OSTree.RepoDevInoCache
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoFinderResult as OSTree.RepoFinderResult
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoPruneOptions as OSTree.RepoPruneOptions
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoTransactionStats as OSTree.RepoTransactionStats
import {-# SOURCE #-} qualified GI.OSTree.Structs.SysrootDeployTreeOpts as OSTree.SysrootDeployTreeOpts
import {-# SOURCE #-} qualified GI.OSTree.Structs.SysrootWriteDeploymentsOpts as OSTree.SysrootWriteDeploymentsOpts
#else
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.SysrootDeployTreeOpts as OSTree.SysrootDeployTreeOpts
import {-# SOURCE #-} qualified GI.OSTree.Structs.SysrootWriteDeploymentsOpts as OSTree.SysrootWriteDeploymentsOpts
#endif
newtype Sysroot = Sysroot (SP.ManagedPtr Sysroot)
deriving (Sysroot -> Sysroot -> Bool
(Sysroot -> Sysroot -> Bool)
-> (Sysroot -> Sysroot -> Bool) -> Eq Sysroot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Sysroot -> Sysroot -> Bool
== :: Sysroot -> Sysroot -> Bool
$c/= :: Sysroot -> Sysroot -> Bool
/= :: Sysroot -> Sysroot -> Bool
Eq)
instance SP.ManagedPtrNewtype Sysroot where
toManagedPtr :: Sysroot -> ManagedPtr Sysroot
toManagedPtr (Sysroot ManagedPtr Sysroot
p) = ManagedPtr Sysroot
p
foreign import ccall "ostree_sysroot_get_type"
c_ostree_sysroot_get_type :: IO B.Types.GType
instance B.Types.TypedObject Sysroot where
glibType :: IO GType
glibType = IO GType
c_ostree_sysroot_get_type
instance B.Types.GObject Sysroot
class (SP.GObject o, O.IsDescendantOf Sysroot o) => IsSysroot o
instance (SP.GObject o, O.IsDescendantOf Sysroot o) => IsSysroot o
instance O.HasParentTypes Sysroot
type instance O.ParentTypes Sysroot = '[GObject.Object.Object]
toSysroot :: (MIO.MonadIO m, IsSysroot o) => o -> m Sysroot
toSysroot :: forall (m :: * -> *) o. (MonadIO m, IsSysroot o) => o -> m Sysroot
toSysroot = IO Sysroot -> m Sysroot
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Sysroot -> Sysroot
Sysroot
instance B.GValue.IsGValue (Maybe Sysroot) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ostree_sysroot_get_type
gvalueSet_ :: Ptr GValue -> Maybe Sysroot -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Sysroot
P.Nothing = Ptr GValue -> Ptr Sysroot -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Sysroot
forall a. Ptr a
FP.nullPtr :: FP.Ptr Sysroot)
gvalueSet_ Ptr GValue
gv (P.Just Sysroot
obj) = Sysroot -> (Ptr Sysroot -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Sysroot
obj (Ptr GValue -> Ptr Sysroot -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Sysroot)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr Sysroot)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Sysroot)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject Sysroot ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSysrootMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveSysrootMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSysrootMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSysrootMethod "changeFinalization" o = SysrootChangeFinalizationMethodInfo
ResolveSysrootMethod "cleanup" o = SysrootCleanupMethodInfo
ResolveSysrootMethod "cleanupPruneRepo" o = SysrootCleanupPruneRepoMethodInfo
ResolveSysrootMethod "clearSoftReboot" o = SysrootClearSoftRebootMethodInfo
ResolveSysrootMethod "deployTree" o = SysrootDeployTreeMethodInfo
ResolveSysrootMethod "deployTreeWithOptions" o = SysrootDeployTreeWithOptionsMethodInfo
ResolveSysrootMethod "deploymentCanSoftReboot" o = SysrootDeploymentCanSoftRebootMethodInfo
ResolveSysrootMethod "deploymentKexecLoad" o = SysrootDeploymentKexecLoadMethodInfo
ResolveSysrootMethod "deploymentSetKargs" o = SysrootDeploymentSetKargsMethodInfo
ResolveSysrootMethod "deploymentSetKargsInPlace" o = SysrootDeploymentSetKargsInPlaceMethodInfo
ResolveSysrootMethod "deploymentSetMutable" o = SysrootDeploymentSetMutableMethodInfo
ResolveSysrootMethod "deploymentSetPinned" o = SysrootDeploymentSetPinnedMethodInfo
ResolveSysrootMethod "deploymentSetSoftReboot" o = SysrootDeploymentSetSoftRebootMethodInfo
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 "initialize" o = SysrootInitializeMethodInfo
ResolveSysrootMethod "initializeWithMountNamespace" o = SysrootInitializeWithMountNamespaceMethodInfo
ResolveSysrootMethod "isBooted" o = SysrootIsBootedMethodInfo
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 "requireBootedDeployment" o = SysrootRequireBootedDeploymentMethodInfo
ResolveSysrootMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSysrootMethod "simpleWriteDeployment" o = SysrootSimpleWriteDeploymentMethodInfo
ResolveSysrootMethod "stageOverlayInitrd" o = SysrootStageOverlayInitrdMethodInfo
ResolveSysrootMethod "stageTree" o = SysrootStageTreeMethodInfo
ResolveSysrootMethod "stageTreeWithOptions" o = SysrootStageTreeWithOptionsMethodInfo
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 "updatePostCopy" o = SysrootUpdatePostCopyMethodInfo
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 "setMountNamespaceInUse" o = SysrootSetMountNamespaceInUseMethodInfo
ResolveSysrootMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSysrootMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSysrootMethod t Sysroot, O.OverloadedMethod 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
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveSysrootMethod t Sysroot, O.OverloadedMethod info Sysroot p, R.HasField t Sysroot p) => R.HasField t Sysroot p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveSysrootMethod t Sysroot, O.OverloadedMethodInfo info Sysroot) => OL.IsLabel t (O.MethodProxy info Sysroot) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type SysrootJournalMsgCallback =
T.Text
-> IO ()
type C_SysrootJournalMsgCallback =
Ptr Sysroot ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_SysrootJournalMsgCallback :: C_SysrootJournalMsgCallback -> IO (FunPtr C_SysrootJournalMsgCallback)
wrap_SysrootJournalMsgCallback ::
GObject a => (a -> SysrootJournalMsgCallback) ->
C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback :: forall a.
GObject a =>
(a -> SysrootJournalMsgCallback) -> C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback a -> SysrootJournalMsgCallback
gi'cb Ptr Sysroot
gi'selfPtr CString
msg Ptr ()
_ = do
msg' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
msg
B.ManagedPtr.withNewObject gi'selfPtr $ \Sysroot
gi'self -> a -> SysrootJournalMsgCallback
gi'cb (Sysroot -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Sysroot
gi'self) Text
msg'
onSysrootJournalMsg :: (IsSysroot a, MonadIO m) => a -> ((?self :: a) => SysrootJournalMsgCallback) -> m SignalHandlerId
onSysrootJournalMsg :: forall a (m :: * -> *).
(IsSysroot a, MonadIO m) =>
a -> ((?self::a) => SysrootJournalMsgCallback) -> m SignalHandlerId
onSysrootJournalMsg a
obj (?self::a) => SysrootJournalMsgCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 wrapped :: a -> SysrootJournalMsgCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SysrootJournalMsgCallback
SysrootJournalMsgCallback
cb
let wrapped' :: C_SysrootJournalMsgCallback
wrapped' = (a -> SysrootJournalMsgCallback) -> C_SysrootJournalMsgCallback
forall a.
GObject a =>
(a -> SysrootJournalMsgCallback) -> C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback a -> SysrootJournalMsgCallback
wrapped
wrapped'' <- C_SysrootJournalMsgCallback
-> IO (FunPtr C_SysrootJournalMsgCallback)
mk_SysrootJournalMsgCallback C_SysrootJournalMsgCallback
wrapped'
connectSignalFunPtr obj "journal-msg" wrapped'' SignalConnectBefore Nothing
afterSysrootJournalMsg :: (IsSysroot a, MonadIO m) => a -> ((?self :: a) => SysrootJournalMsgCallback) -> m SignalHandlerId
afterSysrootJournalMsg :: forall a (m :: * -> *).
(IsSysroot a, MonadIO m) =>
a -> ((?self::a) => SysrootJournalMsgCallback) -> m SignalHandlerId
afterSysrootJournalMsg a
obj (?self::a) => SysrootJournalMsgCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 wrapped :: a -> SysrootJournalMsgCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SysrootJournalMsgCallback
SysrootJournalMsgCallback
cb
let wrapped' :: C_SysrootJournalMsgCallback
wrapped' = (a -> SysrootJournalMsgCallback) -> C_SysrootJournalMsgCallback
forall a.
GObject a =>
(a -> SysrootJournalMsgCallback) -> C_SysrootJournalMsgCallback
wrap_SysrootJournalMsgCallback a -> SysrootJournalMsgCallback
wrapped
wrapped'' <- C_SysrootJournalMsgCallback
-> IO (FunPtr C_SysrootJournalMsgCallback)
mk_SysrootJournalMsgCallback C_SysrootJournalMsgCallback
wrapped'
connectSignalFunPtr obj "journal-msg" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot::journal-msg"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#g:signal:journalMsg"})
#endif
getSysrootPath :: (MonadIO m, IsSysroot o) => o -> m Gio.File.File
getSysrootPath :: forall (m :: * -> *) o. (MonadIO m, IsSysroot o) => o -> m File
getSysrootPath o
obj = IO File -> m File
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 Text
"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 String
"path" ManagedPtr File -> File
Gio.File.File
constructSysrootPath :: (IsSysroot o, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructSysrootPath :: forall o (m :: * -> *) a.
(IsSysroot o, MonadIO m, IsFile a) =>
a -> m (GValueConstruct o)
constructSysrootPath a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"path" (a -> Maybe a
forall a. a -> Maybe a
P.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
attrPut = undefined
attrTransfer _ v = do
unsafeCastTo Gio.File.File v
attrConstruct = constructSysrootPath
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.path"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#g:attr:path"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Sysroot
type instance O.AttributeList Sysroot = SysrootAttributeList
type SysrootAttributeList = ('[ '("path", SysrootPathPropertyInfo)] :: [(Symbol, DK.Type)])
#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, DK.Type)])
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
Maybe a -> m Sysroot
sysrootNew Maybe a
path = IO Sysroot -> m Sysroot
forall a. IO a -> m a
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
maybePath <- case Maybe a
path of
Maybe a
Nothing -> Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
FP.nullPtr
Just a
jPath -> do
jPath' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jPath
return jPath'
result <- ostree_sysroot_new maybePath
checkUnexpectedReturnNULL "sysrootNew" result
result' <- (wrapObject Sysroot) result
whenJust path touchManagedPtr
return 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 :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Sysroot
sysrootNewDefault = IO Sysroot -> m Sysroot
forall a. IO a -> m a
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
result <- IO (Ptr Sysroot)
ostree_sysroot_new_default
checkUnexpectedReturnNULL "sysrootNewDefault" result
result' <- (wrapObject Sysroot) result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_sysroot_change_finalization" ostree_sysroot_change_finalization ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
Ptr (Ptr GError) ->
IO CInt
sysrootChangeFinalization ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) =>
a
-> b
-> m ()
sysrootChangeFinalization :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) =>
a -> b -> m ()
sysrootChangeFinalization a
self b
deployment = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
onException (do
_ <- propagateGError $ ostree_sysroot_change_finalization self' deployment'
touchManagedPtr self
touchManagedPtr deployment
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootChangeFinalizationMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) => O.OverloadedMethod SysrootChangeFinalizationMethodInfo a signature where
overloadedMethod = sysrootChangeFinalization
instance O.OverloadedMethodInfo SysrootChangeFinalizationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootChangeFinalization",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootChangeFinalization"
})
#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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> m ()
sysrootCleanup a
self Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_cleanup self' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootCleanupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootCleanupMethodInfo a signature where
overloadedMethod = sysrootCleanup
instance O.OverloadedMethodInfo SysrootCleanupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootCleanup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> RepoPruneOptions -> Maybe b -> m (Int32, Int32, Word64)
sysrootCleanupPruneRepo a
sysroot RepoPruneOptions
options Maybe b
cancellable = IO (Int32, Int32, Word64) -> m (Int32, Int32, Word64)
forall a. IO a -> m a
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
sysroot' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sysroot
options' <- unsafeManagedPtrGetPtr options
outObjectsTotal <- allocMem :: IO (Ptr Int32)
outObjectsPruned <- allocMem :: IO (Ptr Int32)
outPrunedObjectSizeTotal <- allocMem :: IO (Ptr Word64)
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_cleanup_prune_repo sysroot' options' outObjectsTotal outObjectsPruned outPrunedObjectSizeTotal maybeCancellable
outObjectsTotal' <- peek outObjectsTotal
outObjectsPruned' <- peek outObjectsPruned
outPrunedObjectSizeTotal' <- peek outPrunedObjectSizeTotal
touchManagedPtr sysroot
touchManagedPtr options
whenJust cancellable touchManagedPtr
freeMem outObjectsTotal
freeMem outObjectsPruned
freeMem outPrunedObjectSizeTotal
return (outObjectsTotal', outObjectsPruned', outPrunedObjectSizeTotal')
) (do
freeMem outObjectsTotal
freeMem outObjectsPruned
freeMem 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.OverloadedMethod SysrootCleanupPruneRepoMethodInfo a signature where
overloadedMethod = sysrootCleanupPruneRepo
instance O.OverloadedMethodInfo SysrootCleanupPruneRepoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootCleanupPruneRepo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootCleanupPruneRepo"
})
#endif
foreign import ccall "ostree_sysroot_clear_soft_reboot" ostree_sysroot_clear_soft_reboot ::
Ptr Sysroot ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootClearSoftReboot ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
sysrootClearSoftReboot :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> m ()
sysrootClearSoftReboot a
self Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_clear_soft_reboot self' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootClearSoftRebootMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootClearSoftRebootMethodInfo a signature where
overloadedMethod = sysrootClearSoftReboot
instance O.OverloadedMethodInfo SysrootClearSoftRebootMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootClearSoftReboot",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootClearSoftReboot"
})
#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 :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a
-> Maybe Text
-> Text
-> Maybe KeyFile
-> Maybe b
-> Maybe [Text]
-> Maybe c
-> m Deployment
sysrootDeployTree a
self Maybe Text
osname Text
revision Maybe KeyFile
origin Maybe b
providedMergeDeployment Maybe [Text]
overrideKernelArgv Maybe c
cancellable = IO Deployment -> m Deployment
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeOsname <- case osname of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jOsname -> do
jOsname' <- Text -> IO CString
textToCString Text
jOsname
return jOsname'
revision' <- textToCString revision
maybeOrigin <- case origin of
Maybe KeyFile
Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
FP.nullPtr
Just KeyFile
jOrigin -> do
jOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jOrigin
return jOrigin'
maybeProvidedMergeDeployment <- case providedMergeDeployment of
Maybe b
Nothing -> Ptr Deployment -> IO (Ptr Deployment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
forall a. Ptr a
FP.nullPtr
Just b
jProvidedMergeDeployment -> do
jProvidedMergeDeployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProvidedMergeDeployment
return jProvidedMergeDeployment'
maybeOverrideKernelArgv <- case overrideKernelArgv of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
FP.nullPtr
Just [Text]
jOverrideKernelArgv -> do
jOverrideKernelArgv' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jOverrideKernelArgv
return jOverrideKernelArgv'
outNewDeployment <- callocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_deploy_tree self' maybeOsname revision' maybeOrigin maybeProvidedMergeDeployment maybeOverrideKernelArgv outNewDeployment maybeCancellable
outNewDeployment' <- peek outNewDeployment
outNewDeployment'' <- (wrapObject OSTree.Deployment.Deployment) outNewDeployment'
touchManagedPtr self
whenJust origin touchManagedPtr
whenJust providedMergeDeployment touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeOsname
freeMem revision'
mapZeroTerminatedCArray freeMem maybeOverrideKernelArgv
freeMem maybeOverrideKernelArgv
freeMem outNewDeployment
return outNewDeployment''
) (do
freeMem maybeOsname
freeMem revision'
mapZeroTerminatedCArray freeMem maybeOverrideKernelArgv
freeMem maybeOverrideKernelArgv
freeMem 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.OverloadedMethod SysrootDeployTreeMethodInfo a signature where
overloadedMethod = sysrootDeployTree
instance O.OverloadedMethodInfo SysrootDeployTreeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeployTree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootDeployTree"
})
#endif
foreign import ccall "ostree_sysroot_deploy_tree_with_options" ostree_sysroot_deploy_tree_with_options ::
Ptr Sysroot ->
CString ->
CString ->
Ptr GLib.KeyFile.KeyFile ->
Ptr OSTree.Deployment.Deployment ->
Ptr OSTree.SysrootDeployTreeOpts.SysrootDeployTreeOpts ->
Ptr (Ptr OSTree.Deployment.Deployment) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeployTreeWithOptions ::
(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 (OSTree.SysrootDeployTreeOpts.SysrootDeployTreeOpts)
-> Maybe (c)
-> m (OSTree.Deployment.Deployment)
sysrootDeployTreeWithOptions :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a
-> Maybe Text
-> Text
-> Maybe KeyFile
-> Maybe b
-> Maybe SysrootDeployTreeOpts
-> Maybe c
-> m Deployment
sysrootDeployTreeWithOptions a
self Maybe Text
osname Text
revision Maybe KeyFile
origin Maybe b
providedMergeDeployment Maybe SysrootDeployTreeOpts
opts Maybe c
cancellable = IO Deployment -> m Deployment
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeOsname <- case osname of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jOsname -> do
jOsname' <- Text -> IO CString
textToCString Text
jOsname
return jOsname'
revision' <- textToCString revision
maybeOrigin <- case origin of
Maybe KeyFile
Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
FP.nullPtr
Just KeyFile
jOrigin -> do
jOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jOrigin
return jOrigin'
maybeProvidedMergeDeployment <- case providedMergeDeployment of
Maybe b
Nothing -> Ptr Deployment -> IO (Ptr Deployment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
forall a. Ptr a
FP.nullPtr
Just b
jProvidedMergeDeployment -> do
jProvidedMergeDeployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProvidedMergeDeployment
return jProvidedMergeDeployment'
maybeOpts <- case opts of
Maybe SysrootDeployTreeOpts
Nothing -> Ptr SysrootDeployTreeOpts -> IO (Ptr SysrootDeployTreeOpts)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SysrootDeployTreeOpts
forall a. Ptr a
FP.nullPtr
Just SysrootDeployTreeOpts
jOpts -> do
jOpts' <- SysrootDeployTreeOpts -> IO (Ptr SysrootDeployTreeOpts)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SysrootDeployTreeOpts
jOpts
return jOpts'
outNewDeployment <- callocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_deploy_tree_with_options self' maybeOsname revision' maybeOrigin maybeProvidedMergeDeployment maybeOpts outNewDeployment maybeCancellable
outNewDeployment' <- peek outNewDeployment
outNewDeployment'' <- (wrapObject OSTree.Deployment.Deployment) outNewDeployment'
touchManagedPtr self
whenJust origin touchManagedPtr
whenJust providedMergeDeployment touchManagedPtr
whenJust opts touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeOsname
freeMem revision'
freeMem outNewDeployment
return outNewDeployment''
) (do
freeMem maybeOsname
freeMem revision'
freeMem outNewDeployment
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeployTreeWithOptionsMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> Maybe (GLib.KeyFile.KeyFile) -> Maybe (b) -> Maybe (OSTree.SysrootDeployTreeOpts.SysrootDeployTreeOpts) -> Maybe (c) -> m (OSTree.Deployment.Deployment)), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod SysrootDeployTreeWithOptionsMethodInfo a signature where
overloadedMethod = sysrootDeployTreeWithOptions
instance O.OverloadedMethodInfo SysrootDeployTreeWithOptionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeployTreeWithOptions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootDeployTreeWithOptions"
})
#endif
foreign import ccall "ostree_sysroot_deployment_can_soft_reboot" ostree_sysroot_deployment_can_soft_reboot ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
IO CInt
sysrootDeploymentCanSoftReboot ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) =>
a
-> b
-> m Bool
sysrootDeploymentCanSoftReboot :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) =>
a -> b -> m Bool
sysrootDeploymentCanSoftReboot a
self b
deployment = IO Bool -> m Bool
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
result <- ostree_sysroot_deployment_can_soft_reboot self' deployment'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr self
touchManagedPtr deployment
return result'
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentCanSoftRebootMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) => O.OverloadedMethod SysrootDeploymentCanSoftRebootMethodInfo a signature where
overloadedMethod = sysrootDeploymentCanSoftReboot
instance O.OverloadedMethodInfo SysrootDeploymentCanSoftRebootMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeploymentCanSoftReboot",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootDeploymentCanSoftReboot"
})
#endif
foreign import ccall "ostree_sysroot_deployment_kexec_load" ostree_sysroot_deployment_kexec_load ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeploymentKexecLoad ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Maybe (c)
-> m ()
sysrootDeploymentKexecLoad :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a -> b -> Maybe c -> m ()
sysrootDeploymentKexecLoad a
self b
deployment Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_deployment_kexec_load self' deployment' maybeCancellable
touchManagedPtr self
touchManagedPtr deployment
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentKexecLoadMethodInfo
instance (signature ~ (b -> Maybe (c) -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod SysrootDeploymentKexecLoadMethodInfo a signature where
overloadedMethod = sysrootDeploymentKexecLoad
instance O.OverloadedMethodInfo SysrootDeploymentKexecLoadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeploymentKexecLoad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootDeploymentKexecLoad"
})
#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 :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a -> b -> [Text] -> Maybe c -> m ()
sysrootDeploymentSetKargs a
self b
deployment [Text]
newKargs Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
newKargs' <- packZeroTerminatedUTF8CArray newKargs
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_deployment_set_kargs self' deployment' newKargs' maybeCancellable
touchManagedPtr self
touchManagedPtr deployment
whenJust cancellable touchManagedPtr
mapZeroTerminatedCArray freeMem newKargs'
freeMem newKargs'
return ()
) (do
mapZeroTerminatedCArray freeMem newKargs'
freeMem 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.OverloadedMethod SysrootDeploymentSetKargsMethodInfo a signature where
overloadedMethod = sysrootDeploymentSetKargs
instance O.OverloadedMethodInfo SysrootDeploymentSetKargsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeploymentSetKargs",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootDeploymentSetKargs"
})
#endif
foreign import ccall "ostree_sysroot_deployment_set_kargs_in_place" ostree_sysroot_deployment_set_kargs_in_place ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeploymentSetKargsInPlace ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Maybe (T.Text)
-> Maybe (c)
-> m ()
sysrootDeploymentSetKargsInPlace :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a -> b -> Maybe Text -> Maybe c -> m ()
sysrootDeploymentSetKargsInPlace a
self b
deployment Maybe Text
kargsStr Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
maybeKargsStr <- case kargsStr of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jKargsStr -> do
jKargsStr' <- Text -> IO CString
textToCString Text
jKargsStr
return jKargsStr'
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_deployment_set_kargs_in_place self' deployment' maybeKargsStr maybeCancellable
touchManagedPtr self
touchManagedPtr deployment
whenJust cancellable touchManagedPtr
freeMem maybeKargsStr
return ()
) (do
freeMem maybeKargsStr
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentSetKargsInPlaceMethodInfo
instance (signature ~ (b -> Maybe (T.Text) -> Maybe (c) -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod SysrootDeploymentSetKargsInPlaceMethodInfo a signature where
overloadedMethod = sysrootDeploymentSetKargsInPlace
instance O.OverloadedMethodInfo SysrootDeploymentSetKargsInPlaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeploymentSetKargsInPlace",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootDeploymentSetKargsInPlace"
})
#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 :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a -> b -> Bool -> Maybe c -> m ()
sysrootDeploymentSetMutable a
self b
deployment Bool
isMutable Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
let isMutable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
isMutable
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_deployment_set_mutable self' deployment' isMutable' maybeCancellable
touchManagedPtr self
touchManagedPtr deployment
whenJust cancellable touchManagedPtr
return ()
) (do
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.OverloadedMethod SysrootDeploymentSetMutableMethodInfo a signature where
overloadedMethod = sysrootDeploymentSetMutable
instance O.OverloadedMethodInfo SysrootDeploymentSetMutableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeploymentSetMutable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) =>
a -> b -> Bool -> m ()
sysrootDeploymentSetPinned a
self b
deployment Bool
isPinned = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
let isPinned' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
isPinned
onException (do
_ <- propagateGError $ ostree_sysroot_deployment_set_pinned self' deployment' isPinned'
touchManagedPtr self
touchManagedPtr deployment
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentSetPinnedMethodInfo
instance (signature ~ (b -> Bool -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) => O.OverloadedMethod SysrootDeploymentSetPinnedMethodInfo a signature where
overloadedMethod = sysrootDeploymentSetPinned
instance O.OverloadedMethodInfo SysrootDeploymentSetPinnedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeploymentSetPinned",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootDeploymentSetPinned"
})
#endif
foreign import ccall "ostree_sysroot_deployment_set_soft_reboot" ostree_sysroot_deployment_set_soft_reboot ::
Ptr Sysroot ->
Ptr OSTree.Deployment.Deployment ->
CInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootDeploymentSetSoftReboot ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Bool
-> Maybe (c)
-> m ()
sysrootDeploymentSetSoftReboot :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a -> b -> Bool -> Maybe c -> m ()
sysrootDeploymentSetSoftReboot a
self b
deployment Bool
allowKernelSkew Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
let allowKernelSkew' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
allowKernelSkew
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_deployment_set_soft_reboot self' deployment' allowKernelSkew' maybeCancellable
touchManagedPtr self
touchManagedPtr deployment
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootDeploymentSetSoftRebootMethodInfo
instance (signature ~ (b -> Bool -> Maybe (c) -> m ()), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod SysrootDeploymentSetSoftRebootMethodInfo a signature where
overloadedMethod = sysrootDeploymentSetSoftReboot
instance O.OverloadedMethodInfo SysrootDeploymentSetSoftRebootMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeploymentSetSoftReboot",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootDeploymentSetSoftReboot"
})
#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 :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a -> b -> DeploymentUnlockedState -> Maybe c -> m ()
sysrootDeploymentUnlock a
self b
deployment DeploymentUnlockedState
unlockedState Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
let 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
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_deployment_unlock self' deployment' unlockedState' maybeCancellable
touchManagedPtr self
touchManagedPtr deployment
whenJust cancellable touchManagedPtr
return ()
) (do
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.OverloadedMethod SysrootDeploymentUnlockMethodInfo a signature where
overloadedMethod = sysrootDeploymentUnlock
instance O.OverloadedMethodInfo SysrootDeploymentUnlockMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootDeploymentUnlock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> m ()
sysrootEnsureInitialized a
self Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_ensure_initialized self' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootEnsureInitializedMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootEnsureInitializedMethodInfo a signature where
overloadedMethod = sysrootEnsureInitialized
instance O.OverloadedMethodInfo SysrootEnsureInitializedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootEnsureInitialized",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 (Maybe OSTree.Deployment.Deployment)
sysrootGetBootedDeployment :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m (Maybe Deployment)
sysrootGetBootedDeployment a
self = IO (Maybe Deployment) -> m (Maybe Deployment)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Deployment) -> m (Maybe Deployment))
-> IO (Maybe Deployment) -> m (Maybe Deployment)
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_get_booted_deployment self'
maybeResult <- convertIfNonNull result $ \Ptr Deployment
result' -> do
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'
return result''
touchManagedPtr self
return maybeResult
#if defined(ENABLE_OVERLOADING)
data SysrootGetBootedDeploymentMethodInfo
instance (signature ~ (m (Maybe OSTree.Deployment.Deployment)), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootGetBootedDeploymentMethodInfo a signature where
overloadedMethod = sysrootGetBootedDeployment
instance O.OverloadedMethodInfo SysrootGetBootedDeploymentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetBootedDeployment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m Int32
sysrootGetBootversion a
self = IO Int32 -> m Int32
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_get_bootversion self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING)
data SysrootGetBootversionMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootGetBootversionMethodInfo a signature where
overloadedMethod = sysrootGetBootversion
instance O.OverloadedMethodInfo SysrootGetBootversionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetBootversion",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) =>
a -> b -> m File
sysrootGetDeploymentDirectory a
self b
deployment = IO File -> m File
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
result <- ostree_sysroot_get_deployment_directory self' deployment'
checkUnexpectedReturnNULL "sysrootGetDeploymentDirectory" result
result' <- (wrapObject Gio.File.File) result
touchManagedPtr self
touchManagedPtr deployment
return result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetDeploymentDirectoryMethodInfo
instance (signature ~ (b -> m Gio.File.File), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) => O.OverloadedMethod SysrootGetDeploymentDirectoryMethodInfo a signature where
overloadedMethod = sysrootGetDeploymentDirectory
instance O.OverloadedMethodInfo SysrootGetDeploymentDirectoryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetDeploymentDirectory",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) =>
a -> b -> m Text
sysrootGetDeploymentDirpath a
self b
deployment = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
deployment' <- unsafeManagedPtrCastPtr deployment
result <- ostree_sysroot_get_deployment_dirpath self' deployment'
checkUnexpectedReturnNULL "sysrootGetDeploymentDirpath" result
result' <- cstringToText result
freeMem result
touchManagedPtr self
touchManagedPtr deployment
return result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetDeploymentDirpathMethodInfo
instance (signature ~ (b -> m T.Text), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b) => O.OverloadedMethod SysrootGetDeploymentDirpathMethodInfo a signature where
overloadedMethod = sysrootGetDeploymentDirpath
instance O.OverloadedMethodInfo SysrootGetDeploymentDirpathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetDeploymentDirpath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m [Deployment]
sysrootGetDeployments a
self = IO [Deployment] -> m [Deployment]
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_get_deployments self'
checkUnexpectedReturnNULL "sysrootGetDeployments" result
result' <- unpackGPtrArray result
result'' <- mapM (newObject OSTree.Deployment.Deployment) result'
unrefPtrArray result
touchManagedPtr self
return result''
#if defined(ENABLE_OVERLOADING)
data SysrootGetDeploymentsMethodInfo
instance (signature ~ (m [OSTree.Deployment.Deployment]), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootGetDeploymentsMethodInfo a signature where
overloadedMethod = sysrootGetDeployments
instance O.OverloadedMethodInfo SysrootGetDeploymentsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetDeployments",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m Int32
sysrootGetFd a
self = IO Int32 -> m Int32
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_get_fd self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING)
data SysrootGetFdMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootGetFdMethodInfo a signature where
overloadedMethod = sysrootGetFd
instance O.OverloadedMethodInfo SysrootGetFdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetFd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 (Maybe OSTree.Deployment.Deployment)
sysrootGetMergeDeployment :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> Maybe Text -> m (Maybe Deployment)
sysrootGetMergeDeployment a
self Maybe Text
osname = IO (Maybe Deployment) -> m (Maybe Deployment)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Deployment) -> m (Maybe Deployment))
-> IO (Maybe Deployment) -> m (Maybe Deployment)
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeOsname <- case osname of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jOsname -> do
jOsname' <- Text -> IO CString
textToCString Text
jOsname
return jOsname'
result <- ostree_sysroot_get_merge_deployment self' maybeOsname
maybeResult <- convertIfNonNull result $ \Ptr Deployment
result' -> do
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'
return result''
touchManagedPtr self
freeMem maybeOsname
return maybeResult
#if defined(ENABLE_OVERLOADING)
data SysrootGetMergeDeploymentMethodInfo
instance (signature ~ (Maybe (T.Text) -> m (Maybe OSTree.Deployment.Deployment)), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootGetMergeDeploymentMethodInfo a signature where
overloadedMethod = sysrootGetMergeDeployment
instance O.OverloadedMethodInfo SysrootGetMergeDeploymentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetMergeDeployment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m File
sysrootGetPath a
self = IO File -> m File
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_get_path self'
checkUnexpectedReturnNULL "sysrootGetPath" result
result' <- (newObject Gio.File.File) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data SysrootGetPathMethodInfo
instance (signature ~ (m Gio.File.File), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootGetPathMethodInfo a signature where
overloadedMethod = sysrootGetPath
instance O.OverloadedMethodInfo SysrootGetPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> m Repo
sysrootGetRepo a
self Maybe b
cancellable = IO Repo -> m Repo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
outRepo <- callocMem :: IO (Ptr (Ptr OSTree.Repo.Repo))
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_get_repo self' outRepo maybeCancellable
outRepo' <- peek outRepo
outRepo'' <- (wrapObject OSTree.Repo.Repo) outRepo'
touchManagedPtr self
whenJust cancellable touchManagedPtr
freeMem outRepo
return outRepo''
) (do
freeMem outRepo
)
#if defined(ENABLE_OVERLOADING)
data SysrootGetRepoMethodInfo
instance (signature ~ (Maybe (b) -> m (OSTree.Repo.Repo)), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootGetRepoMethodInfo a signature where
overloadedMethod = sysrootGetRepo
instance O.OverloadedMethodInfo SysrootGetRepoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetRepo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 (Maybe OSTree.Deployment.Deployment)
sysrootGetStagedDeployment :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m (Maybe Deployment)
sysrootGetStagedDeployment a
self = IO (Maybe Deployment) -> m (Maybe Deployment)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Deployment) -> m (Maybe Deployment))
-> IO (Maybe Deployment) -> m (Maybe Deployment)
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_get_staged_deployment self'
maybeResult <- convertIfNonNull result $ \Ptr Deployment
result' -> do
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'
return result''
touchManagedPtr self
return maybeResult
#if defined(ENABLE_OVERLOADING)
data SysrootGetStagedDeploymentMethodInfo
instance (signature ~ (m (Maybe OSTree.Deployment.Deployment)), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootGetStagedDeploymentMethodInfo a signature where
overloadedMethod = sysrootGetStagedDeployment
instance O.OverloadedMethodInfo SysrootGetStagedDeploymentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetStagedDeployment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m Int32
sysrootGetSubbootversion a
self = IO Int32 -> m Int32
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_get_subbootversion self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING)
data SysrootGetSubbootversionMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootGetSubbootversionMethodInfo a signature where
overloadedMethod = sysrootGetSubbootversion
instance O.OverloadedMethodInfo SysrootGetSubbootversionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootGetSubbootversion",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Text -> Maybe b -> m ()
sysrootInitOsname a
self Text
osname Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
osname' <- textToCString osname
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_init_osname self' osname' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
freeMem osname'
return ()
) (do
freeMem osname'
)
#if defined(ENABLE_OVERLOADING)
data SysrootInitOsnameMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootInitOsnameMethodInfo a signature where
overloadedMethod = sysrootInitOsname
instance O.OverloadedMethodInfo SysrootInitOsnameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootInitOsname",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootInitOsname"
})
#endif
foreign import ccall "ostree_sysroot_initialize" ostree_sysroot_initialize ::
Ptr Sysroot ->
Ptr (Ptr GError) ->
IO CInt
sysrootInitialize ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m ()
sysrootInitialize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m ()
sysrootInitialize a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
onException (do
_ <- propagateGError $ ostree_sysroot_initialize self'
touchManagedPtr self
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootInitializeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootInitializeMethodInfo a signature where
overloadedMethod = sysrootInitialize
instance O.OverloadedMethodInfo SysrootInitializeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootInitialize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootInitialize"
})
#endif
foreign import ccall "ostree_sysroot_initialize_with_mount_namespace" ostree_sysroot_initialize_with_mount_namespace ::
Ptr Sysroot ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootInitializeWithMountNamespace ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
sysrootInitializeWithMountNamespace :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> m ()
sysrootInitializeWithMountNamespace a
self Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_initialize_with_mount_namespace self' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootInitializeWithMountNamespaceMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootInitializeWithMountNamespaceMethodInfo a signature where
overloadedMethod = sysrootInitializeWithMountNamespace
instance O.OverloadedMethodInfo SysrootInitializeWithMountNamespaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootInitializeWithMountNamespace",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootInitializeWithMountNamespace"
})
#endif
foreign import ccall "ostree_sysroot_is_booted" ostree_sysroot_is_booted ::
Ptr Sysroot ->
IO CInt
sysrootIsBooted ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m Bool
sysrootIsBooted :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m Bool
sysrootIsBooted a
self = IO Bool -> m Bool
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_is_booted self'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data SysrootIsBootedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootIsBootedMethodInfo a signature where
overloadedMethod = sysrootIsBooted
instance O.OverloadedMethodInfo SysrootIsBootedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootIsBooted",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootIsBooted"
})
#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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> m ()
sysrootLoad a
self Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_load self' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootLoadMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootLoadMethodInfo a signature where
overloadedMethod = sysrootLoad
instance O.OverloadedMethodInfo SysrootLoadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootLoad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootLoad"
})
#endif
#if defined(ENABLE_OVERLOADING)
data SysrootLoadIfChangedMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "loadIfChanged" Sysroot) => O.OverloadedMethod SysrootLoadIfChangedMethodInfo o p where
overloadedMethod = undefined
instance (o ~ O.UnsupportedMethodError "loadIfChanged" Sysroot) => O.OverloadedMethodInfo SysrootLoadIfChangedMethodInfo o where
overloadedMethodInfo = undefined
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m ()
sysrootLock a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
onException (do
_ <- propagateGError $ ostree_sysroot_lock self'
touchManagedPtr self
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootLockMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootLockMethodInfo a signature where
overloadedMethod = sysrootLock
instance O.OverloadedMethodInfo SysrootLockMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootLock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
sysrootLockAsync a
self Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
maybeCallback <- case callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))
poke ptrcallback jCallback'
return jCallback'
let userData = Ptr a
forall a. Ptr a
nullPtr
ostree_sysroot_lock_async self' maybeCancellable maybeCallback userData
touchManagedPtr self
whenJust cancellable touchManagedPtr
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.OverloadedMethod SysrootLockAsyncMethodInfo a signature where
overloadedMethod = sysrootLockAsync
instance O.OverloadedMethodInfo SysrootLockAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootLockAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsAsyncResult b) =>
a -> b -> m ()
sysrootLockFinish a
self b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result_' <- unsafeManagedPtrCastPtr result_
onException (do
_ <- propagateGError $ ostree_sysroot_lock_finish self' result_'
touchManagedPtr self
touchManagedPtr result_
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootLockFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSysroot a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod SysrootLockFinishMethodInfo a signature where
overloadedMethod = sysrootLockFinish
instance O.OverloadedMethodInfo SysrootLockFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootLockFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> Text -> m KeyFile
sysrootOriginNewFromRefspec a
self Text
refspec = IO KeyFile -> m KeyFile
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
refspec' <- textToCString refspec
result <- ostree_sysroot_origin_new_from_refspec self' refspec'
checkUnexpectedReturnNULL "sysrootOriginNewFromRefspec" result
result' <- (wrapBoxed GLib.KeyFile.KeyFile) result
touchManagedPtr self
freeMem refspec'
return result'
#if defined(ENABLE_OVERLOADING)
data SysrootOriginNewFromRefspecMethodInfo
instance (signature ~ (T.Text -> m GLib.KeyFile.KeyFile), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootOriginNewFromRefspecMethodInfo a signature where
overloadedMethod = sysrootOriginNewFromRefspec
instance O.OverloadedMethodInfo SysrootOriginNewFromRefspecMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootOriginNewFromRefspec",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> m ()
sysrootPrepareCleanup a
self Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_prepare_cleanup self' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootPrepareCleanupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootPrepareCleanupMethodInfo a signature where
overloadedMethod = sysrootPrepareCleanup
instance O.OverloadedMethodInfo SysrootPrepareCleanupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootPrepareCleanup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 ((Maybe OSTree.Deployment.Deployment, Maybe OSTree.Deployment.Deployment))
sysrootQueryDeploymentsFor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> Maybe Text -> m (Maybe Deployment, Maybe Deployment)
sysrootQueryDeploymentsFor a
self Maybe Text
osname = IO (Maybe Deployment, Maybe Deployment)
-> m (Maybe Deployment, Maybe Deployment)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Deployment, Maybe Deployment)
-> m (Maybe Deployment, Maybe Deployment))
-> IO (Maybe Deployment, Maybe Deployment)
-> m (Maybe Deployment, Maybe Deployment)
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeOsname <- case osname of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jOsname -> do
jOsname' <- Text -> IO CString
textToCString Text
jOsname
return jOsname'
outPending <- callocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
outRollback <- callocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
ostree_sysroot_query_deployments_for self' maybeOsname outPending outRollback
outPending' <- peek outPending
maybeOutPending' <- convertIfNonNull outPending' $ \Ptr Deployment
outPending'' -> do
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''
return outPending'''
outRollback' <- peek outRollback
maybeOutRollback' <- convertIfNonNull outRollback' $ \Ptr Deployment
outRollback'' -> do
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''
return outRollback'''
touchManagedPtr self
freeMem maybeOsname
freeMem outPending
freeMem outRollback
return (maybeOutPending', maybeOutRollback')
#if defined(ENABLE_OVERLOADING)
data SysrootQueryDeploymentsForMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ((Maybe OSTree.Deployment.Deployment, Maybe OSTree.Deployment.Deployment))), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootQueryDeploymentsForMethodInfo a signature where
overloadedMethod = sysrootQueryDeploymentsFor
instance O.OverloadedMethodInfo SysrootQueryDeploymentsForMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootQueryDeploymentsFor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m Repo
sysrootRepo a
self = IO Repo -> m Repo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repo -> m Repo) -> IO Repo -> m Repo
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_sysroot_repo self'
checkUnexpectedReturnNULL "sysrootRepo" result
result' <- (newObject OSTree.Repo.Repo) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data SysrootRepoMethodInfo
instance (signature ~ (m OSTree.Repo.Repo), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootRepoMethodInfo a signature where
overloadedMethod = sysrootRepo
instance O.OverloadedMethodInfo SysrootRepoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootRepo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootRepo"
})
#endif
foreign import ccall "ostree_sysroot_require_booted_deployment" ostree_sysroot_require_booted_deployment ::
Ptr Sysroot ->
Ptr (Ptr GError) ->
IO (Ptr OSTree.Deployment.Deployment)
sysrootRequireBootedDeployment ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m OSTree.Deployment.Deployment
sysrootRequireBootedDeployment :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m Deployment
sysrootRequireBootedDeployment a
self = IO Deployment -> m Deployment
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
onException (do
result <- propagateGError $ ostree_sysroot_require_booted_deployment self'
checkUnexpectedReturnNULL "sysrootRequireBootedDeployment" result
result' <- (newObject OSTree.Deployment.Deployment) result
touchManagedPtr self
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootRequireBootedDeploymentMethodInfo
instance (signature ~ (m OSTree.Deployment.Deployment), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootRequireBootedDeploymentMethodInfo a signature where
overloadedMethod = sysrootRequireBootedDeployment
instance O.OverloadedMethodInfo SysrootRequireBootedDeploymentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootRequireBootedDeployment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootRequireBootedDeployment"
})
#endif
foreign import ccall "ostree_sysroot_set_mount_namespace_in_use" ostree_sysroot_set_mount_namespace_in_use ::
Ptr Sysroot ->
IO ()
sysrootSetMountNamespaceInUse ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a) =>
a
-> m ()
sysrootSetMountNamespaceInUse :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m ()
sysrootSetMountNamespaceInUse a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
ostree_sysroot_set_mount_namespace_in_use self'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SysrootSetMountNamespaceInUseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootSetMountNamespaceInUseMethodInfo a signature where
overloadedMethod = sysrootSetMountNamespaceInUse
instance O.OverloadedMethodInfo SysrootSetMountNamespaceInUseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootSetMountNamespaceInUse",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootSetMountNamespaceInUse"
})
#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 :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsDeployment c, IsCancellable d) =>
a
-> Maybe Text
-> b
-> Maybe c
-> [SysrootSimpleWriteDeploymentFlags]
-> Maybe d
-> m ()
sysrootSimpleWriteDeployment a
sysroot Maybe Text
osname b
newDeployment Maybe c
mergeDeployment [SysrootSimpleWriteDeploymentFlags]
flags Maybe d
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
sysroot' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sysroot
maybeOsname <- case osname of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jOsname -> do
jOsname' <- Text -> IO CString
textToCString Text
jOsname
return jOsname'
newDeployment' <- unsafeManagedPtrCastPtr newDeployment
maybeMergeDeployment <- case mergeDeployment of
Maybe c
Nothing -> Ptr Deployment -> IO (Ptr Deployment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
forall a. Ptr a
FP.nullPtr
Just c
jMergeDeployment -> do
jMergeDeployment' <- c -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jMergeDeployment
return jMergeDeployment'
let flags' = [SysrootSimpleWriteDeploymentFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SysrootSimpleWriteDeploymentFlags]
flags
maybeCancellable <- case cancellable of
Maybe d
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just d
jCancellable -> do
jCancellable' <- d -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_simple_write_deployment sysroot' maybeOsname newDeployment' maybeMergeDeployment flags' maybeCancellable
touchManagedPtr sysroot
touchManagedPtr newDeployment
whenJust mergeDeployment touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeOsname
return ()
) (do
freeMem 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.OverloadedMethod SysrootSimpleWriteDeploymentMethodInfo a signature where
overloadedMethod = sysrootSimpleWriteDeployment
instance O.OverloadedMethodInfo SysrootSimpleWriteDeploymentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootSimpleWriteDeployment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootSimpleWriteDeployment"
})
#endif
foreign import ccall "ostree_sysroot_stage_overlay_initrd" ostree_sysroot_stage_overlay_initrd ::
Ptr Sysroot ->
Int32 ->
Ptr CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootStageOverlayInitrd ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Int32
-> Maybe (b)
-> m (T.Text)
sysrootStageOverlayInitrd :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Int32 -> Maybe b -> m Text
sysrootStageOverlayInitrd a
self Int32
fd Maybe b
cancellable = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
outChecksum <- callocMem :: IO (Ptr CString)
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_stage_overlay_initrd self' fd outChecksum maybeCancellable
outChecksum' <- peek outChecksum
outChecksum'' <- cstringToText outChecksum'
freeMem outChecksum'
touchManagedPtr self
whenJust cancellable touchManagedPtr
freeMem outChecksum
return outChecksum''
) (do
freeMem outChecksum
)
#if defined(ENABLE_OVERLOADING)
data SysrootStageOverlayInitrdMethodInfo
instance (signature ~ (Int32 -> Maybe (b) -> m (T.Text)), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootStageOverlayInitrdMethodInfo a signature where
overloadedMethod = sysrootStageOverlayInitrd
instance O.OverloadedMethodInfo SysrootStageOverlayInitrdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootStageOverlayInitrd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootStageOverlayInitrd"
})
#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 :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a
-> Maybe Text
-> Text
-> Maybe KeyFile
-> Maybe b
-> Maybe [Text]
-> Maybe c
-> m Deployment
sysrootStageTree a
self Maybe Text
osname Text
revision Maybe KeyFile
origin Maybe b
mergeDeployment Maybe [Text]
overrideKernelArgv Maybe c
cancellable = IO Deployment -> m Deployment
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeOsname <- case osname of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jOsname -> do
jOsname' <- Text -> IO CString
textToCString Text
jOsname
return jOsname'
revision' <- textToCString revision
maybeOrigin <- case origin of
Maybe KeyFile
Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
FP.nullPtr
Just KeyFile
jOrigin -> do
jOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jOrigin
return jOrigin'
maybeMergeDeployment <- case mergeDeployment of
Maybe b
Nothing -> Ptr Deployment -> IO (Ptr Deployment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
forall a. Ptr a
FP.nullPtr
Just b
jMergeDeployment -> do
jMergeDeployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jMergeDeployment
return jMergeDeployment'
maybeOverrideKernelArgv <- case overrideKernelArgv of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
FP.nullPtr
Just [Text]
jOverrideKernelArgv -> do
jOverrideKernelArgv' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jOverrideKernelArgv
return jOverrideKernelArgv'
outNewDeployment <- callocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_stage_tree self' maybeOsname revision' maybeOrigin maybeMergeDeployment maybeOverrideKernelArgv outNewDeployment maybeCancellable
outNewDeployment' <- peek outNewDeployment
outNewDeployment'' <- (wrapObject OSTree.Deployment.Deployment) outNewDeployment'
touchManagedPtr self
whenJust origin touchManagedPtr
whenJust mergeDeployment touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeOsname
freeMem revision'
mapZeroTerminatedCArray freeMem maybeOverrideKernelArgv
freeMem maybeOverrideKernelArgv
freeMem outNewDeployment
return outNewDeployment''
) (do
freeMem maybeOsname
freeMem revision'
mapZeroTerminatedCArray freeMem maybeOverrideKernelArgv
freeMem maybeOverrideKernelArgv
freeMem 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.OverloadedMethod SysrootStageTreeMethodInfo a signature where
overloadedMethod = sysrootStageTree
instance O.OverloadedMethodInfo SysrootStageTreeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootStageTree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootStageTree"
})
#endif
foreign import ccall "ostree_sysroot_stage_tree_with_options" ostree_sysroot_stage_tree_with_options ::
Ptr Sysroot ->
CString ->
CString ->
Ptr GLib.KeyFile.KeyFile ->
Ptr OSTree.Deployment.Deployment ->
Ptr OSTree.SysrootDeployTreeOpts.SysrootDeployTreeOpts ->
Ptr (Ptr OSTree.Deployment.Deployment) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootStageTreeWithOptions ::
(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)
-> OSTree.SysrootDeployTreeOpts.SysrootDeployTreeOpts
-> Maybe (c)
-> m (OSTree.Deployment.Deployment)
sysrootStageTreeWithOptions :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a
-> Maybe Text
-> Text
-> Maybe KeyFile
-> Maybe b
-> SysrootDeployTreeOpts
-> Maybe c
-> m Deployment
sysrootStageTreeWithOptions a
self Maybe Text
osname Text
revision Maybe KeyFile
origin Maybe b
mergeDeployment SysrootDeployTreeOpts
opts Maybe c
cancellable = IO Deployment -> m Deployment
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeOsname <- case osname of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jOsname -> do
jOsname' <- Text -> IO CString
textToCString Text
jOsname
return jOsname'
revision' <- textToCString revision
maybeOrigin <- case origin of
Maybe KeyFile
Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
FP.nullPtr
Just KeyFile
jOrigin -> do
jOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jOrigin
return jOrigin'
maybeMergeDeployment <- case mergeDeployment of
Maybe b
Nothing -> Ptr Deployment -> IO (Ptr Deployment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Deployment
forall a. Ptr a
FP.nullPtr
Just b
jMergeDeployment -> do
jMergeDeployment' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jMergeDeployment
return jMergeDeployment'
opts' <- unsafeManagedPtrGetPtr opts
outNewDeployment <- callocMem :: IO (Ptr (Ptr OSTree.Deployment.Deployment))
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_stage_tree_with_options self' maybeOsname revision' maybeOrigin maybeMergeDeployment opts' outNewDeployment maybeCancellable
outNewDeployment' <- peek outNewDeployment
outNewDeployment'' <- (wrapObject OSTree.Deployment.Deployment) outNewDeployment'
touchManagedPtr self
whenJust origin touchManagedPtr
whenJust mergeDeployment touchManagedPtr
touchManagedPtr opts
whenJust cancellable touchManagedPtr
freeMem maybeOsname
freeMem revision'
freeMem outNewDeployment
return outNewDeployment''
) (do
freeMem maybeOsname
freeMem revision'
freeMem outNewDeployment
)
#if defined(ENABLE_OVERLOADING)
data SysrootStageTreeWithOptionsMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> Maybe (GLib.KeyFile.KeyFile) -> Maybe (b) -> OSTree.SysrootDeployTreeOpts.SysrootDeployTreeOpts -> Maybe (c) -> m (OSTree.Deployment.Deployment)), MonadIO m, IsSysroot a, OSTree.Deployment.IsDeployment b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod SysrootStageTreeWithOptionsMethodInfo a signature where
overloadedMethod = sysrootStageTreeWithOptions
instance O.OverloadedMethodInfo SysrootStageTreeWithOptionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootStageTreeWithOptions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootStageTreeWithOptions"
})
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m Bool
sysrootTryLock a
self = IO Bool -> m Bool
forall a. IO a -> m a
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
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
outAcquired <- allocMem :: IO (Ptr CInt)
onException (do
_ <- propagateGError $ ostree_sysroot_try_lock self' outAcquired
outAcquired' <- peek outAcquired
let outAcquired'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
outAcquired'
touchManagedPtr self
freeMem outAcquired
return outAcquired''
) (do
freeMem outAcquired
)
#if defined(ENABLE_OVERLOADING)
data SysrootTryLockMethodInfo
instance (signature ~ (m (Bool)), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootTryLockMethodInfo a signature where
overloadedMethod = sysrootTryLock
instance O.OverloadedMethodInfo SysrootTryLockMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootTryLock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m ()
sysrootUnload a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
ostree_sysroot_unload self'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SysrootUnloadMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootUnloadMethodInfo a signature where
overloadedMethod = sysrootUnload
instance O.OverloadedMethodInfo SysrootUnloadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootUnload",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSysroot a) =>
a -> m ()
sysrootUnlock a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
ostree_sysroot_unlock self'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SysrootUnlockMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSysroot a) => O.OverloadedMethod SysrootUnlockMethodInfo a signature where
overloadedMethod = sysrootUnlock
instance O.OverloadedMethodInfo SysrootUnlockMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootUnlock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootUnlock"
})
#endif
foreign import ccall "ostree_sysroot_update_post_copy" ostree_sysroot_update_post_copy ::
Ptr Sysroot ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
sysrootUpdatePostCopy ::
(B.CallStack.HasCallStack, MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
sysrootUpdatePostCopy :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> Maybe b -> m ()
sysrootUpdatePostCopy a
self Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_update_post_copy self' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data SysrootUpdatePostCopyMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootUpdatePostCopyMethodInfo a signature where
overloadedMethod = sysrootUpdatePostCopy
instance O.OverloadedMethodInfo SysrootUpdatePostCopyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootUpdatePostCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v:sysrootUpdatePostCopy"
})
#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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> [Deployment] -> Maybe b -> m ()
sysrootWriteDeployments a
self [Deployment]
newDeployments Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
newDeployments' <- mapM unsafeManagedPtrCastPtr newDeployments
newDeployments'' <- packGPtrArray newDeployments'
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_write_deployments self' newDeployments'' maybeCancellable
touchManagedPtr self
mapM_ touchManagedPtr newDeployments
whenJust cancellable touchManagedPtr
unrefPtrArray newDeployments''
return ()
) (do
unrefPtrArray newDeployments''
)
#if defined(ENABLE_OVERLOADING)
data SysrootWriteDeploymentsMethodInfo
instance (signature ~ ([OSTree.Deployment.Deployment] -> Maybe (b) -> m ()), MonadIO m, IsSysroot a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod SysrootWriteDeploymentsMethodInfo a signature where
overloadedMethod = sysrootWriteDeployments
instance O.OverloadedMethodInfo SysrootWriteDeploymentsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootWriteDeployments",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) =>
a -> [Deployment] -> SysrootWriteDeploymentsOpts -> Maybe b -> m ()
sysrootWriteDeploymentsWithOptions a
self [Deployment]
newDeployments SysrootWriteDeploymentsOpts
opts Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
newDeployments' <- mapM unsafeManagedPtrCastPtr newDeployments
newDeployments'' <- packGPtrArray newDeployments'
opts' <- unsafeManagedPtrGetPtr opts
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_write_deployments_with_options self' newDeployments'' opts' maybeCancellable
touchManagedPtr self
mapM_ touchManagedPtr newDeployments
touchManagedPtr opts
whenJust cancellable touchManagedPtr
unrefPtrArray newDeployments''
return ()
) (do
unrefPtrArray 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.OverloadedMethod SysrootWriteDeploymentsWithOptionsMethodInfo a signature where
overloadedMethod = sysrootWriteDeploymentsWithOptions
instance O.OverloadedMethodInfo SysrootWriteDeploymentsWithOptionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootWriteDeploymentsWithOptions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsSysroot a, IsDeployment b,
IsCancellable c) =>
a -> b -> Maybe KeyFile -> Maybe c -> m ()
sysrootWriteOriginFile a
sysroot b
deployment Maybe KeyFile
newOrigin Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
sysroot' <- a -> IO (Ptr Sysroot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sysroot
deployment' <- unsafeManagedPtrCastPtr deployment
maybeNewOrigin <- case newOrigin of
Maybe KeyFile
Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
FP.nullPtr
Just KeyFile
jNewOrigin -> do
jNewOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jNewOrigin
return jNewOrigin'
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_sysroot_write_origin_file sysroot' deployment' maybeNewOrigin maybeCancellable
touchManagedPtr sysroot
touchManagedPtr deployment
whenJust newOrigin touchManagedPtr
whenJust cancellable touchManagedPtr
return ()
) (do
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.OverloadedMethod SysrootWriteOriginFileMethodInfo a signature where
overloadedMethod = sysrootWriteOriginFile
instance O.OverloadedMethodInfo SysrootWriteOriginFileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Sysroot.sysrootWriteOriginFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Sysroot.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
a -> m File
sysrootGetDeploymentOriginPath a
deploymentPath = IO File -> m File
forall a. IO a -> m a
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
deploymentPath' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
deploymentPath
result <- ostree_sysroot_get_deployment_origin_path deploymentPath'
checkUnexpectedReturnNULL "sysrootGetDeploymentOriginPath" result
result' <- (wrapObject Gio.File.File) result
touchManagedPtr deploymentPath
return result'
#if defined(ENABLE_OVERLOADING)
#endif