-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better API support for read only properties #96
Comments
The simple idea is:
|
In case we change the API because of this, see also #115 where we may need to change the |
TODO: e_c_s on dbus_reader (and some its callers transitively) is unused but that may change if we consider #96 "Better API support for read only properties"
TODO: e_c_s on dbus_reader (and some its callers transitively) is unused but that may change if we consider #96 "Better API support for read only properties"
TODO: e_c_s on dbus_reader (and some its callers transitively) is unused but that may change if we consider #96 "Better API support for read only properties" Again remove the type argument from dbus_watcher and the dbus_property_changed4 method, the optimization is not worth the API complication.
It will use dbus_watcher and result in dbus_properties_changed TODO: test it
Before: dbus_attr_reader :foo, type
attr_writer :foo
dbus_watcher :foo After, with the simple implementation change in #117: attr_accessor :foo
dbus_reader :foo, type # must come second @jreidinger what do you think? |
It will use dbus_watcher and result in dbus_properties_changed
For me new API looks reasonable. I expect similar it will looks for rw attr in dbus? so |
Yes, and because it's a simpler case, it has a name:
|
It will use dbus_watcher and result in dbus_properties_changed
Solved in #117 |
Hi,
in newly added feature to support properties #86 there is missing better support for quite common read only properties.
Basically there are two main usage of read only properties that needs to send signal.
dbus_attr_reader
,attr_writer
anddbus_watcher
for that single property.dbus_attr_reader
plus callPropertiesChanged
which is good enough.So if it would be possible to support better use case 1. something like
dbus_ro_attr_accessor
that combines that three calls.The text was updated successfully, but these errors were encountered: