feat: add timeout parameter to xml2cpp codegen tool (#509)#510
feat: add timeout parameter to xml2cpp codegen tool (#509)#510pavelkaryukov wants to merge 1 commit intoKistler-Group:masterfrom
Conversation
|
The changes allow generating functions that include timeout parameters, enabling runtime timeout configuration |
…](https://github.com/pavelkaryukov/sdbus-cpp/issues/509)) A timeout can be added to the XML file using the annotation <annotation name="org.freedesktop.DBus.Method.Timeout" value="500ms"/>, where 500ms is the default parameter value required for interoperability with existing APIs. These changes will allow flexible timeout configuration using configuration files.
0a2b300 to
5313710
Compare
|
@pavelkaryukov Happy New Year! I finally found time to review the PR, thanks for your patience. However, it took me a while to understand the logic. The proposed solution has several drawbacks:
So I cannot accept the proposed solution. What we can do instead is to decouple from the existing timeout annotation and create a new one (like
I find the first one nicely generic (timeout parameter can be anywhere in the function signature), but the second one seems sufficient for this special use case and quite simple to implement in this PR -- we just need an additional annotation Do you have any additional comments. Will you please do the requested changes? |
A timeout can be added to the XML file using the annotation , where 500ms is the default parameter value required for interoperability with existing APIs.
These changes will allow flexible timeout configuration using configuration files.