Skip to content
  • David Zeuthen's avatar
    GDBusProxy: Remove error in get_cached_property() and add set_cached_property() · f909cb5b
    David Zeuthen authored
    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.
    f909cb5b