| Index: mojo/dart/packages/mojo_services/lib/mojo/tcp_bound_socket.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/mojo/tcp_bound_socket.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/tcp_bound_socket.mojom.dart
|
| index 9c75e49da2ca92c236dc4fe306e38c6bfe0be679..6ee872bd0a02948a7da5cbba7e8942aa478d203a 100644
|
| --- a/mojo/dart/packages/mojo_services/lib/mojo/tcp_bound_socket.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/tcp_bound_socket.mojom.dart
|
| @@ -5,9 +5,12 @@
|
| library tcp_bound_socket_mojom;
|
|
|
| import 'dart:async';
|
| +import 'dart:collection';
|
|
|
| import 'package:mojo/bindings.dart' as bindings;
|
| import 'package:mojo/core.dart' as core;
|
| +import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
|
| +import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as service_describer;
|
| import 'package:mojo/mojo/network_error.mojom.dart' as network_error_mojom;
|
| import 'package:mojo_services/mojo/net_address.mojom.dart' as net_address_mojom;
|
| import 'package:mojo_services/mojo/tcp_connected_socket.mojom.dart' as tcp_connected_socket_mojom;
|
| @@ -79,6 +82,23 @@ class _TcpBoundSocketStartListeningParams extends bindings.Struct {
|
| 'Object containing handles cannot be encoded to JSON.');
|
| }
|
| }
|
| +mojom_types.MojomStruct _tcp_bound_socket_TCPBoundSocket_StartListening_Params__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()
|
| + ..shortName = '_TcpBoundSocketStartListeningParams'
|
| + ..fullIdentifier = 'mojo._TcpBoundSocketStartListeningParams')
|
| + ..fields = <mojom_types.StructField>[
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Server')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..isInterfaceRequest = true
|
| + ..identifier = '_tcp_server_socket_TCPServerSocket__'
|
| + ..typeKey = '_tcp_server_socket_TCPServerSocket__'
|
| + )),
|
| + ];
|
| +}
|
|
|
|
|
| class TcpBoundSocketStartListeningResponseParams extends bindings.Struct {
|
| @@ -147,6 +167,22 @@ class TcpBoundSocketStartListeningResponseParams extends bindings.Struct {
|
| return map;
|
| }
|
| }
|
| +mojom_types.MojomStruct _tcp_bound_socket_TCPBoundSocket_StartListening_ResponseParams__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()
|
| + ..shortName = 'TcpBoundSocketStartListeningResponseParams'
|
| + ..fullIdentifier = 'mojo.TcpBoundSocketStartListeningResponseParams')
|
| + ..fields = <mojom_types.StructField>[
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Result')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..identifier = '_network_error_NetworkError__'
|
| + ..typeKey = '_network_error_NetworkError__'
|
| + )),
|
| + ];
|
| +}
|
|
|
|
|
| class _TcpBoundSocketConnectParams extends bindings.Struct {
|
| @@ -238,6 +274,46 @@ class _TcpBoundSocketConnectParams extends bindings.Struct {
|
| 'Object containing handles cannot be encoded to JSON.');
|
| }
|
| }
|
| +mojom_types.MojomStruct _tcp_bound_socket_TCPBoundSocket_Connect_Params__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()
|
| + ..shortName = '_TcpBoundSocketConnectParams'
|
| + ..fullIdentifier = 'mojo._TcpBoundSocketConnectParams')
|
| + ..fields = <mojom_types.StructField>[
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'RemoteAddress')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..identifier = '_net_address_NetAddress__'
|
| + ..typeKey = '_net_address_NetAddress__'
|
| + )),
|
| +
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'SendStream')
|
| + ..type = (new mojom_types.Type()
|
| +..handleType = (new mojom_types.HandleType()
|
| +..kind = mojom_types.HandleTypeKind.dataPipeConsumer
|
| +..nullable = false)),
|
| +
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'ReceiveStream')
|
| + ..type = (new mojom_types.Type()
|
| +..handleType = (new mojom_types.HandleType()
|
| +..kind = mojom_types.HandleTypeKind.dataPipeProducer
|
| +..nullable = false)),
|
| +
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'ClientSocket')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..isInterfaceRequest = true
|
| + ..identifier = '_tcp_connected_socket_TCPConnectedSocket__'
|
| + ..typeKey = '_tcp_connected_socket_TCPConnectedSocket__'
|
| + )),
|
| + ];
|
| +}
|
|
|
|
|
| class TcpBoundSocketConnectResponseParams extends bindings.Struct {
|
| @@ -306,10 +382,56 @@ class TcpBoundSocketConnectResponseParams extends bindings.Struct {
|
| return map;
|
| }
|
| }
|
| +mojom_types.MojomStruct _tcp_bound_socket_TCPBoundSocket_Connect_ResponseParams__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()
|
| + ..shortName = 'TcpBoundSocketConnectResponseParams'
|
| + ..fullIdentifier = 'mojo.TcpBoundSocketConnectResponseParams')
|
| + ..fields = <mojom_types.StructField>[
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Result')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..identifier = '_network_error_NetworkError__'
|
| + ..typeKey = '_network_error_NetworkError__'
|
| + )),
|
| + ];
|
| +}
|
| +
|
|
|
| const int _TcpBoundSocket_startListeningName = 0;
|
| const int _TcpBoundSocket_connectName = 1;
|
|
|
| +mojom_types.MojomInterface _tcp_bound_socket_TCPBoundSocket__() {
|
| + return new mojom_types.MojomInterface()
|
| + ..declData = (new mojom_types.DeclarationData()
|
| + ..shortName = 'TcpBoundSocket'
|
| + ..fullIdentifier = 'mojo.TcpBoundSocket')
|
| + ..interfaceName = 'TcpBoundSocket'
|
| + ..methods = <int, mojom_types.MojomMethod>{
|
| +_TcpBoundSocket_startListeningName: new mojom_types.MojomMethod()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'StartListening')
|
| + ..ordinal = _TcpBoundSocket_startListeningName
|
| + ..responseParams = _tcp_bound_socket_TCPBoundSocket_StartListening_ResponseParams__()..parameters = _tcp_bound_socket_TCPBoundSocket_StartListening_Params__(),_TcpBoundSocket_connectName: new mojom_types.MojomMethod()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Connect')
|
| + ..ordinal = _TcpBoundSocket_connectName
|
| + ..responseParams = _tcp_bound_socket_TCPBoundSocket_Connect_ResponseParams__()..parameters = _tcp_bound_socket_TCPBoundSocket_Connect_Params__(),
|
| + };
|
| +}
|
| +
|
| +class _TcpBoundSocketServiceDescription implements service_describer.ServiceDescription {
|
| +dynamic getTopLevelInterface([Function responseFactory = null]) {
|
| + return _tcp_bound_socket_TCPBoundSocket__();
|
| + }
|
| + dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
|
| + return getAllMojomTypeDefinitions()[typeKey];
|
| + }
|
| + dynamic getAllTypeDefinitions([Function responseFactory = null]) {
|
| + return getAllMojomTypeDefinitions();
|
| + }
|
| +}
|
| +
|
| abstract class TcpBoundSocket {
|
| static const String serviceName = null;
|
| dynamic startListening(Object server,[Function responseFactory = null]);
|
| @@ -332,6 +454,9 @@ class _TcpBoundSocketProxyImpl extends bindings.Proxy {
|
| return new _TcpBoundSocketProxyImpl.fromEndpoint(endpoint);
|
| }
|
|
|
| + service_describer.ServiceDescription get serviceDescription =>
|
| + new _TcpBoundSocketServiceDescription();
|
| +
|
| void handleResponse(bindings.ServiceMessage message) {
|
| switch (message.header.type) {
|
| case _TcpBoundSocket_startListeningName:
|
| @@ -576,6 +701,56 @@ class TcpBoundSocketStub extends bindings.Stub {
|
| }
|
|
|
| int get version => 0;
|
| +
|
| +
|
| + service_describer.ServiceDescription get serviceDescription =>
|
| + new _TcpBoundSocketServiceDescription();
|
| +}
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +Map<String, mojom_types.UserDefinedType> _initDescriptions() {
|
| + var map = new HashMap<String, mojom_types.UserDefinedType>();
|
| +map["_tcp_bound_socket_TCPBoundSocket_StartListening_Params__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..structType = _tcp_bound_socket_TCPBoundSocket_StartListening_Params__();
|
| +map["_tcp_bound_socket_TCPBoundSocket_StartListening_ResponseParams__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..structType = _tcp_bound_socket_TCPBoundSocket_StartListening_ResponseParams__();
|
| +map["_tcp_bound_socket_TCPBoundSocket_Connect_Params__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..structType = _tcp_bound_socket_TCPBoundSocket_Connect_Params__();
|
| +map["_tcp_bound_socket_TCPBoundSocket_Connect_ResponseParams__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..structType = _tcp_bound_socket_TCPBoundSocket_Connect_ResponseParams__();
|
| +map["_tcp_bound_socket_TCPBoundSocket__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..interfaceType = _tcp_bound_socket_TCPBoundSocket__();
|
| +network_error_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
|
| + map[s] = udt;
|
| +});
|
| +net_address_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
|
| + map[s] = udt;
|
| +});
|
| +tcp_connected_socket_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
|
| + map[s] = udt;
|
| +});
|
| +tcp_server_socket_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
|
| + map[s] = udt;
|
| +});
|
| +
|
| + return map;
|
| }
|
|
|
| +var _MojomDesc;
|
| +Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
|
| + if (_MojomDesc == null) {
|
| + _MojomDesc = _initDescriptions();
|
| + }
|
| + return _MojomDesc;
|
| +}
|
|
|
|
|