summaryrefslogtreecommitdiff
path: root/libopie/ohwinfo.cpp
authorsandman <sandman>2002-06-18 12:44:05 (UTC)
committer sandman <sandman>2002-06-18 12:44:05 (UTC)
commite21322ab34a8df36344eece685e604abe4f83fc6 (patch) (side-by-side diff)
tree199bf3f1b70b7d364d5ad836e01789ab6ce87d70 /libopie/ohwinfo.cpp
parent714133d7f0e2a0dafe55b280f93915765fc67fe3 (diff)
downloadopie-e21322ab34a8df36344eece685e604abe4f83fc6.zip
opie-e21322ab34a8df36344eece685e604abe4f83fc6.tar.gz
opie-e21322ab34a8df36344eece685e604abe4f83fc6.tar.bz2
Reimplemented OHwInfo as ODevice with enhanced capabilities
ODevice should replace custom-*.h in the future (iPAQ is finished)
Diffstat (limited to 'libopie/ohwinfo.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ohwinfo.cpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/libopie/ohwinfo.cpp b/libopie/ohwinfo.cpp
deleted file mode 100644
index 30c47c8..0000000
--- a/libopie/ohwinfo.cpp
+++ b/dev/null
@@ -1,84 +0,0 @@
-#include <qfile.h>
-#include <qtextstream.h>
-
-#include "ohwinfo.h"
-
-
-struct OHwInfoData {
- QString m_vendorstr;
- OHwVendor m_vendor;
-
- QString m_modelstr;
- OHwModel m_model;
-};
-
-
-OHwInfo *OHwInfo::inst ( )
-{
- static OHwInfo *inf = 0;
-
- if ( !inf ) {
- inf = new OHwInfo ( );
- }
- return inf;
-}
-
-OHwInfo::OHwInfo ( )
-{
- m_data = new OHwInfoData ( );
-
- QFile f ( "/proc/hal/model" );
-
- if ( f. open ( IO_ReadOnly )) {
- QTextStream ts ( &f );
- m_data-> m_modelstr = "H" + ts. readLine ( );
-
- if ( m_data-> m_modelstr == "H3100" )
- m_data-> m_model = OMODEL_iPAQ_H31xx;
- else if ( m_data-> m_modelstr == "H3600" )
- m_data-> m_model = OMODEL_iPAQ_H36xx;
- else if ( m_data-> m_modelstr == "H3700" )
- m_data-> m_model = OMODEL_iPAQ_H37xx;
- else if ( m_data-> m_modelstr == "H3800" )
- m_data-> m_model = OMODEL_iPAQ_H38xx;
- else
- m_data-> m_model = OMODEL_Unknown;
-
- m_data-> m_vendorstr = "HP";
- m_data-> m_vendor = OVENDOR_HP;
-
- f. close ( );
- }
- else {
- m_data-> m_modelstr = "Unknown";
- m_data-> m_model = OMODEL_Unknown;
- m_data-> m_vendorstr = "Unkown";
- m_data-> m_vendor = OVENDOR_Unknown;
- }
-}
-
-OHwInfo::~OHwInfo ( )
-{
- delete m_data;
-}
-
-QString OHwInfo::vendorString ( )
-{
- return m_data-> m_vendorstr;
-}
-
-OHwVendor OHwInfo::vendor ( )
-{
- return m_data-> m_vendor;
-}
-
-QString OHwInfo::modelString ( )
-{
- return m_data-> m_modelstr;
-}
-
-OHwModel OHwInfo::model ( )
-{
- return m_data-> m_model;
-}
-