OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 library nfc_mojom; | 5 library nfc_mojom; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:mojo/bindings.dart' as bindings; | 9 import 'package:mojo/bindings.dart' as bindings; |
10 import 'package:mojo/core.dart' as core; | 10 import 'package:mojo/core.dart' as core; |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 } | 501 } |
502 | 502 |
503 | 503 |
504 | 504 |
505 | 505 |
506 const int _NfcTransmission_cancelName = 0; | 506 const int _NfcTransmission_cancelName = 0; |
507 | 507 |
508 | 508 |
509 | 509 |
510 class _NfcTransmissionServiceDescription implements service_describer.ServiceDes
cription { | 510 class _NfcTransmissionServiceDescription implements service_describer.ServiceDes
cription { |
511 dynamic getTopLevelInterface([Function responseFactory]) => null; | 511 dynamic getTopLevelInterface([Function responseFactory]) => |
| 512 responseFactory(null); |
512 | 513 |
513 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; | 514 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 515 responseFactory(null); |
514 | 516 |
515 dynamic getAllTypeDefinitions([Function responseFactory]) => null; | 517 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 518 responseFactory(null); |
516 } | 519 } |
517 | 520 |
518 abstract class NfcTransmission { | 521 abstract class NfcTransmission { |
519 static const String serviceName = null; | 522 static const String serviceName = null; |
520 void cancel(); | 523 void cancel(); |
521 } | 524 } |
522 | 525 |
523 | 526 |
524 class _NfcTransmissionProxyImpl extends bindings.Proxy { | 527 class _NfcTransmissionProxyImpl extends bindings.Proxy { |
525 _NfcTransmissionProxyImpl.fromEndpoint( | 528 _NfcTransmissionProxyImpl.fromEndpoint( |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 _impl = d; | 678 _impl = d; |
676 } | 679 } |
677 | 680 |
678 String toString() { | 681 String toString() { |
679 var superString = super.toString(); | 682 var superString = super.toString(); |
680 return "NfcTransmissionStub($superString)"; | 683 return "NfcTransmissionStub($superString)"; |
681 } | 684 } |
682 | 685 |
683 int get version => 0; | 686 int get version => 0; |
684 | 687 |
685 service_describer.ServiceDescription get serviceDescription => | 688 static service_describer.ServiceDescription _cachedServiceDescription; |
686 new _NfcTransmissionServiceDescription(); | 689 static service_describer.ServiceDescription get serviceDescription { |
| 690 if (_cachedServiceDescription == null) { |
| 691 _cachedServiceDescription = new _NfcTransmissionServiceDescription(); |
| 692 } |
| 693 return _cachedServiceDescription; |
| 694 } |
687 } | 695 } |
688 | 696 |
689 const int _NfcReceiver_onReceivedNfcDataName = 0; | 697 const int _NfcReceiver_onReceivedNfcDataName = 0; |
690 | 698 |
691 | 699 |
692 | 700 |
693 class _NfcReceiverServiceDescription implements service_describer.ServiceDescrip
tion { | 701 class _NfcReceiverServiceDescription implements service_describer.ServiceDescrip
tion { |
694 dynamic getTopLevelInterface([Function responseFactory]) => null; | 702 dynamic getTopLevelInterface([Function responseFactory]) => |
| 703 responseFactory(null); |
695 | 704 |
696 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; | 705 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 706 responseFactory(null); |
697 | 707 |
698 dynamic getAllTypeDefinitions([Function responseFactory]) => null; | 708 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 709 responseFactory(null); |
699 } | 710 } |
700 | 711 |
701 abstract class NfcReceiver { | 712 abstract class NfcReceiver { |
702 static const String serviceName = "nfc::NfcReceiver"; | 713 static const String serviceName = "nfc::NfcReceiver"; |
703 void onReceivedNfcData(NfcData nfcData); | 714 void onReceivedNfcData(NfcData nfcData); |
704 } | 715 } |
705 | 716 |
706 | 717 |
707 class _NfcReceiverProxyImpl extends bindings.Proxy { | 718 class _NfcReceiverProxyImpl extends bindings.Proxy { |
708 _NfcReceiverProxyImpl.fromEndpoint( | 719 _NfcReceiverProxyImpl.fromEndpoint( |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 _impl = d; | 870 _impl = d; |
860 } | 871 } |
861 | 872 |
862 String toString() { | 873 String toString() { |
863 var superString = super.toString(); | 874 var superString = super.toString(); |
864 return "NfcReceiverStub($superString)"; | 875 return "NfcReceiverStub($superString)"; |
865 } | 876 } |
866 | 877 |
867 int get version => 0; | 878 int get version => 0; |
868 | 879 |
869 service_describer.ServiceDescription get serviceDescription => | 880 static service_describer.ServiceDescription _cachedServiceDescription; |
870 new _NfcReceiverServiceDescription(); | 881 static service_describer.ServiceDescription get serviceDescription { |
| 882 if (_cachedServiceDescription == null) { |
| 883 _cachedServiceDescription = new _NfcReceiverServiceDescription(); |
| 884 } |
| 885 return _cachedServiceDescription; |
| 886 } |
871 } | 887 } |
872 | 888 |
873 const int _Nfc_transmitOnNextConnectionName = 0; | 889 const int _Nfc_transmitOnNextConnectionName = 0; |
874 const int _Nfc_registerName = 1; | 890 const int _Nfc_registerName = 1; |
875 const int _Nfc_unregisterName = 2; | 891 const int _Nfc_unregisterName = 2; |
876 | 892 |
877 | 893 |
878 | 894 |
879 class _NfcServiceDescription implements service_describer.ServiceDescription { | 895 class _NfcServiceDescription implements service_describer.ServiceDescription { |
880 dynamic getTopLevelInterface([Function responseFactory]) => null; | 896 dynamic getTopLevelInterface([Function responseFactory]) => |
| 897 responseFactory(null); |
881 | 898 |
882 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; | 899 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 900 responseFactory(null); |
883 | 901 |
884 dynamic getAllTypeDefinitions([Function responseFactory]) => null; | 902 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 903 responseFactory(null); |
885 } | 904 } |
886 | 905 |
887 abstract class Nfc { | 906 abstract class Nfc { |
888 static const String serviceName = "nfc::Nfc"; | 907 static const String serviceName = "nfc::Nfc"; |
889 dynamic transmitOnNextConnection(NfcData nfcData,Object transmission,[Function
responseFactory = null]); | 908 dynamic transmitOnNextConnection(NfcData nfcData,Object transmission,[Function
responseFactory = null]); |
890 void register(); | 909 void register(); |
891 void unregister(); | 910 void unregister(); |
892 } | 911 } |
893 | 912 |
894 | 913 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 _impl = d; | 1135 _impl = d; |
1117 } | 1136 } |
1118 | 1137 |
1119 String toString() { | 1138 String toString() { |
1120 var superString = super.toString(); | 1139 var superString = super.toString(); |
1121 return "NfcStub($superString)"; | 1140 return "NfcStub($superString)"; |
1122 } | 1141 } |
1123 | 1142 |
1124 int get version => 0; | 1143 int get version => 0; |
1125 | 1144 |
1126 service_describer.ServiceDescription get serviceDescription => | 1145 static service_describer.ServiceDescription _cachedServiceDescription; |
1127 new _NfcServiceDescription(); | 1146 static service_describer.ServiceDescription get serviceDescription { |
| 1147 if (_cachedServiceDescription == null) { |
| 1148 _cachedServiceDescription = new _NfcServiceDescription(); |
| 1149 } |
| 1150 return _cachedServiceDescription; |
| 1151 } |
1128 } | 1152 } |
1129 | 1153 |
1130 | 1154 |
1131 | 1155 |
OLD | NEW |