gi-ostree-1.0.8: GI/OSTree/Objects/BootconfigParser.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
/No description available in the introspection data./
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.OSTree.Objects.BootconfigParser
(
-- * Exported types
BootconfigParser(..) ,
IsBootconfigParser ,
toBootconfigParser ,
noBootconfigParser ,
-- * Methods
-- ** clone #method:clone#
#if ENABLE_OVERLOADING
BootconfigParserCloneMethodInfo ,
#endif
bootconfigParserClone ,
-- ** get #method:get#
#if ENABLE_OVERLOADING
BootconfigParserGetMethodInfo ,
#endif
bootconfigParserGet ,
-- ** new #method:new#
bootconfigParserNew ,
-- ** parse #method:parse#
#if ENABLE_OVERLOADING
BootconfigParserParseMethodInfo ,
#endif
bootconfigParserParse ,
-- ** parseAt #method:parseAt#
#if ENABLE_OVERLOADING
BootconfigParserParseAtMethodInfo ,
#endif
bootconfigParserParseAt ,
-- ** set #method:set#
#if ENABLE_OVERLOADING
BootconfigParserSetMethodInfo ,
#endif
bootconfigParserSet ,
-- ** write #method:write#
#if ENABLE_OVERLOADING
BootconfigParserWriteMethodInfo ,
#endif
bootconfigParserWrite ,
-- ** writeAt #method:writeAt#
#if ENABLE_OVERLOADING
BootconfigParserWriteAtMethodInfo ,
#endif
bootconfigParserWriteAt ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
-- | Memory-managed wrapper type.
newtype BootconfigParser = BootconfigParser (ManagedPtr BootconfigParser)
foreign import ccall "ostree_bootconfig_parser_get_type"
c_ostree_bootconfig_parser_get_type :: IO GType
instance GObject BootconfigParser where
gobjectType = c_ostree_bootconfig_parser_get_type
-- | Type class for types which can be safely cast to `BootconfigParser`, for instance with `toBootconfigParser`.
class (GObject o, O.IsDescendantOf BootconfigParser o) => IsBootconfigParser o
instance (GObject o, O.IsDescendantOf BootconfigParser o) => IsBootconfigParser o
instance O.HasParentTypes BootconfigParser
type instance O.ParentTypes BootconfigParser = '[GObject.Object.Object]
-- | Cast to `BootconfigParser`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toBootconfigParser :: (MonadIO m, IsBootconfigParser o) => o -> m BootconfigParser
toBootconfigParser = liftIO . unsafeCastTo BootconfigParser
-- | A convenience alias for `Nothing` :: `Maybe` `BootconfigParser`.
noBootconfigParser :: Maybe BootconfigParser
noBootconfigParser = Nothing
#if ENABLE_OVERLOADING
type family ResolveBootconfigParserMethod (t :: Symbol) (o :: *) :: * where
ResolveBootconfigParserMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveBootconfigParserMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveBootconfigParserMethod "clone" o = BootconfigParserCloneMethodInfo
ResolveBootconfigParserMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveBootconfigParserMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveBootconfigParserMethod "get" o = BootconfigParserGetMethodInfo
ResolveBootconfigParserMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveBootconfigParserMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveBootconfigParserMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveBootconfigParserMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveBootconfigParserMethod "parse" o = BootconfigParserParseMethodInfo
ResolveBootconfigParserMethod "parseAt" o = BootconfigParserParseAtMethodInfo
ResolveBootconfigParserMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveBootconfigParserMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveBootconfigParserMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveBootconfigParserMethod "set" o = BootconfigParserSetMethodInfo
ResolveBootconfigParserMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveBootconfigParserMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveBootconfigParserMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveBootconfigParserMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveBootconfigParserMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveBootconfigParserMethod "write" o = BootconfigParserWriteMethodInfo
ResolveBootconfigParserMethod "writeAt" o = BootconfigParserWriteAtMethodInfo
ResolveBootconfigParserMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveBootconfigParserMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveBootconfigParserMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveBootconfigParserMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveBootconfigParserMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveBootconfigParserMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBootconfigParserMethod t BootconfigParser, O.MethodInfo info BootconfigParser p) => OL.IsLabel t (BootconfigParser -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList BootconfigParser
type instance O.AttributeList BootconfigParser = BootconfigParserAttributeList
type BootconfigParserAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList BootconfigParser = BootconfigParserSignalList
type BootconfigParserSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
-- method BootconfigParser::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}))
-- throws : False
-- Skip return : False
foreign import ccall "ostree_bootconfig_parser_new" ostree_bootconfig_parser_new ::
IO (Ptr BootconfigParser)
{- |
/No description available in the introspection data./
-}
bootconfigParserNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m BootconfigParser
bootconfigParserNew = liftIO $ do
result <- ostree_bootconfig_parser_new
checkUnexpectedReturnNULL "bootconfigParserNew" result
result' <- (wrapObject BootconfigParser) result
return result'
#if ENABLE_OVERLOADING
#endif
-- method BootconfigParser::clone
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Bootconfig to clone", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}))
-- throws : False
-- Skip return : False
foreign import ccall "ostree_bootconfig_parser_clone" ostree_bootconfig_parser_clone ::
Ptr BootconfigParser -> -- self : TInterface (Name {namespace = "OSTree", name = "BootconfigParser"})
IO (Ptr BootconfigParser)
{- |
/No description available in the introspection data./
-}
bootconfigParserClone ::
(B.CallStack.HasCallStack, MonadIO m, IsBootconfigParser a) =>
a
{- ^ /@self@/: Bootconfig to clone -}
-> m BootconfigParser
{- ^ __Returns:__ Copy of /@self@/ -}
bootconfigParserClone self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- ostree_bootconfig_parser_clone self'
checkUnexpectedReturnNULL "bootconfigParserClone" result
result' <- (wrapObject BootconfigParser) result
touchManagedPtr self
return result'
#if ENABLE_OVERLOADING
data BootconfigParserCloneMethodInfo
instance (signature ~ (m BootconfigParser), MonadIO m, IsBootconfigParser a) => O.MethodInfo BootconfigParserCloneMethodInfo a signature where
overloadedMethod _ = bootconfigParserClone
#endif
-- method BootconfigParser::get
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "ostree_bootconfig_parser_get" ostree_bootconfig_parser_get ::
Ptr BootconfigParser -> -- self : TInterface (Name {namespace = "OSTree", name = "BootconfigParser"})
CString -> -- key : TBasicType TUTF8
IO CString
{- |
/No description available in the introspection data./
-}
bootconfigParserGet ::
(B.CallStack.HasCallStack, MonadIO m, IsBootconfigParser a) =>
a
-> T.Text
-> m T.Text
bootconfigParserGet self key = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
key' <- textToCString key
result <- ostree_bootconfig_parser_get self' key'
checkUnexpectedReturnNULL "bootconfigParserGet" result
result' <- cstringToText result
touchManagedPtr self
freeMem key'
return result'
#if ENABLE_OVERLOADING
data BootconfigParserGetMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsBootconfigParser a) => O.MethodInfo BootconfigParserGetMethodInfo a signature where
overloadedMethod _ = bootconfigParserGet
#endif
-- method BootconfigParser::parse
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False
foreign import ccall "ostree_bootconfig_parser_parse" ostree_bootconfig_parser_parse ::
Ptr BootconfigParser -> -- self : TInterface (Name {namespace = "OSTree", name = "BootconfigParser"})
Ptr Gio.File.File -> -- path : TInterface (Name {namespace = "Gio", name = "File"})
Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
Ptr (Ptr GError) -> -- error
IO CInt
{- |
/No description available in the introspection data./
-}
bootconfigParserParse ::
(B.CallStack.HasCallStack, MonadIO m, IsBootconfigParser a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Maybe (c)
-> m ()
{- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
bootconfigParserParse self path cancellable = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
path' <- unsafeManagedPtrCastPtr path
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_bootconfig_parser_parse self' path' maybeCancellable
touchManagedPtr self
touchManagedPtr path
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data BootconfigParserParseMethodInfo
instance (signature ~ (b -> Maybe (c) -> m ()), MonadIO m, IsBootconfigParser a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) => O.MethodInfo BootconfigParserParseMethodInfo a signature where
overloadedMethod _ = bootconfigParserParse
#endif
-- method BootconfigParser::parse_at
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Parser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dfd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Directory fd", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "File path", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Cancellable", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False
foreign import ccall "ostree_bootconfig_parser_parse_at" ostree_bootconfig_parser_parse_at ::
Ptr BootconfigParser -> -- self : TInterface (Name {namespace = "OSTree", name = "BootconfigParser"})
Int32 -> -- dfd : TBasicType TInt
CString -> -- path : TBasicType TUTF8
Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
Ptr (Ptr GError) -> -- error
IO CInt
{- |
Initialize a bootconfig from the given file.
-}
bootconfigParserParseAt ::
(B.CallStack.HasCallStack, MonadIO m, IsBootconfigParser a, Gio.Cancellable.IsCancellable b) =>
a
{- ^ /@self@/: Parser -}
-> Int32
{- ^ /@dfd@/: Directory fd -}
-> T.Text
{- ^ /@path@/: File path -}
-> Maybe (b)
{- ^ /@cancellable@/: Cancellable -}
-> m ()
{- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
bootconfigParserParseAt self dfd path cancellable = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
path' <- textToCString path
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_bootconfig_parser_parse_at self' dfd path' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
freeMem path'
return ()
) (do
freeMem path'
)
#if ENABLE_OVERLOADING
data BootconfigParserParseAtMethodInfo
instance (signature ~ (Int32 -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsBootconfigParser a, Gio.Cancellable.IsCancellable b) => O.MethodInfo BootconfigParserParseAtMethodInfo a signature where
overloadedMethod _ = bootconfigParserParseAt
#endif
-- method BootconfigParser::set
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ostree_bootconfig_parser_set" ostree_bootconfig_parser_set ::
Ptr BootconfigParser -> -- self : TInterface (Name {namespace = "OSTree", name = "BootconfigParser"})
CString -> -- key : TBasicType TUTF8
CString -> -- value : TBasicType TUTF8
IO ()
{- |
/No description available in the introspection data./
-}
bootconfigParserSet ::
(B.CallStack.HasCallStack, MonadIO m, IsBootconfigParser a) =>
a
-> T.Text
-> T.Text
-> m ()
bootconfigParserSet self key value = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
key' <- textToCString key
value' <- textToCString value
ostree_bootconfig_parser_set self' key' value'
touchManagedPtr self
freeMem key'
freeMem value'
return ()
#if ENABLE_OVERLOADING
data BootconfigParserSetMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsBootconfigParser a) => O.MethodInfo BootconfigParserSetMethodInfo a signature where
overloadedMethod _ = bootconfigParserSet
#endif
-- method BootconfigParser::write
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "output", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False
foreign import ccall "ostree_bootconfig_parser_write" ostree_bootconfig_parser_write ::
Ptr BootconfigParser -> -- self : TInterface (Name {namespace = "OSTree", name = "BootconfigParser"})
Ptr Gio.File.File -> -- output : TInterface (Name {namespace = "Gio", name = "File"})
Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
Ptr (Ptr GError) -> -- error
IO CInt
{- |
/No description available in the introspection data./
-}
bootconfigParserWrite ::
(B.CallStack.HasCallStack, MonadIO m, IsBootconfigParser a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> Maybe (c)
-> m ()
{- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
bootconfigParserWrite self output cancellable = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
output' <- unsafeManagedPtrCastPtr output
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_bootconfig_parser_write self' output' maybeCancellable
touchManagedPtr self
touchManagedPtr output
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data BootconfigParserWriteMethodInfo
instance (signature ~ (b -> Maybe (c) -> m ()), MonadIO m, IsBootconfigParser a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) => O.MethodInfo BootconfigParserWriteMethodInfo a signature where
overloadedMethod _ = bootconfigParserWrite
#endif
-- method BootconfigParser::write_at
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "OSTree", name = "BootconfigParser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dfd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False
foreign import ccall "ostree_bootconfig_parser_write_at" ostree_bootconfig_parser_write_at ::
Ptr BootconfigParser -> -- self : TInterface (Name {namespace = "OSTree", name = "BootconfigParser"})
Int32 -> -- dfd : TBasicType TInt
CString -> -- path : TBasicType TUTF8
Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
Ptr (Ptr GError) -> -- error
IO CInt
{- |
/No description available in the introspection data./
-}
bootconfigParserWriteAt ::
(B.CallStack.HasCallStack, MonadIO m, IsBootconfigParser a, Gio.Cancellable.IsCancellable b) =>
a
-> Int32
-> T.Text
-> Maybe (b)
-> m ()
{- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
bootconfigParserWriteAt self dfd path cancellable = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
path' <- textToCString path
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ ostree_bootconfig_parser_write_at self' dfd path' maybeCancellable
touchManagedPtr self
whenJust cancellable touchManagedPtr
freeMem path'
return ()
) (do
freeMem path'
)
#if ENABLE_OVERLOADING
data BootconfigParserWriteAtMethodInfo
instance (signature ~ (Int32 -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsBootconfigParser a, Gio.Cancellable.IsCancellable b) => O.MethodInfo BootconfigParserWriteAtMethodInfo a signature where
overloadedMethod _ = bootconfigParserWriteAt
#endif