1 | /* |
2 | SPDX-FileCopyrightText: 2010 Rafael Fernández López <ereslibre@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_BACKENDS_UDEV_PROCESSOR_H |
8 | #define SOLID_BACKENDS_UDEV_PROCESSOR_H |
9 | |
10 | #include "udevdeviceinterface.h" |
11 | #include <solid/devices/ifaces/processor.h> |
12 | |
13 | namespace Solid |
14 | { |
15 | namespace Backends |
16 | { |
17 | namespace UDev |
18 | { |
19 | class UDevDevice; |
20 | |
21 | class Processor : public DeviceInterface, virtual public Solid::Ifaces::Processor |
22 | { |
23 | Q_OBJECT |
24 | Q_INTERFACES(Solid::Ifaces::Processor) |
25 | |
26 | public: |
27 | Processor(UDevDevice *device); |
28 | ~Processor() override; |
29 | |
30 | int number() const override; |
31 | int maxSpeed() const override; |
32 | bool canChangeFrequency() const override; |
33 | Solid::Processor::InstructionSets instructionSets() const override; |
34 | |
35 | private: |
36 | enum CanChangeFrequencyEnum { |
37 | NotChecked, |
38 | CanChangeFreq, |
39 | CannotChangeFreq, |
40 | }; |
41 | mutable CanChangeFrequencyEnum m_canChangeFrequency; |
42 | mutable int m_maxSpeed; |
43 | QString prefix() const; |
44 | }; |
45 | } |
46 | } |
47 | } |
48 | |
49 | #endif // SOLID_BACKENDS_UDEV_PROCESSOR_H |
50 | |