author | sandman <sandman> | 2002-10-27 15:52:44 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-27 15:52:44 (UTC) |
commit | bf21c882b82bfcdbcdce6b2dc5d863a2a2fb37c7 (patch) (unidiff) | |
tree | 6f104afe571f394bea83b94cb0de9242ee742b88 /libopie/odevice.h | |
parent | 4ad1fa6d01c9de96d309cd662e658bcb1bb899a5 (diff) | |
download | opie-bf21c882b82bfcdbcdce6b2dc5d863a2a2fb37c7.zip opie-bf21c882b82bfcdbcdce6b2dc5d863a2a2fb37c7.tar.gz opie-bf21c882b82bfcdbcdce6b2dc5d863a2a2fb37c7.tar.bz2 |
- new function to check for and read the light sensor
- redone the Model enum, to make it easier to check for "any iPAQ"
!! This means every application using this enum has to be recompiled !!
-rw-r--r-- | libopie/odevice.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index 38f3787..be2a9c7 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -9,54 +9,58 @@ | |||
9 | This library is distributed in the hope that it will be useful, | 9 | This library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Library General Public License for more details. | 12 | Library General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU Library General Public License | 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 | 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, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef _LIBOPIE_ODEVICE_H_ | 20 | #ifndef _LIBOPIE_ODEVICE_H_ |
21 | #define _LIBOPIE_ODEVICE_H_ | 21 | #define _LIBOPIE_ODEVICE_H_ |
22 | 22 | ||
23 | #include <qstring.h> | 23 | #include <qstring.h> |
24 | #include <qnamespace.h> | 24 | #include <qnamespace.h> |
25 | 25 | ||
26 | class ODeviceData; | 26 | class ODeviceData; |
27 | 27 | ||
28 | namespace Opie { | 28 | namespace Opie { |
29 | 29 | ||
30 | enum OModel { | 30 | enum OModel { |
31 | Model_Unknown, | 31 | Model_Unknown, |
32 | 32 | ||
33 | Model_iPAQ_H31xx, | 33 | Model_iPAQ = ( 1 << 16 ), |
34 | Model_iPAQ_H36xx, | ||
35 | Model_iPAQ_H37xx, | ||
36 | Model_iPAQ_H38xx, | ||
37 | 34 | ||
38 | Model_Zaurus_SL5000 | 35 | Model_iPAQ_H31xx = ( Model_iPAQ | 1 ), |
36 | Model_iPAQ_H36xx = ( Model_iPAQ | 2 ), | ||
37 | Model_iPAQ_H37xx = ( Model_iPAQ | 3 ), | ||
38 | Model_iPAQ_H38xx = ( Model_iPAQ | 4 ), | ||
39 | |||
40 | Model_Zaurus = ( 2 << 16 ), | ||
41 | |||
42 | Model_Zaurus_SL5000 = ( Model_Zaurus | 1 ), | ||
39 | }; | 43 | }; |
40 | 44 | ||
41 | enum OVendor { | 45 | enum OVendor { |
42 | Vendor_Unknown, | 46 | Vendor_Unknown, |
43 | 47 | ||
44 | Vendor_HP, | 48 | Vendor_HP, |
45 | Vendor_Sharp | 49 | Vendor_Sharp |
46 | }; | 50 | }; |
47 | 51 | ||
48 | enum OSystem { | 52 | enum OSystem { |
49 | System_Unknown, | 53 | System_Unknown, |
50 | 54 | ||
51 | System_Familiar, | 55 | System_Familiar, |
52 | System_Zaurus, | 56 | System_Zaurus, |
53 | System_OpenZaurus | 57 | System_OpenZaurus |
54 | }; | 58 | }; |
55 | 59 | ||
56 | enum OLedState { | 60 | enum OLedState { |
57 | Led_Off, | 61 | Led_Off, |
58 | Led_On, | 62 | Led_On, |
59 | Led_BlinkSlow, | 63 | Led_BlinkSlow, |
60 | Led_BlinkFast | 64 | Led_BlinkFast |
61 | }; | 65 | }; |
62 | 66 | ||
@@ -108,31 +112,34 @@ public: | |||
108 | OSystem system ( ) const; | 112 | OSystem system ( ) const; |
109 | 113 | ||
110 | QString systemVersionString ( ) const; | 114 | QString systemVersionString ( ) const; |
111 | 115 | ||
112 | // system | 116 | // system |
113 | 117 | ||
114 | virtual bool setSoftSuspend ( bool on ); | 118 | virtual bool setSoftSuspend ( bool on ); |
115 | virtual bool suspend ( ); | 119 | virtual bool suspend ( ); |
116 | 120 | ||
117 | virtual bool setDisplayStatus ( bool on ); | 121 | virtual bool setDisplayStatus ( bool on ); |
118 | virtual bool setDisplayBrightness ( int brightness ); | 122 | virtual bool setDisplayBrightness ( int brightness ); |
119 | virtual int displayBrightnessResolution ( ) const; | 123 | virtual int displayBrightnessResolution ( ) const; |
120 | 124 | ||
121 | // input / output | 125 | // input / output |
122 | 126 | ||
123 | virtual void alarmSound ( ); | 127 | virtual void alarmSound ( ); |
124 | virtual void keySound ( ); | 128 | virtual void keySound ( ); |
125 | virtual void touchSound ( ); | 129 | virtual void touchSound ( ); |
126 | 130 | ||
127 | virtual QValueList <OLed> ledList ( ) const; | 131 | virtual QValueList <OLed> ledList ( ) const; |
128 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 132 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
129 | virtual OLedState ledState ( OLed led ) const; | 133 | virtual OLedState ledState ( OLed led ) const; |
130 | virtual bool setLedState ( OLed led, OLedState st ); | 134 | virtual bool setLedState ( OLed led, OLedState st ); |
131 | 135 | ||
136 | virtual bool hasLightSensor ( ) const; | ||
137 | virtual int readLightSensor ( ); | ||
138 | |||
132 | //virtual QValueList <int> keyList ( ) const; | 139 | //virtual QValueList <int> keyList ( ) const; |
133 | }; | 140 | }; |
134 | 141 | ||
135 | } | 142 | } |
136 | 143 | ||
137 | #endif | 144 | #endif |
138 | 145 | ||