| 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 notifications_mojom; | 4 library notifications_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 NotificationData extends bindings.Struct { | 12 class NotificationData extends bindings.Struct { |
| 13 static const List<bindings.StructDataHeader> kVersions = const [ | 13 static const List<bindings.StructDataHeader> kVersions = const [ |
| 14 const bindings.StructDataHeader(32, 0) | 14 const bindings.StructDataHeader(32, 0) |
| 15 ]; | 15 ]; |
| 16 String title = null; | 16 String title = null; |
| 17 String text = null; | 17 String text = null; |
| 18 bool playSound = false; | 18 bool playSound = false; |
| 19 bool vibrate = false; | 19 bool vibrate = false; |
| 20 bool setLights = false; | 20 bool setLights = false; |
| 21 | 21 |
| 22 NotificationData() : super(kVersions.last.size); | 22 NotificationData() : super(kVersions.last.size); |
| 23 | 23 |
| 24 NotificationData.init( |
| 25 String this.title, |
| 26 String this.text, |
| 27 bool this.playSound, |
| 28 bool this.vibrate, |
| 29 bool this.setLights |
| 30 ) : super(kVersions.last.size); |
| 31 |
| 24 static NotificationData deserialize(bindings.Message message) { | 32 static NotificationData deserialize(bindings.Message message) { |
| 25 var decoder = new bindings.Decoder(message); | 33 var decoder = new bindings.Decoder(message); |
| 26 var result = decode(decoder); | 34 var result = decode(decoder); |
| 27 if (decoder.excessHandles != null) { | 35 if (decoder.excessHandles != null) { |
| 28 decoder.excessHandles.forEach((h) => h.close()); | 36 decoder.excessHandles.forEach((h) => h.close()); |
| 29 } | 37 } |
| 30 return result; | 38 return result; |
| 31 } | 39 } |
| 32 | 40 |
| 33 static NotificationData decode(bindings.Decoder decoder0) { | 41 static NotificationData decode(bindings.Decoder decoder0) { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 145 } |
| 138 | 146 |
| 139 | 147 |
| 140 class _NotificationClientOnSelectedParams extends bindings.Struct { | 148 class _NotificationClientOnSelectedParams extends bindings.Struct { |
| 141 static const List<bindings.StructDataHeader> kVersions = const [ | 149 static const List<bindings.StructDataHeader> kVersions = const [ |
| 142 const bindings.StructDataHeader(8, 0) | 150 const bindings.StructDataHeader(8, 0) |
| 143 ]; | 151 ]; |
| 144 | 152 |
| 145 _NotificationClientOnSelectedParams() : super(kVersions.last.size); | 153 _NotificationClientOnSelectedParams() : super(kVersions.last.size); |
| 146 | 154 |
| 155 _NotificationClientOnSelectedParams.init( |
| 156 ) : super(kVersions.last.size); |
| 157 |
| 147 static _NotificationClientOnSelectedParams deserialize(bindings.Message messag
e) { | 158 static _NotificationClientOnSelectedParams deserialize(bindings.Message messag
e) { |
| 148 var decoder = new bindings.Decoder(message); | 159 var decoder = new bindings.Decoder(message); |
| 149 var result = decode(decoder); | 160 var result = decode(decoder); |
| 150 if (decoder.excessHandles != null) { | 161 if (decoder.excessHandles != null) { |
| 151 decoder.excessHandles.forEach((h) => h.close()); | 162 decoder.excessHandles.forEach((h) => h.close()); |
| 152 } | 163 } |
| 153 return result; | 164 return result; |
| 154 } | 165 } |
| 155 | 166 |
| 156 static _NotificationClientOnSelectedParams decode(bindings.Decoder decoder0) { | 167 static _NotificationClientOnSelectedParams decode(bindings.Decoder decoder0) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 206 } |
| 196 | 207 |
| 197 | 208 |
| 198 class _NotificationClientOnDismissedParams extends bindings.Struct { | 209 class _NotificationClientOnDismissedParams extends bindings.Struct { |
| 199 static const List<bindings.StructDataHeader> kVersions = const [ | 210 static const List<bindings.StructDataHeader> kVersions = const [ |
| 200 const bindings.StructDataHeader(8, 0) | 211 const bindings.StructDataHeader(8, 0) |
| 201 ]; | 212 ]; |
| 202 | 213 |
| 203 _NotificationClientOnDismissedParams() : super(kVersions.last.size); | 214 _NotificationClientOnDismissedParams() : super(kVersions.last.size); |
| 204 | 215 |
| 216 _NotificationClientOnDismissedParams.init( |
| 217 ) : super(kVersions.last.size); |
| 218 |
| 205 static _NotificationClientOnDismissedParams deserialize(bindings.Message messa
ge) { | 219 static _NotificationClientOnDismissedParams deserialize(bindings.Message messa
ge) { |
| 206 var decoder = new bindings.Decoder(message); | 220 var decoder = new bindings.Decoder(message); |
| 207 var result = decode(decoder); | 221 var result = decode(decoder); |
| 208 if (decoder.excessHandles != null) { | 222 if (decoder.excessHandles != null) { |
| 209 decoder.excessHandles.forEach((h) => h.close()); | 223 decoder.excessHandles.forEach((h) => h.close()); |
| 210 } | 224 } |
| 211 return result; | 225 return result; |
| 212 } | 226 } |
| 213 | 227 |
| 214 static _NotificationClientOnDismissedParams decode(bindings.Decoder decoder0)
{ | 228 static _NotificationClientOnDismissedParams decode(bindings.Decoder decoder0)
{ |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 268 |
| 255 | 269 |
| 256 class _NotificationUpdateParams extends bindings.Struct { | 270 class _NotificationUpdateParams extends bindings.Struct { |
| 257 static const List<bindings.StructDataHeader> kVersions = const [ | 271 static const List<bindings.StructDataHeader> kVersions = const [ |
| 258 const bindings.StructDataHeader(16, 0) | 272 const bindings.StructDataHeader(16, 0) |
| 259 ]; | 273 ]; |
| 260 NotificationData notificationData = null; | 274 NotificationData notificationData = null; |
| 261 | 275 |
| 262 _NotificationUpdateParams() : super(kVersions.last.size); | 276 _NotificationUpdateParams() : super(kVersions.last.size); |
| 263 | 277 |
| 278 _NotificationUpdateParams.init( |
| 279 NotificationData this.notificationData |
| 280 ) : super(kVersions.last.size); |
| 281 |
| 264 static _NotificationUpdateParams deserialize(bindings.Message message) { | 282 static _NotificationUpdateParams deserialize(bindings.Message message) { |
| 265 var decoder = new bindings.Decoder(message); | 283 var decoder = new bindings.Decoder(message); |
| 266 var result = decode(decoder); | 284 var result = decode(decoder); |
| 267 if (decoder.excessHandles != null) { | 285 if (decoder.excessHandles != null) { |
| 268 decoder.excessHandles.forEach((h) => h.close()); | 286 decoder.excessHandles.forEach((h) => h.close()); |
| 269 } | 287 } |
| 270 return result; | 288 return result; |
| 271 } | 289 } |
| 272 | 290 |
| 273 static _NotificationUpdateParams decode(bindings.Decoder decoder0) { | 291 static _NotificationUpdateParams decode(bindings.Decoder decoder0) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 344 } |
| 327 | 345 |
| 328 | 346 |
| 329 class _NotificationCancelParams extends bindings.Struct { | 347 class _NotificationCancelParams extends bindings.Struct { |
| 330 static const List<bindings.StructDataHeader> kVersions = const [ | 348 static const List<bindings.StructDataHeader> kVersions = const [ |
| 331 const bindings.StructDataHeader(8, 0) | 349 const bindings.StructDataHeader(8, 0) |
| 332 ]; | 350 ]; |
| 333 | 351 |
| 334 _NotificationCancelParams() : super(kVersions.last.size); | 352 _NotificationCancelParams() : super(kVersions.last.size); |
| 335 | 353 |
| 354 _NotificationCancelParams.init( |
| 355 ) : super(kVersions.last.size); |
| 356 |
| 336 static _NotificationCancelParams deserialize(bindings.Message message) { | 357 static _NotificationCancelParams deserialize(bindings.Message message) { |
| 337 var decoder = new bindings.Decoder(message); | 358 var decoder = new bindings.Decoder(message); |
| 338 var result = decode(decoder); | 359 var result = decode(decoder); |
| 339 if (decoder.excessHandles != null) { | 360 if (decoder.excessHandles != null) { |
| 340 decoder.excessHandles.forEach((h) => h.close()); | 361 decoder.excessHandles.forEach((h) => h.close()); |
| 341 } | 362 } |
| 342 return result; | 363 return result; |
| 343 } | 364 } |
| 344 | 365 |
| 345 static _NotificationCancelParams decode(bindings.Decoder decoder0) { | 366 static _NotificationCancelParams decode(bindings.Decoder decoder0) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 class _NotificationServicePostParams extends bindings.Struct { | 408 class _NotificationServicePostParams extends bindings.Struct { |
| 388 static const List<bindings.StructDataHeader> kVersions = const [ | 409 static const List<bindings.StructDataHeader> kVersions = const [ |
| 389 const bindings.StructDataHeader(32, 0) | 410 const bindings.StructDataHeader(32, 0) |
| 390 ]; | 411 ]; |
| 391 NotificationData notificationData = null; | 412 NotificationData notificationData = null; |
| 392 NotificationClientInterface client = null; | 413 NotificationClientInterface client = null; |
| 393 NotificationInterfaceRequest notification = null; | 414 NotificationInterfaceRequest notification = null; |
| 394 | 415 |
| 395 _NotificationServicePostParams() : super(kVersions.last.size); | 416 _NotificationServicePostParams() : super(kVersions.last.size); |
| 396 | 417 |
| 418 _NotificationServicePostParams.init( |
| 419 NotificationData this.notificationData, |
| 420 NotificationClientInterface this.client, |
| 421 NotificationInterfaceRequest this.notification |
| 422 ) : super(kVersions.last.size); |
| 423 |
| 397 static _NotificationServicePostParams deserialize(bindings.Message message) { | 424 static _NotificationServicePostParams deserialize(bindings.Message message) { |
| 398 var decoder = new bindings.Decoder(message); | 425 var decoder = new bindings.Decoder(message); |
| 399 var result = decode(decoder); | 426 var result = decode(decoder); |
| 400 if (decoder.excessHandles != null) { | 427 if (decoder.excessHandles != null) { |
| 401 decoder.excessHandles.forEach((h) => h.close()); | 428 decoder.excessHandles.forEach((h) => h.close()); |
| 402 } | 429 } |
| 403 return result; | 430 return result; |
| 404 } | 431 } |
| 405 | 432 |
| 406 static _NotificationServicePostParams decode(bindings.Decoder decoder0) { | 433 static _NotificationServicePostParams decode(bindings.Decoder decoder0) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 Map toJson() { | 505 Map toJson() { |
| 479 throw new bindings.MojoCodecError( | 506 throw new bindings.MojoCodecError( |
| 480 'Object containing handles cannot be encoded to JSON.'); | 507 'Object containing handles cannot be encoded to JSON.'); |
| 481 } | 508 } |
| 482 } | 509 } |
| 483 | 510 |
| 484 const int _notificationClientMethodOnSelectedName = 0; | 511 const int _notificationClientMethodOnSelectedName = 0; |
| 485 const int _notificationClientMethodOnDismissedName = 1; | 512 const int _notificationClientMethodOnDismissedName = 1; |
| 486 | 513 |
| 487 class _NotificationClientServiceDescription implements service_describer.Service
Description { | 514 class _NotificationClientServiceDescription implements service_describer.Service
Description { |
| 488 dynamic getTopLevelInterface([Function responseFactory]) => | 515 void getTopLevelInterface(Function responder) { |
| 489 responseFactory(null); | 516 responder(null); |
| 517 } |
| 490 | 518 |
| 491 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 519 void getTypeDefinition(String typeKey, Function responder) { |
| 492 responseFactory(null); | 520 responder(null); |
| 521 } |
| 493 | 522 |
| 494 dynamic getAllTypeDefinitions([Function responseFactory]) => | 523 void getAllTypeDefinitions(Function responder) { |
| 495 responseFactory(null); | 524 responder(null); |
| 525 } |
| 496 } | 526 } |
| 497 | 527 |
| 498 abstract class NotificationClient { | 528 abstract class NotificationClient { |
| 499 static const String serviceName = null; | 529 static const String serviceName = null; |
| 500 | 530 |
| 501 static service_describer.ServiceDescription _cachedServiceDescription; | 531 static service_describer.ServiceDescription _cachedServiceDescription; |
| 502 static service_describer.ServiceDescription get serviceDescription { | 532 static service_describer.ServiceDescription get serviceDescription { |
| 503 if (_cachedServiceDescription == null) { | 533 if (_cachedServiceDescription == null) { |
| 504 _cachedServiceDescription = new _NotificationClientServiceDescription(); | 534 _cachedServiceDescription = new _NotificationClientServiceDescription(); |
| 505 } | 535 } |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 : super.fromHandle(handle, autoBegin: impl != null) { | 678 : super.fromHandle(handle, autoBegin: impl != null) { |
| 649 _impl = impl; | 679 _impl = impl; |
| 650 } | 680 } |
| 651 | 681 |
| 652 _NotificationClientStubControl.unbound([this._impl]) : super.unbound(); | 682 _NotificationClientStubControl.unbound([this._impl]) : super.unbound(); |
| 653 | 683 |
| 654 String get serviceName => NotificationClient.serviceName; | 684 String get serviceName => NotificationClient.serviceName; |
| 655 | 685 |
| 656 | 686 |
| 657 | 687 |
| 658 dynamic handleMessage(bindings.ServiceMessage message) { | 688 void handleMessage(bindings.ServiceMessage message) { |
| 659 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 689 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 660 return bindings.ControlMessageHandler.handleMessage(this, | 690 bindings.ControlMessageHandler.handleMessage( |
| 661 0, | 691 this, 0, message); |
| 662 message); | 692 return; |
| 663 } | 693 } |
| 664 if (_impl == null) { | 694 if (_impl == null) { |
| 665 throw new core.MojoApiError("$this has no implementation set"); | 695 throw new core.MojoApiError("$this has no implementation set"); |
| 666 } | 696 } |
| 667 switch (message.header.type) { | 697 switch (message.header.type) { |
| 668 case _notificationClientMethodOnSelectedName: | 698 case _notificationClientMethodOnSelectedName: |
| 669 _impl.onSelected(); | 699 _impl.onSelected(); |
| 670 break; | 700 break; |
| 671 case _notificationClientMethodOnDismissedName: | 701 case _notificationClientMethodOnDismissedName: |
| 672 _impl.onDismissed(); | 702 _impl.onDismissed(); |
| 673 break; | 703 break; |
| 674 default: | 704 default: |
| 675 throw new bindings.MojoCodecError("Unexpected message name"); | 705 throw new bindings.MojoCodecError("Unexpected message name"); |
| 676 break; | 706 break; |
| 677 } | 707 } |
| 678 return null; | |
| 679 } | 708 } |
| 680 | 709 |
| 681 NotificationClient get impl => _impl; | 710 NotificationClient get impl => _impl; |
| 682 set impl(NotificationClient d) { | 711 set impl(NotificationClient d) { |
| 683 if (d == null) { | 712 if (d == null) { |
| 684 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 713 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 685 } | 714 } |
| 686 if (isBound && (_impl == null)) { | 715 if (isBound && (_impl == null)) { |
| 687 beginHandlingEvents(); | 716 beginHandlingEvents(); |
| 688 } | 717 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 } | 763 } |
| 735 void onDismissed() { | 764 void onDismissed() { |
| 736 return impl.onDismissed(); | 765 return impl.onDismissed(); |
| 737 } | 766 } |
| 738 } | 767 } |
| 739 | 768 |
| 740 const int _notificationMethodUpdateName = 0; | 769 const int _notificationMethodUpdateName = 0; |
| 741 const int _notificationMethodCancelName = 1; | 770 const int _notificationMethodCancelName = 1; |
| 742 | 771 |
| 743 class _NotificationServiceDescription implements service_describer.ServiceDescri
ption { | 772 class _NotificationServiceDescription implements service_describer.ServiceDescri
ption { |
| 744 dynamic getTopLevelInterface([Function responseFactory]) => | 773 void getTopLevelInterface(Function responder) { |
| 745 responseFactory(null); | 774 responder(null); |
| 775 } |
| 746 | 776 |
| 747 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 777 void getTypeDefinition(String typeKey, Function responder) { |
| 748 responseFactory(null); | 778 responder(null); |
| 779 } |
| 749 | 780 |
| 750 dynamic getAllTypeDefinitions([Function responseFactory]) => | 781 void getAllTypeDefinitions(Function responder) { |
| 751 responseFactory(null); | 782 responder(null); |
| 783 } |
| 752 } | 784 } |
| 753 | 785 |
| 754 abstract class Notification { | 786 abstract class Notification { |
| 755 static const String serviceName = null; | 787 static const String serviceName = null; |
| 756 | 788 |
| 757 static service_describer.ServiceDescription _cachedServiceDescription; | 789 static service_describer.ServiceDescription _cachedServiceDescription; |
| 758 static service_describer.ServiceDescription get serviceDescription { | 790 static service_describer.ServiceDescription get serviceDescription { |
| 759 if (_cachedServiceDescription == null) { | 791 if (_cachedServiceDescription == null) { |
| 760 _cachedServiceDescription = new _NotificationServiceDescription(); | 792 _cachedServiceDescription = new _NotificationServiceDescription(); |
| 761 } | 793 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 : super.fromHandle(handle, autoBegin: impl != null) { | 937 : super.fromHandle(handle, autoBegin: impl != null) { |
| 906 _impl = impl; | 938 _impl = impl; |
| 907 } | 939 } |
| 908 | 940 |
| 909 _NotificationStubControl.unbound([this._impl]) : super.unbound(); | 941 _NotificationStubControl.unbound([this._impl]) : super.unbound(); |
| 910 | 942 |
| 911 String get serviceName => Notification.serviceName; | 943 String get serviceName => Notification.serviceName; |
| 912 | 944 |
| 913 | 945 |
| 914 | 946 |
| 915 dynamic handleMessage(bindings.ServiceMessage message) { | 947 void handleMessage(bindings.ServiceMessage message) { |
| 916 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 948 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 917 return bindings.ControlMessageHandler.handleMessage(this, | 949 bindings.ControlMessageHandler.handleMessage( |
| 918 0, | 950 this, 0, message); |
| 919 message); | 951 return; |
| 920 } | 952 } |
| 921 if (_impl == null) { | 953 if (_impl == null) { |
| 922 throw new core.MojoApiError("$this has no implementation set"); | 954 throw new core.MojoApiError("$this has no implementation set"); |
| 923 } | 955 } |
| 924 switch (message.header.type) { | 956 switch (message.header.type) { |
| 925 case _notificationMethodUpdateName: | 957 case _notificationMethodUpdateName: |
| 926 var params = _NotificationUpdateParams.deserialize( | 958 var params = _NotificationUpdateParams.deserialize( |
| 927 message.payload); | 959 message.payload); |
| 928 _impl.update(params.notificationData); | 960 _impl.update(params.notificationData); |
| 929 break; | 961 break; |
| 930 case _notificationMethodCancelName: | 962 case _notificationMethodCancelName: |
| 931 _impl.cancel(); | 963 _impl.cancel(); |
| 932 break; | 964 break; |
| 933 default: | 965 default: |
| 934 throw new bindings.MojoCodecError("Unexpected message name"); | 966 throw new bindings.MojoCodecError("Unexpected message name"); |
| 935 break; | 967 break; |
| 936 } | 968 } |
| 937 return null; | |
| 938 } | 969 } |
| 939 | 970 |
| 940 Notification get impl => _impl; | 971 Notification get impl => _impl; |
| 941 set impl(Notification d) { | 972 set impl(Notification d) { |
| 942 if (d == null) { | 973 if (d == null) { |
| 943 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 974 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 944 } | 975 } |
| 945 if (isBound && (_impl == null)) { | 976 if (isBound && (_impl == null)) { |
| 946 beginHandlingEvents(); | 977 beginHandlingEvents(); |
| 947 } | 978 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 return impl.update(notificationData); | 1023 return impl.update(notificationData); |
| 993 } | 1024 } |
| 994 void cancel() { | 1025 void cancel() { |
| 995 return impl.cancel(); | 1026 return impl.cancel(); |
| 996 } | 1027 } |
| 997 } | 1028 } |
| 998 | 1029 |
| 999 const int _notificationServiceMethodPostName = 0; | 1030 const int _notificationServiceMethodPostName = 0; |
| 1000 | 1031 |
| 1001 class _NotificationServiceServiceDescription implements service_describer.Servic
eDescription { | 1032 class _NotificationServiceServiceDescription implements service_describer.Servic
eDescription { |
| 1002 dynamic getTopLevelInterface([Function responseFactory]) => | 1033 void getTopLevelInterface(Function responder) { |
| 1003 responseFactory(null); | 1034 responder(null); |
| 1035 } |
| 1004 | 1036 |
| 1005 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1037 void getTypeDefinition(String typeKey, Function responder) { |
| 1006 responseFactory(null); | 1038 responder(null); |
| 1039 } |
| 1007 | 1040 |
| 1008 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1041 void getAllTypeDefinitions(Function responder) { |
| 1009 responseFactory(null); | 1042 responder(null); |
| 1043 } |
| 1010 } | 1044 } |
| 1011 | 1045 |
| 1012 abstract class NotificationService { | 1046 abstract class NotificationService { |
| 1013 static const String serviceName = "notifications::NotificationService"; | 1047 static const String serviceName = "notifications::NotificationService"; |
| 1014 | 1048 |
| 1015 static service_describer.ServiceDescription _cachedServiceDescription; | 1049 static service_describer.ServiceDescription _cachedServiceDescription; |
| 1016 static service_describer.ServiceDescription get serviceDescription { | 1050 static service_describer.ServiceDescription get serviceDescription { |
| 1017 if (_cachedServiceDescription == null) { | 1051 if (_cachedServiceDescription == null) { |
| 1018 _cachedServiceDescription = new _NotificationServiceServiceDescription(); | 1052 _cachedServiceDescription = new _NotificationServiceServiceDescription(); |
| 1019 } | 1053 } |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 : super.fromHandle(handle, autoBegin: impl != null) { | 1185 : super.fromHandle(handle, autoBegin: impl != null) { |
| 1152 _impl = impl; | 1186 _impl = impl; |
| 1153 } | 1187 } |
| 1154 | 1188 |
| 1155 _NotificationServiceStubControl.unbound([this._impl]) : super.unbound(); | 1189 _NotificationServiceStubControl.unbound([this._impl]) : super.unbound(); |
| 1156 | 1190 |
| 1157 String get serviceName => NotificationService.serviceName; | 1191 String get serviceName => NotificationService.serviceName; |
| 1158 | 1192 |
| 1159 | 1193 |
| 1160 | 1194 |
| 1161 dynamic handleMessage(bindings.ServiceMessage message) { | 1195 void handleMessage(bindings.ServiceMessage message) { |
| 1162 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 1196 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 1163 return bindings.ControlMessageHandler.handleMessage(this, | 1197 bindings.ControlMessageHandler.handleMessage( |
| 1164 0, | 1198 this, 0, message); |
| 1165 message); | 1199 return; |
| 1166 } | 1200 } |
| 1167 if (_impl == null) { | 1201 if (_impl == null) { |
| 1168 throw new core.MojoApiError("$this has no implementation set"); | 1202 throw new core.MojoApiError("$this has no implementation set"); |
| 1169 } | 1203 } |
| 1170 switch (message.header.type) { | 1204 switch (message.header.type) { |
| 1171 case _notificationServiceMethodPostName: | 1205 case _notificationServiceMethodPostName: |
| 1172 var params = _NotificationServicePostParams.deserialize( | 1206 var params = _NotificationServicePostParams.deserialize( |
| 1173 message.payload); | 1207 message.payload); |
| 1174 _impl.post(params.notificationData, params.client, params.notification); | 1208 _impl.post(params.notificationData, params.client, params.notification); |
| 1175 break; | 1209 break; |
| 1176 default: | 1210 default: |
| 1177 throw new bindings.MojoCodecError("Unexpected message name"); | 1211 throw new bindings.MojoCodecError("Unexpected message name"); |
| 1178 break; | 1212 break; |
| 1179 } | 1213 } |
| 1180 return null; | |
| 1181 } | 1214 } |
| 1182 | 1215 |
| 1183 NotificationService get impl => _impl; | 1216 NotificationService get impl => _impl; |
| 1184 set impl(NotificationService d) { | 1217 set impl(NotificationService d) { |
| 1185 if (d == null) { | 1218 if (d == null) { |
| 1186 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 1219 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 1187 } | 1220 } |
| 1188 if (isBound && (_impl == null)) { | 1221 if (isBound && (_impl == null)) { |
| 1189 beginHandlingEvents(); | 1222 beginHandlingEvents(); |
| 1190 } | 1223 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 } | 1264 } |
| 1232 | 1265 |
| 1233 | 1266 |
| 1234 void post(NotificationData notificationData, NotificationClientInterface clien
t, NotificationInterfaceRequest notification) { | 1267 void post(NotificationData notificationData, NotificationClientInterface clien
t, NotificationInterfaceRequest notification) { |
| 1235 return impl.post(notificationData, client, notification); | 1268 return impl.post(notificationData, client, notification); |
| 1236 } | 1269 } |
| 1237 } | 1270 } |
| 1238 | 1271 |
| 1239 | 1272 |
| 1240 | 1273 |
| OLD | NEW |