{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Structs.DBusNodeInfo
(
DBusNodeInfo(..) ,
newZeroDBusNodeInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusNodeInfoMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusNodeInfoGenerateXmlMethodInfo ,
#endif
dBusNodeInfoGenerateXml ,
#if defined(ENABLE_OVERLOADING)
DBusNodeInfoLookupInterfaceMethodInfo ,
#endif
dBusNodeInfoLookupInterface ,
dBusNodeInfoNewForXml ,
#if defined(ENABLE_OVERLOADING)
DBusNodeInfoRefMethodInfo ,
#endif
dBusNodeInfoRef ,
#if defined(ENABLE_OVERLOADING)
DBusNodeInfoUnrefMethodInfo ,
#endif
dBusNodeInfoUnref ,
clearDBusNodeInfoAnnotations ,
#if defined(ENABLE_OVERLOADING)
dBusNodeInfo_annotations ,
#endif
getDBusNodeInfoAnnotations ,
setDBusNodeInfoAnnotations ,
clearDBusNodeInfoInterfaces ,
#if defined(ENABLE_OVERLOADING)
dBusNodeInfo_interfaces ,
#endif
getDBusNodeInfoInterfaces ,
setDBusNodeInfoInterfaces ,
clearDBusNodeInfoNodes ,
#if defined(ENABLE_OVERLOADING)
dBusNodeInfo_nodes ,
#endif
getDBusNodeInfoNodes ,
setDBusNodeInfoNodes ,
clearDBusNodeInfoPath ,
#if defined(ENABLE_OVERLOADING)
dBusNodeInfo_path ,
#endif
getDBusNodeInfoPath ,
setDBusNodeInfoPath ,
#if defined(ENABLE_OVERLOADING)
dBusNodeInfo_refCount ,
#endif
getDBusNodeInfoRefCount ,
setDBusNodeInfoRefCount ,
) 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.String as GLib.String
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusArgInfo as Gio.DBusArgInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusMethodInfo as Gio.DBusMethodInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusPropertyInfo as Gio.DBusPropertyInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSignalInfo as Gio.DBusSignalInfo
#else
import qualified GI.GLib.Structs.String as GLib.String
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
#endif
newtype DBusNodeInfo = DBusNodeInfo (SP.ManagedPtr DBusNodeInfo)
deriving (DBusNodeInfo -> DBusNodeInfo -> Bool
(DBusNodeInfo -> DBusNodeInfo -> Bool)
-> (DBusNodeInfo -> DBusNodeInfo -> Bool) -> Eq DBusNodeInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBusNodeInfo -> DBusNodeInfo -> Bool
== :: DBusNodeInfo -> DBusNodeInfo -> Bool
$c/= :: DBusNodeInfo -> DBusNodeInfo -> Bool
/= :: DBusNodeInfo -> DBusNodeInfo -> Bool
Eq)
instance SP.ManagedPtrNewtype DBusNodeInfo where
toManagedPtr :: DBusNodeInfo -> ManagedPtr DBusNodeInfo
toManagedPtr (DBusNodeInfo ManagedPtr DBusNodeInfo
p) = ManagedPtr DBusNodeInfo
p
foreign import ccall "g_dbus_node_info_get_type" c_g_dbus_node_info_get_type ::
IO GType
type instance O.ParentTypes DBusNodeInfo = '[]
instance O.HasParentTypes DBusNodeInfo
instance B.Types.TypedObject DBusNodeInfo where
glibType :: IO GType
glibType = IO GType
c_g_dbus_node_info_get_type
instance B.Types.GBoxed DBusNodeInfo
instance B.GValue.IsGValue (Maybe DBusNodeInfo) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_dbus_node_info_get_type
gvalueSet_ :: Ptr GValue -> Maybe DBusNodeInfo -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DBusNodeInfo
P.Nothing = Ptr GValue -> Ptr DBusNodeInfo -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr DBusNodeInfo
forall a. Ptr a
FP.nullPtr :: FP.Ptr DBusNodeInfo)
gvalueSet_ Ptr GValue
gv (P.Just DBusNodeInfo
obj) = DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusNodeInfo
obj (Ptr GValue -> Ptr DBusNodeInfo -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DBusNodeInfo)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr DBusNodeInfo)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr DBusNodeInfo)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newBoxed DBusNodeInfo ptr
else return P.Nothing
newZeroDBusNodeInfo :: MonadIO m => m DBusNodeInfo
newZeroDBusNodeInfo :: forall (m :: * -> *). MonadIO m => m DBusNodeInfo
newZeroDBusNodeInfo = IO DBusNodeInfo -> m DBusNodeInfo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusNodeInfo -> m DBusNodeInfo)
-> IO DBusNodeInfo -> m DBusNodeInfo
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr DBusNodeInfo)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
40 IO (Ptr DBusNodeInfo)
-> (Ptr DBusNodeInfo -> IO DBusNodeInfo) -> IO DBusNodeInfo
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr DBusNodeInfo -> DBusNodeInfo)
-> Ptr DBusNodeInfo -> IO DBusNodeInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DBusNodeInfo -> DBusNodeInfo
DBusNodeInfo
instance tag ~ 'AttrSet => Constructible DBusNodeInfo tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr DBusNodeInfo -> DBusNodeInfo)
-> [AttrOp DBusNodeInfo tag] -> m DBusNodeInfo
new ManagedPtr DBusNodeInfo -> DBusNodeInfo
_ [AttrOp DBusNodeInfo tag]
attrs = do
o <- m DBusNodeInfo
forall (m :: * -> *). MonadIO m => m DBusNodeInfo
newZeroDBusNodeInfo
GI.Attributes.set o attrs
return o
getDBusNodeInfoRefCount :: MonadIO m => DBusNodeInfo -> m Int32
getDBusNodeInfoRefCount :: forall (m :: * -> *). MonadIO m => DBusNodeInfo -> m Int32
getDBusNodeInfoRefCount DBusNodeInfo
s = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO Int32) -> IO Int32)
-> (Ptr DBusNodeInfo -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Int32
return val
setDBusNodeInfoRefCount :: MonadIO m => DBusNodeInfo -> Int32 -> m ()
setDBusNodeInfoRefCount :: forall (m :: * -> *). MonadIO m => DBusNodeInfo -> Int32 -> m ()
setDBusNodeInfoRefCount DBusNodeInfo
s Int32
val = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoRefCountFieldInfo
instance AttrInfo DBusNodeInfoRefCountFieldInfo where
type AttrBaseTypeConstraint DBusNodeInfoRefCountFieldInfo = (~) DBusNodeInfo
type AttrAllowedOps DBusNodeInfoRefCountFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DBusNodeInfoRefCountFieldInfo = (~) Int32
type AttrTransferTypeConstraint DBusNodeInfoRefCountFieldInfo = (~)Int32
type AttrTransferType DBusNodeInfoRefCountFieldInfo = Int32
type AttrGetType DBusNodeInfoRefCountFieldInfo = Int32
type AttrLabel DBusNodeInfoRefCountFieldInfo = "ref_count"
type AttrOrigin DBusNodeInfoRefCountFieldInfo = DBusNodeInfo
attrGet = getDBusNodeInfoRefCount
attrSet = setDBusNodeInfoRefCount
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.refCount"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#g:attr:refCount"
})
dBusNodeInfo_refCount :: AttrLabelProxy "refCount"
dBusNodeInfo_refCount = AttrLabelProxy
#endif
getDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> m (Maybe T.Text)
getDBusNodeInfoPath :: forall (m :: * -> *). MonadIO m => DBusNodeInfo -> m (Maybe Text)
getDBusNodeInfoPath DBusNodeInfo
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ DBusNodeInfo
-> (Ptr DBusNodeInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr DBusNodeInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO CString
result <- SP.convertIfNonNull val $ \CString
val' -> do
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
return val''
return result
setDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> CString -> m ()
setDBusNodeInfoPath :: forall (m :: * -> *). MonadIO m => DBusNodeInfo -> CString -> m ()
setDBusNodeInfoPath DBusNodeInfo
s CString
val = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
val :: CString)
clearDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> m ()
clearDBusNodeInfoPath :: forall (m :: * -> *). MonadIO m => DBusNodeInfo -> m ()
clearDBusNodeInfoPath DBusNodeInfo
s = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoPathFieldInfo
instance AttrInfo DBusNodeInfoPathFieldInfo where
type AttrBaseTypeConstraint DBusNodeInfoPathFieldInfo = (~) DBusNodeInfo
type AttrAllowedOps DBusNodeInfoPathFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusNodeInfoPathFieldInfo = (~) CString
type AttrTransferTypeConstraint DBusNodeInfoPathFieldInfo = (~)CString
type AttrTransferType DBusNodeInfoPathFieldInfo = CString
type AttrGetType DBusNodeInfoPathFieldInfo = Maybe T.Text
type AttrLabel DBusNodeInfoPathFieldInfo = "path"
type AttrOrigin DBusNodeInfoPathFieldInfo = DBusNodeInfo
attrGet = getDBusNodeInfoPath
attrSet = setDBusNodeInfoPath
attrConstruct = undefined
attrClear = clearDBusNodeInfoPath
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.path"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#g:attr:path"
})
dBusNodeInfo_path :: AttrLabelProxy "path"
dBusNodeInfo_path = AttrLabelProxy
#endif
getDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> m (Maybe [Gio.DBusInterfaceInfo.DBusInterfaceInfo])
getDBusNodeInfoInterfaces :: forall (m :: * -> *).
MonadIO m =>
DBusNodeInfo -> m (Maybe [DBusInterfaceInfo])
getDBusNodeInfoInterfaces DBusNodeInfo
s = IO (Maybe [DBusInterfaceInfo]) -> m (Maybe [DBusInterfaceInfo])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [DBusInterfaceInfo]) -> m (Maybe [DBusInterfaceInfo]))
-> IO (Maybe [DBusInterfaceInfo]) -> m (Maybe [DBusInterfaceInfo])
forall a b. (a -> b) -> a -> b
$ DBusNodeInfo
-> (Ptr DBusNodeInfo -> IO (Maybe [DBusInterfaceInfo]))
-> IO (Maybe [DBusInterfaceInfo])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO (Maybe [DBusInterfaceInfo]))
-> IO (Maybe [DBusInterfaceInfo]))
-> (Ptr DBusNodeInfo -> IO (Maybe [DBusInterfaceInfo]))
-> IO (Maybe [DBusInterfaceInfo])
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
val <- Ptr (Ptr (Ptr DBusInterfaceInfo))
-> IO (Ptr (Ptr DBusInterfaceInfo))
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusInterfaceInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO (Ptr (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo))
result <- SP.convertIfNonNull val $ \Ptr (Ptr DBusInterfaceInfo)
val' -> do
val'' <- Ptr (Ptr DBusInterfaceInfo) -> IO [Ptr DBusInterfaceInfo]
forall a. Ptr (Ptr a) -> IO [Ptr a]
unpackZeroTerminatedPtrArray Ptr (Ptr DBusInterfaceInfo)
val'
val''' <- mapM (newBoxed Gio.DBusInterfaceInfo.DBusInterfaceInfo) val''
return val'''
return result
setDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> Ptr (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo) -> m ()
setDBusNodeInfoInterfaces :: forall (m :: * -> *).
MonadIO m =>
DBusNodeInfo -> Ptr (Ptr DBusInterfaceInfo) -> m ()
setDBusNodeInfoInterfaces DBusNodeInfo
s Ptr (Ptr DBusInterfaceInfo)
val = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr (Ptr (Ptr DBusInterfaceInfo))
-> Ptr (Ptr DBusInterfaceInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusInterfaceInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Ptr (Ptr DBusInterfaceInfo)
val :: Ptr (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo))
clearDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> m ()
clearDBusNodeInfoInterfaces :: forall (m :: * -> *). MonadIO m => DBusNodeInfo -> m ()
clearDBusNodeInfoInterfaces DBusNodeInfo
s = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr (Ptr (Ptr DBusInterfaceInfo))
-> Ptr (Ptr DBusInterfaceInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusInterfaceInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Ptr (Ptr DBusInterfaceInfo)
forall a. Ptr a
FP.nullPtr :: Ptr (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo))
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoInterfacesFieldInfo
instance AttrInfo DBusNodeInfoInterfacesFieldInfo where
type AttrBaseTypeConstraint DBusNodeInfoInterfacesFieldInfo = (~) DBusNodeInfo
type AttrAllowedOps DBusNodeInfoInterfacesFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusNodeInfoInterfacesFieldInfo = (~) (Ptr (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo))
type AttrTransferTypeConstraint DBusNodeInfoInterfacesFieldInfo = (~)(Ptr (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo))
type AttrTransferType DBusNodeInfoInterfacesFieldInfo = (Ptr (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo))
type AttrGetType DBusNodeInfoInterfacesFieldInfo = Maybe [Gio.DBusInterfaceInfo.DBusInterfaceInfo]
type AttrLabel DBusNodeInfoInterfacesFieldInfo = "interfaces"
type AttrOrigin DBusNodeInfoInterfacesFieldInfo = DBusNodeInfo
attrGet = getDBusNodeInfoInterfaces
attrSet = setDBusNodeInfoInterfaces
attrConstruct = undefined
attrClear = clearDBusNodeInfoInterfaces
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.interfaces"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#g:attr:interfaces"
})
dBusNodeInfo_interfaces :: AttrLabelProxy "interfaces"
dBusNodeInfo_interfaces = AttrLabelProxy
#endif
getDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> m (Maybe [DBusNodeInfo])
getDBusNodeInfoNodes :: forall (m :: * -> *).
MonadIO m =>
DBusNodeInfo -> m (Maybe [DBusNodeInfo])
getDBusNodeInfoNodes DBusNodeInfo
s = IO (Maybe [DBusNodeInfo]) -> m (Maybe [DBusNodeInfo])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [DBusNodeInfo]) -> m (Maybe [DBusNodeInfo]))
-> IO (Maybe [DBusNodeInfo]) -> m (Maybe [DBusNodeInfo])
forall a b. (a -> b) -> a -> b
$ DBusNodeInfo
-> (Ptr DBusNodeInfo -> IO (Maybe [DBusNodeInfo]))
-> IO (Maybe [DBusNodeInfo])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO (Maybe [DBusNodeInfo]))
-> IO (Maybe [DBusNodeInfo]))
-> (Ptr DBusNodeInfo -> IO (Maybe [DBusNodeInfo]))
-> IO (Maybe [DBusNodeInfo])
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
val <- Ptr (Ptr (Ptr DBusNodeInfo)) -> IO (Ptr (Ptr DBusNodeInfo))
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusNodeInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO (Ptr (Ptr DBusNodeInfo))
result <- SP.convertIfNonNull val $ \Ptr (Ptr DBusNodeInfo)
val' -> do
val'' <- Ptr (Ptr DBusNodeInfo) -> IO [Ptr DBusNodeInfo]
forall a. Ptr (Ptr a) -> IO [Ptr a]
unpackZeroTerminatedPtrArray Ptr (Ptr DBusNodeInfo)
val'
val''' <- mapM (newBoxed DBusNodeInfo) val''
return val'''
return result
setDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> Ptr (Ptr DBusNodeInfo) -> m ()
setDBusNodeInfoNodes :: forall (m :: * -> *).
MonadIO m =>
DBusNodeInfo -> Ptr (Ptr DBusNodeInfo) -> m ()
setDBusNodeInfoNodes DBusNodeInfo
s Ptr (Ptr DBusNodeInfo)
val = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr (Ptr (Ptr DBusNodeInfo)) -> Ptr (Ptr DBusNodeInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusNodeInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Ptr (Ptr DBusNodeInfo)
val :: Ptr (Ptr DBusNodeInfo))
clearDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> m ()
clearDBusNodeInfoNodes :: forall (m :: * -> *). MonadIO m => DBusNodeInfo -> m ()
clearDBusNodeInfoNodes DBusNodeInfo
s = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr (Ptr (Ptr DBusNodeInfo)) -> Ptr (Ptr DBusNodeInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusNodeInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Ptr (Ptr DBusNodeInfo)
forall a. Ptr a
FP.nullPtr :: Ptr (Ptr DBusNodeInfo))
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoNodesFieldInfo
instance AttrInfo DBusNodeInfoNodesFieldInfo where
type AttrBaseTypeConstraint DBusNodeInfoNodesFieldInfo = (~) DBusNodeInfo
type AttrAllowedOps DBusNodeInfoNodesFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusNodeInfoNodesFieldInfo = (~) (Ptr (Ptr DBusNodeInfo))
type AttrTransferTypeConstraint DBusNodeInfoNodesFieldInfo = (~)(Ptr (Ptr DBusNodeInfo))
type AttrTransferType DBusNodeInfoNodesFieldInfo = (Ptr (Ptr DBusNodeInfo))
type AttrGetType DBusNodeInfoNodesFieldInfo = Maybe [DBusNodeInfo]
type AttrLabel DBusNodeInfoNodesFieldInfo = "nodes"
type AttrOrigin DBusNodeInfoNodesFieldInfo = DBusNodeInfo
attrGet = getDBusNodeInfoNodes
attrSet = setDBusNodeInfoNodes
attrConstruct = undefined
attrClear = clearDBusNodeInfoNodes
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.nodes"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#g:attr:nodes"
})
dBusNodeInfo_nodes :: AttrLabelProxy "nodes"
dBusNodeInfo_nodes = AttrLabelProxy
#endif
getDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> m (Maybe [Gio.DBusAnnotationInfo.DBusAnnotationInfo])
getDBusNodeInfoAnnotations :: forall (m :: * -> *).
MonadIO m =>
DBusNodeInfo -> m (Maybe [DBusAnnotationInfo])
getDBusNodeInfoAnnotations DBusNodeInfo
s = IO (Maybe [DBusAnnotationInfo]) -> m (Maybe [DBusAnnotationInfo])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [DBusAnnotationInfo]) -> m (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo])
-> m (Maybe [DBusAnnotationInfo])
forall a b. (a -> b) -> a -> b
$ DBusNodeInfo
-> (Ptr DBusNodeInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo]))
-> (Ptr DBusNodeInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo])
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
val <- Ptr (Ptr (Ptr DBusAnnotationInfo))
-> IO (Ptr (Ptr DBusAnnotationInfo))
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
result <- SP.convertIfNonNull val $ \Ptr (Ptr DBusAnnotationInfo)
val' -> do
val'' <- Ptr (Ptr DBusAnnotationInfo) -> IO [Ptr DBusAnnotationInfo]
forall a. Ptr (Ptr a) -> IO [Ptr a]
unpackZeroTerminatedPtrArray Ptr (Ptr DBusAnnotationInfo)
val'
val''' <- mapM (newBoxed Gio.DBusAnnotationInfo.DBusAnnotationInfo) val''
return val'''
return result
setDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo) -> m ()
setDBusNodeInfoAnnotations :: forall (m :: * -> *).
MonadIO m =>
DBusNodeInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()
setDBusNodeInfoAnnotations DBusNodeInfo
s Ptr (Ptr DBusAnnotationInfo)
val = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr (Ptr (Ptr DBusAnnotationInfo))
-> Ptr (Ptr DBusAnnotationInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Ptr (Ptr DBusAnnotationInfo)
val :: Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
clearDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> m ()
clearDBusNodeInfoAnnotations :: forall (m :: * -> *). MonadIO m => DBusNodeInfo -> m ()
clearDBusNodeInfoAnnotations DBusNodeInfo
s = 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
$ DBusNodeInfo -> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusNodeInfo
s ((Ptr DBusNodeInfo -> IO ()) -> IO ())
-> (Ptr DBusNodeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusNodeInfo
ptr -> do
Ptr (Ptr (Ptr DBusAnnotationInfo))
-> Ptr (Ptr DBusAnnotationInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusNodeInfo
ptr Ptr DBusNodeInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Ptr (Ptr DBusAnnotationInfo)
forall a. Ptr a
FP.nullPtr :: Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoAnnotationsFieldInfo
instance AttrInfo DBusNodeInfoAnnotationsFieldInfo where
type AttrBaseTypeConstraint DBusNodeInfoAnnotationsFieldInfo = (~) DBusNodeInfo
type AttrAllowedOps DBusNodeInfoAnnotationsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusNodeInfoAnnotationsFieldInfo = (~) (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrTransferTypeConstraint DBusNodeInfoAnnotationsFieldInfo = (~)(Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrTransferType DBusNodeInfoAnnotationsFieldInfo = (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrGetType DBusNodeInfoAnnotationsFieldInfo = Maybe [Gio.DBusAnnotationInfo.DBusAnnotationInfo]
type AttrLabel DBusNodeInfoAnnotationsFieldInfo = "annotations"
type AttrOrigin DBusNodeInfoAnnotationsFieldInfo = DBusNodeInfo
attrGet = getDBusNodeInfoAnnotations
attrSet = setDBusNodeInfoAnnotations
attrConstruct = undefined
attrClear = clearDBusNodeInfoAnnotations
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.annotations"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#g:attr:annotations"
})
dBusNodeInfo_annotations :: AttrLabelProxy "annotations"
dBusNodeInfo_annotations = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusNodeInfo
type instance O.AttributeList DBusNodeInfo = DBusNodeInfoAttributeList
type DBusNodeInfoAttributeList = ('[ '("refCount", DBusNodeInfoRefCountFieldInfo), '("path", DBusNodeInfoPathFieldInfo), '("interfaces", DBusNodeInfoInterfacesFieldInfo), '("nodes", DBusNodeInfoNodesFieldInfo), '("annotations", DBusNodeInfoAnnotationsFieldInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_dbus_node_info_new_for_xml" g_dbus_node_info_new_for_xml ::
CString ->
Ptr (Ptr GError) ->
IO (Ptr DBusNodeInfo)
dBusNodeInfoNewForXml ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m DBusNodeInfo
dBusNodeInfoNewForXml :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m DBusNodeInfo
dBusNodeInfoNewForXml Text
xmlData = IO DBusNodeInfo -> m DBusNodeInfo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusNodeInfo -> m DBusNodeInfo)
-> IO DBusNodeInfo -> m DBusNodeInfo
forall a b. (a -> b) -> a -> b
$ do
xmlData' <- Text -> IO CString
textToCString Text
xmlData
onException (do
result <- propagateGError $ g_dbus_node_info_new_for_xml xmlData'
checkUnexpectedReturnNULL "dBusNodeInfoNewForXml" result
result' <- (wrapBoxed DBusNodeInfo) result
freeMem xmlData'
return result'
) (do
freeMem xmlData'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_node_info_generate_xml" g_dbus_node_info_generate_xml ::
Ptr DBusNodeInfo ->
Word32 ->
Ptr GLib.String.String ->
IO ()
dBusNodeInfoGenerateXml ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusNodeInfo
-> Word32
-> GLib.String.String
-> m ()
dBusNodeInfoGenerateXml :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DBusNodeInfo -> Word32 -> String -> m ()
dBusNodeInfoGenerateXml DBusNodeInfo
info Word32
indent String
stringBuilder = 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
info' <- DBusNodeInfo -> IO (Ptr DBusNodeInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusNodeInfo
info
stringBuilder' <- unsafeManagedPtrGetPtr stringBuilder
g_dbus_node_info_generate_xml info' indent stringBuilder'
touchManagedPtr info
touchManagedPtr stringBuilder
return ()
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoGenerateXmlMethodInfo
instance (signature ~ (Word32 -> GLib.String.String -> m ()), MonadIO m) => O.OverloadedMethod DBusNodeInfoGenerateXmlMethodInfo DBusNodeInfo signature where
overloadedMethod = dBusNodeInfoGenerateXml
instance O.OverloadedMethodInfo DBusNodeInfoGenerateXmlMethodInfo DBusNodeInfo where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.dBusNodeInfoGenerateXml",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#v:dBusNodeInfoGenerateXml"
})
#endif
foreign import ccall "g_dbus_node_info_lookup_interface" g_dbus_node_info_lookup_interface ::
Ptr DBusNodeInfo ->
CString ->
IO (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo)
dBusNodeInfoLookupInterface ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusNodeInfo
-> T.Text
-> m (Maybe Gio.DBusInterfaceInfo.DBusInterfaceInfo)
dBusNodeInfoLookupInterface :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DBusNodeInfo -> Text -> m (Maybe DBusInterfaceInfo)
dBusNodeInfoLookupInterface DBusNodeInfo
info Text
name = IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo))
-> IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo)
forall a b. (a -> b) -> a -> b
$ do
info' <- DBusNodeInfo -> IO (Ptr DBusNodeInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusNodeInfo
info
name' <- textToCString name
result <- g_dbus_node_info_lookup_interface info' name'
maybeResult <- convertIfNonNull result $ \Ptr DBusInterfaceInfo
result' -> do
result'' <- ((ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo)
-> Ptr DBusInterfaceInfo -> IO DBusInterfaceInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo
Gio.DBusInterfaceInfo.DBusInterfaceInfo) Ptr DBusInterfaceInfo
result'
return result''
touchManagedPtr info
freeMem name'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoLookupInterfaceMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gio.DBusInterfaceInfo.DBusInterfaceInfo)), MonadIO m) => O.OverloadedMethod DBusNodeInfoLookupInterfaceMethodInfo DBusNodeInfo signature where
overloadedMethod = dBusNodeInfoLookupInterface
instance O.OverloadedMethodInfo DBusNodeInfoLookupInterfaceMethodInfo DBusNodeInfo where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.dBusNodeInfoLookupInterface",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#v:dBusNodeInfoLookupInterface"
})
#endif
foreign import ccall "g_dbus_node_info_ref" g_dbus_node_info_ref ::
Ptr DBusNodeInfo ->
IO (Ptr DBusNodeInfo)
dBusNodeInfoRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusNodeInfo
-> m DBusNodeInfo
dBusNodeInfoRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DBusNodeInfo -> m DBusNodeInfo
dBusNodeInfoRef DBusNodeInfo
info = IO DBusNodeInfo -> m DBusNodeInfo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusNodeInfo -> m DBusNodeInfo)
-> IO DBusNodeInfo -> m DBusNodeInfo
forall a b. (a -> b) -> a -> b
$ do
info' <- DBusNodeInfo -> IO (Ptr DBusNodeInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusNodeInfo
info
result <- g_dbus_node_info_ref info'
checkUnexpectedReturnNULL "dBusNodeInfoRef" result
result' <- (wrapBoxed DBusNodeInfo) result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoRefMethodInfo
instance (signature ~ (m DBusNodeInfo), MonadIO m) => O.OverloadedMethod DBusNodeInfoRefMethodInfo DBusNodeInfo signature where
overloadedMethod = dBusNodeInfoRef
instance O.OverloadedMethodInfo DBusNodeInfoRefMethodInfo DBusNodeInfo where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.dBusNodeInfoRef",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#v:dBusNodeInfoRef"
})
#endif
foreign import ccall "g_dbus_node_info_unref" g_dbus_node_info_unref ::
Ptr DBusNodeInfo ->
IO ()
dBusNodeInfoUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusNodeInfo
-> m ()
dBusNodeInfoUnref :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DBusNodeInfo -> m ()
dBusNodeInfoUnref DBusNodeInfo
info = 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
info' <- DBusNodeInfo -> IO (Ptr DBusNodeInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusNodeInfo
info
g_dbus_node_info_unref info'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data DBusNodeInfoUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod DBusNodeInfoUnrefMethodInfo DBusNodeInfo signature where
overloadedMethod = dBusNodeInfoUnref
instance O.OverloadedMethodInfo DBusNodeInfoUnrefMethodInfo DBusNodeInfo where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusNodeInfo.dBusNodeInfoUnref",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusNodeInfo.html#v:dBusNodeInfoUnref"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusNodeInfoMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDBusNodeInfoMethod "generateXml" o = DBusNodeInfoGenerateXmlMethodInfo
ResolveDBusNodeInfoMethod "lookupInterface" o = DBusNodeInfoLookupInterfaceMethodInfo
ResolveDBusNodeInfoMethod "ref" o = DBusNodeInfoRefMethodInfo
ResolveDBusNodeInfoMethod "unref" o = DBusNodeInfoUnrefMethodInfo
ResolveDBusNodeInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusNodeInfoMethod t DBusNodeInfo, O.OverloadedMethod info DBusNodeInfo p) => OL.IsLabel t (DBusNodeInfo -> 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 ~ ResolveDBusNodeInfoMethod t DBusNodeInfo, O.OverloadedMethod info DBusNodeInfo p, R.HasField t DBusNodeInfo p) => R.HasField t DBusNodeInfo p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDBusNodeInfoMethod t DBusNodeInfo, O.OverloadedMethodInfo info DBusNodeInfo) => OL.IsLabel t (O.MethodProxy info DBusNodeInfo) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif