author | zecke <zecke> | 2004-05-01 18:13:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-05-01 18:13:29 (UTC) |
commit | 7a2cac7a65be07c1e82508e00c2d3d61e0823dc1 (patch) (unidiff) | |
tree | 70381a30c784957b22d9e644272ac96a0fced5a4 /libopie2/opiecore/device/odevice.h | |
parent | ec6a887d8abddbab085a0a3aecae5760ff85dbe8 (diff) | |
download | opie-7a2cac7a65be07c1e82508e00c2d3d61e0823dc1.zip opie-7a2cac7a65be07c1e82508e00c2d3d61e0823dc1.tar.gz opie-7a2cac7a65be07c1e82508e00c2d3d61e0823dc1.tar.bz2 |
Pass on the Hardware line of proc/cpuinfo so we don't need to parse the file again..
only adjusted iPAQ backend to use it
Beginning of hh22xx Linux2.6 support
Diffstat (limited to 'libopie2/opiecore/device/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 0ba58f0..aaebde3 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -39,49 +39,50 @@ _;:, .> :=|. This program is free software; you can | |||
39 | #include <qobject.h> | 39 | #include <qobject.h> |
40 | #include <qstring.h> | 40 | #include <qstring.h> |
41 | #include <qstrlist.h> | 41 | #include <qstrlist.h> |
42 | 42 | ||
43 | namespace Opie{ | 43 | namespace Opie{ |
44 | namespace Core{ | 44 | namespace Core{ |
45 | 45 | ||
46 | class ODeviceData; | 46 | class ODeviceData; |
47 | /** | 47 | /** |
48 | * The available devices | 48 | * The available devices |
49 | */ | 49 | */ |
50 | enum OModel { | 50 | enum OModel { |
51 | Model_Unknown, // = 0 | 51 | Model_Unknown, // = 0 |
52 | 52 | ||
53 | Model_Series_Mask = 0xff000000, | 53 | Model_Series_Mask = 0xff000000, |
54 | 54 | ||
55 | Model_iPAQ = ( 1 << 24 ), | 55 | Model_iPAQ = ( 1 << 24 ), |
56 | 56 | ||
57 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), | 57 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), |
58 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), | 58 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), |
59 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), | 59 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), |
60 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), | 60 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), |
61 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), | 61 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), |
62 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), | 62 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), |
63 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000011 ), | 63 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000020 ), |
64 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x000040 ), | ||
64 | 65 | ||
65 | Model_Jornada = ( 6 << 24 ), | 66 | Model_Jornada = ( 6 << 24 ), |
66 | Model_Jornada_56x = ( Model_Jornada | 0x000001 ), | 67 | Model_Jornada_56x = ( Model_Jornada | 0x000001 ), |
67 | 68 | ||
68 | Model_Zaurus = ( 2 << 24 ), | 69 | Model_Zaurus = ( 2 << 24 ), |
69 | 70 | ||
70 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), | 71 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), |
71 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), | 72 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), |
72 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), | 73 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), |
73 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), | 74 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), |
74 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x000005 ), | 75 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x000005 ), |
75 | 76 | ||
76 | Model_SIMpad = ( 3 << 24 ), | 77 | Model_SIMpad = ( 3 << 24 ), |
77 | 78 | ||
78 | Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), | 79 | Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), |
79 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ), | 80 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ), |
80 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x000002 ), | 81 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x000002 ), |
81 | Model_SIMpad_SLC = ( Model_SIMpad | 0x000004 ), | 82 | Model_SIMpad_SLC = ( Model_SIMpad | 0x000004 ), |
82 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x000008 ), | 83 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x000008 ), |
83 | 84 | ||
84 | Model_Ramses = ( 4 << 24 ), | 85 | Model_Ramses = ( 4 << 24 ), |
85 | 86 | ||
86 | Model_Ramses_All = ( Model_Ramses | 0xffffff ), | 87 | Model_Ramses_All = ( Model_Ramses | 0xffffff ), |
87 | Model_Ramses_MNCI = ( Model_Ramses | 0x000001 ), | 88 | Model_Ramses_MNCI = ( Model_Ramses | 0x000001 ), |
@@ -139,84 +140,84 @@ enum OHardKey { | |||
139 | HardKey_Menu = Qt::Key_F11, | 140 | HardKey_Menu = Qt::Key_F11, |
140 | HardKey_Home = Qt::Key_F12, | 141 | HardKey_Home = Qt::Key_F12, |
141 | HardKey_Mail = Qt::Key_F13, | 142 | HardKey_Mail = Qt::Key_F13, |
142 | HardKey_Record = Qt::Key_F24, | 143 | HardKey_Record = Qt::Key_F24, |
143 | HardKey_Suspend = Qt::Key_F34, | 144 | HardKey_Suspend = Qt::Key_F34, |
144 | HardKey_Backlight = Qt::Key_F35, | 145 | HardKey_Backlight = Qt::Key_F35, |
145 | HardKey_Action = Qt::Key_F10, | 146 | HardKey_Action = Qt::Key_F10, |
146 | HardKey_OK = Qt::Key_F11, | 147 | HardKey_OK = Qt::Key_F11, |
147 | HardKey_End = Qt::Key_F12, | 148 | HardKey_End = Qt::Key_F12, |
148 | }; | 149 | }; |
149 | 150 | ||
150 | enum ODirection { | 151 | enum ODirection { |
151 | CW = 0, | 152 | CW = 0, |
152 | CCW = 1, | 153 | CCW = 1, |
153 | Flip = 2, | 154 | Flip = 2, |
154 | }; | 155 | }; |
155 | 156 | ||
156 | enum OHingeStatus { | 157 | enum OHingeStatus { |
157 | CASE_CLOSED = 3, | 158 | CASE_CLOSED = 3, |
158 | CASE_PORTRAIT = 2, | 159 | CASE_PORTRAIT = 2, |
159 | CASE_LANDSCAPE = 0, | 160 | CASE_LANDSCAPE = 0, |
160 | CASE_UNKNOWN = 1, | 161 | CASE_UNKNOWN = 1, |
161 | }; | 162 | }; |
162 | 163 | ||
163 | /* default button for qvfb or such | 164 | /* default button for qvfb or such |
164 | * see odevice.cpp for details. | 165 | * see odevice.cpp for details. |
165 | * hint: manage a user defined button for qvfb? | 166 | * hint: manage a user defined button for qvfb? |
166 | * alwin | 167 | * alwin |
167 | */ | 168 | */ |
168 | struct default_button { | 169 | struct default_button { |
169 | Qt::Key code; | 170 | Qt::Key code; |
170 | char *utext; | 171 | char *utext; |
171 | char *pix; | 172 | char *pix; |
172 | char *fpressedservice; | 173 | char *fpressedservice; |
173 | char *fpressedaction; | 174 | char *fpressedaction; |
174 | char *fheldservice; | 175 | char *fheldservice; |
175 | char *fheldaction; | 176 | char *fheldaction; |
176 | }; | 177 | }; |
177 | 178 | ||
178 | /** | 179 | /** |
179 | * A singleton which gives informations about device specefic option | 180 | * A singleton which gives informations about device specefic option |
180 | * like the Hardware used, LEDs, the Base Distribution and | 181 | * like the Hardware used, LEDs, the Base Distribution and |
181 | * hardware key mappings. | 182 | * hardware key mappings. |
182 | * | 183 | * |
183 | * @short A small class for device specefic options | 184 | * @short A small class for device specefic options |
184 | * @see QObject | 185 | * @see QObject |
185 | * @author Robert Griebl | 186 | * @author Robert Griebl |
186 | * @version 1.0 | 187 | * @version 1.0 |
187 | */ | 188 | */ |
188 | class ODevice : public QObject | 189 | class ODevice : public QObject |
189 | { | 190 | { |
190 | Q_OBJECT | 191 | Q_OBJECT |
191 | 192 | ||
192 | private: | 193 | private: |
193 | /* disable copy */ | 194 | /* disable copy */ |
194 | ODevice ( const ODevice & ); | 195 | ODevice ( const ODevice & ); |
195 | 196 | ||
196 | protected: | 197 | protected: |
197 | ODevice(); | 198 | ODevice(); |
198 | virtual void init(); | 199 | virtual void init(const QString&); |
199 | virtual void initButtons(); | 200 | virtual void initButtons(); |
200 | static void sendSuspendmsg(); | 201 | static void sendSuspendmsg(); |
201 | 202 | ||
202 | ODeviceData *d; | 203 | ODeviceData *d; |
203 | 204 | ||
204 | public: | 205 | public: |
205 | // sandman do we want to allow destructions? -zecke? | 206 | // sandman do we want to allow destructions? -zecke? |
206 | virtual ~ODevice(); | 207 | virtual ~ODevice(); |
207 | 208 | ||
208 | static ODevice *inst(); | 209 | static ODevice *inst(); |
209 | 210 | ||
210 | // information | 211 | // information |
211 | 212 | ||
212 | QString modelString() const; | 213 | QString modelString() const; |
213 | OModel model() const; | 214 | OModel model() const; |
214 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } | 215 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } |
215 | 216 | ||
216 | QString vendorString() const; | 217 | QString vendorString() const; |
217 | OVendor vendor() const; | 218 | OVendor vendor() const; |
218 | 219 | ||
219 | QString systemString() const; | 220 | QString systemString() const; |
220 | OSystem system() const; | 221 | OSystem system() const; |
221 | 222 | ||
222 | QString systemVersionString() const; | 223 | QString systemVersionString() const; |