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 location_service_mojom; | 5 library location_service_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 import 'package:mojo_services/mojo/location.mojom.dart' as location_mojom; | 10 import 'package:mojo_services/mojo/location.mojom.dart' as location_mojom; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 Map toJson() { | 82 Map toJson() { |
83 Map map = new Map(); | 83 Map map = new Map(); |
84 map["priority"] = priority; | 84 map["priority"] = priority; |
85 return map; | 85 return map; |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 | 89 |
90 | |
91 | |
92 class LocationServiceGetNextLocationResponseParams extends bindings.Struct { | 90 class LocationServiceGetNextLocationResponseParams extends bindings.Struct { |
93 static const List<bindings.StructDataHeader> kVersions = const [ | 91 static const List<bindings.StructDataHeader> kVersions = const [ |
94 const bindings.StructDataHeader(16, 0) | 92 const bindings.StructDataHeader(16, 0) |
95 ]; | 93 ]; |
96 location_mojom.Location location = null; | 94 location_mojom.Location location = null; |
97 | 95 |
98 LocationServiceGetNextLocationResponseParams() : super(kVersions.last.size); | 96 LocationServiceGetNextLocationResponseParams() : super(kVersions.last.size); |
99 | 97 |
100 static LocationServiceGetNextLocationResponseParams deserialize(bindings.Messa
ge message) { | 98 static LocationServiceGetNextLocationResponseParams deserialize(bindings.Messa
ge message) { |
101 var decoder = new bindings.Decoder(message); | 99 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 "location: $location" ")"; | 152 "location: $location" ")"; |
155 } | 153 } |
156 | 154 |
157 Map toJson() { | 155 Map toJson() { |
158 Map map = new Map(); | 156 Map map = new Map(); |
159 map["location"] = location; | 157 map["location"] = location; |
160 return map; | 158 return map; |
161 } | 159 } |
162 } | 160 } |
163 | 161 |
164 | |
165 | |
166 | |
167 const int _LocationService_getNextLocationName = 0; | 162 const int _LocationService_getNextLocationName = 0; |
168 | 163 |
169 class LocationServiceUpdatePriority extends bindings.MojoEnum { | 164 class LocationServiceUpdatePriority extends bindings.MojoEnum { |
170 static const LocationServiceUpdatePriority priorityBalancedPowerAccuracy = con
st LocationServiceUpdatePriority._(0); | 165 static const LocationServiceUpdatePriority priorityBalancedPowerAccuracy = con
st LocationServiceUpdatePriority._(0); |
171 static const LocationServiceUpdatePriority priorityHighAccuracy = const Locati
onServiceUpdatePriority._(1); | 166 static const LocationServiceUpdatePriority priorityHighAccuracy = const Locati
onServiceUpdatePriority._(1); |
172 static const LocationServiceUpdatePriority priorityLowPower = const LocationSe
rviceUpdatePriority._(2); | 167 static const LocationServiceUpdatePriority priorityLowPower = const LocationSe
rviceUpdatePriority._(2); |
173 static const LocationServiceUpdatePriority priorityNoPower = const LocationSer
viceUpdatePriority._(3); | 168 static const LocationServiceUpdatePriority priorityNoPower = const LocationSer
viceUpdatePriority._(3); |
174 | 169 |
175 const LocationServiceUpdatePriority._(int v) : super(v); | 170 const LocationServiceUpdatePriority._(int v) : super(v); |
176 | 171 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 case priorityNoPower: | 220 case priorityNoPower: |
226 return 'LocationServiceUpdatePriority.priorityNoPower'; | 221 return 'LocationServiceUpdatePriority.priorityNoPower'; |
227 default: | 222 default: |
228 return null; | 223 return null; |
229 } | 224 } |
230 } | 225 } |
231 | 226 |
232 int toJson() => mojoEnumValue; | 227 int toJson() => mojoEnumValue; |
233 } | 228 } |
234 | 229 |
235 | |
236 | |
237 | |
238 | |
239 class _LocationServiceServiceDescription implements service_describer.ServiceDes
cription { | 230 class _LocationServiceServiceDescription implements service_describer.ServiceDes
cription { |
240 dynamic getTopLevelInterface([Function responseFactory]) => | 231 dynamic getTopLevelInterface([Function responseFactory]) => |
241 responseFactory(null); | 232 responseFactory(null); |
242 | 233 |
243 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 234 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
244 responseFactory(null); | 235 responseFactory(null); |
245 | 236 |
246 dynamic getAllTypeDefinitions([Function responseFactory]) => | 237 dynamic getAllTypeDefinitions([Function responseFactory]) => |
247 responseFactory(null); | 238 responseFactory(null); |
248 } | 239 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 static service_describer.ServiceDescription get serviceDescription { | 452 static service_describer.ServiceDescription get serviceDescription { |
462 if (_cachedServiceDescription == null) { | 453 if (_cachedServiceDescription == null) { |
463 _cachedServiceDescription = new _LocationServiceServiceDescription(); | 454 _cachedServiceDescription = new _LocationServiceServiceDescription(); |
464 } | 455 } |
465 return _cachedServiceDescription; | 456 return _cachedServiceDescription; |
466 } | 457 } |
467 } | 458 } |
468 | 459 |
469 | 460 |
470 | 461 |
OLD | NEW |