Skip to content
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

Use DBusNamingUtil more widely, value element added to the DeprecatedOnDBus and MethodNoReply annotations #168

Merged
merged 2 commits into from
May 10, 2022

Conversation

mk868
Copy link
Contributor

@mk868 mk868 commented May 9, 2022

Hello,

This PR includes refactoring and fix in two annotations.

The DBusNamingUtil helper methods give us a simpler and safer way to retrieve DBus names.
In this PR, I replaced the code fragments with methods from DBusNamingUtil, which reduced the boilerplate code.

The next change affects the two annotations @DeprecatedOnDBus and @MethodNoReply.
So far when we used first of these annotations on an interface, it produced the following introspection data:

<node name="/hal/module1">
 <interface name="com.example.HalModule">
  <annotation name="org.freedesktop.DBus.Deprecated" value="" />
  <!-- ... -->

Referring to the https://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format specification, the value should be true or false.
So I added the appropriate value element with default value true to the annotation, now the introspection data looks like this:

<node name="/hal/module1">
 <interface name="com.example.HalModule">
  <annotation name="org.freedesktop.DBus.Deprecated" value="true" />
  <!-- ... -->

Best regards,
MK

@hypfvieh hypfvieh merged commit 8c496a5 into hypfvieh:master May 10, 2022
@hypfvieh
Copy link
Owner

Nice and clean, as usual - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants