Library Additions and Issues for Discussion #169
Replies: 3 comments 4 replies
-
@dleeds-cpi hi, thanks a lot for your suggestions, and sorry for late reply, I'm now a busy man :) I've quickly gone through that and it's good to see such a nice list of ideas, improvements, defects. And, of course, we are open to whatever improves the library :) So, if you'd love to contribute, don't hesitate and go ahead, and either start a discussion with us on the specific topic here in Discussions section (might be good choice to discuss beforehand if you're unsure about proper solution), or directly submit a PR. Do you already have an idea which items in the list you'd like to cover? |
Beta Was this translation helpful? Give feedback.
-
We've worked through most of the above points! The only significant one remaining is the issue with the @sangelovic what do you think about creating a new tag? 0.9.0? Also, what is the criteria for going to 1.0? Perhaps update the |
Beta Was this translation helpful? Give feedback.
-
Hey @dleeds-cpi, how is life going? I've gone through the list of wants and issues of yours, and I've updated it with relevant PRs. As far as I understand all the points, I think everything is done (i.e. in |
Beta Was this translation helpful? Give feedback.
-
@sangelovic after using
sdbus-c++
for a few months, I jotted down a list wants and issues I have encountered. I would love your and the community's feedback on these. Are you aware of them? Also, I would be happy to contribute to add some of these. Are you open to pull requests?API Improvements
Either make
createConnection()
callsd_bus_open()
instead ofsd_bus_open_system()
, or add acreateDefaultBusConnection()
to do it, in order to maintain backward compatibility. (Add createDefaultBusConnection() #182) DONEAdd
IProxy::getConnection()
(PR: Add IProxy::getConnection() #179) DONEAdd
IConnection::registerSignalHandler(const std::string &matchRule)
. Manage match rule lifetime using a handle with aweak_ptr
. (PR: feat: add support for match rules #264) DONE (@dleeds-cpi please double-check)Add ability to
setDestination()
forSignal
(PR: Add API to set signal destination #168) DONEFix
ObjectManager_proxy
. Currently, can only receive InterfacesAdded/Removed signals for itself, which defeats the purpose, as we often cannot create a proxy for an object that hasn't been added yet (its path is unknown). Usually, clients using the ObjectManager listen for all InterfacesAdded/Removed signals emitted for objects under a root path. Preferably, should use a'path_namespace'
match rule, not a'path'
match, so the proxy can monitor child object creation and deletion and add/remove proxies for them as needed. (PR: Issue 139 object manager API #207) DONEAsync property get/set capability (PR: feat: add support for async property get/set on client-side #354) DONE
Add default constructor for
PendingAsyncCall
. It is helpful to allow creation of an empty handle. (Enable default construction of PendingAsyncCall #180) DONEEnable r-value construction and assignment for generated adaptor and proxy classes (PR: refactor: support move semantics in generated adaptor and proxy classes #286) DONE
Performance
Message::createPlainMessage()
is used for everyVariant
and opens and closes a system bus connection. It is a bit of a hack, but you should be able to dosd_bus_new()
+sd_bus_start()
, instead of a full bus open.sd_bus_start()
will fail due to having not set a bus address, but it will leave the bus in anOPENING
state, which is enough to callsd_bus_message_new()
forcreatePlainMessage()
(PR: refactor: use pseudo D-Bus connection for plain messages #280) DONEBugs
When using the Convenience API and an event loop, receiving a message with an unexpected payload results in an exception propagating directly to the event loop callback (which generally do not catch exceptions), and terminating the program. Malformed messages received asynchronously from external sources should be dropped without raising an exception. (Avoid propagating msg unpack exceptions to event loop #193) DONE
Seeing EINVAL exception on
Variant
construction (fromcreatePlainMessage()
) (not visible on all environments (e.g. x86, g++ 9.x), seeing it on buildroot, systemd 245, aarch64-none-linux-gnu-g++ 9.2.1) FIXED in systemd: Compatibility with systemd 245.6 #106SEGV crash on
Object
destruction during stack unwinding (seems to be a double free/ordering issue). Worked around this by callingIObject::unregister()
before destruction. (Issue 133 race in proxy destruct #177) DONEBeta Was this translation helpful? Give feedback.
All reactions