Yes, releasing MPRIS Tester 1.3 a day after 1.2 is a bit ridiculous, but Fred Emmott pointed out a serious flaw for a D-Bus interface tester program: the type for the MPRIS Version field was wrong. It should have been a struct of two uint16s, but instead I had it as two ints.
For safety, I’ve also specified that the status field is comprised of 4 int32s, rather than simply ints. I hear tell of one (C, admittedly) compiler that implements ints as 24 bits…
12th August 2008 at 2:21 pm |
Isn’t there a D-Bus introspection file for the interface which allows generating the Interfaces/Adaptors, i.e. letting the code generator decide which native type it will use?
12th August 2008 at 2:48 pm |
Yeah… for some reason, I had an incorrect copy. I think it possibly came from Amarok, and I don’t know where that one came from. Certainly Amarok had the same issue, which I’ve also fixed.
The other issue is that Qt’s code-generation tool can’t cope with simple structs, like a struct of ints. So you have to write the marshalling and demarshalling code yourself, which means interpreting the introspection file yourself.
12th August 2008 at 8:42 pm |
An int is usually as long as a single CPU register on your platform. There are indeed CPUs (like some DSPs) that use 24 Bit registers.
13th August 2008 at 6:52 pm |
You can use annotations to allow Qt to generate the correct C++ types.
When they map to usual types (QPoint, QRect, etc) this is all you will need.
13th August 2008 at 8:22 pm |
Yes, but a struct of ints isn’t a standard Qt type…
Which I suppose is why you have to write your own marshalling code.