Solid

ifaces/processor.h
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
13namespace Solid
14{
15namespace Ifaces
16{
17/**
18 * This device interface is available on processors.
19 */
20class Processor : virtual public DeviceInterface
21{
22public:
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 */
58};
59}
60}
61
62Q_DECLARE_INTERFACE(Solid::Ifaces::Processor, "org.kde.Solid.Ifaces.Processor/0.1")
63
64#endif
Base interface of all the device interfaces.
This device interface is available on processors.
virtual int maxSpeed() const =0
Retrieves the maximum speed of the processor.
virtual bool canChangeFrequency() const =0
Indicates if the processor can change the CPU frequency.
~Processor() override
Destroys a Processor object.
virtual Solid::Processor::InstructionSets instructionSets() const =0
Queries the instructions set extensions of the CPU.
virtual int number() const =0
Retrieves the processor number in the system.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:47:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.