Skip to content
  • Allison Karlitskaya's avatar
    GDBusConnection: allow async property handling · f754c4e8
    Allison Karlitskaya authored
    The existing advice in the documentation to "simply" register the
    "org.freedesktop.DBus.Properties" interface if you want to handle
    properties asynchronously is pretty unreasonable.  If you want to handle
    this interface you have to deal with all properties for all interfaces
    on the path, and you have to do all of the checking for yourself.  You
    also have to provide your own introspection data.
    
    Introduce a new convention for dealing with properties asynchronously.
    
    If the user provides NULL for their get_property() or set_property()
    functions in the vtable and has properties registered then the
    properties are sent to the method_call() handler.  We get lucky here
    that this function takes an "interface_name" parameter that we can set
    to "org.freedesktop.DBus.Properties".
    
    We also do the user the favour of setting the GDBusPropertyInfo on the
    GDBusMethodInvocation for their convenience (for much the same reasons
    as they might want the already-available GDBusMethodInfo).
    
    Add a testcase as well as a bunch of documentation about this new
    feature.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698375
    f754c4e8