Diffstat (limited to 'libopie2/opiecore/device/odevice.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 200 |
1 files changed, 108 insertions, 92 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index c6306e7..f80183c 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -11,188 +11,204 @@ | |||
11 | - . .-<_> .<> Foundation; version 2 of the License. | 11 | - . .-<_> .<> Foundation; version 2 of the License. |
12 | ._= =} : | 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 = 0xfff00000, |
60 | 60 | ||
61 | Model_iPAQ = ( 1 << 16 ), | 61 | Model_iPAQ = ( 1 << 20 ), |
62 | 62 | ||
63 | Model_iPAQ_All = ( Model_iPAQ | 0xffff ), | 63 | Model_iPAQ_All = ( Model_iPAQ | 0xfffff ), |
64 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x0001 ), | 64 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x00001 ), |
65 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x0002 ), | 65 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x00002 ), |
66 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x0004 ), | 66 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x00004 ), |
67 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x0008 ), | 67 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x00008 ), |
68 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x0010 ), | 68 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x00010 ), |
69 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x0020 ), | 69 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x00020 ), |
70 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x0040 ), | 70 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x00040 ), |
71 | Model_iPAQ_H191x = ( Model_iPAQ | 0x0080 ), | 71 | Model_iPAQ_H191x = ( Model_iPAQ | 0x00080 ), |
72 | Model_iPAQ_H1940 = ( Model_iPAQ | 0x0100 ), | 72 | Model_iPAQ_H1940 = ( Model_iPAQ | 0x00100 ), |
73 | Model_iPAQ_HX4700 = ( Model_iPAQ | 0x0200 ), | 73 | Model_iPAQ_HX4700 = ( Model_iPAQ | 0x00200 ), |
74 | Model_iPAQ_H4xxx = ( Model_iPAQ | 0x0400 ), | 74 | Model_iPAQ_H4xxx = ( Model_iPAQ | 0x00400 ), |
75 | 75 | ||
76 | Model_Jornada = ( 3 << 17 ), | 76 | Model_Jornada = ( 2 << 20 ), |
77 | 77 | ||
78 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), | 78 | Model_Jornada_56x = ( Model_Jornada | 0x00001 ), |
79 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), | 79 | Model_Jornada_720 = ( Model_Jornada | 0x00002 ), |
80 | Model_Jornada_820 = ( Model_Jornada | 0x0004 ), | 80 | Model_Jornada_820 = ( Model_Jornada | 0x00004 ), |
81 | 81 | ||
82 | Model_Zaurus = ( 2 << 16 ), | 82 | Model_Zaurus = ( 3 << 20 ), |
83 | 83 | ||
84 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), | 84 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x00001 ), |
85 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), | 85 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x00002 ), |
86 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0004 ), | 86 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x00004 ), |
87 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0008 ), | 87 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x00008 ), |
88 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0010 ), | 88 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x00010 ), |
89 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0020 ), | 89 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x00020 ), |
90 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0040 ), | 90 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x00040 ), |
91 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0080 ), | 91 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x00080 ), |
92 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0100 ), | 92 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x00100 ), |
93 | 93 | ||
94 | Model_SIMpad = ( 3 << 16 ), | 94 | Model_SIMpad = ( 4 << 20 ), |
95 | 95 | ||
96 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), | 96 | Model_SIMpad_All = ( Model_SIMpad | 0xfffff ), |
97 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), | 97 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x00001 ), |
98 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), | 98 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x00002 ), |
99 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0004 ), | 99 | Model_SIMpad_SLC = ( Model_SIMpad | 0x00004 ), |
100 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0008 ), | 100 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x00008 ), |
101 | 101 | ||
102 | Model_Ramses = ( 4 << 16 ), | 102 | Model_Ramses = ( 5 << 20 ), |
103 | 103 | ||
104 | Model_Ramses_All = ( Model_Ramses | 0xffff ), | 104 | Model_Ramses_All = ( Model_Ramses | 0xfffff ), |
105 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), | 105 | Model_Ramses_MNCI = ( Model_Ramses | 0x00001 ), |
106 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), | 106 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x00002 ), |
107 | 107 | ||
108 | Model_Yopy = ( 5 << 16 ), | 108 | Model_Yopy = ( 6 << 20 ), |
109 | 109 | ||
110 | Model_Yopy_All = ( Model_Yopy | 0xffff ), | 110 | Model_Yopy_All = ( Model_Yopy | 0xfffff ), |
111 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), | 111 | Model_Yopy_3000 = ( Model_Yopy | 0x00001 ), |
112 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), | 112 | Model_Yopy_3500 = ( Model_Yopy | 0x00002 ), |
113 | Model_Yopy_3700 = ( Model_Yopy | 0x0004 ), | 113 | Model_Yopy_3700 = ( Model_Yopy | 0x00004 ), |
114 | 114 | ||
115 | Model_Beagle = ( 6 << 16 ), | 115 | Model_Beagle = ( 7 << 20 ), |
116 | 116 | ||
117 | Model_Beagle_All = ( Model_Beagle | 0xffff ), | 117 | Model_Beagle_All = ( Model_Beagle | 0xfffff ), |
118 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), | 118 | Model_Beagle_PA100 = ( Model_Beagle | 0x00001 ), |
119 | 119 | ||
120 | Model_GenuineIntel = ( 7 << 16 ), | 120 | Model_GenuineIntel = ( 8 << 20 ), |
121 | 121 | ||
122 | Model_MyPal = ( 8 << 16 ), | 122 | Model_MyPal = ( 9 << 20 ), |
123 | 123 | ||
124 | Model_MyPal_All = ( Model_MyPal | 0xffff ), | 124 | Model_MyPal_All = ( Model_MyPal | 0xfffff ), |
125 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), | 125 | Model_MyPal_620 = ( Model_MyPal | 0x00001 ), |
126 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), | 126 | Model_MyPal_716 = ( Model_MyPal | 0x00002 ), |
127 | Model_MyPal_730 = ( Model_MyPal | 0x0004 ), | 127 | Model_MyPal_730 = ( Model_MyPal | 0x00004 ), |
128 | 128 | ||
129 | Model_HTC = ( 9 << 16 ), | 129 | Model_HTC = ( 10 << 20 ), |
130 | 130 | ||
131 | Model_HTC_All = ( Model_HTC | 0xffff ), | 131 | Model_HTC_All = ( Model_HTC | 0xfffff ), |
132 | Model_HTC_Universal = ( Model_HTC | 0x0001 ), | 132 | Model_HTC_Universal = ( Model_HTC | 0x00001 ), |
133 | Model_HTC_Alpine = ( Model_HTC | 0x0002 ), | 133 | Model_HTC_Alpine = ( Model_HTC | 0x00002 ), |
134 | Model_HTC_Apache = ( Model_HTC | 0x0004 ), | 134 | Model_HTC_Apache = ( Model_HTC | 0x00004 ), |
135 | Model_HTC_Beetles = ( Model_HTC | 0x0008 ), | 135 | Model_HTC_Beetles = ( Model_HTC | 0x00008 ), |
136 | Model_HTC_Blueangel = ( Model_HTC | 0x0010 ), | 136 | Model_HTC_Blueangel = ( Model_HTC | 0x00010 ), |
137 | Model_HTC_Himalaya = ( Model_HTC | 0x0020 ), | 137 | Model_HTC_Himalaya = ( Model_HTC | 0x00020 ), |
138 | Model_HTC_Magician = ( Model_HTC | 0x0040 ), | 138 | Model_HTC_Magician = ( Model_HTC | 0x00040 ), |
139 | 139 | ||
140 | Model_Motorola = ( 2 << 17 ), | 140 | Model_Motorola = ( 11 << 20 ), |
141 | 141 | ||
142 | Model_Motorola_All = ( Model_Motorola | 0xffff ), | 142 | Model_Motorola_All = ( Model_Motorola | 0xfffff ), |
143 | Model_Motorola_EZX = ( Model_Motorola | 0x0001 ), | 143 | Model_Motorola_EZX = ( Model_Motorola | 0x00001 ), |
144 | 144 | ||
145 | Model_Palm = ( 1 << 17), | 145 | Model_Palm = ( 12 << 20 ), |
146 | 146 | ||
147 | Model_Palm_All = ( Model_Palm | 0xffff ), | 147 | Model_Palm_All = ( Model_Palm | 0xfffff ), |
148 | Model_Palm_LD = ( Model_Palm | 0x0001 ), | 148 | Model_Palm_TT = ( Model_Palm | 0x00001 ), |
149 | Model_Palm_TX = ( Model_Palm | 0x0002 ), | 149 | Model_Palm_TT2 = ( Model_Palm | 0x00002 ), |
150 | Model_Palm_Z72 = ( Model_Palm | 0x0004 ), | 150 | Model_Palm_TT3 = ( Model_Palm | 0x00004 ), |
151 | Model_Palm_TT5 = ( Model_Palm | 0x00008 ), | ||
152 | Model_Palm_TC = ( Model_Palm | 0x00010 ), | ||
153 | Model_Palm_TE = ( Model_Palm | 0x00020 ), | ||
154 | Model_Palm_TE2 = ( Model_Palm | 0x00040 ), | ||
155 | Model_Palm_LD = ( Model_Palm | 0x00080 ), | ||
156 | Model_Palm_TX = ( Model_Palm | 0x00100 ), | ||
157 | Model_Palm_Z71 = ( Model_Palm | 0x00200 ), | ||
158 | Model_Palm_Z72 = ( Model_Palm | 0x00400 ), | ||
159 | Model_Palm_T600 = ( Model_Palm | 0x00800 ), | ||
160 | Model_Palm_T650 = ( Model_Palm | 0x01000 ), | ||
161 | Model_Palm_T680 = ( Model_Palm | 0x02000 ), | ||
162 | Model_Palm_T700W = ( Model_Palm | 0x04000 ), | ||
163 | Model_Palm_T700P = ( Model_Palm | 0x08000 ), | ||
164 | Model_Palm_T750 = ( Model_Palm | 0x10000 ), | ||
165 | Model_Palm_T755P = ( Model_Palm | 0x20000 ), | ||
166 | Model_Palm_FOLEO = ( Model_Palm | 0x40000 ), | ||
151 | 167 | ||
152 | }; | 168 | }; |
153 | 169 | ||
154 | /** | 170 | /** |
155 | * The vendor of the device | 171 | * The vendor of the device |
156 | */ | 172 | */ |
157 | enum OVendor { | 173 | enum OVendor { |
158 | Vendor_Unknown, | 174 | Vendor_Unknown, |
159 | 175 | ||
160 | Vendor_HP, | 176 | Vendor_HP, |
161 | Vendor_Sharp, | 177 | Vendor_Sharp, |
162 | Vendor_SIEMENS, | 178 | Vendor_SIEMENS, |
163 | Vendor_MundN, | 179 | Vendor_MundN, |
164 | Vendor_GMate, | 180 | Vendor_GMate, |
165 | Vendor_MasterIA, | 181 | Vendor_MasterIA, |
166 | Vendor_GenuineIntel, | 182 | Vendor_GenuineIntel, |
167 | Vendor_Asus, | 183 | Vendor_Asus, |
168 | Vendor_HTC, | 184 | Vendor_HTC, |
169 | Vendor_Motorola, | 185 | Vendor_Motorola, |
170 | Vendor_Palm, | 186 | Vendor_Palm, |
171 | }; | 187 | }; |
172 | 188 | ||
173 | /** | 189 | /** |
174 | * The System used | 190 | * The System used |
175 | */ | 191 | */ |
176 | enum OSystem { | 192 | enum OSystem { |
177 | System_Unknown, | 193 | System_Unknown, |
178 | 194 | ||
179 | System_Familiar, | 195 | System_Familiar, |
180 | System_Zaurus, | 196 | System_Zaurus, |
181 | System_OpenZaurus, | 197 | System_OpenZaurus, |
182 | System_Linupy, | 198 | System_Linupy, |
183 | System_OpenEmbedded, | 199 | System_OpenEmbedded, |
184 | System_PC, | 200 | System_PC, |
185 | System_OpenEZX, | 201 | System_OpenEZX, |
186 | System_Angstrom, | 202 | System_Angstrom, |
187 | }; | 203 | }; |
188 | 204 | ||
189 | typedef struct { | 205 | typedef struct { |
190 | OSystem system; | 206 | OSystem system; |
191 | char* sysstr; | 207 | char* sysstr; |
192 | char* sysvfile; | 208 | char* sysvfile; |
193 | } ODistribution; | 209 | } ODistribution; |
194 | 210 | ||
195 | extern ODistribution distributions[]; | 211 | extern ODistribution distributions[]; |
196 | 212 | ||
197 | 213 | ||
198 | enum OLedState { | 214 | enum OLedState { |