gi-gio-0.2.44.12: GI/Gio/Objects/DBusProxy.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Gio.Objects.DBusProxy
(
-- * Exported types
DBusProxy(..) ,
DBusProxyK ,
toDBusProxy ,
noDBusProxy ,
-- * Methods
-- ** dBusProxyCall
dBusProxyCall ,
-- ** dBusProxyCallFinish
dBusProxyCallFinish ,
-- ** dBusProxyCallSync
dBusProxyCallSync ,
-- ** dBusProxyCallWithUnixFdList
dBusProxyCallWithUnixFdList ,
-- ** dBusProxyCallWithUnixFdListFinish
dBusProxyCallWithUnixFdListFinish ,
-- ** dBusProxyCallWithUnixFdListSync
dBusProxyCallWithUnixFdListSync ,
-- ** dBusProxyGetCachedProperty
dBusProxyGetCachedProperty ,
-- ** dBusProxyGetCachedPropertyNames
dBusProxyGetCachedPropertyNames ,
-- ** dBusProxyGetConnection
dBusProxyGetConnection ,
-- ** dBusProxyGetDefaultTimeout
dBusProxyGetDefaultTimeout ,
-- ** dBusProxyGetFlags
dBusProxyGetFlags ,
-- ** dBusProxyGetInterfaceInfo
dBusProxyGetInterfaceInfo ,
-- ** dBusProxyGetInterfaceName
dBusProxyGetInterfaceName ,
-- ** dBusProxyGetName
dBusProxyGetName ,
-- ** dBusProxyGetNameOwner
dBusProxyGetNameOwner ,
-- ** dBusProxyGetObjectPath
dBusProxyGetObjectPath ,
-- ** dBusProxyNew
dBusProxyNew ,
-- ** dBusProxyNewFinish
dBusProxyNewFinish ,
-- ** dBusProxyNewForBus
dBusProxyNewForBus ,
-- ** dBusProxyNewForBusFinish
dBusProxyNewForBusFinish ,
-- ** dBusProxyNewForBusSync
dBusProxyNewForBusSync ,
-- ** dBusProxyNewSync
dBusProxyNewSync ,
-- ** dBusProxySetCachedProperty
dBusProxySetCachedProperty ,
-- ** dBusProxySetDefaultTimeout
dBusProxySetDefaultTimeout ,
-- ** dBusProxySetInterfaceInfo
dBusProxySetInterfaceInfo ,
-- * Properties
-- ** GBusType
DBusProxyGBusTypePropertyInfo ,
constructDBusProxyGBusType ,
-- ** GConnection
DBusProxyGConnectionPropertyInfo ,
constructDBusProxyGConnection ,
getDBusProxyGConnection ,
-- ** GDefaultTimeout
DBusProxyGDefaultTimeoutPropertyInfo ,
constructDBusProxyGDefaultTimeout ,
getDBusProxyGDefaultTimeout ,
setDBusProxyGDefaultTimeout ,
-- ** GFlags
DBusProxyGFlagsPropertyInfo ,
constructDBusProxyGFlags ,
getDBusProxyGFlags ,
-- ** GInterfaceInfo
DBusProxyGInterfaceInfoPropertyInfo ,
constructDBusProxyGInterfaceInfo ,
getDBusProxyGInterfaceInfo ,
setDBusProxyGInterfaceInfo ,
-- ** GInterfaceName
DBusProxyGInterfaceNamePropertyInfo ,
constructDBusProxyGInterfaceName ,
getDBusProxyGInterfaceName ,
-- ** GName
DBusProxyGNamePropertyInfo ,
constructDBusProxyGName ,
getDBusProxyGName ,
-- ** GNameOwner
DBusProxyGNameOwnerPropertyInfo ,
getDBusProxyGNameOwner ,
-- ** GObjectPath
DBusProxyGObjectPathPropertyInfo ,
constructDBusProxyGObjectPath ,
getDBusProxyGObjectPath ,
-- * Signals
-- ** GPropertiesChanged
DBusProxyGPropertiesChangedCallback ,
DBusProxyGPropertiesChangedCallbackC ,
DBusProxyGPropertiesChangedSignalInfo ,
afterDBusProxyGPropertiesChanged ,
dBusProxyGPropertiesChangedCallbackWrapper,
dBusProxyGPropertiesChangedClosure ,
mkDBusProxyGPropertiesChangedCallback ,
noDBusProxyGPropertiesChangedCallback ,
onDBusProxyGPropertiesChanged ,
-- ** GSignal
DBusProxyGSignalCallback ,
DBusProxyGSignalCallbackC ,
DBusProxyGSignalSignalInfo ,
afterDBusProxyGSignal ,
dBusProxyGSignalCallbackWrapper ,
dBusProxyGSignalClosure ,
mkDBusProxyGSignalCallback ,
noDBusProxyGSignalCallback ,
onDBusProxyGSignal ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gio.Types
import GI.Gio.Callbacks
import qualified GI.GObject as GObject
newtype DBusProxy = DBusProxy (ForeignPtr DBusProxy)
foreign import ccall "g_dbus_proxy_get_type"
c_g_dbus_proxy_get_type :: IO GType
type instance ParentTypes DBusProxy = DBusProxyParentTypes
type DBusProxyParentTypes = '[GObject.Object, AsyncInitable, DBusInterface, Initable]
instance GObject DBusProxy where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_g_dbus_proxy_get_type
class GObject o => DBusProxyK o
instance (GObject o, IsDescendantOf DBusProxy o) => DBusProxyK o
toDBusProxy :: DBusProxyK o => o -> IO DBusProxy
toDBusProxy = unsafeCastTo DBusProxy
noDBusProxy :: Maybe DBusProxy
noDBusProxy = Nothing
-- signal DBusProxy::g-properties-changed
type DBusProxyGPropertiesChangedCallback =
GVariant ->
[T.Text] ->
IO ()
noDBusProxyGPropertiesChangedCallback :: Maybe DBusProxyGPropertiesChangedCallback
noDBusProxyGPropertiesChangedCallback = Nothing
type DBusProxyGPropertiesChangedCallbackC =
Ptr () -> -- object
Ptr GVariant ->
Ptr CString ->
Ptr () -> -- user_data
IO ()
foreign import ccall "wrapper"
mkDBusProxyGPropertiesChangedCallback :: DBusProxyGPropertiesChangedCallbackC -> IO (FunPtr DBusProxyGPropertiesChangedCallbackC)
dBusProxyGPropertiesChangedClosure :: DBusProxyGPropertiesChangedCallback -> IO Closure
dBusProxyGPropertiesChangedClosure cb = newCClosure =<< mkDBusProxyGPropertiesChangedCallback wrapped
where wrapped = dBusProxyGPropertiesChangedCallbackWrapper cb
dBusProxyGPropertiesChangedCallbackWrapper ::
DBusProxyGPropertiesChangedCallback ->
Ptr () ->
Ptr GVariant ->
Ptr CString ->
Ptr () ->
IO ()
dBusProxyGPropertiesChangedCallbackWrapper _cb _ changed_properties invalidated_properties _ = do
changed_properties' <- newGVariantFromPtr changed_properties
invalidated_properties' <- unpackZeroTerminatedUTF8CArray invalidated_properties
_cb changed_properties' invalidated_properties'
onDBusProxyGPropertiesChanged :: (GObject a, MonadIO m) => a -> DBusProxyGPropertiesChangedCallback -> m SignalHandlerId
onDBusProxyGPropertiesChanged obj cb = liftIO $ connectDBusProxyGPropertiesChanged obj cb SignalConnectBefore
afterDBusProxyGPropertiesChanged :: (GObject a, MonadIO m) => a -> DBusProxyGPropertiesChangedCallback -> m SignalHandlerId
afterDBusProxyGPropertiesChanged obj cb = connectDBusProxyGPropertiesChanged obj cb SignalConnectAfter
connectDBusProxyGPropertiesChanged :: (GObject a, MonadIO m) =>
a -> DBusProxyGPropertiesChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectDBusProxyGPropertiesChanged obj cb after = liftIO $ do
cb' <- mkDBusProxyGPropertiesChangedCallback (dBusProxyGPropertiesChangedCallbackWrapper cb)
connectSignalFunPtr obj "g-properties-changed" cb' after
-- signal DBusProxy::g-signal
type DBusProxyGSignalCallback =
Maybe T.Text ->
T.Text ->
GVariant ->
IO ()
noDBusProxyGSignalCallback :: Maybe DBusProxyGSignalCallback
noDBusProxyGSignalCallback = Nothing
type DBusProxyGSignalCallbackC =
Ptr () -> -- object
CString ->
CString ->
Ptr GVariant ->
Ptr () -> -- user_data
IO ()
foreign import ccall "wrapper"
mkDBusProxyGSignalCallback :: DBusProxyGSignalCallbackC -> IO (FunPtr DBusProxyGSignalCallbackC)
dBusProxyGSignalClosure :: DBusProxyGSignalCallback -> IO Closure
dBusProxyGSignalClosure cb = newCClosure =<< mkDBusProxyGSignalCallback wrapped
where wrapped = dBusProxyGSignalCallbackWrapper cb
dBusProxyGSignalCallbackWrapper ::
DBusProxyGSignalCallback ->
Ptr () ->
CString ->
CString ->
Ptr GVariant ->
Ptr () ->
IO ()
dBusProxyGSignalCallbackWrapper _cb _ sender_name signal_name parameters _ = do
maybeSender_name <-
if sender_name == nullPtr
then return Nothing
else do
sender_name' <- cstringToText sender_name
return $ Just sender_name'
signal_name' <- cstringToText signal_name
parameters' <- newGVariantFromPtr parameters
_cb maybeSender_name signal_name' parameters'
onDBusProxyGSignal :: (GObject a, MonadIO m) => a -> DBusProxyGSignalCallback -> m SignalHandlerId
onDBusProxyGSignal obj cb = liftIO $ connectDBusProxyGSignal obj cb SignalConnectBefore
afterDBusProxyGSignal :: (GObject a, MonadIO m) => a -> DBusProxyGSignalCallback -> m SignalHandlerId
afterDBusProxyGSignal obj cb = connectDBusProxyGSignal obj cb SignalConnectAfter
connectDBusProxyGSignal :: (GObject a, MonadIO m) =>
a -> DBusProxyGSignalCallback -> SignalConnectMode -> m SignalHandlerId
connectDBusProxyGSignal obj cb after = liftIO $ do
cb' <- mkDBusProxyGSignalCallback (dBusProxyGSignalCallbackWrapper cb)
connectSignalFunPtr obj "g-signal" cb' after
-- VVV Prop "g-bus-type"
-- Type: TInterface "Gio" "BusType"
-- Flags: [PropertyWritable,PropertyConstructOnly]
constructDBusProxyGBusType :: BusType -> IO ([Char], GValue)
constructDBusProxyGBusType val = constructObjectPropertyEnum "g-bus-type" val
data DBusProxyGBusTypePropertyInfo
instance AttrInfo DBusProxyGBusTypePropertyInfo where
type AttrAllowedOps DBusProxyGBusTypePropertyInfo = '[ 'AttrConstruct]
type AttrSetTypeConstraint DBusProxyGBusTypePropertyInfo = (~) BusType
type AttrBaseTypeConstraint DBusProxyGBusTypePropertyInfo = DBusProxyK
type AttrGetType DBusProxyGBusTypePropertyInfo = ()
type AttrLabel DBusProxyGBusTypePropertyInfo = "DBusProxy::g-bus-type"
attrGet _ = undefined
attrSet _ = undefined
attrConstruct _ = constructDBusProxyGBusType
-- VVV Prop "g-connection"
-- Type: TInterface "Gio" "DBusConnection"
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getDBusProxyGConnection :: (MonadIO m, DBusProxyK o) => o -> m DBusConnection
getDBusProxyGConnection obj = liftIO $ getObjectPropertyObject obj "g-connection" DBusConnection
constructDBusProxyGConnection :: (DBusConnectionK a) => a -> IO ([Char], GValue)
constructDBusProxyGConnection val = constructObjectPropertyObject "g-connection" val
data DBusProxyGConnectionPropertyInfo
instance AttrInfo DBusProxyGConnectionPropertyInfo where
type AttrAllowedOps DBusProxyGConnectionPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DBusProxyGConnectionPropertyInfo = DBusConnectionK
type AttrBaseTypeConstraint DBusProxyGConnectionPropertyInfo = DBusProxyK
type AttrGetType DBusProxyGConnectionPropertyInfo = DBusConnection
type AttrLabel DBusProxyGConnectionPropertyInfo = "DBusProxy::g-connection"
attrGet _ = getDBusProxyGConnection
attrSet _ = undefined
attrConstruct _ = constructDBusProxyGConnection
-- VVV Prop "g-default-timeout"
-- Type: TBasicType TInt32
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
getDBusProxyGDefaultTimeout :: (MonadIO m, DBusProxyK o) => o -> m Int32
getDBusProxyGDefaultTimeout obj = liftIO $ getObjectPropertyCInt obj "g-default-timeout"
setDBusProxyGDefaultTimeout :: (MonadIO m, DBusProxyK o) => o -> Int32 -> m ()
setDBusProxyGDefaultTimeout obj val = liftIO $ setObjectPropertyCInt obj "g-default-timeout" val
constructDBusProxyGDefaultTimeout :: Int32 -> IO ([Char], GValue)
constructDBusProxyGDefaultTimeout val = constructObjectPropertyCInt "g-default-timeout" val
data DBusProxyGDefaultTimeoutPropertyInfo
instance AttrInfo DBusProxyGDefaultTimeoutPropertyInfo where
type AttrAllowedOps DBusProxyGDefaultTimeoutPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DBusProxyGDefaultTimeoutPropertyInfo = (~) Int32
type AttrBaseTypeConstraint DBusProxyGDefaultTimeoutPropertyInfo = DBusProxyK
type AttrGetType DBusProxyGDefaultTimeoutPropertyInfo = Int32
type AttrLabel DBusProxyGDefaultTimeoutPropertyInfo = "DBusProxy::g-default-timeout"
attrGet _ = getDBusProxyGDefaultTimeout
attrSet _ = setDBusProxyGDefaultTimeout
attrConstruct _ = constructDBusProxyGDefaultTimeout
-- VVV Prop "g-flags"
-- Type: TInterface "Gio" "DBusProxyFlags"
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getDBusProxyGFlags :: (MonadIO m, DBusProxyK o) => o -> m [DBusProxyFlags]
getDBusProxyGFlags obj = liftIO $ getObjectPropertyFlags obj "g-flags"
constructDBusProxyGFlags :: [DBusProxyFlags] -> IO ([Char], GValue)
constructDBusProxyGFlags val = constructObjectPropertyFlags "g-flags" val
data DBusProxyGFlagsPropertyInfo
instance AttrInfo DBusProxyGFlagsPropertyInfo where
type AttrAllowedOps DBusProxyGFlagsPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DBusProxyGFlagsPropertyInfo = (~) [DBusProxyFlags]
type AttrBaseTypeConstraint DBusProxyGFlagsPropertyInfo = DBusProxyK
type AttrGetType DBusProxyGFlagsPropertyInfo = [DBusProxyFlags]
type AttrLabel DBusProxyGFlagsPropertyInfo = "DBusProxy::g-flags"
attrGet _ = getDBusProxyGFlags
attrSet _ = undefined
attrConstruct _ = constructDBusProxyGFlags
-- VVV Prop "g-interface-info"
-- Type: TInterface "Gio" "DBusInterfaceInfo"
-- Flags: [PropertyReadable,PropertyWritable]
getDBusProxyGInterfaceInfo :: (MonadIO m, DBusProxyK o) => o -> m DBusInterfaceInfo
getDBusProxyGInterfaceInfo obj = liftIO $ getObjectPropertyBoxed obj "g-interface-info" DBusInterfaceInfo
setDBusProxyGInterfaceInfo :: (MonadIO m, DBusProxyK o) => o -> DBusInterfaceInfo -> m ()
setDBusProxyGInterfaceInfo obj val = liftIO $ setObjectPropertyBoxed obj "g-interface-info" val
constructDBusProxyGInterfaceInfo :: DBusInterfaceInfo -> IO ([Char], GValue)
constructDBusProxyGInterfaceInfo val = constructObjectPropertyBoxed "g-interface-info" val
data DBusProxyGInterfaceInfoPropertyInfo
instance AttrInfo DBusProxyGInterfaceInfoPropertyInfo where
type AttrAllowedOps DBusProxyGInterfaceInfoPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DBusProxyGInterfaceInfoPropertyInfo = (~) DBusInterfaceInfo
type AttrBaseTypeConstraint DBusProxyGInterfaceInfoPropertyInfo = DBusProxyK
type AttrGetType DBusProxyGInterfaceInfoPropertyInfo = DBusInterfaceInfo
type AttrLabel DBusProxyGInterfaceInfoPropertyInfo = "DBusProxy::g-interface-info"
attrGet _ = getDBusProxyGInterfaceInfo
attrSet _ = setDBusProxyGInterfaceInfo
attrConstruct _ = constructDBusProxyGInterfaceInfo
-- VVV Prop "g-interface-name"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getDBusProxyGInterfaceName :: (MonadIO m, DBusProxyK o) => o -> m T.Text
getDBusProxyGInterfaceName obj = liftIO $ getObjectPropertyString obj "g-interface-name"
constructDBusProxyGInterfaceName :: T.Text -> IO ([Char], GValue)
constructDBusProxyGInterfaceName val = constructObjectPropertyString "g-interface-name" val
data DBusProxyGInterfaceNamePropertyInfo
instance AttrInfo DBusProxyGInterfaceNamePropertyInfo where
type AttrAllowedOps DBusProxyGInterfaceNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DBusProxyGInterfaceNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DBusProxyGInterfaceNamePropertyInfo = DBusProxyK
type AttrGetType DBusProxyGInterfaceNamePropertyInfo = T.Text
type AttrLabel DBusProxyGInterfaceNamePropertyInfo = "DBusProxy::g-interface-name"
attrGet _ = getDBusProxyGInterfaceName
attrSet _ = undefined
attrConstruct _ = constructDBusProxyGInterfaceName
-- VVV Prop "g-name"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getDBusProxyGName :: (MonadIO m, DBusProxyK o) => o -> m T.Text
getDBusProxyGName obj = liftIO $ getObjectPropertyString obj "g-name"
constructDBusProxyGName :: T.Text -> IO ([Char], GValue)
constructDBusProxyGName val = constructObjectPropertyString "g-name" val
data DBusProxyGNamePropertyInfo
instance AttrInfo DBusProxyGNamePropertyInfo where
type AttrAllowedOps DBusProxyGNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DBusProxyGNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DBusProxyGNamePropertyInfo = DBusProxyK
type AttrGetType DBusProxyGNamePropertyInfo = T.Text
type AttrLabel DBusProxyGNamePropertyInfo = "DBusProxy::g-name"
attrGet _ = getDBusProxyGName
attrSet _ = undefined
attrConstruct _ = constructDBusProxyGName
-- VVV Prop "g-name-owner"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable]
getDBusProxyGNameOwner :: (MonadIO m, DBusProxyK o) => o -> m T.Text
getDBusProxyGNameOwner obj = liftIO $ getObjectPropertyString obj "g-name-owner"
data DBusProxyGNameOwnerPropertyInfo
instance AttrInfo DBusProxyGNameOwnerPropertyInfo where
type AttrAllowedOps DBusProxyGNameOwnerPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DBusProxyGNameOwnerPropertyInfo = (~) ()
type AttrBaseTypeConstraint DBusProxyGNameOwnerPropertyInfo = DBusProxyK
type AttrGetType DBusProxyGNameOwnerPropertyInfo = T.Text
type AttrLabel DBusProxyGNameOwnerPropertyInfo = "DBusProxy::g-name-owner"
attrGet _ = getDBusProxyGNameOwner
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "g-object-path"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getDBusProxyGObjectPath :: (MonadIO m, DBusProxyK o) => o -> m T.Text
getDBusProxyGObjectPath obj = liftIO $ getObjectPropertyString obj "g-object-path"
constructDBusProxyGObjectPath :: T.Text -> IO ([Char], GValue)
constructDBusProxyGObjectPath val = constructObjectPropertyString "g-object-path" val
data DBusProxyGObjectPathPropertyInfo
instance AttrInfo DBusProxyGObjectPathPropertyInfo where
type AttrAllowedOps DBusProxyGObjectPathPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DBusProxyGObjectPathPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DBusProxyGObjectPathPropertyInfo = DBusProxyK
type AttrGetType DBusProxyGObjectPathPropertyInfo = T.Text
type AttrLabel DBusProxyGObjectPathPropertyInfo = "DBusProxy::g-object-path"
attrGet _ = getDBusProxyGObjectPath
attrSet _ = undefined
attrConstruct _ = constructDBusProxyGObjectPath
type instance AttributeList DBusProxy = DBusProxyAttributeList
type DBusProxyAttributeList = ('[ '("g-bus-type", DBusProxyGBusTypePropertyInfo), '("g-connection", DBusProxyGConnectionPropertyInfo), '("g-default-timeout", DBusProxyGDefaultTimeoutPropertyInfo), '("g-flags", DBusProxyGFlagsPropertyInfo), '("g-interface-info", DBusProxyGInterfaceInfoPropertyInfo), '("g-interface-name", DBusProxyGInterfaceNamePropertyInfo), '("g-name", DBusProxyGNamePropertyInfo), '("g-name-owner", DBusProxyGNameOwnerPropertyInfo), '("g-object-path", DBusProxyGObjectPathPropertyInfo)] :: [(Symbol, *)])
data DBusProxyGPropertiesChangedSignalInfo
instance SignalInfo DBusProxyGPropertiesChangedSignalInfo where
type HaskellCallbackType DBusProxyGPropertiesChangedSignalInfo = DBusProxyGPropertiesChangedCallback
connectSignal _ = connectDBusProxyGPropertiesChanged
data DBusProxyGSignalSignalInfo
instance SignalInfo DBusProxyGSignalSignalInfo where
type HaskellCallbackType DBusProxyGSignalSignalInfo = DBusProxyGSignalCallback
connectSignal _ = connectDBusProxyGSignal
type instance SignalList DBusProxy = DBusProxySignalList
type DBusProxySignalList = ('[ '("g-properties-changed", DBusProxyGPropertiesChangedSignalInfo), '("g-signal", DBusProxyGSignalSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method DBusProxy::new_finish
-- method type : Constructor
-- Args : [Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusProxy"
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_proxy_new_finish" g_dbus_proxy_new_finish ::
Ptr AsyncResult -> -- res : TInterface "Gio" "AsyncResult"
Ptr (Ptr GError) -> -- error
IO (Ptr DBusProxy)
dBusProxyNewFinish ::
(MonadIO m, AsyncResultK a) =>
a -> -- res
m DBusProxy
dBusProxyNewFinish res = liftIO $ do
let res' = unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_proxy_new_finish res'
checkUnexpectedReturnNULL "g_dbus_proxy_new_finish" result
result' <- (wrapObject DBusProxy) result
touchManagedPtr res
return result'
) (do
return ()
)
-- method DBusProxy::new_for_bus_finish
-- method type : Constructor
-- Args : [Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusProxy"
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_proxy_new_for_bus_finish" g_dbus_proxy_new_for_bus_finish ::
Ptr AsyncResult -> -- res : TInterface "Gio" "AsyncResult"
Ptr (Ptr GError) -> -- error
IO (Ptr DBusProxy)
dBusProxyNewForBusFinish ::
(MonadIO m, AsyncResultK a) =>
a -> -- res
m DBusProxy
dBusProxyNewForBusFinish res = liftIO $ do
let res' = unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_proxy_new_for_bus_finish res'
checkUnexpectedReturnNULL "g_dbus_proxy_new_for_bus_finish" result
result' <- (wrapObject DBusProxy) result
touchManagedPtr res
return result'
) (do
return ()
)
-- method DBusProxy::new_for_bus_sync
-- method type : Constructor
-- Args : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusProxyFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusProxyFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusProxy"
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_proxy_new_for_bus_sync" g_dbus_proxy_new_for_bus_sync ::
CUInt -> -- bus_type : TInterface "Gio" "BusType"
CUInt -> -- flags : TInterface "Gio" "DBusProxyFlags"
Ptr DBusInterfaceInfo -> -- info : TInterface "Gio" "DBusInterfaceInfo"
CString -> -- name : TBasicType TUTF8
CString -> -- object_path : TBasicType TUTF8
CString -> -- interface_name : TBasicType TUTF8
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO (Ptr DBusProxy)
dBusProxyNewForBusSync ::
(MonadIO m, CancellableK a) =>
BusType -> -- bus_type
[DBusProxyFlags] -> -- flags
Maybe (DBusInterfaceInfo) -> -- info
T.Text -> -- name
T.Text -> -- object_path
T.Text -> -- interface_name
Maybe (a) -> -- cancellable
m DBusProxy
dBusProxyNewForBusSync bus_type flags info name object_path interface_name cancellable = liftIO $ do
let bus_type' = (fromIntegral . fromEnum) bus_type
let flags' = gflagsToWord flags
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
let jInfo' = unsafeManagedPtrGetPtr jInfo
return jInfo'
name' <- textToCString name
object_path' <- textToCString object_path
interface_name' <- textToCString interface_name
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_proxy_new_for_bus_sync bus_type' flags' maybeInfo name' object_path' interface_name' maybeCancellable
checkUnexpectedReturnNULL "g_dbus_proxy_new_for_bus_sync" result
result' <- (wrapObject DBusProxy) result
whenJust info touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem name'
freeMem object_path'
freeMem interface_name'
return result'
) (do
freeMem name'
freeMem object_path'
freeMem interface_name'
)
-- method DBusProxy::new_sync
-- method type : Constructor
-- Args : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusProxyFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusProxyFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusProxy"
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_proxy_new_sync" g_dbus_proxy_new_sync ::
Ptr DBusConnection -> -- connection : TInterface "Gio" "DBusConnection"
CUInt -> -- flags : TInterface "Gio" "DBusProxyFlags"
Ptr DBusInterfaceInfo -> -- info : TInterface "Gio" "DBusInterfaceInfo"
CString -> -- name : TBasicType TUTF8
CString -> -- object_path : TBasicType TUTF8
CString -> -- interface_name : TBasicType TUTF8
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO (Ptr DBusProxy)
dBusProxyNewSync ::
(MonadIO m, DBusConnectionK a, CancellableK b) =>
a -> -- connection
[DBusProxyFlags] -> -- flags
Maybe (DBusInterfaceInfo) -> -- info
Maybe (T.Text) -> -- name
T.Text -> -- object_path
T.Text -> -- interface_name
Maybe (b) -> -- cancellable
m DBusProxy
dBusProxyNewSync connection flags info name object_path interface_name cancellable = liftIO $ do
let connection' = unsafeManagedPtrCastPtr connection
let flags' = gflagsToWord flags
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
let jInfo' = unsafeManagedPtrGetPtr jInfo
return jInfo'
maybeName <- case name of
Nothing -> return nullPtr
Just jName -> do
jName' <- textToCString jName
return jName'
object_path' <- textToCString object_path
interface_name' <- textToCString interface_name
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_proxy_new_sync connection' flags' maybeInfo maybeName object_path' interface_name' maybeCancellable
checkUnexpectedReturnNULL "g_dbus_proxy_new_sync" result
result' <- (wrapObject DBusProxy) result
touchManagedPtr connection
whenJust info touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeName
freeMem object_path'
freeMem interface_name'
return result'
) (do
freeMem maybeName
freeMem object_path'
freeMem interface_name'
)
-- method DBusProxy::call
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusCallFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 7, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusCallFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 7, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_call" g_dbus_proxy_call ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
CString -> -- method_name : TBasicType TUTF8
Ptr GVariant -> -- parameters : TVariant
CUInt -> -- flags : TInterface "Gio" "DBusCallFlags"
Int32 -> -- timeout_msec : TBasicType TInt32
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
FunPtr AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback"
Ptr () -> -- user_data : TBasicType TVoid
IO ()
dBusProxyCall ::
(MonadIO m, DBusProxyK a, CancellableK b) =>
a -> -- _obj
T.Text -> -- method_name
Maybe (GVariant) -> -- parameters
[DBusCallFlags] -> -- flags
Int32 -> -- timeout_msec
Maybe (b) -> -- cancellable
Maybe (AsyncReadyCallback) -> -- callback
m ()
dBusProxyCall _obj method_name parameters flags timeout_msec cancellable callback = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
method_name' <- textToCString method_name
maybeParameters <- case parameters of
Nothing -> return nullPtr
Just jParameters -> do
let jParameters' = unsafeManagedPtrGetPtr jParameters
return jParameters'
let flags' = gflagsToWord flags
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
ptrcallback <- callocMem :: IO (Ptr (FunPtr AsyncReadyCallbackC))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
jCallback' <- mkAsyncReadyCallback (asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
poke ptrcallback jCallback'
return jCallback'
let user_data = nullPtr
g_dbus_proxy_call _obj' method_name' maybeParameters flags' timeout_msec maybeCancellable maybeCallback user_data
touchManagedPtr _obj
whenJust cancellable touchManagedPtr
freeMem method_name'
return ()
-- method DBusProxy::call_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TVariant
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_proxy_call_finish" g_dbus_proxy_call_finish ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
Ptr AsyncResult -> -- res : TInterface "Gio" "AsyncResult"
Ptr (Ptr GError) -> -- error
IO (Ptr GVariant)
dBusProxyCallFinish ::
(MonadIO m, DBusProxyK a, AsyncResultK b) =>
a -> -- _obj
b -> -- res
m GVariant
dBusProxyCallFinish _obj res = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let res' = unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_proxy_call_finish _obj' res'
checkUnexpectedReturnNULL "g_dbus_proxy_call_finish" result
result' <- wrapGVariantPtr result
touchManagedPtr _obj
touchManagedPtr res
return result'
) (do
return ()
)
-- method DBusProxy::call_sync
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusCallFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusCallFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TVariant
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_proxy_call_sync" g_dbus_proxy_call_sync ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
CString -> -- method_name : TBasicType TUTF8
Ptr GVariant -> -- parameters : TVariant
CUInt -> -- flags : TInterface "Gio" "DBusCallFlags"
Int32 -> -- timeout_msec : TBasicType TInt32
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO (Ptr GVariant)
dBusProxyCallSync ::
(MonadIO m, DBusProxyK a, CancellableK b) =>
a -> -- _obj
T.Text -> -- method_name
Maybe (GVariant) -> -- parameters
[DBusCallFlags] -> -- flags
Int32 -> -- timeout_msec
Maybe (b) -> -- cancellable
m GVariant
dBusProxyCallSync _obj method_name parameters flags timeout_msec cancellable = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
method_name' <- textToCString method_name
maybeParameters <- case parameters of
Nothing -> return nullPtr
Just jParameters -> do
let jParameters' = unsafeManagedPtrGetPtr jParameters
return jParameters'
let flags' = gflagsToWord flags
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_proxy_call_sync _obj' method_name' maybeParameters flags' timeout_msec maybeCancellable
checkUnexpectedReturnNULL "g_dbus_proxy_call_sync" result
result' <- wrapGVariantPtr result
touchManagedPtr _obj
whenJust cancellable touchManagedPtr
freeMem method_name'
return result'
) (do
freeMem method_name'
)
-- method DBusProxy::call_with_unix_fd_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusCallFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd_list", argType = TInterface "Gio" "UnixFDList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 8, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusCallFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd_list", argType = TInterface "Gio" "UnixFDList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 8, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_call_with_unix_fd_list" g_dbus_proxy_call_with_unix_fd_list ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
CString -> -- method_name : TBasicType TUTF8
Ptr GVariant -> -- parameters : TVariant
CUInt -> -- flags : TInterface "Gio" "DBusCallFlags"
Int32 -> -- timeout_msec : TBasicType TInt32
Ptr UnixFDList -> -- fd_list : TInterface "Gio" "UnixFDList"
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
FunPtr AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback"
Ptr () -> -- user_data : TBasicType TVoid
IO ()
dBusProxyCallWithUnixFdList ::
(MonadIO m, DBusProxyK a, UnixFDListK b, CancellableK c) =>
a -> -- _obj
T.Text -> -- method_name
Maybe (GVariant) -> -- parameters
[DBusCallFlags] -> -- flags
Int32 -> -- timeout_msec
Maybe (b) -> -- fd_list
Maybe (c) -> -- cancellable
Maybe (AsyncReadyCallback) -> -- callback
m ()
dBusProxyCallWithUnixFdList _obj method_name parameters flags timeout_msec fd_list cancellable callback = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
method_name' <- textToCString method_name
maybeParameters <- case parameters of
Nothing -> return nullPtr
Just jParameters -> do
let jParameters' = unsafeManagedPtrGetPtr jParameters
return jParameters'
let flags' = gflagsToWord flags
maybeFd_list <- case fd_list of
Nothing -> return nullPtr
Just jFd_list -> do
let jFd_list' = unsafeManagedPtrCastPtr jFd_list
return jFd_list'
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
ptrcallback <- callocMem :: IO (Ptr (FunPtr AsyncReadyCallbackC))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
jCallback' <- mkAsyncReadyCallback (asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
poke ptrcallback jCallback'
return jCallback'
let user_data = nullPtr
g_dbus_proxy_call_with_unix_fd_list _obj' method_name' maybeParameters flags' timeout_msec maybeFd_list maybeCancellable maybeCallback user_data
touchManagedPtr _obj
whenJust fd_list touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem method_name'
return ()
-- method DBusProxy::call_with_unix_fd_list_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "out_fd_list", argType = TInterface "Gio" "UnixFDList", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TVariant
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_proxy_call_with_unix_fd_list_finish" g_dbus_proxy_call_with_unix_fd_list_finish ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
Ptr (Ptr UnixFDList) -> -- out_fd_list : TInterface "Gio" "UnixFDList"
Ptr AsyncResult -> -- res : TInterface "Gio" "AsyncResult"
Ptr (Ptr GError) -> -- error
IO (Ptr GVariant)
dBusProxyCallWithUnixFdListFinish ::
(MonadIO m, DBusProxyK a, AsyncResultK b) =>
a -> -- _obj
b -> -- res
m (GVariant,UnixFDList)
dBusProxyCallWithUnixFdListFinish _obj res = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
out_fd_list <- allocMem :: IO (Ptr (Ptr UnixFDList))
let res' = unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_proxy_call_with_unix_fd_list_finish _obj' out_fd_list res'
checkUnexpectedReturnNULL "g_dbus_proxy_call_with_unix_fd_list_finish" result
result' <- wrapGVariantPtr result
out_fd_list' <- peek out_fd_list
out_fd_list'' <- (wrapObject UnixFDList) out_fd_list'
touchManagedPtr _obj
touchManagedPtr res
freeMem out_fd_list
return (result', out_fd_list'')
) (do
freeMem out_fd_list
)
-- method DBusProxy::call_with_unix_fd_list_sync
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusCallFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd_list", argType = TInterface "Gio" "UnixFDList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "out_fd_list", argType = TInterface "Gio" "UnixFDList", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusCallFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd_list", argType = TInterface "Gio" "UnixFDList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TVariant
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_proxy_call_with_unix_fd_list_sync" g_dbus_proxy_call_with_unix_fd_list_sync ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
CString -> -- method_name : TBasicType TUTF8
Ptr GVariant -> -- parameters : TVariant
CUInt -> -- flags : TInterface "Gio" "DBusCallFlags"
Int32 -> -- timeout_msec : TBasicType TInt32
Ptr UnixFDList -> -- fd_list : TInterface "Gio" "UnixFDList"
Ptr (Ptr UnixFDList) -> -- out_fd_list : TInterface "Gio" "UnixFDList"
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO (Ptr GVariant)
dBusProxyCallWithUnixFdListSync ::
(MonadIO m, DBusProxyK a, UnixFDListK b, CancellableK c) =>
a -> -- _obj
T.Text -> -- method_name
Maybe (GVariant) -> -- parameters
[DBusCallFlags] -> -- flags
Int32 -> -- timeout_msec
Maybe (b) -> -- fd_list
Maybe (c) -> -- cancellable
m (GVariant,UnixFDList)
dBusProxyCallWithUnixFdListSync _obj method_name parameters flags timeout_msec fd_list cancellable = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
method_name' <- textToCString method_name
maybeParameters <- case parameters of
Nothing -> return nullPtr
Just jParameters -> do
let jParameters' = unsafeManagedPtrGetPtr jParameters
return jParameters'
let flags' = gflagsToWord flags
maybeFd_list <- case fd_list of
Nothing -> return nullPtr
Just jFd_list -> do
let jFd_list' = unsafeManagedPtrCastPtr jFd_list
return jFd_list'
out_fd_list <- allocMem :: IO (Ptr (Ptr UnixFDList))
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_proxy_call_with_unix_fd_list_sync _obj' method_name' maybeParameters flags' timeout_msec maybeFd_list out_fd_list maybeCancellable
checkUnexpectedReturnNULL "g_dbus_proxy_call_with_unix_fd_list_sync" result
result' <- wrapGVariantPtr result
out_fd_list' <- peek out_fd_list
out_fd_list'' <- (wrapObject UnixFDList) out_fd_list'
touchManagedPtr _obj
whenJust fd_list touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem method_name'
freeMem out_fd_list
return (result', out_fd_list'')
) (do
freeMem method_name'
freeMem out_fd_list
)
-- method DBusProxy::get_cached_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TVariant
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_cached_property" g_dbus_proxy_get_cached_property ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
CString -> -- property_name : TBasicType TUTF8
IO (Ptr GVariant)
dBusProxyGetCachedProperty ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
T.Text -> -- property_name
m GVariant
dBusProxyGetCachedProperty _obj property_name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
property_name' <- textToCString property_name
result <- g_dbus_proxy_get_cached_property _obj' property_name'
checkUnexpectedReturnNULL "g_dbus_proxy_get_cached_property" result
result' <- wrapGVariantPtr result
touchManagedPtr _obj
freeMem property_name'
return result'
-- method DBusProxy::get_cached_property_names
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_cached_property_names" g_dbus_proxy_get_cached_property_names ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO (Ptr CString)
dBusProxyGetCachedPropertyNames ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m [T.Text]
dBusProxyGetCachedPropertyNames _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_cached_property_names _obj'
checkUnexpectedReturnNULL "g_dbus_proxy_get_cached_property_names" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
touchManagedPtr _obj
return result'
-- method DBusProxy::get_connection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusConnection"
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_connection" g_dbus_proxy_get_connection ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO (Ptr DBusConnection)
dBusProxyGetConnection ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m DBusConnection
dBusProxyGetConnection _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_connection _obj'
checkUnexpectedReturnNULL "g_dbus_proxy_get_connection" result
result' <- (newObject DBusConnection) result
touchManagedPtr _obj
return result'
-- method DBusProxy::get_default_timeout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_default_timeout" g_dbus_proxy_get_default_timeout ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO Int32
dBusProxyGetDefaultTimeout ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m Int32
dBusProxyGetDefaultTimeout _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_default_timeout _obj'
touchManagedPtr _obj
return result
-- method DBusProxy::get_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusProxyFlags"
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_flags" g_dbus_proxy_get_flags ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO CUInt
dBusProxyGetFlags ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m [DBusProxyFlags]
dBusProxyGetFlags _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_flags _obj'
let result' = wordToGFlags result
touchManagedPtr _obj
return result'
-- method DBusProxy::get_interface_info
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusInterfaceInfo"
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_interface_info" g_dbus_proxy_get_interface_info ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO (Ptr DBusInterfaceInfo)
dBusProxyGetInterfaceInfo ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m DBusInterfaceInfo
dBusProxyGetInterfaceInfo _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_interface_info _obj'
checkUnexpectedReturnNULL "g_dbus_proxy_get_interface_info" result
result' <- (wrapBoxed DBusInterfaceInfo) result
touchManagedPtr _obj
return result'
-- method DBusProxy::get_interface_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_interface_name" g_dbus_proxy_get_interface_name ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO CString
dBusProxyGetInterfaceName ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m T.Text
dBusProxyGetInterfaceName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_interface_name _obj'
checkUnexpectedReturnNULL "g_dbus_proxy_get_interface_name" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method DBusProxy::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_name" g_dbus_proxy_get_name ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO CString
dBusProxyGetName ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m T.Text
dBusProxyGetName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_name _obj'
checkUnexpectedReturnNULL "g_dbus_proxy_get_name" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method DBusProxy::get_name_owner
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_name_owner" g_dbus_proxy_get_name_owner ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO CString
dBusProxyGetNameOwner ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m T.Text
dBusProxyGetNameOwner _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_name_owner _obj'
checkUnexpectedReturnNULL "g_dbus_proxy_get_name_owner" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method DBusProxy::get_object_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_get_object_path" g_dbus_proxy_get_object_path ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
IO CString
dBusProxyGetObjectPath ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
m T.Text
dBusProxyGetObjectPath _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_dbus_proxy_get_object_path _obj'
checkUnexpectedReturnNULL "g_dbus_proxy_get_object_path" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method DBusProxy::set_cached_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_set_cached_property" g_dbus_proxy_set_cached_property ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
CString -> -- property_name : TBasicType TUTF8
Ptr GVariant -> -- value : TVariant
IO ()
dBusProxySetCachedProperty ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
T.Text -> -- property_name
Maybe (GVariant) -> -- value
m ()
dBusProxySetCachedProperty _obj property_name value = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
property_name' <- textToCString property_name
maybeValue <- case value of
Nothing -> return nullPtr
Just jValue -> do
let jValue' = unsafeManagedPtrGetPtr jValue
return jValue'
g_dbus_proxy_set_cached_property _obj' property_name' maybeValue
touchManagedPtr _obj
freeMem property_name'
return ()
-- method DBusProxy::set_default_timeout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timeout_msec", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_set_default_timeout" g_dbus_proxy_set_default_timeout ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
Int32 -> -- timeout_msec : TBasicType TInt32
IO ()
dBusProxySetDefaultTimeout ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
Int32 -> -- timeout_msec
m ()
dBusProxySetDefaultTimeout _obj timeout_msec = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
g_dbus_proxy_set_default_timeout _obj' timeout_msec
touchManagedPtr _obj
return ()
-- method DBusProxy::set_interface_info
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusProxy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_set_interface_info" g_dbus_proxy_set_interface_info ::
Ptr DBusProxy -> -- _obj : TInterface "Gio" "DBusProxy"
Ptr DBusInterfaceInfo -> -- info : TInterface "Gio" "DBusInterfaceInfo"
IO ()
dBusProxySetInterfaceInfo ::
(MonadIO m, DBusProxyK a) =>
a -> -- _obj
Maybe (DBusInterfaceInfo) -> -- info
m ()
dBusProxySetInterfaceInfo _obj info = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
let jInfo' = unsafeManagedPtrGetPtr jInfo
return jInfo'
g_dbus_proxy_set_interface_info _obj' maybeInfo
touchManagedPtr _obj
whenJust info touchManagedPtr
return ()
-- method DBusProxy::new
-- method type : MemberFunction
-- Args : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusProxyFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 8, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusProxyFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 8, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_new" g_dbus_proxy_new ::
Ptr DBusConnection -> -- connection : TInterface "Gio" "DBusConnection"
CUInt -> -- flags : TInterface "Gio" "DBusProxyFlags"
Ptr DBusInterfaceInfo -> -- info : TInterface "Gio" "DBusInterfaceInfo"
CString -> -- name : TBasicType TUTF8
CString -> -- object_path : TBasicType TUTF8
CString -> -- interface_name : TBasicType TUTF8
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
FunPtr AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback"
Ptr () -> -- user_data : TBasicType TVoid
IO ()
dBusProxyNew ::
(MonadIO m, DBusConnectionK a, CancellableK b) =>
a -> -- connection
[DBusProxyFlags] -> -- flags
Maybe (DBusInterfaceInfo) -> -- info
Maybe (T.Text) -> -- name
T.Text -> -- object_path
T.Text -> -- interface_name
Maybe (b) -> -- cancellable
Maybe (AsyncReadyCallback) -> -- callback
m ()
dBusProxyNew connection flags info name object_path interface_name cancellable callback = liftIO $ do
let connection' = unsafeManagedPtrCastPtr connection
let flags' = gflagsToWord flags
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
let jInfo' = unsafeManagedPtrGetPtr jInfo
return jInfo'
maybeName <- case name of
Nothing -> return nullPtr
Just jName -> do
jName' <- textToCString jName
return jName'
object_path' <- textToCString object_path
interface_name' <- textToCString interface_name
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
ptrcallback <- callocMem :: IO (Ptr (FunPtr AsyncReadyCallbackC))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
jCallback' <- mkAsyncReadyCallback (asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
poke ptrcallback jCallback'
return jCallback'
let user_data = nullPtr
g_dbus_proxy_new connection' flags' maybeInfo maybeName object_path' interface_name' maybeCancellable maybeCallback user_data
touchManagedPtr connection
whenJust info touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeName
freeMem object_path'
freeMem interface_name'
return ()
-- method DBusProxy::new_for_bus
-- method type : MemberFunction
-- Args : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusProxyFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 8, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusProxyFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TInterface "Gio" "DBusInterfaceInfo", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 8, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_proxy_new_for_bus" g_dbus_proxy_new_for_bus ::
CUInt -> -- bus_type : TInterface "Gio" "BusType"
CUInt -> -- flags : TInterface "Gio" "DBusProxyFlags"
Ptr DBusInterfaceInfo -> -- info : TInterface "Gio" "DBusInterfaceInfo"
CString -> -- name : TBasicType TUTF8
CString -> -- object_path : TBasicType TUTF8
CString -> -- interface_name : TBasicType TUTF8
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
FunPtr AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback"
Ptr () -> -- user_data : TBasicType TVoid
IO ()
dBusProxyNewForBus ::
(MonadIO m, CancellableK a) =>
BusType -> -- bus_type
[DBusProxyFlags] -> -- flags
Maybe (DBusInterfaceInfo) -> -- info
T.Text -> -- name
T.Text -> -- object_path
T.Text -> -- interface_name
Maybe (a) -> -- cancellable
Maybe (AsyncReadyCallback) -> -- callback
m ()
dBusProxyNewForBus bus_type flags info name object_path interface_name cancellable callback = liftIO $ do
let bus_type' = (fromIntegral . fromEnum) bus_type
let flags' = gflagsToWord flags
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
let jInfo' = unsafeManagedPtrGetPtr jInfo
return jInfo'
name' <- textToCString name
object_path' <- textToCString object_path
interface_name' <- textToCString interface_name
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
ptrcallback <- callocMem :: IO (Ptr (FunPtr AsyncReadyCallbackC))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
jCallback' <- mkAsyncReadyCallback (asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
poke ptrcallback jCallback'
return jCallback'
let user_data = nullPtr
g_dbus_proxy_new_for_bus bus_type' flags' maybeInfo name' object_path' interface_name' maybeCancellable maybeCallback user_data
whenJust info touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem name'
freeMem object_path'
freeMem interface_name'
return ()