blob: a2417d2917883139f36bf95d71e140cfc359ca8e [file] [log] [blame]
// Copyright 2022 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.
@available(added=7)
library fuchsia.update.config;
/// User specified preference for automatic updates.
type OptOutPreference = strict enum {
/// Allow all updates to be automatically applied.
ALLOW_ALL_UPDATES = 1;
/// Only allow security updates to be automatically applied.
ALLOW_ONLY_SECURITY_UPDATES = 2;
};
/// An error encountered while administering the user's opt-out preference.
type OptOutAdminError = flexible enum {
/// There was an internal error in setting the value. The client is not
/// expected to be able to do something meaningful about this error,
/// except to try again later.
INTERNAL = 1;
};
/// The state of the update system's opt-out functionality.
@discoverable
closed protocol OptOut {
/// Gets the current update opt-out status.
///
/// - response `value` The user's current opt-out preference.
strict Get() -> (struct {
value OptOutPreference;
});
};
/// Management for the state of the update system's opt-out functionality.
@discoverable
closed protocol OptOutAdmin {
/// Sets the update opt-out preference to `value`.
///
/// + request `value` The user's new opt-out preference.
///
/// * error Any error encountered while persisting the new setting.
strict Set(struct {
value OptOutPreference;
}) -> () error OptOutAdminError;
};