blob: 4914cb66648c439d4ee395d41dc6ca0f6e4457af [file] [log] [blame]
// Copyright 2020 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.input.report;
/// Hardcoded max sizes for ConsumerControl vectors. These sizes should be increased
/// if we ever see a device with more objects than can be represented.
const CONSUMER_CONTROL_MAX_NUM_BUTTONS uint32 = 255;
/// These ControlButtons represent on/off buttons whose purpose is to change
/// the host's configuration.
type ConsumerControlButton = flexible enum : uint32 {
/// This button represents increasing volume.
VOLUME_UP = 1;
/// This button represents decreasing volume.
VOLUME_DOWN = 2;
/// This button represents pausing.
PAUSE = 3;
/// This button represents factory resetting the host.
FACTORY_RESET = 4;
/// This button represents muting the microphone on the host.
MIC_MUTE = 5;
/// This button represents rebooting the host.
REBOOT = 6;
/// This button represents disabling the camera on the host.
CAMERA_DISABLE = 7;
/// This button represents a function.
@available(added=HEAD)
FUNCTION = 8;
/// This button represents a power button.
@available(added=HEAD)
POWER = 9;
};
/// Describes the format of the input report that will be sent from the
/// ConsumerControl device to the host.
type ConsumerControlInputDescriptor = table {
/// The list of buttons that this device contains.
1: buttons vector<ConsumerControlButton>:CONSUMER_CONTROL_MAX_NUM_BUTTONS;
};
/// A Fuchsia ConsumerControl represents a device thats purpose is to change
/// values on the host. Typical controls are Volume, Power, Media Playback.
/// (Consider a TV remote to be a typical ConsumerControl).
type ConsumerControlDescriptor = table {
1: input ConsumerControlInputDescriptor;
};
/// A single report created by a ConsumerControl device.
type ConsumerControlInputReport = table {
/// The list of buttons that are currently pressed down.
1: pressed_buttons vector<ConsumerControlButton>:CONSUMER_CONTROL_MAX_NUM_BUTTONS;
};