From 92c24a24c59ff6787a4ea7bc14f1812491f3cef2 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 8 Apr 2012 21:28:37 -0500 Subject: Fix USB device lookup Add proper Event and Input device handlers Add Sensor support --- tdecore/tdehardwaredevices.h | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'tdecore/tdehardwaredevices.h') diff --git a/tdecore/tdehardwaredevices.h b/tdecore/tdehardwaredevices.h index 495a6a761..0073cb454 100644 --- a/tdecore/tdehardwaredevices.h +++ b/tdecore/tdehardwaredevices.h @@ -74,6 +74,8 @@ enum TDEGenericDeviceType { ThermalControl, Bridge, Platform, + Event, + Input, PNP, OtherACPI, OtherUSB, @@ -169,6 +171,22 @@ inline TDEDiskDeviceStatus operator~(TDEDiskDeviceStatus a) } }; +class TDECORE_EXPORT TDESensorCluster +{ + public: + /** + * Constructor. + */ + TDESensorCluster(); + + TQString label; + double current; + double minimum; + double maximum; + double warning; + double critical; +}; + class TDECORE_EXPORT TDEGenericDevice { public: @@ -741,6 +759,36 @@ class TDECORE_EXPORT TDECPUDevice : public TDEGenericDevice TQStringList m_frequencies; }; +typedef TQMap TDESensorClusterMap; + +class TDECORE_EXPORT TDESensorDevice : public TDEGenericDevice +{ + public: + /** + * Constructor. + * @param Device type + */ + TDESensorDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn=TQString::null); + + /** + * Destructor. + */ + ~TDESensorDevice(); + + /** + * @return a TDESensorClusterMap with the current sensor values + */ + TDESensorClusterMap values(); + + /** + * @param a TDESensorClusterMap with the current sensor values + */ + void setValues(TDESensorClusterMap cl); + + private: + TDESensorClusterMap m_sensorValues; +}; + typedef TQPtrList TDEGenericHardwareList; typedef TQMap TDEDeviceIDMap; -- cgit v1.2.1