Index: mojo/dart/packages/mojo_services/lib/native_support/process.mojom.dart |
diff --git a/mojo/dart/packages/mojo_services/lib/native_support/process.mojom.dart b/mojo/dart/packages/mojo_services/lib/native_support/process.mojom.dart |
index c7f4c02acb13aae59a26a52b85eb26e9ffb1d633..a546647469e38098075a544ebb1bb0eccf1532e9 100644 |
--- a/mojo/dart/packages/mojo_services/lib/native_support/process.mojom.dart |
+++ b/mojo/dart/packages/mojo_services/lib/native_support/process.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_services/mojo/files/file.mojom.dart' as file_mojom; |
import 'package:mojo_services/mojo/files/types.mojom.dart' as types_mojom; |
@@ -162,6 +164,76 @@ class ProcessSpawnParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _process_Process_Spawn_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessSpawnParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Path') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Argv') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..nullable = true |
+ |
+ ..elementType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8))))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Envp') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..nullable = true |
+ |
+ ..elementType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8))))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'StdinFile') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_file_File__' |
+ ..typeKey = '_file_File__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'StdoutFile') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_file_File__' |
+ ..typeKey = '_file_File__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'StderrFile') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ ..nullable = true |
+ |
+ |
+ ..identifier = '_file_File__' |
+ ..typeKey = '_file_File__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessController') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..isInterfaceRequest = true |
+ ..identifier = '_process_ProcessController__' |
+ ..typeKey = '_process_ProcessController__' |
+ )), |
+ ]; |
+} |
+ |
class ProcessSpawnResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -233,6 +305,21 @@ class ProcessSpawnResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _process_Process_Spawn_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessSpawnResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Error') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_types_Error__' |
+ ..typeKey = '_types_Error__' |
+ )), |
+ ]; |
+} |
+ |
class ProcessSpawnWithTerminalParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -367,6 +454,52 @@ class ProcessSpawnWithTerminalParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _process_Process_SpawnWithTerminal_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessSpawnWithTerminalParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Path') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Argv') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..nullable = true |
+ |
+ ..elementType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8))))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Envp') |
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..nullable = true |
+ |
+ ..elementType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType() |
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8))))), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'TerminalFile') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_file_File__' |
+ ..typeKey = '_file_File__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessController') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..isInterfaceRequest = true |
+ ..identifier = '_process_ProcessController__' |
+ ..typeKey = '_process_ProcessController__' |
+ )), |
+ ]; |
+} |
+ |
class ProcessSpawnWithTerminalResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -438,6 +571,21 @@ class ProcessSpawnWithTerminalResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _process_Process_SpawnWithTerminal_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessSpawnWithTerminalResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Error') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_types_Error__' |
+ ..typeKey = '_types_Error__' |
+ )), |
+ ]; |
+} |
+ |
class ProcessControllerWaitParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -496,6 +644,12 @@ class ProcessControllerWaitParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _process_ProcessController_Wait_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessControllerWaitParams') |
+ ..fields = <mojom_types.StructField>[]; |
+} |
+ |
class ProcessControllerWaitResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -576,6 +730,25 @@ class ProcessControllerWaitResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _process_ProcessController_Wait_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessControllerWaitResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Error') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_types_Error__' |
+ ..typeKey = '_types_Error__' |
+ )), |
+ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ExitStatus') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.INT32), |
+ ]; |
+} |
+ |
class ProcessControllerKillParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -643,6 +816,16 @@ class ProcessControllerKillParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _process_ProcessController_Kill_Params__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessControllerKillParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Signal') |
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.INT32), |
+ ]; |
+} |
+ |
class ProcessControllerKillResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
@@ -714,12 +897,57 @@ class ProcessControllerKillResponseParams extends bindings.Struct { |
} |
} |
+mojom_types.MojomStruct _process_ProcessController_Kill_ResponseParams__() { |
+ return new mojom_types.MojomStruct() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessControllerKillResponseParams') |
+ ..fields = <mojom_types.StructField>[ |
+ new mojom_types.StructField() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Error') |
+ ..type = (new mojom_types.Type() |
+ ..typeReference = (new mojom_types.TypeReference() |
+ |
+ ..identifier = '_types_Error__' |
+ ..typeKey = '_types_Error__' |
+ )), |
+ ]; |
+} |
+ |
+ |
const int kProcess_spawn_name = 0; |
const int kProcess_spawnWithTerminal_name = 1; |
const String ProcessName = |
'native_support::Process'; |
+mojom_types.MojomInterface _process_Process__() { |
+ return new mojom_types.MojomInterface() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Process") |
+ ..interfaceName = "Process" |
+ ..methods = <int, mojom_types.MojomMethod>{ |
+kProcess_spawn_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Spawn") |
+ ..ordinal = kProcess_spawn_name |
+ ..responseParams = _process_Process_Spawn_ResponseParams__()..parameters = _process_Process_Spawn_Params__(),kProcess_spawnWithTerminal_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "SpawnWithTerminal") |
+ ..ordinal = kProcess_spawnWithTerminal_name |
+ ..responseParams = _process_Process_SpawnWithTerminal_ResponseParams__()..parameters = _process_Process_SpawnWithTerminal_Params__(), |
+ }; |
+} |
+ |
+class _ProcessServiceDescription extends service_describer.ServiceDescription { |
+ // Avoid infinite loop by overriding serviceDescription field. |
+ final service_describer.ServiceDescription serviceDescription = null; |
+dynamic getTopLevelInterface([Function responseFactory = null]) { |
+ return _process_Process__(); |
+ } |
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions()[typeKey]; |
+ } |
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions(); |
+ } |
+} |
+ |
abstract class Process { |
dynamic spawn(List<int> path,List<List<int>> argv,List<List<int>> envp,Object stdinFile,Object stdoutFile,Object stderrFile,Object processController,[Function responseFactory = null]); |
dynamic spawnWithTerminal(List<int> path,List<List<int>> argv,List<List<int>> envp,Object terminalFile,Object processController,[Function responseFactory = null]); |
@@ -744,6 +972,9 @@ class ProcessProxyImpl extends bindings.Proxy { |
String get name => ProcessName; |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _ProcessServiceDescription(); |
+ |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
case kProcess_spawn_name: |
@@ -996,6 +1227,9 @@ class ProcessStub extends bindings.Stub { |
} |
int get version => 0; |
+ |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _ProcessServiceDescription(); |
} |
const int kProcessController_wait_name = 0; |
@@ -1004,6 +1238,35 @@ const int kProcessController_kill_name = 1; |
const String ProcessControllerName = |
'native_support::ProcessController'; |
+mojom_types.MojomInterface _process_ProcessController__() { |
+ return new mojom_types.MojomInterface() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "ProcessController") |
+ ..interfaceName = "ProcessController" |
+ ..methods = <int, mojom_types.MojomMethod>{ |
+kProcessController_wait_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Wait") |
+ ..ordinal = kProcessController_wait_name |
+ ..responseParams = _process_ProcessController_Wait_ResponseParams__()..parameters = _process_ProcessController_Wait_Params__(),kProcessController_kill_name: new mojom_types.MojomMethod() |
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Kill") |
+ ..ordinal = kProcessController_kill_name |
+ ..responseParams = _process_ProcessController_Kill_ResponseParams__()..parameters = _process_ProcessController_Kill_Params__(), |
+ }; |
+} |
+ |
+class _ProcessControllerServiceDescription extends service_describer.ServiceDescription { |
+ // Avoid infinite loop by overriding serviceDescription field. |
+ final service_describer.ServiceDescription serviceDescription = null; |
+dynamic getTopLevelInterface([Function responseFactory = null]) { |
+ return _process_ProcessController__(); |
+ } |
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions()[typeKey]; |
+ } |
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
+ return getAllMojomTypeDefinitions(); |
+ } |
+} |
+ |
abstract class ProcessController { |
dynamic wait([Function responseFactory = null]); |
dynamic kill(int signal,[Function responseFactory = null]); |
@@ -1028,6 +1291,9 @@ class ProcessControllerProxyImpl extends bindings.Proxy { |
String get name => ProcessControllerName; |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _ProcessControllerServiceDescription(); |
+ |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
case kProcessController_wait_name: |
@@ -1270,6 +1536,123 @@ class ProcessControllerStub extends bindings.Stub { |
} |
int get version => 0; |
+ |
+ service_describer.ServiceDescription get serviceDescription => |
+ new _ProcessControllerServiceDescription(); |
+} |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+var _MojomDesc__ = _initDescriptions(); |
+ |
+Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
+ var map = new Map<String, mojom_types.UserDefinedType>(); |
+ |
+ map["_process_Process_Spawn_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _process_Process_Spawn_Params__(); |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ map["_process_Process_Spawn_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _process_Process_Spawn_ResponseParams__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_process_Process_SpawnWithTerminal_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _process_Process_SpawnWithTerminal_Params__(); |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ map["_process_Process_SpawnWithTerminal_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _process_Process_SpawnWithTerminal_ResponseParams__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_process_ProcessController_Wait_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _process_ProcessController_Wait_Params__(); |
+ |
+ |
+ |
+ map["_process_ProcessController_Wait_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _process_ProcessController_Wait_ResponseParams__(); |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ map["_process_ProcessController_Kill_Params__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _process_ProcessController_Kill_Params__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_process_ProcessController_Kill_ResponseParams__"] = |
+ new mojom_types.UserDefinedType() |
+ ..structType = _process_ProcessController_Kill_ResponseParams__(); |
+ |
+ |
+ |
+ |
+ |
+ map["_process_Process__"] = |
+ new mojom_types.UserDefinedType() |
+ ..interfaceType = _process_Process__(); |
+ |
+ |
+file_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) { |
+ map[s] = udt; |
+}); |
+types_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) { |
+ map[s] = udt; |
+}); |
+ return map; |
+} |
+ |
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
+ return _MojomDesc__; |
} |