blob: fba879842ac08b3598ab92734cb8bccfe3c2e63d [file] [log] [blame]
// Copyright 2020 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.examples.inspect;
// Implementation of the FizzBuzz (https://en.wikipedia.org/wiki/Fizz_buzz) game as a FIDL service.
@discoverable
closed protocol FizzBuzz {
// Returns the result of FizzBuzz(count), where each number i in [1, count]
// is printed as follows:
// - If the number is divisible by 3, print "Fizz" instead of the number.
// - If the number is divisible by 5, print "Buzz" instead of the number.
// - If the number is divisible by both 3 and 5, print "FizzBuzz" instead
// of the number.
// - If the number is not divisible by 3 or 5, print the number itself.
strict Execute(struct {
count uint32;
}) -> (struct {
response string:1024;
});
};