mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Bug 621213 – GDBusProxy and well-known names
Allow constructing a GDBusProxy for well-known names as discussed here http://mail.gnome.org/archives/gtk-devel-list/2009-October/msg00075.html including test cases. Make it possible to create a GDBusProxy for a GBusType instead of a GDBusConnection. This requires G_BUS_TYPE_NONE so add that too. Nuke g_bus_watch_proxy() since one can now more or less use GDBusProxy for this. Port gdbus-example-watch-proxy to this new API and include this example in the GDBusProxy doc page. Also nuke the GType parameter from the GDBusProxy constructors as requested here: https://bugzilla.gnome.org/show_bug.cgi?id=621229 Also update the porting guide and other API docs for this change. Also fix a bug in the signal dispatching code so each subscriber only get notified once, not N times, for the same signal. Also add a test case for this. https://bugzilla.gnome.org/show_bug.cgi?id=621213 Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
@@ -741,6 +741,7 @@ typedef enum {
|
||||
/**
|
||||
* GBusType:
|
||||
* @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
|
||||
* @G_BUS_TYPE_NONE: Not a message bus.
|
||||
* @G_BUS_TYPE_SYSTEM: The system-wide message bus.
|
||||
* @G_BUS_TYPE_SESSION: The login session message bus.
|
||||
*
|
||||
@@ -750,7 +751,8 @@ typedef enum {
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
G_BUS_TYPE_STARTER = 0,
|
||||
G_BUS_TYPE_STARTER = -1,
|
||||
G_BUS_TYPE_NONE = 0,
|
||||
G_BUS_TYPE_SYSTEM = 1,
|
||||
G_BUS_TYPE_SESSION = 2
|
||||
} GBusType;
|
||||
@@ -795,6 +797,9 @@ typedef enum
|
||||
* @G_DBUS_PROXY_FLAGS_NONE: No flags set.
|
||||
* @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
|
||||
* @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
|
||||
* @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If not set and the proxy if for a well-known name,
|
||||
* then request the bus to launch an owner for the name if no-one owns the name. This flag can
|
||||
* only be used in proxies for well-known names.
|
||||
*
|
||||
* Flags used when constructing an instance of a #GDBusProxy derived class.
|
||||
*
|
||||
@@ -802,9 +807,10 @@ typedef enum
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
G_DBUS_PROXY_FLAGS_NONE = 0, /*< nick=none >*/
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = (1<<0), /*< nick=do-not-load-properties >*/
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1) /*< nick=do-not-connect-signals >*/
|
||||
G_DBUS_PROXY_FLAGS_NONE = 0,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = (1<<0),
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1),
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = (1<<2)
|
||||
} GDBusProxyFlags;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user