Diffstat (limited to 'libopie2/opiecore/device/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index c70d2af..0c78277 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -27,209 +27,214 @@ | |||
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 | ||
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 | 73 | ||
74 | Model_Jornada = ( 6 << 16 ), | 74 | Model_Jornada = ( 6 << 16 ), |
75 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), | 75 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), |
76 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), | 76 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), |
77 | 77 | ||
78 | Model_Zaurus = ( 2 << 16 ), | 78 | Model_Zaurus = ( 2 << 16 ), |
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 | |||
125 | Model_HTC = ( 9 << 16 ), | ||
126 | Model_HTC_All = ( Model_HTC | 0xffff ), | ||
127 | Model_HTC_Universal = ( Model_HTC | 0x0001 ) | ||
124 | }; | 128 | }; |
125 | 129 | ||
126 | /** | 130 | /** |
127 | * The vendor of the device | 131 | * The vendor of the device |
128 | */ | 132 | */ |
129 | enum OVendor { | 133 | enum OVendor { |
130 | Vendor_Unknown, | 134 | Vendor_Unknown, |
131 | 135 | ||
132 | Vendor_HP, | 136 | Vendor_HP, |
133 | Vendor_Sharp, | 137 | Vendor_Sharp, |
134 | Vendor_SIEMENS, | 138 | Vendor_SIEMENS, |
135 | Vendor_MundN, | 139 | Vendor_MundN, |
136 | Vendor_GMate, | 140 | Vendor_GMate, |
137 | Vendor_MasterIA, | 141 | Vendor_MasterIA, |
138 | Vendor_GenuineIntel, | 142 | Vendor_GenuineIntel, |
139 | Vendor_Asus | 143 | Vendor_Asus, |
144 | Vendor_HTC | ||
140 | }; | 145 | }; |
141 | 146 | ||
142 | /** | 147 | /** |
143 | * The System used | 148 | * The System used |
144 | */ | 149 | */ |
145 | enum OSystem { | 150 | enum OSystem { |
146 | System_Unknown, | 151 | System_Unknown, |
147 | 152 | ||
148 | System_Familiar, | 153 | System_Familiar, |
149 | System_Zaurus, | 154 | System_Zaurus, |
150 | System_OpenZaurus, | 155 | System_OpenZaurus, |
151 | System_Linupy, | 156 | System_Linupy, |
152 | System_OpenEmbedded, | 157 | System_OpenEmbedded, |
153 | System_PC | 158 | System_PC |
154 | }; | 159 | }; |
155 | 160 | ||
156 | typedef struct { | 161 | typedef struct { |
157 | OSystem system; | 162 | OSystem system; |
158 | char* sysstr; | 163 | char* sysstr; |
159 | char* sysvfile; | 164 | char* sysvfile; |
160 | } ODistribution; | 165 | } ODistribution; |
161 | 166 | ||
162 | extern ODistribution distributions[]; | 167 | extern ODistribution distributions[]; |
163 | 168 | ||
164 | 169 | ||
165 | enum OLedState { | 170 | enum OLedState { |
166 | Led_Off, | 171 | Led_Off, |
167 | Led_On, | 172 | Led_On, |
168 | Led_BlinkSlow, | 173 | Led_BlinkSlow, |
169 | Led_BlinkFast | 174 | Led_BlinkFast |
170 | }; | 175 | }; |
171 | 176 | ||
172 | enum OLed { | 177 | enum OLed { |
173 | Led_Mail, | 178 | Led_Mail, |
174 | Led_Power, | 179 | Led_Power, |
175 | Led_BlueTooth | 180 | Led_BlueTooth |
176 | }; | 181 | }; |
177 | 182 | ||
178 | enum OHardKey { | 183 | enum OHardKey { |
179 | HardKey_Datebook = Qt::Key_F9, | 184 | HardKey_Datebook = Qt::Key_F9, |
180 | HardKey_Contacts = Qt::Key_F10, | 185 | HardKey_Contacts = Qt::Key_F10, |
181 | HardKey_Menu = Qt::Key_F11, | 186 | HardKey_Menu = Qt::Key_F11, |
182 | HardKey_Home = Qt::Key_F12, | 187 | HardKey_Home = Qt::Key_F12, |
183 | HardKey_Mail = Qt::Key_F13, | 188 | HardKey_Mail = Qt::Key_F13, |
184 | HardKey_Record = Qt::Key_F24, | 189 | HardKey_Record = Qt::Key_F24, |
185 | HardKey_Suspend = Qt::Key_F34, | 190 | HardKey_Suspend = Qt::Key_F34, |
186 | HardKey_Backlight = Qt::Key_F35, | 191 | HardKey_Backlight = Qt::Key_F35, |
187 | HardKey_Action = Qt::Key_F10, | 192 | HardKey_Action = Qt::Key_F10, |
188 | HardKey_OK = Qt::Key_F11, | 193 | HardKey_OK = Qt::Key_F11, |
189 | HardKey_End = Qt::Key_F12, | 194 | HardKey_End = Qt::Key_F12, |
190 | }; | 195 | }; |
191 | 196 | ||
192 | enum ODirection { | 197 | enum ODirection { |
193 | CW = 0, | 198 | CW = 0, |
194 | CCW = 1, | 199 | CCW = 1, |
195 | Flip = 2, | 200 | Flip = 2, |
196 | }; | 201 | }; |
197 | 202 | ||
198 | enum OHingeStatus { | 203 | enum OHingeStatus { |
199 | CASE_CLOSED = 3, | 204 | CASE_CLOSED = 3, |
200 | CASE_PORTRAIT = 2, | 205 | CASE_PORTRAIT = 2, |
201 | CASE_LANDSCAPE = 0, | 206 | CASE_LANDSCAPE = 0, |
202 | CASE_UNKNOWN = 1, | 207 | CASE_UNKNOWN = 1, |
203 | }; | 208 | }; |
204 | 209 | ||
205 | /* default button for qvfb or such | 210 | /* default button for qvfb or such |
206 | * see odevice.cpp for details. | 211 | * see odevice.cpp for details. |
207 | * hint: manage a user defined button for qvfb? | 212 | * hint: manage a user defined button for qvfb? |
208 | * alwin | 213 | * alwin |
209 | */ | 214 | */ |
210 | struct default_button { | 215 | struct default_button { |
211 | Qt::Key code; | 216 | Qt::Key code; |
212 | char *utext; | 217 | char *utext; |
213 | char *pix; | 218 | char *pix; |
214 | char *fpressedservice; | 219 | char *fpressedservice; |
215 | char *fpressedaction; | 220 | char *fpressedaction; |
216 | char *fheldservice; | 221 | char *fheldservice; |
217 | char *fheldaction; | 222 | char *fheldaction; |
218 | }; | 223 | }; |
219 | 224 | ||
220 | /** | 225 | /** |
221 | * A singleton which gives informations about device specefic option | 226 | * A singleton which gives informations about device specefic option |
222 | * like the Hardware used, LEDs, the Base Distribution and | 227 | * like the Hardware used, LEDs, the Base Distribution and |
223 | * hardware key mappings. | 228 | * hardware key mappings. |
224 | * | 229 | * |
225 | * @short A small class for device specific options | 230 | * @short A small class for device specific options |
226 | * @see QObject | 231 | * @see QObject |
227 | * @author Robert Griebl | 232 | * @author Robert Griebl |
228 | * @version 1.0 | 233 | * @version 1.0 |
229 | */ | 234 | */ |
230 | class ODevice : public QObject | 235 | class ODevice : public QObject |
231 | { | 236 | { |
232 | Q_OBJECT | 237 | Q_OBJECT |
233 | 238 | ||
234 | private: | 239 | private: |
235 | /* disable copy */ | 240 | /* disable copy */ |