D-Bus low-lewel API - sending an array of structures
thiago at kde.org
Sat May 7 04:33:38 PDT 2011
On Saturday, 7 de May de 2011 11:13:41 Bogdan Lotko wrote:
> // Open the a structure within an array
> // Here run-time error !!!!!!!!!!!!!!!!!!!
> dbus_message_iter_open_container( &arr,
> &strct );
No, it's not.
The error is actually here:
> dbus_message_iter_open_container( &iter,
> &arr );
It told you:
"process 6585: Array or variant type requires that type struct be
written, but begin_struct was written"
As you can see, you sent "r". You should pass the actual type of
the structure you're trying to send. In this case, "(ss)".
By the way, you're using the D-Bus low-level API, but you have glib constructs
in your code. Why aren't you using dbus-glib or, even better, gdbus?
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the dbus