#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.DBusServer
(
DBusServer(..) ,
IsDBusServer ,
toDBusServer ,
noDBusServer ,
#if ENABLE_OVERLOADING
DBusServerGetClientAddressMethodInfo ,
#endif
dBusServerGetClientAddress ,
#if ENABLE_OVERLOADING
DBusServerGetFlagsMethodInfo ,
#endif
dBusServerGetFlags ,
#if ENABLE_OVERLOADING
DBusServerGetGuidMethodInfo ,
#endif
dBusServerGetGuid ,
#if ENABLE_OVERLOADING
DBusServerIsActiveMethodInfo ,
#endif
dBusServerIsActive ,
dBusServerNewSync ,
#if ENABLE_OVERLOADING
DBusServerStartMethodInfo ,
#endif
dBusServerStart ,
#if ENABLE_OVERLOADING
DBusServerStopMethodInfo ,
#endif
dBusServerStop ,
#if ENABLE_OVERLOADING
DBusServerActivePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
dBusServerActive ,
#endif
getDBusServerActive ,
#if ENABLE_OVERLOADING
DBusServerAddressPropertyInfo ,
#endif
constructDBusServerAddress ,
#if ENABLE_OVERLOADING
dBusServerAddress ,
#endif
getDBusServerAddress ,
#if ENABLE_OVERLOADING
DBusServerAuthenticationObserverPropertyInfo,
#endif
constructDBusServerAuthenticationObserver,
#if ENABLE_OVERLOADING
dBusServerAuthenticationObserver ,
#endif
getDBusServerAuthenticationObserver ,
#if ENABLE_OVERLOADING
DBusServerClientAddressPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
dBusServerClientAddress ,
#endif
getDBusServerClientAddress ,
#if ENABLE_OVERLOADING
DBusServerFlagsPropertyInfo ,
#endif
constructDBusServerFlags ,
#if ENABLE_OVERLOADING
dBusServerFlags ,
#endif
getDBusServerFlags ,
#if ENABLE_OVERLOADING
DBusServerGuidPropertyInfo ,
#endif
constructDBusServerGuid ,
#if ENABLE_OVERLOADING
dBusServerGuid ,
#endif
getDBusServerGuid ,
C_DBusServerNewConnectionCallback ,
DBusServerNewConnectionCallback ,
#if ENABLE_OVERLOADING
DBusServerNewConnectionSignalInfo ,
#endif
afterDBusServerNewConnection ,
genClosure_DBusServerNewConnection ,
mk_DBusServerNewConnectionCallback ,
noDBusServerNewConnectionCallback ,
onDBusServerNewConnection ,
wrap_DBusServerNewConnectionCallback ,
) 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusAuthObserver as Gio.DBusAuthObserver
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
newtype DBusServer = DBusServer (ManagedPtr DBusServer)
foreign import ccall "g_dbus_server_get_type"
c_g_dbus_server_get_type :: IO GType
instance GObject DBusServer where
gobjectType _ = c_g_dbus_server_get_type
class GObject o => IsDBusServer o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError DBusServer a) =>
IsDBusServer a
#endif
instance IsDBusServer DBusServer
instance GObject.Object.IsObject DBusServer
instance Gio.Initable.IsInitable DBusServer
toDBusServer :: (MonadIO m, IsDBusServer o) => o -> m DBusServer
toDBusServer = liftIO . unsafeCastTo DBusServer
noDBusServer :: Maybe DBusServer
noDBusServer = Nothing
#if ENABLE_OVERLOADING
type family ResolveDBusServerMethod (t :: Symbol) (o :: *) :: * where
ResolveDBusServerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusServerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusServerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusServerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusServerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusServerMethod "init" o = Gio.Initable.InitableInitMethodInfo
ResolveDBusServerMethod "isActive" o = DBusServerIsActiveMethodInfo
ResolveDBusServerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusServerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusServerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusServerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusServerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusServerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusServerMethod "start" o = DBusServerStartMethodInfo
ResolveDBusServerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusServerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusServerMethod "stop" o = DBusServerStopMethodInfo
ResolveDBusServerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusServerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusServerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusServerMethod "getClientAddress" o = DBusServerGetClientAddressMethodInfo
ResolveDBusServerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusServerMethod "getFlags" o = DBusServerGetFlagsMethodInfo
ResolveDBusServerMethod "getGuid" o = DBusServerGetGuidMethodInfo
ResolveDBusServerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusServerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusServerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusServerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusServerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusServerMethod t DBusServer, O.MethodInfo info DBusServer p) => O.IsLabelProxy t (DBusServer -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDBusServerMethod t DBusServer, O.MethodInfo info DBusServer p) => O.IsLabel t (DBusServer -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif
type DBusServerNewConnectionCallback =
Gio.DBusConnection.DBusConnection
-> IO Bool
noDBusServerNewConnectionCallback :: Maybe DBusServerNewConnectionCallback
noDBusServerNewConnectionCallback = Nothing
type C_DBusServerNewConnectionCallback =
Ptr () ->
Ptr Gio.DBusConnection.DBusConnection ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_DBusServerNewConnectionCallback :: C_DBusServerNewConnectionCallback -> IO (FunPtr C_DBusServerNewConnectionCallback)
genClosure_DBusServerNewConnection :: DBusServerNewConnectionCallback -> IO Closure
genClosure_DBusServerNewConnection cb = do
let cb' = wrap_DBusServerNewConnectionCallback cb
mk_DBusServerNewConnectionCallback cb' >>= newCClosure
wrap_DBusServerNewConnectionCallback ::
DBusServerNewConnectionCallback ->
C_DBusServerNewConnectionCallback
wrap_DBusServerNewConnectionCallback _cb _ connection _ = do
connection' <- (newObject Gio.DBusConnection.DBusConnection) connection
result <- _cb connection'
let result' = (fromIntegral . fromEnum) result
return result'
onDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> DBusServerNewConnectionCallback -> m SignalHandlerId
onDBusServerNewConnection obj cb = liftIO $ do
let cb' = wrap_DBusServerNewConnectionCallback cb
cb'' <- mk_DBusServerNewConnectionCallback cb'
connectSignalFunPtr obj "new-connection" cb'' SignalConnectBefore
afterDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> DBusServerNewConnectionCallback -> m SignalHandlerId
afterDBusServerNewConnection obj cb = liftIO $ do
let cb' = wrap_DBusServerNewConnectionCallback cb
cb'' <- mk_DBusServerNewConnectionCallback cb'
connectSignalFunPtr obj "new-connection" cb'' SignalConnectAfter
getDBusServerActive :: (MonadIO m, IsDBusServer o) => o -> m Bool
getDBusServerActive obj = liftIO $ getObjectPropertyBool obj "active"
#if ENABLE_OVERLOADING
data DBusServerActivePropertyInfo
instance AttrInfo DBusServerActivePropertyInfo where
type AttrAllowedOps DBusServerActivePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DBusServerActivePropertyInfo = (~) ()
type AttrBaseTypeConstraint DBusServerActivePropertyInfo = IsDBusServer
type AttrGetType DBusServerActivePropertyInfo = Bool
type AttrLabel DBusServerActivePropertyInfo = "active"
type AttrOrigin DBusServerActivePropertyInfo = DBusServer
attrGet _ = getDBusServerActive
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getDBusServerAddress :: (MonadIO m, IsDBusServer o) => o -> m (Maybe T.Text)
getDBusServerAddress obj = liftIO $ getObjectPropertyString obj "address"
constructDBusServerAddress :: (IsDBusServer o) => T.Text -> IO (GValueConstruct o)
constructDBusServerAddress val = constructObjectPropertyString "address" (Just val)
#if ENABLE_OVERLOADING
data DBusServerAddressPropertyInfo
instance AttrInfo DBusServerAddressPropertyInfo where
type AttrAllowedOps DBusServerAddressPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusServerAddressPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DBusServerAddressPropertyInfo = IsDBusServer
type AttrGetType DBusServerAddressPropertyInfo = (Maybe T.Text)
type AttrLabel DBusServerAddressPropertyInfo = "address"
type AttrOrigin DBusServerAddressPropertyInfo = DBusServer
attrGet _ = getDBusServerAddress
attrSet _ = undefined
attrConstruct _ = constructDBusServerAddress
attrClear _ = undefined
#endif
getDBusServerAuthenticationObserver :: (MonadIO m, IsDBusServer o) => o -> m (Maybe Gio.DBusAuthObserver.DBusAuthObserver)
getDBusServerAuthenticationObserver obj = liftIO $ getObjectPropertyObject obj "authentication-observer" Gio.DBusAuthObserver.DBusAuthObserver
constructDBusServerAuthenticationObserver :: (IsDBusServer o, Gio.DBusAuthObserver.IsDBusAuthObserver a) => a -> IO (GValueConstruct o)
constructDBusServerAuthenticationObserver val = constructObjectPropertyObject "authentication-observer" (Just val)
#if ENABLE_OVERLOADING
data DBusServerAuthenticationObserverPropertyInfo
instance AttrInfo DBusServerAuthenticationObserverPropertyInfo where
type AttrAllowedOps DBusServerAuthenticationObserverPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusServerAuthenticationObserverPropertyInfo = Gio.DBusAuthObserver.IsDBusAuthObserver
type AttrBaseTypeConstraint DBusServerAuthenticationObserverPropertyInfo = IsDBusServer
type AttrGetType DBusServerAuthenticationObserverPropertyInfo = (Maybe Gio.DBusAuthObserver.DBusAuthObserver)
type AttrLabel DBusServerAuthenticationObserverPropertyInfo = "authentication-observer"
type AttrOrigin DBusServerAuthenticationObserverPropertyInfo = DBusServer
attrGet _ = getDBusServerAuthenticationObserver
attrSet _ = undefined
attrConstruct _ = constructDBusServerAuthenticationObserver
attrClear _ = undefined
#endif
getDBusServerClientAddress :: (MonadIO m, IsDBusServer o) => o -> m T.Text
getDBusServerClientAddress obj = liftIO $ checkUnexpectedNothing "getDBusServerClientAddress" $ getObjectPropertyString obj "client-address"
#if ENABLE_OVERLOADING
data DBusServerClientAddressPropertyInfo
instance AttrInfo DBusServerClientAddressPropertyInfo where
type AttrAllowedOps DBusServerClientAddressPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusServerClientAddressPropertyInfo = (~) ()
type AttrBaseTypeConstraint DBusServerClientAddressPropertyInfo = IsDBusServer
type AttrGetType DBusServerClientAddressPropertyInfo = T.Text
type AttrLabel DBusServerClientAddressPropertyInfo = "client-address"
type AttrOrigin DBusServerClientAddressPropertyInfo = DBusServer
attrGet _ = getDBusServerClientAddress
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getDBusServerFlags :: (MonadIO m, IsDBusServer o) => o -> m [Gio.Flags.DBusServerFlags]
getDBusServerFlags obj = liftIO $ getObjectPropertyFlags obj "flags"
constructDBusServerFlags :: (IsDBusServer o) => [Gio.Flags.DBusServerFlags] -> IO (GValueConstruct o)
constructDBusServerFlags val = constructObjectPropertyFlags "flags" val
#if ENABLE_OVERLOADING
data DBusServerFlagsPropertyInfo
instance AttrInfo DBusServerFlagsPropertyInfo where
type AttrAllowedOps DBusServerFlagsPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DBusServerFlagsPropertyInfo = (~) [Gio.Flags.DBusServerFlags]
type AttrBaseTypeConstraint DBusServerFlagsPropertyInfo = IsDBusServer
type AttrGetType DBusServerFlagsPropertyInfo = [Gio.Flags.DBusServerFlags]
type AttrLabel DBusServerFlagsPropertyInfo = "flags"
type AttrOrigin DBusServerFlagsPropertyInfo = DBusServer
attrGet _ = getDBusServerFlags
attrSet _ = undefined
attrConstruct _ = constructDBusServerFlags
attrClear _ = undefined
#endif
getDBusServerGuid :: (MonadIO m, IsDBusServer o) => o -> m T.Text
getDBusServerGuid obj = liftIO $ checkUnexpectedNothing "getDBusServerGuid" $ getObjectPropertyString obj "guid"
constructDBusServerGuid :: (IsDBusServer o) => T.Text -> IO (GValueConstruct o)
constructDBusServerGuid val = constructObjectPropertyString "guid" (Just val)
#if ENABLE_OVERLOADING
data DBusServerGuidPropertyInfo
instance AttrInfo DBusServerGuidPropertyInfo where
type AttrAllowedOps DBusServerGuidPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusServerGuidPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DBusServerGuidPropertyInfo = IsDBusServer
type AttrGetType DBusServerGuidPropertyInfo = T.Text
type AttrLabel DBusServerGuidPropertyInfo = "guid"
type AttrOrigin DBusServerGuidPropertyInfo = DBusServer
attrGet _ = getDBusServerGuid
attrSet _ = undefined
attrConstruct _ = constructDBusServerGuid
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList DBusServer
type instance O.AttributeList DBusServer = DBusServerAttributeList
type DBusServerAttributeList = ('[ '("active", DBusServerActivePropertyInfo), '("address", DBusServerAddressPropertyInfo), '("authenticationObserver", DBusServerAuthenticationObserverPropertyInfo), '("clientAddress", DBusServerClientAddressPropertyInfo), '("flags", DBusServerFlagsPropertyInfo), '("guid", DBusServerGuidPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
dBusServerActive :: AttrLabelProxy "active"
dBusServerActive = AttrLabelProxy
dBusServerAddress :: AttrLabelProxy "address"
dBusServerAddress = AttrLabelProxy
dBusServerAuthenticationObserver :: AttrLabelProxy "authenticationObserver"
dBusServerAuthenticationObserver = AttrLabelProxy
dBusServerClientAddress :: AttrLabelProxy "clientAddress"
dBusServerClientAddress = AttrLabelProxy
dBusServerFlags :: AttrLabelProxy "flags"
dBusServerFlags = AttrLabelProxy
dBusServerGuid :: AttrLabelProxy "guid"
dBusServerGuid = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data DBusServerNewConnectionSignalInfo
instance SignalInfo DBusServerNewConnectionSignalInfo where
type HaskellCallbackType DBusServerNewConnectionSignalInfo = DBusServerNewConnectionCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_DBusServerNewConnectionCallback cb
cb'' <- mk_DBusServerNewConnectionCallback cb'
connectSignalFunPtr obj "new-connection" cb'' connectMode
type instance O.SignalList DBusServer = DBusServerSignalList
type DBusServerSignalList = ('[ '("newConnection", DBusServerNewConnectionSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_dbus_server_new_sync" g_dbus_server_new_sync ::
CString ->
CUInt ->
CString ->
Ptr Gio.DBusAuthObserver.DBusAuthObserver ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr DBusServer)
dBusServerNewSync ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusAuthObserver.IsDBusAuthObserver a, Gio.Cancellable.IsCancellable b) =>
T.Text
-> [Gio.Flags.DBusServerFlags]
-> T.Text
-> Maybe (a)
-> Maybe (b)
-> m DBusServer
dBusServerNewSync address flags guid observer cancellable = liftIO $ do
address' <- textToCString address
let flags' = gflagsToWord flags
guid' <- textToCString guid
maybeObserver <- case observer of
Nothing -> return nullPtr
Just jObserver -> do
jObserver' <- unsafeManagedPtrCastPtr jObserver
return jObserver'
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_server_new_sync address' flags' guid' maybeObserver maybeCancellable
checkUnexpectedReturnNULL "dBusServerNewSync" result
result' <- (wrapObject DBusServer) result
whenJust observer touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem address'
freeMem guid'
return result'
) (do
freeMem address'
freeMem guid'
)
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_dbus_server_get_client_address" g_dbus_server_get_client_address ::
Ptr DBusServer ->
IO CString
dBusServerGetClientAddress ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusServer a) =>
a
-> m T.Text
dBusServerGetClientAddress server = liftIO $ do
server' <- unsafeManagedPtrCastPtr server
result <- g_dbus_server_get_client_address server'
checkUnexpectedReturnNULL "dBusServerGetClientAddress" result
result' <- cstringToText result
touchManagedPtr server
return result'
#if ENABLE_OVERLOADING
data DBusServerGetClientAddressMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusServer a) => O.MethodInfo DBusServerGetClientAddressMethodInfo a signature where
overloadedMethod _ = dBusServerGetClientAddress
#endif
foreign import ccall "g_dbus_server_get_flags" g_dbus_server_get_flags ::
Ptr DBusServer ->
IO CUInt
dBusServerGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusServer a) =>
a
-> m [Gio.Flags.DBusServerFlags]
dBusServerGetFlags server = liftIO $ do
server' <- unsafeManagedPtrCastPtr server
result <- g_dbus_server_get_flags server'
let result' = wordToGFlags result
touchManagedPtr server
return result'
#if ENABLE_OVERLOADING
data DBusServerGetFlagsMethodInfo
instance (signature ~ (m [Gio.Flags.DBusServerFlags]), MonadIO m, IsDBusServer a) => O.MethodInfo DBusServerGetFlagsMethodInfo a signature where
overloadedMethod _ = dBusServerGetFlags
#endif
foreign import ccall "g_dbus_server_get_guid" g_dbus_server_get_guid ::
Ptr DBusServer ->
IO CString
dBusServerGetGuid ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusServer a) =>
a
-> m T.Text
dBusServerGetGuid server = liftIO $ do
server' <- unsafeManagedPtrCastPtr server
result <- g_dbus_server_get_guid server'
checkUnexpectedReturnNULL "dBusServerGetGuid" result
result' <- cstringToText result
touchManagedPtr server
return result'
#if ENABLE_OVERLOADING
data DBusServerGetGuidMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusServer a) => O.MethodInfo DBusServerGetGuidMethodInfo a signature where
overloadedMethod _ = dBusServerGetGuid
#endif
foreign import ccall "g_dbus_server_is_active" g_dbus_server_is_active ::
Ptr DBusServer ->
IO CInt
dBusServerIsActive ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusServer a) =>
a
-> m Bool
dBusServerIsActive server = liftIO $ do
server' <- unsafeManagedPtrCastPtr server
result <- g_dbus_server_is_active server'
let result' = (/= 0) result
touchManagedPtr server
return result'
#if ENABLE_OVERLOADING
data DBusServerIsActiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDBusServer a) => O.MethodInfo DBusServerIsActiveMethodInfo a signature where
overloadedMethod _ = dBusServerIsActive
#endif
foreign import ccall "g_dbus_server_start" g_dbus_server_start ::
Ptr DBusServer ->
IO ()
dBusServerStart ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusServer a) =>
a
-> m ()
dBusServerStart server = liftIO $ do
server' <- unsafeManagedPtrCastPtr server
g_dbus_server_start server'
touchManagedPtr server
return ()
#if ENABLE_OVERLOADING
data DBusServerStartMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDBusServer a) => O.MethodInfo DBusServerStartMethodInfo a signature where
overloadedMethod _ = dBusServerStart
#endif
foreign import ccall "g_dbus_server_stop" g_dbus_server_stop ::
Ptr DBusServer ->
IO ()
dBusServerStop ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusServer a) =>
a
-> m ()
dBusServerStop server = liftIO $ do
server' <- unsafeManagedPtrCastPtr server
g_dbus_server_stop server'
touchManagedPtr server
return ()
#if ENABLE_OVERLOADING
data DBusServerStopMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDBusServer a) => O.MethodInfo DBusServerStopMethodInfo a signature where
overloadedMethod _ = dBusServerStop
#endif