author | sandman <sandman> | 2002-06-18 12:44:05 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-18 12:44:05 (UTC) |
commit | e21322ab34a8df36344eece685e604abe4f83fc6 (patch) (unidiff) | |
tree | 199bf3f1b70b7d364d5ad836e01789ab6ce87d70 /libopie/odevice.h | |
parent | 714133d7f0e2a0dafe55b280f93915765fc67fe3 (diff) | |
download | opie-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)
-rw-r--r-- | libopie/odevice.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h new file mode 100644 index 0000000..793becc --- a/dev/null +++ b/libopie/odevice.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* This file is part of the OPIE libraries | ||
2 | Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) | ||
3 | |||
4 | This library is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU Library General Public | ||
6 | License as published by the Free Software Foundation; either | ||
7 | version 2 of the License, or (at your option) any later version. | ||
8 | |||
9 | This library is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to | ||
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
17 | Boston, MA 02111-1307, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef _LIBOPIE_ODEVICE_H_ | ||
21 | #define _LIBOPIE_ODEVICE_H_ | ||
22 | |||
23 | #include <qstring.h> | ||
24 | |||
25 | |||
26 | class ODeviceData; | ||
27 | |||
28 | enum OModel { | ||
29 | OMODEL_Unknown, | ||
30 | |||
31 | OMODEL_iPAQ_H31xx, | ||
32 | OMODEL_iPAQ_H36xx, | ||
33 | OMODEL_iPAQ_H37xx, | ||
34 | OMODEL_iPAQ_H38xx, | ||
35 | |||
36 | OMODEL_Zaurus_SL5000 | ||
37 | }; | ||
38 | |||
39 | enum OVendor { | ||
40 | OVENDOR_Unknown, | ||
41 | |||
42 | OVENDOR_HP, | ||
43 | OVENDOR_Sharp, | ||
44 | }; | ||
45 | |||
46 | enum OSystem { | ||
47 | OSYSTEM_Unknown, | ||
48 | |||
49 | OSYSTEM_Familiar, | ||
50 | OSYSTEM_Zaurus, | ||
51 | OSYSTEM_OpenZaurus | ||
52 | }; | ||
53 | |||
54 | enum OLedState { | ||
55 | OLED_Off, | ||
56 | OLED_On, | ||
57 | OLED_BlinkSlow, | ||
58 | OLED_BlinkFast | ||
59 | }; | ||
60 | |||
61 | |||
62 | class ODevice | ||
63 | { | ||
64 | public: | ||
65 | |||
66 | public: | ||
67 | static ODevice *inst ( ); | ||
68 | |||
69 | |||
70 | // information | ||
71 | |||
72 | QString modelString ( ); | ||
73 | OModel model ( ); | ||
74 | |||
75 | QString vendorString ( ); | ||
76 | OVendor vendor ( ); | ||
77 | |||
78 | QString systemString ( ); | ||
79 | OSystem system ( ); | ||
80 | |||
81 | |||
82 | // input / output | ||
83 | |||
84 | virtual void alarmSound ( ); | ||
85 | virtual void keySound ( ); | ||
86 | virtual void touchSound ( ); | ||
87 | |||
88 | virtual uint hasLeds ( ) const; | ||
89 | virtual OLedState led ( uint which ) const; | ||
90 | virtual bool setLed ( uint which, OLedState st ); | ||
91 | |||
92 | virtual ~ODevice ( ); | ||
93 | |||
94 | protected: | ||
95 | ODevice ( ); | ||
96 | virtual void init ( ); | ||
97 | |||
98 | ODeviceData *d; | ||
99 | |||
100 | private: | ||
101 | ODevice ( const ODevice & ); | ||
102 | |||
103 | }; | ||
104 | |||
105 | #endif | ||
106 | |||
107 | |||