| // WARNING: This file is machine generated by fidlgen_dart. |
| // @dart = 2.12 |
| |
| library fidl_fidl_test_experimentalmaybefromtypealias_async; |
| |
| import 'dart:async' as $async; |
| import 'dart:core' hide Set; |
| import 'dart:developer'; |
| import 'dart:typed_data'; |
| |
| import 'package:fidl/fidl.dart' as $fidl; |
| import 'package:meta/meta.dart'; |
| import 'package:zircon/zircon.dart' as $zircon; |
| |
| // ignore_for_file: always_specify_types |
| // ignore_for_file: avoid_positional_boolean_parameters |
| // ignore_for_file: avoid_returning_null |
| // ignore_for_file: cascade_invocations |
| // ignore_for_file: constant_identifier_names |
| // ignore_for_file: one_member_abstracts |
| // ignore_for_file: prefer_constructors_over_static_methods |
| // ignore_for_file: prefer_single_quotes |
| // ignore_for_file: public_member_api_docs |
| // ignore_for_file: unused_import |
| // ignore_for_file: unused_local_variable |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: library_prefixes |
| // ignore_for_file: prefer_typing_uninitialized_variables |
| // ignore_for_file: avoid_js_rounded_ints |
| // ignore_for_file: unnecessary_parenthesis |
| // ignore_for_file: always_put_required_named_parameters_first |
| // ignore_for_file: prefer_generic_function_type_aliases |
| // ignore_for_file: prefer_equal_for_default_values |
| // ignore_for_file: avoid_catches_without_on_clauses |
| // ignore_for_file: unused_shown_name |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: comment_references |
| // ignore_for_file: avoid_unused_constructor_parameters |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| |
| class Testing extends $fidl.Struct { |
| const Testing({ |
| required this.u1, |
| required this.u2, |
| required this.u3, |
| required this.u4, |
| required this.u5, |
| required this.u6, |
| required this.u7, |
| this.v1, |
| required this.v2, |
| required this.v3, |
| required this.a1, |
| required this.a2, |
| required this.a3, |
| required this.p1, |
| required this.p2, |
| required this.p3, |
| this.r1, |
| required this.r2, |
| required this.r3, |
| required this.b1, |
| required this.b2, |
| required this.b3, |
| required this.s1, |
| required this.s2, |
| required this.s3, |
| required this.vv1, |
| required this.vv2, |
| required this.vv3, |
| required this.aa1, |
| required this.aa2, |
| required this.aa3, |
| required this.rr1, |
| required this.rr2, |
| required this.rr3, |
| }); |
| Testing.clone( |
| Testing $orig, { |
| int? u1, |
| Uint64List? u2, |
| Uint64List? u3, |
| List<Uint64List>? u4, |
| List<Uint64List>? u5, |
| List<Uint64List>? u6, |
| List<Uint64List>? u7, |
| Uint64List? v1, |
| List<Uint64List?>? v2, |
| List<Uint64List?>? v3, |
| Uint64List? a1, |
| List<Uint64List>? a2, |
| List<Uint64List>? a3, |
| $fidl.InterfaceRequest<MyProtocol>? p1, |
| List<$fidl.InterfaceRequest<MyProtocol>>? p2, |
| List<$fidl.InterfaceRequest<MyProtocol>>? p3, |
| $fidl.InterfaceRequest<MyProtocol>? r1, |
| List<$fidl.InterfaceRequest<MyProtocol>?>? r2, |
| List<$fidl.InterfaceRequest<MyProtocol>?>? r3, |
| Uint8List? b1, |
| List<Uint8List>? b2, |
| List<Uint8List>? b3, |
| String? s1, |
| List<String>? s2, |
| List<String>? s3, |
| Uint64List? vv1, |
| List<Uint64List>? vv2, |
| List<Uint64List>? vv3, |
| Uint64List? aa1, |
| List<Uint64List>? aa2, |
| List<Uint64List>? aa3, |
| $fidl.InterfaceRequest<MyProtocol>? rr1, |
| List<$fidl.InterfaceRequest<MyProtocol>>? rr2, |
| List<$fidl.InterfaceRequest<MyProtocol>>? rr3, |
| }) : this( |
| u1: u1 ?? $orig.u1, |
| u2: u2 ?? $orig.u2, |
| u3: u3 ?? $orig.u3, |
| u4: u4 ?? $orig.u4, |
| u5: u5 ?? $orig.u5, |
| u6: u6 ?? $orig.u6, |
| u7: u7 ?? $orig.u7, |
| v1: v1 ?? $orig.v1, |
| v2: v2 ?? $orig.v2, |
| v3: v3 ?? $orig.v3, |
| a1: a1 ?? $orig.a1, |
| a2: a2 ?? $orig.a2, |
| a3: a3 ?? $orig.a3, |
| p1: p1 ?? $orig.p1, |
| p2: p2 ?? $orig.p2, |
| p3: p3 ?? $orig.p3, |
| r1: r1 ?? $orig.r1, |
| r2: r2 ?? $orig.r2, |
| r3: r3 ?? $orig.r3, |
| b1: b1 ?? $orig.b1, |
| b2: b2 ?? $orig.b2, |
| b3: b3 ?? $orig.b3, |
| s1: s1 ?? $orig.s1, |
| s2: s2 ?? $orig.s2, |
| s3: s3 ?? $orig.s3, |
| vv1: vv1 ?? $orig.vv1, |
| vv2: vv2 ?? $orig.vv2, |
| vv3: vv3 ?? $orig.vv3, |
| aa1: aa1 ?? $orig.aa1, |
| aa2: aa2 ?? $orig.aa2, |
| aa3: aa3 ?? $orig.aa3, |
| rr1: rr1 ?? $orig.rr1, |
| rr2: rr2 ?? $orig.rr2, |
| rr3: rr3 ?? $orig.rr3, |
| ); |
| |
| Testing.cloneWithout( |
| Testing $orig, { |
| bool v1 = false, |
| bool r1 = false, |
| }) : this( |
| u1: $orig.u1, |
| u2: $orig.u2, |
| u3: $orig.u3, |
| u4: $orig.u4, |
| u5: $orig.u5, |
| u6: $orig.u6, |
| u7: $orig.u7, |
| v1: v1 ? null : $orig.v1, |
| v2: $orig.v2, |
| v3: $orig.v3, |
| a1: $orig.a1, |
| a2: $orig.a2, |
| a3: $orig.a3, |
| p1: $orig.p1, |
| p2: $orig.p2, |
| p3: $orig.p3, |
| r1: r1 ? null : $orig.r1, |
| r2: $orig.r2, |
| r3: $orig.r3, |
| b1: $orig.b1, |
| b2: $orig.b2, |
| b3: $orig.b3, |
| s1: $orig.s1, |
| s2: $orig.s2, |
| s3: $orig.s3, |
| vv1: $orig.vv1, |
| vv2: $orig.vv2, |
| vv3: $orig.vv3, |
| aa1: $orig.aa1, |
| aa2: $orig.aa2, |
| aa3: $orig.aa3, |
| rr1: $orig.rr1, |
| rr2: $orig.rr2, |
| rr3: $orig.rr3, |
| ); |
| |
| final int u1; |
| final Uint64List u2; |
| final Uint64List u3; |
| final List<Uint64List> u4; |
| final List<Uint64List> u5; |
| final List<Uint64List> u6; |
| final List<Uint64List> u7; |
| final Uint64List? v1; |
| final List<Uint64List?> v2; |
| final List<Uint64List?> v3; |
| final Uint64List a1; |
| final List<Uint64List> a2; |
| final List<Uint64List> a3; |
| final $fidl.InterfaceRequest<MyProtocol> p1; |
| final List<$fidl.InterfaceRequest<MyProtocol>> p2; |
| final List<$fidl.InterfaceRequest<MyProtocol>> p3; |
| final $fidl.InterfaceRequest<MyProtocol>? r1; |
| final List<$fidl.InterfaceRequest<MyProtocol>?> r2; |
| final List<$fidl.InterfaceRequest<MyProtocol>?> r3; |
| final Uint8List b1; |
| final List<Uint8List> b2; |
| final List<Uint8List> b3; |
| final String s1; |
| final List<String> s2; |
| final List<String> s3; |
| final Uint64List vv1; |
| final List<Uint64List> vv2; |
| final List<Uint64List> vv3; |
| final Uint64List aa1; |
| final List<Uint64List> aa2; |
| final List<Uint64List> aa3; |
| final $fidl.InterfaceRequest<MyProtocol> rr1; |
| final List<$fidl.InterfaceRequest<MyProtocol>> rr2; |
| final List<$fidl.InterfaceRequest<MyProtocol>> rr3; |
| |
| @override |
| List<Object?> get $fields { |
| return <Object?>[ |
| u1, |
| u2, |
| u3, |
| u4, |
| u5, |
| u6, |
| u7, |
| v1, |
| v2, |
| v3, |
| a1, |
| a2, |
| a3, |
| p1, |
| p2, |
| p3, |
| r1, |
| r2, |
| r3, |
| b1, |
| b2, |
| b3, |
| s1, |
| s2, |
| s3, |
| vv1, |
| vv2, |
| vv3, |
| aa1, |
| aa2, |
| aa3, |
| rr1, |
| rr2, |
| rr3, |
| ]; |
| } |
| |
| static const $fieldType0 = $fidl.Uint64Type(); |
| static const $fieldType1 = $fidl.VectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: 1); |
| static const $fieldType2 = $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 1); |
| static const $fieldType3 = $fidl.VectorType<Uint64List, List<Uint64List>>( |
| element: $fidl.VectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: 1), |
| maybeElementCount: null); |
| static const $fieldType4 = $fidl.VectorType<Uint64List, List<Uint64List>>( |
| element: $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 1), |
| maybeElementCount: null); |
| static const $fieldType5 = $fidl.ArrayType<Uint64List, List<Uint64List>>( |
| element: $fidl.VectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: 1), |
| elementCount: 4); |
| static const $fieldType6 = $fidl.ArrayType<Uint64List, List<Uint64List>>( |
| element: $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 1), |
| elementCount: 4); |
| static const $fieldType7 = $fidl.NullableVectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: null); |
| static const $fieldType8 = $fidl.VectorType<Uint64List?, List<Uint64List?>>( |
| element: $fidl.NullableVectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: null), |
| maybeElementCount: null); |
| static const $fieldType9 = $fidl.ArrayType<Uint64List?, List<Uint64List?>>( |
| element: $fidl.NullableVectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: null), |
| elementCount: 4); |
| static const $fieldType10 = $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 1); |
| static const $fieldType11 = $fidl.VectorType<Uint64List, List<Uint64List>>( |
| element: $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 1), |
| maybeElementCount: null); |
| static const $fieldType12 = $fidl.ArrayType<Uint64List, List<Uint64List>>( |
| element: $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 1), |
| elementCount: 4); |
| static const $fieldType13 = $fidl.InterfaceRequestType<MyProtocol>(); |
| static const $fieldType14 = $fidl.VectorType< |
| $fidl.InterfaceRequest<MyProtocol>, |
| List<$fidl.InterfaceRequest<MyProtocol>>>( |
| element: $fidl.InterfaceRequestType<MyProtocol>(), |
| maybeElementCount: null); |
| static const $fieldType15 = $fidl.ArrayType< |
| $fidl.InterfaceRequest<MyProtocol>, |
| List<$fidl.InterfaceRequest<MyProtocol>>>( |
| element: $fidl.InterfaceRequestType<MyProtocol>(), elementCount: 4); |
| static const $fieldType16 = $fidl.NullableInterfaceRequestType<MyProtocol>(); |
| static const $fieldType17 = $fidl.VectorType< |
| $fidl.InterfaceRequest<MyProtocol>?, |
| List<$fidl.InterfaceRequest<MyProtocol>?>>( |
| element: $fidl.NullableInterfaceRequestType<MyProtocol>(), |
| maybeElementCount: null); |
| static const $fieldType18 = $fidl.ArrayType< |
| $fidl.InterfaceRequest<MyProtocol>?, |
| List<$fidl.InterfaceRequest<MyProtocol>?>>( |
| element: $fidl.NullableInterfaceRequestType<MyProtocol>(), |
| elementCount: 4); |
| static const $fieldType19 = $fidl.VectorType<int, Uint8List>( |
| element: $fidl.Uint8Type(), maybeElementCount: null); |
| static const $fieldType20 = $fidl.VectorType<Uint8List, List<Uint8List>>( |
| element: $fidl.VectorType<int, Uint8List>( |
| element: $fidl.Uint8Type(), maybeElementCount: null), |
| maybeElementCount: null); |
| static const $fieldType21 = $fidl.ArrayType<Uint8List, List<Uint8List>>( |
| element: $fidl.VectorType<int, Uint8List>( |
| element: $fidl.Uint8Type(), maybeElementCount: null), |
| elementCount: 4); |
| static const $fieldType22 = $fidl.StringType(maybeElementCount: null); |
| static const $fieldType23 = $fidl.VectorType<String, List<String>>( |
| element: $fidl.StringType(maybeElementCount: null), |
| maybeElementCount: null); |
| static const $fieldType24 = $fidl.ArrayType<String, List<String>>( |
| element: $fidl.StringType(maybeElementCount: null), elementCount: 4); |
| static const $fieldType25 = $fidl.VectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: 2); |
| static const $fieldType26 = $fidl.VectorType<Uint64List, List<Uint64List>>( |
| element: $fidl.VectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: 2), |
| maybeElementCount: 3); |
| static const $fieldType27 = $fidl.ArrayType<Uint64List, List<Uint64List>>( |
| element: $fidl.VectorType<int, Uint64List>( |
| element: $fidl.Uint64Type(), maybeElementCount: 2), |
| elementCount: 3); |
| static const $fieldType28 = $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 2); |
| static const $fieldType29 = $fidl.VectorType<Uint64List, List<Uint64List>>( |
| element: $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 2), |
| maybeElementCount: 3); |
| static const $fieldType30 = $fidl.ArrayType<Uint64List, List<Uint64List>>( |
| element: $fidl.ArrayType<int, Uint64List>( |
| element: $fidl.Uint64Type(), elementCount: 2), |
| elementCount: 3); |
| static const $fieldType31 = $fidl.InterfaceRequestType<MyProtocol>(); |
| static const $fieldType32 = $fidl.VectorType< |
| $fidl.InterfaceRequest<MyProtocol>, |
| List<$fidl.InterfaceRequest<MyProtocol>>>( |
| element: $fidl.InterfaceRequestType<MyProtocol>(), maybeElementCount: 3); |
| static const $fieldType33 = $fidl.ArrayType< |
| $fidl.InterfaceRequest<MyProtocol>, |
| List<$fidl.InterfaceRequest<MyProtocol>>>( |
| element: $fidl.InterfaceRequestType<MyProtocol>(), elementCount: 3); |
| |
| @override |
| void $encode($fidl.Encoder $encoder, int $offset, int $depth) { |
| $fieldType0.encode($encoder, u1, $offset + 0, $depth); |
| $fieldType1.encode($encoder, u2, $offset + 8, $depth); |
| $fieldType2.encode($encoder, u3, $offset + 24, $depth); |
| $fieldType3.encode($encoder, u4, $offset + 32, $depth); |
| $fieldType4.encode($encoder, u5, $offset + 48, $depth); |
| $fieldType5.encode($encoder, u6, $offset + 64, $depth); |
| $fieldType6.encode($encoder, u7, $offset + 128, $depth); |
| $fieldType7.encode($encoder, v1, $offset + 160, $depth); |
| $fieldType8.encode($encoder, v2, $offset + 176, $depth); |
| $fieldType9.encode($encoder, v3, $offset + 192, $depth); |
| $fieldType10.encode($encoder, a1, $offset + 256, $depth); |
| $fieldType11.encode($encoder, a2, $offset + 264, $depth); |
| $fieldType12.encode($encoder, a3, $offset + 280, $depth); |
| $fieldType13.encode($encoder, p1, $offset + 312, $depth); |
| $fieldType14.encode($encoder, p2, $offset + 320, $depth); |
| $fieldType15.encode($encoder, p3, $offset + 336, $depth); |
| $fieldType16.encode($encoder, r1, $offset + 352, $depth); |
| $fieldType17.encode($encoder, r2, $offset + 360, $depth); |
| $fieldType18.encode($encoder, r3, $offset + 376, $depth); |
| $fieldType19.encode($encoder, b1, $offset + 392, $depth); |
| $fieldType20.encode($encoder, b2, $offset + 408, $depth); |
| $fieldType21.encode($encoder, b3, $offset + 424, $depth); |
| $fieldType22.encode($encoder, s1, $offset + 488, $depth); |
| $fieldType23.encode($encoder, s2, $offset + 504, $depth); |
| $fieldType24.encode($encoder, s3, $offset + 520, $depth); |
| $fieldType25.encode($encoder, vv1, $offset + 584, $depth); |
| $fieldType26.encode($encoder, vv2, $offset + 600, $depth); |
| $fieldType27.encode($encoder, vv3, $offset + 616, $depth); |
| $fieldType28.encode($encoder, aa1, $offset + 664, $depth); |
| $fieldType29.encode($encoder, aa2, $offset + 680, $depth); |
| $fieldType30.encode($encoder, aa3, $offset + 696, $depth); |
| $fieldType31.encode($encoder, rr1, $offset + 744, $depth); |
| $fieldType32.encode($encoder, rr2, $offset + 752, $depth); |
| $fieldType33.encode($encoder, rr3, $offset + 768, $depth); |
| } |
| |
| @override |
| String toString() { |
| return r'Testing' r'(u1: ' + |
| u1.toString() + |
| r', u2: ' + |
| u2.toString() + |
| r', u3: ' + |
| u3.toString() + |
| r', u4: ' + |
| u4.toString() + |
| r', u5: ' + |
| u5.toString() + |
| r', u6: ' + |
| u6.toString() + |
| r', u7: ' + |
| u7.toString() + |
| r', v1: ' + |
| v1.toString() + |
| r', v2: ' + |
| v2.toString() + |
| r', v3: ' + |
| v3.toString() + |
| r', a1: ' + |
| a1.toString() + |
| r', a2: ' + |
| a2.toString() + |
| r', a3: ' + |
| a3.toString() + |
| r', p1: ' + |
| p1.toString() + |
| r', p2: ' + |
| p2.toString() + |
| r', p3: ' + |
| p3.toString() + |
| r', r1: ' + |
| r1.toString() + |
| r', r2: ' + |
| r2.toString() + |
| r', r3: ' + |
| r3.toString() + |
| r', b1: ' + |
| b1.toString() + |
| r', b2: ' + |
| b2.toString() + |
| r', b3: ' + |
| b3.toString() + |
| r', s1: ' + |
| s1.toString() + |
| r', s2: ' + |
| s2.toString() + |
| r', s3: ' + |
| s3.toString() + |
| r', vv1: ' + |
| vv1.toString() + |
| r', vv2: ' + |
| vv2.toString() + |
| r', vv3: ' + |
| vv3.toString() + |
| r', aa1: ' + |
| aa1.toString() + |
| r', aa2: ' + |
| aa2.toString() + |
| r', aa3: ' + |
| aa3.toString() + |
| r', rr1: ' + |
| rr1.toString() + |
| r', rr2: ' + |
| rr2.toString() + |
| r', rr3: ' + |
| rr3.toString() + |
| r')'; |
| } |
| |
| static Testing _structDecode( |
| $fidl.Decoder $decoder, int $offset, int $depth) { |
| return Testing( |
| u1: $fieldType0.decode($decoder, $offset + 0, $depth), |
| u2: $fieldType1.decode($decoder, $offset + 8, $depth), |
| u3: $fieldType2.decode($decoder, $offset + 24, $depth), |
| u4: $fieldType3.decode($decoder, $offset + 32, $depth), |
| u5: $fieldType4.decode($decoder, $offset + 48, $depth), |
| u6: $fieldType5.decode($decoder, $offset + 64, $depth), |
| u7: $fieldType6.decode($decoder, $offset + 128, $depth), |
| v1: $fieldType7.decode($decoder, $offset + 160, $depth), |
| v2: $fieldType8.decode($decoder, $offset + 176, $depth), |
| v3: $fieldType9.decode($decoder, $offset + 192, $depth), |
| a1: $fieldType10.decode($decoder, $offset + 256, $depth), |
| a2: $fieldType11.decode($decoder, $offset + 264, $depth), |
| a3: $fieldType12.decode($decoder, $offset + 280, $depth), |
| p1: $fieldType13.decode($decoder, $offset + 312, $depth), |
| p2: $fieldType14.decode($decoder, $offset + 320, $depth), |
| p3: $fieldType15.decode($decoder, $offset + 336, $depth), |
| r1: $fieldType16.decode($decoder, $offset + 352, $depth), |
| r2: $fieldType17.decode($decoder, $offset + 360, $depth), |
| r3: $fieldType18.decode($decoder, $offset + 376, $depth), |
| b1: $fieldType19.decode($decoder, $offset + 392, $depth), |
| b2: $fieldType20.decode($decoder, $offset + 408, $depth), |
| b3: $fieldType21.decode($decoder, $offset + 424, $depth), |
| s1: $fieldType22.decode($decoder, $offset + 488, $depth), |
| s2: $fieldType23.decode($decoder, $offset + 504, $depth), |
| s3: $fieldType24.decode($decoder, $offset + 520, $depth), |
| vv1: $fieldType25.decode($decoder, $offset + 584, $depth), |
| vv2: $fieldType26.decode($decoder, $offset + 600, $depth), |
| vv3: $fieldType27.decode($decoder, $offset + 616, $depth), |
| aa1: $fieldType28.decode($decoder, $offset + 664, $depth), |
| aa2: $fieldType29.decode($decoder, $offset + 680, $depth), |
| aa3: $fieldType30.decode($decoder, $offset + 696, $depth), |
| rr1: $fieldType31.decode($decoder, $offset + 744, $depth), |
| rr2: $fieldType32.decode($decoder, $offset + 752, $depth), |
| rr3: $fieldType33.decode($decoder, $offset + 768, $depth)); |
| } |
| } |
| |
| // See fxbug.dev/7644: |
| // ignore: recursive_compile_time_constant |
| const $fidl.StructType<Testing> kTesting_Type = $fidl.StructType<Testing>( |
| inlineSize: 784, |
| structDecode: Testing._structDecode, |
| ); |
| |
| // ignore: unused_element, avoid_private_typedef_functions |
| typedef _VoidCallback = void Function(); |
| |
| abstract class MyProtocol { |
| $fidl.ServiceData? get $serviceData => MyProtocolData(); |
| } |
| |
| // TODO: Remove ServiceData for non-service |
| class MyProtocolData implements $fidl.ServiceData<MyProtocol> { |
| const MyProtocolData(); |
| |
| @override |
| String getName() { |
| return ""; |
| } |
| |
| @override |
| $fidl.AsyncBinding getBinding() { |
| return MyProtocolBinding(); |
| } |
| } |
| |
| class MyProtocolProxy extends $fidl.AsyncProxy<MyProtocol> |
| implements MyProtocol { |
| MyProtocolProxy() |
| : super($fidl.AsyncProxyController<MyProtocol>( |
| $interfaceName: r'MyProtocol')) { |
| ctrl.onResponse = _handleResponse; |
| } |
| @override |
| Null get $serviceData => null; |
| |
| void _handleEvent($fidl.IncomingMessage $message) { |
| switch ($message.ordinal) { |
| default: |
| ctrl.proxyError( |
| $fidl.FidlError('Unexpected message ordinal: ${$message.ordinal}')); |
| ctrl.close(); |
| break; |
| } |
| } |
| |
| void _handleResponse($fidl.IncomingMessage $message) { |
| final int $txid = $message.txid; |
| if ($txid == 0) { |
| _handleEvent($message); |
| return; |
| } |
| final $async.Completer? $completer = ctrl.getCompleter($txid); |
| if ($completer == null) { |
| $message.closeHandles(); |
| return; |
| } |
| switch ($message.ordinal) { |
| default: |
| ctrl.proxyError( |
| $fidl.FidlError('Unexpected message ordinal: ${$message.ordinal}')); |
| ctrl.close(); |
| break; |
| } |
| } |
| } |
| |
| class MyProtocolBinding extends $fidl.AsyncBinding<MyProtocol> { |
| MyProtocolBinding() : super(r"MyProtocol"); |
| |
| @override |
| void handleMessage( |
| $fidl.IncomingMessage $message, $fidl.OutgoingMessageSink $respond) { |
| switch ($message.ordinal) { |
| default: |
| throw $fidl.FidlError(r'Unexpected message name for MyProtocolBinding'); |
| } |
| } |
| } |