blob: 1ab9d5ea2640536d44a14ee30dd3f4c505d9ca84 [file] [log] [blame]
// Copyright 2020 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.
// Definitions for the event API exposed by the cros_healthd daemon. This API is
// normally consumed by the browser.
// NOTE: This mojom should be kept in sync with the copy in Chromium's repo in
// src/chrome/services/cros_healthd/public/mojom/cros_healthd_events.mojom.
module chromeos.cros_healthd.mojom;
// Implemented by clients who desire Bluetooth notifications.
interface CrosHealthdBluetoothObserver {
// Fired when a Bluetooth adapter is added.
OnAdapterAdded();
// Fired when a Bluetooth adapter is removed.
OnAdapterRemoved();
// Fired when a property of a Bluetooth adapter is changed.
OnAdapterPropertyChanged();
// Fired when a Bluetooth device is added.
OnDeviceAdded();
// Fired when a Bluetooth device is removed.
OnDeviceRemoved();
// Fired when a property of a Bluetooth device is changed.
OnDevicePropertyChanged();
};
// Implemented by clients who desire lid notifications.
interface CrosHealthdLidObserver {
// Fired when the device's lid is closed.
OnLidClosed();
// Fired when the device's lid is opened.
OnLidOpened();
};
// Implemented by clients who desire power notifications.
interface CrosHealthdPowerObserver {
// Fired when the device begins consuming from an external power source.
OnAcInserted();
// Fired when the device stops consuming from an external power source.
OnAcRemoved();
// Fired when the system receives a suspend request.
OnOsSuspend();
// Fired when the system completes a suspend request.
OnOsResume();
};