| // 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.settings; |
| |
| /// Settings that influence the device's setup behavior. |
| /// |
| /// Supported SettingsEpitaph enums: |
| /// REQUEST_NOT_SUPPORTED, INTERNAL_SERVICE_ERROR, PERSISTENT_STORAGE_ERROR |
| @discoverable |
| protocol Setup { |
| /// Gets the current [SetupSettings]. Returns immediately on first call; |
| /// subsequent calls return when the value changes. |
| /// |
| /// If this call fails, it is considered a fatal error and the channel |
| /// will be closed. |
| Watch() -> (struct { |
| settings SetupSettings; |
| }); |
| |
| /// Changes the settings specified in [SetupSettings]. Any field not set in |
| /// the table will not perform any system operation. An error will be |
| /// returned if the provided settings is an invalid change (for example, if |
| /// it is empty). |
| @transitional("Changes network interfaces configuration with optional reboot") |
| Set(struct { |
| settings SetupSettings; |
| reboot_device bool; |
| }) -> () error Error; |
| }; |
| |
| type SetupSettings = table { |
| /// Specifies the network interfaces that the device can be configured |
| /// over during setup. |
| 1: enabled_configuration_interfaces ConfigurationInterfaces; |
| }; |
| |
| type ConfigurationInterfaces = strict bits : uint32 { |
| // Configuration over ethernet. |
| ETHERNET = 0x1; |
| // Configuration over WiFi. |
| WIFI = 0x2; |
| }; |