Closed sshort closed 5 years ago
Could you provide the introspection xml generated by DBus?
I don't use Fedora/firewalld and I've started a re-write of the CreateInterface tool and some more test data would be helpful.
Attached. If it helps I'm using firewalld on Mint for this.
I've identified a problem I introduced. Because the Structs can now be in a package, the import for that package needs to be added to the generated interface class. For some interfaces/paths, the Struct definition has not yet been created, so the 'import xxx' statement cannot be written. I think that means that code generation needs to be a 2 pass process, but I am still trying to think of alternatives.
Fix offered in https://github.com/hypfvieh/dbus-java/pull/36
I have added a new branch with a completely rewritten version of the interface creation tool. If you could take a look, that would be great.
The branch name is 'interface-tool', the class you have to run is org.freedesktop.dbus.utils.generator.InterfaceCodeGenerator
Please note that this tool is not done yet. It still lacks support for multi-value return and may have some serious bugs. I only tested it with a few DBus services and with some of your provided introspection XMLs.
If you find bugs and want to provide a fix for that, you are always welcome.
The new InterfaceCodeGenerator is now part of the latest release. I'll close this bug report, please open a new one if you find bugs in the new implementation.
The old tool is still available, but deprecated.
Running CreateInterface to create code for the object path '/org/fedoraproject/FirewallD1` creates a Java class org.fedoraproject.FirewallD1.java whose name is the same as a java package, so the code does not compile.
Also: the imports for DBusInterface and DBusSignal need to reflect the new package locations for these.