GDBusProxy: Remove error in get_cached_property() and add set_cached_property()
authorDavid Zeuthen <davidz@redhat.com>
Thu, 13 May 2010 00:43:40 +0000 (20:43 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Thu, 13 May 2010 00:51:06 +0000 (20:51 -0400)
commitf909cb5b2713c8cd5f587c7a70e468d29bdcd429
tree52249b716138beb7ac906aa7ea5893ae351921ac
parentb690e637d46057f6914a6b6f20b2688cd03f0ac5
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.
docs/reference/gio/gio-sections.txt
gio/gdbusproxy.c
gio/gdbusproxy.h
gio/gio.symbols
gio/tests/gdbus-example-proxy-subclass.c
gio/tests/gdbus-example-watch-proxy.c
gio/tests/gdbus-peer.c
gio/tests/gdbus-proxy.c