blob: a7d70862497f09f9b7da4153c4f1102f0b801a26 [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.ui.policy;
using fuchsia.ui.input;
/// Service for exposing state and events of devices, such as media buttons.
[Discoverable]
protocol DeviceListenerRegistry {
/// Registers a listener to receive media button related events, such as
/// changes from volume buttons and mute switches.
RegisterMediaButtonsListener(MediaButtonsListener listener);
};
/// A listener for media buttons events. `DeviceListenerRegistry.RegisterMediaButtonsListener`
/// will consume this listener interface and call `OnMediaButtonsEvent` when the
/// registered media buttons event occurs.
protocol MediaButtonsListener {
OnMediaButtonsEvent(fuchsia.ui.input.MediaButtonsEvent event);
};