blob: 07d1bf92ea7ca63b15cacaeb2882c093913f86cd [file] [log] [blame]
// 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;
using fuchsia.intl;
/// Settings related to internationalization such as locale, time zone, and
/// temperature units.
[Discoverable]
protocol Intl {
/// Gets the current [IntlSettings]. Returns immediately on first call;
/// subsequent calls return when the value changes.
Watch() -> (IntlSettings settings) error Error;
/// Sets the current time zone based on the [time_zone_id].
SetTimeZone(fuchsia.intl.TimeZoneId time_zone_id) -> () error Error;
/// Changes the temperature unit to the specified unit.
SetTemperatureUnit(fuchsia.intl.TemperatureUnit temperature_unit) -> () error Error;
/// Sets the ordered list of preferred locales.
SetLocales(vector<fuchsia.intl.LocaleId>:10 locales) -> () error Error;
};
/// Collection of internationalization-related settings.
table IntlSettings {
/// An ordered list of preferred locales.
1: vector<fuchsia.intl.LocaleId>:10 locales;
/// The preferred temperature unit.
2: fuchsia.intl.TemperatureUnit temperature_unit;
/// The currently set time zone.
3: fuchsia.intl.TimeZoneId time_zone_id;
};