Index: mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart |
diff --git a/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart |
similarity index 57% |
copy from mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart |
copy to mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart |
index 8824f1c74fa5c5926a7d364a0a5f27226243d5a5..3670a9d93af84c9385bbbec5af1915c17affbea2 100644 |
--- a/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart |
+++ b/mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart |
@@ -2,25 +2,26 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-library contacts_mojom; |
+library media_pipe_mojom; |
import 'dart:async'; |
import 'package:mojo/bindings.dart' as bindings; |
import 'package:mojo/core.dart' as core; |
+import 'package:mojo_services/mojo/media/media_common.mojom.dart' as media_common_mojom; |
-class Contact extends bindings.Struct { |
+class MediaPacketRegion extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(24, 0) |
]; |
- int id = 0; |
- String name = null; |
+ int offset = 0; |
+ int length = 0; |
- Contact() : super(kVersions.last.size); |
+ MediaPacketRegion() : super(kVersions.last.size); |
- static Contact deserialize(bindings.Message message) { |
+ static MediaPacketRegion deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -29,11 +30,11 @@ class Contact extends bindings.Struct { |
return result; |
} |
- static Contact decode(bindings.Decoder decoder0) { |
+ static MediaPacketRegion decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- Contact result = new Contact(); |
+ MediaPacketRegion result = new MediaPacketRegion(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -55,11 +56,11 @@ class Contact extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.id = decoder0.decodeInt64(8); |
+ result.offset = decoder0.decodeUint64(8); |
} |
if (mainDataHeader.version >= 0) { |
- result.name = decoder0.decodeString(16, false); |
+ result.length = decoder0.decodeUint64(16); |
} |
return result; |
} |
@@ -67,35 +68,40 @@ class Contact extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeInt64(id, 8); |
+ encoder0.encodeUint64(offset, 8); |
- encoder0.encodeString(name, 16, false); |
+ encoder0.encodeUint64(length, 16); |
} |
String toString() { |
- return "Contact(" |
- "id: $id" ", " |
- "name: $name" ")"; |
+ return "MediaPacketRegion(" |
+ "offset: $offset" ", " |
+ "length: $length" ")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["id"] = id; |
- map["name"] = name; |
+ map["offset"] = offset; |
+ map["length"] = length; |
return map; |
} |
} |
-class _ContactsServiceGetCountParams extends bindings.Struct { |
+class MediaPacket extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(16, 0) |
+ const bindings.StructDataHeader(48, 0) |
]; |
- String filter = null; |
+ static const int kNoTimestamp = 0x7fffffffffffffff; |
+ int pts = 0x7fffffffffffffff; |
+ int duration = 0; |
+ bool endOfStream = false; |
+ MediaPacketRegion payload = null; |
+ List<MediaPacketRegion> extraPayload = null; |
- _ContactsServiceGetCountParams() : super(kVersions.last.size); |
+ MediaPacket() : super(kVersions.last.size); |
- static _ContactsServiceGetCountParams deserialize(bindings.Message message) { |
+ static MediaPacket deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -104,11 +110,11 @@ class _ContactsServiceGetCountParams extends bindings.Struct { |
return result; |
} |
- static _ContactsServiceGetCountParams decode(bindings.Decoder decoder0) { |
+ static MediaPacket decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- _ContactsServiceGetCountParams result = new _ContactsServiceGetCountParams(); |
+ MediaPacket result = new MediaPacket(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -130,7 +136,35 @@ class _ContactsServiceGetCountParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.filter = decoder0.decodeString(8, true); |
+ result.pts = decoder0.decodeInt64(8); |
+ } |
+ if (mainDataHeader.version >= 0) { |
+ |
+ result.duration = decoder0.decodeUint64(16); |
+ } |
+ if (mainDataHeader.version >= 0) { |
+ |
+ result.endOfStream = decoder0.decodeBool(24, 0); |
+ } |
+ if (mainDataHeader.version >= 0) { |
+ |
+ var decoder1 = decoder0.decodePointer(32, false); |
+ result.payload = MediaPacketRegion.decode(decoder1); |
+ } |
+ if (mainDataHeader.version >= 0) { |
+ |
+ var decoder1 = decoder0.decodePointer(40, true); |
+ if (decoder1 == null) { |
+ result.extraPayload = null; |
+ } else { |
+ var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength); |
+ result.extraPayload = new List<MediaPacketRegion>(si1.numElements); |
+ for (int i1 = 0; i1 < si1.numElements; ++i1) { |
+ |
+ var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false); |
+ result.extraPayload[i1] = MediaPacketRegion.decode(decoder2); |
+ } |
+ } |
} |
return result; |
} |
@@ -138,31 +172,57 @@ class _ContactsServiceGetCountParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeString(filter, 8, true); |
+ encoder0.encodeInt64(pts, 8); |
+ |
+ encoder0.encodeUint64(duration, 16); |
+ |
+ encoder0.encodeBool(endOfStream, 24, 0); |
+ |
+ encoder0.encodeStruct(payload, 32, false); |
+ |
+ if (extraPayload == null) { |
+ encoder0.encodeNullPointer(40, true); |
+ } else { |
+ var encoder1 = encoder0.encodePointerArray(extraPayload.length, 40, bindings.kUnspecifiedArrayLength); |
+ for (int i0 = 0; i0 < extraPayload.length; ++i0) { |
+ |
+ encoder1.encodeStruct(extraPayload[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false); |
+ } |
+ } |
} |
String toString() { |
- return "_ContactsServiceGetCountParams(" |
- "filter: $filter" ")"; |
+ return "MediaPacket(" |
+ "pts: $pts" ", " |
+ "duration: $duration" ", " |
+ "endOfStream: $endOfStream" ", " |
+ "payload: $payload" ", " |
+ "extraPayload: $extraPayload" ")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["filter"] = filter; |
+ map["pts"] = pts; |
+ map["duration"] = duration; |
+ map["endOfStream"] = endOfStream; |
+ map["payload"] = payload; |
+ map["extraPayload"] = extraPayload; |
return map; |
} |
} |
-class ContactsServiceGetCountResponseParams extends bindings.Struct { |
+class MediaPipeState extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(16, 0) |
+ const bindings.StructDataHeader(24, 0) |
]; |
- int count = 0; |
+ static const int kMaxPayloadLen = 0x3FFFFFFFFFFFFFFF; |
+ core.MojoSharedBuffer payloadBuffer = null; |
+ int payloadBufferLen = 0; |
- ContactsServiceGetCountResponseParams() : super(kVersions.last.size); |
+ MediaPipeState() : super(kVersions.last.size); |
- static ContactsServiceGetCountResponseParams deserialize(bindings.Message message) { |
+ static MediaPipeState deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -171,11 +231,11 @@ class ContactsServiceGetCountResponseParams extends bindings.Struct { |
return result; |
} |
- static ContactsServiceGetCountResponseParams decode(bindings.Decoder decoder0) { |
+ static MediaPipeState decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- ContactsServiceGetCountResponseParams result = new ContactsServiceGetCountResponseParams(); |
+ MediaPipeState result = new MediaPipeState(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -197,7 +257,11 @@ class ContactsServiceGetCountResponseParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.count = decoder0.decodeUint64(8); |
+ result.payloadBuffer = decoder0.decodeSharedBufferHandle(8, false); |
+ } |
+ if (mainDataHeader.version >= 0) { |
+ |
+ result.payloadBufferLen = decoder0.decodeUint64(16); |
} |
return result; |
} |
@@ -205,33 +269,32 @@ class ContactsServiceGetCountResponseParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeUint64(count, 8); |
+ encoder0.encodeSharedBufferHandle(payloadBuffer, 8, false); |
+ |
+ encoder0.encodeUint64(payloadBufferLen, 16); |
} |
String toString() { |
- return "ContactsServiceGetCountResponseParams(" |
- "count: $count" ")"; |
+ return "MediaPipeState(" |
+ "payloadBuffer: $payloadBuffer" ", " |
+ "payloadBufferLen: $payloadBufferLen" ")"; |
} |
Map toJson() { |
- Map map = new Map(); |
- map["count"] = count; |
- return map; |
+ throw new bindings.MojoCodecError( |
+ 'Object containing handles cannot be encoded to JSON.'); |
} |
} |
-class _ContactsServiceGetParams extends bindings.Struct { |
+class _MediaPipeGetStateParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(24, 0) |
+ const bindings.StructDataHeader(8, 0) |
]; |
- String filter = null; |
- int offset = 0; |
- int limit = 0; |
- _ContactsServiceGetParams() : super(kVersions.last.size); |
+ _MediaPipeGetStateParams() : super(kVersions.last.size); |
- static _ContactsServiceGetParams deserialize(bindings.Message message) { |
+ static _MediaPipeGetStateParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -240,11 +303,11 @@ class _ContactsServiceGetParams extends bindings.Struct { |
return result; |
} |
- static _ContactsServiceGetParams decode(bindings.Decoder decoder0) { |
+ static _MediaPipeGetStateParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- _ContactsServiceGetParams result = new _ContactsServiceGetParams(); |
+ _MediaPipeGetStateParams result = new _MediaPipeGetStateParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -264,57 +327,33 @@ class _ContactsServiceGetParams extends bindings.Struct { |
'Message newer than the last known version cannot be shorter than ' |
'required by the last known version.'); |
} |
- if (mainDataHeader.version >= 0) { |
- |
- result.filter = decoder0.decodeString(8, true); |
- } |
- if (mainDataHeader.version >= 0) { |
- |
- result.offset = decoder0.decodeUint32(16); |
- } |
- if (mainDataHeader.version >= 0) { |
- |
- result.limit = decoder0.decodeUint32(20); |
- } |
return result; |
} |
void encode(bindings.Encoder encoder) { |
- var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- |
- encoder0.encodeString(filter, 8, true); |
- |
- encoder0.encodeUint32(offset, 16); |
- |
- encoder0.encodeUint32(limit, 20); |
+ encoder.getStructEncoderAtOffset(kVersions.last); |
} |
String toString() { |
- return "_ContactsServiceGetParams(" |
- "filter: $filter" ", " |
- "offset: $offset" ", " |
- "limit: $limit" ")"; |
+ return "_MediaPipeGetStateParams("")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["filter"] = filter; |
- map["offset"] = offset; |
- map["limit"] = limit; |
return map; |
} |
} |
-class ContactsServiceGetResponseParams extends bindings.Struct { |
+class MediaPipeGetStateResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(16, 0) |
]; |
- List<Contact> contacts = null; |
+ MediaPipeState state = null; |
- ContactsServiceGetResponseParams() : super(kVersions.last.size); |
+ MediaPipeGetStateResponseParams() : super(kVersions.last.size); |
- static ContactsServiceGetResponseParams deserialize(bindings.Message message) { |
+ static MediaPipeGetStateResponseParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -323,11 +362,11 @@ class ContactsServiceGetResponseParams extends bindings.Struct { |
return result; |
} |
- static ContactsServiceGetResponseParams decode(bindings.Decoder decoder0) { |
+ static MediaPipeGetStateResponseParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- ContactsServiceGetResponseParams result = new ContactsServiceGetResponseParams(); |
+ MediaPipeGetStateResponseParams result = new MediaPipeGetStateResponseParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -350,15 +389,7 @@ class ContactsServiceGetResponseParams extends bindings.Struct { |
if (mainDataHeader.version >= 0) { |
var decoder1 = decoder0.decodePointer(8, false); |
- { |
- var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength); |
- result.contacts = new List<Contact>(si1.numElements); |
- for (int i1 = 0; i1 < si1.numElements; ++i1) { |
- |
- var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false); |
- result.contacts[i1] = Contact.decode(decoder2); |
- } |
- } |
+ result.state = MediaPipeState.decode(decoder1); |
} |
return result; |
} |
@@ -366,39 +397,30 @@ class ContactsServiceGetResponseParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- if (contacts == null) { |
- encoder0.encodeNullPointer(8, false); |
- } else { |
- var encoder1 = encoder0.encodePointerArray(contacts.length, 8, bindings.kUnspecifiedArrayLength); |
- for (int i0 = 0; i0 < contacts.length; ++i0) { |
- |
- encoder1.encodeStruct(contacts[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false); |
- } |
- } |
+ encoder0.encodeStruct(state, 8, false); |
} |
String toString() { |
- return "ContactsServiceGetResponseParams(" |
- "contacts: $contacts" ")"; |
+ return "MediaPipeGetStateResponseParams(" |
+ "state: $state" ")"; |
} |
Map toJson() { |
- Map map = new Map(); |
- map["contacts"] = contacts; |
- return map; |
+ throw new bindings.MojoCodecError( |
+ 'Object containing handles cannot be encoded to JSON.'); |
} |
} |
-class _ContactsServiceGetEmailsParams extends bindings.Struct { |
+class _MediaPipeSendPacketParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(16, 0) |
]; |
- int id = 0; |
+ MediaPacket packet = null; |
- _ContactsServiceGetEmailsParams() : super(kVersions.last.size); |
+ _MediaPipeSendPacketParams() : super(kVersions.last.size); |
- static _ContactsServiceGetEmailsParams deserialize(bindings.Message message) { |
+ static _MediaPipeSendPacketParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -407,11 +429,11 @@ class _ContactsServiceGetEmailsParams extends bindings.Struct { |
return result; |
} |
- static _ContactsServiceGetEmailsParams decode(bindings.Decoder decoder0) { |
+ static _MediaPipeSendPacketParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- _ContactsServiceGetEmailsParams result = new _ContactsServiceGetEmailsParams(); |
+ _MediaPipeSendPacketParams result = new _MediaPipeSendPacketParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -433,7 +455,8 @@ class _ContactsServiceGetEmailsParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.id = decoder0.decodeInt64(8); |
+ var decoder1 = decoder0.decodePointer(8, false); |
+ result.packet = MediaPacket.decode(decoder1); |
} |
return result; |
} |
@@ -441,31 +464,31 @@ class _ContactsServiceGetEmailsParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeInt64(id, 8); |
+ encoder0.encodeStruct(packet, 8, false); |
} |
String toString() { |
- return "_ContactsServiceGetEmailsParams(" |
- "id: $id" ")"; |
+ return "_MediaPipeSendPacketParams(" |
+ "packet: $packet" ")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["id"] = id; |
+ map["packet"] = packet; |
return map; |
} |
} |
-class ContactsServiceGetEmailsResponseParams extends bindings.Struct { |
+class MediaPipeSendPacketResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(16, 0) |
]; |
- List<String> emails = null; |
+ media_common_mojom.MediaResult result = null; |
- ContactsServiceGetEmailsResponseParams() : super(kVersions.last.size); |
+ MediaPipeSendPacketResponseParams() : super(kVersions.last.size); |
- static ContactsServiceGetEmailsResponseParams deserialize(bindings.Message message) { |
+ static MediaPipeSendPacketResponseParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -474,11 +497,11 @@ class ContactsServiceGetEmailsResponseParams extends bindings.Struct { |
return result; |
} |
- static ContactsServiceGetEmailsResponseParams decode(bindings.Decoder decoder0) { |
+ static MediaPipeSendPacketResponseParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- ContactsServiceGetEmailsResponseParams result = new ContactsServiceGetEmailsResponseParams(); |
+ MediaPipeSendPacketResponseParams result = new MediaPipeSendPacketResponseParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -500,15 +523,11 @@ class ContactsServiceGetEmailsResponseParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- var decoder1 = decoder0.decodePointer(8, false); |
- { |
- var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength); |
- result.emails = new List<String>(si1.numElements); |
- for (int i1 = 0; i1 < si1.numElements; ++i1) { |
- |
- result.emails[i1] = decoder1.decodeString(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false); |
+ result.result = media_common_mojom.MediaResult.decode(decoder0, 8); |
+ if (result.result == null) { |
+ throw new bindings.MojoCodecError( |
+ 'Trying to decode null union for non-nullable media_common_mojom.MediaResult.'); |
} |
- } |
} |
return result; |
} |
@@ -516,40 +535,30 @@ class ContactsServiceGetEmailsResponseParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- if (emails == null) { |
- encoder0.encodeNullPointer(8, false); |
- } else { |
- var encoder1 = encoder0.encodePointerArray(emails.length, 8, bindings.kUnspecifiedArrayLength); |
- for (int i0 = 0; i0 < emails.length; ++i0) { |
- |
- encoder1.encodeString(emails[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false); |
- } |
- } |
+ encoder0.encodeEnum(result, 8); |
} |
String toString() { |
- return "ContactsServiceGetEmailsResponseParams(" |
- "emails: $emails" ")"; |
+ return "MediaPipeSendPacketResponseParams(" |
+ "result: $result" ")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["emails"] = emails; |
+ map["result"] = result; |
return map; |
} |
} |
-class _ContactsServiceGetPhotoParams extends bindings.Struct { |
+class _MediaPipeFlushParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(24, 0) |
+ const bindings.StructDataHeader(8, 0) |
]; |
- int id = 0; |
- bool highResolution = false; |
- _ContactsServiceGetPhotoParams() : super(kVersions.last.size); |
+ _MediaPipeFlushParams() : super(kVersions.last.size); |
- static _ContactsServiceGetPhotoParams deserialize(bindings.Message message) { |
+ static _MediaPipeFlushParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -558,11 +567,11 @@ class _ContactsServiceGetPhotoParams extends bindings.Struct { |
return result; |
} |
- static _ContactsServiceGetPhotoParams decode(bindings.Decoder decoder0) { |
+ static _MediaPipeFlushParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- _ContactsServiceGetPhotoParams result = new _ContactsServiceGetPhotoParams(); |
+ _MediaPipeFlushParams result = new _MediaPipeFlushParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -582,49 +591,33 @@ class _ContactsServiceGetPhotoParams extends bindings.Struct { |
'Message newer than the last known version cannot be shorter than ' |
'required by the last known version.'); |
} |
- if (mainDataHeader.version >= 0) { |
- |
- result.id = decoder0.decodeInt64(8); |
- } |
- if (mainDataHeader.version >= 0) { |
- |
- result.highResolution = decoder0.decodeBool(16, 0); |
- } |
return result; |
} |
void encode(bindings.Encoder encoder) { |
- var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- |
- encoder0.encodeInt64(id, 8); |
- |
- encoder0.encodeBool(highResolution, 16, 0); |
+ encoder.getStructEncoderAtOffset(kVersions.last); |
} |
String toString() { |
- return "_ContactsServiceGetPhotoParams(" |
- "id: $id" ", " |
- "highResolution: $highResolution" ")"; |
+ return "_MediaPipeFlushParams("")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["id"] = id; |
- map["highResolution"] = highResolution; |
return map; |
} |
} |
-class ContactsServiceGetPhotoResponseParams extends bindings.Struct { |
+class MediaPipeFlushResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(16, 0) |
]; |
- String photoUrl = null; |
+ media_common_mojom.MediaResult result = null; |
- ContactsServiceGetPhotoResponseParams() : super(kVersions.last.size); |
+ MediaPipeFlushResponseParams() : super(kVersions.last.size); |
- static ContactsServiceGetPhotoResponseParams deserialize(bindings.Message message) { |
+ static MediaPipeFlushResponseParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -633,11 +626,11 @@ class ContactsServiceGetPhotoResponseParams extends bindings.Struct { |
return result; |
} |
- static ContactsServiceGetPhotoResponseParams decode(bindings.Decoder decoder0) { |
+ static MediaPipeFlushResponseParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- ContactsServiceGetPhotoResponseParams result = new ContactsServiceGetPhotoResponseParams(); |
+ MediaPipeFlushResponseParams result = new MediaPipeFlushResponseParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -659,7 +652,11 @@ class ContactsServiceGetPhotoResponseParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.photoUrl = decoder0.decodeString(8, true); |
+ result.result = media_common_mojom.MediaResult.decode(decoder0, 8); |
+ if (result.result == null) { |
+ throw new bindings.MojoCodecError( |
+ 'Trying to decode null union for non-nullable media_common_mojom.MediaResult.'); |
+ } |
} |
return result; |
} |
@@ -667,74 +664,52 @@ class ContactsServiceGetPhotoResponseParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeString(photoUrl, 8, true); |
+ encoder0.encodeEnum(result, 8); |
} |
String toString() { |
- return "ContactsServiceGetPhotoResponseParams(" |
- "photoUrl: $photoUrl" ")"; |
+ return "MediaPipeFlushResponseParams(" |
+ "result: $result" ")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["photoUrl"] = photoUrl; |
+ map["result"] = result; |
return map; |
} |
} |
-const int _ContactsService_getCountName = 0; |
-const int _ContactsService_getName = 1; |
-const int _ContactsService_getEmailsName = 2; |
-const int _ContactsService_getPhotoName = 3; |
- |
-abstract class ContactsService { |
- static const String serviceName = "contacts::ContactsService"; |
- dynamic getCount(String filter,[Function responseFactory = null]); |
- dynamic get(String filter,int offset,int limit,[Function responseFactory = null]); |
- dynamic getEmails(int id,[Function responseFactory = null]); |
- dynamic getPhoto(int id,bool highResolution,[Function responseFactory = null]); |
+const int _MediaPipe_getStateName = 0; |
+const int _MediaPipe_sendPacketName = 1; |
+const int _MediaPipe_flushName = 2; |
+ |
+abstract class MediaPipe { |
+ static const String serviceName = null; |
+ dynamic getState([Function responseFactory = null]); |
+ dynamic sendPacket(MediaPacket packet,[Function responseFactory = null]); |
+ dynamic flush([Function responseFactory = null]); |
} |
-class _ContactsServiceProxyImpl extends bindings.Proxy { |
- _ContactsServiceProxyImpl.fromEndpoint( |
+class _MediaPipeProxyImpl extends bindings.Proxy { |
+ _MediaPipeProxyImpl.fromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
- _ContactsServiceProxyImpl.fromHandle(core.MojoHandle handle) : |
+ _MediaPipeProxyImpl.fromHandle(core.MojoHandle handle) : |
super.fromHandle(handle); |
- _ContactsServiceProxyImpl.unbound() : super.unbound(); |
+ _MediaPipeProxyImpl.unbound() : super.unbound(); |
- static _ContactsServiceProxyImpl newFromEndpoint( |
+ static _MediaPipeProxyImpl newFromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For _ContactsServiceProxyImpl")); |
- return new _ContactsServiceProxyImpl.fromEndpoint(endpoint); |
+ assert(endpoint.setDescription("For _MediaPipeProxyImpl")); |
+ return new _MediaPipeProxyImpl.fromEndpoint(endpoint); |
} |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
- case _ContactsService_getCountName: |
- var r = ContactsServiceGetCountResponseParams.deserialize( |
- message.payload); |
- if (!message.header.hasRequestId) { |
- proxyError("Expected a message with a valid request Id."); |
- return; |
- } |
- Completer c = completerMap[message.header.requestId]; |
- if (c == null) { |
- proxyError( |
- "Message had unknown request Id: ${message.header.requestId}"); |
- return; |
- } |
- completerMap.remove(message.header.requestId); |
- if (c.isCompleted) { |
- proxyError("Response completer already completed"); |
- return; |
- } |
- c.complete(r); |
- break; |
- case _ContactsService_getName: |
- var r = ContactsServiceGetResponseParams.deserialize( |
+ case _MediaPipe_getStateName: |
+ var r = MediaPipeGetStateResponseParams.deserialize( |
message.payload); |
if (!message.header.hasRequestId) { |
proxyError("Expected a message with a valid request Id."); |
@@ -753,8 +728,8 @@ class _ContactsServiceProxyImpl extends bindings.Proxy { |
} |
c.complete(r); |
break; |
- case _ContactsService_getEmailsName: |
- var r = ContactsServiceGetEmailsResponseParams.deserialize( |
+ case _MediaPipe_sendPacketName: |
+ var r = MediaPipeSendPacketResponseParams.deserialize( |
message.payload); |
if (!message.header.hasRequestId) { |
proxyError("Expected a message with a valid request Id."); |
@@ -773,8 +748,8 @@ class _ContactsServiceProxyImpl extends bindings.Proxy { |
} |
c.complete(r); |
break; |
- case _ContactsService_getPhotoName: |
- var r = ContactsServiceGetPhotoResponseParams.deserialize( |
+ case _MediaPipe_flushName: |
+ var r = MediaPipeFlushResponseParams.deserialize( |
message.payload); |
if (!message.header.hasRequestId) { |
proxyError("Expected a message with a valid request Id."); |
@@ -802,95 +777,81 @@ class _ContactsServiceProxyImpl extends bindings.Proxy { |
String toString() { |
var superString = super.toString(); |
- return "_ContactsServiceProxyImpl($superString)"; |
+ return "_MediaPipeProxyImpl($superString)"; |
} |
} |
-class _ContactsServiceProxyCalls implements ContactsService { |
- _ContactsServiceProxyImpl _proxyImpl; |
+class _MediaPipeProxyCalls implements MediaPipe { |
+ _MediaPipeProxyImpl _proxyImpl; |
- _ContactsServiceProxyCalls(this._proxyImpl); |
- dynamic getCount(String filter,[Function responseFactory = null]) { |
- var params = new _ContactsServiceGetCountParams(); |
- params.filter = filter; |
+ _MediaPipeProxyCalls(this._proxyImpl); |
+ dynamic getState([Function responseFactory = null]) { |
+ var params = new _MediaPipeGetStateParams(); |
return _proxyImpl.sendMessageWithRequestId( |
params, |
- _ContactsService_getCountName, |
+ _MediaPipe_getStateName, |
-1, |
bindings.MessageHeader.kMessageExpectsResponse); |
} |
- dynamic get(String filter,int offset,int limit,[Function responseFactory = null]) { |
- var params = new _ContactsServiceGetParams(); |
- params.filter = filter; |
- params.offset = offset; |
- params.limit = limit; |
+ dynamic sendPacket(MediaPacket packet,[Function responseFactory = null]) { |
+ var params = new _MediaPipeSendPacketParams(); |
+ params.packet = packet; |
return _proxyImpl.sendMessageWithRequestId( |
params, |
- _ContactsService_getName, |
+ _MediaPipe_sendPacketName, |
-1, |
bindings.MessageHeader.kMessageExpectsResponse); |
} |
- dynamic getEmails(int id,[Function responseFactory = null]) { |
- var params = new _ContactsServiceGetEmailsParams(); |
- params.id = id; |
+ dynamic flush([Function responseFactory = null]) { |
+ var params = new _MediaPipeFlushParams(); |
return _proxyImpl.sendMessageWithRequestId( |
params, |
- _ContactsService_getEmailsName, |
- -1, |
- bindings.MessageHeader.kMessageExpectsResponse); |
- } |
- dynamic getPhoto(int id,bool highResolution,[Function responseFactory = null]) { |
- var params = new _ContactsServiceGetPhotoParams(); |
- params.id = id; |
- params.highResolution = highResolution; |
- return _proxyImpl.sendMessageWithRequestId( |
- params, |
- _ContactsService_getPhotoName, |
+ _MediaPipe_flushName, |
-1, |
bindings.MessageHeader.kMessageExpectsResponse); |
} |
} |
-class ContactsServiceProxy implements bindings.ProxyBase { |
+class MediaPipeProxy implements bindings.ProxyBase { |
final bindings.Proxy impl; |
- ContactsService ptr; |
+ MediaPipe ptr; |
- ContactsServiceProxy(_ContactsServiceProxyImpl proxyImpl) : |
+ MediaPipeProxy(_MediaPipeProxyImpl proxyImpl) : |
impl = proxyImpl, |
- ptr = new _ContactsServiceProxyCalls(proxyImpl); |
+ ptr = new _MediaPipeProxyCalls(proxyImpl); |
- ContactsServiceProxy.fromEndpoint( |
+ MediaPipeProxy.fromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) : |
- impl = new _ContactsServiceProxyImpl.fromEndpoint(endpoint) { |
- ptr = new _ContactsServiceProxyCalls(impl); |
+ impl = new _MediaPipeProxyImpl.fromEndpoint(endpoint) { |
+ ptr = new _MediaPipeProxyCalls(impl); |
} |
- ContactsServiceProxy.fromHandle(core.MojoHandle handle) : |
- impl = new _ContactsServiceProxyImpl.fromHandle(handle) { |
- ptr = new _ContactsServiceProxyCalls(impl); |
+ MediaPipeProxy.fromHandle(core.MojoHandle handle) : |
+ impl = new _MediaPipeProxyImpl.fromHandle(handle) { |
+ ptr = new _MediaPipeProxyCalls(impl); |
} |
- ContactsServiceProxy.unbound() : |
- impl = new _ContactsServiceProxyImpl.unbound() { |
- ptr = new _ContactsServiceProxyCalls(impl); |
+ MediaPipeProxy.unbound() : |
+ impl = new _MediaPipeProxyImpl.unbound() { |
+ ptr = new _MediaPipeProxyCalls(impl); |
} |
- factory ContactsServiceProxy.connectToService( |
+ factory MediaPipeProxy.connectToService( |
bindings.ServiceConnector s, String url, [String serviceName]) { |
- ContactsServiceProxy p = new ContactsServiceProxy.unbound(); |
+ MediaPipeProxy p = new MediaPipeProxy.unbound(); |
s.connectToService(url, p, serviceName); |
return p; |
} |
- static ContactsServiceProxy newFromEndpoint( |
+ static MediaPipeProxy newFromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For ContactsServiceProxy")); |
- return new ContactsServiceProxy.fromEndpoint(endpoint); |
+ assert(endpoint.setDescription("For MediaPipeProxy")); |
+ return new MediaPipeProxy.fromEndpoint(endpoint); |
} |
- String get serviceName => ContactsService.serviceName; |
+ String get serviceName => MediaPipe.serviceName; |
Future close({bool immediate: false}) => impl.close(immediate: immediate); |
@@ -907,48 +868,43 @@ class ContactsServiceProxy implements bindings.ProxyBase { |
} |
String toString() { |
- return "ContactsServiceProxy($impl)"; |
+ return "MediaPipeProxy($impl)"; |
} |
} |
-class ContactsServiceStub extends bindings.Stub { |
- ContactsService _impl = null; |
+class MediaPipeStub extends bindings.Stub { |
+ MediaPipe _impl = null; |
- ContactsServiceStub.fromEndpoint( |
+ MediaPipeStub.fromEndpoint( |
core.MojoMessagePipeEndpoint endpoint, [this._impl]) |
: super.fromEndpoint(endpoint); |
- ContactsServiceStub.fromHandle(core.MojoHandle handle, [this._impl]) |
+ MediaPipeStub.fromHandle(core.MojoHandle handle, [this._impl]) |
: super.fromHandle(handle); |
- ContactsServiceStub.unbound() : super.unbound(); |
+ MediaPipeStub.unbound() : super.unbound(); |
- static ContactsServiceStub newFromEndpoint( |
+ static MediaPipeStub newFromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For ContactsServiceStub")); |
- return new ContactsServiceStub.fromEndpoint(endpoint); |
+ assert(endpoint.setDescription("For MediaPipeStub")); |
+ return new MediaPipeStub.fromEndpoint(endpoint); |
} |
- ContactsServiceGetCountResponseParams _ContactsServiceGetCountResponseParamsFactory(int count) { |
- var mojo_factory_result = new ContactsServiceGetCountResponseParams(); |
- mojo_factory_result.count = count; |
- return mojo_factory_result; |
- } |
- ContactsServiceGetResponseParams _ContactsServiceGetResponseParamsFactory(List<Contact> contacts) { |
- var mojo_factory_result = new ContactsServiceGetResponseParams(); |
- mojo_factory_result.contacts = contacts; |
+ MediaPipeGetStateResponseParams _MediaPipeGetStateResponseParamsFactory(MediaPipeState state) { |
+ var mojo_factory_result = new MediaPipeGetStateResponseParams(); |
+ mojo_factory_result.state = state; |
return mojo_factory_result; |
} |
- ContactsServiceGetEmailsResponseParams _ContactsServiceGetEmailsResponseParamsFactory(List<String> emails) { |
- var mojo_factory_result = new ContactsServiceGetEmailsResponseParams(); |
- mojo_factory_result.emails = emails; |
+ MediaPipeSendPacketResponseParams _MediaPipeSendPacketResponseParamsFactory(media_common_mojom.MediaResult result) { |
+ var mojo_factory_result = new MediaPipeSendPacketResponseParams(); |
+ mojo_factory_result.result = result; |
return mojo_factory_result; |
} |
- ContactsServiceGetPhotoResponseParams _ContactsServiceGetPhotoResponseParamsFactory(String photoUrl) { |
- var mojo_factory_result = new ContactsServiceGetPhotoResponseParams(); |
- mojo_factory_result.photoUrl = photoUrl; |
+ MediaPipeFlushResponseParams _MediaPipeFlushResponseParamsFactory(media_common_mojom.MediaResult result) { |
+ var mojo_factory_result = new MediaPipeFlushResponseParams(); |
+ mojo_factory_result.result = result; |
return mojo_factory_result; |
} |
@@ -960,38 +916,16 @@ class ContactsServiceStub extends bindings.Stub { |
} |
assert(_impl != null); |
switch (message.header.type) { |
- case _ContactsService_getCountName: |
- var params = _ContactsServiceGetCountParams.deserialize( |
- message.payload); |
- var response = _impl.getCount(params.filter,_ContactsServiceGetCountResponseParamsFactory); |
- if (response is Future) { |
- return response.then((response) { |
- if (response != null) { |
- return buildResponseWithId( |
- response, |
- _ContactsService_getCountName, |
- message.header.requestId, |
- bindings.MessageHeader.kMessageIsResponse); |
- } |
- }); |
- } else if (response != null) { |
- return buildResponseWithId( |
- response, |
- _ContactsService_getCountName, |
- message.header.requestId, |
- bindings.MessageHeader.kMessageIsResponse); |
- } |
- break; |
- case _ContactsService_getName: |
- var params = _ContactsServiceGetParams.deserialize( |
+ case _MediaPipe_getStateName: |
+ var params = _MediaPipeGetStateParams.deserialize( |
message.payload); |
- var response = _impl.get(params.filter,params.offset,params.limit,_ContactsServiceGetResponseParamsFactory); |
+ var response = _impl.getState(_MediaPipeGetStateResponseParamsFactory); |
if (response is Future) { |
return response.then((response) { |
if (response != null) { |
return buildResponseWithId( |
response, |
- _ContactsService_getName, |
+ _MediaPipe_getStateName, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
@@ -999,21 +933,21 @@ class ContactsServiceStub extends bindings.Stub { |
} else if (response != null) { |
return buildResponseWithId( |
response, |
- _ContactsService_getName, |
+ _MediaPipe_getStateName, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
break; |
- case _ContactsService_getEmailsName: |
- var params = _ContactsServiceGetEmailsParams.deserialize( |
+ case _MediaPipe_sendPacketName: |
+ var params = _MediaPipeSendPacketParams.deserialize( |
message.payload); |
- var response = _impl.getEmails(params.id,_ContactsServiceGetEmailsResponseParamsFactory); |
+ var response = _impl.sendPacket(params.packet,_MediaPipeSendPacketResponseParamsFactory); |
if (response is Future) { |
return response.then((response) { |
if (response != null) { |
return buildResponseWithId( |
response, |
- _ContactsService_getEmailsName, |
+ _MediaPipe_sendPacketName, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
@@ -1021,21 +955,21 @@ class ContactsServiceStub extends bindings.Stub { |
} else if (response != null) { |
return buildResponseWithId( |
response, |
- _ContactsService_getEmailsName, |
+ _MediaPipe_sendPacketName, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
break; |
- case _ContactsService_getPhotoName: |
- var params = _ContactsServiceGetPhotoParams.deserialize( |
+ case _MediaPipe_flushName: |
+ var params = _MediaPipeFlushParams.deserialize( |
message.payload); |
- var response = _impl.getPhoto(params.id,params.highResolution,_ContactsServiceGetPhotoResponseParamsFactory); |
+ var response = _impl.flush(_MediaPipeFlushResponseParamsFactory); |
if (response is Future) { |
return response.then((response) { |
if (response != null) { |
return buildResponseWithId( |
response, |
- _ContactsService_getPhotoName, |
+ _MediaPipe_flushName, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
@@ -1043,7 +977,7 @@ class ContactsServiceStub extends bindings.Stub { |
} else if (response != null) { |
return buildResponseWithId( |
response, |
- _ContactsService_getPhotoName, |
+ _MediaPipe_flushName, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
@@ -1055,15 +989,15 @@ class ContactsServiceStub extends bindings.Stub { |
return null; |
} |
- ContactsService get impl => _impl; |
- set impl(ContactsService d) { |
+ MediaPipe get impl => _impl; |
+ set impl(MediaPipe d) { |
assert(_impl == null); |
_impl = d; |
} |
String toString() { |
var superString = super.toString(); |
- return "ContactsServiceStub($superString)"; |
+ return "MediaPipeStub($superString)"; |
} |
int get version => 0; |