blob: 008d8fcf0eb6b9746fe8edf7c4859a7e99068ff2 [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.identity.prototype;
using fuchsia.identity.account;
using fuchsia.overnet.protocol;
/// A temporary control interface exposed by Account Manager for prototyping.
/// Once the functionality is ready to be brought out of prototype stage this
/// protocol will be removed and its methods will be moved to the
/// AccountManager interface. This interface is intended only for use by
/// development tools to manually initiate an account transfer, and should
/// generally not be used.
[Discoverable]
protocol PrototypeAccountTransferControl {
// TODO(satsukiu): Add additional error types such as USER_CANCELED,
// DEVICE_NOT_FOUND...
/// Provisions an account on the current device onto another device.
///
/// `account_id` The local id of the account to transfer.
/// `target_device` The device on which the account should be provisioned,
/// identified using an Overnet NodeId.
/// `target_lifetime` The lifetime the account should have on the target
/// device
///
/// Returns successfully if the account is provisioned on the remote device
/// successfully. Fails with an UNSUPPORTED_OPERATION error if the account
/// is already present on the remote device.
TransferAccount(fuchsia.identity.account.LocalAccountId account_id,
fuchsia.overnet.protocol.NodeId target_device,
fuchsia.identity.account.Lifetime target_lifetime)
-> () error fuchsia.identity.account.Error;
};