1 /*
2 * Copyright 2016-2022 The OSHI Project Contributors
3 * SPDX-License-Identifier: MIT
4 */
5 package oshi.hardware;
6
7 import oshi.annotation.concurrent.Immutable;
8
9 /**
10 * The ComputerSystem represents the physical hardware, of a computer system/product and includes BIOS/firmware and a
11 * motherboard, logic board, etc.
12 */
13 @Immutable
14 public interface ComputerSystem {
15 /**
16 * Get the computer system manufacturer.
17 *
18 * @return The manufacturer.
19 */
20 String getManufacturer();
21
22 /**
23 * Get the computer system model.
24 *
25 * @return The model.
26 */
27 String getModel();
28
29 /**
30 * Get the computer system serial number, if available.
31 * <P>
32 * Performs a best-effort attempt to retrieve a unique serial number from the computer system. This may originate
33 * from the baseboard, BIOS, processor, etc.
34 * <P>
35 * This value is provided for information only. Caution should be exercised if using this result to "fingerprint" a
36 * system for licensing or other purposes, as the result may change based on program permissions or installation of
37 * software packages. Specifically, on Linux and FreeBSD, this requires either root permissions, or installation of
38 * the (deprecated) HAL library (lshal command). Linux also attempts to read the dmi/id serial number files in
39 * sysfs, which are read-only root by default but may have permissions altered by the user.
40 *
41 * @return the System Serial Number, if available, otherwise returns "unknown"
42 */
43 String getSerialNumber();
44
45 /**
46 * Get the computer system hardware UUID, if available.
47 * <P>
48 * Performs a best-effort attempt to retrieve the hardware UUID.
49 *
50 * @return the Hardware UUID, if available, otherwise returns "unknown"
51 */
52 String getHardwareUUID();
53
54 /**
55 * Get the computer system firmware/BIOS.
56 *
57 * @return A {@link oshi.hardware.Firmware} object for this system
58 */
59 Firmware getFirmware();
60
61 /**
62 * Get the computer system baseboard/motherboard.
63 *
64 * @return A {@link oshi.hardware.Baseboard} object for this system
65 */
66 Baseboard getBaseboard();
67
68 }