croupier: Upgrade to Syncbase 0.0.15
As title
Change-Id: I235c40dd3f08758c0049f2766a6ec668d1ee0314
diff --git a/lib/src/syncbase/croupier_client.dart b/lib/src/syncbase/croupier_client.dart
index a53e85c..e4fe3ca 100644
--- a/lib/src/syncbase/croupier_client.dart
+++ b/lib/src/syncbase/croupier_client.dart
@@ -38,16 +38,19 @@
// TODO(alexfandrianto): Remove this test advertisement once we are more
// comfortable with Discovery.
String interfaceName = "HelloWorld!";
- _discoveryClient.scan(discoveryTestKey, 'v.InterfaceName="${interfaceName}"', new MyScanHandler());
- _discoveryClient.advertise(discoveryTestKey,
- DiscoveryClient.serviceMaker(interfaceName: interfaceName, addrs: ["dummy address"]));
+ _discoveryClient.scan(discoveryTestKey,
+ 'v.InterfaceName="${interfaceName}"', new MyScanHandler());
+ _discoveryClient.advertise(
+ discoveryTestKey,
+ DiscoveryClient.serviceMaker(
+ interfaceName: interfaceName, addrs: ["dummy address"]));
}
DiscoveryClient get discoveryClient => _discoveryClient;
// TODO(alexfandrianto): Try not to call this twice at the same time.
// That would lead to very race-y behavior.
- Future<sc.SyncbaseNoSqlDatabase> createDatabase() async {
+ Future<sc.SyncbaseDatabase> createDatabase() async {
util.log('CroupierClient.createDatabase');
var app = _syncbaseClient.app(util.appName);
if (!(await app.exists())) {
@@ -67,7 +70,7 @@
// TODO(alexfandrianto): Try not to call this twice at the same time.
// That would lead to very race-y behavior.
Future<sc.SyncbaseTable> createTable(
- sc.SyncbaseNoSqlDatabase db, String tableName) async {
+ sc.SyncbaseDatabase db, String tableName) async {
if (_tableLock != null) {
await _tableLock.future;
}
@@ -128,7 +131,7 @@
// Helper to get the SyncbaseSyncgroup object from the string.
Future<sc.SyncbaseSyncgroup> _getSyncgroup(String sgName) async {
- sc.SyncbaseNoSqlDatabase db = await createDatabase();
+ sc.SyncbaseDatabase db = await createDatabase();
return db.syncgroup(sgName);
}
diff --git a/lib/src/syncbase/log_writer.dart b/lib/src/syncbase/log_writer.dart
index a146839..d896cc3 100644
--- a/lib/src/syncbase/log_writer.dart
+++ b/lib/src/syncbase/log_writer.dart
@@ -24,7 +24,7 @@
import 'dart:convert' show UTF8, JSON;
import 'package:syncbase/syncbase_client.dart'
- show SyncbaseNoSqlDatabase, SyncbaseTable, WatchChange, WatchChangeTypes;
+ show SyncbaseDatabase, SyncbaseTable, WatchChange, WatchChangeTypes;
enum SimulLevel { TURN_BASED, INDEPENDENT, DEPENDENT }
@@ -76,7 +76,7 @@
return; // Then we're already prepared.
}
- SyncbaseNoSqlDatabase db = await _cc.createDatabase();
+ SyncbaseDatabase db = await _cc.createDatabase();
tb = await _cc.createTable(db, tbName);
// Start to watch the stream.
diff --git a/lib/src/syncbase/settings_manager.dart b/lib/src/syncbase/settings_manager.dart
index 7c11939..682a2b7 100644
--- a/lib/src/syncbase/settings_manager.dart
+++ b/lib/src/syncbase/settings_manager.dart
@@ -55,7 +55,7 @@
return; // Then we're already prepared.
}
- sc.SyncbaseNoSqlDatabase db = await _cc.createDatabase();
+ sc.SyncbaseDatabase db = await _cc.createDatabase();
tb = await _cc.createTable(db, util.tableNameSettings);
// Start to watch the stream for the shared settings table.
@@ -176,7 +176,7 @@
Future<logic_game.GameStartData> createGameSyncgroup(
String type, int gameID) async {
print("Creating game syncgroup for ${type} and ${gameID}");
- sc.SyncbaseNoSqlDatabase db = await _cc.createDatabase();
+ sc.SyncbaseDatabase db = await _cc.createDatabase();
sc.SyncbaseTable gameTable = await _cc.createTable(db, util.tableNameGames);
// Watch for the players in the game.
@@ -209,7 +209,7 @@
print("Now joining game syncgroup at ${sgName} and ${gameID}");
sc.SyncbaseSyncgroup sg = await _cc.joinSyncgroup(sgName);
- sc.SyncbaseNoSqlDatabase db = await _cc.createDatabase();
+ sc.SyncbaseDatabase db = await _cc.createDatabase();
sc.SyncbaseTable gameTable = await _cc.createTable(db, util.tableNameGames);
// Watch for the players in the game.
diff --git a/pubspec.lock b/pubspec.lock
index dd3d3db..628c31c 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -4,7 +4,7 @@
analyzer:
description: analyzer
source: hosted
- version: "0.26.2+1"
+ version: "0.26.3"
archive:
description: archive
source: hosted
@@ -46,7 +46,7 @@
collection:
description: collection
source: hosted
- version: "1.1.3"
+ version: "1.2.0"
convert:
description: convert
source: hosted
@@ -214,11 +214,11 @@
syncbase:
description: syncbase
source: hosted
- version: "0.0.14"
+ version: "0.0.15"
test:
description: test
source: hosted
- version: "0.12.5+1"
+ version: "0.12.5+2"
typed_data:
description: typed_data
source: hosted
@@ -230,7 +230,7 @@
v23discovery:
description: v23discovery
source: hosted
- version: "0.0.5"
+ version: "0.0.6"
vector_math:
description: vector_math
source: hosted
diff --git a/pubspec.yaml b/pubspec.yaml
index cec9db5..68105d4 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -6,4 +6,4 @@
path: ../../../../../flutter/packages/flutter
flutter_tools:
path: ../../../../../flutter/packages/flutter_tools
- test: any
\ No newline at end of file
+ test: any