Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
qdbusxml2cpp Annotations and Supported Types
Matthew Vick last edited by
I'm trying to use qdbusxml2cpp to convert what was once Franca IDL (specificially, one of the Media Player interface examples) into something usable by Qt, but qdbusxml2cpp seems to get hung up on some of the D-Bus primitive types. For example, "au" and "(yyy)" properties are not understood. Below is a (snipped for brevity) version of my XML.
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="introspect.xsl"?> <!-- This D-Bus Introspection model has been created from a Franca IDL file. --> <!-- Input file: 'MediaPlayer.fidl' --> <node xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="introspect.xsd" name="org.example"> <interface name="org.example.MediaPlayer"> <version>4.2</version> <property access="readwrite" name="currentPlaylist" type="au"/> <property access="readwrite" name="currentTrack" type="u"/> <property access="readwrite" name="remainingTrack" type="(yyy)"/> <property access="readwrite" name="remainingAll" type="(yyy)"/> <property access="readwrite" name="mode" type="u"/> </interface> </node>
Trying to convert this with
qdbusxml2cpp MediaPlayer.xml -a MediaPlayer_p.h:MediaPlayer.cppjust spits out
Got unknown type `au'and deleting the line yields
Got unknown type `(yyy)'.
Do I need to write annotations for this myself? If so, are there any good examples that show how to do this?
Is there a list of supported types in qdbusxml2cpp? While I understand the need for annotations for custom types, it's a little disappointing to think that I'd have to teach qdbusxml2cpp basic D-Bus primitive types.
Any input is welcome. Thanks in advance!
Hi and welcome to devnet,
Since it might need some knowledge of the internals of QtDBus, I'd recommend posting this question on the interest mailing list You'll find there Qt's developers/maintainers (this forum is more user oriented)