| Index: mojo/dart/packages/mojo_services/lib/activity/activity.mojom.dart
|
| diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_interfaces.mojom.dart b/mojo/dart/packages/mojo_services/lib/activity/activity.mojom.dart
|
| similarity index 52%
|
| copy from mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_interfaces.mojom.dart
|
| copy to mojo/dart/packages/mojo_services/lib/activity/activity.mojom.dart
|
| index 2a5dc237b187b69669413c1ab6fa407b8231cb73..ef2fc79c68bf252d9daf1d35773da11cc50f4483 100644
|
| --- a/mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_interfaces.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/activity/activity.mojom.dart
|
| @@ -2,67 +2,277 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -library sample_interfaces_mojom;
|
| +library activity_mojom;
|
|
|
| import 'dart:async';
|
|
|
| import 'package:mojo/bindings.dart' as bindings;
|
| import 'package:mojo/core.dart' as core;
|
| -const kLong = 4405;
|
| -class Enum extends bindings.MojoEnum {
|
| - static const VALUE = const Enum._(0);
|
| +class SystemUiVisibility extends bindings.MojoEnum {
|
| + static const STANDARD = const SystemUiVisibility._(0);
|
| + static const FULLSCREEN = const SystemUiVisibility._(1);
|
| + static const IMMERSIVE = const SystemUiVisibility._(2);
|
|
|
| - const Enum._(int v) : super(v);
|
| + const SystemUiVisibility._(int v) : super(v);
|
|
|
| - static const Map<String, Enum> valuesMap = const {
|
| - "VALUE": VALUE,
|
| + static const Map<String, SystemUiVisibility> valuesMap = const {
|
| + "STANDARD": STANDARD,
|
| + "FULLSCREEN": FULLSCREEN,
|
| + "IMMERSIVE": IMMERSIVE,
|
| };
|
| - static const List<Enum> values = const [
|
| - VALUE,
|
| + static const List<SystemUiVisibility> values = const [
|
| + STANDARD,
|
| + FULLSCREEN,
|
| + IMMERSIVE,
|
| ];
|
|
|
| - static Enum valueOf(String name) => valuesMap[name];
|
| + static SystemUiVisibility valueOf(String name) => valuesMap[name];
|
|
|
| - factory Enum(int v) {
|
| + factory SystemUiVisibility(int v) {
|
| switch (v) {
|
| case 0:
|
| - return VALUE;
|
| + return STANDARD;
|
| + case 1:
|
| + return FULLSCREEN;
|
| + case 2:
|
| + return IMMERSIVE;
|
| default:
|
| return null;
|
| }
|
| }
|
|
|
| - static Enum decode(bindings.Decoder decoder0, int offset) {
|
| + static SystemUiVisibility decode(bindings.Decoder decoder0, int offset) {
|
| int v = decoder0.decodeUint32(offset);
|
| - Enum result = new Enum(v);
|
| + SystemUiVisibility result = new SystemUiVisibility(v);
|
| if (result == null) {
|
| throw new bindings.MojoCodecError(
|
| - 'Bad value $v for enum Enum.');
|
| + 'Bad value $v for enum SystemUiVisibility.');
|
| }
|
| return result;
|
| }
|
|
|
| String toString() {
|
| switch(this) {
|
| - case VALUE:
|
| - return 'Enum.VALUE';
|
| + case STANDARD:
|
| + return 'SystemUiVisibility.STANDARD';
|
| + case FULLSCREEN:
|
| + return 'SystemUiVisibility.FULLSCREEN';
|
| + case IMMERSIVE:
|
| + return 'SystemUiVisibility.IMMERSIVE';
|
| }
|
| }
|
|
|
| int toJson() => value;
|
| }
|
| +class ScreenOrientation extends bindings.MojoEnum {
|
| + static const UNSPECIFIED = const ScreenOrientation._(0);
|
| + static const LANDSCAPE = const ScreenOrientation._(1);
|
| + static const PORTRAIT = const ScreenOrientation._(2);
|
| + static const NOSENSOR = const ScreenOrientation._(3);
|
| +
|
| + const ScreenOrientation._(int v) : super(v);
|
| +
|
| + static const Map<String, ScreenOrientation> valuesMap = const {
|
| + "UNSPECIFIED": UNSPECIFIED,
|
| + "LANDSCAPE": LANDSCAPE,
|
| + "PORTRAIT": PORTRAIT,
|
| + "NOSENSOR": NOSENSOR,
|
| + };
|
| + static const List<ScreenOrientation> values = const [
|
| + UNSPECIFIED,
|
| + LANDSCAPE,
|
| + PORTRAIT,
|
| + NOSENSOR,
|
| + ];
|
| +
|
| + static ScreenOrientation valueOf(String name) => valuesMap[name];
|
| +
|
| + factory ScreenOrientation(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return UNSPECIFIED;
|
| + case 1:
|
| + return LANDSCAPE;
|
| + case 2:
|
| + return PORTRAIT;
|
| + case 3:
|
| + return NOSENSOR;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static ScreenOrientation decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + ScreenOrientation result = new ScreenOrientation(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum ScreenOrientation.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case UNSPECIFIED:
|
| + return 'ScreenOrientation.UNSPECIFIED';
|
| + case LANDSCAPE:
|
| + return 'ScreenOrientation.LANDSCAPE';
|
| + case PORTRAIT:
|
| + return 'ScreenOrientation.PORTRAIT';
|
| + case NOSENSOR:
|
| + return 'ScreenOrientation.NOSENSOR';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class HapticFeedbackType extends bindings.MojoEnum {
|
| + static const LONG_PRESS = const HapticFeedbackType._(0);
|
| + static const VIRTUAL_KEY = const HapticFeedbackType._(1);
|
| + static const KEYBOARD_TAP = const HapticFeedbackType._(2);
|
| + static const CLOCK_TICK = const HapticFeedbackType._(3);
|
| +
|
| + const HapticFeedbackType._(int v) : super(v);
|
| +
|
| + static const Map<String, HapticFeedbackType> valuesMap = const {
|
| + "LONG_PRESS": LONG_PRESS,
|
| + "VIRTUAL_KEY": VIRTUAL_KEY,
|
| + "KEYBOARD_TAP": KEYBOARD_TAP,
|
| + "CLOCK_TICK": CLOCK_TICK,
|
| + };
|
| + static const List<HapticFeedbackType> values = const [
|
| + LONG_PRESS,
|
| + VIRTUAL_KEY,
|
| + KEYBOARD_TAP,
|
| + CLOCK_TICK,
|
| + ];
|
| +
|
| + static HapticFeedbackType valueOf(String name) => valuesMap[name];
|
| +
|
| + factory HapticFeedbackType(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return LONG_PRESS;
|
| + case 1:
|
| + return VIRTUAL_KEY;
|
| + case 2:
|
| + return KEYBOARD_TAP;
|
| + case 3:
|
| + return CLOCK_TICK;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static HapticFeedbackType decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + HapticFeedbackType result = new HapticFeedbackType(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum HapticFeedbackType.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case LONG_PRESS:
|
| + return 'HapticFeedbackType.LONG_PRESS';
|
| + case VIRTUAL_KEY:
|
| + return 'HapticFeedbackType.VIRTUAL_KEY';
|
| + case KEYBOARD_TAP:
|
| + return 'HapticFeedbackType.KEYBOARD_TAP';
|
| + case CLOCK_TICK:
|
| + return 'HapticFeedbackType.CLOCK_TICK';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class AuralFeedbackType extends bindings.MojoEnum {
|
| + static const CLICK = const AuralFeedbackType._(0);
|
| + static const NAVIGATION_LEFT = const AuralFeedbackType._(1);
|
| + static const NAVIGATION_UP = const AuralFeedbackType._(2);
|
| + static const NAVIGATION_RIGHT = const AuralFeedbackType._(3);
|
| + static const NAVIGATION_DOWN = const AuralFeedbackType._(4);
|
| +
|
| + const AuralFeedbackType._(int v) : super(v);
|
| +
|
| + static const Map<String, AuralFeedbackType> valuesMap = const {
|
| + "CLICK": CLICK,
|
| + "NAVIGATION_LEFT": NAVIGATION_LEFT,
|
| + "NAVIGATION_UP": NAVIGATION_UP,
|
| + "NAVIGATION_RIGHT": NAVIGATION_RIGHT,
|
| + "NAVIGATION_DOWN": NAVIGATION_DOWN,
|
| + };
|
| + static const List<AuralFeedbackType> values = const [
|
| + CLICK,
|
| + NAVIGATION_LEFT,
|
| + NAVIGATION_UP,
|
| + NAVIGATION_RIGHT,
|
| + NAVIGATION_DOWN,
|
| + ];
|
| +
|
| + static AuralFeedbackType valueOf(String name) => valuesMap[name];
|
| +
|
| + factory AuralFeedbackType(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return CLICK;
|
| + case 1:
|
| + return NAVIGATION_LEFT;
|
| + case 2:
|
| + return NAVIGATION_UP;
|
| + case 3:
|
| + return NAVIGATION_RIGHT;
|
| + case 4:
|
| + return NAVIGATION_DOWN;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static AuralFeedbackType decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + AuralFeedbackType result = new AuralFeedbackType(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum AuralFeedbackType.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case CLICK:
|
| + return 'AuralFeedbackType.CLICK';
|
| + case NAVIGATION_LEFT:
|
| + return 'AuralFeedbackType.NAVIGATION_LEFT';
|
| + case NAVIGATION_UP:
|
| + return 'AuralFeedbackType.NAVIGATION_UP';
|
| + case NAVIGATION_RIGHT:
|
| + return 'AuralFeedbackType.NAVIGATION_RIGHT';
|
| + case NAVIGATION_DOWN:
|
| + return 'AuralFeedbackType.NAVIGATION_DOWN';
|
| + }
|
| + }
|
|
|
| + int toJson() => value;
|
| +}
|
|
|
|
|
| -class ProviderEchoStringParams extends bindings.Struct {
|
| +
|
| +class StringExtra extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(16, 0)
|
| + const bindings.StructDataHeader(24, 0)
|
| ];
|
| - String a = null;
|
| + String name = null;
|
| + String value = null;
|
|
|
| - ProviderEchoStringParams() : super(kVersions.last.size);
|
| + StringExtra() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoStringParams deserialize(bindings.Message message) {
|
| + static StringExtra deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -71,11 +281,11 @@ class ProviderEchoStringParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoStringParams decode(bindings.Decoder decoder0) {
|
| + static StringExtra decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoStringParams result = new ProviderEchoStringParams();
|
| + StringExtra result = new StringExtra();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -97,7 +307,11 @@ class ProviderEchoStringParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = decoder0.decodeString(8, false);
|
| + result.name = decoder0.decodeString(8, false);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.value = decoder0.decodeString(16, false);
|
| }
|
| return result;
|
| }
|
| @@ -105,31 +319,36 @@ class ProviderEchoStringParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeString(a, 8, false);
|
| + encoder0.encodeString(name, 8, false);
|
| +
|
| + encoder0.encodeString(value, 16, false);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoStringParams("
|
| - "a: $a" ")";
|
| + return "StringExtra("
|
| + "name: $name" ", "
|
| + "value: $value" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["a"] = a;
|
| + map["name"] = name;
|
| + map["value"] = value;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class ProviderEchoStringResponseParams extends bindings.Struct {
|
| +class ComponentName extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(16, 0)
|
| + const bindings.StructDataHeader(24, 0)
|
| ];
|
| - String a = null;
|
| + String packageName = null;
|
| + String className = null;
|
|
|
| - ProviderEchoStringResponseParams() : super(kVersions.last.size);
|
| + ComponentName() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoStringResponseParams deserialize(bindings.Message message) {
|
| + static ComponentName deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -138,11 +357,11 @@ class ProviderEchoStringResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoStringResponseParams decode(bindings.Decoder decoder0) {
|
| + static ComponentName decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoStringResponseParams result = new ProviderEchoStringResponseParams();
|
| + ComponentName result = new ComponentName();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -164,7 +383,11 @@ class ProviderEchoStringResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = decoder0.decodeString(8, false);
|
| + result.packageName = decoder0.decodeString(8, false);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.className = decoder0.decodeString(16, false);
|
| }
|
| return result;
|
| }
|
| @@ -172,32 +395,40 @@ class ProviderEchoStringResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeString(a, 8, false);
|
| + encoder0.encodeString(packageName, 8, false);
|
| +
|
| + encoder0.encodeString(className, 16, false);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoStringResponseParams("
|
| - "a: $a" ")";
|
| + return "ComponentName("
|
| + "packageName: $packageName" ", "
|
| + "className: $className" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["a"] = a;
|
| + map["packageName"] = packageName;
|
| + map["className"] = className;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class ProviderEchoStringsParams extends bindings.Struct {
|
| +class Intent extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(24, 0)
|
| + const bindings.StructDataHeader(56, 0)
|
| ];
|
| - String a = null;
|
| - String b = null;
|
| + String action = null;
|
| + String url = null;
|
| + int flags = 0;
|
| + ComponentName component = null;
|
| + List<StringExtra> stringExtras = null;
|
| + String type = null;
|
|
|
| - ProviderEchoStringsParams() : super(kVersions.last.size);
|
| + Intent() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoStringsParams deserialize(bindings.Message message) {
|
| + static Intent deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -206,11 +437,11 @@ class ProviderEchoStringsParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoStringsParams decode(bindings.Decoder decoder0) {
|
| + static Intent decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoStringsParams result = new ProviderEchoStringsParams();
|
| + Intent result = new Intent();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -232,11 +463,39 @@ class ProviderEchoStringsParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = decoder0.decodeString(8, false);
|
| + result.action = decoder0.decodeString(8, false);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.url = decoder0.decodeString(16, false);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.flags = decoder0.decodeUint32(24);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + var decoder1 = decoder0.decodePointer(32, true);
|
| + result.component = ComponentName.decode(decoder1);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + var decoder1 = decoder0.decodePointer(40, true);
|
| + if (decoder1 == null) {
|
| + result.stringExtras = null;
|
| + } else {
|
| + var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
|
| + result.stringExtras = new List<StringExtra>(si1.numElements);
|
| + for (int i1 = 0; i1 < si1.numElements; ++i1) {
|
| +
|
| + var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
|
| + result.stringExtras[i1] = StringExtra.decode(decoder2);
|
| + }
|
| + }
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.b = decoder0.decodeString(16, false);
|
| + result.type = decoder0.decodeString(48, true);
|
| }
|
| return result;
|
| }
|
| @@ -244,36 +503,60 @@ class ProviderEchoStringsParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeString(a, 8, false);
|
| + encoder0.encodeString(action, 8, false);
|
| +
|
| + encoder0.encodeString(url, 16, false);
|
| +
|
| + encoder0.encodeUint32(flags, 24);
|
|
|
| - encoder0.encodeString(b, 16, false);
|
| + encoder0.encodeStruct(component, 32, true);
|
| +
|
| + if (stringExtras == null) {
|
| + encoder0.encodeNullPointer(40, true);
|
| + } else {
|
| + var encoder1 = encoder0.encodePointerArray(stringExtras.length, 40, bindings.kUnspecifiedArrayLength);
|
| + for (int i0 = 0; i0 < stringExtras.length; ++i0) {
|
| +
|
| + encoder1.encodeStruct(stringExtras[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
|
| + }
|
| + }
|
| +
|
| + encoder0.encodeString(type, 48, true);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoStringsParams("
|
| - "a: $a" ", "
|
| - "b: $b" ")";
|
| + return "Intent("
|
| + "action: $action" ", "
|
| + "url: $url" ", "
|
| + "flags: $flags" ", "
|
| + "component: $component" ", "
|
| + "stringExtras: $stringExtras" ", "
|
| + "type: $type" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["a"] = a;
|
| - map["b"] = b;
|
| + map["action"] = action;
|
| + map["url"] = url;
|
| + map["flags"] = flags;
|
| + map["component"] = component;
|
| + map["stringExtras"] = stringExtras;
|
| + map["type"] = type;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class ProviderEchoStringsResponseParams extends bindings.Struct {
|
| +class TaskDescription extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(24, 0)
|
| ];
|
| - String a = null;
|
| - String b = null;
|
| + String label = null;
|
| + int primaryColor = 0;
|
|
|
| - ProviderEchoStringsResponseParams() : super(kVersions.last.size);
|
| + TaskDescription() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoStringsResponseParams deserialize(bindings.Message message) {
|
| + static TaskDescription deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -282,11 +565,11 @@ class ProviderEchoStringsResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoStringsResponseParams decode(bindings.Decoder decoder0) {
|
| + static TaskDescription decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoStringsResponseParams result = new ProviderEchoStringsResponseParams();
|
| + TaskDescription result = new TaskDescription();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -308,11 +591,11 @@ class ProviderEchoStringsResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = decoder0.decodeString(8, false);
|
| + result.label = decoder0.decodeString(8, true);
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.b = decoder0.decodeString(16, false);
|
| + result.primaryColor = decoder0.decodeUint32(16);
|
| }
|
| return result;
|
| }
|
| @@ -320,35 +603,35 @@ class ProviderEchoStringsResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeString(a, 8, false);
|
| + encoder0.encodeString(label, 8, true);
|
|
|
| - encoder0.encodeString(b, 16, false);
|
| + encoder0.encodeUint32(primaryColor, 16);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoStringsResponseParams("
|
| - "a: $a" ", "
|
| - "b: $b" ")";
|
| + return "TaskDescription("
|
| + "label: $label" ", "
|
| + "primaryColor: $primaryColor" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["a"] = a;
|
| - map["b"] = b;
|
| + map["label"] = label;
|
| + map["primaryColor"] = primaryColor;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class ProviderEchoMessagePipeHandleParams extends bindings.Struct {
|
| +class ActivityGetUserFeedbackParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - core.MojoMessagePipeEndpoint a = null;
|
| + Object userFeedback = null;
|
|
|
| - ProviderEchoMessagePipeHandleParams() : super(kVersions.last.size);
|
| + ActivityGetUserFeedbackParams() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoMessagePipeHandleParams deserialize(bindings.Message message) {
|
| + static ActivityGetUserFeedbackParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -357,11 +640,11 @@ class ProviderEchoMessagePipeHandleParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoMessagePipeHandleParams decode(bindings.Decoder decoder0) {
|
| + static ActivityGetUserFeedbackParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoMessagePipeHandleParams result = new ProviderEchoMessagePipeHandleParams();
|
| + ActivityGetUserFeedbackParams result = new ActivityGetUserFeedbackParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -383,7 +666,7 @@ class ProviderEchoMessagePipeHandleParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = decoder0.decodeMessagePipeHandle(8, false);
|
| + result.userFeedback = decoder0.decodeInterfaceRequest(8, false, UserFeedbackStub.newFromEndpoint);
|
| }
|
| return result;
|
| }
|
| @@ -391,12 +674,12 @@ class ProviderEchoMessagePipeHandleParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeMessagePipeHandle(a, 8, false);
|
| + encoder0.encodeInterfaceRequest(userFeedback, 8, false);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoMessagePipeHandleParams("
|
| - "a: $a" ")";
|
| + return "ActivityGetUserFeedbackParams("
|
| + "userFeedback: $userFeedback" ")";
|
| }
|
|
|
| Map toJson() {
|
| @@ -406,15 +689,15 @@ class ProviderEchoMessagePipeHandleParams extends bindings.Struct {
|
| }
|
|
|
|
|
| -class ProviderEchoMessagePipeHandleResponseParams extends bindings.Struct {
|
| +class ActivityStartActivityParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - core.MojoMessagePipeEndpoint a = null;
|
| + Intent intent = null;
|
|
|
| - ProviderEchoMessagePipeHandleResponseParams() : super(kVersions.last.size);
|
| + ActivityStartActivityParams() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoMessagePipeHandleResponseParams deserialize(bindings.Message message) {
|
| + static ActivityStartActivityParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -423,11 +706,11 @@ class ProviderEchoMessagePipeHandleResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoMessagePipeHandleResponseParams decode(bindings.Decoder decoder0) {
|
| + static ActivityStartActivityParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoMessagePipeHandleResponseParams result = new ProviderEchoMessagePipeHandleResponseParams();
|
| + ActivityStartActivityParams result = new ActivityStartActivityParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -449,7 +732,8 @@ class ProviderEchoMessagePipeHandleResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = decoder0.decodeMessagePipeHandle(8, false);
|
| + var decoder1 = decoder0.decodePointer(8, false);
|
| + result.intent = Intent.decode(decoder1);
|
| }
|
| return result;
|
| }
|
| @@ -457,30 +741,30 @@ class ProviderEchoMessagePipeHandleResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeMessagePipeHandle(a, 8, false);
|
| + encoder0.encodeStruct(intent, 8, false);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoMessagePipeHandleResponseParams("
|
| - "a: $a" ")";
|
| + return "ActivityStartActivityParams("
|
| + "intent: $intent" ")";
|
| }
|
|
|
| Map toJson() {
|
| - throw new bindings.MojoCodecError(
|
| - 'Object containing handles cannot be encoded to JSON.');
|
| + Map map = new Map();
|
| + map["intent"] = intent;
|
| + return map;
|
| }
|
| }
|
|
|
|
|
| -class ProviderEchoEnumParams extends bindings.Struct {
|
| +class ActivityFinishCurrentActivityParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(16, 0)
|
| + const bindings.StructDataHeader(8, 0)
|
| ];
|
| - Enum a = null;
|
|
|
| - ProviderEchoEnumParams() : super(kVersions.last.size);
|
| + ActivityFinishCurrentActivityParams() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoEnumParams deserialize(bindings.Message message) {
|
| + static ActivityFinishCurrentActivityParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -489,11 +773,11 @@ class ProviderEchoEnumParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoEnumParams decode(bindings.Decoder decoder0) {
|
| + static ActivityFinishCurrentActivityParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoEnumParams result = new ProviderEchoEnumParams();
|
| + ActivityFinishCurrentActivityParams result = new ActivityFinishCurrentActivityParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -513,45 +797,33 @@ class ProviderEchoEnumParams 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.a = Enum.decode(decoder0, 8);
|
| - if (result.a == null) {
|
| - throw new bindings.MojoCodecError(
|
| - 'Trying to decode null union for non-nullable Enum.');
|
| - }
|
| - }
|
| return result;
|
| }
|
|
|
| void encode(bindings.Encoder encoder) {
|
| - var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| -
|
| - encoder0.encodeEnum(a, 8);
|
| + encoder.getStructEncoderAtOffset(kVersions.last);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoEnumParams("
|
| - "a: $a" ")";
|
| + return "ActivityFinishCurrentActivityParams("")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["a"] = a;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class ProviderEchoEnumResponseParams extends bindings.Struct {
|
| +class ActivitySetTaskDescriptionParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - Enum a = null;
|
| + TaskDescription description = null;
|
|
|
| - ProviderEchoEnumResponseParams() : super(kVersions.last.size);
|
| + ActivitySetTaskDescriptionParams() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoEnumResponseParams deserialize(bindings.Message message) {
|
| + static ActivitySetTaskDescriptionParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -560,11 +832,11 @@ class ProviderEchoEnumResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoEnumResponseParams decode(bindings.Decoder decoder0) {
|
| + static ActivitySetTaskDescriptionParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoEnumResponseParams result = new ProviderEchoEnumResponseParams();
|
| + ActivitySetTaskDescriptionParams result = new ActivitySetTaskDescriptionParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -586,11 +858,8 @@ class ProviderEchoEnumResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = Enum.decode(decoder0, 8);
|
| - if (result.a == null) {
|
| - throw new bindings.MojoCodecError(
|
| - 'Trying to decode null union for non-nullable Enum.');
|
| - }
|
| + var decoder1 = decoder0.decodePointer(8, false);
|
| + result.description = TaskDescription.decode(decoder1);
|
| }
|
| return result;
|
| }
|
| @@ -598,31 +867,31 @@ class ProviderEchoEnumResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeEnum(a, 8);
|
| + encoder0.encodeStruct(description, 8, false);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoEnumResponseParams("
|
| - "a: $a" ")";
|
| + return "ActivitySetTaskDescriptionParams("
|
| + "description: $description" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["a"] = a;
|
| + map["description"] = description;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class ProviderEchoIntParams extends bindings.Struct {
|
| +class ActivitySetSystemUiVisibilityParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - int a = 0;
|
| + SystemUiVisibility visibility = null;
|
|
|
| - ProviderEchoIntParams() : super(kVersions.last.size);
|
| + ActivitySetSystemUiVisibilityParams() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoIntParams deserialize(bindings.Message message) {
|
| + static ActivitySetSystemUiVisibilityParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -631,11 +900,11 @@ class ProviderEchoIntParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoIntParams decode(bindings.Decoder decoder0) {
|
| + static ActivitySetSystemUiVisibilityParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoIntParams result = new ProviderEchoIntParams();
|
| + ActivitySetSystemUiVisibilityParams result = new ActivitySetSystemUiVisibilityParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -657,7 +926,11 @@ class ProviderEchoIntParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = decoder0.decodeInt32(8);
|
| + result.visibility = SystemUiVisibility.decode(decoder0, 8);
|
| + if (result.visibility == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable SystemUiVisibility.');
|
| + }
|
| }
|
| return result;
|
| }
|
| @@ -665,31 +938,31 @@ class ProviderEchoIntParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInt32(a, 8);
|
| + encoder0.encodeEnum(visibility, 8);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoIntParams("
|
| - "a: $a" ")";
|
| + return "ActivitySetSystemUiVisibilityParams("
|
| + "visibility: $visibility" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["a"] = a;
|
| + map["visibility"] = visibility;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class ProviderEchoIntResponseParams extends bindings.Struct {
|
| +class ActivitySetRequestedOrientationParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(16, 0)
|
| ];
|
| - int a = 0;
|
| + ScreenOrientation orientation = null;
|
|
|
| - ProviderEchoIntResponseParams() : super(kVersions.last.size);
|
| + ActivitySetRequestedOrientationParams() : super(kVersions.last.size);
|
|
|
| - static ProviderEchoIntResponseParams deserialize(bindings.Message message) {
|
| + static ActivitySetRequestedOrientationParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -698,11 +971,11 @@ class ProviderEchoIntResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static ProviderEchoIntResponseParams decode(bindings.Decoder decoder0) {
|
| + static ActivitySetRequestedOrientationParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - ProviderEchoIntResponseParams result = new ProviderEchoIntResponseParams();
|
| + ActivitySetRequestedOrientationParams result = new ActivitySetRequestedOrientationParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -724,7 +997,11 @@ class ProviderEchoIntResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.a = decoder0.decodeInt32(8);
|
| + result.orientation = ScreenOrientation.decode(decoder0, 8);
|
| + if (result.orientation == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable ScreenOrientation.');
|
| + }
|
| }
|
| return result;
|
| }
|
| @@ -732,30 +1009,30 @@ class ProviderEchoIntResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInt32(a, 8);
|
| + encoder0.encodeEnum(orientation, 8);
|
| }
|
|
|
| String toString() {
|
| - return "ProviderEchoIntResponseParams("
|
| - "a: $a" ")";
|
| + return "ActivitySetRequestedOrientationParams("
|
| + "orientation: $orientation" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["a"] = a;
|
| + map["orientation"] = orientation;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class IntegerAccessorGetIntegerParams extends bindings.Struct {
|
| +class PathServiceGetAppDataDirParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| const bindings.StructDataHeader(8, 0)
|
| ];
|
|
|
| - IntegerAccessorGetIntegerParams() : super(kVersions.last.size);
|
| + PathServiceGetAppDataDirParams() : super(kVersions.last.size);
|
|
|
| - static IntegerAccessorGetIntegerParams deserialize(bindings.Message message) {
|
| + static PathServiceGetAppDataDirParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -764,11 +1041,11 @@ class IntegerAccessorGetIntegerParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static IntegerAccessorGetIntegerParams decode(bindings.Decoder decoder0) {
|
| + static PathServiceGetAppDataDirParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - IntegerAccessorGetIntegerParams result = new IntegerAccessorGetIntegerParams();
|
| + PathServiceGetAppDataDirParams result = new PathServiceGetAppDataDirParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -796,7 +1073,7 @@ class IntegerAccessorGetIntegerParams extends bindings.Struct {
|
| }
|
|
|
| String toString() {
|
| - return "IntegerAccessorGetIntegerParams("")";
|
| + return "PathServiceGetAppDataDirParams("")";
|
| }
|
|
|
| Map toJson() {
|
| @@ -806,17 +1083,15 @@ class IntegerAccessorGetIntegerParams extends bindings.Struct {
|
| }
|
|
|
|
|
| -class IntegerAccessorGetIntegerResponseParams extends bindings.Struct {
|
| +class PathServiceGetAppDataDirResponseParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(16, 0),
|
| - const bindings.StructDataHeader(24, 2)
|
| + const bindings.StructDataHeader(16, 0)
|
| ];
|
| - int data = 0;
|
| - Enum type = null;
|
| + String path = null;
|
|
|
| - IntegerAccessorGetIntegerResponseParams() : super(kVersions.last.size);
|
| + PathServiceGetAppDataDirResponseParams() : super(kVersions.last.size);
|
|
|
| - static IntegerAccessorGetIntegerResponseParams deserialize(bindings.Message message) {
|
| + static PathServiceGetAppDataDirResponseParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -825,11 +1100,11 @@ class IntegerAccessorGetIntegerResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static IntegerAccessorGetIntegerResponseParams decode(bindings.Decoder decoder0) {
|
| + static PathServiceGetAppDataDirResponseParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - IntegerAccessorGetIntegerResponseParams result = new IntegerAccessorGetIntegerResponseParams();
|
| + PathServiceGetAppDataDirResponseParams result = new PathServiceGetAppDataDirResponseParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -851,15 +1126,7 @@ class IntegerAccessorGetIntegerResponseParams extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.data = decoder0.decodeInt64(8);
|
| - }
|
| - if (mainDataHeader.version >= 2) {
|
| -
|
| - result.type = Enum.decode(decoder0, 16);
|
| - if (result.type == null) {
|
| - throw new bindings.MojoCodecError(
|
| - 'Trying to decode null union for non-nullable Enum.');
|
| - }
|
| + result.path = decoder0.decodeString(8, false);
|
| }
|
| return result;
|
| }
|
| @@ -867,37 +1134,30 @@ class IntegerAccessorGetIntegerResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInt64(data, 8);
|
| -
|
| - encoder0.encodeEnum(type, 16);
|
| + encoder0.encodeString(path, 8, false);
|
| }
|
|
|
| String toString() {
|
| - return "IntegerAccessorGetIntegerResponseParams("
|
| - "data: $data" ", "
|
| - "type: $type" ")";
|
| + return "PathServiceGetAppDataDirResponseParams("
|
| + "path: $path" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["data"] = data;
|
| - map["type"] = type;
|
| + map["path"] = path;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class IntegerAccessorSetIntegerParams extends bindings.Struct {
|
| +class PathServiceGetFilesDirParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(16, 0),
|
| - const bindings.StructDataHeader(24, 3)
|
| + const bindings.StructDataHeader(8, 0)
|
| ];
|
| - int data = 0;
|
| - Enum type = null;
|
|
|
| - IntegerAccessorSetIntegerParams() : super(kVersions.last.size);
|
| + PathServiceGetFilesDirParams() : super(kVersions.last.size);
|
|
|
| - static IntegerAccessorSetIntegerParams deserialize(bindings.Message message) {
|
| + static PathServiceGetFilesDirParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -906,11 +1166,11 @@ class IntegerAccessorSetIntegerParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static IntegerAccessorSetIntegerParams decode(bindings.Decoder decoder0) {
|
| + static PathServiceGetFilesDirParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - IntegerAccessorSetIntegerParams result = new IntegerAccessorSetIntegerParams();
|
| + PathServiceGetFilesDirParams result = new PathServiceGetFilesDirParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -930,54 +1190,33 @@ class IntegerAccessorSetIntegerParams 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.data = decoder0.decodeInt64(8);
|
| - }
|
| - if (mainDataHeader.version >= 3) {
|
| -
|
| - result.type = Enum.decode(decoder0, 16);
|
| - if (result.type == null) {
|
| - throw new bindings.MojoCodecError(
|
| - 'Trying to decode null union for non-nullable Enum.');
|
| - }
|
| - }
|
| return result;
|
| }
|
|
|
| void encode(bindings.Encoder encoder) {
|
| - var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| -
|
| - encoder0.encodeInt64(data, 8);
|
| -
|
| - encoder0.encodeEnum(type, 16);
|
| + encoder.getStructEncoderAtOffset(kVersions.last);
|
| }
|
|
|
| String toString() {
|
| - return "IntegerAccessorSetIntegerParams("
|
| - "data: $data" ", "
|
| - "type: $type" ")";
|
| + return "PathServiceGetFilesDirParams("")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["data"] = data;
|
| - map["type"] = type;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class SampleInterfaceSampleMethod1Params extends bindings.Struct {
|
| +class PathServiceGetFilesDirResponseParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(24, 0)
|
| + const bindings.StructDataHeader(16, 0)
|
| ];
|
| - int in1 = 0;
|
| - String in2 = null;
|
| + String path = null;
|
|
|
| - SampleInterfaceSampleMethod1Params() : super(kVersions.last.size);
|
| + PathServiceGetFilesDirResponseParams() : super(kVersions.last.size);
|
|
|
| - static SampleInterfaceSampleMethod1Params deserialize(bindings.Message message) {
|
| + static PathServiceGetFilesDirResponseParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -986,11 +1225,11 @@ class SampleInterfaceSampleMethod1Params extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static SampleInterfaceSampleMethod1Params decode(bindings.Decoder decoder0) {
|
| + static PathServiceGetFilesDirResponseParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - SampleInterfaceSampleMethod1Params result = new SampleInterfaceSampleMethod1Params();
|
| + PathServiceGetFilesDirResponseParams result = new PathServiceGetFilesDirResponseParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -1012,11 +1251,7 @@ class SampleInterfaceSampleMethod1Params extends bindings.Struct {
|
| }
|
| if (mainDataHeader.version >= 0) {
|
|
|
| - result.in1 = decoder0.decodeInt32(8);
|
| - }
|
| - if (mainDataHeader.version >= 0) {
|
| -
|
| - result.in2 = decoder0.decodeString(16, true);
|
| + result.path = decoder0.decodeString(8, false);
|
| }
|
| return result;
|
| }
|
| @@ -1024,36 +1259,30 @@ class SampleInterfaceSampleMethod1Params extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeInt32(in1, 8);
|
| -
|
| - encoder0.encodeString(in2, 16, true);
|
| + encoder0.encodeString(path, 8, false);
|
| }
|
|
|
| String toString() {
|
| - return "SampleInterfaceSampleMethod1Params("
|
| - "in1: $in1" ", "
|
| - "in2: $in2" ")";
|
| + return "PathServiceGetFilesDirResponseParams("
|
| + "path: $path" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["in1"] = in1;
|
| - map["in2"] = in2;
|
| + map["path"] = path;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class SampleInterfaceSampleMethod1ResponseParams extends bindings.Struct {
|
| +class PathServiceGetCacheDirParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(24, 0)
|
| + const bindings.StructDataHeader(8, 0)
|
| ];
|
| - String out1 = null;
|
| - Enum out2 = null;
|
|
|
| - SampleInterfaceSampleMethod1ResponseParams() : super(kVersions.last.size);
|
| + PathServiceGetCacheDirParams() : super(kVersions.last.size);
|
|
|
| - static SampleInterfaceSampleMethod1ResponseParams deserialize(bindings.Message message) {
|
| + static PathServiceGetCacheDirParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -1062,11 +1291,11 @@ class SampleInterfaceSampleMethod1ResponseParams extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static SampleInterfaceSampleMethod1ResponseParams decode(bindings.Decoder decoder0) {
|
| + static PathServiceGetCacheDirParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - SampleInterfaceSampleMethod1ResponseParams result = new SampleInterfaceSampleMethod1ResponseParams();
|
| + PathServiceGetCacheDirParams result = new PathServiceGetCacheDirParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -1086,17 +1315,68 @@ class SampleInterfaceSampleMethod1ResponseParams 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.out1 = decoder0.decodeString(8, true);
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + encoder.getStructEncoderAtOffset(kVersions.last);
|
| + }
|
| +
|
| + String toString() {
|
| + return "PathServiceGetCacheDirParams("")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class PathServiceGetCacheDirResponseParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + String path = null;
|
| +
|
| + PathServiceGetCacheDirResponseParams() : super(kVersions.last.size);
|
| +
|
| + static PathServiceGetCacheDirResponseParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| }
|
| - if (mainDataHeader.version >= 0) {
|
| -
|
| - result.out2 = Enum.decode(decoder0, 16);
|
| - if (result.out2 == null) {
|
| + return result;
|
| + }
|
| +
|
| + static PathServiceGetCacheDirResponseParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + PathServiceGetCacheDirResponseParams result = new PathServiceGetCacheDirResponseParams();
|
| +
|
| + 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(
|
| - 'Trying to decode null union for non-nullable Enum.');
|
| + '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.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.path = decoder0.decodeString(8, false);
|
| }
|
| return result;
|
| }
|
| @@ -1104,34 +1384,31 @@ class SampleInterfaceSampleMethod1ResponseParams extends bindings.Struct {
|
| void encode(bindings.Encoder encoder) {
|
| var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
|
|
| - encoder0.encodeString(out1, 8, true);
|
| -
|
| - encoder0.encodeEnum(out2, 16);
|
| + encoder0.encodeString(path, 8, false);
|
| }
|
|
|
| String toString() {
|
| - return "SampleInterfaceSampleMethod1ResponseParams("
|
| - "out1: $out1" ", "
|
| - "out2: $out2" ")";
|
| + return "PathServiceGetCacheDirResponseParams("
|
| + "path: $path" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| - map["out1"] = out1;
|
| - map["out2"] = out2;
|
| + map["path"] = path;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class SampleInterfaceSampleMethod0Params extends bindings.Struct {
|
| +class UserFeedbackPerformHapticFeedbackParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(8, 0)
|
| + const bindings.StructDataHeader(16, 0)
|
| ];
|
| + HapticFeedbackType type = null;
|
|
|
| - SampleInterfaceSampleMethod0Params() : super(kVersions.last.size);
|
| + UserFeedbackPerformHapticFeedbackParams() : super(kVersions.last.size);
|
|
|
| - static SampleInterfaceSampleMethod0Params deserialize(bindings.Message message) {
|
| + static UserFeedbackPerformHapticFeedbackParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -1140,11 +1417,11 @@ class SampleInterfaceSampleMethod0Params extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static SampleInterfaceSampleMethod0Params decode(bindings.Decoder decoder0) {
|
| + static UserFeedbackPerformHapticFeedbackParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - SampleInterfaceSampleMethod0Params result = new SampleInterfaceSampleMethod0Params();
|
| + UserFeedbackPerformHapticFeedbackParams result = new UserFeedbackPerformHapticFeedbackParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -1164,32 +1441,45 @@ class SampleInterfaceSampleMethod0Params 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.type = HapticFeedbackType.decode(decoder0, 8);
|
| + if (result.type == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable HapticFeedbackType.');
|
| + }
|
| + }
|
| return result;
|
| }
|
|
|
| void encode(bindings.Encoder encoder) {
|
| - encoder.getStructEncoderAtOffset(kVersions.last);
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(type, 8);
|
| }
|
|
|
| String toString() {
|
| - return "SampleInterfaceSampleMethod0Params("")";
|
| + return "UserFeedbackPerformHapticFeedbackParams("
|
| + "type: $type" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| + map["type"] = type;
|
| return map;
|
| }
|
| }
|
|
|
|
|
| -class SampleInterfaceSampleMethod2Params extends bindings.Struct {
|
| +class UserFeedbackPerformAuralFeedbackParams extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| - const bindings.StructDataHeader(8, 0)
|
| + const bindings.StructDataHeader(16, 0)
|
| ];
|
| + AuralFeedbackType type = null;
|
|
|
| - SampleInterfaceSampleMethod2Params() : super(kVersions.last.size);
|
| + UserFeedbackPerformAuralFeedbackParams() : super(kVersions.last.size);
|
|
|
| - static SampleInterfaceSampleMethod2Params deserialize(bindings.Message message) {
|
| + static UserFeedbackPerformAuralFeedbackParams deserialize(bindings.Message message) {
|
| var decoder = new bindings.Decoder(message);
|
| var result = decode(decoder);
|
| if (decoder.excessHandles != null) {
|
| @@ -1198,11 +1488,11 @@ class SampleInterfaceSampleMethod2Params extends bindings.Struct {
|
| return result;
|
| }
|
|
|
| - static SampleInterfaceSampleMethod2Params decode(bindings.Decoder decoder0) {
|
| + static UserFeedbackPerformAuralFeedbackParams decode(bindings.Decoder decoder0) {
|
| if (decoder0 == null) {
|
| return null;
|
| }
|
| - SampleInterfaceSampleMethod2Params result = new SampleInterfaceSampleMethod2Params();
|
| + UserFeedbackPerformAuralFeedbackParams result = new UserFeedbackPerformAuralFeedbackParams();
|
|
|
| var mainDataHeader = decoder0.decodeStructDataHeader();
|
| if (mainDataHeader.version <= kVersions.last.version) {
|
| @@ -1222,161 +1512,75 @@ class SampleInterfaceSampleMethod2Params 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.type = AuralFeedbackType.decode(decoder0, 8);
|
| + if (result.type == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable AuralFeedbackType.');
|
| + }
|
| + }
|
| return result;
|
| }
|
|
|
| void encode(bindings.Encoder encoder) {
|
| - encoder.getStructEncoderAtOffset(kVersions.last);
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(type, 8);
|
| }
|
|
|
| String toString() {
|
| - return "SampleInterfaceSampleMethod2Params("")";
|
| + return "UserFeedbackPerformAuralFeedbackParams("
|
| + "type: $type" ")";
|
| }
|
|
|
| Map toJson() {
|
| Map map = new Map();
|
| + map["type"] = type;
|
| return map;
|
| }
|
| }
|
|
|
| -const int kProvider_echoString_name = 0;
|
| -const int kProvider_echoStrings_name = 1;
|
| -const int kProvider_echoMessagePipeHandle_name = 2;
|
| -const int kProvider_echoEnum_name = 3;
|
| -const int kProvider_echoInt_name = 4;
|
| +const int kActivity_getUserFeedback_name = 0;
|
| +const int kActivity_startActivity_name = 1;
|
| +const int kActivity_finishCurrentActivity_name = 2;
|
| +const int kActivity_setTaskDescription_name = 3;
|
| +const int kActivity_setSystemUiVisibility_name = 4;
|
| +const int kActivity_setRequestedOrientation_name = 5;
|
|
|
| -const String ProviderName =
|
| - 'sample::Provider';
|
| +const String ActivityName =
|
| + 'activity::Activity';
|
|
|
| -abstract class Provider {
|
| - dynamic echoString(String a,[Function responseFactory = null]);
|
| - dynamic echoStrings(String a,String b,[Function responseFactory = null]);
|
| - dynamic echoMessagePipeHandle(core.MojoMessagePipeEndpoint a,[Function responseFactory = null]);
|
| - dynamic echoEnum(Enum a,[Function responseFactory = null]);
|
| - dynamic echoInt(int a,[Function responseFactory = null]);
|
| +abstract class Activity {
|
| + void getUserFeedback(Object userFeedback);
|
| + void startActivity(Intent intent);
|
| + void finishCurrentActivity();
|
| + void setTaskDescription(TaskDescription description);
|
| + void setSystemUiVisibility(SystemUiVisibility visibility);
|
| + void setRequestedOrientation(ScreenOrientation orientation);
|
|
|
| }
|
|
|
|
|
| -class ProviderProxyImpl extends bindings.Proxy {
|
| - ProviderProxyImpl.fromEndpoint(
|
| +class ActivityProxyImpl extends bindings.Proxy {
|
| + ActivityProxyImpl.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
|
|
| - ProviderProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + ActivityProxyImpl.fromHandle(core.MojoHandle handle) :
|
| super.fromHandle(handle);
|
|
|
| - ProviderProxyImpl.unbound() : super.unbound();
|
| + ActivityProxyImpl.unbound() : super.unbound();
|
|
|
| - static ProviderProxyImpl newFromEndpoint(
|
| + static ActivityProxyImpl newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For ProviderProxyImpl"));
|
| - return new ProviderProxyImpl.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For ActivityProxyImpl"));
|
| + return new ActivityProxyImpl.fromEndpoint(endpoint);
|
| }
|
|
|
| - String get name => ProviderName;
|
| + String get name => ActivityName;
|
|
|
| void handleResponse(bindings.ServiceMessage message) {
|
| switch (message.header.type) {
|
| - case kProvider_echoString_name:
|
| - var r = ProviderEchoStringResponseParams.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 kProvider_echoStrings_name:
|
| - var r = ProviderEchoStringsResponseParams.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 kProvider_echoMessagePipeHandle_name:
|
| - var r = ProviderEchoMessagePipeHandleResponseParams.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 kProvider_echoEnum_name:
|
| - var r = ProviderEchoEnumResponseParams.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 kProvider_echoInt_name:
|
| - var r = ProviderEchoIntResponseParams.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;
|
| default:
|
| proxyError("Unexpected message type: ${message.header.type}");
|
| close(immediate: true);
|
| @@ -1386,100 +1590,113 @@ class ProviderProxyImpl extends bindings.Proxy {
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "ProviderProxyImpl($superString)";
|
| + return "ActivityProxyImpl($superString)";
|
| }
|
| }
|
|
|
|
|
| -class _ProviderProxyCalls implements Provider {
|
| - ProviderProxyImpl _proxyImpl;
|
| +class _ActivityProxyCalls implements Activity {
|
| + ActivityProxyImpl _proxyImpl;
|
|
|
| - _ProviderProxyCalls(this._proxyImpl);
|
| - dynamic echoString(String a,[Function responseFactory = null]) {
|
| - var params = new ProviderEchoStringParams();
|
| - params.a = a;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - kProvider_echoString_name,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| + _ActivityProxyCalls(this._proxyImpl);
|
| + void getUserFeedback(Object userFeedback) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new ActivityGetUserFeedbackParams();
|
| + params.userFeedback = userFeedback;
|
| + _proxyImpl.sendMessage(params, kActivity_getUserFeedback_name);
|
| }
|
| - dynamic echoStrings(String a,String b,[Function responseFactory = null]) {
|
| - var params = new ProviderEchoStringsParams();
|
| - params.a = a;
|
| - params.b = b;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - kProvider_echoStrings_name,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| +
|
| + void startActivity(Intent intent) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new ActivityStartActivityParams();
|
| + params.intent = intent;
|
| + _proxyImpl.sendMessage(params, kActivity_startActivity_name);
|
| }
|
| - dynamic echoMessagePipeHandle(core.MojoMessagePipeEndpoint a,[Function responseFactory = null]) {
|
| - var params = new ProviderEchoMessagePipeHandleParams();
|
| - params.a = a;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - kProvider_echoMessagePipeHandle_name,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| +
|
| + void finishCurrentActivity() {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new ActivityFinishCurrentActivityParams();
|
| + _proxyImpl.sendMessage(params, kActivity_finishCurrentActivity_name);
|
| }
|
| - dynamic echoEnum(Enum a,[Function responseFactory = null]) {
|
| - var params = new ProviderEchoEnumParams();
|
| - params.a = a;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - kProvider_echoEnum_name,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| +
|
| + void setTaskDescription(TaskDescription description) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new ActivitySetTaskDescriptionParams();
|
| + params.description = description;
|
| + _proxyImpl.sendMessage(params, kActivity_setTaskDescription_name);
|
| }
|
| - dynamic echoInt(int a,[Function responseFactory = null]) {
|
| - var params = new ProviderEchoIntParams();
|
| - params.a = a;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - kProvider_echoInt_name,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| +
|
| + void setSystemUiVisibility(SystemUiVisibility visibility) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new ActivitySetSystemUiVisibilityParams();
|
| + params.visibility = visibility;
|
| + _proxyImpl.sendMessage(params, kActivity_setSystemUiVisibility_name);
|
| }
|
| +
|
| + void setRequestedOrientation(ScreenOrientation orientation) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new ActivitySetRequestedOrientationParams();
|
| + params.orientation = orientation;
|
| + _proxyImpl.sendMessage(params, kActivity_setRequestedOrientation_name);
|
| + }
|
| +
|
| }
|
|
|
|
|
| -class ProviderProxy implements bindings.ProxyBase {
|
| +class ActivityProxy implements bindings.ProxyBase {
|
| final bindings.Proxy impl;
|
| - Provider ptr;
|
| - final String name = ProviderName;
|
| + Activity ptr;
|
| + final String name = ActivityName;
|
|
|
| - ProviderProxy(ProviderProxyImpl proxyImpl) :
|
| + ActivityProxy(ActivityProxyImpl proxyImpl) :
|
| impl = proxyImpl,
|
| - ptr = new _ProviderProxyCalls(proxyImpl);
|
| + ptr = new _ActivityProxyCalls(proxyImpl);
|
|
|
| - ProviderProxy.fromEndpoint(
|
| + ActivityProxy.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) :
|
| - impl = new ProviderProxyImpl.fromEndpoint(endpoint) {
|
| - ptr = new _ProviderProxyCalls(impl);
|
| + impl = new ActivityProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _ActivityProxyCalls(impl);
|
| }
|
|
|
| - ProviderProxy.fromHandle(core.MojoHandle handle) :
|
| - impl = new ProviderProxyImpl.fromHandle(handle) {
|
| - ptr = new _ProviderProxyCalls(impl);
|
| + ActivityProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new ActivityProxyImpl.fromHandle(handle) {
|
| + ptr = new _ActivityProxyCalls(impl);
|
| }
|
|
|
| - ProviderProxy.unbound() :
|
| - impl = new ProviderProxyImpl.unbound() {
|
| - ptr = new _ProviderProxyCalls(impl);
|
| + ActivityProxy.unbound() :
|
| + impl = new ActivityProxyImpl.unbound() {
|
| + ptr = new _ActivityProxyCalls(impl);
|
| }
|
|
|
| - factory ProviderProxy.connectToService(
|
| + factory ActivityProxy.connectToService(
|
| bindings.ServiceConnector s, String url) {
|
| - ProviderProxy p = new ProviderProxy.unbound();
|
| + ActivityProxy p = new ActivityProxy.unbound();
|
| s.connectToService(url, p);
|
| return p;
|
| }
|
|
|
| - static ProviderProxy newFromEndpoint(
|
| + static ActivityProxy newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For ProviderProxy"));
|
| - return new ProviderProxy.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For ActivityProxy"));
|
| + return new ActivityProxy.fromEndpoint(endpoint);
|
| }
|
|
|
| Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
| @@ -1497,58 +1714,32 @@ class ProviderProxy implements bindings.ProxyBase {
|
| }
|
|
|
| String toString() {
|
| - return "ProviderProxy($impl)";
|
| + return "ActivityProxy($impl)";
|
| }
|
| }
|
|
|
|
|
| -class ProviderStub extends bindings.Stub {
|
| - Provider _impl = null;
|
| +class ActivityStub extends bindings.Stub {
|
| + Activity _impl = null;
|
|
|
| - ProviderStub.fromEndpoint(
|
| + ActivityStub.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| : super.fromEndpoint(endpoint);
|
|
|
| - ProviderStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + ActivityStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| : super.fromHandle(handle);
|
|
|
| - ProviderStub.unbound() : super.unbound();
|
| + ActivityStub.unbound() : super.unbound();
|
|
|
| - static ProviderStub newFromEndpoint(
|
| + static ActivityStub newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For ProviderStub"));
|
| - return new ProviderStub.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For ActivityStub"));
|
| + return new ActivityStub.fromEndpoint(endpoint);
|
| }
|
|
|
| - static const String name = ProviderName;
|
| + static const String name = ActivityName;
|
|
|
|
|
| - ProviderEchoStringResponseParams _ProviderEchoStringResponseParamsFactory(String a) {
|
| - var mojo_factory_result = new ProviderEchoStringResponseParams();
|
| - mojo_factory_result.a = a;
|
| - return mojo_factory_result;
|
| - }
|
| - ProviderEchoStringsResponseParams _ProviderEchoStringsResponseParamsFactory(String a, String b) {
|
| - var mojo_factory_result = new ProviderEchoStringsResponseParams();
|
| - mojo_factory_result.a = a;
|
| - mojo_factory_result.b = b;
|
| - return mojo_factory_result;
|
| - }
|
| - ProviderEchoMessagePipeHandleResponseParams _ProviderEchoMessagePipeHandleResponseParamsFactory(core.MojoMessagePipeEndpoint a) {
|
| - var mojo_factory_result = new ProviderEchoMessagePipeHandleResponseParams();
|
| - mojo_factory_result.a = a;
|
| - return mojo_factory_result;
|
| - }
|
| - ProviderEchoEnumResponseParams _ProviderEchoEnumResponseParamsFactory(Enum a) {
|
| - var mojo_factory_result = new ProviderEchoEnumResponseParams();
|
| - mojo_factory_result.a = a;
|
| - return mojo_factory_result;
|
| - }
|
| - ProviderEchoIntResponseParams _ProviderEchoIntResponseParamsFactory(int a) {
|
| - var mojo_factory_result = new ProviderEchoIntResponseParams();
|
| - mojo_factory_result.a = a;
|
| - return mojo_factory_result;
|
| - }
|
|
|
| dynamic handleMessage(bindings.ServiceMessage message) {
|
| if (bindings.ControlMessageHandler.isControlMessage(message)) {
|
| @@ -1558,115 +1749,35 @@ class ProviderStub extends bindings.Stub {
|
| }
|
| assert(_impl != null);
|
| switch (message.header.type) {
|
| - case kProvider_echoString_name:
|
| - var params = ProviderEchoStringParams.deserialize(
|
| + case kActivity_getUserFeedback_name:
|
| + var params = ActivityGetUserFeedbackParams.deserialize(
|
| message.payload);
|
| - var response = _impl.echoString(params.a,_ProviderEchoStringResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoString_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoString_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| + _impl.getUserFeedback(params.userFeedback);
|
| break;
|
| - case kProvider_echoStrings_name:
|
| - var params = ProviderEchoStringsParams.deserialize(
|
| + case kActivity_startActivity_name:
|
| + var params = ActivityStartActivityParams.deserialize(
|
| message.payload);
|
| - var response = _impl.echoStrings(params.a,params.b,_ProviderEchoStringsResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoStrings_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoStrings_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| + _impl.startActivity(params.intent);
|
| break;
|
| - case kProvider_echoMessagePipeHandle_name:
|
| - var params = ProviderEchoMessagePipeHandleParams.deserialize(
|
| + case kActivity_finishCurrentActivity_name:
|
| + var params = ActivityFinishCurrentActivityParams.deserialize(
|
| message.payload);
|
| - var response = _impl.echoMessagePipeHandle(params.a,_ProviderEchoMessagePipeHandleResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoMessagePipeHandle_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoMessagePipeHandle_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| + _impl.finishCurrentActivity();
|
| break;
|
| - case kProvider_echoEnum_name:
|
| - var params = ProviderEchoEnumParams.deserialize(
|
| + case kActivity_setTaskDescription_name:
|
| + var params = ActivitySetTaskDescriptionParams.deserialize(
|
| message.payload);
|
| - var response = _impl.echoEnum(params.a,_ProviderEchoEnumResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoEnum_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoEnum_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| + _impl.setTaskDescription(params.description);
|
| break;
|
| - case kProvider_echoInt_name:
|
| - var params = ProviderEchoIntParams.deserialize(
|
| + case kActivity_setSystemUiVisibility_name:
|
| + var params = ActivitySetSystemUiVisibilityParams.deserialize(
|
| message.payload);
|
| - var response = _impl.echoInt(params.a,_ProviderEchoIntResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoInt_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kProvider_echoInt_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| + _impl.setSystemUiVisibility(params.visibility);
|
| + break;
|
| + case kActivity_setRequestedOrientation_name:
|
| + var params = ActivitySetRequestedOrientationParams.deserialize(
|
| + message.payload);
|
| + _impl.setRequestedOrientation(params.orientation);
|
| break;
|
| default:
|
| throw new bindings.MojoCodecError("Unexpected message name");
|
| @@ -1675,54 +1786,96 @@ class ProviderStub extends bindings.Stub {
|
| return null;
|
| }
|
|
|
| - Provider get impl => _impl;
|
| - set impl(Provider d) {
|
| + Activity get impl => _impl;
|
| + set impl(Activity d) {
|
| assert(_impl == null);
|
| _impl = d;
|
| }
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "ProviderStub($superString)";
|
| + return "ActivityStub($superString)";
|
| }
|
|
|
| int get version => 0;
|
| }
|
|
|
| -const int kIntegerAccessor_getInteger_name = 0;
|
| -const int kIntegerAccessor_setInteger_name = 1;
|
| +const int kPathService_getAppDataDir_name = 0;
|
| +const int kPathService_getFilesDir_name = 1;
|
| +const int kPathService_getCacheDir_name = 2;
|
|
|
| -const String IntegerAccessorName =
|
| - 'sample::IntegerAccessor';
|
| +const String PathServiceName =
|
| + 'activity::PathService';
|
|
|
| -abstract class IntegerAccessor {
|
| - dynamic getInteger([Function responseFactory = null]);
|
| - void setInteger(int data, Enum type);
|
| +abstract class PathService {
|
| + dynamic getAppDataDir([Function responseFactory = null]);
|
| + dynamic getFilesDir([Function responseFactory = null]);
|
| + dynamic getCacheDir([Function responseFactory = null]);
|
|
|
| }
|
|
|
|
|
| -class IntegerAccessorProxyImpl extends bindings.Proxy {
|
| - IntegerAccessorProxyImpl.fromEndpoint(
|
| +class PathServiceProxyImpl extends bindings.Proxy {
|
| + PathServiceProxyImpl.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
|
|
| - IntegerAccessorProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + PathServiceProxyImpl.fromHandle(core.MojoHandle handle) :
|
| super.fromHandle(handle);
|
|
|
| - IntegerAccessorProxyImpl.unbound() : super.unbound();
|
| + PathServiceProxyImpl.unbound() : super.unbound();
|
|
|
| - static IntegerAccessorProxyImpl newFromEndpoint(
|
| + static PathServiceProxyImpl newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For IntegerAccessorProxyImpl"));
|
| - return new IntegerAccessorProxyImpl.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For PathServiceProxyImpl"));
|
| + return new PathServiceProxyImpl.fromEndpoint(endpoint);
|
| }
|
|
|
| - String get name => IntegerAccessorName;
|
| + String get name => PathServiceName;
|
|
|
| void handleResponse(bindings.ServiceMessage message) {
|
| switch (message.header.type) {
|
| - case kIntegerAccessor_getInteger_name:
|
| - var r = IntegerAccessorGetIntegerResponseParams.deserialize(
|
| + case kPathService_getAppDataDir_name:
|
| + var r = PathServiceGetAppDataDirResponseParams.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 kPathService_getFilesDir_name:
|
| + var r = PathServiceGetFilesDirResponseParams.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 kPathService_getCacheDir_name:
|
| + var r = PathServiceGetCacheDirResponseParams.deserialize(
|
| message.payload);
|
| if (!message.header.hasRequestId) {
|
| proxyError("Expected a message with a valid request Id.");
|
| @@ -1750,73 +1903,78 @@ class IntegerAccessorProxyImpl extends bindings.Proxy {
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "IntegerAccessorProxyImpl($superString)";
|
| + return "PathServiceProxyImpl($superString)";
|
| }
|
| }
|
|
|
|
|
| -class _IntegerAccessorProxyCalls implements IntegerAccessor {
|
| - IntegerAccessorProxyImpl _proxyImpl;
|
| +class _PathServiceProxyCalls implements PathService {
|
| + PathServiceProxyImpl _proxyImpl;
|
|
|
| - _IntegerAccessorProxyCalls(this._proxyImpl);
|
| - dynamic getInteger([Function responseFactory = null]) {
|
| - var params = new IntegerAccessorGetIntegerParams();
|
| + _PathServiceProxyCalls(this._proxyImpl);
|
| + dynamic getAppDataDir([Function responseFactory = null]) {
|
| + var params = new PathServiceGetAppDataDirParams();
|
| return _proxyImpl.sendMessageWithRequestId(
|
| params,
|
| - kIntegerAccessor_getInteger_name,
|
| + kPathService_getAppDataDir_name,
|
| -1,
|
| bindings.MessageHeader.kMessageExpectsResponse);
|
| }
|
| - void setInteger(int data, Enum type) {
|
| - if (!_proxyImpl.isBound) {
|
| - _proxyImpl.proxyError("The Proxy is closed.");
|
| - return;
|
| - }
|
| - var params = new IntegerAccessorSetIntegerParams();
|
| - params.data = data;
|
| - params.type = type;
|
| - _proxyImpl.sendMessage(params, kIntegerAccessor_setInteger_name);
|
| + dynamic getFilesDir([Function responseFactory = null]) {
|
| + var params = new PathServiceGetFilesDirParams();
|
| + return _proxyImpl.sendMessageWithRequestId(
|
| + params,
|
| + kPathService_getFilesDir_name,
|
| + -1,
|
| + bindings.MessageHeader.kMessageExpectsResponse);
|
| + }
|
| + dynamic getCacheDir([Function responseFactory = null]) {
|
| + var params = new PathServiceGetCacheDirParams();
|
| + return _proxyImpl.sendMessageWithRequestId(
|
| + params,
|
| + kPathService_getCacheDir_name,
|
| + -1,
|
| + bindings.MessageHeader.kMessageExpectsResponse);
|
| }
|
| -
|
| }
|
|
|
|
|
| -class IntegerAccessorProxy implements bindings.ProxyBase {
|
| +class PathServiceProxy implements bindings.ProxyBase {
|
| final bindings.Proxy impl;
|
| - IntegerAccessor ptr;
|
| - final String name = IntegerAccessorName;
|
| + PathService ptr;
|
| + final String name = PathServiceName;
|
|
|
| - IntegerAccessorProxy(IntegerAccessorProxyImpl proxyImpl) :
|
| + PathServiceProxy(PathServiceProxyImpl proxyImpl) :
|
| impl = proxyImpl,
|
| - ptr = new _IntegerAccessorProxyCalls(proxyImpl);
|
| + ptr = new _PathServiceProxyCalls(proxyImpl);
|
|
|
| - IntegerAccessorProxy.fromEndpoint(
|
| + PathServiceProxy.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) :
|
| - impl = new IntegerAccessorProxyImpl.fromEndpoint(endpoint) {
|
| - ptr = new _IntegerAccessorProxyCalls(impl);
|
| + impl = new PathServiceProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _PathServiceProxyCalls(impl);
|
| }
|
|
|
| - IntegerAccessorProxy.fromHandle(core.MojoHandle handle) :
|
| - impl = new IntegerAccessorProxyImpl.fromHandle(handle) {
|
| - ptr = new _IntegerAccessorProxyCalls(impl);
|
| + PathServiceProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new PathServiceProxyImpl.fromHandle(handle) {
|
| + ptr = new _PathServiceProxyCalls(impl);
|
| }
|
|
|
| - IntegerAccessorProxy.unbound() :
|
| - impl = new IntegerAccessorProxyImpl.unbound() {
|
| - ptr = new _IntegerAccessorProxyCalls(impl);
|
| + PathServiceProxy.unbound() :
|
| + impl = new PathServiceProxyImpl.unbound() {
|
| + ptr = new _PathServiceProxyCalls(impl);
|
| }
|
|
|
| - factory IntegerAccessorProxy.connectToService(
|
| + factory PathServiceProxy.connectToService(
|
| bindings.ServiceConnector s, String url) {
|
| - IntegerAccessorProxy p = new IntegerAccessorProxy.unbound();
|
| + PathServiceProxy p = new PathServiceProxy.unbound();
|
| s.connectToService(url, p);
|
| return p;
|
| }
|
|
|
| - static IntegerAccessorProxy newFromEndpoint(
|
| + static PathServiceProxy newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For IntegerAccessorProxy"));
|
| - return new IntegerAccessorProxy.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For PathServiceProxy"));
|
| + return new PathServiceProxy.fromEndpoint(endpoint);
|
| }
|
|
|
| Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
| @@ -1834,57 +1992,88 @@ class IntegerAccessorProxy implements bindings.ProxyBase {
|
| }
|
|
|
| String toString() {
|
| - return "IntegerAccessorProxy($impl)";
|
| + return "PathServiceProxy($impl)";
|
| }
|
| }
|
|
|
|
|
| -class IntegerAccessorStub extends bindings.Stub {
|
| - IntegerAccessor _impl = null;
|
| +class PathServiceStub extends bindings.Stub {
|
| + PathService _impl = null;
|
|
|
| - IntegerAccessorStub.fromEndpoint(
|
| + PathServiceStub.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| : super.fromEndpoint(endpoint);
|
|
|
| - IntegerAccessorStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + PathServiceStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| : super.fromHandle(handle);
|
|
|
| - IntegerAccessorStub.unbound() : super.unbound();
|
| + PathServiceStub.unbound() : super.unbound();
|
|
|
| - static IntegerAccessorStub newFromEndpoint(
|
| + static PathServiceStub newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For IntegerAccessorStub"));
|
| - return new IntegerAccessorStub.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For PathServiceStub"));
|
| + return new PathServiceStub.fromEndpoint(endpoint);
|
| }
|
|
|
| - static const String name = IntegerAccessorName;
|
| + static const String name = PathServiceName;
|
|
|
|
|
| - IntegerAccessorGetIntegerResponseParams _IntegerAccessorGetIntegerResponseParamsFactory(int data, Enum type) {
|
| - var mojo_factory_result = new IntegerAccessorGetIntegerResponseParams();
|
| - mojo_factory_result.data = data;
|
| - mojo_factory_result.type = type;
|
| + PathServiceGetAppDataDirResponseParams _PathServiceGetAppDataDirResponseParamsFactory(String path) {
|
| + var mojo_factory_result = new PathServiceGetAppDataDirResponseParams();
|
| + mojo_factory_result.path = path;
|
| + return mojo_factory_result;
|
| + }
|
| + PathServiceGetFilesDirResponseParams _PathServiceGetFilesDirResponseParamsFactory(String path) {
|
| + var mojo_factory_result = new PathServiceGetFilesDirResponseParams();
|
| + mojo_factory_result.path = path;
|
| + return mojo_factory_result;
|
| + }
|
| + PathServiceGetCacheDirResponseParams _PathServiceGetCacheDirResponseParamsFactory(String path) {
|
| + var mojo_factory_result = new PathServiceGetCacheDirResponseParams();
|
| + mojo_factory_result.path = path;
|
| return mojo_factory_result;
|
| }
|
|
|
| dynamic handleMessage(bindings.ServiceMessage message) {
|
| if (bindings.ControlMessageHandler.isControlMessage(message)) {
|
| return bindings.ControlMessageHandler.handleMessage(this,
|
| - 3,
|
| + 0,
|
| message);
|
| }
|
| assert(_impl != null);
|
| switch (message.header.type) {
|
| - case kIntegerAccessor_getInteger_name:
|
| - var params = IntegerAccessorGetIntegerParams.deserialize(
|
| + case kPathService_getAppDataDir_name:
|
| + var params = PathServiceGetAppDataDirParams.deserialize(
|
| + message.payload);
|
| + var response = _impl.getAppDataDir(_PathServiceGetAppDataDirResponseParamsFactory);
|
| + if (response is Future) {
|
| + return response.then((response) {
|
| + if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + kPathService_getAppDataDir_name,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + });
|
| + } else if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + kPathService_getAppDataDir_name,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + break;
|
| + case kPathService_getFilesDir_name:
|
| + var params = PathServiceGetFilesDirParams.deserialize(
|
| message.payload);
|
| - var response = _impl.getInteger(_IntegerAccessorGetIntegerResponseParamsFactory);
|
| + var response = _impl.getFilesDir(_PathServiceGetFilesDirResponseParamsFactory);
|
| if (response is Future) {
|
| return response.then((response) {
|
| if (response != null) {
|
| return buildResponseWithId(
|
| response,
|
| - kIntegerAccessor_getInteger_name,
|
| + kPathService_getFilesDir_name,
|
| message.header.requestId,
|
| bindings.MessageHeader.kMessageIsResponse);
|
| }
|
| @@ -1892,15 +2081,32 @@ class IntegerAccessorStub extends bindings.Stub {
|
| } else if (response != null) {
|
| return buildResponseWithId(
|
| response,
|
| - kIntegerAccessor_getInteger_name,
|
| + kPathService_getFilesDir_name,
|
| message.header.requestId,
|
| bindings.MessageHeader.kMessageIsResponse);
|
| }
|
| break;
|
| - case kIntegerAccessor_setInteger_name:
|
| - var params = IntegerAccessorSetIntegerParams.deserialize(
|
| + case kPathService_getCacheDir_name:
|
| + var params = PathServiceGetCacheDirParams.deserialize(
|
| message.payload);
|
| - _impl.setInteger(params.data, params.type);
|
| + var response = _impl.getCacheDir(_PathServiceGetCacheDirResponseParamsFactory);
|
| + if (response is Future) {
|
| + return response.then((response) {
|
| + if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + kPathService_getCacheDir_name,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + });
|
| + } else if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + kPathService_getCacheDir_name,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| break;
|
| default:
|
| throw new bindings.MojoCodecError("Unexpected message name");
|
| @@ -1909,74 +2115,52 @@ class IntegerAccessorStub extends bindings.Stub {
|
| return null;
|
| }
|
|
|
| - IntegerAccessor get impl => _impl;
|
| - set impl(IntegerAccessor d) {
|
| + PathService get impl => _impl;
|
| + set impl(PathService d) {
|
| assert(_impl == null);
|
| _impl = d;
|
| }
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "IntegerAccessorStub($superString)";
|
| + return "PathServiceStub($superString)";
|
| }
|
|
|
| - int get version => 3;
|
| + int get version => 0;
|
| }
|
|
|
| -const int kSampleInterface_sampleMethod1_name = 1;
|
| -const int kSampleInterface_sampleMethod0_name = 0;
|
| -const int kSampleInterface_sampleMethod2_name = 2;
|
| +const int kUserFeedback_performHapticFeedback_name = 0;
|
| +const int kUserFeedback_performAuralFeedback_name = 1;
|
|
|
| -const String SampleInterfaceName =
|
| - 'sample::SampleInterface';
|
| +const String UserFeedbackName =
|
| + 'activity::UserFeedback';
|
|
|
| -abstract class SampleInterface {
|
| - dynamic sampleMethod1(int in1,String in2,[Function responseFactory = null]);
|
| - void sampleMethod0();
|
| - void sampleMethod2();
|
| +abstract class UserFeedback {
|
| + void performHapticFeedback(HapticFeedbackType type);
|
| + void performAuralFeedback(AuralFeedbackType type);
|
|
|
| }
|
|
|
|
|
| -class SampleInterfaceProxyImpl extends bindings.Proxy {
|
| - SampleInterfaceProxyImpl.fromEndpoint(
|
| +class UserFeedbackProxyImpl extends bindings.Proxy {
|
| + UserFeedbackProxyImpl.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
|
|
| - SampleInterfaceProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + UserFeedbackProxyImpl.fromHandle(core.MojoHandle handle) :
|
| super.fromHandle(handle);
|
|
|
| - SampleInterfaceProxyImpl.unbound() : super.unbound();
|
| + UserFeedbackProxyImpl.unbound() : super.unbound();
|
|
|
| - static SampleInterfaceProxyImpl newFromEndpoint(
|
| + static UserFeedbackProxyImpl newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For SampleInterfaceProxyImpl"));
|
| - return new SampleInterfaceProxyImpl.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For UserFeedbackProxyImpl"));
|
| + return new UserFeedbackProxyImpl.fromEndpoint(endpoint);
|
| }
|
|
|
| - String get name => SampleInterfaceName;
|
| + String get name => UserFeedbackName;
|
|
|
| void handleResponse(bindings.ServiceMessage message) {
|
| switch (message.header.type) {
|
| - case kSampleInterface_sampleMethod1_name:
|
| - var r = SampleInterfaceSampleMethod1ResponseParams.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;
|
| default:
|
| proxyError("Unexpected message type: ${message.header.type}");
|
| close(immediate: true);
|
| @@ -1986,82 +2170,74 @@ class SampleInterfaceProxyImpl extends bindings.Proxy {
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "SampleInterfaceProxyImpl($superString)";
|
| + return "UserFeedbackProxyImpl($superString)";
|
| }
|
| }
|
|
|
|
|
| -class _SampleInterfaceProxyCalls implements SampleInterface {
|
| - SampleInterfaceProxyImpl _proxyImpl;
|
| +class _UserFeedbackProxyCalls implements UserFeedback {
|
| + UserFeedbackProxyImpl _proxyImpl;
|
|
|
| - _SampleInterfaceProxyCalls(this._proxyImpl);
|
| - dynamic sampleMethod1(int in1,String in2,[Function responseFactory = null]) {
|
| - var params = new SampleInterfaceSampleMethod1Params();
|
| - params.in1 = in1;
|
| - params.in2 = in2;
|
| - return _proxyImpl.sendMessageWithRequestId(
|
| - params,
|
| - kSampleInterface_sampleMethod1_name,
|
| - -1,
|
| - bindings.MessageHeader.kMessageExpectsResponse);
|
| - }
|
| - void sampleMethod0() {
|
| + _UserFeedbackProxyCalls(this._proxyImpl);
|
| + void performHapticFeedback(HapticFeedbackType type) {
|
| if (!_proxyImpl.isBound) {
|
| _proxyImpl.proxyError("The Proxy is closed.");
|
| return;
|
| }
|
| - var params = new SampleInterfaceSampleMethod0Params();
|
| - _proxyImpl.sendMessage(params, kSampleInterface_sampleMethod0_name);
|
| + var params = new UserFeedbackPerformHapticFeedbackParams();
|
| + params.type = type;
|
| + _proxyImpl.sendMessage(params, kUserFeedback_performHapticFeedback_name);
|
| }
|
|
|
| - void sampleMethod2() {
|
| + void performAuralFeedback(AuralFeedbackType type) {
|
| if (!_proxyImpl.isBound) {
|
| _proxyImpl.proxyError("The Proxy is closed.");
|
| return;
|
| }
|
| - var params = new SampleInterfaceSampleMethod2Params();
|
| - _proxyImpl.sendMessage(params, kSampleInterface_sampleMethod2_name);
|
| + var params = new UserFeedbackPerformAuralFeedbackParams();
|
| + params.type = type;
|
| + _proxyImpl.sendMessage(params, kUserFeedback_performAuralFeedback_name);
|
| }
|
|
|
| }
|
|
|
|
|
| -class SampleInterfaceProxy implements bindings.ProxyBase {
|
| +class UserFeedbackProxy implements bindings.ProxyBase {
|
| final bindings.Proxy impl;
|
| - SampleInterface ptr;
|
| - final String name = SampleInterfaceName;
|
| + UserFeedback ptr;
|
| + final String name = UserFeedbackName;
|
|
|
| - SampleInterfaceProxy(SampleInterfaceProxyImpl proxyImpl) :
|
| + UserFeedbackProxy(UserFeedbackProxyImpl proxyImpl) :
|
| impl = proxyImpl,
|
| - ptr = new _SampleInterfaceProxyCalls(proxyImpl);
|
| + ptr = new _UserFeedbackProxyCalls(proxyImpl);
|
|
|
| - SampleInterfaceProxy.fromEndpoint(
|
| + UserFeedbackProxy.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) :
|
| - impl = new SampleInterfaceProxyImpl.fromEndpoint(endpoint) {
|
| - ptr = new _SampleInterfaceProxyCalls(impl);
|
| + impl = new UserFeedbackProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _UserFeedbackProxyCalls(impl);
|
| }
|
|
|
| - SampleInterfaceProxy.fromHandle(core.MojoHandle handle) :
|
| - impl = new SampleInterfaceProxyImpl.fromHandle(handle) {
|
| - ptr = new _SampleInterfaceProxyCalls(impl);
|
| + UserFeedbackProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new UserFeedbackProxyImpl.fromHandle(handle) {
|
| + ptr = new _UserFeedbackProxyCalls(impl);
|
| }
|
|
|
| - SampleInterfaceProxy.unbound() :
|
| - impl = new SampleInterfaceProxyImpl.unbound() {
|
| - ptr = new _SampleInterfaceProxyCalls(impl);
|
| + UserFeedbackProxy.unbound() :
|
| + impl = new UserFeedbackProxyImpl.unbound() {
|
| + ptr = new _UserFeedbackProxyCalls(impl);
|
| }
|
|
|
| - factory SampleInterfaceProxy.connectToService(
|
| + factory UserFeedbackProxy.connectToService(
|
| bindings.ServiceConnector s, String url) {
|
| - SampleInterfaceProxy p = new SampleInterfaceProxy.unbound();
|
| + UserFeedbackProxy p = new UserFeedbackProxy.unbound();
|
| s.connectToService(url, p);
|
| return p;
|
| }
|
|
|
| - static SampleInterfaceProxy newFromEndpoint(
|
| + static UserFeedbackProxy newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For SampleInterfaceProxy"));
|
| - return new SampleInterfaceProxy.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For UserFeedbackProxy"));
|
| + return new UserFeedbackProxy.fromEndpoint(endpoint);
|
| }
|
|
|
| Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
| @@ -2079,38 +2255,32 @@ class SampleInterfaceProxy implements bindings.ProxyBase {
|
| }
|
|
|
| String toString() {
|
| - return "SampleInterfaceProxy($impl)";
|
| + return "UserFeedbackProxy($impl)";
|
| }
|
| }
|
|
|
|
|
| -class SampleInterfaceStub extends bindings.Stub {
|
| - SampleInterface _impl = null;
|
| +class UserFeedbackStub extends bindings.Stub {
|
| + UserFeedback _impl = null;
|
|
|
| - SampleInterfaceStub.fromEndpoint(
|
| + UserFeedbackStub.fromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| : super.fromEndpoint(endpoint);
|
|
|
| - SampleInterfaceStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + UserFeedbackStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| : super.fromHandle(handle);
|
|
|
| - SampleInterfaceStub.unbound() : super.unbound();
|
| + UserFeedbackStub.unbound() : super.unbound();
|
|
|
| - static SampleInterfaceStub newFromEndpoint(
|
| + static UserFeedbackStub newFromEndpoint(
|
| core.MojoMessagePipeEndpoint endpoint) {
|
| - assert(endpoint.setDescription("For SampleInterfaceStub"));
|
| - return new SampleInterfaceStub.fromEndpoint(endpoint);
|
| + assert(endpoint.setDescription("For UserFeedbackStub"));
|
| + return new UserFeedbackStub.fromEndpoint(endpoint);
|
| }
|
|
|
| - static const String name = SampleInterfaceName;
|
| + static const String name = UserFeedbackName;
|
|
|
|
|
| - SampleInterfaceSampleMethod1ResponseParams _SampleInterfaceSampleMethod1ResponseParamsFactory(String out1, Enum out2) {
|
| - var mojo_factory_result = new SampleInterfaceSampleMethod1ResponseParams();
|
| - mojo_factory_result.out1 = out1;
|
| - mojo_factory_result.out2 = out2;
|
| - return mojo_factory_result;
|
| - }
|
|
|
| dynamic handleMessage(bindings.ServiceMessage message) {
|
| if (bindings.ControlMessageHandler.isControlMessage(message)) {
|
| @@ -2120,37 +2290,15 @@ class SampleInterfaceStub extends bindings.Stub {
|
| }
|
| assert(_impl != null);
|
| switch (message.header.type) {
|
| - case kSampleInterface_sampleMethod1_name:
|
| - var params = SampleInterfaceSampleMethod1Params.deserialize(
|
| - message.payload);
|
| - var response = _impl.sampleMethod1(params.in1,params.in2,_SampleInterfaceSampleMethod1ResponseParamsFactory);
|
| - if (response is Future) {
|
| - return response.then((response) {
|
| - if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kSampleInterface_sampleMethod1_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - });
|
| - } else if (response != null) {
|
| - return buildResponseWithId(
|
| - response,
|
| - kSampleInterface_sampleMethod1_name,
|
| - message.header.requestId,
|
| - bindings.MessageHeader.kMessageIsResponse);
|
| - }
|
| - break;
|
| - case kSampleInterface_sampleMethod0_name:
|
| - var params = SampleInterfaceSampleMethod0Params.deserialize(
|
| + case kUserFeedback_performHapticFeedback_name:
|
| + var params = UserFeedbackPerformHapticFeedbackParams.deserialize(
|
| message.payload);
|
| - _impl.sampleMethod0();
|
| + _impl.performHapticFeedback(params.type);
|
| break;
|
| - case kSampleInterface_sampleMethod2_name:
|
| - var params = SampleInterfaceSampleMethod2Params.deserialize(
|
| + case kUserFeedback_performAuralFeedback_name:
|
| + var params = UserFeedbackPerformAuralFeedbackParams.deserialize(
|
| message.payload);
|
| - _impl.sampleMethod2();
|
| + _impl.performAuralFeedback(params.type);
|
| break;
|
| default:
|
| throw new bindings.MojoCodecError("Unexpected message name");
|
| @@ -2159,15 +2307,15 @@ class SampleInterfaceStub extends bindings.Stub {
|
| return null;
|
| }
|
|
|
| - SampleInterface get impl => _impl;
|
| - set impl(SampleInterface d) {
|
| + UserFeedback get impl => _impl;
|
| + set impl(UserFeedback d) {
|
| assert(_impl == null);
|
| _impl = d;
|
| }
|
|
|
| String toString() {
|
| var superString = super.toString();
|
| - return "SampleInterfaceStub($superString)";
|
| + return "UserFeedbackStub($superString)";
|
| }
|
|
|
| int get version => 0;
|
|
|