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 2509fe669a2d78d9ccedc0cab3857f5ad44ae6ca..2fb9c66617a2683bda2b9b8f7d150959429046c7 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 |
@@ -8,6 +8,8 @@ import 'dart:async'; |
import 'package:mojo/bindings.dart' as bindings; |
import 'package:mojo/core.dart' as core; |
+import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types; |
+import 'package:mojo/mojo/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; |
@@ -80,6 +82,22 @@ class TcpBoundSocketStartListeningParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _tcp_bound_socket_TCPBoundSocket_StartListening_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -148,6 +166,21 @@ class TcpBoundSocketStartListeningResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _tcp_bound_socket_TCPBoundSocket_StartListening_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -239,6 +272,45 @@ class TcpBoundSocketConnectParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _tcp_bound_socket_TCPBoundSocket_Connect_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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.DATA_PIPE_CONSUMER |
+..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.DATA_PIPE_PRODUCER |
+..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 { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -307,12 +379,57 @@ class TcpBoundSocketConnectResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _tcp_bound_socket_TCPBoundSocket_Connect_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = '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 kTcpBoundSocket_startListening_name = 0; |
const int kTcpBoundSocket_connect_name = 1; |
const String TcpBoundSocketName = |
'mojo::TCPBoundSocket'; |
+mojom_types.MojomInterface _tcp_bound_socket_TCPBoundSocket__() { |
+ return new mojom_types.MojomInterface() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "TcpBoundSocket") |
+ ..interfaceName = "TcpBoundSocket" |
+ ..methods = <int, mojom_types.MojomMethod>{ |
+kTcpBoundSocket_startListening_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "StartListening") |
+ ..ordinal = kTcpBoundSocket_startListening_name |
+ ..responseParams = _tcp_bound_socket_TCPBoundSocket_StartListening_ResponseParams__()..parameters = _tcp_bound_socket_TCPBoundSocket_StartListening_Params__(),kTcpBoundSocket_connect_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Connect") |
+ ..ordinal = kTcpBoundSocket_connect_name |
+ ..responseParams = _tcp_bound_socket_TCPBoundSocket_Connect_ResponseParams__()..parameters = _tcp_bound_socket_TCPBoundSocket_Connect_Params__(), |
+ }; |
+} |
+ |
+class _TcpBoundSocketServiceDescription extends service_describer.ServiceDescription { |
+ // Avoid infinite loop by overriding serviceDescription field. |
+ final service_describer.ServiceDescription serviceDescription = null; |
+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 { |
dynamic startListening(Object server,[Function responseFactory = null]); |
dynamic connect(net_address_mojom.NetAddress remoteAddress,core.MojoDataPipeConsumer sendStream,core.MojoDataPipeProducer receiveStream,Object clientSocket,[Function responseFactory = null]); |
@@ -337,6 +454,9 @@ class TcpBoundSocketProxyImpl extends bindings.Proxy { |
String get name => TcpBoundSocketName; |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _TcpBoundSocketServiceDescription(); |
+ |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
case kTcpBoundSocket_startListening_name: |
@@ -582,6 +702,82 @@ class TcpBoundSocketStub extends bindings.Stub { |
} |
int get version => 0; |
+ |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _TcpBoundSocketServiceDescription(); |
+} |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+var _MojomDesc__ = _initDescriptions(); |
+ |
+Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
+ var map = new Map<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; |
+} |
+ |
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
+ return _MojomDesc__; |
} |