diff --git a/lib/src/dbus_dart_type.dart b/lib/src/dbus_dart_type.dart index 7a88aaa..954cf99 100644 --- a/lib/src/dbus_dart_type.dart +++ b/lib/src/dbus_dart_type.dart @@ -293,7 +293,7 @@ class DBusStructType extends DBusDartType { @override String nativeToDBus(String name) { - return name; + return 'DBusStruct($name)'; } @override diff --git a/test/generated-code/method-multiple-inputs.client.out b/test/generated-code/method-multiple-inputs.client.out index a39ba19..eafb960 100644 --- a/test/generated-code/method-multiple-inputs.client.out +++ b/test/generated-code/method-multiple-inputs.client.out @@ -5,6 +5,6 @@ class ComExampleTest extends DBusRemoteObject { /// Invokes com.example.Test.Hello() Future callHello(int byte_value, bool boolean_value, int int16_value, int uint16_value, int int32_value, int uint32_value, int int64_value, int uint64_value, double double_value, String string_value, DBusObjectPath object_path_value, DBusSignature signature_value, DBusValue variant_value, ResourceHandle unix_fd_value, List struct_value, List array_value_y, List array_value_b, List array_value_n, List array_value_q, List array_value_u, List array_value_n, List array_value_x, List array_value_t, List array_value_d, List array_value_s, List array_value_o, List array_value_g, List array_value_v, List array_value_h, List> array_value_struct, List> array_value_array, Map dict_value_sv, Map dict_value_us, Map> dict_value_dict, {bool noAutoStart = false, bool allowInteractiveAuthorization = false}) async { - await callMethod('com.example.Test', 'Hello', [DBusByte(byte_value), DBusBoolean(boolean_value), DBusInt16(int16_value), DBusUint16(uint16_value), DBusInt32(int32_value), DBusUint32(uint32_value), DBusInt64(int64_value), DBusUint64(uint64_value), DBusDouble(double_value), DBusString(string_value), object_path_value, signature_value, DBusVariant(variant_value), DBusUnixFd(unix_fd_value), struct_value, DBusArray.byte(array_value_y), DBusArray.boolean(array_value_b), DBusArray.int16(array_value_n), DBusArray.uint16(array_value_q), DBusArray.int32(array_value_u), DBusArray.uint32(array_value_n), DBusArray.int64(array_value_x), DBusArray.uint64(array_value_t), DBusArray.double(array_value_d), DBusArray.string(array_value_s), DBusArray.objectPath(array_value_o), DBusArray.signature(array_value_g), DBusArray.variant(array_value_v), DBusArray.unixFd(array_value_h), DBusArray(DBusSignature('(si)'), array_value_struct.map((child) => child)), DBusArray(DBusSignature('as'), array_value_array.map((child) => DBusArray.string(child))), DBusDict.stringVariant(dict_value_sv), DBusDict(DBusSignature('u'), DBusSignature('s'), dict_value_us.map((key, value) => MapEntry(DBusUint32(key), DBusString(value)))), DBusDict(DBusSignature('s'), DBusSignature('a{sv}'), dict_value_dict.map((key, value) => MapEntry(DBusString(key), DBusDict.stringVariant(value))))], replySignature: DBusSignature(''), noAutoStart: noAutoStart, allowInteractiveAuthorization: allowInteractiveAuthorization); + await callMethod('com.example.Test', 'Hello', [DBusByte(byte_value), DBusBoolean(boolean_value), DBusInt16(int16_value), DBusUint16(uint16_value), DBusInt32(int32_value), DBusUint32(uint32_value), DBusInt64(int64_value), DBusUint64(uint64_value), DBusDouble(double_value), DBusString(string_value), object_path_value, signature_value, DBusVariant(variant_value), DBusUnixFd(unix_fd_value), DBusStruct(struct_value), DBusArray.byte(array_value_y), DBusArray.boolean(array_value_b), DBusArray.int16(array_value_n), DBusArray.uint16(array_value_q), DBusArray.int32(array_value_u), DBusArray.uint32(array_value_n), DBusArray.int64(array_value_x), DBusArray.uint64(array_value_t), DBusArray.double(array_value_d), DBusArray.string(array_value_s), DBusArray.objectPath(array_value_o), DBusArray.signature(array_value_g), DBusArray.variant(array_value_v), DBusArray.unixFd(array_value_h), DBusArray(DBusSignature('(si)'), array_value_struct.map((child) => DBusStruct(child))), DBusArray(DBusSignature('as'), array_value_array.map((child) => DBusArray.string(child))), DBusDict.stringVariant(dict_value_sv), DBusDict(DBusSignature('u'), DBusSignature('s'), dict_value_us.map((key, value) => MapEntry(DBusUint32(key), DBusString(value)))), DBusDict(DBusSignature('s'), DBusSignature('a{sv}'), dict_value_dict.map((key, value) => MapEntry(DBusString(key), DBusDict.stringVariant(value))))], replySignature: DBusSignature(''), noAutoStart: noAutoStart, allowInteractiveAuthorization: allowInteractiveAuthorization); } } diff --git a/test/generated-code/properties.client.out b/test/generated-code/properties.client.out index 888d598..0ce87c8 100644 --- a/test/generated-code/properties.client.out +++ b/test/generated-code/properties.client.out @@ -165,7 +165,7 @@ class ComExampleTest extends DBusRemoteObject { /// Sets com.example.Test.StructProperty Future setStructProperty (List value) async { - await setProperty('com.example.Test', 'StructProperty', value); + await setProperty('com.example.Test', 'StructProperty', DBusStruct(value)); } /// Gets com.example.Test.ArrayProperty diff --git a/test/generated-code/signal-multiple-args.server.out b/test/generated-code/signal-multiple-args.server.out index b08b85e..2fe586d 100644 --- a/test/generated-code/signal-multiple-args.server.out +++ b/test/generated-code/signal-multiple-args.server.out @@ -6,7 +6,7 @@ class ComExampleTest extends DBusObject { /// Emits signal com.example.Test.Event Future emitEvent(int byte_value, bool boolean_value, int int16_value, int uint16_value, int int32_value, int uint32_value, int int64_value, int uint64_value, double double_value, String string_value, DBusObjectPath object_path_value, DBusSignature signature_value, DBusValue variant_value, ResourceHandle unix_fd_value, List struct_value, List array_value_y, List array_value_b, List array_value_n, List array_value_q, List array_value_u, List array_value_n_, List array_value_x, List array_value_t, List array_value_d, List array_value_s, List array_value_o, List array_value_g, List array_value_v, List array_value_h, List> array_value_struct, List> array_value_array, Map dict_value_sv, Map dict_value_us, Map> dict_value_dict) async { - await emitSignal('com.example.Test', 'Event', [DBusByte(byte_value), DBusBoolean(boolean_value), DBusInt16(int16_value), DBusUint16(uint16_value), DBusInt32(int32_value), DBusUint32(uint32_value), DBusInt64(int64_value), DBusUint64(uint64_value), DBusDouble(double_value), DBusString(string_value), object_path_value, signature_value, DBusVariant(variant_value), DBusUnixFd(unix_fd_value), struct_value, DBusArray.byte(array_value_y), DBusArray.boolean(array_value_b), DBusArray.int16(array_value_n), DBusArray.uint16(array_value_q), DBusArray.int32(array_value_u), DBusArray.uint32(array_value_n_), DBusArray.int64(array_value_x), DBusArray.uint64(array_value_t), DBusArray.double(array_value_d), DBusArray.string(array_value_s), DBusArray.objectPath(array_value_o), DBusArray.signature(array_value_g), DBusArray.variant(array_value_v), DBusArray.unixFd(array_value_h), DBusArray(DBusSignature('(si)'), array_value_struct.map((child) => child)), DBusArray(DBusSignature('as'), array_value_array.map((child) => DBusArray.string(child))), DBusDict.stringVariant(dict_value_sv), DBusDict(DBusSignature('u'), DBusSignature('s'), dict_value_us.map((key, value) => MapEntry(DBusUint32(key), DBusString(value)))), DBusDict(DBusSignature('s'), DBusSignature('a{sv}'), dict_value_dict.map((key, value) => MapEntry(DBusString(key), DBusDict.stringVariant(value))))]); + await emitSignal('com.example.Test', 'Event', [DBusByte(byte_value), DBusBoolean(boolean_value), DBusInt16(int16_value), DBusUint16(uint16_value), DBusInt32(int32_value), DBusUint32(uint32_value), DBusInt64(int64_value), DBusUint64(uint64_value), DBusDouble(double_value), DBusString(string_value), object_path_value, signature_value, DBusVariant(variant_value), DBusUnixFd(unix_fd_value), DBusStruct(struct_value), DBusArray.byte(array_value_y), DBusArray.boolean(array_value_b), DBusArray.int16(array_value_n), DBusArray.uint16(array_value_q), DBusArray.int32(array_value_u), DBusArray.uint32(array_value_n_), DBusArray.int64(array_value_x), DBusArray.uint64(array_value_t), DBusArray.double(array_value_d), DBusArray.string(array_value_s), DBusArray.objectPath(array_value_o), DBusArray.signature(array_value_g), DBusArray.variant(array_value_v), DBusArray.unixFd(array_value_h), DBusArray(DBusSignature('(si)'), array_value_struct.map((child) => DBusStruct(child))), DBusArray(DBusSignature('as'), array_value_array.map((child) => DBusArray.string(child))), DBusDict.stringVariant(dict_value_sv), DBusDict(DBusSignature('u'), DBusSignature('s'), dict_value_us.map((key, value) => MapEntry(DBusUint32(key), DBusString(value)))), DBusDict(DBusSignature('s'), DBusSignature('a{sv}'), dict_value_dict.map((key, value) => MapEntry(DBusString(key), DBusDict.stringVariant(value))))]); } @override