Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/net_address.mojom.dart

Issue 2006093002: Dart: Futures -> Callbacks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 net_address_mojom; 4 library net_address_mojom;
5 import 'package:mojo/bindings.dart' as bindings; 5 import 'package:mojo/bindings.dart' as bindings;
6 6
7 7
8 class NetAddressFamily extends bindings.MojoEnum { 8 class NetAddressFamily extends bindings.MojoEnum {
9 static const NetAddressFamily unspecified = const NetAddressFamily._(0); 9 static const NetAddressFamily unspecified = const NetAddressFamily._(0);
10 static const NetAddressFamily ipv4 = const NetAddressFamily._(1); 10 static const NetAddressFamily ipv4 = const NetAddressFamily._(1);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 class NetAddressIPv4 extends bindings.Struct { 69 class NetAddressIPv4 extends bindings.Struct {
70 static const List<bindings.StructDataHeader> kVersions = const [ 70 static const List<bindings.StructDataHeader> kVersions = const [
71 const bindings.StructDataHeader(24, 0) 71 const bindings.StructDataHeader(24, 0)
72 ]; 72 ];
73 int port = 0; 73 int port = 0;
74 List<int> addr = null; 74 List<int> addr = null;
75 75
76 NetAddressIPv4() : super(kVersions.last.size); 76 NetAddressIPv4() : super(kVersions.last.size);
77 77
78 NetAddressIPv4.init(
79 int this.port,
80 List<int> this.addr
81 ) : super(kVersions.last.size);
82
78 static NetAddressIPv4 deserialize(bindings.Message message) { 83 static NetAddressIPv4 deserialize(bindings.Message message) {
79 var decoder = new bindings.Decoder(message); 84 var decoder = new bindings.Decoder(message);
80 var result = decode(decoder); 85 var result = decode(decoder);
81 if (decoder.excessHandles != null) { 86 if (decoder.excessHandles != null) {
82 decoder.excessHandles.forEach((h) => h.close()); 87 decoder.excessHandles.forEach((h) => h.close());
83 } 88 }
84 return result; 89 return result;
85 } 90 }
86 91
87 static NetAddressIPv4 decode(bindings.Decoder decoder0) { 92 static NetAddressIPv4 decode(bindings.Decoder decoder0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 159
155 class NetAddressIPv6 extends bindings.Struct { 160 class NetAddressIPv6 extends bindings.Struct {
156 static const List<bindings.StructDataHeader> kVersions = const [ 161 static const List<bindings.StructDataHeader> kVersions = const [
157 const bindings.StructDataHeader(24, 0) 162 const bindings.StructDataHeader(24, 0)
158 ]; 163 ];
159 int port = 0; 164 int port = 0;
160 List<int> addr = null; 165 List<int> addr = null;
161 166
162 NetAddressIPv6() : super(kVersions.last.size); 167 NetAddressIPv6() : super(kVersions.last.size);
163 168
169 NetAddressIPv6.init(
170 int this.port,
171 List<int> this.addr
172 ) : super(kVersions.last.size);
173
164 static NetAddressIPv6 deserialize(bindings.Message message) { 174 static NetAddressIPv6 deserialize(bindings.Message message) {
165 var decoder = new bindings.Decoder(message); 175 var decoder = new bindings.Decoder(message);
166 var result = decode(decoder); 176 var result = decode(decoder);
167 if (decoder.excessHandles != null) { 177 if (decoder.excessHandles != null) {
168 decoder.excessHandles.forEach((h) => h.close()); 178 decoder.excessHandles.forEach((h) => h.close());
169 } 179 }
170 return result; 180 return result;
171 } 181 }
172 182
173 static NetAddressIPv6 decode(bindings.Decoder decoder0) { 183 static NetAddressIPv6 decode(bindings.Decoder decoder0) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 class NetAddress extends bindings.Struct { 251 class NetAddress extends bindings.Struct {
242 static const List<bindings.StructDataHeader> kVersions = const [ 252 static const List<bindings.StructDataHeader> kVersions = const [
243 const bindings.StructDataHeader(32, 0) 253 const bindings.StructDataHeader(32, 0)
244 ]; 254 ];
245 NetAddressFamily family = new NetAddressFamily(0); 255 NetAddressFamily family = new NetAddressFamily(0);
246 NetAddressIPv4 ipv4 = null; 256 NetAddressIPv4 ipv4 = null;
247 NetAddressIPv6 ipv6 = null; 257 NetAddressIPv6 ipv6 = null;
248 258
249 NetAddress() : super(kVersions.last.size); 259 NetAddress() : super(kVersions.last.size);
250 260
261 NetAddress.init(
262 NetAddressFamily this.family,
263 NetAddressIPv4 this.ipv4,
264 NetAddressIPv6 this.ipv6
265 ) : super(kVersions.last.size);
266
251 static NetAddress deserialize(bindings.Message message) { 267 static NetAddress deserialize(bindings.Message message) {
252 var decoder = new bindings.Decoder(message); 268 var decoder = new bindings.Decoder(message);
253 var result = decode(decoder); 269 var result = decode(decoder);
254 if (decoder.excessHandles != null) { 270 if (decoder.excessHandles != null) {
255 decoder.excessHandles.forEach((h) => h.close()); 271 decoder.excessHandles.forEach((h) => h.close());
256 } 272 }
257 return result; 273 return result;
258 } 274 }
259 275
260 static NetAddress decode(bindings.Decoder decoder0) { 276 static NetAddress decode(bindings.Decoder decoder0) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 Map map = new Map(); 354 Map map = new Map();
339 map["family"] = family; 355 map["family"] = family;
340 map["ipv4"] = ipv4; 356 map["ipv4"] = ipv4;
341 map["ipv6"] = ipv6; 357 map["ipv6"] = ipv6;
342 return map; 358 return map;
343 } 359 }
344 } 360 }
345 361
346 362
347 363
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698