blob: 7826b217c81ccddc0dec76cc4933be76f86be3d3 [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.tictactoe;
enum Player : uint8 {
X = 1;
O = 0;
};
// Completion status of a fidl call.
enum Status {
OK = 0;
ERROR = 1;
};
// Result a fidl call's indicating success or failure and reason for failure.
struct ExecuteResult {
Status status;
string? error_message;
};
[Discoverable]
protocol GameTracker {
RecordWin(Player player) -> (ExecuteResult result);
// Request that the game tracker start sending score updates to the message
// queue identified by [queue_token]. This method will send an update
// immediately when this method is called and then each time the score
// changes.
SubscribeToScore(string queue_token) -> (ExecuteResult result);
// Request that the game tracker stop sending score updates to the message
// queue identified by [queue_token]. If a queue identified by [queue_token]
// is not set up, this method will do nothing.
UnsubscribeFromScore(string queue_token) -> (ExecuteResult result);
};