hypfvieh / dbus-java

Improved version of java DBus library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/)
https://hypfvieh.github.io/dbus-java/
MIT License
185 stars 73 forks source link

How to receive a DBusStuctType Variant #77

Closed LotekB closed 4 years ago

LotekB commented 4 years ago

Hello, I have a problem with reception of the Variant sent as signal argument. The signature of MyStruct is "(byyyyyyyyyyyyssssssssuiqyiiiis)".

Creation and sending of this Variant works without any problems: Variant v = new Variant( new MyStruct() ); or Variant v = new Variant<>( new MyStruct() );

Reception: The server requestSetMyStruct( Variant msVariant ) method shall receive, and unpack the Variant. The type of the msVariant is DBusStructType so probably the signature of the method shall be: requestSetMyStruct( Variant msVariant )

Anyway I am not able to convert the msVariant to MyStruct.