| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2006 Kevin Ottens <ervin@kde.org> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 | */ |
| 6 | |
| 7 | #ifndef SOLID_IFACES_PROCESSOR_H |
| 8 | #define SOLID_IFACES_PROCESSOR_H |
| 9 | |
| 10 | #include <solid/devices/ifaces/deviceinterface.h> |
| 11 | #include <solid/processor.h> |
| 12 | |
| 13 | namespace Solid |
| 14 | { |
| 15 | namespace Ifaces |
| 16 | { |
| 17 | /** |
| 18 | * This device interface is available on processors. |
| 19 | */ |
| 20 | class Processor : virtual public DeviceInterface |
| 21 | { |
| 22 | public: |
| 23 | /** |
| 24 | * Destroys a Processor object. |
| 25 | */ |
| 26 | ~Processor() override; |
| 27 | |
| 28 | /** |
| 29 | * Retrieves the processor number in the system. |
| 30 | * |
| 31 | * @return the internal processor number in the system, starting from zero |
| 32 | */ |
| 33 | virtual int number() const = 0; |
| 34 | |
| 35 | /** |
| 36 | * Retrieves the maximum speed of the processor. |
| 37 | * |
| 38 | * @return the maximum speed in MHz |
| 39 | */ |
| 40 | virtual int maxSpeed() const = 0; |
| 41 | |
| 42 | /** |
| 43 | * Indicates if the processor can change the CPU frequency. |
| 44 | * |
| 45 | * True if a processor is able to change its own CPU frequency. |
| 46 | * (generally for power management). |
| 47 | * |
| 48 | * @return true if the processor can change CPU frequency, false otherwise |
| 49 | */ |
| 50 | virtual bool canChangeFrequency() const = 0; |
| 51 | |
| 52 | /** |
| 53 | * Queries the instructions set extensions of the CPU. |
| 54 | * |
| 55 | * @return the extensions supported by the CPU |
| 56 | */ |
| 57 | virtual Solid::Processor::InstructionSets instructionSets() const = 0; |
| 58 | }; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | Q_DECLARE_INTERFACE(Solid::Ifaces::Processor, "org.kde.Solid.Ifaces.Processor/0.1" ) |
| 63 | |
| 64 | #endif |
| 65 | |