diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-08 21:28:37 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-08 21:28:37 -0500 |
commit | 92c24a24c59ff6787a4ea7bc14f1812491f3cef2 (patch) | |
tree | 2cc3b97e7c141c56501ff4aca5bb2da17b904c9f /tdecore/tdehardwaredevices.h | |
parent | 81dacc29a4cd8094350939191b7f35037c4439ee (diff) | |
download | tdelibs-92c24a24c59ff6787a4ea7bc14f1812491f3cef2.tar.gz tdelibs-92c24a24c59ff6787a4ea7bc14f1812491f3cef2.zip |
Fix USB device lookup
Add proper Event and Input device handlers
Add Sensor support
Diffstat (limited to 'tdecore/tdehardwaredevices.h')
-rw-r--r-- | tdecore/tdehardwaredevices.h | 48 |
1 files changed, 48 insertions, 0 deletions
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<TQString, TDESensorCluster> 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<TDEGenericDevice> TDEGenericHardwareList; typedef TQMap<TQString, TQString> TDEDeviceIDMap; |