Index: mojo/dart/packages/mojo_services/lib/mojo/media/media_sink.mojom.dart |
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/test/pingpong_service.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/media/media_sink.mojom.dart |
similarity index 53% |
copy from mojo/dart/packages/_mojo_for_test_only/lib/test/pingpong_service.mojom.dart |
copy to mojo/dart/packages/mojo_services/lib/mojo/media/media_sink.mojom.dart |
index 0a228a4735aca79d2bc7541941a663b1398fa2e0..537f3305d44a3c0cd0231fd6130276413f2a04d6 100644 |
--- a/mojo/dart/packages/_mojo_for_test_only/lib/test/pingpong_service.mojom.dart |
+++ b/mojo/dart/packages/mojo_services/lib/mojo/media/media_sink.mojom.dart |
@@ -2,24 +2,31 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-library pingpong_service_mojom; |
+library media_sink_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_clock.mojom.dart' as media_clock_mojom; |
+import 'package:mojo_services/mojo/media/media_common.mojom.dart' as media_common_mojom; |
+import 'package:mojo_services/mojo/media/media_state.mojom.dart' as media_state_mojom; |
+import 'package:mojo_services/mojo/media/media_transport.mojom.dart' as media_transport_mojom; |
+import 'package:mojo_services/mojo/media/media_types.mojom.dart' as media_types_mojom; |
+import 'package:mojo_services/mojo/media/rate_control.mojom.dart' as rate_control_mojom; |
-class PingPongServiceSetClientParams extends bindings.Struct { |
+class MediaSinkStatus extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(16, 0) |
+ const bindings.StructDataHeader(24, 0) |
]; |
- Object client = null; |
+ media_state_mojom.MediaState state = null; |
+ rate_control_mojom.TimelineTransform timelineTransform = null; |
- PingPongServiceSetClientParams() : super(kVersions.last.size); |
+ MediaSinkStatus() : super(kVersions.last.size); |
- static PingPongServiceSetClientParams deserialize(bindings.Message message) { |
+ static MediaSinkStatus deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -28,11 +35,11 @@ class PingPongServiceSetClientParams extends bindings.Struct { |
return result; |
} |
- static PingPongServiceSetClientParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkStatus decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongServiceSetClientParams result = new PingPongServiceSetClientParams(); |
+ MediaSinkStatus result = new MediaSinkStatus(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -54,7 +61,16 @@ class PingPongServiceSetClientParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.client = decoder0.decodeServiceInterface(8, false, PingPongClientProxy.newFromEndpoint); |
+ result.state = media_state_mojom.MediaState.decode(decoder0, 8); |
+ if (result.state == null) { |
+ throw new bindings.MojoCodecError( |
+ 'Trying to decode null union for non-nullable media_state_mojom.MediaState.'); |
+ } |
+ } |
+ if (mainDataHeader.version >= 0) { |
+ |
+ var decoder1 = decoder0.decodePointer(16, true); |
+ result.timelineTransform = rate_control_mojom.TimelineTransform.decode(decoder1); |
} |
return result; |
} |
@@ -62,30 +78,93 @@ class PingPongServiceSetClientParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeInterface(client, 8, false); |
+ encoder0.encodeEnum(state, 8); |
+ |
+ encoder0.encodeStruct(timelineTransform, 16, true); |
} |
String toString() { |
- return "PingPongServiceSetClientParams(" |
- "client: $client" ")"; |
+ return "MediaSinkStatus(" |
+ "state: $state" ", " |
+ "timelineTransform: $timelineTransform" ")"; |
} |
Map toJson() { |
- throw new bindings.MojoCodecError( |
- 'Object containing handles cannot be encoded to JSON.'); |
+ Map map = new Map(); |
+ map["state"] = state; |
+ map["timelineTransform"] = timelineTransform; |
+ return map; |
+ } |
+} |
+ |
+ |
+class MediaSinkGetClockDispositionParams extends bindings.Struct { |
+ static const List<bindings.StructDataHeader> kVersions = const [ |
+ const bindings.StructDataHeader(8, 0) |
+ ]; |
+ |
+ MediaSinkGetClockDispositionParams() : super(kVersions.last.size); |
+ |
+ static MediaSinkGetClockDispositionParams deserialize(bindings.Message message) { |
+ var decoder = new bindings.Decoder(message); |
+ var result = decode(decoder); |
+ if (decoder.excessHandles != null) { |
+ decoder.excessHandles.forEach((h) => h.close()); |
+ } |
+ return result; |
+ } |
+ |
+ static MediaSinkGetClockDispositionParams decode(bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ MediaSinkGetClockDispositionParams result = new MediaSinkGetClockDispositionParams(); |
+ |
+ var mainDataHeader = decoder0.decodeStructDataHeader(); |
+ if (mainDataHeader.version <= kVersions.last.version) { |
+ // Scan in reverse order to optimize for more recent versions. |
+ for (int i = kVersions.length - 1; i >= 0; --i) { |
+ if (mainDataHeader.version >= kVersions[i].version) { |
+ if (mainDataHeader.size == kVersions[i].size) { |
+ // Found a match. |
+ break; |
+ } |
+ throw new bindings.MojoCodecError( |
+ 'Header size doesn\'t correspond to known version size.'); |
+ } |
+ } |
+ } else if (mainDataHeader.size < kVersions.last.size) { |
+ throw new bindings.MojoCodecError( |
+ 'Message newer than the last known version cannot be shorter than ' |
+ 'required by the last known version.'); |
+ } |
+ return result; |
+ } |
+ |
+ void encode(bindings.Encoder encoder) { |
+ encoder.getStructEncoderAtOffset(kVersions.last); |
+ } |
+ |
+ String toString() { |
+ return "MediaSinkGetClockDispositionParams("")"; |
+ } |
+ |
+ Map toJson() { |
+ Map map = new Map(); |
+ return map; |
} |
} |
-class PingPongServicePingParams extends bindings.Struct { |
+class MediaSinkGetClockDispositionResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(16, 0) |
]; |
- int pingValue = 0; |
+ media_clock_mojom.ClockDisposition clockDisposition = null; |
- PingPongServicePingParams() : super(kVersions.last.size); |
+ MediaSinkGetClockDispositionResponseParams() : super(kVersions.last.size); |
- static PingPongServicePingParams deserialize(bindings.Message message) { |
+ static MediaSinkGetClockDispositionResponseParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -94,11 +173,11 @@ class PingPongServicePingParams extends bindings.Struct { |
return result; |
} |
- static PingPongServicePingParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkGetClockDispositionResponseParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongServicePingParams result = new PingPongServicePingParams(); |
+ MediaSinkGetClockDispositionResponseParams result = new MediaSinkGetClockDispositionResponseParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -120,7 +199,11 @@ class PingPongServicePingParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.pingValue = decoder0.decodeUint16(8); |
+ result.clockDisposition = media_clock_mojom.ClockDisposition.decode(decoder0, 8); |
+ if (result.clockDisposition == null) { |
+ throw new bindings.MojoCodecError( |
+ 'Trying to decode null union for non-nullable media_clock_mojom.ClockDisposition.'); |
+ } |
} |
return result; |
} |
@@ -128,32 +211,31 @@ class PingPongServicePingParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeUint16(pingValue, 8); |
+ encoder0.encodeEnum(clockDisposition, 8); |
} |
String toString() { |
- return "PingPongServicePingParams(" |
- "pingValue: $pingValue" ")"; |
+ return "MediaSinkGetClockDispositionResponseParams(" |
+ "clockDisposition: $clockDisposition" ")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["pingValue"] = pingValue; |
+ map["clockDisposition"] = clockDisposition; |
return map; |
} |
} |
-class PingPongServicePingTargetUrlParams extends bindings.Struct { |
+class MediaSinkGetMasterClockParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(24, 0) |
+ const bindings.StructDataHeader(16, 0) |
]; |
- String url = null; |
- int count = 0; |
+ Object masterClock = null; |
- PingPongServicePingTargetUrlParams() : super(kVersions.last.size); |
+ MediaSinkGetMasterClockParams() : super(kVersions.last.size); |
- static PingPongServicePingTargetUrlParams deserialize(bindings.Message message) { |
+ static MediaSinkGetMasterClockParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -162,11 +244,11 @@ class PingPongServicePingTargetUrlParams extends bindings.Struct { |
return result; |
} |
- static PingPongServicePingTargetUrlParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkGetMasterClockParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongServicePingTargetUrlParams result = new PingPongServicePingTargetUrlParams(); |
+ MediaSinkGetMasterClockParams result = new MediaSinkGetMasterClockParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -188,11 +270,7 @@ class PingPongServicePingTargetUrlParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.url = decoder0.decodeString(8, false); |
- } |
- if (mainDataHeader.version >= 0) { |
- |
- result.count = decoder0.decodeUint16(16); |
+ result.masterClock = decoder0.decodeInterfaceRequest(8, false, media_clock_mojom.ClockStub.newFromEndpoint); |
} |
return result; |
} |
@@ -200,35 +278,30 @@ class PingPongServicePingTargetUrlParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeString(url, 8, false); |
- |
- encoder0.encodeUint16(count, 16); |
+ encoder0.encodeInterfaceRequest(masterClock, 8, false); |
} |
String toString() { |
- return "PingPongServicePingTargetUrlParams(" |
- "url: $url" ", " |
- "count: $count" ")"; |
+ return "MediaSinkGetMasterClockParams(" |
+ "masterClock: $masterClock" ")"; |
} |
Map toJson() { |
- Map map = new Map(); |
- map["url"] = url; |
- map["count"] = count; |
- return map; |
+ throw new bindings.MojoCodecError( |
+ 'Object containing handles cannot be encoded to JSON.'); |
} |
} |
-class PingPongServicePingTargetUrlResponseParams extends bindings.Struct { |
+class MediaSinkSetMasterClockParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(16, 0) |
]; |
- bool ok = false; |
+ Object masterClock = null; |
- PingPongServicePingTargetUrlResponseParams() : super(kVersions.last.size); |
+ MediaSinkSetMasterClockParams() : super(kVersions.last.size); |
- static PingPongServicePingTargetUrlResponseParams deserialize(bindings.Message message) { |
+ static MediaSinkSetMasterClockParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -237,11 +310,11 @@ class PingPongServicePingTargetUrlResponseParams extends bindings.Struct { |
return result; |
} |
- static PingPongServicePingTargetUrlResponseParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkSetMasterClockParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongServicePingTargetUrlResponseParams result = new PingPongServicePingTargetUrlResponseParams(); |
+ MediaSinkSetMasterClockParams result = new MediaSinkSetMasterClockParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -263,7 +336,7 @@ class PingPongServicePingTargetUrlResponseParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.ok = decoder0.decodeBool(8, 0); |
+ result.masterClock = decoder0.decodeServiceInterface(8, true, media_clock_mojom.ClockProxy.newFromEndpoint); |
} |
return result; |
} |
@@ -271,32 +344,30 @@ class PingPongServicePingTargetUrlResponseParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeBool(ok, 8, 0); |
+ encoder0.encodeInterface(masterClock, 8, true); |
} |
String toString() { |
- return "PingPongServicePingTargetUrlResponseParams(" |
- "ok: $ok" ")"; |
+ return "MediaSinkSetMasterClockParams(" |
+ "masterClock: $masterClock" ")"; |
} |
Map toJson() { |
- Map map = new Map(); |
- map["ok"] = ok; |
- return map; |
+ throw new bindings.MojoCodecError( |
+ 'Object containing handles cannot be encoded to JSON.'); |
} |
} |
-class PingPongServicePingTargetServiceParams extends bindings.Struct { |
+class MediaSinkGetConsumerParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(24, 0) |
+ const bindings.StructDataHeader(16, 0) |
]; |
- Object service = null; |
- int count = 0; |
+ Object consumer = null; |
- PingPongServicePingTargetServiceParams() : super(kVersions.last.size); |
+ MediaSinkGetConsumerParams() : super(kVersions.last.size); |
- static PingPongServicePingTargetServiceParams deserialize(bindings.Message message) { |
+ static MediaSinkGetConsumerParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -305,11 +376,11 @@ class PingPongServicePingTargetServiceParams extends bindings.Struct { |
return result; |
} |
- static PingPongServicePingTargetServiceParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkGetConsumerParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongServicePingTargetServiceParams result = new PingPongServicePingTargetServiceParams(); |
+ MediaSinkGetConsumerParams result = new MediaSinkGetConsumerParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -331,11 +402,7 @@ class PingPongServicePingTargetServiceParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.service = decoder0.decodeServiceInterface(8, false, PingPongServiceProxy.newFromEndpoint); |
- } |
- if (mainDataHeader.version >= 0) { |
- |
- result.count = decoder0.decodeUint16(16); |
+ result.consumer = decoder0.decodeInterfaceRequest(8, false, media_transport_mojom.MediaConsumerStub.newFromEndpoint); |
} |
return result; |
} |
@@ -343,15 +410,12 @@ class PingPongServicePingTargetServiceParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeInterface(service, 8, false); |
- |
- encoder0.encodeUint16(count, 16); |
+ encoder0.encodeInterfaceRequest(consumer, 8, false); |
} |
String toString() { |
- return "PingPongServicePingTargetServiceParams(" |
- "service: $service" ", " |
- "count: $count" ")"; |
+ return "MediaSinkGetConsumerParams(" |
+ "consumer: $consumer" ")"; |
} |
Map toJson() { |
@@ -361,15 +425,15 @@ class PingPongServicePingTargetServiceParams extends bindings.Struct { |
} |
-class PingPongServicePingTargetServiceResponseParams extends bindings.Struct { |
+class MediaSinkGetStatusParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(16, 0) |
]; |
- bool ok = false; |
+ int versionLastSeen = 0; |
- PingPongServicePingTargetServiceResponseParams() : super(kVersions.last.size); |
+ MediaSinkGetStatusParams() : super(kVersions.last.size); |
- static PingPongServicePingTargetServiceResponseParams deserialize(bindings.Message message) { |
+ static MediaSinkGetStatusParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -378,11 +442,11 @@ class PingPongServicePingTargetServiceResponseParams extends bindings.Struct { |
return result; |
} |
- static PingPongServicePingTargetServiceResponseParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkGetStatusParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongServicePingTargetServiceResponseParams result = new PingPongServicePingTargetServiceResponseParams(); |
+ MediaSinkGetStatusParams result = new MediaSinkGetStatusParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -404,7 +468,7 @@ class PingPongServicePingTargetServiceResponseParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.ok = decoder0.decodeBool(8, 0); |
+ result.versionLastSeen = decoder0.decodeUint64(8); |
} |
return result; |
} |
@@ -412,31 +476,32 @@ class PingPongServicePingTargetServiceResponseParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeBool(ok, 8, 0); |
+ encoder0.encodeUint64(versionLastSeen, 8); |
} |
String toString() { |
- return "PingPongServicePingTargetServiceResponseParams(" |
- "ok: $ok" ")"; |
+ return "MediaSinkGetStatusParams(" |
+ "versionLastSeen: $versionLastSeen" ")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["ok"] = ok; |
+ map["versionLastSeen"] = versionLastSeen; |
return map; |
} |
} |
-class PingPongServiceGetPingPongServiceParams extends bindings.Struct { |
+class MediaSinkGetStatusResponseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(16, 0) |
+ const bindings.StructDataHeader(24, 0) |
]; |
- Object service = null; |
+ int version = 0; |
+ MediaSinkStatus status = null; |
- PingPongServiceGetPingPongServiceParams() : super(kVersions.last.size); |
+ MediaSinkGetStatusResponseParams() : super(kVersions.last.size); |
- static PingPongServiceGetPingPongServiceParams deserialize(bindings.Message message) { |
+ static MediaSinkGetStatusResponseParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -445,11 +510,11 @@ class PingPongServiceGetPingPongServiceParams extends bindings.Struct { |
return result; |
} |
- static PingPongServiceGetPingPongServiceParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkGetStatusResponseParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongServiceGetPingPongServiceParams result = new PingPongServiceGetPingPongServiceParams(); |
+ MediaSinkGetStatusResponseParams result = new MediaSinkGetStatusResponseParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -471,7 +536,12 @@ class PingPongServiceGetPingPongServiceParams extends bindings.Struct { |
} |
if (mainDataHeader.version >= 0) { |
- result.service = decoder0.decodeInterfaceRequest(8, false, PingPongServiceStub.newFromEndpoint); |
+ result.version = decoder0.decodeUint64(8); |
+ } |
+ if (mainDataHeader.version >= 0) { |
+ |
+ var decoder1 = decoder0.decodePointer(16, false); |
+ result.status = MediaSinkStatus.decode(decoder1); |
} |
return result; |
} |
@@ -479,29 +549,34 @@ class PingPongServiceGetPingPongServiceParams extends bindings.Struct { |
void encode(bindings.Encoder encoder) { |
var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- encoder0.encodeInterfaceRequest(service, 8, false); |
+ encoder0.encodeUint64(version, 8); |
+ |
+ encoder0.encodeStruct(status, 16, false); |
} |
String toString() { |
- return "PingPongServiceGetPingPongServiceParams(" |
- "service: $service" ")"; |
+ return "MediaSinkGetStatusResponseParams(" |
+ "version: $version" ", " |
+ "status: $status" ")"; |
} |
Map toJson() { |
- throw new bindings.MojoCodecError( |
- 'Object containing handles cannot be encoded to JSON.'); |
+ Map map = new Map(); |
+ map["version"] = version; |
+ map["status"] = status; |
+ return map; |
} |
} |
-class PingPongServiceQuitParams extends bindings.Struct { |
+class MediaSinkPlayParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
const bindings.StructDataHeader(8, 0) |
]; |
- PingPongServiceQuitParams() : super(kVersions.last.size); |
+ MediaSinkPlayParams() : super(kVersions.last.size); |
- static PingPongServiceQuitParams deserialize(bindings.Message message) { |
+ static MediaSinkPlayParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -510,11 +585,11 @@ class PingPongServiceQuitParams extends bindings.Struct { |
return result; |
} |
- static PingPongServiceQuitParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkPlayParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongServiceQuitParams result = new PingPongServiceQuitParams(); |
+ MediaSinkPlayParams result = new MediaSinkPlayParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -542,7 +617,7 @@ class PingPongServiceQuitParams extends bindings.Struct { |
} |
String toString() { |
- return "PingPongServiceQuitParams("")"; |
+ return "MediaSinkPlayParams("")"; |
} |
Map toJson() { |
@@ -552,15 +627,14 @@ class PingPongServiceQuitParams extends bindings.Struct { |
} |
-class PingPongClientPongParams extends bindings.Struct { |
+class MediaSinkPauseParams extends bindings.Struct { |
static const List<bindings.StructDataHeader> kVersions = const [ |
- const bindings.StructDataHeader(16, 0) |
+ const bindings.StructDataHeader(8, 0) |
]; |
- int pongValue = 0; |
- PingPongClientPongParams() : super(kVersions.last.size); |
+ MediaSinkPauseParams() : super(kVersions.last.size); |
- static PingPongClientPongParams deserialize(bindings.Message message) { |
+ static MediaSinkPauseParams deserialize(bindings.Message message) { |
var decoder = new bindings.Decoder(message); |
var result = decode(decoder); |
if (decoder.excessHandles != null) { |
@@ -569,11 +643,11 @@ class PingPongClientPongParams extends bindings.Struct { |
return result; |
} |
- static PingPongClientPongParams decode(bindings.Decoder decoder0) { |
+ static MediaSinkPauseParams decode(bindings.Decoder decoder0) { |
if (decoder0 == null) { |
return null; |
} |
- PingPongClientPongParams result = new PingPongClientPongParams(); |
+ MediaSinkPauseParams result = new MediaSinkPauseParams(); |
var mainDataHeader = decoder0.decodeStructDataHeader(); |
if (mainDataHeader.version <= kVersions.last.version) { |
@@ -593,71 +667,65 @@ class PingPongClientPongParams 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.pongValue = decoder0.decodeUint16(8); |
- } |
return result; |
} |
void encode(bindings.Encoder encoder) { |
- var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last); |
- |
- encoder0.encodeUint16(pongValue, 8); |
+ encoder.getStructEncoderAtOffset(kVersions.last); |
} |
String toString() { |
- return "PingPongClientPongParams(" |
- "pongValue: $pongValue" ")"; |
+ return "MediaSinkPauseParams("")"; |
} |
Map toJson() { |
Map map = new Map(); |
- map["pongValue"] = pongValue; |
return map; |
} |
} |
-const int kPingPongService_setClient_name = 0; |
-const int kPingPongService_ping_name = 1; |
-const int kPingPongService_pingTargetUrl_name = 2; |
-const int kPingPongService_pingTargetService_name = 3; |
-const int kPingPongService_getPingPongService_name = 4; |
-const int kPingPongService_quit_name = 5; |
-const String PingPongServiceName = "test::PingPongService"; |
- |
-abstract class PingPongService { |
- void setClient(Object client); |
- void ping(int pingValue); |
- dynamic pingTargetUrl(String url,int count,[Function responseFactory = null]); |
- dynamic pingTargetService(Object service,int count,[Function responseFactory = null]); |
- void getPingPongService(Object service); |
- void quit(); |
+const int kMediaSink_getClockDisposition_name = 0; |
+const int kMediaSink_getMasterClock_name = 1; |
+const int kMediaSink_setMasterClock_name = 2; |
+const int kMediaSink_getConsumer_name = 3; |
+const int kMediaSink_getStatus_name = 4; |
+const int kMediaSink_play_name = 5; |
+const int kMediaSink_pause_name = 6; |
+const String MediaSinkName = null; |
+ |
+abstract class MediaSink { |
+ dynamic getClockDisposition([Function responseFactory = null]); |
+ void getMasterClock(Object masterClock); |
+ void setMasterClock(Object masterClock); |
+ void getConsumer(Object consumer); |
+ dynamic getStatus(int versionLastSeen,[Function responseFactory = null]); |
+ void play(); |
+ void pause(); |
} |
-class PingPongServiceProxyImpl extends bindings.Proxy { |
- PingPongServiceProxyImpl.fromEndpoint( |
+class MediaSinkProxyImpl extends bindings.Proxy { |
+ MediaSinkProxyImpl.fromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
- PingPongServiceProxyImpl.fromHandle(core.MojoHandle handle) : |
+ MediaSinkProxyImpl.fromHandle(core.MojoHandle handle) : |
super.fromHandle(handle); |
- PingPongServiceProxyImpl.unbound() : super.unbound(); |
+ MediaSinkProxyImpl.unbound() : super.unbound(); |
- static PingPongServiceProxyImpl newFromEndpoint( |
+ static MediaSinkProxyImpl newFromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For PingPongServiceProxyImpl")); |
- return new PingPongServiceProxyImpl.fromEndpoint(endpoint); |
+ assert(endpoint.setDescription("For MediaSinkProxyImpl")); |
+ return new MediaSinkProxyImpl.fromEndpoint(endpoint); |
} |
- String get name => PingPongServiceName; |
+ String get name => MediaSinkName; |
void handleResponse(bindings.ServiceMessage message) { |
switch (message.header.type) { |
- case kPingPongService_pingTargetUrl_name: |
- var r = PingPongServicePingTargetUrlResponseParams.deserialize( |
+ case kMediaSink_getClockDisposition_name: |
+ var r = MediaSinkGetClockDispositionResponseParams.deserialize( |
message.payload); |
if (!message.header.hasRequestId) { |
proxyError("Expected a message with a valid request Id."); |
@@ -676,8 +744,8 @@ class PingPongServiceProxyImpl extends bindings.Proxy { |
} |
c.complete(r); |
break; |
- case kPingPongService_pingTargetService_name: |
- var r = PingPongServicePingTargetServiceResponseParams.deserialize( |
+ case kMediaSink_getStatus_name: |
+ var r = MediaSinkGetStatusResponseParams.deserialize( |
message.payload); |
if (!message.header.hasRequestId) { |
proxyError("Expected a message with a valid request Id."); |
@@ -705,113 +773,119 @@ class PingPongServiceProxyImpl extends bindings.Proxy { |
String toString() { |
var superString = super.toString(); |
- return "PingPongServiceProxyImpl($superString)"; |
+ return "MediaSinkProxyImpl($superString)"; |
} |
} |
-class _PingPongServiceProxyCalls implements PingPongService { |
- PingPongServiceProxyImpl _proxyImpl; |
+class _MediaSinkProxyCalls implements MediaSink { |
+ MediaSinkProxyImpl _proxyImpl; |
- _PingPongServiceProxyCalls(this._proxyImpl); |
- void setClient(Object client) { |
+ _MediaSinkProxyCalls(this._proxyImpl); |
+ dynamic getClockDisposition([Function responseFactory = null]) { |
+ var params = new MediaSinkGetClockDispositionParams(); |
+ return _proxyImpl.sendMessageWithRequestId( |
+ params, |
+ kMediaSink_getClockDisposition_name, |
+ -1, |
+ bindings.MessageHeader.kMessageExpectsResponse); |
+ } |
+ void getMasterClock(Object masterClock) { |
if (!_proxyImpl.isBound) { |
_proxyImpl.proxyError("The Proxy is closed."); |
return; |
} |
- var params = new PingPongServiceSetClientParams(); |
- params.client = client; |
- _proxyImpl.sendMessage(params, kPingPongService_setClient_name); |
+ var params = new MediaSinkGetMasterClockParams(); |
+ params.masterClock = masterClock; |
+ _proxyImpl.sendMessage(params, kMediaSink_getMasterClock_name); |
} |
- void ping(int pingValue) { |
+ void setMasterClock(Object masterClock) { |
if (!_proxyImpl.isBound) { |
_proxyImpl.proxyError("The Proxy is closed."); |
return; |
} |
- var params = new PingPongServicePingParams(); |
- params.pingValue = pingValue; |
- _proxyImpl.sendMessage(params, kPingPongService_ping_name); |
+ var params = new MediaSinkSetMasterClockParams(); |
+ params.masterClock = masterClock; |
+ _proxyImpl.sendMessage(params, kMediaSink_setMasterClock_name); |
} |
- dynamic pingTargetUrl(String url,int count,[Function responseFactory = null]) { |
- var params = new PingPongServicePingTargetUrlParams(); |
- params.url = url; |
- params.count = count; |
- return _proxyImpl.sendMessageWithRequestId( |
- params, |
- kPingPongService_pingTargetUrl_name, |
- -1, |
- bindings.MessageHeader.kMessageExpectsResponse); |
+ void getConsumer(Object consumer) { |
+ if (!_proxyImpl.isBound) { |
+ _proxyImpl.proxyError("The Proxy is closed."); |
+ return; |
+ } |
+ var params = new MediaSinkGetConsumerParams(); |
+ params.consumer = consumer; |
+ _proxyImpl.sendMessage(params, kMediaSink_getConsumer_name); |
} |
- dynamic pingTargetService(Object service,int count,[Function responseFactory = null]) { |
- var params = new PingPongServicePingTargetServiceParams(); |
- params.service = service; |
- params.count = count; |
+ |
+ dynamic getStatus(int versionLastSeen,[Function responseFactory = null]) { |
+ var params = new MediaSinkGetStatusParams(); |
+ params.versionLastSeen = versionLastSeen; |
return _proxyImpl.sendMessageWithRequestId( |
params, |
- kPingPongService_pingTargetService_name, |
+ kMediaSink_getStatus_name, |
-1, |
bindings.MessageHeader.kMessageExpectsResponse); |
} |
- void getPingPongService(Object service) { |
+ void play() { |
if (!_proxyImpl.isBound) { |
_proxyImpl.proxyError("The Proxy is closed."); |
return; |
} |
- var params = new PingPongServiceGetPingPongServiceParams(); |
- params.service = service; |
- _proxyImpl.sendMessage(params, kPingPongService_getPingPongService_name); |
+ var params = new MediaSinkPlayParams(); |
+ _proxyImpl.sendMessage(params, kMediaSink_play_name); |
} |
- void quit() { |
+ void pause() { |
if (!_proxyImpl.isBound) { |
_proxyImpl.proxyError("The Proxy is closed."); |
return; |
} |
- var params = new PingPongServiceQuitParams(); |
- _proxyImpl.sendMessage(params, kPingPongService_quit_name); |
+ var params = new MediaSinkPauseParams(); |
+ _proxyImpl.sendMessage(params, kMediaSink_pause_name); |
} |
} |
-class PingPongServiceProxy implements bindings.ProxyBase { |
+class MediaSinkProxy implements bindings.ProxyBase { |
final bindings.Proxy impl; |
- PingPongService ptr; |
- final String name = PingPongServiceName; |
+ MediaSink ptr; |
+ final String name = MediaSinkName; |
- PingPongServiceProxy(PingPongServiceProxyImpl proxyImpl) : |
+ MediaSinkProxy(MediaSinkProxyImpl proxyImpl) : |
impl = proxyImpl, |
- ptr = new _PingPongServiceProxyCalls(proxyImpl); |
+ ptr = new _MediaSinkProxyCalls(proxyImpl); |
- PingPongServiceProxy.fromEndpoint( |
+ MediaSinkProxy.fromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) : |
- impl = new PingPongServiceProxyImpl.fromEndpoint(endpoint) { |
- ptr = new _PingPongServiceProxyCalls(impl); |
+ impl = new MediaSinkProxyImpl.fromEndpoint(endpoint) { |
+ ptr = new _MediaSinkProxyCalls(impl); |
} |
- PingPongServiceProxy.fromHandle(core.MojoHandle handle) : |
- impl = new PingPongServiceProxyImpl.fromHandle(handle) { |
- ptr = new _PingPongServiceProxyCalls(impl); |
+ MediaSinkProxy.fromHandle(core.MojoHandle handle) : |
+ impl = new MediaSinkProxyImpl.fromHandle(handle) { |
+ ptr = new _MediaSinkProxyCalls(impl); |
} |
- PingPongServiceProxy.unbound() : |
- impl = new PingPongServiceProxyImpl.unbound() { |
- ptr = new _PingPongServiceProxyCalls(impl); |
+ MediaSinkProxy.unbound() : |
+ impl = new MediaSinkProxyImpl.unbound() { |
+ ptr = new _MediaSinkProxyCalls(impl); |
} |
- factory PingPongServiceProxy.connectToService( |
- bindings.ServiceConnector s, String url, [String serviceName]) { |
- PingPongServiceProxy p = new PingPongServiceProxy.unbound(); |
- s.connectToService(url, p, serviceName); |
+ factory MediaSinkProxy.connectToService( |
+ bindings.ServiceConnector s, String url) { |
+ MediaSinkProxy p = new MediaSinkProxy.unbound(); |
+ s.connectToService(url, p); |
return p; |
} |
- static PingPongServiceProxy newFromEndpoint( |
+ static MediaSinkProxy newFromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For PingPongServiceProxy")); |
- return new PingPongServiceProxy.fromEndpoint(endpoint); |
+ assert(endpoint.setDescription("For MediaSinkProxy")); |
+ return new MediaSinkProxy.fromEndpoint(endpoint); |
} |
Future close({bool immediate: false}) => impl.close(immediate: immediate); |
@@ -829,40 +903,41 @@ class PingPongServiceProxy implements bindings.ProxyBase { |
} |
String toString() { |
- return "PingPongServiceProxy($impl)"; |
+ return "MediaSinkProxy($impl)"; |
} |
} |
-class PingPongServiceStub extends bindings.Stub { |
- PingPongService _impl = null; |
+class MediaSinkStub extends bindings.Stub { |
+ MediaSink _impl = null; |
- PingPongServiceStub.fromEndpoint( |
+ MediaSinkStub.fromEndpoint( |
core.MojoMessagePipeEndpoint endpoint, [this._impl]) |
: super.fromEndpoint(endpoint); |
- PingPongServiceStub.fromHandle(core.MojoHandle handle, [this._impl]) |
+ MediaSinkStub.fromHandle(core.MojoHandle handle, [this._impl]) |
: super.fromHandle(handle); |
- PingPongServiceStub.unbound() : super.unbound(); |
+ MediaSinkStub.unbound() : super.unbound(); |
- static PingPongServiceStub newFromEndpoint( |
+ static MediaSinkStub newFromEndpoint( |
core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For PingPongServiceStub")); |
- return new PingPongServiceStub.fromEndpoint(endpoint); |
+ assert(endpoint.setDescription("For MediaSinkStub")); |
+ return new MediaSinkStub.fromEndpoint(endpoint); |
} |
- static const String name = PingPongServiceName; |
+ static const String name = MediaSinkName; |
- PingPongServicePingTargetUrlResponseParams _PingPongServicePingTargetUrlResponseParamsFactory(bool ok) { |
- var mojo_factory_result = new PingPongServicePingTargetUrlResponseParams(); |
- mojo_factory_result.ok = ok; |
+ MediaSinkGetClockDispositionResponseParams _MediaSinkGetClockDispositionResponseParamsFactory(media_clock_mojom.ClockDisposition clockDisposition) { |
+ var mojo_factory_result = new MediaSinkGetClockDispositionResponseParams(); |
+ mojo_factory_result.clockDisposition = clockDisposition; |
return mojo_factory_result; |
} |
- PingPongServicePingTargetServiceResponseParams _PingPongServicePingTargetServiceResponseParamsFactory(bool ok) { |
- var mojo_factory_result = new PingPongServicePingTargetServiceResponseParams(); |
- mojo_factory_result.ok = ok; |
+ MediaSinkGetStatusResponseParams _MediaSinkGetStatusResponseParamsFactory(int version, MediaSinkStatus status) { |
+ var mojo_factory_result = new MediaSinkGetStatusResponseParams(); |
+ mojo_factory_result.version = version; |
+ mojo_factory_result.status = status; |
return mojo_factory_result; |
} |
@@ -874,26 +949,16 @@ class PingPongServiceStub extends bindings.Stub { |
} |
assert(_impl != null); |
switch (message.header.type) { |
- case kPingPongService_setClient_name: |
- var params = PingPongServiceSetClientParams.deserialize( |
- message.payload); |
- _impl.setClient(params.client); |
- break; |
- case kPingPongService_ping_name: |
- var params = PingPongServicePingParams.deserialize( |
- message.payload); |
- _impl.ping(params.pingValue); |
- break; |
- case kPingPongService_pingTargetUrl_name: |
- var params = PingPongServicePingTargetUrlParams.deserialize( |
+ case kMediaSink_getClockDisposition_name: |
+ var params = MediaSinkGetClockDispositionParams.deserialize( |
message.payload); |
- var response = _impl.pingTargetUrl(params.url,params.count,_PingPongServicePingTargetUrlResponseParamsFactory); |
+ var response = _impl.getClockDisposition(_MediaSinkGetClockDispositionResponseParamsFactory); |
if (response is Future) { |
return response.then((response) { |
if (response != null) { |
return buildResponseWithId( |
response, |
- kPingPongService_pingTargetUrl_name, |
+ kMediaSink_getClockDisposition_name, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
@@ -901,21 +966,36 @@ class PingPongServiceStub extends bindings.Stub { |
} else if (response != null) { |
return buildResponseWithId( |
response, |
- kPingPongService_pingTargetUrl_name, |
+ kMediaSink_getClockDisposition_name, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
break; |
- case kPingPongService_pingTargetService_name: |
- var params = PingPongServicePingTargetServiceParams.deserialize( |
+ case kMediaSink_getMasterClock_name: |
+ var params = MediaSinkGetMasterClockParams.deserialize( |
message.payload); |
- var response = _impl.pingTargetService(params.service,params.count,_PingPongServicePingTargetServiceResponseParamsFactory); |
+ _impl.getMasterClock(params.masterClock); |
+ break; |
+ case kMediaSink_setMasterClock_name: |
+ var params = MediaSinkSetMasterClockParams.deserialize( |
+ message.payload); |
+ _impl.setMasterClock(params.masterClock); |
+ break; |
+ case kMediaSink_getConsumer_name: |
+ var params = MediaSinkGetConsumerParams.deserialize( |
+ message.payload); |
+ _impl.getConsumer(params.consumer); |
+ break; |
+ case kMediaSink_getStatus_name: |
+ var params = MediaSinkGetStatusParams.deserialize( |
+ message.payload); |
+ var response = _impl.getStatus(params.versionLastSeen,_MediaSinkGetStatusResponseParamsFactory); |
if (response is Future) { |
return response.then((response) { |
if (response != null) { |
return buildResponseWithId( |
response, |
- kPingPongService_pingTargetService_name, |
+ kMediaSink_getStatus_name, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
@@ -923,193 +1003,20 @@ class PingPongServiceStub extends bindings.Stub { |
} else if (response != null) { |
return buildResponseWithId( |
response, |
- kPingPongService_pingTargetService_name, |
+ kMediaSink_getStatus_name, |
message.header.requestId, |
bindings.MessageHeader.kMessageIsResponse); |
} |
break; |
- case kPingPongService_getPingPongService_name: |
- var params = PingPongServiceGetPingPongServiceParams.deserialize( |
- message.payload); |
- _impl.getPingPongService(params.service); |
- break; |
- case kPingPongService_quit_name: |
- var params = PingPongServiceQuitParams.deserialize( |
+ case kMediaSink_play_name: |
+ var params = MediaSinkPlayParams.deserialize( |
message.payload); |
- _impl.quit(); |
+ _impl.play(); |
break; |
- default: |
- throw new bindings.MojoCodecError("Unexpected message name"); |
- break; |
- } |
- return null; |
- } |
- |
- PingPongService get impl => _impl; |
- set impl(PingPongService d) { |
- assert(_impl == null); |
- _impl = d; |
- } |
- |
- String toString() { |
- var superString = super.toString(); |
- return "PingPongServiceStub($superString)"; |
- } |
- |
- int get version => 0; |
-} |
- |
-const int kPingPongClient_pong_name = 0; |
-const String PingPongClientName = null; |
- |
-abstract class PingPongClient { |
- void pong(int pongValue); |
- |
-} |
- |
- |
-class PingPongClientProxyImpl extends bindings.Proxy { |
- PingPongClientProxyImpl.fromEndpoint( |
- core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
- |
- PingPongClientProxyImpl.fromHandle(core.MojoHandle handle) : |
- super.fromHandle(handle); |
- |
- PingPongClientProxyImpl.unbound() : super.unbound(); |
- |
- static PingPongClientProxyImpl newFromEndpoint( |
- core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For PingPongClientProxyImpl")); |
- return new PingPongClientProxyImpl.fromEndpoint(endpoint); |
- } |
- |
- String get name => PingPongClientName; |
- |
- void handleResponse(bindings.ServiceMessage message) { |
- switch (message.header.type) { |
- default: |
- proxyError("Unexpected message type: ${message.header.type}"); |
- close(immediate: true); |
- break; |
- } |
- } |
- |
- String toString() { |
- var superString = super.toString(); |
- return "PingPongClientProxyImpl($superString)"; |
- } |
-} |
- |
- |
-class _PingPongClientProxyCalls implements PingPongClient { |
- PingPongClientProxyImpl _proxyImpl; |
- |
- _PingPongClientProxyCalls(this._proxyImpl); |
- void pong(int pongValue) { |
- if (!_proxyImpl.isBound) { |
- _proxyImpl.proxyError("The Proxy is closed."); |
- return; |
- } |
- var params = new PingPongClientPongParams(); |
- params.pongValue = pongValue; |
- _proxyImpl.sendMessage(params, kPingPongClient_pong_name); |
- } |
- |
-} |
- |
- |
-class PingPongClientProxy implements bindings.ProxyBase { |
- final bindings.Proxy impl; |
- PingPongClient ptr; |
- final String name = PingPongClientName; |
- |
- PingPongClientProxy(PingPongClientProxyImpl proxyImpl) : |
- impl = proxyImpl, |
- ptr = new _PingPongClientProxyCalls(proxyImpl); |
- |
- PingPongClientProxy.fromEndpoint( |
- core.MojoMessagePipeEndpoint endpoint) : |
- impl = new PingPongClientProxyImpl.fromEndpoint(endpoint) { |
- ptr = new _PingPongClientProxyCalls(impl); |
- } |
- |
- PingPongClientProxy.fromHandle(core.MojoHandle handle) : |
- impl = new PingPongClientProxyImpl.fromHandle(handle) { |
- ptr = new _PingPongClientProxyCalls(impl); |
- } |
- |
- PingPongClientProxy.unbound() : |
- impl = new PingPongClientProxyImpl.unbound() { |
- ptr = new _PingPongClientProxyCalls(impl); |
- } |
- |
- factory PingPongClientProxy.connectToService( |
- bindings.ServiceConnector s, String url, [String serviceName]) { |
- PingPongClientProxy p = new PingPongClientProxy.unbound(); |
- s.connectToService(url, p, serviceName); |
- return p; |
- } |
- |
- static PingPongClientProxy newFromEndpoint( |
- core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For PingPongClientProxy")); |
- return new PingPongClientProxy.fromEndpoint(endpoint); |
- } |
- |
- Future close({bool immediate: false}) => impl.close(immediate: immediate); |
- |
- Future responseOrError(Future f) => impl.responseOrError(f); |
- |
- Future get errorFuture => impl.errorFuture; |
- |
- int get version => impl.version; |
- |
- Future<int> queryVersion() => impl.queryVersion(); |
- |
- void requireVersion(int requiredVersion) { |
- impl.requireVersion(requiredVersion); |
- } |
- |
- String toString() { |
- return "PingPongClientProxy($impl)"; |
- } |
-} |
- |
- |
-class PingPongClientStub extends bindings.Stub { |
- PingPongClient _impl = null; |
- |
- PingPongClientStub.fromEndpoint( |
- core.MojoMessagePipeEndpoint endpoint, [this._impl]) |
- : super.fromEndpoint(endpoint); |
- |
- PingPongClientStub.fromHandle(core.MojoHandle handle, [this._impl]) |
- : super.fromHandle(handle); |
- |
- PingPongClientStub.unbound() : super.unbound(); |
- |
- static PingPongClientStub newFromEndpoint( |
- core.MojoMessagePipeEndpoint endpoint) { |
- assert(endpoint.setDescription("For PingPongClientStub")); |
- return new PingPongClientStub.fromEndpoint(endpoint); |
- } |
- |
- static const String name = PingPongClientName; |
- |
- |
- |
- dynamic handleMessage(bindings.ServiceMessage message) { |
- if (bindings.ControlMessageHandler.isControlMessage(message)) { |
- return bindings.ControlMessageHandler.handleMessage(this, |
- 0, |
- message); |
- } |
- assert(_impl != null); |
- switch (message.header.type) { |
- case kPingPongClient_pong_name: |
- var params = PingPongClientPongParams.deserialize( |
+ case kMediaSink_pause_name: |
+ var params = MediaSinkPauseParams.deserialize( |
message.payload); |
- _impl.pong(params.pongValue); |
+ _impl.pause(); |
break; |
default: |
throw new bindings.MojoCodecError("Unexpected message name"); |
@@ -1118,15 +1025,15 @@ class PingPongClientStub extends bindings.Stub { |
return null; |
} |
- PingPongClient get impl => _impl; |
- set impl(PingPongClient d) { |
+ MediaSink get impl => _impl; |
+ set impl(MediaSink d) { |
assert(_impl == null); |
_impl = d; |
} |
String toString() { |
var superString = super.toString(); |
- return "PingPongClientStub($superString)"; |
+ return "MediaSinkStub($superString)"; |
} |
int get version => 0; |