chromium/chromeos/ash/services/nearby/public/mojom/quick_start_decoder.mojom

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module ash.quick_start.mojom;

import "sandbox/policy/mojom/sandbox.mojom";

import "chromeos/ash/services/nearby/public/mojom/quick_start_decoder_types.mojom";

// Decode raw input data from Android device during Quick Start
// into readable structs to allow for Wifi Credential sharing
// and FIDO assertion.
[ServiceSandbox=sandbox.mojom.Sandbox.kService]
interface QuickStartDecoder {
  // Decode any kind of Quick Start message and return either a
  // QuickStartMessage, which is a union over all the message types, or an
  // error if the data cannot be parsed as any known message.
  DecodeQuickStartMessage(array<uint8>? data) => (
    QuickStartMessage? result, QuickStartDecoderError? error);
};