blob: 1853bbe9b1c1255935ec99d5e3da3a4e917e6b15 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
import 'package:syncbase/syncbase_client.dart' show Perms, SyncbaseClient;
const appName = 'app';
const dbName = 'db';
const tableNameGames = 'games';
const tableNameSettings = 'table_settings';
// TODO(alexfandrianto): This may need to be the global mount table with a
// proxy. Otherwise, it will be difficult for other users to run.
// https://github.com/vanadium/issues/issues/782
const mtAddr = '/192.168.86.254:8101';
const sgPrefix = 'croupierAlex/%%sync';
const sgSuffix = 'discovery';
const sgSuffixGame = 'gaming';
const discoveryInterfaceName = 'CroupierSettingsAndGame2';
typedef void NoArgCb();
typedef void updateCallbackT(String key, String value);
String openPermsJson =
'{"Admin":{"In":["..."]},"Write":{"In":["..."]},"Read":{"In":["..."]},"Resolve":{"In":["..."]},"Debug":{"In":["..."]}}';
Perms openPerms = SyncbaseClient.perms(openPermsJson);
void log(String msg) {
DateTime now = new DateTime.now();
print('$now $msg');
}
// data should contain a JSON-encoded logic_game.GameStartData
String syncgameSuffix(String data) {
return "${sgSuffixGame}-${data}";
}
String syncgamePrefix(int gameID) {
return "${gameID}";
}