mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
gdbusproxy: Add G_DBUS_PROXY_FLAGS_NO_MATCH_RULE flag
D-Bus has an upper limit on number of Match rules and it's rather easy to hit with a big number of proxies with signal subscriptions. This happens with NetworkManager with hundreds of devices or connection settings. By passing G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE to g_dbus_connection_signal_subscribe(), the user can call AddMatch with a less granular match instead of a match per every proxy. Tests subsequently added by Philip Withnall. Fixes: #1109
This commit is contained in:
committed by
Philip Withnall
parent
caf777984b
commit
a107a328e4
@@ -1021,6 +1021,9 @@ typedef enum
|
||||
* do not ask the bus to launch an owner during proxy initialization, but allow it to be
|
||||
* autostarted by a method call. This flag is only meaningful in proxies for well-known names,
|
||||
* and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified.
|
||||
* @G_DBUS_PROXY_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch D-Bus
|
||||
* call for this signal subscription. This gives you more control
|
||||
* over which match rules you add (but you must add them manually). (Since: 2.72)
|
||||
*
|
||||
* Flags used when constructing an instance of a #GDBusProxy derived class.
|
||||
*
|
||||
@@ -1033,7 +1036,8 @@ typedef enum
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1),
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = (1<<2),
|
||||
G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES = (1<<3),
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION = (1<<4)
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION = (1<<4),
|
||||
G_DBUS_PROXY_FLAGS_NO_MATCH_RULE GLIB_AVAILABLE_ENUMERATOR_IN_2_72 = (1<<5)
|
||||
} GDBusProxyFlags;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user