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 asset_bundle_mojom; | 4 library asset_bundle_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 | 9 |
10 | 10 |
11 | 11 |
12 class _AssetBundleGetAsStreamParams extends bindings.Struct { | 12 class _AssetBundleGetAsStreamParams extends bindings.Struct { |
13 static const List<bindings.StructDataHeader> kVersions = const [ | 13 static const List<bindings.StructDataHeader> kVersions = const [ |
14 const bindings.StructDataHeader(16, 0) | 14 const bindings.StructDataHeader(16, 0) |
15 ]; | 15 ]; |
16 String assetName = null; | 16 String assetName = null; |
17 | 17 |
18 _AssetBundleGetAsStreamParams() : super(kVersions.last.size); | 18 _AssetBundleGetAsStreamParams() : super(kVersions.last.size); |
19 | 19 |
| 20 _AssetBundleGetAsStreamParams.init( |
| 21 String this.assetName |
| 22 ) : super(kVersions.last.size); |
| 23 |
20 static _AssetBundleGetAsStreamParams deserialize(bindings.Message message) { | 24 static _AssetBundleGetAsStreamParams deserialize(bindings.Message message) { |
21 var decoder = new bindings.Decoder(message); | 25 var decoder = new bindings.Decoder(message); |
22 var result = decode(decoder); | 26 var result = decode(decoder); |
23 if (decoder.excessHandles != null) { | 27 if (decoder.excessHandles != null) { |
24 decoder.excessHandles.forEach((h) => h.close()); | 28 decoder.excessHandles.forEach((h) => h.close()); |
25 } | 29 } |
26 return result; | 30 return result; |
27 } | 31 } |
28 | 32 |
29 static _AssetBundleGetAsStreamParams decode(bindings.Decoder decoder0) { | 33 static _AssetBundleGetAsStreamParams decode(bindings.Decoder decoder0) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 86 |
83 | 87 |
84 class AssetBundleGetAsStreamResponseParams extends bindings.Struct { | 88 class AssetBundleGetAsStreamResponseParams extends bindings.Struct { |
85 static const List<bindings.StructDataHeader> kVersions = const [ | 89 static const List<bindings.StructDataHeader> kVersions = const [ |
86 const bindings.StructDataHeader(16, 0) | 90 const bindings.StructDataHeader(16, 0) |
87 ]; | 91 ]; |
88 core.MojoDataPipeConsumer assetData = null; | 92 core.MojoDataPipeConsumer assetData = null; |
89 | 93 |
90 AssetBundleGetAsStreamResponseParams() : super(kVersions.last.size); | 94 AssetBundleGetAsStreamResponseParams() : super(kVersions.last.size); |
91 | 95 |
| 96 AssetBundleGetAsStreamResponseParams.init( |
| 97 core.MojoDataPipeConsumer this.assetData |
| 98 ) : super(kVersions.last.size); |
| 99 |
92 static AssetBundleGetAsStreamResponseParams deserialize(bindings.Message messa
ge) { | 100 static AssetBundleGetAsStreamResponseParams deserialize(bindings.Message messa
ge) { |
93 var decoder = new bindings.Decoder(message); | 101 var decoder = new bindings.Decoder(message); |
94 var result = decode(decoder); | 102 var result = decode(decoder); |
95 if (decoder.excessHandles != null) { | 103 if (decoder.excessHandles != null) { |
96 decoder.excessHandles.forEach((h) => h.close()); | 104 decoder.excessHandles.forEach((h) => h.close()); |
97 } | 105 } |
98 return result; | 106 return result; |
99 } | 107 } |
100 | 108 |
101 static AssetBundleGetAsStreamResponseParams decode(bindings.Decoder decoder0)
{ | 109 static AssetBundleGetAsStreamResponseParams decode(bindings.Decoder decoder0)
{ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 162 |
155 class _AssetUnpackerUnpackZipStreamParams extends bindings.Struct { | 163 class _AssetUnpackerUnpackZipStreamParams extends bindings.Struct { |
156 static const List<bindings.StructDataHeader> kVersions = const [ | 164 static const List<bindings.StructDataHeader> kVersions = const [ |
157 const bindings.StructDataHeader(16, 0) | 165 const bindings.StructDataHeader(16, 0) |
158 ]; | 166 ]; |
159 core.MojoDataPipeConsumer zippedAssets = null; | 167 core.MojoDataPipeConsumer zippedAssets = null; |
160 AssetBundleInterfaceRequest assetBundle = null; | 168 AssetBundleInterfaceRequest assetBundle = null; |
161 | 169 |
162 _AssetUnpackerUnpackZipStreamParams() : super(kVersions.last.size); | 170 _AssetUnpackerUnpackZipStreamParams() : super(kVersions.last.size); |
163 | 171 |
| 172 _AssetUnpackerUnpackZipStreamParams.init( |
| 173 core.MojoDataPipeConsumer this.zippedAssets, |
| 174 AssetBundleInterfaceRequest this.assetBundle |
| 175 ) : super(kVersions.last.size); |
| 176 |
164 static _AssetUnpackerUnpackZipStreamParams deserialize(bindings.Message messag
e) { | 177 static _AssetUnpackerUnpackZipStreamParams deserialize(bindings.Message messag
e) { |
165 var decoder = new bindings.Decoder(message); | 178 var decoder = new bindings.Decoder(message); |
166 var result = decode(decoder); | 179 var result = decode(decoder); |
167 if (decoder.excessHandles != null) { | 180 if (decoder.excessHandles != null) { |
168 decoder.excessHandles.forEach((h) => h.close()); | 181 decoder.excessHandles.forEach((h) => h.close()); |
169 } | 182 } |
170 return result; | 183 return result; |
171 } | 184 } |
172 | 185 |
173 static _AssetUnpackerUnpackZipStreamParams decode(bindings.Decoder decoder0) { | 186 static _AssetUnpackerUnpackZipStreamParams decode(bindings.Decoder decoder0) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 244 |
232 Map toJson() { | 245 Map toJson() { |
233 throw new bindings.MojoCodecError( | 246 throw new bindings.MojoCodecError( |
234 'Object containing handles cannot be encoded to JSON.'); | 247 'Object containing handles cannot be encoded to JSON.'); |
235 } | 248 } |
236 } | 249 } |
237 | 250 |
238 const int _assetBundleMethodGetAsStreamName = 0; | 251 const int _assetBundleMethodGetAsStreamName = 0; |
239 | 252 |
240 class _AssetBundleServiceDescription implements service_describer.ServiceDescrip
tion { | 253 class _AssetBundleServiceDescription implements service_describer.ServiceDescrip
tion { |
241 dynamic getTopLevelInterface([Function responseFactory]) => | 254 void getTopLevelInterface(Function responder) { |
242 responseFactory(null); | 255 responder(null); |
| 256 } |
243 | 257 |
244 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 258 void getTypeDefinition(String typeKey, Function responder) { |
245 responseFactory(null); | 259 responder(null); |
| 260 } |
246 | 261 |
247 dynamic getAllTypeDefinitions([Function responseFactory]) => | 262 void getAllTypeDefinitions(Function responder) { |
248 responseFactory(null); | 263 responder(null); |
| 264 } |
249 } | 265 } |
250 | 266 |
251 abstract class AssetBundle { | 267 abstract class AssetBundle { |
252 static const String serviceName = "mojo::asset_bundle::AssetBundle"; | 268 static const String serviceName = "mojo::asset_bundle::AssetBundle"; |
253 | 269 |
254 static service_describer.ServiceDescription _cachedServiceDescription; | 270 static service_describer.ServiceDescription _cachedServiceDescription; |
255 static service_describer.ServiceDescription get serviceDescription { | 271 static service_describer.ServiceDescription get serviceDescription { |
256 if (_cachedServiceDescription == null) { | 272 if (_cachedServiceDescription == null) { |
257 _cachedServiceDescription = new _AssetBundleServiceDescription(); | 273 _cachedServiceDescription = new _AssetBundleServiceDescription(); |
258 } | 274 } |
259 return _cachedServiceDescription; | 275 return _cachedServiceDescription; |
260 } | 276 } |
261 | 277 |
262 static AssetBundleProxy connectToService( | 278 static AssetBundleProxy connectToService( |
263 bindings.ServiceConnector s, String url, [String serviceName]) { | 279 bindings.ServiceConnector s, String url, [String serviceName]) { |
264 AssetBundleProxy p = new AssetBundleProxy.unbound(); | 280 AssetBundleProxy p = new AssetBundleProxy.unbound(); |
265 String name = serviceName ?? AssetBundle.serviceName; | 281 String name = serviceName ?? AssetBundle.serviceName; |
266 if ((name == null) || name.isEmpty) { | 282 if ((name == null) || name.isEmpty) { |
267 throw new core.MojoApiError( | 283 throw new core.MojoApiError( |
268 "If an interface has no ServiceName, then one must be provided."); | 284 "If an interface has no ServiceName, then one must be provided."); |
269 } | 285 } |
270 s.connectToService(url, p, name); | 286 s.connectToService(url, p, name); |
271 return p; | 287 return p; |
272 } | 288 } |
273 dynamic getAsStream(String assetName,[Function responseFactory = null]); | 289 void getAsStream(String assetName,void callback(core.MojoDataPipeConsumer asse
tData)); |
274 } | 290 } |
275 | 291 |
276 abstract class AssetBundleInterface | 292 abstract class AssetBundleInterface |
277 implements bindings.MojoInterface<AssetBundle>, | 293 implements bindings.MojoInterface<AssetBundle>, |
278 AssetBundle { | 294 AssetBundle { |
279 factory AssetBundleInterface([AssetBundle impl]) => | 295 factory AssetBundleInterface([AssetBundle impl]) => |
280 new AssetBundleStub.unbound(impl); | 296 new AssetBundleStub.unbound(impl); |
281 | 297 |
282 factory AssetBundleInterface.fromEndpoint( | 298 factory AssetBundleInterface.fromEndpoint( |
283 core.MojoMessagePipeEndpoint endpoint, | 299 core.MojoMessagePipeEndpoint endpoint, |
(...skipping 29 matching lines...) Expand all Loading... |
313 | 329 |
314 void handleResponse(bindings.ServiceMessage message) { | 330 void handleResponse(bindings.ServiceMessage message) { |
315 switch (message.header.type) { | 331 switch (message.header.type) { |
316 case _assetBundleMethodGetAsStreamName: | 332 case _assetBundleMethodGetAsStreamName: |
317 var r = AssetBundleGetAsStreamResponseParams.deserialize( | 333 var r = AssetBundleGetAsStreamResponseParams.deserialize( |
318 message.payload); | 334 message.payload); |
319 if (!message.header.hasRequestId) { | 335 if (!message.header.hasRequestId) { |
320 proxyError("Expected a message with a valid request Id."); | 336 proxyError("Expected a message with a valid request Id."); |
321 return; | 337 return; |
322 } | 338 } |
323 Completer c = completerMap[message.header.requestId]; | 339 Function callback = callbackMap[message.header.requestId]; |
324 if (c == null) { | 340 if (callback == null) { |
325 proxyError( | 341 proxyError( |
326 "Message had unknown request Id: ${message.header.requestId}"); | 342 "Message had unknown request Id: ${message.header.requestId}"); |
327 return; | 343 return; |
328 } | 344 } |
329 completerMap.remove(message.header.requestId); | 345 callbackMap.remove(message.header.requestId); |
330 if (c.isCompleted) { | 346 callback(r.assetData ); |
331 proxyError("Response completer already completed"); | |
332 return; | |
333 } | |
334 c.complete(r); | |
335 break; | 347 break; |
336 default: | 348 default: |
337 proxyError("Unexpected message type: ${message.header.type}"); | 349 proxyError("Unexpected message type: ${message.header.type}"); |
338 close(immediate: true); | 350 close(immediate: true); |
339 break; | 351 break; |
340 } | 352 } |
341 } | 353 } |
342 | 354 |
343 @override | 355 @override |
344 String toString() { | 356 String toString() { |
(...skipping 24 matching lines...) Expand all Loading... |
369 return newMockedProxy; | 381 return newMockedProxy; |
370 } | 382 } |
371 | 383 |
372 static AssetBundleProxy newFromEndpoint( | 384 static AssetBundleProxy newFromEndpoint( |
373 core.MojoMessagePipeEndpoint endpoint) { | 385 core.MojoMessagePipeEndpoint endpoint) { |
374 assert(endpoint.setDescription("For AssetBundleProxy")); | 386 assert(endpoint.setDescription("For AssetBundleProxy")); |
375 return new AssetBundleProxy.fromEndpoint(endpoint); | 387 return new AssetBundleProxy.fromEndpoint(endpoint); |
376 } | 388 } |
377 | 389 |
378 | 390 |
379 dynamic getAsStream(String assetName,[Function responseFactory = null]) { | 391 void getAsStream(String assetName,void callback(core.MojoDataPipeConsumer asse
tData)) { |
380 if (impl != null) { | 392 if (impl != null) { |
381 return new Future(() => impl.getAsStream(assetName,_AssetBundleStubControl
._assetBundleGetAsStreamResponseParamsFactory)); | 393 impl.getAsStream(assetName,callback); |
| 394 return; |
382 } | 395 } |
383 var params = new _AssetBundleGetAsStreamParams(); | 396 var params = new _AssetBundleGetAsStreamParams(); |
384 params.assetName = assetName; | 397 params.assetName = assetName; |
385 return ctrl.sendMessageWithRequestId( | 398 ctrl.sendMessageWithRequestId( |
386 params, | 399 params, |
387 _assetBundleMethodGetAsStreamName, | 400 _assetBundleMethodGetAsStreamName, |
388 -1, | 401 -1, |
389 bindings.MessageHeader.kMessageExpectsResponse); | 402 bindings.MessageHeader.kMessageExpectsResponse, |
| 403 callback); |
390 } | 404 } |
391 } | 405 } |
392 | 406 |
393 class _AssetBundleStubControl | 407 class _AssetBundleStubControl |
394 extends bindings.StubMessageHandler | 408 extends bindings.StubMessageHandler |
395 implements bindings.StubControl<AssetBundle> { | 409 implements bindings.StubControl<AssetBundle> { |
396 AssetBundle _impl; | 410 AssetBundle _impl; |
397 | 411 |
398 _AssetBundleStubControl.fromEndpoint( | 412 _AssetBundleStubControl.fromEndpoint( |
399 core.MojoMessagePipeEndpoint endpoint, [AssetBundle impl]) | 413 core.MojoMessagePipeEndpoint endpoint, [AssetBundle impl]) |
400 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 414 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
401 _impl = impl; | 415 _impl = impl; |
402 } | 416 } |
403 | 417 |
404 _AssetBundleStubControl.fromHandle( | 418 _AssetBundleStubControl.fromHandle( |
405 core.MojoHandle handle, [AssetBundle impl]) | 419 core.MojoHandle handle, [AssetBundle impl]) |
406 : super.fromHandle(handle, autoBegin: impl != null) { | 420 : super.fromHandle(handle, autoBegin: impl != null) { |
407 _impl = impl; | 421 _impl = impl; |
408 } | 422 } |
409 | 423 |
410 _AssetBundleStubControl.unbound([this._impl]) : super.unbound(); | 424 _AssetBundleStubControl.unbound([this._impl]) : super.unbound(); |
411 | 425 |
412 String get serviceName => AssetBundle.serviceName; | 426 String get serviceName => AssetBundle.serviceName; |
413 | 427 |
414 | 428 |
415 static AssetBundleGetAsStreamResponseParams _assetBundleGetAsStreamResponsePar
amsFactory(core.MojoDataPipeConsumer assetData) { | 429 Function _assetBundleGetAsStreamResponseParamsResponder( |
416 var result = new AssetBundleGetAsStreamResponseParams(); | 430 int requestId) { |
417 result.assetData = assetData; | 431 return (core.MojoDataPipeConsumer assetData) { |
418 return result; | 432 var result = new AssetBundleGetAsStreamResponseParams(); |
| 433 result.assetData = assetData; |
| 434 sendResponse(buildResponseWithId( |
| 435 result, |
| 436 _assetBundleMethodGetAsStreamName, |
| 437 requestId, |
| 438 bindings.MessageHeader.kMessageIsResponse)); |
| 439 }; |
419 } | 440 } |
420 | 441 |
421 dynamic handleMessage(bindings.ServiceMessage message) { | 442 void handleMessage(bindings.ServiceMessage message) { |
422 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 443 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
423 return bindings.ControlMessageHandler.handleMessage(this, | 444 bindings.ControlMessageHandler.handleMessage( |
424 0, | 445 this, 0, message); |
425 message); | 446 return; |
426 } | 447 } |
427 if (_impl == null) { | 448 if (_impl == null) { |
428 throw new core.MojoApiError("$this has no implementation set"); | 449 throw new core.MojoApiError("$this has no implementation set"); |
429 } | 450 } |
430 switch (message.header.type) { | 451 switch (message.header.type) { |
431 case _assetBundleMethodGetAsStreamName: | 452 case _assetBundleMethodGetAsStreamName: |
432 var params = _AssetBundleGetAsStreamParams.deserialize( | 453 var params = _AssetBundleGetAsStreamParams.deserialize( |
433 message.payload); | 454 message.payload); |
434 var response = _impl.getAsStream(params.assetName,_assetBundleGetAsStrea
mResponseParamsFactory); | 455 _impl.getAsStream(params.assetName, _assetBundleGetAsStreamResponseParam
sResponder(message.header.requestId)); |
435 if (response is Future) { | |
436 return response.then((response) { | |
437 if (response != null) { | |
438 return buildResponseWithId( | |
439 response, | |
440 _assetBundleMethodGetAsStreamName, | |
441 message.header.requestId, | |
442 bindings.MessageHeader.kMessageIsResponse); | |
443 } | |
444 }); | |
445 } else if (response != null) { | |
446 return buildResponseWithId( | |
447 response, | |
448 _assetBundleMethodGetAsStreamName, | |
449 message.header.requestId, | |
450 bindings.MessageHeader.kMessageIsResponse); | |
451 } | |
452 break; | 456 break; |
453 default: | 457 default: |
454 throw new bindings.MojoCodecError("Unexpected message name"); | 458 throw new bindings.MojoCodecError("Unexpected message name"); |
455 break; | 459 break; |
456 } | 460 } |
457 return null; | |
458 } | 461 } |
459 | 462 |
460 AssetBundle get impl => _impl; | 463 AssetBundle get impl => _impl; |
461 set impl(AssetBundle d) { | 464 set impl(AssetBundle d) { |
462 if (d == null) { | 465 if (d == null) { |
463 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 466 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
464 } | 467 } |
465 if (isBound && (_impl == null)) { | 468 if (isBound && (_impl == null)) { |
466 beginHandlingEvents(); | 469 beginHandlingEvents(); |
467 } | 470 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 core.MojoHandle handle, [AssetBundle impl]) | 504 core.MojoHandle handle, [AssetBundle impl]) |
502 : super(new _AssetBundleStubControl.fromHandle(handle, impl)); | 505 : super(new _AssetBundleStubControl.fromHandle(handle, impl)); |
503 | 506 |
504 static AssetBundleStub newFromEndpoint( | 507 static AssetBundleStub newFromEndpoint( |
505 core.MojoMessagePipeEndpoint endpoint) { | 508 core.MojoMessagePipeEndpoint endpoint) { |
506 assert(endpoint.setDescription("For AssetBundleStub")); | 509 assert(endpoint.setDescription("For AssetBundleStub")); |
507 return new AssetBundleStub.fromEndpoint(endpoint); | 510 return new AssetBundleStub.fromEndpoint(endpoint); |
508 } | 511 } |
509 | 512 |
510 | 513 |
511 dynamic getAsStream(String assetName,[Function responseFactory = null]) { | 514 void getAsStream(String assetName,void callback(core.MojoDataPipeConsumer asse
tData)) { |
512 return impl.getAsStream(assetName,responseFactory); | 515 return impl.getAsStream(assetName,callback); |
513 } | 516 } |
514 } | 517 } |
515 | 518 |
516 const int _assetUnpackerMethodUnpackZipStreamName = 0; | 519 const int _assetUnpackerMethodUnpackZipStreamName = 0; |
517 | 520 |
518 class _AssetUnpackerServiceDescription implements service_describer.ServiceDescr
iption { | 521 class _AssetUnpackerServiceDescription implements service_describer.ServiceDescr
iption { |
519 dynamic getTopLevelInterface([Function responseFactory]) => | 522 void getTopLevelInterface(Function responder) { |
520 responseFactory(null); | 523 responder(null); |
| 524 } |
521 | 525 |
522 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 526 void getTypeDefinition(String typeKey, Function responder) { |
523 responseFactory(null); | 527 responder(null); |
| 528 } |
524 | 529 |
525 dynamic getAllTypeDefinitions([Function responseFactory]) => | 530 void getAllTypeDefinitions(Function responder) { |
526 responseFactory(null); | 531 responder(null); |
| 532 } |
527 } | 533 } |
528 | 534 |
529 abstract class AssetUnpacker { | 535 abstract class AssetUnpacker { |
530 static const String serviceName = "mojo::asset_bundle::AssetUnpacker"; | 536 static const String serviceName = "mojo::asset_bundle::AssetUnpacker"; |
531 | 537 |
532 static service_describer.ServiceDescription _cachedServiceDescription; | 538 static service_describer.ServiceDescription _cachedServiceDescription; |
533 static service_describer.ServiceDescription get serviceDescription { | 539 static service_describer.ServiceDescription get serviceDescription { |
534 if (_cachedServiceDescription == null) { | 540 if (_cachedServiceDescription == null) { |
535 _cachedServiceDescription = new _AssetUnpackerServiceDescription(); | 541 _cachedServiceDescription = new _AssetUnpackerServiceDescription(); |
536 } | 542 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 : super.fromHandle(handle, autoBegin: impl != null) { | 673 : super.fromHandle(handle, autoBegin: impl != null) { |
668 _impl = impl; | 674 _impl = impl; |
669 } | 675 } |
670 | 676 |
671 _AssetUnpackerStubControl.unbound([this._impl]) : super.unbound(); | 677 _AssetUnpackerStubControl.unbound([this._impl]) : super.unbound(); |
672 | 678 |
673 String get serviceName => AssetUnpacker.serviceName; | 679 String get serviceName => AssetUnpacker.serviceName; |
674 | 680 |
675 | 681 |
676 | 682 |
677 dynamic handleMessage(bindings.ServiceMessage message) { | 683 void handleMessage(bindings.ServiceMessage message) { |
678 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 684 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
679 return bindings.ControlMessageHandler.handleMessage(this, | 685 bindings.ControlMessageHandler.handleMessage( |
680 0, | 686 this, 0, message); |
681 message); | 687 return; |
682 } | 688 } |
683 if (_impl == null) { | 689 if (_impl == null) { |
684 throw new core.MojoApiError("$this has no implementation set"); | 690 throw new core.MojoApiError("$this has no implementation set"); |
685 } | 691 } |
686 switch (message.header.type) { | 692 switch (message.header.type) { |
687 case _assetUnpackerMethodUnpackZipStreamName: | 693 case _assetUnpackerMethodUnpackZipStreamName: |
688 var params = _AssetUnpackerUnpackZipStreamParams.deserialize( | 694 var params = _AssetUnpackerUnpackZipStreamParams.deserialize( |
689 message.payload); | 695 message.payload); |
690 _impl.unpackZipStream(params.zippedAssets, params.assetBundle); | 696 _impl.unpackZipStream(params.zippedAssets, params.assetBundle); |
691 break; | 697 break; |
692 default: | 698 default: |
693 throw new bindings.MojoCodecError("Unexpected message name"); | 699 throw new bindings.MojoCodecError("Unexpected message name"); |
694 break; | 700 break; |
695 } | 701 } |
696 return null; | |
697 } | 702 } |
698 | 703 |
699 AssetUnpacker get impl => _impl; | 704 AssetUnpacker get impl => _impl; |
700 set impl(AssetUnpacker d) { | 705 set impl(AssetUnpacker d) { |
701 if (d == null) { | 706 if (d == null) { |
702 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 707 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
703 } | 708 } |
704 if (isBound && (_impl == null)) { | 709 if (isBound && (_impl == null)) { |
705 beginHandlingEvents(); | 710 beginHandlingEvents(); |
706 } | 711 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 } | 752 } |
748 | 753 |
749 | 754 |
750 void unpackZipStream(core.MojoDataPipeConsumer zippedAssets, AssetBundleInterf
aceRequest assetBundle) { | 755 void unpackZipStream(core.MojoDataPipeConsumer zippedAssets, AssetBundleInterf
aceRequest assetBundle) { |
751 return impl.unpackZipStream(zippedAssets, assetBundle); | 756 return impl.unpackZipStream(zippedAssets, assetBundle); |
752 } | 757 } |
753 } | 758 } |
754 | 759 |
755 | 760 |
756 | 761 |
OLD | NEW |