// 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. namespace LibreHardwareMonitor.Hardware { public delegate void SensorEventHandler(ISensor sensor); /// /// Reflects what category the device is. /// public enum HardwareType { Motherboard, SuperIO, Cpu, Memory, GpuNvidia, GpuAmd, Storage, Network, Cooler, EmbeddedController } /// /// An abstract object that stores information about a device. All sensors are available as an array of . /// public interface IHardware : IElement { /// /// /// HardwareType HardwareType { get; } /// /// Gets unique hardware identifier obtained from the computer. /// 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 temperature, clocks, load etc. /// ISensor[] Sensors { get; } /// /// Gets child devices, e.g. SuperIO of the motherboard. /// 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; } }