DBusServer


Object Hierarchy:

GLib.DBusServer GLib.DBusServer GLib.DBusServer GLib.Object GLib.Object GLib.Object->GLib.DBusServer GLib.Initable GLib.Initable GLib.Initable->GLib.DBusServer

Description:

[ CCode ( type_id = "g_dbus_server_get_type ()" ) ]
[ Version ( since = "2.26" ) ]
public class DBusServer : Object, Initable

DBusServer 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 g_bus_own_name.

An example of peer-to-peer communication with GDBus can be found in gdbus-example-peer.c.

Note that a minimal DBusServer 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 DBusServer. 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.


Namespace: GLib
Package: gio-2.0

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class GLib.Object
All known members inherited from interface GLib.Initable



2022 vala-language.org