mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-03 16:03:40 +02:00
GDBusProxy: Remove error in get_cached_property() and add set_cached_property()
This makes it possible to use the cached properties mechanism even if constructing the proxy with the DO_NOT_LOAD_PROPERTIES flag. This is useful for cases where you obtain the and track object properties out-of-band. For example, in udisks, the plan is to have something like this Manager.GetObjects (out ao paths, out aa{sa{sv}} all_properties); Manager.ObjectAdded (o path, a{sa{sv}} all_properties); Manager.ObjectChanged (o path, a{sa{sv}} all_properties); Manager.ObjectRemoved (o path, a{sa{sv}} all_properties); E.g. the first GetObjects() call will return *all* data about *all* exported objects. Further, this way a client will only need to listen these three signals (three AddMatch) on the Manager object and it will never need to do GetAll() etc (e.g. can use DO_NOT_LOAD_PROPERTIES). (Of course this only works if the client is interested in all objects... while this is true for udisks it is generally not true for other D-Bus services). Also use expected_interface to check for programming errors.
This commit is contained in:
@@ -2490,8 +2490,9 @@ g_dbus_proxy_get_object_path
|
||||
g_dbus_proxy_get_interface_name
|
||||
g_dbus_proxy_get_default_timeout
|
||||
g_dbus_proxy_set_default_timeout
|
||||
g_dbus_proxy_get_cached_property_names
|
||||
g_dbus_proxy_get_cached_property
|
||||
g_dbus_proxy_set_cached_property
|
||||
g_dbus_proxy_get_cached_property_names
|
||||
g_dbus_proxy_set_interface_info
|
||||
g_dbus_proxy_get_interface_info
|
||||
g_dbus_proxy_call
|
||||
|
Reference in New Issue
Block a user