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 versioning_test_client_mojom; | 5 library versioning_test_client_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 import 'dart:typed_data'; | 10 import 'dart:typed_data'; |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 } | 798 } |
799 | 799 |
800 abstract class HumanResourceDatabase { | 800 abstract class HumanResourceDatabase { |
801 static const String serviceName = "mojo::test::versioning::HumanResourceDataba
se"; | 801 static const String serviceName = "mojo::test::versioning::HumanResourceDataba
se"; |
802 dynamic addEmployee(Employee employee,[Function responseFactory = null]); | 802 dynamic addEmployee(Employee employee,[Function responseFactory = null]); |
803 dynamic queryEmployee(int id,bool retrieveFingerPrint,[Function responseFactor
y = null]); | 803 dynamic queryEmployee(int id,bool retrieveFingerPrint,[Function responseFactor
y = null]); |
804 dynamic attachFingerPrint(int id,List<int> fingerPrint,[Function responseFacto
ry = null]); | 804 dynamic attachFingerPrint(int id,List<int> fingerPrint,[Function responseFacto
ry = null]); |
805 dynamic listEmployeeIds([Function responseFactory = null]); | 805 dynamic listEmployeeIds([Function responseFactory = null]); |
806 } | 806 } |
807 | 807 |
808 | 808 class _HumanResourceDatabaseProxyControl |
809 class _HumanResourceDatabaseProxyControl extends bindings.ProxyMessageHandler | 809 extends bindings.ProxyMessageHandler |
810 implements bindings.ProxyControl { | 810 implements bindings.ProxyControl { |
811 _HumanResourceDatabaseProxyControl.fromEndpoint( | 811 _HumanResourceDatabaseProxyControl.fromEndpoint( |
812 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 812 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
813 | 813 |
814 _HumanResourceDatabaseProxyControl.fromHandle( | 814 _HumanResourceDatabaseProxyControl.fromHandle( |
815 core.MojoHandle handle) : super.fromHandle(handle); | 815 core.MojoHandle handle) : super.fromHandle(handle); |
816 | 816 |
817 _HumanResourceDatabaseProxyControl.unbound() : super.unbound(); | 817 _HumanResourceDatabaseProxyControl.unbound() : super.unbound(); |
818 | 818 |
819 service_describer.ServiceDescription get serviceDescription => | 819 service_describer.ServiceDescription get serviceDescription => |
820 new _HumanResourceDatabaseServiceDescription(); | 820 new _HumanResourceDatabaseServiceDescription(); |
821 | 821 |
822 String get serviceName => HumanResourceDatabase.serviceName; | 822 String get serviceName => HumanResourceDatabase.serviceName; |
823 | 823 |
824 @override | |
825 void handleResponse(bindings.ServiceMessage message) { | 824 void handleResponse(bindings.ServiceMessage message) { |
826 switch (message.header.type) { | 825 switch (message.header.type) { |
827 case _humanResourceDatabaseMethodAddEmployeeName: | 826 case _humanResourceDatabaseMethodAddEmployeeName: |
828 var r = HumanResourceDatabaseAddEmployeeResponseParams.deserialize( | 827 var r = HumanResourceDatabaseAddEmployeeResponseParams.deserialize( |
829 message.payload); | 828 message.payload); |
830 if (!message.header.hasRequestId) { | 829 if (!message.header.hasRequestId) { |
831 proxyError("Expected a message with a valid request Id."); | 830 proxyError("Expected a message with a valid request Id."); |
832 return; | 831 return; |
833 } | 832 } |
834 Completer c = completerMap[message.header.requestId]; | 833 Completer c = completerMap[message.header.requestId]; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 } | 910 } |
912 } | 911 } |
913 | 912 |
914 @override | 913 @override |
915 String toString() { | 914 String toString() { |
916 var superString = super.toString(); | 915 var superString = super.toString(); |
917 return "_HumanResourceDatabaseProxyControl($superString)"; | 916 return "_HumanResourceDatabaseProxyControl($superString)"; |
918 } | 917 } |
919 } | 918 } |
920 | 919 |
921 | 920 class HumanResourceDatabaseProxy |
922 class HumanResourceDatabaseProxy extends bindings.Proxy | 921 extends bindings.Proxy |
923 implements HumanResourceDatabase { | 922 implements HumanResourceDatabase { |
924 HumanResourceDatabaseProxy.fromEndpoint( | 923 HumanResourceDatabaseProxy.fromEndpoint( |
925 core.MojoMessagePipeEndpoint endpoint) | 924 core.MojoMessagePipeEndpoint endpoint) |
926 : super(new _HumanResourceDatabaseProxyControl.fromEndpoint(endpoint)); | 925 : super(new _HumanResourceDatabaseProxyControl.fromEndpoint(endpoint)); |
927 | 926 |
928 HumanResourceDatabaseProxy.fromHandle(core.MojoHandle handle) | 927 HumanResourceDatabaseProxy.fromHandle(core.MojoHandle handle) |
929 : super(new _HumanResourceDatabaseProxyControl.fromHandle(handle)); | 928 : super(new _HumanResourceDatabaseProxyControl.fromHandle(handle)); |
930 | 929 |
931 HumanResourceDatabaseProxy.unbound() | 930 HumanResourceDatabaseProxy.unbound() |
932 : super(new _HumanResourceDatabaseProxyControl.unbound()); | 931 : super(new _HumanResourceDatabaseProxyControl.unbound()); |
933 | 932 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 dynamic listEmployeeIds([Function responseFactory = null]) { | 976 dynamic listEmployeeIds([Function responseFactory = null]) { |
978 var params = new _HumanResourceDatabaseListEmployeeIdsParams(); | 977 var params = new _HumanResourceDatabaseListEmployeeIdsParams(); |
979 return ctrl.sendMessageWithRequestId( | 978 return ctrl.sendMessageWithRequestId( |
980 params, | 979 params, |
981 _humanResourceDatabaseMethodListEmployeeIdsName, | 980 _humanResourceDatabaseMethodListEmployeeIdsName, |
982 -1, | 981 -1, |
983 bindings.MessageHeader.kMessageExpectsResponse); | 982 bindings.MessageHeader.kMessageExpectsResponse); |
984 } | 983 } |
985 } | 984 } |
986 | 985 |
987 | 986 class _HumanResourceDatabaseStubControl |
988 class HumanResourceDatabaseStub extends bindings.Stub { | 987 extends bindings.StubMessageHandler |
| 988 implements bindings.StubControl<HumanResourceDatabase> { |
989 HumanResourceDatabase _impl; | 989 HumanResourceDatabase _impl; |
990 | 990 |
991 HumanResourceDatabaseStub.fromEndpoint( | 991 _HumanResourceDatabaseStubControl.fromEndpoint( |
992 core.MojoMessagePipeEndpoint endpoint, [HumanResourceDatabase impl]) | 992 core.MojoMessagePipeEndpoint endpoint, [HumanResourceDatabase impl]) |
993 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 993 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
994 _impl = impl; | 994 _impl = impl; |
995 } | 995 } |
996 | 996 |
997 HumanResourceDatabaseStub.fromHandle( | 997 _HumanResourceDatabaseStubControl.fromHandle( |
998 core.MojoHandle handle, [HumanResourceDatabase impl]) | 998 core.MojoHandle handle, [HumanResourceDatabase impl]) |
999 : super.fromHandle(handle, autoBegin: impl != null) { | 999 : super.fromHandle(handle, autoBegin: impl != null) { |
1000 _impl = impl; | 1000 _impl = impl; |
1001 } | 1001 } |
1002 | 1002 |
1003 HumanResourceDatabaseStub.unbound([this._impl]) : super.unbound(); | 1003 _HumanResourceDatabaseStubControl.unbound([this._impl]) : super.unbound(); |
1004 | |
1005 static HumanResourceDatabaseStub newFromEndpoint( | |
1006 core.MojoMessagePipeEndpoint endpoint) { | |
1007 assert(endpoint.setDescription("For HumanResourceDatabaseStub")); | |
1008 return new HumanResourceDatabaseStub.fromEndpoint(endpoint); | |
1009 } | |
1010 | 1004 |
1011 | 1005 |
1012 HumanResourceDatabaseAddEmployeeResponseParams _humanResourceDatabaseAddEmploy
eeResponseParamsFactory(bool success) { | 1006 HumanResourceDatabaseAddEmployeeResponseParams _humanResourceDatabaseAddEmploy
eeResponseParamsFactory(bool success) { |
1013 var result = new HumanResourceDatabaseAddEmployeeResponseParams(); | 1007 var result = new HumanResourceDatabaseAddEmployeeResponseParams(); |
1014 result.success = success; | 1008 result.success = success; |
1015 return result; | 1009 return result; |
1016 } | 1010 } |
1017 HumanResourceDatabaseQueryEmployeeResponseParams _humanResourceDatabaseQueryEm
ployeeResponseParamsFactory(Employee employee, List<int> fingerPrint) { | 1011 HumanResourceDatabaseQueryEmployeeResponseParams _humanResourceDatabaseQueryEm
ployeeResponseParamsFactory(Employee employee, List<int> fingerPrint) { |
1018 var result = new HumanResourceDatabaseQueryEmployeeResponseParams(); | 1012 var result = new HumanResourceDatabaseQueryEmployeeResponseParams(); |
1019 result.employee = employee; | 1013 result.employee = employee; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 } | 1140 } |
1147 | 1141 |
1148 @override | 1142 @override |
1149 void bind(core.MojoMessagePipeEndpoint endpoint) { | 1143 void bind(core.MojoMessagePipeEndpoint endpoint) { |
1150 super.bind(endpoint); | 1144 super.bind(endpoint); |
1151 if (!isOpen && (_impl != null)) { | 1145 if (!isOpen && (_impl != null)) { |
1152 beginHandlingEvents(); | 1146 beginHandlingEvents(); |
1153 } | 1147 } |
1154 } | 1148 } |
1155 | 1149 |
| 1150 @override |
1156 String toString() { | 1151 String toString() { |
1157 var superString = super.toString(); | 1152 var superString = super.toString(); |
1158 return "HumanResourceDatabaseStub($superString)"; | 1153 return "_HumanResourceDatabaseStubControl($superString)"; |
1159 } | 1154 } |
1160 | 1155 |
1161 int get version => 2; | 1156 int get version => 2; |
1162 | 1157 |
1163 static service_describer.ServiceDescription _cachedServiceDescription; | 1158 static service_describer.ServiceDescription _cachedServiceDescription; |
1164 static service_describer.ServiceDescription get serviceDescription { | 1159 static service_describer.ServiceDescription get serviceDescription { |
1165 if (_cachedServiceDescription == null) { | 1160 if (_cachedServiceDescription == null) { |
1166 _cachedServiceDescription = new _HumanResourceDatabaseServiceDescription()
; | 1161 _cachedServiceDescription = new _HumanResourceDatabaseServiceDescription()
; |
1167 } | 1162 } |
1168 return _cachedServiceDescription; | 1163 return _cachedServiceDescription; |
1169 } | 1164 } |
1170 } | 1165 } |
1171 | 1166 |
| 1167 class HumanResourceDatabaseStub |
| 1168 extends bindings.Stub<HumanResourceDatabase> |
| 1169 implements HumanResourceDatabase { |
| 1170 HumanResourceDatabaseStub.fromEndpoint( |
| 1171 core.MojoMessagePipeEndpoint endpoint, [HumanResourceDatabase impl]) |
| 1172 : super(new _HumanResourceDatabaseStubControl.fromEndpoint(endpoint, impl)
); |
| 1173 |
| 1174 HumanResourceDatabaseStub.fromHandle( |
| 1175 core.MojoHandle handle, [HumanResourceDatabase impl]) |
| 1176 : super(new _HumanResourceDatabaseStubControl.fromHandle(handle, impl)); |
| 1177 |
| 1178 HumanResourceDatabaseStub.unbound([HumanResourceDatabase impl]) |
| 1179 : super(new _HumanResourceDatabaseStubControl.unbound(impl)); |
| 1180 |
| 1181 static HumanResourceDatabaseStub newFromEndpoint( |
| 1182 core.MojoMessagePipeEndpoint endpoint) { |
| 1183 assert(endpoint.setDescription("For HumanResourceDatabaseStub")); |
| 1184 return new HumanResourceDatabaseStub.fromEndpoint(endpoint); |
| 1185 } |
| 1186 |
| 1187 static service_describer.ServiceDescription get serviceDescription => |
| 1188 _HumanResourceDatabaseStubControl.serviceDescription; |
| 1189 |
| 1190 |
| 1191 dynamic addEmployee(Employee employee,[Function responseFactory = null]) { |
| 1192 return impl.addEmployee(employee,responseFactory); |
| 1193 } |
| 1194 dynamic queryEmployee(int id,bool retrieveFingerPrint,[Function responseFactor
y = null]) { |
| 1195 return impl.queryEmployee(id,retrieveFingerPrint,responseFactory); |
| 1196 } |
| 1197 dynamic attachFingerPrint(int id,List<int> fingerPrint,[Function responseFacto
ry = null]) { |
| 1198 return impl.attachFingerPrint(id,fingerPrint,responseFactory); |
| 1199 } |
| 1200 dynamic listEmployeeIds([Function responseFactory = null]) { |
| 1201 return impl.listEmployeeIds(responseFactory); |
| 1202 } |
| 1203 } |
| 1204 |
1172 | 1205 |
1173 mojom_types.RuntimeTypeInfo getRuntimeTypeInfo() => _runtimeTypeInfo ?? | 1206 mojom_types.RuntimeTypeInfo getRuntimeTypeInfo() => _runtimeTypeInfo ?? |
1174 _initRuntimeTypeInfo(); | 1207 _initRuntimeTypeInfo(); |
1175 | 1208 |
1176 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { | 1209 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
1177 return getRuntimeTypeInfo().typeMap; | 1210 return getRuntimeTypeInfo().typeMap; |
1178 } | 1211 } |
1179 | 1212 |
1180 var _runtimeTypeInfo; | 1213 var _runtimeTypeInfo; |
1181 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() { | 1214 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() { |
1182 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of | 1215 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of |
1183 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this | 1216 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this |
1184 // file. The string contains the base64 encoding of the gzip-compressed bytes. | 1217 // file. The string contains the base64 encoding of the gzip-compressed bytes. |
1185 var serializedRuntimeTypeInfo = "H4sIAAAJbogC/+xaT2/jRBS3nUJDl9WW/VfDQtcFAdHCx
hUIKcpeWtGgRSwoULRiT5HrTBujxA62U3U57ZEjH4PjHvcj8BE47pEjx95gZv0GT8YztpO4sSN1pKepX
ccz7zfv/d5vJtGVqG1C/wJ6/n6XuVax1eH6C2z3sY28n712O0RB2G6fIj9wPNdxT9rth5OR5f6AAm/i2
+jACq0jK0CC9zzA9jm2H590O71vOk/a5IVN8r5m/Lqm7G3J+f4JvYGtxvx/D/oB9LvYGpnjHqCx5Ycj5
IZN/OxHmc93RuOh9xShxf1qwfypXw1uHZ7X4mvy51918fptqtP+K4z/7P1/of2kiNt1bBvYYkSi+x9ju
wtxkAJfYl5XsL2GzcV2jM2cBL459GxraJ543skQmQNvhMxffcskrzYD347+GE+Oho5tOm6I/GPLRoF55
Lh9PFpgkuEDMx6/R2707KFD1o98eBThozHzaKnT+BpKepPh2MqJ41Xw+3D/UecQcujDbPya9HkexzfBn
2XjmIWXWhBeVyC+DzqPX11/gu2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bKsLtwCfff9BPlPU/Zj71SsL
vxeKya/qN6Z8p+pDFXJL/68yFCXux+V5dkGzAu2ocK42arIPjSt1SXnRfTzZ5K8eraAjq8x49H9zLeO+
zhybDo+fRT6DjpFvWPsMPJ7Y99xQwneZhXiM4PfdE4z6xn1tL5WTL5vY7styHdaUaua78/U1dCDd0Cvl
FUn1AvSgyLcyfp01WL55OyC+eQmnJFxNKKI1vFByetIMKHzWef2p4vyDK+vHtLznLX4PEfNuW7aEurA2
3Cmux+Glj346tXqdeniCdZvuyJ6jTo2mFGv7Unw3AEsEjhM7eYvdduium0bOKAKuk1LORef9/sD2X4oL
z8SfD4t+dxDxI9p+8s0nUXz1NCKydP3QYuK8jQ+vbg8v5j3/ILE35crdH6xB/E11uLvVrSc9bVWgC7SM
urrFmD+yAlCqvq+7idx36nYOci5Usy+6C5gwPn/f1WtSp7Wc/CckhIPFK9WQeezBrw7iVvEcqvEb9oS9
5H09zQOzjFRHdiB33RVZf+xkSPuWP77LwAA///UgNHD2CgAAA=="; |
1186 | 1219 |
1187 // Deserialize RuntimeTypeInfo | 1220 // Deserialize RuntimeTypeInfo |
1188 var bytes = BASE64.decode(serializedRuntimeTypeInfo); | 1221 var bytes = BASE64.decode(serializedRuntimeTypeInfo); |
1189 var unzippedBytes = new ZLibDecoder().convert(bytes); | 1222 var unzippedBytes = new ZLibDecoder().convert(bytes); |
1190 var bdata = new ByteData.view(unzippedBytes.buffer); | 1223 var bdata = new ByteData.view(unzippedBytes.buffer); |
1191 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0); | 1224 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0); |
1192 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message); | 1225 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message); |
1193 return _runtimeTypeInfo; | 1226 return _runtimeTypeInfo; |
1194 } | 1227 } |
OLD | NEW |