{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.OSTree.Objects.Deployment
(
Deployment(..) ,
IsDeployment ,
toDeployment ,
#if defined(ENABLE_OVERLOADING)
ResolveDeploymentMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DeploymentCloneMethodInfo ,
#endif
deploymentClone ,
#if defined(ENABLE_OVERLOADING)
DeploymentEqualMethodInfo ,
#endif
deploymentEqual ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetBootconfigMethodInfo ,
#endif
deploymentGetBootconfig ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetBootcsumMethodInfo ,
#endif
deploymentGetBootcsum ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetBootserialMethodInfo ,
#endif
deploymentGetBootserial ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetCsumMethodInfo ,
#endif
deploymentGetCsum ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetDeployserialMethodInfo ,
#endif
deploymentGetDeployserial ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetIndexMethodInfo ,
#endif
deploymentGetIndex ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetOriginMethodInfo ,
#endif
deploymentGetOrigin ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetOriginRelpathMethodInfo ,
#endif
deploymentGetOriginRelpath ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetOsnameMethodInfo ,
#endif
deploymentGetOsname ,
#if defined(ENABLE_OVERLOADING)
DeploymentGetUnlockedMethodInfo ,
#endif
deploymentGetUnlocked ,
#if defined(ENABLE_OVERLOADING)
DeploymentHashMethodInfo ,
#endif
deploymentHash ,
#if defined(ENABLE_OVERLOADING)
DeploymentIsFinalizationLockedMethodInfo,
#endif
deploymentIsFinalizationLocked ,
#if defined(ENABLE_OVERLOADING)
DeploymentIsPinnedMethodInfo ,
#endif
deploymentIsPinned ,
#if defined(ENABLE_OVERLOADING)
DeploymentIsSoftRebootTargetMethodInfo ,
#endif
deploymentIsSoftRebootTarget ,
#if defined(ENABLE_OVERLOADING)
DeploymentIsStagedMethodInfo ,
#endif
deploymentIsStaged ,
deploymentNew ,
deploymentOriginRemoveTransientState ,
#if defined(ENABLE_OVERLOADING)
DeploymentSetBootconfigMethodInfo ,
#endif
deploymentSetBootconfig ,
#if defined(ENABLE_OVERLOADING)
DeploymentSetBootserialMethodInfo ,
#endif
deploymentSetBootserial ,
#if defined(ENABLE_OVERLOADING)
DeploymentSetIndexMethodInfo ,
#endif
deploymentSetIndex ,
#if defined(ENABLE_OVERLOADING)
DeploymentSetOriginMethodInfo ,
#endif
deploymentSetOrigin ,
deploymentUnlockedStateToString ,
) 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.Structs.KeyFile as GLib.KeyFile
import qualified GI.GObject.Objects.Object as GObject.Object
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.Objects.BootconfigParser as OSTree.BootconfigParser
#else
import qualified GI.GLib.Structs.KeyFile as GLib.KeyFile
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.OSTree.Enums as OSTree.Enums
import {-# SOURCE #-} qualified GI.OSTree.Objects.BootconfigParser as OSTree.BootconfigParser
#endif
newtype Deployment = Deployment (SP.ManagedPtr Deployment)
deriving (Deployment -> Deployment -> Bool
(Deployment -> Deployment -> Bool)
-> (Deployment -> Deployment -> Bool) -> Eq Deployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Deployment -> Deployment -> Bool
== :: Deployment -> Deployment -> Bool
$c/= :: Deployment -> Deployment -> Bool
/= :: Deployment -> Deployment -> Bool
Eq)
instance SP.ManagedPtrNewtype Deployment where
toManagedPtr :: Deployment -> ManagedPtr Deployment
toManagedPtr (Deployment ManagedPtr Deployment
p) = ManagedPtr Deployment
p
foreign import ccall "ostree_deployment_get_type"
c_ostree_deployment_get_type :: IO B.Types.GType
instance B.Types.TypedObject Deployment where
glibType :: IO GType
glibType = IO GType
c_ostree_deployment_get_type
instance B.Types.GObject Deployment
class (SP.GObject o, O.IsDescendantOf Deployment o) => IsDeployment o
instance (SP.GObject o, O.IsDescendantOf Deployment o) => IsDeployment o
instance O.HasParentTypes Deployment
type instance O.ParentTypes Deployment = '[GObject.Object.Object]
toDeployment :: (MIO.MonadIO m, IsDeployment o) => o -> m Deployment
toDeployment :: forall (m :: * -> *) o.
(MonadIO m, IsDeployment o) =>
o -> m Deployment
toDeployment = IO Deployment -> m Deployment
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Deployment -> m Deployment)
-> (o -> IO Deployment) -> o -> m Deployment
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Deployment -> Deployment) -> o -> IO Deployment
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Deployment -> Deployment
Deployment
instance B.GValue.IsGValue (Maybe Deployment) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ostree_deployment_get_type
gvalueSet_ :: Ptr GValue -> Maybe Deployment -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Deployment
P.Nothing = Ptr GValue -> Ptr Deployment -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Deployment
forall a. Ptr a
FP.nullPtr :: FP.Ptr Deployment)
gvalueSet_ Ptr GValue
gv (P.Just Deployment
obj) = Deployment -> (Ptr Deployment -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Deployment
obj (Ptr GValue -> Ptr Deployment -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Deployment)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr Deployment)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Deployment)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject Deployment ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDeploymentMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDeploymentMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeploymentMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeploymentMethod "clone" o = DeploymentCloneMethodInfo
ResolveDeploymentMethod "equal" o = DeploymentEqualMethodInfo
ResolveDeploymentMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeploymentMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeploymentMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeploymentMethod "hash" o = DeploymentHashMethodInfo
ResolveDeploymentMethod "isFinalizationLocked" o = DeploymentIsFinalizationLockedMethodInfo
ResolveDeploymentMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeploymentMethod "isPinned" o = DeploymentIsPinnedMethodInfo
ResolveDeploymentMethod "isSoftRebootTarget" o = DeploymentIsSoftRebootTargetMethodInfo
ResolveDeploymentMethod "isStaged" o = DeploymentIsStagedMethodInfo
ResolveDeploymentMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeploymentMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeploymentMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDeploymentMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeploymentMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeploymentMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeploymentMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeploymentMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeploymentMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDeploymentMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeploymentMethod "getBootconfig" o = DeploymentGetBootconfigMethodInfo
ResolveDeploymentMethod "getBootcsum" o = DeploymentGetBootcsumMethodInfo
ResolveDeploymentMethod "getBootserial" o = DeploymentGetBootserialMethodInfo
ResolveDeploymentMethod "getCsum" o = DeploymentGetCsumMethodInfo
ResolveDeploymentMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeploymentMethod "getDeployserial" o = DeploymentGetDeployserialMethodInfo
ResolveDeploymentMethod "getIndex" o = DeploymentGetIndexMethodInfo
ResolveDeploymentMethod "getOrigin" o = DeploymentGetOriginMethodInfo
ResolveDeploymentMethod "getOriginRelpath" o = DeploymentGetOriginRelpathMethodInfo
ResolveDeploymentMethod "getOsname" o = DeploymentGetOsnameMethodInfo
ResolveDeploymentMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeploymentMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeploymentMethod "getUnlocked" o = DeploymentGetUnlockedMethodInfo
ResolveDeploymentMethod "setBootconfig" o = DeploymentSetBootconfigMethodInfo
ResolveDeploymentMethod "setBootserial" o = DeploymentSetBootserialMethodInfo
ResolveDeploymentMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeploymentMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDeploymentMethod "setIndex" o = DeploymentSetIndexMethodInfo
ResolveDeploymentMethod "setOrigin" o = DeploymentSetOriginMethodInfo
ResolveDeploymentMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeploymentMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeploymentMethod t Deployment, O.OverloadedMethod info Deployment p) => OL.IsLabel t (Deployment -> 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 ~ ResolveDeploymentMethod t Deployment, O.OverloadedMethod info Deployment p, R.HasField t Deployment p) => R.HasField t Deployment p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDeploymentMethod t Deployment, O.OverloadedMethodInfo info Deployment) => OL.IsLabel t (O.MethodProxy info Deployment) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Deployment
type instance O.AttributeList Deployment = DeploymentAttributeList
type DeploymentAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Deployment = DeploymentSignalList
type DeploymentSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "ostree_deployment_new" ostree_deployment_new ::
Int32 ->
CString ->
CString ->
Int32 ->
CString ->
Int32 ->
IO (Ptr Deployment)
deploymentNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Int32
-> T.Text
-> T.Text
-> Int32
-> Maybe (T.Text)
-> Int32
-> m Deployment
deploymentNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32
-> Text -> Text -> Int32 -> Maybe Text -> Int32 -> m Deployment
deploymentNew Int32
index Text
osname Text
csum Int32
deployserial Maybe Text
bootcsum Int32
bootserial = 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
osname' <- Text -> IO CString
textToCString Text
osname
csum' <- textToCString csum
maybeBootcsum <- case bootcsum 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
jBootcsum -> do
jBootcsum' <- Text -> IO CString
textToCString Text
jBootcsum
return jBootcsum'
result <- ostree_deployment_new index osname' csum' deployserial maybeBootcsum bootserial
checkUnexpectedReturnNULL "deploymentNew" result
result' <- (wrapObject Deployment) result
freeMem osname'
freeMem csum'
freeMem maybeBootcsum
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_deployment_clone" ostree_deployment_clone ::
Ptr Deployment ->
IO (Ptr Deployment)
deploymentClone ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Deployment
deploymentClone :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Deployment
deploymentClone 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_clone self'
checkUnexpectedReturnNULL "deploymentClone" result
result' <- (wrapObject Deployment) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data DeploymentCloneMethodInfo
instance (signature ~ (m Deployment), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentCloneMethodInfo a signature where
overloadedMethod = deploymentClone
instance O.OverloadedMethodInfo DeploymentCloneMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentClone",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentClone"
})
#endif
foreign import ccall "ostree_deployment_equal" ostree_deployment_equal ::
Ptr Deployment ->
Ptr Deployment ->
IO CInt
deploymentEqual ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a, IsDeployment b) =>
a
-> b
-> m Bool
deploymentEqual :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDeployment a, IsDeployment b) =>
a -> b -> m Bool
deploymentEqual a
ap b
bp = 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
ap' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
bp' <- unsafeManagedPtrCastPtr bp
result <- ostree_deployment_equal ap' bp'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr ap
touchManagedPtr bp
return result'
#if defined(ENABLE_OVERLOADING)
data DeploymentEqualMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDeployment a, IsDeployment b) => O.OverloadedMethod DeploymentEqualMethodInfo a signature where
overloadedMethod = deploymentEqual
instance O.OverloadedMethodInfo DeploymentEqualMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentEqual",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentEqual"
})
#endif
foreign import ccall "ostree_deployment_get_bootconfig" ostree_deployment_get_bootconfig ::
Ptr Deployment ->
IO (Ptr OSTree.BootconfigParser.BootconfigParser)
deploymentGetBootconfig ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m (Maybe OSTree.BootconfigParser.BootconfigParser)
deploymentGetBootconfig :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m (Maybe BootconfigParser)
deploymentGetBootconfig a
self = IO (Maybe BootconfigParser) -> m (Maybe BootconfigParser)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BootconfigParser) -> m (Maybe BootconfigParser))
-> IO (Maybe BootconfigParser) -> m (Maybe BootconfigParser)
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_bootconfig self'
maybeResult <- convertIfNonNull result $ \Ptr BootconfigParser
result' -> do
result'' <- ((ManagedPtr BootconfigParser -> BootconfigParser)
-> Ptr BootconfigParser -> IO BootconfigParser
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr BootconfigParser -> BootconfigParser
OSTree.BootconfigParser.BootconfigParser) Ptr BootconfigParser
result'
return result''
touchManagedPtr self
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DeploymentGetBootconfigMethodInfo
instance (signature ~ (m (Maybe OSTree.BootconfigParser.BootconfigParser)), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetBootconfigMethodInfo a signature where
overloadedMethod = deploymentGetBootconfig
instance O.OverloadedMethodInfo DeploymentGetBootconfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetBootconfig",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetBootconfig"
})
#endif
foreign import ccall "ostree_deployment_get_bootcsum" ostree_deployment_get_bootcsum ::
Ptr Deployment ->
IO CString
deploymentGetBootcsum ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m T.Text
deploymentGetBootcsum :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Text
deploymentGetBootcsum a
self = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_bootcsum self'
checkUnexpectedReturnNULL "deploymentGetBootcsum" result
result' <- cstringToText result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data DeploymentGetBootcsumMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetBootcsumMethodInfo a signature where
overloadedMethod = deploymentGetBootcsum
instance O.OverloadedMethodInfo DeploymentGetBootcsumMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetBootcsum",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetBootcsum"
})
#endif
foreign import ccall "ostree_deployment_get_bootserial" ostree_deployment_get_bootserial ::
Ptr Deployment ->
IO Int32
deploymentGetBootserial ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Int32
deploymentGetBootserial :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Int32
deploymentGetBootserial 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_bootserial self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING)
data DeploymentGetBootserialMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetBootserialMethodInfo a signature where
overloadedMethod = deploymentGetBootserial
instance O.OverloadedMethodInfo DeploymentGetBootserialMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetBootserial",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetBootserial"
})
#endif
foreign import ccall "ostree_deployment_get_csum" ostree_deployment_get_csum ::
Ptr Deployment ->
IO CString
deploymentGetCsum ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m T.Text
deploymentGetCsum :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Text
deploymentGetCsum a
self = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_csum self'
checkUnexpectedReturnNULL "deploymentGetCsum" result
result' <- cstringToText result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data DeploymentGetCsumMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetCsumMethodInfo a signature where
overloadedMethod = deploymentGetCsum
instance O.OverloadedMethodInfo DeploymentGetCsumMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetCsum",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetCsum"
})
#endif
foreign import ccall "ostree_deployment_get_deployserial" ostree_deployment_get_deployserial ::
Ptr Deployment ->
IO Int32
deploymentGetDeployserial ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Int32
deploymentGetDeployserial :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Int32
deploymentGetDeployserial 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_deployserial self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING)
data DeploymentGetDeployserialMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetDeployserialMethodInfo a signature where
overloadedMethod = deploymentGetDeployserial
instance O.OverloadedMethodInfo DeploymentGetDeployserialMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetDeployserial",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetDeployserial"
})
#endif
foreign import ccall "ostree_deployment_get_index" ostree_deployment_get_index ::
Ptr Deployment ->
IO Int32
deploymentGetIndex ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Int32
deploymentGetIndex :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Int32
deploymentGetIndex 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_index self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING)
data DeploymentGetIndexMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetIndexMethodInfo a signature where
overloadedMethod = deploymentGetIndex
instance O.OverloadedMethodInfo DeploymentGetIndexMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetIndex",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetIndex"
})
#endif
foreign import ccall "ostree_deployment_get_origin" ostree_deployment_get_origin ::
Ptr Deployment ->
IO (Ptr GLib.KeyFile.KeyFile)
deploymentGetOrigin ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m (Maybe GLib.KeyFile.KeyFile)
deploymentGetOrigin :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m (Maybe KeyFile)
deploymentGetOrigin a
self = IO (Maybe KeyFile) -> m (Maybe KeyFile)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe KeyFile) -> m (Maybe KeyFile))
-> IO (Maybe KeyFile) -> m (Maybe KeyFile)
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_origin self'
maybeResult <- convertIfNonNull result $ \Ptr KeyFile
result' -> do
result'' <- ((ManagedPtr KeyFile -> KeyFile) -> Ptr KeyFile -> IO KeyFile
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr KeyFile -> KeyFile
GLib.KeyFile.KeyFile) Ptr KeyFile
result'
return result''
touchManagedPtr self
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DeploymentGetOriginMethodInfo
instance (signature ~ (m (Maybe GLib.KeyFile.KeyFile)), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetOriginMethodInfo a signature where
overloadedMethod = deploymentGetOrigin
instance O.OverloadedMethodInfo DeploymentGetOriginMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetOrigin",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetOrigin"
})
#endif
foreign import ccall "ostree_deployment_get_origin_relpath" ostree_deployment_get_origin_relpath ::
Ptr Deployment ->
IO CString
deploymentGetOriginRelpath ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m T.Text
deploymentGetOriginRelpath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Text
deploymentGetOriginRelpath a
self = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_origin_relpath self'
checkUnexpectedReturnNULL "deploymentGetOriginRelpath" result
result' <- cstringToText result
freeMem result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data DeploymentGetOriginRelpathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetOriginRelpathMethodInfo a signature where
overloadedMethod = deploymentGetOriginRelpath
instance O.OverloadedMethodInfo DeploymentGetOriginRelpathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetOriginRelpath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetOriginRelpath"
})
#endif
foreign import ccall "ostree_deployment_get_osname" ostree_deployment_get_osname ::
Ptr Deployment ->
IO CString
deploymentGetOsname ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m T.Text
deploymentGetOsname :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Text
deploymentGetOsname a
self = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_osname self'
checkUnexpectedReturnNULL "deploymentGetOsname" result
result' <- cstringToText result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data DeploymentGetOsnameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetOsnameMethodInfo a signature where
overloadedMethod = deploymentGetOsname
instance O.OverloadedMethodInfo DeploymentGetOsnameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetOsname",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetOsname"
})
#endif
foreign import ccall "ostree_deployment_get_unlocked" ostree_deployment_get_unlocked ::
Ptr Deployment ->
IO CUInt
deploymentGetUnlocked ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m OSTree.Enums.DeploymentUnlockedState
deploymentGetUnlocked :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m DeploymentUnlockedState
deploymentGetUnlocked a
self = IO DeploymentUnlockedState -> m DeploymentUnlockedState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeploymentUnlockedState -> m DeploymentUnlockedState)
-> IO DeploymentUnlockedState -> m DeploymentUnlockedState
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_get_unlocked self'
let result' = (Int -> DeploymentUnlockedState
forall a. Enum a => Int -> a
toEnum (Int -> DeploymentUnlockedState)
-> (CUInt -> Int) -> CUInt -> DeploymentUnlockedState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data DeploymentGetUnlockedMethodInfo
instance (signature ~ (m OSTree.Enums.DeploymentUnlockedState), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentGetUnlockedMethodInfo a signature where
overloadedMethod = deploymentGetUnlocked
instance O.OverloadedMethodInfo DeploymentGetUnlockedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentGetUnlocked",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentGetUnlocked"
})
#endif
foreign import ccall "ostree_deployment_hash" ostree_deployment_hash ::
Ptr Deployment ->
IO Word32
deploymentHash ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Word32
deploymentHash :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Word32
deploymentHash a
v = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
v' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
v
result <- ostree_deployment_hash v'
touchManagedPtr v
return result
#if defined(ENABLE_OVERLOADING)
data DeploymentHashMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentHashMethodInfo a signature where
overloadedMethod = deploymentHash
instance O.OverloadedMethodInfo DeploymentHashMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentHash",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentHash"
})
#endif
foreign import ccall "ostree_deployment_is_finalization_locked" ostree_deployment_is_finalization_locked ::
Ptr Deployment ->
IO CInt
deploymentIsFinalizationLocked ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Bool
deploymentIsFinalizationLocked :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Bool
deploymentIsFinalizationLocked 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_is_finalization_locked 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 DeploymentIsFinalizationLockedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentIsFinalizationLockedMethodInfo a signature where
overloadedMethod = deploymentIsFinalizationLocked
instance O.OverloadedMethodInfo DeploymentIsFinalizationLockedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentIsFinalizationLocked",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentIsFinalizationLocked"
})
#endif
foreign import ccall "ostree_deployment_is_pinned" ostree_deployment_is_pinned ::
Ptr Deployment ->
IO CInt
deploymentIsPinned ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Bool
deploymentIsPinned :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Bool
deploymentIsPinned 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_is_pinned 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 DeploymentIsPinnedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentIsPinnedMethodInfo a signature where
overloadedMethod = deploymentIsPinned
instance O.OverloadedMethodInfo DeploymentIsPinnedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentIsPinned",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentIsPinned"
})
#endif
foreign import ccall "ostree_deployment_is_soft_reboot_target" ostree_deployment_is_soft_reboot_target ::
Ptr Deployment ->
IO CInt
deploymentIsSoftRebootTarget ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Bool
deploymentIsSoftRebootTarget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Bool
deploymentIsSoftRebootTarget 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_is_soft_reboot_target 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 DeploymentIsSoftRebootTargetMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentIsSoftRebootTargetMethodInfo a signature where
overloadedMethod = deploymentIsSoftRebootTarget
instance O.OverloadedMethodInfo DeploymentIsSoftRebootTargetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentIsSoftRebootTarget",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentIsSoftRebootTarget"
})
#endif
foreign import ccall "ostree_deployment_is_staged" ostree_deployment_is_staged ::
Ptr Deployment ->
IO CInt
deploymentIsStaged ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> m Bool
deploymentIsStaged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> m Bool
deploymentIsStaged 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- ostree_deployment_is_staged 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 DeploymentIsStagedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentIsStagedMethodInfo a signature where
overloadedMethod = deploymentIsStaged
instance O.OverloadedMethodInfo DeploymentIsStagedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentIsStaged",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentIsStaged"
})
#endif
foreign import ccall "ostree_deployment_set_bootconfig" ostree_deployment_set_bootconfig ::
Ptr Deployment ->
Ptr OSTree.BootconfigParser.BootconfigParser ->
IO ()
deploymentSetBootconfig ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a, OSTree.BootconfigParser.IsBootconfigParser b) =>
a
-> Maybe (b)
-> m ()
deploymentSetBootconfig :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDeployment a, IsBootconfigParser b) =>
a -> Maybe b -> m ()
deploymentSetBootconfig a
self Maybe b
bootconfig = 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
maybeBootconfig <- case bootconfig of
Maybe b
Nothing -> Ptr BootconfigParser -> IO (Ptr BootconfigParser)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BootconfigParser
forall a. Ptr a
FP.nullPtr
Just b
jBootconfig -> do
jBootconfig' <- b -> IO (Ptr BootconfigParser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jBootconfig
return jBootconfig'
ostree_deployment_set_bootconfig self' maybeBootconfig
touchManagedPtr self
whenJust bootconfig touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data DeploymentSetBootconfigMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDeployment a, OSTree.BootconfigParser.IsBootconfigParser b) => O.OverloadedMethod DeploymentSetBootconfigMethodInfo a signature where
overloadedMethod = deploymentSetBootconfig
instance O.OverloadedMethodInfo DeploymentSetBootconfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentSetBootconfig",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentSetBootconfig"
})
#endif
foreign import ccall "ostree_deployment_set_bootserial" ostree_deployment_set_bootserial ::
Ptr Deployment ->
Int32 ->
IO ()
deploymentSetBootserial ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> Int32
-> m ()
deploymentSetBootserial :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> Int32 -> m ()
deploymentSetBootserial a
self Int32
index = 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
ostree_deployment_set_bootserial self' index
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data DeploymentSetBootserialMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentSetBootserialMethodInfo a signature where
overloadedMethod = deploymentSetBootserial
instance O.OverloadedMethodInfo DeploymentSetBootserialMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentSetBootserial",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentSetBootserial"
})
#endif
foreign import ccall "ostree_deployment_set_index" ostree_deployment_set_index ::
Ptr Deployment ->
Int32 ->
IO ()
deploymentSetIndex ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> Int32
-> m ()
deploymentSetIndex :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> Int32 -> m ()
deploymentSetIndex a
self Int32
index = 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
ostree_deployment_set_index self' index
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data DeploymentSetIndexMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentSetIndexMethodInfo a signature where
overloadedMethod = deploymentSetIndex
instance O.OverloadedMethodInfo DeploymentSetIndexMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentSetIndex",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentSetIndex"
})
#endif
foreign import ccall "ostree_deployment_set_origin" ostree_deployment_set_origin ::
Ptr Deployment ->
Ptr GLib.KeyFile.KeyFile ->
IO ()
deploymentSetOrigin ::
(B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
a
-> Maybe (GLib.KeyFile.KeyFile)
-> m ()
deploymentSetOrigin :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeployment a) =>
a -> Maybe KeyFile -> m ()
deploymentSetOrigin a
self Maybe KeyFile
origin = 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 Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
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'
ostree_deployment_set_origin self' maybeOrigin
touchManagedPtr self
whenJust origin touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data DeploymentSetOriginMethodInfo
instance (signature ~ (Maybe (GLib.KeyFile.KeyFile) -> m ()), MonadIO m, IsDeployment a) => O.OverloadedMethod DeploymentSetOriginMethodInfo a signature where
overloadedMethod = deploymentSetOrigin
instance O.OverloadedMethodInfo DeploymentSetOriginMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.OSTree.Objects.Deployment.deploymentSetOrigin",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Objects-Deployment.html#v:deploymentSetOrigin"
})
#endif
foreign import ccall "ostree_deployment_origin_remove_transient_state" ostree_deployment_origin_remove_transient_state ::
Ptr GLib.KeyFile.KeyFile ->
IO ()
deploymentOriginRemoveTransientState ::
(B.CallStack.HasCallStack, MonadIO m) =>
GLib.KeyFile.KeyFile
-> m ()
deploymentOriginRemoveTransientState :: forall (m :: * -> *). (HasCallStack, MonadIO m) => KeyFile -> m ()
deploymentOriginRemoveTransientState KeyFile
origin = 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
origin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
origin
ostree_deployment_origin_remove_transient_state origin'
touchManagedPtr origin
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_deployment_unlocked_state_to_string" ostree_deployment_unlocked_state_to_string ::
CUInt ->
IO CString
deploymentUnlockedStateToString ::
(B.CallStack.HasCallStack, MonadIO m) =>
OSTree.Enums.DeploymentUnlockedState
-> m T.Text
deploymentUnlockedStateToString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DeploymentUnlockedState -> m Text
deploymentUnlockedStateToString DeploymentUnlockedState
state = 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
let state' :: CUInt
state' = (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
state
result <- CUInt -> IO CString
ostree_deployment_unlocked_state_to_string CUInt
state'
checkUnexpectedReturnNULL "deploymentUnlockedStateToString" result
result' <- cstringToText result
return result'
#if defined(ENABLE_OVERLOADING)
#endif