Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qdbusxml2cpp Annotations and Supported Types
QtWS25 Last Chance

qdbusxml2cpp Annotations and Supported Types

Scheduled Pinned Locked Moved Unsolved General and Desktop
qdbus
2 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Matthew VickM Offline
    Matthew VickM Offline
    Matthew Vick
    wrote on last edited by
    #1

    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.cpp just 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!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved