author | mickeyl <mickeyl> | 2006-05-19 12:22:12 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2006-05-19 12:22:12 (UTC) |
commit | 0a37c2f7c92ca6b0b6357271b02fb871e0afcbdc (patch) (unidiff) | |
tree | f29beee42524c33b0a6c7f2079ecb610db6366b0 /libopie2/opiecore/device/odevice.h | |
parent | f2dc2fbeca42a87e1779696477b4caaf89a10614 (diff) | |
download | opie-0a37c2f7c92ca6b0b6357271b02fb871e0afcbdc.zip opie-0a37c2f7c92ca6b0b6357271b02fb871e0afcbdc.tar.gz opie-0a37c2f7c92ca6b0b6357271b02fb871e0afcbdc.tar.bz2 |
add preliminary support for the Motorola EZX Linux phone platform
see http://openezx.org
Diffstat (limited to 'libopie2/opiecore/device/odevice.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 2566979..9afb92d 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -1,60 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> | 3 | (C) 2002-2006 The Opie Team <opie-devel@handhelds.org> |
4 | =. | 4 | =. |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; version 2 of the License. |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef ODEVICE_H_ | 30 | #ifndef ODEVICE_H_ |
31 | #define ODEVICE_H_ | 31 | #define ODEVICE_H_ |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/odevicebutton.h> | 34 | #include <opie2/odevicebutton.h> |
35 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ | 35 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | #include <qnamespace.h> | 38 | #include <qnamespace.h> |
39 | #include <qobject.h> | 39 | #include <qobject.h> |
40 | #include <qstring.h> | 40 | #include <qstring.h> |
41 | 41 | ||
42 | 42 | ||
43 | #include <qstrlist.h> | 43 | #include <qstrlist.h> |
44 | #include <qwindowsystem_qws.h> | 44 | #include <qwindowsystem_qws.h> |
45 | 45 | ||
46 | 46 | ||
47 | class Sound; | 47 | class Sound; |
48 | 48 | ||
49 | namespace Opie{ | 49 | namespace Opie{ |
50 | namespace Core{ | 50 | namespace Core{ |
51 | 51 | ||
52 | class ODeviceData; | 52 | class ODeviceData; |
53 | /** | 53 | /** |
54 | * The available devices | 54 | * The available devices |
55 | */ | 55 | */ |
56 | enum OModel { | 56 | enum OModel { |
57 | Model_Unknown, // = 0 | 57 | Model_Unknown, // = 0 |
58 | 58 | ||
59 | Model_Series_Mask = 0xffff0000, | 59 | Model_Series_Mask = 0xffff0000, |
60 | 60 | ||
@@ -79,128 +79,136 @@ enum OModel { | |||
79 | 79 | ||
80 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), | 80 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), |
81 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), | 81 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), |
82 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), | 82 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), |
83 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), | 83 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), |
84 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), | 84 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), |
85 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), | 85 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), |
86 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), | 86 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), |
87 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), | 87 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), |
88 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), | 88 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), |
89 | 89 | ||
90 | Model_SIMpad = ( 3 << 16 ), | 90 | Model_SIMpad = ( 3 << 16 ), |
91 | 91 | ||
92 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), | 92 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), |
93 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), | 93 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), |
94 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), | 94 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), |
95 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), | 95 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), |
96 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), | 96 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), |
97 | 97 | ||
98 | Model_Ramses = ( 4 << 16 ), | 98 | Model_Ramses = ( 4 << 16 ), |
99 | 99 | ||
100 | Model_Ramses_All = ( Model_Ramses | 0xffff ), | 100 | Model_Ramses_All = ( Model_Ramses | 0xffff ), |
101 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), | 101 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), |
102 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), | 102 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), |
103 | 103 | ||
104 | Model_Yopy = ( 5 << 16 ), | 104 | Model_Yopy = ( 5 << 16 ), |
105 | 105 | ||
106 | Model_Yopy_All = ( Model_Yopy | 0xffff ), | 106 | Model_Yopy_All = ( Model_Yopy | 0xffff ), |
107 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), | 107 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), |
108 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), | 108 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), |
109 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), | 109 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), |
110 | 110 | ||
111 | Model_Beagle = ( 6 << 16 ), | 111 | Model_Beagle = ( 6 << 16 ), |
112 | 112 | ||
113 | Model_Beagle_All = ( Model_Beagle | 0xffff ), | 113 | Model_Beagle_All = ( Model_Beagle | 0xffff ), |
114 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), | 114 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), |
115 | 115 | ||
116 | Model_GenuineIntel = ( 7 << 16 ), | 116 | Model_GenuineIntel = ( 7 << 16 ), |
117 | 117 | ||
118 | Model_MyPal = ( 8 << 16 ), | 118 | Model_MyPal = ( 8 << 16 ), |
119 | 119 | ||
120 | Model_MyPal_All = ( Model_MyPal | 0xffff ), | 120 | Model_MyPal_All = ( Model_MyPal | 0xffff ), |
121 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), | 121 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), |
122 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), | 122 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), |
123 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ), | 123 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ), |
124 | 124 | ||
125 | Model_HTC = ( 9 << 16 ), | 125 | Model_HTC = ( 9 << 16 ), |
126 | Model_HTC_All = ( Model_HTC | 0xffff ), | 126 | Model_HTC_All = ( Model_HTC | 0xffff ), |
127 | Model_HTC_Universal = ( Model_HTC | 0x0001 ) | 127 | Model_HTC_Universal = ( Model_HTC | 0x0001 ), |
128 | |||
129 | Model_Motorola = ( 9 << 17 ), | ||
130 | Model_Motorola_All = ( Model_Motorola | 0xffff ), | ||
131 | Model_Motorola_EZX = ( Model_Motorola | 0x0001 ), | ||
132 | |||
128 | }; | 133 | }; |
129 | 134 | ||
130 | /** | 135 | /** |
131 | * The vendor of the device | 136 | * The vendor of the device |
132 | */ | 137 | */ |
133 | enum OVendor { | 138 | enum OVendor { |
134 | Vendor_Unknown, | 139 | Vendor_Unknown, |
135 | 140 | ||
136 | Vendor_HP, | 141 | Vendor_HP, |
137 | Vendor_Sharp, | 142 | Vendor_Sharp, |
138 | Vendor_SIEMENS, | 143 | Vendor_SIEMENS, |
139 | Vendor_MundN, | 144 | Vendor_MundN, |
140 | Vendor_GMate, | 145 | Vendor_GMate, |
141 | Vendor_MasterIA, | 146 | Vendor_MasterIA, |
142 | Vendor_GenuineIntel, | 147 | Vendor_GenuineIntel, |
143 | Vendor_Asus, | 148 | Vendor_Asus, |
144 | Vendor_HTC | 149 | Vendor_HTC, |
150 | Vendor_Motorola, | ||
145 | }; | 151 | }; |
146 | 152 | ||
147 | /** | 153 | /** |
148 | * The System used | 154 | * The System used |
149 | */ | 155 | */ |
150 | enum OSystem { | 156 | enum OSystem { |
151 | System_Unknown, | 157 | System_Unknown, |
152 | 158 | ||
153 | System_Familiar, | 159 | System_Familiar, |
154 | System_Zaurus, | 160 | System_Zaurus, |
155 | System_OpenZaurus, | 161 | System_OpenZaurus, |
156 | System_Linupy, | 162 | System_Linupy, |
157 | System_OpenEmbedded, | 163 | System_OpenEmbedded, |
158 | System_PC | 164 | System_PC, |
165 | System_OpenEZX, | ||
166 | System_Angstrom, | ||
159 | }; | 167 | }; |
160 | 168 | ||
161 | typedef struct { | 169 | typedef struct { |
162 | OSystem system; | 170 | OSystem system; |
163 | char* sysstr; | 171 | char* sysstr; |
164 | char* sysvfile; | 172 | char* sysvfile; |
165 | } ODistribution; | 173 | } ODistribution; |
166 | 174 | ||
167 | extern ODistribution distributions[]; | 175 | extern ODistribution distributions[]; |
168 | 176 | ||
169 | 177 | ||
170 | enum OLedState { | 178 | enum OLedState { |
171 | Led_Off, | 179 | Led_Off, |
172 | Led_On, | 180 | Led_On, |
173 | Led_BlinkSlow, | 181 | Led_BlinkSlow, |
174 | Led_BlinkFast | 182 | Led_BlinkFast |
175 | }; | 183 | }; |
176 | 184 | ||
177 | enum OLed { | 185 | enum OLed { |
178 | Led_Mail, | 186 | Led_Mail, |
179 | Led_Power, | 187 | Led_Power, |
180 | Led_BlueTooth | 188 | Led_BlueTooth |
181 | }; | 189 | }; |
182 | 190 | ||
183 | enum OHardKey { | 191 | enum OHardKey { |
184 | HardKey_Datebook = Qt::Key_F9, | 192 | HardKey_Datebook = Qt::Key_F9, |
185 | HardKey_Contacts = Qt::Key_F10, | 193 | HardKey_Contacts = Qt::Key_F10, |
186 | HardKey_Menu = Qt::Key_F11, | 194 | HardKey_Menu = Qt::Key_F11, |
187 | HardKey_Home = Qt::Key_F12, | 195 | HardKey_Home = Qt::Key_F12, |
188 | HardKey_Mail = Qt::Key_F13, | 196 | HardKey_Mail = Qt::Key_F13, |
189 | HardKey_Record = Qt::Key_F24, | 197 | HardKey_Record = Qt::Key_F24, |
190 | HardKey_Suspend = Qt::Key_F34, | 198 | HardKey_Suspend = Qt::Key_F34, |
191 | HardKey_Backlight = Qt::Key_F35, | 199 | HardKey_Backlight = Qt::Key_F35, |
192 | HardKey_Action = Qt::Key_F10, | 200 | HardKey_Action = Qt::Key_F10, |
193 | HardKey_OK = Qt::Key_F11, | 201 | HardKey_OK = Qt::Key_F11, |
194 | HardKey_End = Qt::Key_F12, | 202 | HardKey_End = Qt::Key_F12, |
195 | }; | 203 | }; |
196 | 204 | ||
197 | enum ODirection { | 205 | enum ODirection { |
198 | CW = 0, | 206 | CW = 0, |
199 | CCW = 1, | 207 | CCW = 1, |
200 | Flip = 2, | 208 | Flip = 2, |
201 | }; | 209 | }; |
202 | 210 | ||
203 | enum OHingeStatus { | 211 | enum OHingeStatus { |
204 | CASE_CLOSED = 3, | 212 | CASE_CLOSED = 3, |
205 | CASE_PORTRAIT = 2, | 213 | CASE_PORTRAIT = 2, |
206 | CASE_LANDSCAPE = 0, | 214 | CASE_LANDSCAPE = 0, |
@@ -345,53 +353,49 @@ signals: | |||
345 | 353 | ||
346 | private slots: | 354 | private slots: |
347 | void systemMessage ( const QCString &, const QByteArray & ); | 355 | void systemMessage ( const QCString &, const QByteArray & ); |
348 | void playingStopped(); | 356 | void playingStopped(); |
349 | 357 | ||
350 | protected: | 358 | protected: |
351 | void addPreHandler(QWSServer::KeyboardFilter*aFilter); | 359 | void addPreHandler(QWSServer::KeyboardFilter*aFilter); |
352 | void remPreHandler(QWSServer::KeyboardFilter*aFilter); | 360 | void remPreHandler(QWSServer::KeyboardFilter*aFilter); |
353 | void reloadButtonMapping(); | 361 | void reloadButtonMapping(); |
354 | void changeMixerForAlarm( int mixer, const char* file, Sound *snd); | 362 | void changeMixerForAlarm( int mixer, const char* file, Sound *snd); |
355 | 363 | ||
356 | /* ugly virtual hook */ | 364 | /* ugly virtual hook */ |
357 | virtual void virtual_hook( int id, void* data ); | 365 | virtual void virtual_hook( int id, void* data ); |
358 | }; | 366 | }; |
359 | 367 | ||
360 | class ODeviceData { | 368 | class ODeviceData { |
361 | 369 | ||
362 | public: | 370 | public: |
363 | QString m_vendorstr; | 371 | QString m_vendorstr; |
364 | OVendor m_vendor; | 372 | OVendor m_vendor; |
365 | 373 | ||
366 | QString m_modelstr; | 374 | QString m_modelstr; |
367 | OModel m_model; | 375 | OModel m_model; |
368 | 376 | ||
369 | QString m_systemstr; | 377 | QString m_systemstr; |
370 | OSystem m_system; | 378 | OSystem m_system; |
371 | 379 | ||
372 | QString m_sysverstr; | 380 | QString m_sysverstr; |
373 | 381 | ||
374 | Transformation m_rotation; | 382 | Transformation m_rotation; |
375 | ODirection m_direction; | 383 | ODirection m_direction; |
376 | 384 | ||
377 | QString m_qteDriver; | 385 | QString m_qteDriver; |
378 | 386 | ||
379 | QValueList <ODeviceButton> *m_buttons; | 387 | QValueList <ODeviceButton> *m_buttons; |
380 | uint m_holdtime; | 388 | uint m_holdtime; |
381 | QStrList *m_cpu_frequencies; | 389 | QStrList *m_cpu_frequencies; |
382 | bool m_initializedButtonQcop : 1; | 390 | bool m_initializedButtonQcop : 1; |
383 | 391 | ||
384 | /* values for changeMixerForAlarm */ | 392 | /* values for changeMixerForAlarm */ |
385 | int m_sound, m_vol, m_mixer; | 393 | int m_sound, m_vol, m_mixer; |
386 | }; | 394 | }; |
387 | 395 | ||
388 | extern bool isQWS(); | 396 | extern bool isQWS(); |
389 | extern QCString makeChannel ( const char *str ); | 397 | extern QCString makeChannel ( const char *str ); |
390 | } | 398 | } |
391 | } | 399 | } |
392 | 400 | ||
393 | |||
394 | |||
395 | |||
396 | #endif | 401 | #endif |
397 | |||