Diffstat (limited to 'libopie2/opiecore/device/odevice.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index a8362cd..1eb5959 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -45,210 +45,217 @@ | |||
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 | ||
61 | Model_iPAQ = ( 1 << 16 ), | 61 | Model_iPAQ = ( 1 << 16 ), |
62 | 62 | ||
63 | Model_iPAQ_All = ( Model_iPAQ | 0xffff ), | 63 | Model_iPAQ_All = ( Model_iPAQ | 0xffff ), |
64 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x0001 ), | 64 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x0001 ), |
65 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x0002 ), | 65 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x0002 ), |
66 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x0003 ), | 66 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x0003 ), |
67 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x0004 ), | 67 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x0004 ), |
68 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x0005 ), | 68 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x0005 ), |
69 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x0006 ), | 69 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x0006 ), |
70 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x0007 ), | 70 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x0007 ), |
71 | Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ), | 71 | Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ), |
72 | Model_iPAQ_H1940 = ( Model_iPAQ | 0x0009 ), | 72 | Model_iPAQ_H1940 = ( Model_iPAQ | 0x0009 ), |
73 | Model_iPAQ_HX4700 = ( Model_iPAQ | 0x000A ), | 73 | Model_iPAQ_HX4700 = ( Model_iPAQ | 0x000A ), |
74 | Model_iPAQ_H4xxx = ( Model_iPAQ | 0x000b ), | 74 | Model_iPAQ_H4xxx = ( Model_iPAQ | 0x000b ), |
75 | Model_Jornada = ( 6 << 16 ), | 75 | Model_Jornada = ( 6 << 16 ), |
76 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), | 76 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), |
77 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), | 77 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), |
78 | Model_Jornada_820 = ( Model_Jornada | 0x0003 ), | 78 | Model_Jornada_820 = ( Model_Jornada | 0x0003 ), |
79 | 79 | ||
80 | Model_Zaurus = ( 2 << 16 ), | 80 | Model_Zaurus = ( 2 << 16 ), |
81 | 81 | ||
82 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), | 82 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), |
83 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), | 83 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), |
84 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), | 84 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), |
85 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), | 85 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), |
86 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), | 86 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), |
87 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), | 87 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), |
88 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), | 88 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), |
89 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), | 89 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), |
90 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), | 90 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), |
91 | 91 | ||
92 | Model_SIMpad = ( 3 << 16 ), | 92 | Model_SIMpad = ( 3 << 16 ), |
93 | 93 | ||
94 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), | 94 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), |
95 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), | 95 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), |
96 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), | 96 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), |
97 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), | 97 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), |
98 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), | 98 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), |
99 | 99 | ||
100 | Model_Ramses = ( 4 << 16 ), | 100 | Model_Ramses = ( 4 << 16 ), |
101 | 101 | ||
102 | Model_Ramses_All = ( Model_Ramses | 0xffff ), | 102 | Model_Ramses_All = ( Model_Ramses | 0xffff ), |
103 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), | 103 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), |
104 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), | 104 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), |
105 | 105 | ||
106 | Model_Yopy = ( 5 << 16 ), | 106 | Model_Yopy = ( 5 << 16 ), |
107 | 107 | ||
108 | Model_Yopy_All = ( Model_Yopy | 0xffff ), | 108 | Model_Yopy_All = ( Model_Yopy | 0xffff ), |
109 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), | 109 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), |
110 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), | 110 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), |
111 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), | 111 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), |
112 | 112 | ||
113 | Model_Beagle = ( 6 << 16 ), | 113 | Model_Beagle = ( 6 << 16 ), |
114 | 114 | ||
115 | Model_Beagle_All = ( Model_Beagle | 0xffff ), | 115 | Model_Beagle_All = ( Model_Beagle | 0xffff ), |
116 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), | 116 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), |
117 | 117 | ||
118 | Model_GenuineIntel = ( 7 << 16 ), | 118 | Model_GenuineIntel = ( 7 << 16 ), |
119 | 119 | ||
120 | Model_MyPal = ( 8 << 16 ), | 120 | Model_MyPal = ( 8 << 16 ), |
121 | 121 | ||
122 | Model_MyPal_All = ( Model_MyPal | 0xffff ), | 122 | Model_MyPal_All = ( Model_MyPal | 0xffff ), |
123 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), | 123 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), |
124 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), | 124 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), |
125 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ), | 125 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ), |
126 | 126 | ||
127 | Model_HTC = ( 9 << 16 ), | 127 | Model_HTC = ( 9 << 16 ), |
128 | Model_HTC_All = ( Model_HTC | 0xffff ), | 128 | Model_HTC_All = ( Model_HTC | 0xffff ), |
129 | Model_HTC_Universal = ( Model_HTC | 0x0001 ), | 129 | Model_HTC_Universal = ( Model_HTC | 0x0001 ), |
130 | Model_HTC_Alpine = ( Model_HTC | 0x0002 ), | 130 | Model_HTC_Alpine = ( Model_HTC | 0x0002 ), |
131 | Model_HTC_Apache = ( Model_HTC | 0x0003 ), | 131 | Model_HTC_Apache = ( Model_HTC | 0x0003 ), |
132 | Model_HTC_Beetles = ( Model_HTC | 0x0004 ), | 132 | Model_HTC_Beetles = ( Model_HTC | 0x0004 ), |
133 | Model_HTC_Blueangel = ( Model_HTC | 0x0005 ), | 133 | Model_HTC_Blueangel = ( Model_HTC | 0x0005 ), |
134 | Model_HTC_Himalaya = ( Model_HTC | 0x0006 ), | 134 | Model_HTC_Himalaya = ( Model_HTC | 0x0006 ), |
135 | Model_HTC_Magician = ( Model_HTC | 0x0007 ), | 135 | Model_HTC_Magician = ( Model_HTC | 0x0007 ), |
136 | 136 | ||
137 | Model_Motorola = ( 9 << 17 ), | 137 | Model_Motorola = ( 9 << 17 ), |
138 | Model_Motorola_All = ( Model_Motorola | 0xffff ), | 138 | Model_Motorola_All = ( Model_Motorola | 0xffff ), |
139 | Model_Motorola_EZX = ( Model_Motorola | 0x0001 ), | 139 | Model_Motorola_EZX = ( Model_Motorola | 0x0001 ), |
140 | 140 | ||
141 | Model_Palm = ( 10 << 16), | ||
142 | Model_Palm_All = ( Model_Palm | 0xffff ), | ||
143 | Model_Palm_LD = ( Model_Palm | 0x0001 ), | ||
144 | Model_Palm_TX = ( Model_Palm | 0x0002 ), | ||
145 | Model_Palm_Z72 = ( Model_Palm | 0x0003 ), | ||
146 | |||
141 | }; | 147 | }; |
142 | 148 | ||
143 | /** | 149 | /** |
144 | * The vendor of the device | 150 | * The vendor of the device |
145 | */ | 151 | */ |
146 | enum OVendor { | 152 | enum OVendor { |
147 | Vendor_Unknown, | 153 | Vendor_Unknown, |
148 | 154 | ||
149 | Vendor_HP, | 155 | Vendor_HP, |
150 | Vendor_Sharp, | 156 | Vendor_Sharp, |
151 | Vendor_SIEMENS, | 157 | Vendor_SIEMENS, |
152 | Vendor_MundN, | 158 | Vendor_MundN, |
153 | Vendor_GMate, | 159 | Vendor_GMate, |
154 | Vendor_MasterIA, | 160 | Vendor_MasterIA, |
155 | Vendor_GenuineIntel, | 161 | Vendor_GenuineIntel, |
156 | Vendor_Asus, | 162 | Vendor_Asus, |
157 | Vendor_HTC, | 163 | Vendor_HTC, |
158 | Vendor_Motorola, | 164 | Vendor_Motorola, |
165 | Vendor_Palm, | ||
159 | }; | 166 | }; |
160 | 167 | ||
161 | /** | 168 | /** |
162 | * The System used | 169 | * The System used |
163 | */ | 170 | */ |
164 | enum OSystem { | 171 | enum OSystem { |
165 | System_Unknown, | 172 | System_Unknown, |
166 | 173 | ||
167 | System_Familiar, | 174 | System_Familiar, |
168 | System_Zaurus, | 175 | System_Zaurus, |
169 | System_OpenZaurus, | 176 | System_OpenZaurus, |
170 | System_Linupy, | 177 | System_Linupy, |
171 | System_OpenEmbedded, | 178 | System_OpenEmbedded, |
172 | System_PC, | 179 | System_PC, |
173 | System_OpenEZX, | 180 | System_OpenEZX, |
174 | System_Angstrom, | 181 | System_Angstrom, |
175 | }; | 182 | }; |
176 | 183 | ||
177 | typedef struct { | 184 | typedef struct { |
178 | OSystem system; | 185 | OSystem system; |
179 | char* sysstr; | 186 | char* sysstr; |
180 | char* sysvfile; | 187 | char* sysvfile; |
181 | } ODistribution; | 188 | } ODistribution; |
182 | 189 | ||
183 | extern ODistribution distributions[]; | 190 | extern ODistribution distributions[]; |
184 | 191 | ||
185 | 192 | ||
186 | enum OLedState { | 193 | enum OLedState { |
187 | Led_Off, | 194 | Led_Off, |
188 | Led_On, | 195 | Led_On, |
189 | Led_BlinkSlow, | 196 | Led_BlinkSlow, |
190 | Led_BlinkFast | 197 | Led_BlinkFast |
191 | }; | 198 | }; |
192 | 199 | ||
193 | enum OLed { | 200 | enum OLed { |
194 | Led_Mail, | 201 | Led_Mail, |
195 | Led_Power, | 202 | Led_Power, |
196 | Led_BlueTooth | 203 | Led_BlueTooth |
197 | }; | 204 | }; |
198 | 205 | ||
199 | enum OHardKey { | 206 | enum OHardKey { |
200 | HardKey_Datebook = Qt::Key_F9, | 207 | HardKey_Datebook = Qt::Key_F9, |
201 | HardKey_Contacts = Qt::Key_F10, | 208 | HardKey_Contacts = Qt::Key_F10, |
202 | HardKey_Menu = Qt::Key_F11, | 209 | HardKey_Menu = Qt::Key_F11, |
203 | HardKey_Home = Qt::Key_F12, | 210 | HardKey_Home = Qt::Key_F12, |
204 | HardKey_Mail = Qt::Key_F13, | 211 | HardKey_Mail = Qt::Key_F13, |
205 | HardKey_Record = Qt::Key_F24, | 212 | HardKey_Record = Qt::Key_F24, |
206 | HardKey_Suspend = Qt::Key_F34, | 213 | HardKey_Suspend = Qt::Key_F34, |
207 | HardKey_Backlight = Qt::Key_F35, | 214 | HardKey_Backlight = Qt::Key_F35, |
208 | HardKey_Action = Qt::Key_F10, | 215 | HardKey_Action = Qt::Key_F10, |
209 | HardKey_OK = Qt::Key_F11, | 216 | HardKey_OK = Qt::Key_F11, |
210 | HardKey_End = Qt::Key_F12, | 217 | HardKey_End = Qt::Key_F12, |
211 | }; | 218 | }; |
212 | 219 | ||
213 | enum ODirection { | 220 | enum ODirection { |
214 | CW = 0, | 221 | CW = 0, |
215 | CCW = 1, | 222 | CCW = 1, |
216 | Flip = 2, | 223 | Flip = 2, |
217 | }; | 224 | }; |
218 | 225 | ||
219 | enum OHingeStatus { | 226 | enum OHingeStatus { |
220 | CASE_CLOSED = 3, | 227 | CASE_CLOSED = 3, |
221 | CASE_PORTRAIT = 2, | 228 | CASE_PORTRAIT = 2, |
222 | CASE_LANDSCAPE = 0, | 229 | CASE_LANDSCAPE = 0, |
223 | CASE_UNKNOWN = 1, | 230 | CASE_UNKNOWN = 1, |
224 | }; | 231 | }; |
225 | 232 | ||
226 | /* default button for qvfb or such | 233 | /* default button for qvfb or such |
227 | * see odevice.cpp for details. | 234 | * see odevice.cpp for details. |
228 | * hint: manage a user defined button for qvfb? | 235 | * hint: manage a user defined button for qvfb? |
229 | * alwin | 236 | * alwin |
230 | */ | 237 | */ |
231 | struct default_button { | 238 | struct default_button { |
232 | Qt::Key code; | 239 | Qt::Key code; |
233 | char *utext; | 240 | char *utext; |
234 | char *pix; | 241 | char *pix; |
235 | char *fpressedservice; | 242 | char *fpressedservice; |
236 | char *fpressedaction; | 243 | char *fpressedaction; |
237 | char *fheldservice; | 244 | char *fheldservice; |
238 | char *fheldaction; | 245 | char *fheldaction; |
239 | }; | 246 | }; |
240 | 247 | ||
241 | /** | 248 | /** |
242 | * A singleton which gives informations about device specefic option | 249 | * A singleton which gives informations about device specefic option |
243 | * like the Hardware used, LEDs, the Base Distribution and | 250 | * like the Hardware used, LEDs, the Base Distribution and |
244 | * hardware key mappings. | 251 | * hardware key mappings. |
245 | * | 252 | * |
246 | * @short A small class for device specific options | 253 | * @short A small class for device specific options |
247 | * @see QObject | 254 | * @see QObject |
248 | * @author Robert Griebl | 255 | * @author Robert Griebl |
249 | * @version 1.0 | 256 | * @version 1.0 |
250 | */ | 257 | */ |
251 | class ODevice : public QObject | 258 | class ODevice : public QObject |
252 | { | 259 | { |
253 | Q_OBJECT | 260 | Q_OBJECT |
254 | 261 | ||