| OLD | NEW |
| 1 // WARNING: DO NOT EDIT. This file was generated by a program. | 1 // WARNING: DO NOT EDIT. This file was generated by a program. |
| 2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. | 2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. |
| 3 | 3 |
| 4 library application_connector_mojom; | 4 library application_connector_mojom; |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'package:mojo/bindings.dart' as bindings; | 6 import 'package:mojo/bindings.dart' as bindings; |
| 7 import 'package:mojo/core.dart' as core; | 7 import 'package:mojo/core.dart' as core; |
| 8 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 8 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
| 9 import 'package:mojo/mojo/service_provider.mojom.dart' as service_provider_mojom
; | 9 import 'package:mojo/mojo/service_provider.mojom.dart' as service_provider_mojom
; |
| 10 | 10 |
| 11 | 11 |
| 12 | 12 |
| 13 class _ApplicationConnectorConnectToApplicationParams extends bindings.Struct { | 13 class _ApplicationConnectorConnectToApplicationParams extends bindings.Struct { |
| 14 static const List<bindings.StructDataHeader> kVersions = const [ | 14 static const List<bindings.StructDataHeader> kVersions = const [ |
| 15 const bindings.StructDataHeader(24, 0) | 15 const bindings.StructDataHeader(24, 0) |
| 16 ]; | 16 ]; |
| 17 String applicationUrl = null; | 17 String applicationUrl = null; |
| 18 service_provider_mojom.ServiceProviderInterfaceRequest services = null; | 18 service_provider_mojom.ServiceProviderInterfaceRequest services = null; |
| 19 | 19 |
| 20 _ApplicationConnectorConnectToApplicationParams() : super(kVersions.last.size)
; | 20 _ApplicationConnectorConnectToApplicationParams() : super(kVersions.last.size)
; |
| 21 | 21 |
| 22 _ApplicationConnectorConnectToApplicationParams.init( |
| 23 String this.applicationUrl, |
| 24 service_provider_mojom.ServiceProviderInterfaceRequest this.services |
| 25 ) : super(kVersions.last.size); |
| 26 |
| 22 static _ApplicationConnectorConnectToApplicationParams deserialize(bindings.Me
ssage message) { | 27 static _ApplicationConnectorConnectToApplicationParams deserialize(bindings.Me
ssage message) { |
| 23 var decoder = new bindings.Decoder(message); | 28 var decoder = new bindings.Decoder(message); |
| 24 var result = decode(decoder); | 29 var result = decode(decoder); |
| 25 if (decoder.excessHandles != null) { | 30 if (decoder.excessHandles != null) { |
| 26 decoder.excessHandles.forEach((h) => h.close()); | 31 decoder.excessHandles.forEach((h) => h.close()); |
| 27 } | 32 } |
| 28 return result; | 33 return result; |
| 29 } | 34 } |
| 30 | 35 |
| 31 static _ApplicationConnectorConnectToApplicationParams decode(bindings.Decoder
decoder0) { | 36 static _ApplicationConnectorConnectToApplicationParams decode(bindings.Decoder
decoder0) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 100 |
| 96 | 101 |
| 97 class _ApplicationConnectorDuplicateParams extends bindings.Struct { | 102 class _ApplicationConnectorDuplicateParams extends bindings.Struct { |
| 98 static const List<bindings.StructDataHeader> kVersions = const [ | 103 static const List<bindings.StructDataHeader> kVersions = const [ |
| 99 const bindings.StructDataHeader(16, 0) | 104 const bindings.StructDataHeader(16, 0) |
| 100 ]; | 105 ]; |
| 101 ApplicationConnectorInterfaceRequest applicationConnectorRequest = null; | 106 ApplicationConnectorInterfaceRequest applicationConnectorRequest = null; |
| 102 | 107 |
| 103 _ApplicationConnectorDuplicateParams() : super(kVersions.last.size); | 108 _ApplicationConnectorDuplicateParams() : super(kVersions.last.size); |
| 104 | 109 |
| 110 _ApplicationConnectorDuplicateParams.init( |
| 111 ApplicationConnectorInterfaceRequest this.applicationConnectorRequest |
| 112 ) : super(kVersions.last.size); |
| 113 |
| 105 static _ApplicationConnectorDuplicateParams deserialize(bindings.Message messa
ge) { | 114 static _ApplicationConnectorDuplicateParams deserialize(bindings.Message messa
ge) { |
| 106 var decoder = new bindings.Decoder(message); | 115 var decoder = new bindings.Decoder(message); |
| 107 var result = decode(decoder); | 116 var result = decode(decoder); |
| 108 if (decoder.excessHandles != null) { | 117 if (decoder.excessHandles != null) { |
| 109 decoder.excessHandles.forEach((h) => h.close()); | 118 decoder.excessHandles.forEach((h) => h.close()); |
| 110 } | 119 } |
| 111 return result; | 120 return result; |
| 112 } | 121 } |
| 113 | 122 |
| 114 static _ApplicationConnectorDuplicateParams decode(bindings.Decoder decoder0)
{ | 123 static _ApplicationConnectorDuplicateParams decode(bindings.Decoder decoder0)
{ |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 Map toJson() { | 170 Map toJson() { |
| 162 throw new bindings.MojoCodecError( | 171 throw new bindings.MojoCodecError( |
| 163 'Object containing handles cannot be encoded to JSON.'); | 172 'Object containing handles cannot be encoded to JSON.'); |
| 164 } | 173 } |
| 165 } | 174 } |
| 166 | 175 |
| 167 const int _applicationConnectorMethodConnectToApplicationName = 0; | 176 const int _applicationConnectorMethodConnectToApplicationName = 0; |
| 168 const int _applicationConnectorMethodDuplicateName = 1; | 177 const int _applicationConnectorMethodDuplicateName = 1; |
| 169 | 178 |
| 170 class _ApplicationConnectorServiceDescription implements service_describer.Servi
ceDescription { | 179 class _ApplicationConnectorServiceDescription implements service_describer.Servi
ceDescription { |
| 171 dynamic getTopLevelInterface([Function responseFactory]) => | 180 void getTopLevelInterface(Function responder) { |
| 172 responseFactory(null); | 181 responder(null); |
| 182 } |
| 173 | 183 |
| 174 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 184 void getTypeDefinition(String typeKey, Function responder) { |
| 175 responseFactory(null); | 185 responder(null); |
| 186 } |
| 176 | 187 |
| 177 dynamic getAllTypeDefinitions([Function responseFactory]) => | 188 void getAllTypeDefinitions(Function responder) { |
| 178 responseFactory(null); | 189 responder(null); |
| 190 } |
| 179 } | 191 } |
| 180 | 192 |
| 181 abstract class ApplicationConnector { | 193 abstract class ApplicationConnector { |
| 182 static const String serviceName = null; | 194 static const String serviceName = null; |
| 183 | 195 |
| 184 static service_describer.ServiceDescription _cachedServiceDescription; | 196 static service_describer.ServiceDescription _cachedServiceDescription; |
| 185 static service_describer.ServiceDescription get serviceDescription { | 197 static service_describer.ServiceDescription get serviceDescription { |
| 186 if (_cachedServiceDescription == null) { | 198 if (_cachedServiceDescription == null) { |
| 187 _cachedServiceDescription = new _ApplicationConnectorServiceDescription(); | 199 _cachedServiceDescription = new _ApplicationConnectorServiceDescription(); |
| 188 } | 200 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 : super.fromHandle(handle, autoBegin: impl != null) { | 346 : super.fromHandle(handle, autoBegin: impl != null) { |
| 335 _impl = impl; | 347 _impl = impl; |
| 336 } | 348 } |
| 337 | 349 |
| 338 _ApplicationConnectorStubControl.unbound([this._impl]) : super.unbound(); | 350 _ApplicationConnectorStubControl.unbound([this._impl]) : super.unbound(); |
| 339 | 351 |
| 340 String get serviceName => ApplicationConnector.serviceName; | 352 String get serviceName => ApplicationConnector.serviceName; |
| 341 | 353 |
| 342 | 354 |
| 343 | 355 |
| 344 dynamic handleMessage(bindings.ServiceMessage message) { | 356 void handleMessage(bindings.ServiceMessage message) { |
| 345 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 357 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 346 return bindings.ControlMessageHandler.handleMessage(this, | 358 bindings.ControlMessageHandler.handleMessage( |
| 347 0, | 359 this, 0, message); |
| 348 message); | 360 return; |
| 349 } | 361 } |
| 350 if (_impl == null) { | 362 if (_impl == null) { |
| 351 throw new core.MojoApiError("$this has no implementation set"); | 363 throw new core.MojoApiError("$this has no implementation set"); |
| 352 } | 364 } |
| 353 switch (message.header.type) { | 365 switch (message.header.type) { |
| 354 case _applicationConnectorMethodConnectToApplicationName: | 366 case _applicationConnectorMethodConnectToApplicationName: |
| 355 var params = _ApplicationConnectorConnectToApplicationParams.deserialize
( | 367 var params = _ApplicationConnectorConnectToApplicationParams.deserialize
( |
| 356 message.payload); | 368 message.payload); |
| 357 _impl.connectToApplication(params.applicationUrl, params.services); | 369 _impl.connectToApplication(params.applicationUrl, params.services); |
| 358 break; | 370 break; |
| 359 case _applicationConnectorMethodDuplicateName: | 371 case _applicationConnectorMethodDuplicateName: |
| 360 var params = _ApplicationConnectorDuplicateParams.deserialize( | 372 var params = _ApplicationConnectorDuplicateParams.deserialize( |
| 361 message.payload); | 373 message.payload); |
| 362 _impl.duplicate(params.applicationConnectorRequest); | 374 _impl.duplicate(params.applicationConnectorRequest); |
| 363 break; | 375 break; |
| 364 default: | 376 default: |
| 365 throw new bindings.MojoCodecError("Unexpected message name"); | 377 throw new bindings.MojoCodecError("Unexpected message name"); |
| 366 break; | 378 break; |
| 367 } | 379 } |
| 368 return null; | |
| 369 } | 380 } |
| 370 | 381 |
| 371 ApplicationConnector get impl => _impl; | 382 ApplicationConnector get impl => _impl; |
| 372 set impl(ApplicationConnector d) { | 383 set impl(ApplicationConnector d) { |
| 373 if (d == null) { | 384 if (d == null) { |
| 374 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 385 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 375 } | 386 } |
| 376 if (isBound && (_impl == null)) { | 387 if (isBound && (_impl == null)) { |
| 377 beginHandlingEvents(); | 388 beginHandlingEvents(); |
| 378 } | 389 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 void connectToApplication(String applicationUrl, service_provider_mojom.Servic
eProviderInterfaceRequest services) { | 433 void connectToApplication(String applicationUrl, service_provider_mojom.Servic
eProviderInterfaceRequest services) { |
| 423 return impl.connectToApplication(applicationUrl, services); | 434 return impl.connectToApplication(applicationUrl, services); |
| 424 } | 435 } |
| 425 void duplicate(ApplicationConnectorInterfaceRequest applicationConnectorReques
t) { | 436 void duplicate(ApplicationConnectorInterfaceRequest applicationConnectorReques
t) { |
| 426 return impl.duplicate(applicationConnectorRequest); | 437 return impl.duplicate(applicationConnectorRequest); |
| 427 } | 438 } |
| 428 } | 439 } |
| 429 | 440 |
| 430 | 441 |
| 431 | 442 |
| OLD | NEW |