Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Objects.DBusServer
Description
GDBusServer
is a helper for listening to and accepting D-Bus
connections. This can be used to create a new D-Bus server, allowing two
peers to use the D-Bus protocol for their own specialized communication.
A server instance provided in this way will not perform message routing or
implement the
`org.freedesktop.DBus` interface.
To just export an object on a well-known name on a message bus, such as the
session or system bus, you should instead use busOwnName
.
An example of peer-to-peer communication with GDBus can be found in gdbus-example-peer.c.
Note that a minimal GDBusServer
will accept connections from any
peer. In many use-cases it will be necessary to add a
DBusAuthObserver
that only accepts connections that have
successfully authenticated as the same user that is running the
GDBusServer
. Since GLib 2.68 this can be achieved more simply by passing
the G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER
flag to the
server.
Since: 2.26
Synopsis
- newtype DBusServer = DBusServer (ManagedPtr DBusServer)
- class (GObject o, IsDescendantOf DBusServer o) => IsDBusServer o
- toDBusServer :: (MonadIO m, IsDBusServer o) => o -> m DBusServer
- type family ResolveDBusServerMethod (t :: Symbol) o where ...
- data DBusServerGetClientAddressMethodInfo
- dBusServerGetClientAddress :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Text
- data DBusServerGetFlagsMethodInfo
- dBusServerGetFlags :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m [DBusServerFlags]
- data DBusServerGetGuidMethodInfo
- dBusServerGetGuid :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Text
- data DBusServerIsActiveMethodInfo
- dBusServerIsActive :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Bool
- dBusServerNewSync :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) => Text -> [DBusServerFlags] -> Text -> Maybe a -> Maybe b -> m DBusServer
- data DBusServerStartMethodInfo
- dBusServerStart :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m ()
- data DBusServerStopMethodInfo
- dBusServerStop :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m ()
- data DBusServerActivePropertyInfo
- dBusServerActive :: AttrLabelProxy "active"
- getDBusServerActive :: (MonadIO m, IsDBusServer o) => o -> m Bool
- data DBusServerAddressPropertyInfo
- constructDBusServerAddress :: (IsDBusServer o, MonadIO m) => Text -> m (GValueConstruct o)
- dBusServerAddress :: AttrLabelProxy "address"
- getDBusServerAddress :: (MonadIO m, IsDBusServer o) => o -> m (Maybe Text)
- data DBusServerAuthenticationObserverPropertyInfo
- constructDBusServerAuthenticationObserver :: (IsDBusServer o, MonadIO m, IsDBusAuthObserver a) => a -> m (GValueConstruct o)
- dBusServerAuthenticationObserver :: AttrLabelProxy "authenticationObserver"
- getDBusServerAuthenticationObserver :: (MonadIO m, IsDBusServer o) => o -> m (Maybe DBusAuthObserver)
- data DBusServerClientAddressPropertyInfo
- dBusServerClientAddress :: AttrLabelProxy "clientAddress"
- getDBusServerClientAddress :: (MonadIO m, IsDBusServer o) => o -> m Text
- data DBusServerFlagsPropertyInfo
- constructDBusServerFlags :: (IsDBusServer o, MonadIO m) => [DBusServerFlags] -> m (GValueConstruct o)
- dBusServerFlags :: AttrLabelProxy "flags"
- getDBusServerFlags :: (MonadIO m, IsDBusServer o) => o -> m [DBusServerFlags]
- data DBusServerGuidPropertyInfo
- constructDBusServerGuid :: (IsDBusServer o, MonadIO m) => Text -> m (GValueConstruct o)
- dBusServerGuid :: AttrLabelProxy "guid"
- getDBusServerGuid :: (MonadIO m, IsDBusServer o) => o -> m Text
- type DBusServerNewConnectionCallback = DBusConnection -> IO Bool
- data DBusServerNewConnectionSignalInfo
- afterDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> ((?self :: a) => DBusServerNewConnectionCallback) -> m SignalHandlerId
- onDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> ((?self :: a) => DBusServerNewConnectionCallback) -> m SignalHandlerId
Exported types
newtype DBusServer Source #
Memory-managed wrapper type.
Constructors
DBusServer (ManagedPtr DBusServer) |
Instances
class (GObject o, IsDescendantOf DBusServer o) => IsDBusServer o Source #
Type class for types which can be safely cast to DBusServer
, for instance with toDBusServer
.
Instances
(GObject o, IsDescendantOf DBusServer o) => IsDBusServer o Source # | |
Defined in GI.Gio.Objects.DBusServer |
toDBusServer :: (MonadIO m, IsDBusServer o) => o -> m DBusServer Source #
Cast to DBusServer
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, init, isActive, isFloating, notify, notifyByPspec, ref, refSink, runDispose, start, stealData, stealQdata, stop, thawNotify, unref, watchClosure.
Getters
getClientAddress, getData, getFlags, getGuid, getProperty, getQdata.
Setters
type family ResolveDBusServerMethod (t :: Symbol) o where ... Source #
Equations
getClientAddress
data DBusServerGetClientAddressMethodInfo Source #
Instances
(signature ~ m Text, MonadIO m, IsDBusServer a) => OverloadedMethod DBusServerGetClientAddressMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusServer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusServerGetClientAddressMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusServer Methods |
dBusServerGetClientAddress Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusServer a) | |
=> a |
|
-> m Text | Returns: A D-Bus address string. Do not free, the string is owned
by |
Gets a
D-Bus address
string that can be used by clients to connect to server
.
This is valid and non-empty if initializing the DBusServer
succeeded.
Since: 2.26
getFlags
data DBusServerGetFlagsMethodInfo Source #
Instances
(signature ~ m [DBusServerFlags], MonadIO m, IsDBusServer a) => OverloadedMethod DBusServerGetFlagsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusServer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusServerGetFlagsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusServer Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDBusServer a) | |
=> a |
|
-> m [DBusServerFlags] | Returns: A set of flags from the |
Gets the flags for server
.
Since: 2.26
getGuid
data DBusServerGetGuidMethodInfo Source #
Instances
(signature ~ m Text, MonadIO m, IsDBusServer a) => OverloadedMethod DBusServerGetGuidMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusServer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusServerGetGuidMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusServer Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDBusServer a) | |
=> a |
|
-> m Text | Returns: A D-Bus GUID. Do not free this string, it is owned by |
Gets the GUID for server
, as provided to dBusServerNewSync
.
Since: 2.26
isActive
data DBusServerIsActiveMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDBusServer a) => OverloadedMethod DBusServerIsActiveMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusServer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusServerIsActiveMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusServer Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDBusServer a) | |
=> a |
|
-> m Bool |
Gets whether server
is active.
Since: 2.26
newSync
Arguments
:: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) | |
=> Text |
|
-> [DBusServerFlags] |
|
-> Text |
|
-> Maybe a |
|
-> Maybe b |
|
-> m DBusServer | Returns: A |
Creates a new D-Bus server that listens on the first address in
address
that works.
Once constructed, you can use dBusServerGetClientAddress
to
get a D-Bus address string that clients can use to connect.
To have control over the available authentication mechanisms and
the users that are authorized to connect, it is strongly recommended
to provide a non-Nothing
DBusAuthObserver
.
Connect to the DBusServer::newConnection signal to handle incoming connections.
The returned DBusServer
isn't active - you have to start it with
dBusServerStart
.
DBusServer
is used in this example.
This is a synchronous failable constructor. There is currently no asynchronous version.
Since: 2.26
start
data DBusServerStartMethodInfo Source #
Instances
(signature ~ m (), MonadIO m, IsDBusServer a) => OverloadedMethod DBusServerStartMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusServer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusServerStartMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusServer Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDBusServer a) | |
=> a |
|
-> m () |
Starts server
.
Since: 2.26
stop
data DBusServerStopMethodInfo Source #
Instances
(signature ~ m (), MonadIO m, IsDBusServer a) => OverloadedMethod DBusServerStopMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusServer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusServerStopMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusServer Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDBusServer a) | |
=> a |
|
-> m () |
Stops server
.
Since: 2.26
Properties
active
Whether the server is currently active.
Since: 2.26
data DBusServerActivePropertyInfo Source #
Instances
dBusServerActive :: AttrLabelProxy "active" Source #
getDBusServerActive :: (MonadIO m, IsDBusServer o) => o -> m Bool Source #
Get the value of the “active
” property.
When overloading is enabled, this is equivalent to
get
dBusServer #active
address
The D-Bus address to listen on.
Since: 2.26
data DBusServerAddressPropertyInfo Source #
Instances
AttrInfo DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer Associated Types
Methods attrGet :: AttrBaseTypeConstraint DBusServerAddressPropertyInfo o => o -> IO (AttrGetType DBusServerAddressPropertyInfo) # attrSet :: (AttrBaseTypeConstraint DBusServerAddressPropertyInfo o, AttrSetTypeConstraint DBusServerAddressPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint DBusServerAddressPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint DBusServerAddressPropertyInfo o, AttrSetTypeConstraint DBusServerAddressPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint DBusServerAddressPropertyInfo o, AttrTransferTypeConstraint DBusServerAddressPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType DBusServerAddressPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrLabel DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrOrigin DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrTransferType DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint DBusServerAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer |
constructDBusServerAddress :: (IsDBusServer o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “address
” property. This is rarely needed directly, but it is used by new
.
dBusServerAddress :: AttrLabelProxy "address" Source #
getDBusServerAddress :: (MonadIO m, IsDBusServer o) => o -> m (Maybe Text) Source #
Get the value of the “address
” property.
When overloading is enabled, this is equivalent to
get
dBusServer #address
authenticationObserver
A DBusAuthObserver
object to assist in the authentication process or Nothing
.
Since: 2.26
data DBusServerAuthenticationObserverPropertyInfo Source #
Instances
AttrInfo DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer Associated Types
Methods attrGet :: AttrBaseTypeConstraint DBusServerAuthenticationObserverPropertyInfo o => o -> IO (AttrGetType DBusServerAuthenticationObserverPropertyInfo) # attrSet :: (AttrBaseTypeConstraint DBusServerAuthenticationObserverPropertyInfo o, AttrSetTypeConstraint DBusServerAuthenticationObserverPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint DBusServerAuthenticationObserverPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint DBusServerAuthenticationObserverPropertyInfo o, AttrSetTypeConstraint DBusServerAuthenticationObserverPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint DBusServerAuthenticationObserverPropertyInfo o, AttrTransferTypeConstraint DBusServerAuthenticationObserverPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType DBusServerAuthenticationObserverPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrOrigin DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint DBusServerAuthenticationObserverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructDBusServerAuthenticationObserver :: (IsDBusServer o, MonadIO m, IsDBusAuthObserver a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “authentication-observer
” property. This is rarely needed directly, but it is used by new
.
dBusServerAuthenticationObserver :: AttrLabelProxy "authenticationObserver" Source #
getDBusServerAuthenticationObserver :: (MonadIO m, IsDBusServer o) => o -> m (Maybe DBusAuthObserver) Source #
Get the value of the “authentication-observer
” property.
When overloading is enabled, this is equivalent to
get
dBusServer #authenticationObserver
clientAddress
The D-Bus address that clients can use.
Since: 2.26
data DBusServerClientAddressPropertyInfo Source #
Instances
AttrInfo DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer Associated Types
Methods attrGet :: AttrBaseTypeConstraint DBusServerClientAddressPropertyInfo o => o -> IO (AttrGetType DBusServerClientAddressPropertyInfo) # attrSet :: (AttrBaseTypeConstraint DBusServerClientAddressPropertyInfo o, AttrSetTypeConstraint DBusServerClientAddressPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint DBusServerClientAddressPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint DBusServerClientAddressPropertyInfo o, AttrSetTypeConstraint DBusServerClientAddressPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint DBusServerClientAddressPropertyInfo o, AttrTransferTypeConstraint DBusServerClientAddressPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType DBusServerClientAddressPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrLabel DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrOrigin DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrTransferType DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint DBusServerClientAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer |
dBusServerClientAddress :: AttrLabelProxy "clientAddress" Source #
getDBusServerClientAddress :: (MonadIO m, IsDBusServer o) => o -> m Text Source #
Get the value of the “client-address
” property.
When overloading is enabled, this is equivalent to
get
dBusServer #clientAddress
flags
Flags from the DBusServerFlags
enumeration.
Since: 2.26
data DBusServerFlagsPropertyInfo Source #
Instances
AttrInfo DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer Associated Types
Methods attrGet :: AttrBaseTypeConstraint DBusServerFlagsPropertyInfo o => o -> IO (AttrGetType DBusServerFlagsPropertyInfo) # attrSet :: (AttrBaseTypeConstraint DBusServerFlagsPropertyInfo o, AttrSetTypeConstraint DBusServerFlagsPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint DBusServerFlagsPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint DBusServerFlagsPropertyInfo o, AttrSetTypeConstraint DBusServerFlagsPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint DBusServerFlagsPropertyInfo o, AttrTransferTypeConstraint DBusServerFlagsPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType DBusServerFlagsPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrLabel DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrOrigin DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrTransferType DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint DBusServerFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer |
constructDBusServerFlags :: (IsDBusServer o, MonadIO m) => [DBusServerFlags] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “flags
” property. This is rarely needed directly, but it is used by new
.
dBusServerFlags :: AttrLabelProxy "flags" Source #
getDBusServerFlags :: (MonadIO m, IsDBusServer o) => o -> m [DBusServerFlags] Source #
Get the value of the “flags
” property.
When overloading is enabled, this is equivalent to
get
dBusServer #flags
guid
data DBusServerGuidPropertyInfo Source #
Instances
AttrInfo DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer Associated Types
Methods attrGet :: AttrBaseTypeConstraint DBusServerGuidPropertyInfo o => o -> IO (AttrGetType DBusServerGuidPropertyInfo) # attrSet :: (AttrBaseTypeConstraint DBusServerGuidPropertyInfo o, AttrSetTypeConstraint DBusServerGuidPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint DBusServerGuidPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint DBusServerGuidPropertyInfo o, AttrSetTypeConstraint DBusServerGuidPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint DBusServerGuidPropertyInfo o, AttrTransferTypeConstraint DBusServerGuidPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType DBusServerGuidPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrLabel DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrOrigin DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrTransferType DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint DBusServerGuidPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.DBusServer |
constructDBusServerGuid :: (IsDBusServer o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “guid
” property. This is rarely needed directly, but it is used by new
.
dBusServerGuid :: AttrLabelProxy "guid" Source #
getDBusServerGuid :: (MonadIO m, IsDBusServer o) => o -> m Text Source #
Get the value of the “guid
” property.
When overloading is enabled, this is equivalent to
get
dBusServer #guid
Signals
newConnection
type DBusServerNewConnectionCallback Source #
Arguments
= DBusConnection |
|
-> IO Bool | Returns: |
Emitted when a new authenticated connection has been made. Use
dBusConnectionGetPeerCredentials
to figure out what
identity (if any), was authenticated.
If you want to accept the connection, take a reference to the
connection
object and return True
. When you are done with the
connection call dBusConnectionClose
and give up your
reference. Note that the other peer may disconnect at any time -
a typical thing to do when accepting a connection is to listen to
the DBusConnection::closed signal.
If DBusServer:flags contains DBusServerFlagsRunInThread
then the signal is emitted in a new thread dedicated to the
connection. Otherwise the signal is emitted in the thread-default
main context (see mainContextPushThreadDefault
)
of the thread that server
was constructed in.
You are guaranteed that signal handlers for this signal runs
before incoming messages on connection
are processed. This means
that it's suitable to call g_dbus_connection_register_object()
or
similar from the signal handler.
Since: 2.26
data DBusServerNewConnectionSignalInfo Source #
Instances
SignalInfo DBusServerNewConnectionSignalInfo Source # | |||||
Defined in GI.Gio.Objects.DBusServer Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DBusServerNewConnectionSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType DBusServerNewConnectionSignalInfo Source # | |||||
afterDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> ((?self :: a) => DBusServerNewConnectionCallback) -> m SignalHandlerId Source #
Connect a signal handler for the newConnection signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dBusServer #newConnection callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> ((?self :: a) => DBusServerNewConnectionCallback) -> m SignalHandlerId Source #
Connect a signal handler for the newConnection signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dBusServer #newConnection callback