blob: aab4a50f71bcced92fa08b007a28da9fc1a9897c [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.
@available(added=7)
library fuchsia.update.channelcontrol;
using fuchsia.update.channel;
/// Control the target update channel, this is the channel we will use on the next update check.
@discoverable
closed protocol ChannelControl {
compose fuchsia.update.channel.Provider;
/// Set a new desired target channel. This tells the updater to attempt to
/// check for updates using a new channel. This is tentative, and won't be
/// persisted unless an update check on that channel is successful.
///
/// A response is generated when the new target channel has been verified as
/// valid.
///
/// + request `channel` the new target channel name (name used by the updater)
strict SetTarget(struct {
channel string:128;
}) -> ();
/// Get the current tentative target channel for updates.
/// This returns the channel that the update client is using to perform update
/// checks. It's always one of:
/// - the current channel
/// - the default channel
/// - a new target that's different, but hasn't been OTA'd from yet.
///
/// - response `channel` the current target channel.
strict GetTarget() -> (struct {
channel string:128;
});
/// Get the list of well-known target channels that can be passed to SetTarget().
/// There may be other, unlisted channels.
strict GetTargetList() -> (struct {
channels vector<string:128>:100;
});
};