blob: dae524cf8ffcd4b765a872a6eda9be336a43d02b [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.settings;
/// Modify or watch Night Mode setting. Night mode puts the device in a
/// restricted mode which can be overrided if the user prefers. During night
/// mode, the following settings apply as per night mode parameters:
/// 1. DoNotDisturb is enabled/not.
/// 2. System volume is set to an override maximum.
/// 3. LED Brightness is set to an overridable maximum.
/// 4. Sleep mode is enabled/not.
[Discoverable]
protocol NightMode {
/// Gets the current [`NightModeSettings`]. Returns immediately on first
/// call; subsequent calls return when the values change.
Watch() -> (NightModeSettings settings);
/// Sets [`NightModeSettings`] settings. Any field not explicitly set in
/// the table performs a no-op, and will not make any changes.
Set(NightModeSettings settings) -> () error Error;
};
/// Settings related to Night mode.
table NightModeSettings {
/// If true, the device/user have opted in for NightMode routine.
1: bool night_mode_enabled;
};