DBusServer.this

Creates a new D-Bus server that listens on the first address in @address that works.

Once constructed, you can use g_dbus_server_get_client_address() to get a D-Bus address string that clients can use to connect.

Connect to the #GDBusServer::new-connection signal to handle incoming connections.

The returned #GDBusServer isn't active - you have to start it with g_dbus_server_start().

#GDBusServer is used in this example[gdbus-peer-to-peer].

This is a synchronous failable constructor. See g_dbus_server_new() for the asynchronous version.

  1. this(GDBusServer* gDBusServer, bool ownedRef)
  2. this(string address, GDBusServerFlags flags, string guid, DBusAuthObserver observer, Cancellable cancellable)

Parameters

address string

A D-Bus address.

flags GDBusServerFlags

Flags from the #GDBusServerFlags enumeration.

guid string

A D-Bus GUID.

observer DBusAuthObserver

A #GDBusAuthObserver or %NULL.

cancellable Cancellable

A #GCancellable or %NULL.

Return Value

A #GDBusServer or %NULL if @error is set. Free with g_object_unref().

Throws

GException on failure. ConstructionException GTK+ fails to create the object.

Meta

Since

2.26