blob: 11cb3c69d6b2fba59dc8b8c9ac18791d5b3eca42 [file] [log] [blame]
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module crosapi.mojom;
// Returned by methods that either return a string or an error.
[Stable]
union DeviceAttributesStringResult {
// Implies failure.
string error_message;
// Implies success.
string contents;
};
// This API provides Lacros with access to device attributes. These methods will
// all return an error if the user is not affiliated with the device, which is
// an enterprise policy concept.
[Stable, Uuid="117591ac-5d9e-481c-936f-842b64e790c0"]
interface DeviceAttributes {
// Fetches the value of the device identifier of the directory API that is
// generated by the server and identifies the cloud record of the device for
// querying in the cloud directory API. See
// https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices.
GetDirectoryDeviceId@0() => (DeviceAttributesStringResult result);
// Fetches the device's serial number.
GetDeviceSerialNumber@1() => (DeviceAttributesStringResult result);
// Fetches the administrator-annotated Asset Id.
GetDeviceAssetId@2() => (DeviceAttributesStringResult result);
// Fetches the administrator-annotated Location.
GetDeviceAnnotatedLocation@3() => (DeviceAttributesStringResult result);
// Fetches the device's hostname as set by DeviceHostnameTemplate policy.
GetDeviceHostname@4() => (DeviceAttributesStringResult result);
};