blob: f2b3997e054360645c773586c48bf7a54c06c038 [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;
/// Settings related to privacy.
///
/// Supported SettingsEpitaph enums:
/// REQUEST_NOT_SUPPORTED, INTERNAL_SERVICE_ERROR, PERSISTENT_STORAGE_ERROR
@discoverable
closed protocol Privacy {
/// Notifies of a change in privacy settings.
///
/// On a given connection, the server will return immediately if this is the first call made,
/// or if the `settings` value has changed since a previous call. Otherwise, the server will
/// wait on a value change before returning the new value. This follows the hanging get pattern.
///
/// If this call fails, it is considered a fatal error and the channel will be closed.
strict Watch() -> (struct {
settings PrivacySettings;
});
/// Sets the privacy settings.
///
/// Any field not explicitly set in `settings` performs a no-op, and will not make any changes.
strict Set(struct {
settings PrivacySettings;
}) -> () error Error;
};
type PrivacySettings = table {
/// Reflects the user consent to have their user data shared with the product owner, e.g., for
/// metrics collection and crash reporting.
1: user_data_sharing_consent bool;
};