// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // Copyright (C) LibreHardwareMonitor and Contributors. // Partial Copyright (C) Michael Möller and Contributors. // All Rights Reserved. using System.Collections.Generic; namespace LibreHardwareMonitor.Hardware; /// /// Handler that will trigger the actions assigned to it when the event occurs. /// /// Component returned to the assigned action(s). public delegate void SensorEventHandler(ISensor sensor); /// /// Abstract object that stores information about a device. All sensors are available as an array of . /// /// Can contain . /// Type specified in . /// /// public interface IHardware : IElement { /// /// /// HardwareType HardwareType { get; } /// /// Gets a unique hardware ID that represents its location. /// Identifier Identifier { get; } /// /// Gets or sets device name. /// string Name { get; set; } /// /// Gets the device that is the parent of the current hardware. For example, the motherboard is the parent of SuperIO. /// IHardware Parent { get; } /// /// Gets an array of all sensors such as , , etc. /// ISensor[] Sensors { get; } /// /// Gets child devices, e.g. of the . /// IHardware[] SubHardware { get; } /// /// Report containing most of the known information about the current device. /// /// A formatted text string with hardware information. string GetReport(); /// /// Refreshes the information stored in array. /// void Update(); /// /// An that will be triggered when a new sensor appears. /// event SensorEventHandler SensorAdded; /// /// An that will be triggered when one of the sensors is removed. /// event SensorEventHandler SensorRemoved; /// /// Gets rarely changed hardware properties that can't be represented as sensors. /// IDictionary Properties { get; } }