{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Structs.DBusInterfaceInfo
(
DBusInterfaceInfo(..) ,
newZeroDBusInterfaceInfo ,
noDBusInterfaceInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusInterfaceInfoMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusInterfaceInfoCacheBuildMethodInfo ,
#endif
dBusInterfaceInfoCacheBuild ,
#if defined(ENABLE_OVERLOADING)
DBusInterfaceInfoCacheReleaseMethodInfo ,
#endif
dBusInterfaceInfoCacheRelease ,
#if defined(ENABLE_OVERLOADING)
DBusInterfaceInfoGenerateXmlMethodInfo ,
#endif
dBusInterfaceInfoGenerateXml ,
#if defined(ENABLE_OVERLOADING)
DBusInterfaceInfoLookupMethodMethodInfo ,
#endif
dBusInterfaceInfoLookupMethod ,
#if defined(ENABLE_OVERLOADING)
DBusInterfaceInfoLookupPropertyMethodInfo,
#endif
dBusInterfaceInfoLookupProperty ,
#if defined(ENABLE_OVERLOADING)
DBusInterfaceInfoLookupSignalMethodInfo ,
#endif
dBusInterfaceInfoLookupSignal ,
#if defined(ENABLE_OVERLOADING)
DBusInterfaceInfoRefMethodInfo ,
#endif
dBusInterfaceInfoRef ,
#if defined(ENABLE_OVERLOADING)
DBusInterfaceInfoUnrefMethodInfo ,
#endif
dBusInterfaceInfoUnref ,
clearDBusInterfaceInfoAnnotations ,
#if defined(ENABLE_OVERLOADING)
dBusInterfaceInfo_annotations ,
#endif
getDBusInterfaceInfoAnnotations ,
setDBusInterfaceInfoAnnotations ,
clearDBusInterfaceInfoMethods ,
#if defined(ENABLE_OVERLOADING)
dBusInterfaceInfo_methods ,
#endif
getDBusInterfaceInfoMethods ,
setDBusInterfaceInfoMethods ,
clearDBusInterfaceInfoName ,
#if defined(ENABLE_OVERLOADING)
dBusInterfaceInfo_name ,
#endif
getDBusInterfaceInfoName ,
setDBusInterfaceInfoName ,
clearDBusInterfaceInfoProperties ,
#if defined(ENABLE_OVERLOADING)
dBusInterfaceInfo_properties ,
#endif
getDBusInterfaceInfoProperties ,
setDBusInterfaceInfoProperties ,
#if defined(ENABLE_OVERLOADING)
dBusInterfaceInfo_refCount ,
#endif
getDBusInterfaceInfoRefCount ,
setDBusInterfaceInfoRefCount ,
clearDBusInterfaceInfoSignals ,
#if defined(ENABLE_OVERLOADING)
dBusInterfaceInfo_signals ,
#endif
getDBusInterfaceInfoSignals ,
setDBusInterfaceInfoSignals ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Structs.String as GLib.String
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
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
newtype DBusInterfaceInfo = DBusInterfaceInfo (ManagedPtr DBusInterfaceInfo)
deriving (Eq)
foreign import ccall "g_dbus_interface_info_get_type" c_g_dbus_interface_info_get_type ::
IO GType
instance BoxedObject DBusInterfaceInfo where
boxedType _ = c_g_dbus_interface_info_get_type
instance B.GValue.IsGValue DBusInterfaceInfo where
toGValue o = do
gtype <- c_g_dbus_interface_info_get_type
B.ManagedPtr.withManagedPtr o (B.GValue.buildGValue gtype B.GValue.set_boxed)
fromGValue gv = do
ptr <- B.GValue.get_boxed gv :: IO (Ptr DBusInterfaceInfo)
B.ManagedPtr.newBoxed DBusInterfaceInfo ptr
newZeroDBusInterfaceInfo :: MonadIO m => m DBusInterfaceInfo
newZeroDBusInterfaceInfo = liftIO $ callocBoxedBytes 24 >>= wrapBoxed DBusInterfaceInfo
instance tag ~ 'AttrSet => Constructible DBusInterfaceInfo tag where
new _ attrs = do
o <- newZeroDBusInterfaceInfo
GI.Attributes.set o attrs
return o
noDBusInterfaceInfo :: Maybe DBusInterfaceInfo
noDBusInterfaceInfo = Nothing
getDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> m Int32
getDBusInterfaceInfoRefCount s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Int32
return val
setDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> Int32 -> m ()
setDBusInterfaceInfoRefCount s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (val :: Int32)
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoRefCountFieldInfo
instance AttrInfo DBusInterfaceInfoRefCountFieldInfo where
type AttrBaseTypeConstraint DBusInterfaceInfoRefCountFieldInfo = (~) DBusInterfaceInfo
type AttrAllowedOps DBusInterfaceInfoRefCountFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DBusInterfaceInfoRefCountFieldInfo = (~) Int32
type AttrTransferTypeConstraint DBusInterfaceInfoRefCountFieldInfo = (~)Int32
type AttrTransferType DBusInterfaceInfoRefCountFieldInfo = Int32
type AttrGetType DBusInterfaceInfoRefCountFieldInfo = Int32
type AttrLabel DBusInterfaceInfoRefCountFieldInfo = "ref_count"
type AttrOrigin DBusInterfaceInfoRefCountFieldInfo = DBusInterfaceInfo
attrGet = getDBusInterfaceInfoRefCount
attrSet = setDBusInterfaceInfoRefCount
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dBusInterfaceInfo_refCount :: AttrLabelProxy "refCount"
dBusInterfaceInfo_refCount = AttrLabelProxy
#endif
getDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m (Maybe T.Text)
getDBusInterfaceInfoName s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 4) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> CString -> m ()
setDBusInterfaceInfoName s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 4) (val :: CString)
clearDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m ()
clearDBusInterfaceInfoName s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 4) (FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoNameFieldInfo
instance AttrInfo DBusInterfaceInfoNameFieldInfo where
type AttrBaseTypeConstraint DBusInterfaceInfoNameFieldInfo = (~) DBusInterfaceInfo
type AttrAllowedOps DBusInterfaceInfoNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusInterfaceInfoNameFieldInfo = (~) CString
type AttrTransferTypeConstraint DBusInterfaceInfoNameFieldInfo = (~)CString
type AttrTransferType DBusInterfaceInfoNameFieldInfo = CString
type AttrGetType DBusInterfaceInfoNameFieldInfo = Maybe T.Text
type AttrLabel DBusInterfaceInfoNameFieldInfo = "name"
type AttrOrigin DBusInterfaceInfoNameFieldInfo = DBusInterfaceInfo
attrGet = getDBusInterfaceInfoName
attrSet = setDBusInterfaceInfoName
attrConstruct = undefined
attrClear = clearDBusInterfaceInfoName
attrTransfer _ v = do
return v
dBusInterfaceInfo_name :: AttrLabelProxy "name"
dBusInterfaceInfo_name = AttrLabelProxy
#endif
getDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m (Maybe [Gio.DBusMethodInfo.DBusMethodInfo])
getDBusInterfaceInfoMethods s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO (Ptr (Ptr Gio.DBusMethodInfo.DBusMethodInfo))
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- unpackZeroTerminatedPtrArray val'
val''' <- mapM (newBoxed Gio.DBusMethodInfo.DBusMethodInfo) val''
return val'''
return result
setDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr Gio.DBusMethodInfo.DBusMethodInfo) -> m ()
setDBusInterfaceInfoMethods s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: Ptr (Ptr Gio.DBusMethodInfo.DBusMethodInfo))
clearDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m ()
clearDBusInterfaceInfoMethods s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (FP.nullPtr :: Ptr (Ptr Gio.DBusMethodInfo.DBusMethodInfo))
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoMethodsFieldInfo
instance AttrInfo DBusInterfaceInfoMethodsFieldInfo where
type AttrBaseTypeConstraint DBusInterfaceInfoMethodsFieldInfo = (~) DBusInterfaceInfo
type AttrAllowedOps DBusInterfaceInfoMethodsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusInterfaceInfoMethodsFieldInfo = (~) (Ptr (Ptr Gio.DBusMethodInfo.DBusMethodInfo))
type AttrTransferTypeConstraint DBusInterfaceInfoMethodsFieldInfo = (~)(Ptr (Ptr Gio.DBusMethodInfo.DBusMethodInfo))
type AttrTransferType DBusInterfaceInfoMethodsFieldInfo = (Ptr (Ptr Gio.DBusMethodInfo.DBusMethodInfo))
type AttrGetType DBusInterfaceInfoMethodsFieldInfo = Maybe [Gio.DBusMethodInfo.DBusMethodInfo]
type AttrLabel DBusInterfaceInfoMethodsFieldInfo = "methods"
type AttrOrigin DBusInterfaceInfoMethodsFieldInfo = DBusInterfaceInfo
attrGet = getDBusInterfaceInfoMethods
attrSet = setDBusInterfaceInfoMethods
attrConstruct = undefined
attrClear = clearDBusInterfaceInfoMethods
attrTransfer _ v = do
return v
dBusInterfaceInfo_methods :: AttrLabelProxy "methods"
dBusInterfaceInfo_methods = AttrLabelProxy
#endif
getDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m (Maybe [Gio.DBusSignalInfo.DBusSignalInfo])
getDBusInterfaceInfoSignals s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 12) :: IO (Ptr (Ptr Gio.DBusSignalInfo.DBusSignalInfo))
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- unpackZeroTerminatedPtrArray val'
val''' <- mapM (newBoxed Gio.DBusSignalInfo.DBusSignalInfo) val''
return val'''
return result
setDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr Gio.DBusSignalInfo.DBusSignalInfo) -> m ()
setDBusInterfaceInfoSignals s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 12) (val :: Ptr (Ptr Gio.DBusSignalInfo.DBusSignalInfo))
clearDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m ()
clearDBusInterfaceInfoSignals s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 12) (FP.nullPtr :: Ptr (Ptr Gio.DBusSignalInfo.DBusSignalInfo))
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoSignalsFieldInfo
instance AttrInfo DBusInterfaceInfoSignalsFieldInfo where
type AttrBaseTypeConstraint DBusInterfaceInfoSignalsFieldInfo = (~) DBusInterfaceInfo
type AttrAllowedOps DBusInterfaceInfoSignalsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusInterfaceInfoSignalsFieldInfo = (~) (Ptr (Ptr Gio.DBusSignalInfo.DBusSignalInfo))
type AttrTransferTypeConstraint DBusInterfaceInfoSignalsFieldInfo = (~)(Ptr (Ptr Gio.DBusSignalInfo.DBusSignalInfo))
type AttrTransferType DBusInterfaceInfoSignalsFieldInfo = (Ptr (Ptr Gio.DBusSignalInfo.DBusSignalInfo))
type AttrGetType DBusInterfaceInfoSignalsFieldInfo = Maybe [Gio.DBusSignalInfo.DBusSignalInfo]
type AttrLabel DBusInterfaceInfoSignalsFieldInfo = "signals"
type AttrOrigin DBusInterfaceInfoSignalsFieldInfo = DBusInterfaceInfo
attrGet = getDBusInterfaceInfoSignals
attrSet = setDBusInterfaceInfoSignals
attrConstruct = undefined
attrClear = clearDBusInterfaceInfoSignals
attrTransfer _ v = do
return v
dBusInterfaceInfo_signals :: AttrLabelProxy "signals"
dBusInterfaceInfo_signals = AttrLabelProxy
#endif
getDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m (Maybe [Gio.DBusPropertyInfo.DBusPropertyInfo])
getDBusInterfaceInfoProperties s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO (Ptr (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo))
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- unpackZeroTerminatedPtrArray val'
val''' <- mapM (newBoxed Gio.DBusPropertyInfo.DBusPropertyInfo) val''
return val'''
return result
setDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo) -> m ()
setDBusInterfaceInfoProperties s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: Ptr (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo))
clearDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m ()
clearDBusInterfaceInfoProperties s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (FP.nullPtr :: Ptr (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo))
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoPropertiesFieldInfo
instance AttrInfo DBusInterfaceInfoPropertiesFieldInfo where
type AttrBaseTypeConstraint DBusInterfaceInfoPropertiesFieldInfo = (~) DBusInterfaceInfo
type AttrAllowedOps DBusInterfaceInfoPropertiesFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusInterfaceInfoPropertiesFieldInfo = (~) (Ptr (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo))
type AttrTransferTypeConstraint DBusInterfaceInfoPropertiesFieldInfo = (~)(Ptr (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo))
type AttrTransferType DBusInterfaceInfoPropertiesFieldInfo = (Ptr (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo))
type AttrGetType DBusInterfaceInfoPropertiesFieldInfo = Maybe [Gio.DBusPropertyInfo.DBusPropertyInfo]
type AttrLabel DBusInterfaceInfoPropertiesFieldInfo = "properties"
type AttrOrigin DBusInterfaceInfoPropertiesFieldInfo = DBusInterfaceInfo
attrGet = getDBusInterfaceInfoProperties
attrSet = setDBusInterfaceInfoProperties
attrConstruct = undefined
attrClear = clearDBusInterfaceInfoProperties
attrTransfer _ v = do
return v
dBusInterfaceInfo_properties :: AttrLabelProxy "properties"
dBusInterfaceInfo_properties = AttrLabelProxy
#endif
getDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m (Maybe [Gio.DBusAnnotationInfo.DBusAnnotationInfo])
getDBusInterfaceInfoAnnotations s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 20) :: IO (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- unpackZeroTerminatedPtrArray val'
val''' <- mapM (newBoxed Gio.DBusAnnotationInfo.DBusAnnotationInfo) val''
return val'''
return result
setDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo) -> m ()
setDBusInterfaceInfoAnnotations s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 20) (val :: Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
clearDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m ()
clearDBusInterfaceInfoAnnotations s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 20) (FP.nullPtr :: Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoAnnotationsFieldInfo
instance AttrInfo DBusInterfaceInfoAnnotationsFieldInfo where
type AttrBaseTypeConstraint DBusInterfaceInfoAnnotationsFieldInfo = (~) DBusInterfaceInfo
type AttrAllowedOps DBusInterfaceInfoAnnotationsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusInterfaceInfoAnnotationsFieldInfo = (~) (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrTransferTypeConstraint DBusInterfaceInfoAnnotationsFieldInfo = (~)(Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrTransferType DBusInterfaceInfoAnnotationsFieldInfo = (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrGetType DBusInterfaceInfoAnnotationsFieldInfo = Maybe [Gio.DBusAnnotationInfo.DBusAnnotationInfo]
type AttrLabel DBusInterfaceInfoAnnotationsFieldInfo = "annotations"
type AttrOrigin DBusInterfaceInfoAnnotationsFieldInfo = DBusInterfaceInfo
attrGet = getDBusInterfaceInfoAnnotations
attrSet = setDBusInterfaceInfoAnnotations
attrConstruct = undefined
attrClear = clearDBusInterfaceInfoAnnotations
attrTransfer _ v = do
return v
dBusInterfaceInfo_annotations :: AttrLabelProxy "annotations"
dBusInterfaceInfo_annotations = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusInterfaceInfo
type instance O.AttributeList DBusInterfaceInfo = DBusInterfaceInfoAttributeList
type DBusInterfaceInfoAttributeList = ('[ '("refCount", DBusInterfaceInfoRefCountFieldInfo), '("name", DBusInterfaceInfoNameFieldInfo), '("methods", DBusInterfaceInfoMethodsFieldInfo), '("signals", DBusInterfaceInfoSignalsFieldInfo), '("properties", DBusInterfaceInfoPropertiesFieldInfo), '("annotations", DBusInterfaceInfoAnnotationsFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_dbus_interface_info_cache_build" g_dbus_interface_info_cache_build ::
Ptr DBusInterfaceInfo ->
IO ()
dBusInterfaceInfoCacheBuild ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusInterfaceInfo
-> m ()
dBusInterfaceInfoCacheBuild info = liftIO $ do
info' <- unsafeManagedPtrGetPtr info
g_dbus_interface_info_cache_build info'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoCacheBuildMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo DBusInterfaceInfoCacheBuildMethodInfo DBusInterfaceInfo signature where
overloadedMethod = dBusInterfaceInfoCacheBuild
#endif
foreign import ccall "g_dbus_interface_info_cache_release" g_dbus_interface_info_cache_release ::
Ptr DBusInterfaceInfo ->
IO ()
dBusInterfaceInfoCacheRelease ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusInterfaceInfo
-> m ()
dBusInterfaceInfoCacheRelease info = liftIO $ do
info' <- unsafeManagedPtrGetPtr info
g_dbus_interface_info_cache_release info'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoCacheReleaseMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo DBusInterfaceInfoCacheReleaseMethodInfo DBusInterfaceInfo signature where
overloadedMethod = dBusInterfaceInfoCacheRelease
#endif
foreign import ccall "g_dbus_interface_info_generate_xml" g_dbus_interface_info_generate_xml ::
Ptr DBusInterfaceInfo ->
Word32 ->
Ptr GLib.String.String ->
IO ()
dBusInterfaceInfoGenerateXml ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusInterfaceInfo
-> Word32
-> GLib.String.String
-> m ()
dBusInterfaceInfoGenerateXml info indent stringBuilder = liftIO $ do
info' <- unsafeManagedPtrGetPtr info
stringBuilder' <- unsafeManagedPtrGetPtr stringBuilder
g_dbus_interface_info_generate_xml info' indent stringBuilder'
touchManagedPtr info
touchManagedPtr stringBuilder
return ()
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoGenerateXmlMethodInfo
instance (signature ~ (Word32 -> GLib.String.String -> m ()), MonadIO m) => O.MethodInfo DBusInterfaceInfoGenerateXmlMethodInfo DBusInterfaceInfo signature where
overloadedMethod = dBusInterfaceInfoGenerateXml
#endif
foreign import ccall "g_dbus_interface_info_lookup_method" g_dbus_interface_info_lookup_method ::
Ptr DBusInterfaceInfo ->
CString ->
IO (Ptr Gio.DBusMethodInfo.DBusMethodInfo)
dBusInterfaceInfoLookupMethod ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusInterfaceInfo
-> T.Text
-> m Gio.DBusMethodInfo.DBusMethodInfo
dBusInterfaceInfoLookupMethod info name = liftIO $ do
info' <- unsafeManagedPtrGetPtr info
name' <- textToCString name
result <- g_dbus_interface_info_lookup_method info' name'
checkUnexpectedReturnNULL "dBusInterfaceInfoLookupMethod" result
result' <- (newBoxed Gio.DBusMethodInfo.DBusMethodInfo) result
touchManagedPtr info
freeMem name'
return result'
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoLookupMethodMethodInfo
instance (signature ~ (T.Text -> m Gio.DBusMethodInfo.DBusMethodInfo), MonadIO m) => O.MethodInfo DBusInterfaceInfoLookupMethodMethodInfo DBusInterfaceInfo signature where
overloadedMethod = dBusInterfaceInfoLookupMethod
#endif
foreign import ccall "g_dbus_interface_info_lookup_property" g_dbus_interface_info_lookup_property ::
Ptr DBusInterfaceInfo ->
CString ->
IO (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo)
dBusInterfaceInfoLookupProperty ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusInterfaceInfo
-> T.Text
-> m Gio.DBusPropertyInfo.DBusPropertyInfo
dBusInterfaceInfoLookupProperty info name = liftIO $ do
info' <- unsafeManagedPtrGetPtr info
name' <- textToCString name
result <- g_dbus_interface_info_lookup_property info' name'
checkUnexpectedReturnNULL "dBusInterfaceInfoLookupProperty" result
result' <- (newBoxed Gio.DBusPropertyInfo.DBusPropertyInfo) result
touchManagedPtr info
freeMem name'
return result'
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoLookupPropertyMethodInfo
instance (signature ~ (T.Text -> m Gio.DBusPropertyInfo.DBusPropertyInfo), MonadIO m) => O.MethodInfo DBusInterfaceInfoLookupPropertyMethodInfo DBusInterfaceInfo signature where
overloadedMethod = dBusInterfaceInfoLookupProperty
#endif
foreign import ccall "g_dbus_interface_info_lookup_signal" g_dbus_interface_info_lookup_signal ::
Ptr DBusInterfaceInfo ->
CString ->
IO (Ptr Gio.DBusSignalInfo.DBusSignalInfo)
dBusInterfaceInfoLookupSignal ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusInterfaceInfo
-> T.Text
-> m Gio.DBusSignalInfo.DBusSignalInfo
dBusInterfaceInfoLookupSignal info name = liftIO $ do
info' <- unsafeManagedPtrGetPtr info
name' <- textToCString name
result <- g_dbus_interface_info_lookup_signal info' name'
checkUnexpectedReturnNULL "dBusInterfaceInfoLookupSignal" result
result' <- (newBoxed Gio.DBusSignalInfo.DBusSignalInfo) result
touchManagedPtr info
freeMem name'
return result'
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoLookupSignalMethodInfo
instance (signature ~ (T.Text -> m Gio.DBusSignalInfo.DBusSignalInfo), MonadIO m) => O.MethodInfo DBusInterfaceInfoLookupSignalMethodInfo DBusInterfaceInfo signature where
overloadedMethod = dBusInterfaceInfoLookupSignal
#endif
foreign import ccall "g_dbus_interface_info_ref" g_dbus_interface_info_ref ::
Ptr DBusInterfaceInfo ->
IO (Ptr DBusInterfaceInfo)
dBusInterfaceInfoRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusInterfaceInfo
-> m DBusInterfaceInfo
dBusInterfaceInfoRef info = liftIO $ do
info' <- unsafeManagedPtrGetPtr info
result <- g_dbus_interface_info_ref info'
checkUnexpectedReturnNULL "dBusInterfaceInfoRef" result
result' <- (wrapBoxed DBusInterfaceInfo) result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoRefMethodInfo
instance (signature ~ (m DBusInterfaceInfo), MonadIO m) => O.MethodInfo DBusInterfaceInfoRefMethodInfo DBusInterfaceInfo signature where
overloadedMethod = dBusInterfaceInfoRef
#endif
foreign import ccall "g_dbus_interface_info_unref" g_dbus_interface_info_unref ::
Ptr DBusInterfaceInfo ->
IO ()
dBusInterfaceInfoUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusInterfaceInfo
-> m ()
dBusInterfaceInfoUnref info = liftIO $ do
info' <- unsafeManagedPtrGetPtr info
g_dbus_interface_info_unref info'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data DBusInterfaceInfoUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo DBusInterfaceInfoUnrefMethodInfo DBusInterfaceInfo signature where
overloadedMethod = dBusInterfaceInfoUnref
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusInterfaceInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveDBusInterfaceInfoMethod "cacheBuild" o = DBusInterfaceInfoCacheBuildMethodInfo
ResolveDBusInterfaceInfoMethod "cacheRelease" o = DBusInterfaceInfoCacheReleaseMethodInfo
ResolveDBusInterfaceInfoMethod "generateXml" o = DBusInterfaceInfoGenerateXmlMethodInfo
ResolveDBusInterfaceInfoMethod "lookupMethod" o = DBusInterfaceInfoLookupMethodMethodInfo
ResolveDBusInterfaceInfoMethod "lookupProperty" o = DBusInterfaceInfoLookupPropertyMethodInfo
ResolveDBusInterfaceInfoMethod "lookupSignal" o = DBusInterfaceInfoLookupSignalMethodInfo
ResolveDBusInterfaceInfoMethod "ref" o = DBusInterfaceInfoRefMethodInfo
ResolveDBusInterfaceInfoMethod "unref" o = DBusInterfaceInfoUnrefMethodInfo
ResolveDBusInterfaceInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusInterfaceInfoMethod t DBusInterfaceInfo, O.MethodInfo info DBusInterfaceInfo p) => OL.IsLabel t (DBusInterfaceInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif