| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 library udp_socket_mojom; | 5 library udp_socket_mojom; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:mojo/bindings.dart' as bindings; | 9 import 'package:mojo/bindings.dart' as bindings; |
| 10 import 'package:mojo/core.dart' as core; | 10 import 'package:mojo/core.dart' as core; |
| 11 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types; |
| 12 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
| 11 import 'package:mojo/mojo/network_error.mojom.dart' as network_error_mojom; | 13 import 'package:mojo/mojo/network_error.mojom.dart' as network_error_mojom; |
| 12 import 'package:mojo_services/mojo/net_address.mojom.dart' as net_address_mojom; | 14 import 'package:mojo_services/mojo/net_address.mojom.dart' as net_address_mojom; |
| 13 | 15 |
| 14 | 16 |
| 15 | 17 |
| 16 class _UdpSocketAllowAddressReuseParams extends bindings.Struct { | 18 class _UdpSocketAllowAddressReuseParams extends bindings.Struct { |
| 17 static const List<bindings.StructDataHeader> kVersions = const [ | 19 static const List<bindings.StructDataHeader> kVersions = const [ |
| 18 const bindings.StructDataHeader(8, 0) | 20 const bindings.StructDataHeader(8, 0) |
| 19 ]; | 21 ]; |
| 20 | 22 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 return "_UdpSocketAllowAddressReuseParams("")"; | 66 return "_UdpSocketAllowAddressReuseParams("")"; |
| 65 } | 67 } |
| 66 | 68 |
| 67 Map toJson() { | 69 Map toJson() { |
| 68 Map map = new Map(); | 70 Map map = new Map(); |
| 69 return map; | 71 return map; |
| 70 } | 72 } |
| 71 } | 73 } |
| 72 | 74 |
| 73 | 75 |
| 76 |
| 77 |
| 74 class UdpSocketAllowAddressReuseResponseParams extends bindings.Struct { | 78 class UdpSocketAllowAddressReuseResponseParams extends bindings.Struct { |
| 75 static const List<bindings.StructDataHeader> kVersions = const [ | 79 static const List<bindings.StructDataHeader> kVersions = const [ |
| 76 const bindings.StructDataHeader(16, 0) | 80 const bindings.StructDataHeader(16, 0) |
| 77 ]; | 81 ]; |
| 78 network_error_mojom.NetworkError result = null; | 82 network_error_mojom.NetworkError result = null; |
| 79 | 83 |
| 80 UdpSocketAllowAddressReuseResponseParams() : super(kVersions.last.size); | 84 UdpSocketAllowAddressReuseResponseParams() : super(kVersions.last.size); |
| 81 | 85 |
| 82 static UdpSocketAllowAddressReuseResponseParams deserialize(bindings.Message m
essage) { | 86 static UdpSocketAllowAddressReuseResponseParams deserialize(bindings.Message m
essage) { |
| 83 var decoder = new bindings.Decoder(message); | 87 var decoder = new bindings.Decoder(message); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 136 } |
| 133 | 137 |
| 134 Map toJson() { | 138 Map toJson() { |
| 135 Map map = new Map(); | 139 Map map = new Map(); |
| 136 map["result"] = result; | 140 map["result"] = result; |
| 137 return map; | 141 return map; |
| 138 } | 142 } |
| 139 } | 143 } |
| 140 | 144 |
| 141 | 145 |
| 146 |
| 147 |
| 142 class _UdpSocketBindParams extends bindings.Struct { | 148 class _UdpSocketBindParams extends bindings.Struct { |
| 143 static const List<bindings.StructDataHeader> kVersions = const [ | 149 static const List<bindings.StructDataHeader> kVersions = const [ |
| 144 const bindings.StructDataHeader(16, 0) | 150 const bindings.StructDataHeader(16, 0) |
| 145 ]; | 151 ]; |
| 146 net_address_mojom.NetAddress addr = null; | 152 net_address_mojom.NetAddress addr = null; |
| 147 | 153 |
| 148 _UdpSocketBindParams() : super(kVersions.last.size); | 154 _UdpSocketBindParams() : super(kVersions.last.size); |
| 149 | 155 |
| 150 static _UdpSocketBindParams deserialize(bindings.Message message) { | 156 static _UdpSocketBindParams deserialize(bindings.Message message) { |
| 151 var decoder = new bindings.Decoder(message); | 157 var decoder = new bindings.Decoder(message); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 } | 206 } |
| 201 | 207 |
| 202 Map toJson() { | 208 Map toJson() { |
| 203 Map map = new Map(); | 209 Map map = new Map(); |
| 204 map["addr"] = addr; | 210 map["addr"] = addr; |
| 205 return map; | 211 return map; |
| 206 } | 212 } |
| 207 } | 213 } |
| 208 | 214 |
| 209 | 215 |
| 216 |
| 217 |
| 210 class UdpSocketBindResponseParams extends bindings.Struct { | 218 class UdpSocketBindResponseParams extends bindings.Struct { |
| 211 static const List<bindings.StructDataHeader> kVersions = const [ | 219 static const List<bindings.StructDataHeader> kVersions = const [ |
| 212 const bindings.StructDataHeader(32, 0) | 220 const bindings.StructDataHeader(32, 0) |
| 213 ]; | 221 ]; |
| 214 network_error_mojom.NetworkError result = null; | 222 network_error_mojom.NetworkError result = null; |
| 215 net_address_mojom.NetAddress boundAddr = null; | 223 net_address_mojom.NetAddress boundAddr = null; |
| 216 Object receiver = null; | 224 Object receiver = null; |
| 217 | 225 |
| 218 UdpSocketBindResponseParams() : super(kVersions.last.size); | 226 UdpSocketBindResponseParams() : super(kVersions.last.size); |
| 219 | 227 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 "receiver: $receiver" ")"; | 292 "receiver: $receiver" ")"; |
| 285 } | 293 } |
| 286 | 294 |
| 287 Map toJson() { | 295 Map toJson() { |
| 288 throw new bindings.MojoCodecError( | 296 throw new bindings.MojoCodecError( |
| 289 'Object containing handles cannot be encoded to JSON.'); | 297 'Object containing handles cannot be encoded to JSON.'); |
| 290 } | 298 } |
| 291 } | 299 } |
| 292 | 300 |
| 293 | 301 |
| 302 |
| 303 |
| 294 class _UdpSocketConnectParams extends bindings.Struct { | 304 class _UdpSocketConnectParams extends bindings.Struct { |
| 295 static const List<bindings.StructDataHeader> kVersions = const [ | 305 static const List<bindings.StructDataHeader> kVersions = const [ |
| 296 const bindings.StructDataHeader(16, 0) | 306 const bindings.StructDataHeader(16, 0) |
| 297 ]; | 307 ]; |
| 298 net_address_mojom.NetAddress remoteAddr = null; | 308 net_address_mojom.NetAddress remoteAddr = null; |
| 299 | 309 |
| 300 _UdpSocketConnectParams() : super(kVersions.last.size); | 310 _UdpSocketConnectParams() : super(kVersions.last.size); |
| 301 | 311 |
| 302 static _UdpSocketConnectParams deserialize(bindings.Message message) { | 312 static _UdpSocketConnectParams deserialize(bindings.Message message) { |
| 303 var decoder = new bindings.Decoder(message); | 313 var decoder = new bindings.Decoder(message); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 } | 362 } |
| 353 | 363 |
| 354 Map toJson() { | 364 Map toJson() { |
| 355 Map map = new Map(); | 365 Map map = new Map(); |
| 356 map["remoteAddr"] = remoteAddr; | 366 map["remoteAddr"] = remoteAddr; |
| 357 return map; | 367 return map; |
| 358 } | 368 } |
| 359 } | 369 } |
| 360 | 370 |
| 361 | 371 |
| 372 |
| 373 |
| 362 class UdpSocketConnectResponseParams extends bindings.Struct { | 374 class UdpSocketConnectResponseParams extends bindings.Struct { |
| 363 static const List<bindings.StructDataHeader> kVersions = const [ | 375 static const List<bindings.StructDataHeader> kVersions = const [ |
| 364 const bindings.StructDataHeader(32, 0) | 376 const bindings.StructDataHeader(32, 0) |
| 365 ]; | 377 ]; |
| 366 network_error_mojom.NetworkError result = null; | 378 network_error_mojom.NetworkError result = null; |
| 367 net_address_mojom.NetAddress localAddr = null; | 379 net_address_mojom.NetAddress localAddr = null; |
| 368 Object receiver = null; | 380 Object receiver = null; |
| 369 | 381 |
| 370 UdpSocketConnectResponseParams() : super(kVersions.last.size); | 382 UdpSocketConnectResponseParams() : super(kVersions.last.size); |
| 371 | 383 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 "receiver: $receiver" ")"; | 448 "receiver: $receiver" ")"; |
| 437 } | 449 } |
| 438 | 450 |
| 439 Map toJson() { | 451 Map toJson() { |
| 440 throw new bindings.MojoCodecError( | 452 throw new bindings.MojoCodecError( |
| 441 'Object containing handles cannot be encoded to JSON.'); | 453 'Object containing handles cannot be encoded to JSON.'); |
| 442 } | 454 } |
| 443 } | 455 } |
| 444 | 456 |
| 445 | 457 |
| 458 |
| 459 |
| 446 class _UdpSocketSetSendBufferSizeParams extends bindings.Struct { | 460 class _UdpSocketSetSendBufferSizeParams extends bindings.Struct { |
| 447 static const List<bindings.StructDataHeader> kVersions = const [ | 461 static const List<bindings.StructDataHeader> kVersions = const [ |
| 448 const bindings.StructDataHeader(16, 0) | 462 const bindings.StructDataHeader(16, 0) |
| 449 ]; | 463 ]; |
| 450 int size = 0; | 464 int size = 0; |
| 451 | 465 |
| 452 _UdpSocketSetSendBufferSizeParams() : super(kVersions.last.size); | 466 _UdpSocketSetSendBufferSizeParams() : super(kVersions.last.size); |
| 453 | 467 |
| 454 static _UdpSocketSetSendBufferSizeParams deserialize(bindings.Message message)
{ | 468 static _UdpSocketSetSendBufferSizeParams deserialize(bindings.Message message)
{ |
| 455 var decoder = new bindings.Decoder(message); | 469 var decoder = new bindings.Decoder(message); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 } | 517 } |
| 504 | 518 |
| 505 Map toJson() { | 519 Map toJson() { |
| 506 Map map = new Map(); | 520 Map map = new Map(); |
| 507 map["size"] = size; | 521 map["size"] = size; |
| 508 return map; | 522 return map; |
| 509 } | 523 } |
| 510 } | 524 } |
| 511 | 525 |
| 512 | 526 |
| 527 |
| 528 |
| 513 class UdpSocketSetSendBufferSizeResponseParams extends bindings.Struct { | 529 class UdpSocketSetSendBufferSizeResponseParams extends bindings.Struct { |
| 514 static const List<bindings.StructDataHeader> kVersions = const [ | 530 static const List<bindings.StructDataHeader> kVersions = const [ |
| 515 const bindings.StructDataHeader(16, 0) | 531 const bindings.StructDataHeader(16, 0) |
| 516 ]; | 532 ]; |
| 517 network_error_mojom.NetworkError result = null; | 533 network_error_mojom.NetworkError result = null; |
| 518 | 534 |
| 519 UdpSocketSetSendBufferSizeResponseParams() : super(kVersions.last.size); | 535 UdpSocketSetSendBufferSizeResponseParams() : super(kVersions.last.size); |
| 520 | 536 |
| 521 static UdpSocketSetSendBufferSizeResponseParams deserialize(bindings.Message m
essage) { | 537 static UdpSocketSetSendBufferSizeResponseParams deserialize(bindings.Message m
essage) { |
| 522 var decoder = new bindings.Decoder(message); | 538 var decoder = new bindings.Decoder(message); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 } | 587 } |
| 572 | 588 |
| 573 Map toJson() { | 589 Map toJson() { |
| 574 Map map = new Map(); | 590 Map map = new Map(); |
| 575 map["result"] = result; | 591 map["result"] = result; |
| 576 return map; | 592 return map; |
| 577 } | 593 } |
| 578 } | 594 } |
| 579 | 595 |
| 580 | 596 |
| 597 |
| 598 |
| 581 class _UdpSocketSetReceiveBufferSizeParams extends bindings.Struct { | 599 class _UdpSocketSetReceiveBufferSizeParams extends bindings.Struct { |
| 582 static const List<bindings.StructDataHeader> kVersions = const [ | 600 static const List<bindings.StructDataHeader> kVersions = const [ |
| 583 const bindings.StructDataHeader(16, 0) | 601 const bindings.StructDataHeader(16, 0) |
| 584 ]; | 602 ]; |
| 585 int size = 0; | 603 int size = 0; |
| 586 | 604 |
| 587 _UdpSocketSetReceiveBufferSizeParams() : super(kVersions.last.size); | 605 _UdpSocketSetReceiveBufferSizeParams() : super(kVersions.last.size); |
| 588 | 606 |
| 589 static _UdpSocketSetReceiveBufferSizeParams deserialize(bindings.Message messa
ge) { | 607 static _UdpSocketSetReceiveBufferSizeParams deserialize(bindings.Message messa
ge) { |
| 590 var decoder = new bindings.Decoder(message); | 608 var decoder = new bindings.Decoder(message); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 } | 656 } |
| 639 | 657 |
| 640 Map toJson() { | 658 Map toJson() { |
| 641 Map map = new Map(); | 659 Map map = new Map(); |
| 642 map["size"] = size; | 660 map["size"] = size; |
| 643 return map; | 661 return map; |
| 644 } | 662 } |
| 645 } | 663 } |
| 646 | 664 |
| 647 | 665 |
| 666 |
| 667 |
| 648 class UdpSocketSetReceiveBufferSizeResponseParams extends bindings.Struct { | 668 class UdpSocketSetReceiveBufferSizeResponseParams extends bindings.Struct { |
| 649 static const List<bindings.StructDataHeader> kVersions = const [ | 669 static const List<bindings.StructDataHeader> kVersions = const [ |
| 650 const bindings.StructDataHeader(16, 0) | 670 const bindings.StructDataHeader(16, 0) |
| 651 ]; | 671 ]; |
| 652 network_error_mojom.NetworkError result = null; | 672 network_error_mojom.NetworkError result = null; |
| 653 | 673 |
| 654 UdpSocketSetReceiveBufferSizeResponseParams() : super(kVersions.last.size); | 674 UdpSocketSetReceiveBufferSizeResponseParams() : super(kVersions.last.size); |
| 655 | 675 |
| 656 static UdpSocketSetReceiveBufferSizeResponseParams deserialize(bindings.Messag
e message) { | 676 static UdpSocketSetReceiveBufferSizeResponseParams deserialize(bindings.Messag
e message) { |
| 657 var decoder = new bindings.Decoder(message); | 677 var decoder = new bindings.Decoder(message); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 } | 726 } |
| 707 | 727 |
| 708 Map toJson() { | 728 Map toJson() { |
| 709 Map map = new Map(); | 729 Map map = new Map(); |
| 710 map["result"] = result; | 730 map["result"] = result; |
| 711 return map; | 731 return map; |
| 712 } | 732 } |
| 713 } | 733 } |
| 714 | 734 |
| 715 | 735 |
| 736 |
| 737 |
| 716 class _UdpSocketNegotiateMaxPendingSendRequestsParams extends bindings.Struct { | 738 class _UdpSocketNegotiateMaxPendingSendRequestsParams extends bindings.Struct { |
| 717 static const List<bindings.StructDataHeader> kVersions = const [ | 739 static const List<bindings.StructDataHeader> kVersions = const [ |
| 718 const bindings.StructDataHeader(16, 0) | 740 const bindings.StructDataHeader(16, 0) |
| 719 ]; | 741 ]; |
| 720 int requestedSize = 0; | 742 int requestedSize = 0; |
| 721 | 743 |
| 722 _UdpSocketNegotiateMaxPendingSendRequestsParams() : super(kVersions.last.size)
; | 744 _UdpSocketNegotiateMaxPendingSendRequestsParams() : super(kVersions.last.size)
; |
| 723 | 745 |
| 724 static _UdpSocketNegotiateMaxPendingSendRequestsParams deserialize(bindings.Me
ssage message) { | 746 static _UdpSocketNegotiateMaxPendingSendRequestsParams deserialize(bindings.Me
ssage message) { |
| 725 var decoder = new bindings.Decoder(message); | 747 var decoder = new bindings.Decoder(message); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 } | 795 } |
| 774 | 796 |
| 775 Map toJson() { | 797 Map toJson() { |
| 776 Map map = new Map(); | 798 Map map = new Map(); |
| 777 map["requestedSize"] = requestedSize; | 799 map["requestedSize"] = requestedSize; |
| 778 return map; | 800 return map; |
| 779 } | 801 } |
| 780 } | 802 } |
| 781 | 803 |
| 782 | 804 |
| 805 |
| 806 |
| 783 class UdpSocketNegotiateMaxPendingSendRequestsResponseParams extends bindings.St
ruct { | 807 class UdpSocketNegotiateMaxPendingSendRequestsResponseParams extends bindings.St
ruct { |
| 784 static const List<bindings.StructDataHeader> kVersions = const [ | 808 static const List<bindings.StructDataHeader> kVersions = const [ |
| 785 const bindings.StructDataHeader(16, 0) | 809 const bindings.StructDataHeader(16, 0) |
| 786 ]; | 810 ]; |
| 787 int actualSize = 0; | 811 int actualSize = 0; |
| 788 | 812 |
| 789 UdpSocketNegotiateMaxPendingSendRequestsResponseParams() : super(kVersions.las
t.size); | 813 UdpSocketNegotiateMaxPendingSendRequestsResponseParams() : super(kVersions.las
t.size); |
| 790 | 814 |
| 791 static UdpSocketNegotiateMaxPendingSendRequestsResponseParams deserialize(bind
ings.Message message) { | 815 static UdpSocketNegotiateMaxPendingSendRequestsResponseParams deserialize(bind
ings.Message message) { |
| 792 var decoder = new bindings.Decoder(message); | 816 var decoder = new bindings.Decoder(message); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 } | 864 } |
| 841 | 865 |
| 842 Map toJson() { | 866 Map toJson() { |
| 843 Map map = new Map(); | 867 Map map = new Map(); |
| 844 map["actualSize"] = actualSize; | 868 map["actualSize"] = actualSize; |
| 845 return map; | 869 return map; |
| 846 } | 870 } |
| 847 } | 871 } |
| 848 | 872 |
| 849 | 873 |
| 874 |
| 875 |
| 850 class _UdpSocketReceiveMoreParams extends bindings.Struct { | 876 class _UdpSocketReceiveMoreParams extends bindings.Struct { |
| 851 static const List<bindings.StructDataHeader> kVersions = const [ | 877 static const List<bindings.StructDataHeader> kVersions = const [ |
| 852 const bindings.StructDataHeader(16, 0) | 878 const bindings.StructDataHeader(16, 0) |
| 853 ]; | 879 ]; |
| 854 int datagramNumber = 0; | 880 int datagramNumber = 0; |
| 855 | 881 |
| 856 _UdpSocketReceiveMoreParams() : super(kVersions.last.size); | 882 _UdpSocketReceiveMoreParams() : super(kVersions.last.size); |
| 857 | 883 |
| 858 static _UdpSocketReceiveMoreParams deserialize(bindings.Message message) { | 884 static _UdpSocketReceiveMoreParams deserialize(bindings.Message message) { |
| 859 var decoder = new bindings.Decoder(message); | 885 var decoder = new bindings.Decoder(message); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 } | 933 } |
| 908 | 934 |
| 909 Map toJson() { | 935 Map toJson() { |
| 910 Map map = new Map(); | 936 Map map = new Map(); |
| 911 map["datagramNumber"] = datagramNumber; | 937 map["datagramNumber"] = datagramNumber; |
| 912 return map; | 938 return map; |
| 913 } | 939 } |
| 914 } | 940 } |
| 915 | 941 |
| 916 | 942 |
| 943 |
| 944 |
| 917 class _UdpSocketSendToParams extends bindings.Struct { | 945 class _UdpSocketSendToParams extends bindings.Struct { |
| 918 static const List<bindings.StructDataHeader> kVersions = const [ | 946 static const List<bindings.StructDataHeader> kVersions = const [ |
| 919 const bindings.StructDataHeader(24, 0) | 947 const bindings.StructDataHeader(24, 0) |
| 920 ]; | 948 ]; |
| 921 net_address_mojom.NetAddress destAddr = null; | 949 net_address_mojom.NetAddress destAddr = null; |
| 922 List<int> data = null; | 950 List<int> data = null; |
| 923 | 951 |
| 924 _UdpSocketSendToParams() : super(kVersions.last.size); | 952 _UdpSocketSendToParams() : super(kVersions.last.size); |
| 925 | 953 |
| 926 static _UdpSocketSendToParams deserialize(bindings.Message message) { | 954 static _UdpSocketSendToParams deserialize(bindings.Message message) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 | 1012 |
| 985 Map toJson() { | 1013 Map toJson() { |
| 986 Map map = new Map(); | 1014 Map map = new Map(); |
| 987 map["destAddr"] = destAddr; | 1015 map["destAddr"] = destAddr; |
| 988 map["data"] = data; | 1016 map["data"] = data; |
| 989 return map; | 1017 return map; |
| 990 } | 1018 } |
| 991 } | 1019 } |
| 992 | 1020 |
| 993 | 1021 |
| 1022 |
| 1023 |
| 994 class UdpSocketSendToResponseParams extends bindings.Struct { | 1024 class UdpSocketSendToResponseParams extends bindings.Struct { |
| 995 static const List<bindings.StructDataHeader> kVersions = const [ | 1025 static const List<bindings.StructDataHeader> kVersions = const [ |
| 996 const bindings.StructDataHeader(16, 0) | 1026 const bindings.StructDataHeader(16, 0) |
| 997 ]; | 1027 ]; |
| 998 network_error_mojom.NetworkError result = null; | 1028 network_error_mojom.NetworkError result = null; |
| 999 | 1029 |
| 1000 UdpSocketSendToResponseParams() : super(kVersions.last.size); | 1030 UdpSocketSendToResponseParams() : super(kVersions.last.size); |
| 1001 | 1031 |
| 1002 static UdpSocketSendToResponseParams deserialize(bindings.Message message) { | 1032 static UdpSocketSendToResponseParams deserialize(bindings.Message message) { |
| 1003 var decoder = new bindings.Decoder(message); | 1033 var decoder = new bindings.Decoder(message); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 } | 1082 } |
| 1053 | 1083 |
| 1054 Map toJson() { | 1084 Map toJson() { |
| 1055 Map map = new Map(); | 1085 Map map = new Map(); |
| 1056 map["result"] = result; | 1086 map["result"] = result; |
| 1057 return map; | 1087 return map; |
| 1058 } | 1088 } |
| 1059 } | 1089 } |
| 1060 | 1090 |
| 1061 | 1091 |
| 1092 |
| 1093 |
| 1062 class _UdpSocketReceiverOnReceivedParams extends bindings.Struct { | 1094 class _UdpSocketReceiverOnReceivedParams extends bindings.Struct { |
| 1063 static const List<bindings.StructDataHeader> kVersions = const [ | 1095 static const List<bindings.StructDataHeader> kVersions = const [ |
| 1064 const bindings.StructDataHeader(32, 0) | 1096 const bindings.StructDataHeader(32, 0) |
| 1065 ]; | 1097 ]; |
| 1066 network_error_mojom.NetworkError result = null; | 1098 network_error_mojom.NetworkError result = null; |
| 1067 net_address_mojom.NetAddress srcAddr = null; | 1099 net_address_mojom.NetAddress srcAddr = null; |
| 1068 List<int> data = null; | 1100 List<int> data = null; |
| 1069 | 1101 |
| 1070 _UdpSocketReceiverOnReceivedParams() : super(kVersions.last.size); | 1102 _UdpSocketReceiverOnReceivedParams() : super(kVersions.last.size); |
| 1071 | 1103 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 | 1170 |
| 1139 Map toJson() { | 1171 Map toJson() { |
| 1140 Map map = new Map(); | 1172 Map map = new Map(); |
| 1141 map["result"] = result; | 1173 map["result"] = result; |
| 1142 map["srcAddr"] = srcAddr; | 1174 map["srcAddr"] = srcAddr; |
| 1143 map["data"] = data; | 1175 map["data"] = data; |
| 1144 return map; | 1176 return map; |
| 1145 } | 1177 } |
| 1146 } | 1178 } |
| 1147 | 1179 |
| 1180 |
| 1181 |
| 1182 |
| 1148 const int _UdpSocket_allowAddressReuseName = 0; | 1183 const int _UdpSocket_allowAddressReuseName = 0; |
| 1149 const int _UdpSocket_bindName = 1; | 1184 const int _UdpSocket_bindName = 1; |
| 1150 const int _UdpSocket_connectName = 2; | 1185 const int _UdpSocket_connectName = 2; |
| 1151 const int _UdpSocket_setSendBufferSizeName = 3; | 1186 const int _UdpSocket_setSendBufferSizeName = 3; |
| 1152 const int _UdpSocket_setReceiveBufferSizeName = 4; | 1187 const int _UdpSocket_setReceiveBufferSizeName = 4; |
| 1153 const int _UdpSocket_negotiateMaxPendingSendRequestsName = 5; | 1188 const int _UdpSocket_negotiateMaxPendingSendRequestsName = 5; |
| 1154 const int _UdpSocket_receiveMoreName = 6; | 1189 const int _UdpSocket_receiveMoreName = 6; |
| 1155 const int _UdpSocket_sendToName = 7; | 1190 const int _UdpSocket_sendToName = 7; |
| 1156 | 1191 |
| 1192 |
| 1193 |
| 1194 class _UdpSocketServiceDescription implements service_describer.ServiceDescripti
on { |
| 1195 dynamic getTopLevelInterface([Function responseFactory]) => null; |
| 1196 |
| 1197 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; |
| 1198 |
| 1199 dynamic getAllTypeDefinitions([Function responseFactory]) => null; |
| 1200 } |
| 1201 |
| 1157 abstract class UdpSocket { | 1202 abstract class UdpSocket { |
| 1158 static const String serviceName = null; | 1203 static const String serviceName = null; |
| 1159 dynamic allowAddressReuse([Function responseFactory = null]); | 1204 dynamic allowAddressReuse([Function responseFactory = null]); |
| 1160 dynamic bind(net_address_mojom.NetAddress addr,[Function responseFactory = nul
l]); | 1205 dynamic bind(net_address_mojom.NetAddress addr,[Function responseFactory = nul
l]); |
| 1161 dynamic connect(net_address_mojom.NetAddress remoteAddr,[Function responseFact
ory = null]); | 1206 dynamic connect(net_address_mojom.NetAddress remoteAddr,[Function responseFact
ory = null]); |
| 1162 dynamic setSendBufferSize(int size,[Function responseFactory = null]); | 1207 dynamic setSendBufferSize(int size,[Function responseFactory = null]); |
| 1163 dynamic setReceiveBufferSize(int size,[Function responseFactory = null]); | 1208 dynamic setReceiveBufferSize(int size,[Function responseFactory = null]); |
| 1164 dynamic negotiateMaxPendingSendRequests(int requestedSize,[Function responseFa
ctory = null]); | 1209 dynamic negotiateMaxPendingSendRequests(int requestedSize,[Function responseFa
ctory = null]); |
| 1165 void receiveMore(int datagramNumber); | 1210 void receiveMore(int datagramNumber); |
| 1166 dynamic sendTo(net_address_mojom.NetAddress destAddr,List<int> data,[Function
responseFactory = null]); | 1211 dynamic sendTo(net_address_mojom.NetAddress destAddr,List<int> data,[Function
responseFactory = null]); |
| 1167 } | 1212 } |
| 1168 | 1213 |
| 1169 | 1214 |
| 1170 class _UdpSocketProxyImpl extends bindings.Proxy { | 1215 class _UdpSocketProxyImpl extends bindings.Proxy { |
| 1171 _UdpSocketProxyImpl.fromEndpoint( | 1216 _UdpSocketProxyImpl.fromEndpoint( |
| 1172 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 1217 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
| 1173 | 1218 |
| 1174 _UdpSocketProxyImpl.fromHandle(core.MojoHandle handle) : | 1219 _UdpSocketProxyImpl.fromHandle(core.MojoHandle handle) : |
| 1175 super.fromHandle(handle); | 1220 super.fromHandle(handle); |
| 1176 | 1221 |
| 1177 _UdpSocketProxyImpl.unbound() : super.unbound(); | 1222 _UdpSocketProxyImpl.unbound() : super.unbound(); |
| 1178 | 1223 |
| 1179 static _UdpSocketProxyImpl newFromEndpoint( | 1224 static _UdpSocketProxyImpl newFromEndpoint( |
| 1180 core.MojoMessagePipeEndpoint endpoint) { | 1225 core.MojoMessagePipeEndpoint endpoint) { |
| 1181 assert(endpoint.setDescription("For _UdpSocketProxyImpl")); | 1226 assert(endpoint.setDescription("For _UdpSocketProxyImpl")); |
| 1182 return new _UdpSocketProxyImpl.fromEndpoint(endpoint); | 1227 return new _UdpSocketProxyImpl.fromEndpoint(endpoint); |
| 1183 } | 1228 } |
| 1184 | 1229 |
| 1230 service_describer.ServiceDescription get serviceDescription => |
| 1231 new _UdpSocketServiceDescription(); |
| 1232 |
| 1185 void handleResponse(bindings.ServiceMessage message) { | 1233 void handleResponse(bindings.ServiceMessage message) { |
| 1186 switch (message.header.type) { | 1234 switch (message.header.type) { |
| 1187 case _UdpSocket_allowAddressReuseName: | 1235 case _UdpSocket_allowAddressReuseName: |
| 1188 var r = UdpSocketAllowAddressReuseResponseParams.deserialize( | 1236 var r = UdpSocketAllowAddressReuseResponseParams.deserialize( |
| 1189 message.payload); | 1237 message.payload); |
| 1190 if (!message.header.hasRequestId) { | 1238 if (!message.header.hasRequestId) { |
| 1191 proxyError("Expected a message with a valid request Id."); | 1239 proxyError("Expected a message with a valid request Id."); |
| 1192 return; | 1240 return; |
| 1193 } | 1241 } |
| 1194 Completer c = completerMap[message.header.requestId]; | 1242 Completer c = completerMap[message.header.requestId]; |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1714 assert(_impl == null); | 1762 assert(_impl == null); |
| 1715 _impl = d; | 1763 _impl = d; |
| 1716 } | 1764 } |
| 1717 | 1765 |
| 1718 String toString() { | 1766 String toString() { |
| 1719 var superString = super.toString(); | 1767 var superString = super.toString(); |
| 1720 return "UdpSocketStub($superString)"; | 1768 return "UdpSocketStub($superString)"; |
| 1721 } | 1769 } |
| 1722 | 1770 |
| 1723 int get version => 0; | 1771 int get version => 0; |
| 1772 |
| 1773 service_describer.ServiceDescription get serviceDescription => |
| 1774 new _UdpSocketServiceDescription(); |
| 1724 } | 1775 } |
| 1725 | 1776 |
| 1726 const int _UdpSocketReceiver_onReceivedName = 0; | 1777 const int _UdpSocketReceiver_onReceivedName = 0; |
| 1727 | 1778 |
| 1779 |
| 1780 |
| 1781 class _UdpSocketReceiverServiceDescription implements service_describer.ServiceD
escription { |
| 1782 dynamic getTopLevelInterface([Function responseFactory]) => null; |
| 1783 |
| 1784 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; |
| 1785 |
| 1786 dynamic getAllTypeDefinitions([Function responseFactory]) => null; |
| 1787 } |
| 1788 |
| 1728 abstract class UdpSocketReceiver { | 1789 abstract class UdpSocketReceiver { |
| 1729 static const String serviceName = null; | 1790 static const String serviceName = null; |
| 1730 void onReceived(network_error_mojom.NetworkError result, net_address_mojom.Net
Address srcAddr, List<int> data); | 1791 void onReceived(network_error_mojom.NetworkError result, net_address_mojom.Net
Address srcAddr, List<int> data); |
| 1731 } | 1792 } |
| 1732 | 1793 |
| 1733 | 1794 |
| 1734 class _UdpSocketReceiverProxyImpl extends bindings.Proxy { | 1795 class _UdpSocketReceiverProxyImpl extends bindings.Proxy { |
| 1735 _UdpSocketReceiverProxyImpl.fromEndpoint( | 1796 _UdpSocketReceiverProxyImpl.fromEndpoint( |
| 1736 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 1797 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
| 1737 | 1798 |
| 1738 _UdpSocketReceiverProxyImpl.fromHandle(core.MojoHandle handle) : | 1799 _UdpSocketReceiverProxyImpl.fromHandle(core.MojoHandle handle) : |
| 1739 super.fromHandle(handle); | 1800 super.fromHandle(handle); |
| 1740 | 1801 |
| 1741 _UdpSocketReceiverProxyImpl.unbound() : super.unbound(); | 1802 _UdpSocketReceiverProxyImpl.unbound() : super.unbound(); |
| 1742 | 1803 |
| 1743 static _UdpSocketReceiverProxyImpl newFromEndpoint( | 1804 static _UdpSocketReceiverProxyImpl newFromEndpoint( |
| 1744 core.MojoMessagePipeEndpoint endpoint) { | 1805 core.MojoMessagePipeEndpoint endpoint) { |
| 1745 assert(endpoint.setDescription("For _UdpSocketReceiverProxyImpl")); | 1806 assert(endpoint.setDescription("For _UdpSocketReceiverProxyImpl")); |
| 1746 return new _UdpSocketReceiverProxyImpl.fromEndpoint(endpoint); | 1807 return new _UdpSocketReceiverProxyImpl.fromEndpoint(endpoint); |
| 1747 } | 1808 } |
| 1748 | 1809 |
| 1810 service_describer.ServiceDescription get serviceDescription => |
| 1811 new _UdpSocketReceiverServiceDescription(); |
| 1812 |
| 1749 void handleResponse(bindings.ServiceMessage message) { | 1813 void handleResponse(bindings.ServiceMessage message) { |
| 1750 switch (message.header.type) { | 1814 switch (message.header.type) { |
| 1751 default: | 1815 default: |
| 1752 proxyError("Unexpected message type: ${message.header.type}"); | 1816 proxyError("Unexpected message type: ${message.header.type}"); |
| 1753 close(immediate: true); | 1817 close(immediate: true); |
| 1754 break; | 1818 break; |
| 1755 } | 1819 } |
| 1756 } | 1820 } |
| 1757 | 1821 |
| 1758 String toString() { | 1822 String toString() { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1884 assert(_impl == null); | 1948 assert(_impl == null); |
| 1885 _impl = d; | 1949 _impl = d; |
| 1886 } | 1950 } |
| 1887 | 1951 |
| 1888 String toString() { | 1952 String toString() { |
| 1889 var superString = super.toString(); | 1953 var superString = super.toString(); |
| 1890 return "UdpSocketReceiverStub($superString)"; | 1954 return "UdpSocketReceiverStub($superString)"; |
| 1891 } | 1955 } |
| 1892 | 1956 |
| 1893 int get version => 0; | 1957 int get version => 0; |
| 1958 |
| 1959 service_describer.ServiceDescription get serviceDescription => |
| 1960 new _UdpSocketReceiverServiceDescription(); |
| 1894 } | 1961 } |
| 1895 | 1962 |
| 1896 | 1963 |
| 1964 |
| OLD | NEW |