| // Copyright 2019 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.device; |
| |
| using zx; |
| |
| const DEFAULT_DEVICE_NAME string = "fuchsia"; |
| |
| /// Maximum length of a device name (without a null byte), based on |
| /// HOST_NAME_MAX as defined by <limits.h>. |
| const DEVICE_NAME_MAX uint32 = 255; |
| |
| /// Interface for getting device names. |
| @discoverable |
| closed protocol NameProvider { |
| /// Return the name of this Fuchsia device. |
| strict GetDeviceName() -> (struct { |
| name string:DEVICE_NAME_MAX; |
| }) error zx.Status; |
| }; |