TBR syncslides: Upgrading discovery and fixing breaking changes.
Change-Id: I7615098be19a4f3939b30a368ebfb7313b6cca0a
diff --git a/dart/lib/discovery/client.dart b/dart/lib/discovery/client.dart
index d120433..f9eab6e 100644
--- a/dart/lib/discovery/client.dart
+++ b/dart/lib/discovery/client.dart
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
import 'dart:async';
-import 'dart:convert';
import 'package:flutter/services.dart' show shell;
import 'package:logging/logging.dart';
@@ -51,7 +50,7 @@
serviceAttrs['deckid'] = presentation.deck.key;
serviceAttrs['name'] = presentation.deck.name;
v23discovery.Service serviceInfo = new v23discovery.Service()
- ..instanceUuid = UTF8.encode(presentation.key)
+ ..instanceId = presentation.key
..interfaceName = presentationInterfaceName
..instanceName = presentation.key
..attrs = serviceAttrs
@@ -98,7 +97,7 @@
stoppingCall.then((_) {
_advertiseCalls.remove(presentationId);
- log.info('Stopped advertising ${presentationId}.');
+ log.info('Stopped advertising ${presentationId}.');
}).catchError((e) {
_stoppingAdvertisingCalls.remove(presentationId);
throw e;
@@ -150,7 +149,7 @@
_stoppingScanCall.then((_) {
_scanCall = null;
- log.info('Scan stopped.');
+ log.info('Scan stopped.');
}).catchError((e) {
_stoppingScanCall = null;
throw e;
@@ -159,7 +158,7 @@
class ScanHandler extends v23discovery.ScanHandler {
found(v23discovery.Service s) async {
- String key = UTF8.decode(s.instanceUuid);
+ String key = s.instanceId;
log.info('Found presentation ${s.attrs['name']} under $key.');
// Ignore our own advertised services.
if (_advertiseCalls.containsKey(key)) {
@@ -181,8 +180,7 @@
_onFoundEmitter.add(presentation);
}
- lost(List<int> instanceId) {
- String presentationId = UTF8.decode(instanceId);
+ lost(String presentationId) {
// Ignore our own advertised services.
log.info('Lost presentation $presentationId.');
_onLostEmitter.add(presentationId);
diff --git a/dart/pubspec.lock b/dart/pubspec.lock
index bf3850a..f3021f6 100644
--- a/dart/pubspec.lock
+++ b/dart/pubspec.lock
@@ -154,7 +154,7 @@
path:
description: path
source: hosted
- version: "1.3.6"
+ version: "1.3.7"
petitparser:
description: petitparser
source: hosted
@@ -174,7 +174,7 @@
shelf:
description: shelf
source: hosted
- version: "0.6.4+1"
+ version: "0.6.4+2"
shelf_static:
description: shelf_static
source: hosted
@@ -234,7 +234,7 @@
v23discovery:
description: v23discovery
source: hosted
- version: "0.0.4"
+ version: "0.0.5"
vector_math:
description: vector_math
source: hosted