summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog2
-rw-r--r--libopie2/opiecore/device/odevice.h1
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp47
3 files changed, 43 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d0bbcb9..64bf7a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,378 +1,378 @@
1 2006-??-??Opie 1.2.3 1 2006-??-??Opie 1.2.3
2 2
3 3
4 New Features 4 New Features
5 ------------ 5 ------------
6 6
7 Fixed Bugs 7 Fixed Bugs
8 ---------- 8 ----------
9 * n.a.- Improved iPAQ support in ODevice and low-level applets (Slavek Banko) 9 * n.a.- Improved iPAQ support in ODevice and low-level applets (S.Banko, R.Wagner, E.Hovland, P.Sokolovsky)
10 * n.a. - Improved platform support for the Motorola EZX platform (mickeyl) 10 * n.a. - Improved platform support for the Motorola EZX platform (mickeyl)
11 11
12 Internal 12 Internal
13 -------- 13 --------
14 14
15 2006-05-28Opie 1.2.2 15 2006-05-28Opie 1.2.2
16 16
17 17
18 New Features 18 New Features
19 ------------ 19 ------------
20 * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw) 20 * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw)
21 * Opie-Notes: Notes application based on NoteZ (hrw) 21 * Opie-Notes: Notes application based on NoteZ (hrw)
22 * Opie-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw) 22 * Opie-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw)
23 * Added platform support for HTC Universal (ljp) 23 * Added platform support for HTC Universal (ljp)
24 * Made Opie-Bluetooth subsystem actually usable (korovkin) 24 * Made Opie-Bluetooth subsystem actually usable (korovkin)
25 * Added platform support for the Motorola EZX platform (mickeyl) 25 * Added platform support for the Motorola EZX platform (mickeyl)
26 26
27 Fixed Bugs 27 Fixed Bugs
28 ---------- 28 ----------
29 * #1695 - Date selector use too small fontsize on VGA screen (hrw) 29 * #1695 - Date selector use too small fontsize on VGA screen (hrw)
30 * #1686 - opie-console lack UI setting for switching scrollbar (hrw) 30 * #1686 - opie-console lack UI setting for switching scrollbar (hrw)
31 * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) 31 * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw)
32 * #1624 - Button settngs changes are applied only after restart (hrw) 32 * #1624 - Button settngs changes are applied only after restart (hrw)
33 * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) 33 * #1492 - Backup and Restore does not show list of backups to restore on start (hrw)
34 * n.a. - remove hardcoded font size from wellenreiter (hrw) 34 * n.a. - remove hardcoded font size from wellenreiter (hrw)
35 * n.a. - added patch to build Qt/E 2.3.10 with gcc 4.x.x (hrw) 35 * n.a. - added patch to build Qt/E 2.3.10 with gcc 4.x.x (hrw)
36 * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) 36 * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw)
37 * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) 37 * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar)
38 * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) 38 * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar)
39 * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw) 39 * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw)
40 * n.a. - Update version in About applet (hrw) 40 * n.a. - Update version in About applet (hrw)
41 * n.a. - add firstusage and background pictures for 480x640 devices (mickeyl) 41 * n.a. - add firstusage and background pictures for 480x640 devices (mickeyl)
42 * n.a. - many bluetooth fixes (korovkin) 42 * n.a. - many bluetooth fixes (korovkin)
43 43
44 Internal 44 Internal
45 -------- 45 --------
46 * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw) 46 * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw)
47 * libopiecore: SL6000 (tosa) now uses corgi-bl (Dirk Opfer) 47 * libopiecore: SL6000 (tosa) now uses corgi-bl (Dirk Opfer)
48 * library/version.h: introduce integer version code in OPIE_VERSION for conditional compilation 48 * library/version.h: introduce integer version code in OPIE_VERSION for conditional compilation
49 * g++ 4.1.1 fixes all around (no extra qualifiers allowed) (mickeyl) 49 * g++ 4.1.1 fixes all around (no extra qualifiers allowed) (mickeyl)
50 * update README (mickeyl) 50 * update README (mickeyl)
51 * remove libslcompat - it never worked and we don't support Sharp closed source anymore anyway (mickeyl) 51 * remove libslcompat - it never worked and we don't support Sharp closed source anymore anyway (mickeyl)
52 52
53 2005-09-11Opie 1.2.1 53 2005-09-11Opie 1.2.1
54 54
55 55
56 New Features 56 New Features
57 ------------ 57 ------------
58 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) 58 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
59 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) 59 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
60 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) 60 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
61 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) 61 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
62 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) 62 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl)
63 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) 63 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl)
64 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) 64 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw)
65 * ZSafe: Made UI conform to Opie standards (drw) 65 * ZSafe: Made UI conform to Opie standards (drw)
66 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) 66 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw)
67 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) 67 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl)
68 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) 68 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl)
69 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) 69 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl)
70 * Opie-smb: Added Opie front end for Samba (ljp) 70 * Opie-smb: Added Opie front end for Samba (ljp)
71 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) 71 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie)
72 * Opieplayer: rudimentary podcast support (ljp) 72 * Opieplayer: rudimentary podcast support (ljp)
73 73
74 Fixed Bugs 74 Fixed Bugs
75 ---------- 75 ----------
76 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) 76 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl)
77 - We actually suspend the complete Opie now in that case. 77 - We actually suspend the complete Opie now in that case.
78 * #1384 - Battery status updated improperly when charging (skyhusker) 78 * #1384 - Battery status updated improperly when charging (skyhusker)
79 * #1476 - Wrong order of application entries in the O-menu (skyhusker) 79 * #1476 - Wrong order of application entries in the O-menu (skyhusker)
80 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) 80 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl)
81 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) 81 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
82 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) 82 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw)
83 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) 83 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker)
84 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) 84 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker)
85 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) 85 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
86 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) 86 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
87 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) 87 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker)
88 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) 88 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker)
89 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) 89 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker)
90 * #1667 - Opie-IRC does not show messages from !channel (skyhusker) 90 * #1667 - Opie-IRC does not show messages from !channel (skyhusker)
91 * #1679 - Security PIN plugin is QVGA sized (hrw) 91 * #1679 - Security PIN plugin is QVGA sized (hrw)
92 * #1682 - Properly resize tab control in OTabWidget (drw) 92 * #1682 - Properly resize tab control in OTabWidget (drw)
93 * n.a. - always show volume and wireless applet popups inside visible screen (deller) 93 * n.a. - always show volume and wireless applet popups inside visible screen (deller)
94 * n.a. - scale O-Menu-Applets appropriately (mickeyl) 94 * n.a. - scale O-Menu-Applets appropriately (mickeyl)
95 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) 95 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker)
96 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) 96 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl)
97 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) 97 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl)
98 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) 98 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham)
99 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) 99 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl)
100 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) 100 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw)
101 * n.a. - remove hardcoded font size from netsystemtime (hrw) 101 * n.a. - remove hardcoded font size from netsystemtime (hrw)
102 * n.a. - remove hardcoded font size from checkbook graphs (hrw) 102 * n.a. - remove hardcoded font size from checkbook graphs (hrw)
103 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) 103 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw)
104 104
105 105
106 Internal 106 Internal
107 -------- 107 --------
108 * Make BluezApplet use OTaskbarApplet (mickeyl) 108 * Make BluezApplet use OTaskbarApplet (mickeyl)
109 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) 109 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl)
110 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) 110 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl)
111 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 111 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
112 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) 112 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl)
113 * libopienet: Miscellaneous API cleanups (mickeyl) 113 * libopienet: Miscellaneous API cleanups (mickeyl)
114 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) 114 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl)
115 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) 115 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl)
116 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) 116 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl)
117 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) 117 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl)
118 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) 118 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl)
119 * Fix / Optimize number of scanned directories (ljp) 119 * Fix / Optimize number of scanned directories (ljp)
120 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) 120 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl)
121 121
122 2005-03-25Opie 1.2.0 122 2005-03-25Opie 1.2.0
123 123
124 Fixed Bugs 124 Fixed Bugs
125 ---------- 125 ----------
126 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) 126 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw)
127 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) 127 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin)
128 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) 128 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke)
129 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) 129 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw)
130 * n.a.- make qpeglobal.h include qglobal.h (zecke) 130 * n.a.- make qpeglobal.h include qglobal.h (zecke)
131 131
132 2005-03-20Opie 1.2.0-rc1 132 2005-03-20Opie 1.2.0-rc1
133 133
134 134
135 New Features 135 New Features
136 ------------ 136 ------------
137 * Launcher: Support a static background pixmap (mickeyl) 137 * Launcher: Support a static background pixmap (mickeyl)
138 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) 138 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
139 * PackageManager supports the 'lists_dir' ipkg configuration option (drw) 139 * PackageManager supports the 'lists_dir' ipkg configuration option (drw)
140 * Added hi-res inline images for large resolution devices (drw) 140 * Added hi-res inline images for large resolution devices (drw)
141 * Improved launcher icons for consistency (ar) 141 * Improved launcher icons for consistency (ar)
142 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) 142 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin)
143 143
144 Fixed Bugs 144 Fixed Bugs
145 ---------- 145 ----------
146 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 146 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
147 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) 147 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw)
148 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) 148 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp)
149 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 149 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
150 * #1482 - Fix double '/' in paths (zecke) 150 * #1482 - Fix double '/' in paths (zecke)
151 * #1536 - Autosave of custom locations in opie backup (ar) 151 * #1536 - Autosave of custom locations in opie backup (ar)
152 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 152 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
153 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 153 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
154 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) 154 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw)
155 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) 155 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke)
156 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 156 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
157 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 157 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
158 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 158 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
159 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) 159 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning)
160 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) 160 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
161 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) 161 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers)
162 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) 162 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints)
163 * #1604 - Checkbook crashed on startup (drw) 163 * #1604 - Checkbook crashed on startup (drw)
164 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) 164 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers)
165 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) 165 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers)
166 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) 166 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw)
167 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 167 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
168 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) 168 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw)
169 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) 169 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw)
170 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) 170 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw)
171 * n.a. - AddressBook - fixed sorting by 'File As' name (drw) 171 * n.a. - AddressBook - fixed sorting by 'File As' name (drw)
172 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) 172 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers)
173 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) 173 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw)
174 174
175 Internal 175 Internal
176 -------- 176 --------
177 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 177 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
178 * Killed the need for weak symbols in QtE (zecke) 178 * Killed the need for weak symbols in QtE (zecke)
179 * Added optional building libqpe without inline images (mickeyl) 179 * Added optional building libqpe without inline images (mickeyl)
180 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) 180 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw)
181 181
182 2005-02-03Opie 1.1.9 182 2005-02-03Opie 1.1.9
183 183
184 New Features 184 New Features
185 ------------ 185 ------------
186 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 186 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
187 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) 187 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
188 * Usability enhancements in OpieIRC (skyhusker) 188 * Usability enhancements in OpieIRC (skyhusker)
189 189
190 Fixed Bugs 190 Fixed Bugs
191 ---------- 191 ----------
192 * #1501 - Fixed bug in todo sql backend (eilers) 192 * #1501 - Fixed bug in todo sql backend (eilers)
193 * #1505 - Added more Swap sizes in memoryapplet (mickeyl) 193 * #1505 - Added more Swap sizes in memoryapplet (mickeyl)
194 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) 194 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke)
195 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) 195 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke)
196 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) 196 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
197 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) 197 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl)
198 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) 198 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker)
199 199
200 Internal 200 Internal
201 -------- 201 --------
202 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) 202 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
203 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) 203 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl)
204 * Made Opie compilable with Qt/Embedded 2.3.10 (ar) 204 * Made Opie compilable with Qt/Embedded 2.3.10 (ar)
205 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) 205 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl)
206 * Build tree cleanups (mickeyl) 206 * Build tree cleanups (mickeyl)
207 207
208 2004-11-26Opie 1.1.8 208 2004-11-26Opie 1.1.8
209 209
210 New Features 210 New Features
211 ------------ 211 ------------
212 * PackageManager supports installation of local ipkg files (drw) 212 * PackageManager supports installation of local ipkg files (drw)
213 * PackageManager supports linking of applications to root (drw) 213 * PackageManager supports linking of applications to root (drw)
214 * PackageManager supports src/gz feeds (drw,wimpie) 214 * PackageManager supports src/gz feeds (drw,wimpie)
215 * Added a syslog information tab to sysinfo (mickeyl) 215 * Added a syslog information tab to sysinfo (mickeyl)
216 * Added new, more consistent, PIM icons + a GIMP teplate (ar) 216 * Added new, more consistent, PIM icons + a GIMP teplate (ar)
217 217
218 Fixed Bugs 218 Fixed Bugs
219 ---------- 219 ----------
220 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) 220 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
221 * #1269 - VCards were imported into personal area if it was activated (eilers) 221 * #1269 - VCards were imported into personal area if it was activated (eilers)
222 * #1464 - Packagemanager dont set active filter after install a package (drw) 222 * #1464 - Packagemanager dont set active filter after install a package (drw)
223 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) 223 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
224 * #1493 - Fixed one column layout bug of the launcher (hrw) 224 * #1493 - Fixed one column layout bug of the launcher (hrw)
225 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) 225 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
226 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) 226 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
227 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) 227 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl)
228 228
229 Internal 229 Internal
230 -------- 230 --------
231 * Moved libopie1 to unsupported (mickeyl) 231 * Moved libopie1 to unsupported (mickeyl)
232 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) 232 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers)
233 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) 233 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers)
234 234
235 2004-11-14Opie 1.1.7 235 2004-11-14Opie 1.1.7
236 236
237 New Features 237 New Features
238 ------------ 238 ------------
239 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) 239 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers)
240 * Backup now uses the busy indicator when backing up and restore (ar) 240 * Backup now uses the busy indicator when backing up and restore (ar)
241 * OpiePlayer2 gained adding of Directories to the playlist (zecke) 241 * OpiePlayer2 gained adding of Directories to the playlist (zecke)
242 * OpiePlayer2 better error handling (zecke) 242 * OpiePlayer2 better error handling (zecke)
243 * OpiePlayer2 progress indication while streaming (zecke) 243 * OpiePlayer2 progress indication while streaming (zecke)
244 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) 244 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke)
245 * Ported brightnessapplet from Qtopia 1.7 (mickeyl) 245 * Ported brightnessapplet from Qtopia 1.7 (mickeyl)
246 * Opie-Eye got a Digital Camera File Backend (alwin,zecke) 246 * Opie-Eye got a Digital Camera File Backend (alwin,zecke)
247 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) 247 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke)
248 * Opie-Console use Custom Font and Size in a Profile (harlekin) 248 * Opie-Console use Custom Font and Size in a Profile (harlekin)
249 * Opie-Console transparently log the Output and Input to a file (harlekin) 249 * Opie-Console transparently log the Output and Input to a file (harlekin)
250 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) 250 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem)
251 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) 251 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem)
252 * Opie-Security gained a 'test authentication' button (clem) 252 * Opie-Security gained a 'test authentication' button (clem)
253 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults 253 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults
254 * Opie-Mail improve the handling of POP mail boxes (alwin) 254 * Opie-Mail improve the handling of POP mail boxes (alwin)
255 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) 255 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin)
256 * Opie IRC - backports of the 'NeIRC fork' (zecke) 256 * Opie IRC - backports of the 'NeIRC fork' (zecke)
257 257
258 Fixed Bugs 258 Fixed Bugs
259 ---------- 259 ----------
260 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) 260 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke)
261 * #608 - Make Opie usable for left handed users (zecke) 261 * #608 - Make Opie usable for left handed users (zecke)
262 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) 262 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke)
263 * #1245 - Opie-Go 'paused' (zecke) 263 * #1245 - Opie-Go 'paused' (zecke)
264 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) 264 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke)
265 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) 265 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke)
266 * #1395 - Build VNC Backend with gcc3.4 266 * #1395 - Build VNC Backend with gcc3.4
267 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) 267 * #1440 - The icon of opie-mobilemsg is missing (CoreDump)
268 * #1426 - Add missing opie-bartender Icon (CoreDump) 268 * #1426 - Add missing opie-bartender Icon (CoreDump)
269 * #1445 - Opie-Sheet Has No Icon (CoreDump) 269 * #1445 - Opie-Sheet Has No Icon (CoreDump)
270 * #1448 - Brightness Applet added (mickeyl) 270 * #1448 - Brightness Applet added (mickeyl)
271 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) 271 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke)
272 * #1482 - Fix OFileSelector to be able to sort by size (zecke) 272 * #1482 - Fix OFileSelector to be able to sort by size (zecke)
273 * n.a. - Opie-mail: fixed some crasher, some layout-problems 273 * n.a. - Opie-mail: fixed some crasher, some layout-problems
274 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) 274 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke)
275 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) 275 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke)
276 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) 276 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem)
277 * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) 277 * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem)
278 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) 278 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl)
279 279
280 Internal 280 Internal
281 -------- 281 --------
282 * Opie-Qashmoney has been moved to unsupported (mickeyl) 282 * Opie-Qashmoney has been moved to unsupported (mickeyl)
283 * Opie-Ubrowser has been moved to unsupported (mickeyl) 283 * Opie-Ubrowser has been moved to unsupported (mickeyl)
284 284
285 2004-09-17Opie 1.1.6 285 2004-09-17Opie 1.1.6
286 286
287 New Features 287 New Features
288 ------------ 288 ------------
289 * Fifteen gained configurable number of items (zecke) 289 * Fifteen gained configurable number of items (zecke)
290 * Fifteen can have custom background images (zecke) 290 * Fifteen can have custom background images (zecke)
291 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) 291 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl)
292 * Integrated the new security framework into libopie2 (zecke,clem) 292 * Integrated the new security framework into libopie2 (zecke,clem)
293 * Converted the launcher to use the new security framework (zecke) 293 * Converted the launcher to use the new security framework (zecke)
294 * Backup can now handle custom locations for backup and restore (ar) 294 * Backup can now handle custom locations for backup and restore (ar)
295 * Implemented right-on-hold feedback (wimpie,zecke) 295 * Implemented right-on-hold feedback (wimpie,zecke)
296 * Lots of new features in opie-reader (tim,pohly) 296 * Lots of new features in opie-reader (tim,pohly)
297 * Build system cleanups (schurig) 297 * Build system cleanups (schurig)
298 298
299 Fixed Bugs 299 Fixed Bugs
300 -------- 300 --------
301 * #1005 - Fixed backup to CompactFlash (ar) 301 * #1005 - Fixed backup to CompactFlash (ar)
302 * #1167 - Fixed Opie write crashing on more text than one page (ar) 302 * #1167 - Fixed Opie write crashing on more text than one page (ar)
303 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) 303 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl)
304 * #1359 - Fixed bookmarks in Gutenbrowser (ljp) 304 * #1359 - Fixed bookmarks in Gutenbrowser (ljp)
305 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) 305 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers)
306 * #1370 - Pimconverter now reacts on cancel key (eilers) 306 * #1370 - Pimconverter now reacts on cancel key (eilers)
307 * #1376 - Bring back the capslock/numlock display (zecke) 307 * #1376 - Bring back the capslock/numlock display (zecke)
308 * #1383 - Language settings now warns about losing open apps (Markus Litz) 308 * #1383 - Language settings now warns about losing open apps (Markus Litz)
309 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) 309 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl)
310 * #1394 - Fixed oversized headline in opie-login (coredump) 310 * #1394 - Fixed oversized headline in opie-login (coredump)
311 * #1396 - Opie-console captures the escape key and vim is working (zecke) 311 * #1396 - Opie-console captures the escape key and vim is working (zecke)
312 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) 312 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl)
313 313
314 2004-07-06Opie 1.1.4 314 2004-07-06Opie 1.1.4
315 315
316 New Features 316 New Features
317 ------------ 317 ------------
318 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) 318 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle)
319 * Added Conversion tool for pim-data (eilers) 319 * Added Conversion tool for pim-data (eilers)
320 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) 320 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers)
321 * Modified the PIM API for providing generic use of OPimRecords (eilers) 321 * Modified the PIM API for providing generic use of OPimRecords (eilers)
322 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) 322 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke)
323 323
324 Fixed Bugs 324 Fixed Bugs
325 -------- 325 --------
326 * #1068 - Country Drop Down Box Off Screen 326 * #1068 - Country Drop Down Box Off Screen
327 * #1291 - Opie tinykate does not open .desktop files (ar) 327 * #1291 - Opie tinykate does not open .desktop files (ar)
328 * #1291 - Opie sheet not saving correctly (ar) 328 * #1291 - Opie sheet not saving correctly (ar)
329 * #1294 - Opie does not know about British Summer Time 329 * #1294 - Opie does not know about British Summer Time
330 * #1314 - Drawpad initialization (mickeyl) 330 * #1314 - Drawpad initialization (mickeyl)
331 * #1317 - Packagemanager crashes on hold-down or install (chicken) 331 * #1317 - Packagemanager crashes on hold-down or install (chicken)
332 * #1321 - Batteryapplet graphic glitch (harlekin) 332 * #1321 - Batteryapplet graphic glitch (harlekin)
333 * #1324 - ZSafe not starting up (mickeyl) 333 * #1324 - ZSafe not starting up (mickeyl)
334 * #1328 - Personal Home Address fields is trimmed to 1char (eilers) 334 * #1328 - Personal Home Address fields is trimmed to 1char (eilers)
335 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) 335 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken)
336 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) 336 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl)
337 * #1348 - Datebook dependency on libopiedb2 (chicken) 337 * #1348 - Datebook dependency on libopiedb2 (chicken)
338 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) 338 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers)
339 339
340 2004-04-25Opie 1.1.3 340 2004-04-25Opie 1.1.3
341 341
342 * Introduced first implementation of SQL-Support using SQLite (eilers) 342 * Introduced first implementation of SQL-Support using SQLite (eilers)
343 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) 343 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp)
344 * Added a real system graffiti character set (brad) 344 * Added a real system graffiti character set (brad)
345 * Added Generic Keyconfig Widget (zecke) 345 * Added Generic Keyconfig Widget (zecke)
346 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) 346 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke)
347 * Added new Bible reader app - opie-dagger (drw) 347 * Added new Bible reader app - opie-dagger (drw)
348 * Added a new Image Viewer. Work is ongoing (zecke,alwin) 348 * Added a new Image Viewer. Work is ongoing (zecke,alwin)
349 * Added namespace usage in libopie2 and everywhere (zecke,alwin) 349 * Added namespace usage in libopie2 and everywhere (zecke,alwin)
350 * Enabled the possibility to pass command line arguments to applications (mickeyl) 350 * Enabled the possibility to pass command line arguments to applications (mickeyl)
351 * Added an about applet showing some credits and information about Opie (mickeyl) 351 * Added an about applet showing some credits and information about Opie (mickeyl)
352 * Added benchmarking functionality to sysinfo (mickeyl) 352 * Added benchmarking functionality to sysinfo (mickeyl)
353 * Added applet and configuration application for switching hardware keyboard layouts (alwin) 353 * Added applet and configuration application for switching hardware keyboard layouts (alwin)
354 * Ported applications from libopie1 to libopie2* (drw,ar,alwin) 354 * Ported applications from libopie1 to libopie2* (drw,ar,alwin)
355 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) 355 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe)
356 * Clean-up of package information in control files (drw) 356 * Clean-up of package information in control files (drw)
357 * Repaired mediummount which was broken since integrating the quicklauncher (alwin) 357 * Repaired mediummount which was broken since integrating the quicklauncher (alwin)
358 * Improved big-screen support (zecke,ar) 358 * Improved big-screen support (zecke,ar)
359 * Improved multikeyboard support, added keyboard layout switching applet (mouse) 359 * Improved multikeyboard support, added keyboard layout switching applet (mouse)
360 * Added a new mail client based on libetpan (harlekin,alwin,jgf) 360 * Added a new mail client based on libetpan (harlekin,alwin,jgf)
361 * Added new package manager - opie-packagemanager (drw) 361 * Added new package manager - opie-packagemanager (drw)
362 * Improved light-n-power for C7x0 (mickeyl) 362 * Improved light-n-power for C7x0 (mickeyl)
363 * Added automatic rotation support for C7x0 (treke) 363 * Added automatic rotation support for C7x0 (treke)
364 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) 364 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl)
365 * Added scanning the wireless network neighbourhood to networksettings (mickeyl) 365 * Added scanning the wireless network neighbourhood to networksettings (mickeyl)
366 366
367 2003-11-29Opie 1.0.3 367 2003-11-29Opie 1.0.3
368 368
369 * Released as Version 1.0.3 369 * Released as Version 1.0.3
370 * Improved i18n (various contributors) 370 * Improved i18n (various contributors)
371 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) 371 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin)
372 * Made the Documents Tab optional (mickeyl) 372 * Made the Documents Tab optional (mickeyl)
373 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) 373 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken)
374 374
375 2003-08-04Opie 1.0.0 375 2003-08-04Opie 1.0.0
376 376
377 * Released as Version 1.0.0 377 * Released as Version 1.0.0
378 * Including a PPP module for easy dial up (tille,harlekin,zecke) 378 * Including a PPP module for easy dial up (tille,harlekin,zecke)
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index c2fa411..a8362cd 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -1,408 +1,409 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              (C) 2002-2006 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; 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
47class Sound; 47class Sound;
48 48
49namespace Opie{ 49namespace Opie{
50namespace Core{ 50namespace Core{
51 51
52class ODeviceData; 52class ODeviceData;
53/** 53/**
54 * The available devices 54 * The available devices
55 */ 55 */
56enum OModel { 56enum 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_Jornada = ( 6 << 16 ), 75 Model_Jornada = ( 6 << 16 ),
75 Model_Jornada_56x = ( Model_Jornada | 0x0001 ), 76 Model_Jornada_56x = ( Model_Jornada | 0x0001 ),
76 Model_Jornada_720 = ( Model_Jornada | 0x0002 ), 77 Model_Jornada_720 = ( Model_Jornada | 0x0002 ),
77 Model_Jornada_820 = ( Model_Jornada | 0x0003 ), 78 Model_Jornada_820 = ( Model_Jornada | 0x0003 ),
78 79
79 Model_Zaurus = ( 2 << 16 ), 80 Model_Zaurus = ( 2 << 16 ),
80 81
81 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), 82 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ),
82 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), 83 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ),
83 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), 84 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ),
84 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), 85 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ),
85 Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), 86 Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ),
86 Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), 87 Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ),
87 Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), 88 Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ),
88 Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), 89 Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ),
89 Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), 90 Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ),
90 91
91 Model_SIMpad = ( 3 << 16 ), 92 Model_SIMpad = ( 3 << 16 ),
92 93
93 Model_SIMpad_All = ( Model_SIMpad | 0xffff ), 94 Model_SIMpad_All = ( Model_SIMpad | 0xffff ),
94 Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), 95 Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ),
95 Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), 96 Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ),
96 Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), 97 Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ),
97 Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), 98 Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ),
98 99
99 Model_Ramses = ( 4 << 16 ), 100 Model_Ramses = ( 4 << 16 ),
100 101
101 Model_Ramses_All = ( Model_Ramses | 0xffff ), 102 Model_Ramses_All = ( Model_Ramses | 0xffff ),
102 Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), 103 Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ),
103 Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), 104 Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ),
104 105
105 Model_Yopy = ( 5 << 16 ), 106 Model_Yopy = ( 5 << 16 ),
106 107
107 Model_Yopy_All = ( Model_Yopy | 0xffff ), 108 Model_Yopy_All = ( Model_Yopy | 0xffff ),
108 Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), 109 Model_Yopy_3000 = ( Model_Yopy | 0x0001 ),
109 Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), 110 Model_Yopy_3500 = ( Model_Yopy | 0x0002 ),
110 Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), 111 Model_Yopy_3700 = ( Model_Yopy | 0x0003 ),
111 112
112 Model_Beagle = ( 6 << 16 ), 113 Model_Beagle = ( 6 << 16 ),
113 114
114 Model_Beagle_All = ( Model_Beagle | 0xffff ), 115 Model_Beagle_All = ( Model_Beagle | 0xffff ),
115 Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), 116 Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ),
116 117
117 Model_GenuineIntel = ( 7 << 16 ), 118 Model_GenuineIntel = ( 7 << 16 ),
118 119
119 Model_MyPal = ( 8 << 16 ), 120 Model_MyPal = ( 8 << 16 ),
120 121
121 Model_MyPal_All = ( Model_MyPal | 0xffff ), 122 Model_MyPal_All = ( Model_MyPal | 0xffff ),
122 Model_MyPal_620 = ( Model_MyPal | 0x0001 ), 123 Model_MyPal_620 = ( Model_MyPal | 0x0001 ),
123 Model_MyPal_716 = ( Model_MyPal | 0x0002 ), 124 Model_MyPal_716 = ( Model_MyPal | 0x0002 ),
124 Model_MyPal_730 = ( Model_MyPal | 0x0003 ), 125 Model_MyPal_730 = ( Model_MyPal | 0x0003 ),
125 126
126 Model_HTC = ( 9 << 16 ), 127 Model_HTC = ( 9 << 16 ),
127 Model_HTC_All = ( Model_HTC | 0xffff ), 128 Model_HTC_All = ( Model_HTC | 0xffff ),
128 Model_HTC_Universal = ( Model_HTC | 0x0001 ), 129 Model_HTC_Universal = ( Model_HTC | 0x0001 ),
129 Model_HTC_Alpine = ( Model_HTC | 0x0002 ), 130 Model_HTC_Alpine = ( Model_HTC | 0x0002 ),
130 Model_HTC_Apache = ( Model_HTC | 0x0003 ), 131 Model_HTC_Apache = ( Model_HTC | 0x0003 ),
131 Model_HTC_Beetles = ( Model_HTC | 0x0004 ), 132 Model_HTC_Beetles = ( Model_HTC | 0x0004 ),
132 Model_HTC_Blueangel = ( Model_HTC | 0x0005 ), 133 Model_HTC_Blueangel = ( Model_HTC | 0x0005 ),
133 Model_HTC_Himalaya = ( Model_HTC | 0x0006 ), 134 Model_HTC_Himalaya = ( Model_HTC | 0x0006 ),
134 Model_HTC_Magician = ( Model_HTC | 0x0007 ), 135 Model_HTC_Magician = ( Model_HTC | 0x0007 ),
135 136
136 Model_Motorola = ( 9 << 17 ), 137 Model_Motorola = ( 9 << 17 ),
137 Model_Motorola_All = ( Model_Motorola | 0xffff ), 138 Model_Motorola_All = ( Model_Motorola | 0xffff ),
138 Model_Motorola_EZX = ( Model_Motorola | 0x0001 ), 139 Model_Motorola_EZX = ( Model_Motorola | 0x0001 ),
139 140
140}; 141};
141 142
142/** 143/**
143 * The vendor of the device 144 * The vendor of the device
144 */ 145 */
145enum OVendor { 146enum OVendor {
146 Vendor_Unknown, 147 Vendor_Unknown,
147 148
148 Vendor_HP, 149 Vendor_HP,
149 Vendor_Sharp, 150 Vendor_Sharp,
150 Vendor_SIEMENS, 151 Vendor_SIEMENS,
151 Vendor_MundN, 152 Vendor_MundN,
152 Vendor_GMate, 153 Vendor_GMate,
153 Vendor_MasterIA, 154 Vendor_MasterIA,
154 Vendor_GenuineIntel, 155 Vendor_GenuineIntel,
155 Vendor_Asus, 156 Vendor_Asus,
156 Vendor_HTC, 157 Vendor_HTC,
157 Vendor_Motorola, 158 Vendor_Motorola,
158}; 159};
159 160
160/** 161/**
161 * The System used 162 * The System used
162 */ 163 */
163enum OSystem { 164enum OSystem {
164 System_Unknown, 165 System_Unknown,
165 166
166 System_Familiar, 167 System_Familiar,
167 System_Zaurus, 168 System_Zaurus,
168 System_OpenZaurus, 169 System_OpenZaurus,
169 System_Linupy, 170 System_Linupy,
170 System_OpenEmbedded, 171 System_OpenEmbedded,
171 System_PC, 172 System_PC,
172 System_OpenEZX, 173 System_OpenEZX,
173 System_Angstrom, 174 System_Angstrom,
174}; 175};
175 176
176typedef struct { 177typedef struct {
177 OSystem system; 178 OSystem system;
178 char* sysstr; 179 char* sysstr;
179 char* sysvfile; 180 char* sysvfile;
180} ODistribution; 181} ODistribution;
181 182
182extern ODistribution distributions[]; 183extern ODistribution distributions[];
183 184
184 185
185enum OLedState { 186enum OLedState {
186 Led_Off, 187 Led_Off,
187 Led_On, 188 Led_On,
188 Led_BlinkSlow, 189 Led_BlinkSlow,
189 Led_BlinkFast 190 Led_BlinkFast
190}; 191};
191 192
192enum OLed { 193enum OLed {
193 Led_Mail, 194 Led_Mail,
194 Led_Power, 195 Led_Power,
195 Led_BlueTooth 196 Led_BlueTooth
196}; 197};
197 198
198enum OHardKey { 199enum OHardKey {
199 HardKey_Datebook = Qt::Key_F9, 200 HardKey_Datebook = Qt::Key_F9,
200 HardKey_Contacts = Qt::Key_F10, 201 HardKey_Contacts = Qt::Key_F10,
201 HardKey_Menu = Qt::Key_F11, 202 HardKey_Menu = Qt::Key_F11,
202 HardKey_Home = Qt::Key_F12, 203 HardKey_Home = Qt::Key_F12,
203 HardKey_Mail = Qt::Key_F13, 204 HardKey_Mail = Qt::Key_F13,
204 HardKey_Record = Qt::Key_F24, 205 HardKey_Record = Qt::Key_F24,
205 HardKey_Suspend = Qt::Key_F34, 206 HardKey_Suspend = Qt::Key_F34,
206 HardKey_Backlight = Qt::Key_F35, 207 HardKey_Backlight = Qt::Key_F35,
207 HardKey_Action = Qt::Key_F10, 208 HardKey_Action = Qt::Key_F10,
208 HardKey_OK = Qt::Key_F11, 209 HardKey_OK = Qt::Key_F11,
209 HardKey_End = Qt::Key_F12, 210 HardKey_End = Qt::Key_F12,
210}; 211};
211 212
212enum ODirection { 213enum ODirection {
213 CW = 0, 214 CW = 0,
214 CCW = 1, 215 CCW = 1,
215 Flip = 2, 216 Flip = 2,
216}; 217};
217 218
218enum OHingeStatus { 219enum OHingeStatus {
219 CASE_CLOSED = 3, 220 CASE_CLOSED = 3,
220 CASE_PORTRAIT = 2, 221 CASE_PORTRAIT = 2,
221 CASE_LANDSCAPE = 0, 222 CASE_LANDSCAPE = 0,
222 CASE_UNKNOWN = 1, 223 CASE_UNKNOWN = 1,
223}; 224};
224 225
225/* default button for qvfb or such 226/* default button for qvfb or such
226 * see odevice.cpp for details. 227 * see odevice.cpp for details.
227 * hint: manage a user defined button for qvfb? 228 * hint: manage a user defined button for qvfb?
228 * alwin 229 * alwin
229 */ 230 */
230struct default_button { 231struct default_button {
231 Qt::Key code; 232 Qt::Key code;
232 char *utext; 233 char *utext;
233 char *pix; 234 char *pix;
234 char *fpressedservice; 235 char *fpressedservice;
235 char *fpressedaction; 236 char *fpressedaction;
236 char *fheldservice; 237 char *fheldservice;
237 char *fheldaction; 238 char *fheldaction;
238}; 239};
239 240
240/** 241/**
241 * A singleton which gives informations about device specefic option 242 * A singleton which gives informations about device specefic option
242 * like the Hardware used, LEDs, the Base Distribution and 243 * like the Hardware used, LEDs, the Base Distribution and
243 * hardware key mappings. 244 * hardware key mappings.
244 * 245 *
245 * @short A small class for device specific options 246 * @short A small class for device specific options
246 * @see QObject 247 * @see QObject
247 * @author Robert Griebl 248 * @author Robert Griebl
248 * @version 1.0 249 * @version 1.0
249 */ 250 */
250class ODevice : public QObject 251class ODevice : public QObject
251{ 252{
252 Q_OBJECT 253 Q_OBJECT
253 254
254private: 255private:
255 /* disable copy */ 256 /* disable copy */
256 ODevice ( const ODevice & ); 257 ODevice ( const ODevice & );
257 258
258protected: 259protected:
259 ODevice(); 260 ODevice();
260 virtual void init(const QString&); 261 virtual void init(const QString&);
261 virtual void initButtons(); 262 virtual void initButtons();
262 static void sendSuspendmsg(); 263 static void sendSuspendmsg();
263 264
264 ODeviceData *d; 265 ODeviceData *d;
265 266
266public: 267public:
267 // sandman do we want to allow destructions? -zecke? 268 // sandman do we want to allow destructions? -zecke?
268 virtual ~ODevice(); 269 virtual ~ODevice();
269 static ODevice *inst(); 270 static ODevice *inst();
270 271
271 // information 272 // information
272 QString modelString() const; 273 QString modelString() const;
273 OModel model() const; 274 OModel model() const;
274 inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } 275 inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); }
275 276
276 QString vendorString() const; 277 QString vendorString() const;
277 OVendor vendor() const; 278 OVendor vendor() const;
278 279
279 QString systemString() const; 280 QString systemString() const;
280 OSystem system() const; 281 OSystem system() const;
281 282
282 QString systemVersionString() const; 283 QString systemVersionString() const;
283 284
284 virtual Transformation rotation() const; 285 virtual Transformation rotation() const;
285 virtual ODirection direction() const; 286 virtual ODirection direction() const;
286 287
287 QString qteDriver() const; 288 QString qteDriver() const;
288 289
289 // system 290 // system
290 virtual bool suspend(); 291 virtual bool suspend();
291 292
292 virtual bool setDisplayStatus ( bool on ); 293 virtual bool setDisplayStatus ( bool on );
293 virtual bool setDisplayBrightness ( int brightness ); 294 virtual bool setDisplayBrightness ( int brightness );
294 virtual int displayBrightnessResolution() const; 295 virtual int displayBrightnessResolution() const;
295 virtual bool setDisplayContrast ( int contrast ); 296 virtual bool setDisplayContrast ( int contrast );
296 virtual int displayContrastResolution() const; 297 virtual int displayContrastResolution() const;
297 298
298 // don't add new virtual methods, use this: 299 // don't add new virtual methods, use this:
299 // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; 300 // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); };
300 // and in your subclass do overwrite 301 // and in your subclass do overwrite
301 // protected virtual int virtual_hook(int, void *) 302 // protected virtual int virtual_hook(int, void *)
302 // which is defined below 303 // which is defined below
303 304
304 // input / output 305 // input / output
305 virtual void playAlarmSound(); 306 virtual void playAlarmSound();
306 virtual void playKeySound(); 307 virtual void playKeySound();
307 virtual void playTouchSound(); 308 virtual void playTouchSound();
308 309
309 virtual QValueList <OLed> ledList() const; 310 virtual QValueList <OLed> ledList() const;
310 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 311 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
311 virtual OLedState ledState ( OLed led ) const; 312 virtual OLedState ledState ( OLed led ) const;
312 virtual bool setLedState ( OLed led, OLedState st ); 313 virtual bool setLedState ( OLed led, OLedState st );
313 314
314 virtual bool hasLightSensor() const; 315 virtual bool hasLightSensor() const;
315 virtual int readLightSensor(); 316 virtual int readLightSensor();
316 virtual int lightSensorResolution() const; 317 virtual int lightSensorResolution() const;
317 318
318 virtual bool hasHingeSensor() const; 319 virtual bool hasHingeSensor() const;
319 virtual OHingeStatus readHingeSensor()const; 320 virtual OHingeStatus readHingeSensor()const;
320 321
321 const QStrList &allowedCpuFrequencies() const; 322 const QStrList &allowedCpuFrequencies() const;
322 bool setCurrentCpuFrequency(uint index); 323 bool setCurrentCpuFrequency(uint index);
323 324
324 /** 325 /**
325 * Returns the available buttons on this device. The number and location 326 * Returns the available buttons on this device. The number and location
326 * of buttons will vary depending on the device. Button numbers will be assigned 327 * of buttons will vary depending on the device. Button numbers will be assigned
327 * by the device manufacturer and will be from most preferred button to least preffered 328 * by the device manufacturer and will be from most preferred button to least preffered
328 * button. Note that this list only contains "user mappable" buttons. 329 * button. Note that this list only contains "user mappable" buttons.
329 * 330 *
330 * @todo Make method const and take care of calling initButtons or make that const too 331 * @todo Make method const and take care of calling initButtons or make that const too
331 * 332 *
332 */ 333 */
333 const QValueList<ODeviceButton> &buttons(); 334 const QValueList<ODeviceButton> &buttons();
334 335
335 /** 336 /**
336 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it 337 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it
337 * returns 0L 338 * returns 0L
338 */ 339 */
339 const ODeviceButton *buttonForKeycode ( ushort keyCode ); 340 const ODeviceButton *buttonForKeycode ( ushort keyCode );
340 341
341 /** 342 /**
342 * Reassigns the pressed action for \a button. To return to the factory 343 * Reassigns the pressed action for \a button. To return to the factory
343 * default pass an empty string as \a qcopMessage. 344 * default pass an empty string as \a qcopMessage.
344 */ 345 */
345 void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); 346 void remapPressedAction ( int button, const OQCopMessage &qcopMessage );
346 347
347 /** 348 /**
348 * Reassigns the held action for \a button. To return to the factory 349 * Reassigns the held action for \a button. To return to the factory
349 * default pass an empty string as \a qcopMessage. 350 * default pass an empty string as \a qcopMessage.
350 */ 351 */
351 void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); 352 void remapHeldAction ( int button, const OQCopMessage &qcopMessage );
352 353
353 /** 354 /**
354 * How long (in ms) you have to press a button for a "hold" action 355 * How long (in ms) you have to press a button for a "hold" action
355 */ 356 */
356 uint buttonHoldTime() const; 357 uint buttonHoldTime() const;
357 358
358signals: 359signals:
359 void buttonMappingChanged(); 360 void buttonMappingChanged();
360 361
361private slots: 362private slots:
362 void systemMessage ( const QCString &, const QByteArray & ); 363 void systemMessage ( const QCString &, const QByteArray & );
363 void playingStopped(); 364 void playingStopped();
364 365
365protected: 366protected:
366 void addPreHandler(QWSServer::KeyboardFilter*aFilter); 367 void addPreHandler(QWSServer::KeyboardFilter*aFilter);
367 void remPreHandler(QWSServer::KeyboardFilter*aFilter); 368 void remPreHandler(QWSServer::KeyboardFilter*aFilter);
368 void reloadButtonMapping(); 369 void reloadButtonMapping();
369 void changeMixerForAlarm( int mixer, const char* file, Sound *snd); 370 void changeMixerForAlarm( int mixer, const char* file, Sound *snd);
370 371
371 /* ugly virtual hook */ 372 /* ugly virtual hook */
372 virtual void virtual_hook( int id, void* data ); 373 virtual void virtual_hook( int id, void* data );
373}; 374};
374 375
375class ODeviceData { 376class ODeviceData {
376 377
377 public: 378 public:
378 QString m_vendorstr; 379 QString m_vendorstr;
379 OVendor m_vendor; 380 OVendor m_vendor;
380 381
381 QString m_modelstr; 382 QString m_modelstr;
382 OModel m_model; 383 OModel m_model;
383 384
384 QString m_systemstr; 385 QString m_systemstr;
385 OSystem m_system; 386 OSystem m_system;
386 387
387 QString m_sysverstr; 388 QString m_sysverstr;
388 389
389 Transformation m_rotation; 390 Transformation m_rotation;
390 ODirection m_direction; 391 ODirection m_direction;
391 392
392 QString m_qteDriver; 393 QString m_qteDriver;
393 394
394 QValueList <ODeviceButton> *m_buttons; 395 QValueList <ODeviceButton> *m_buttons;
395 uint m_holdtime; 396 uint m_holdtime;
396 QStrList *m_cpu_frequencies; 397 QStrList *m_cpu_frequencies;
397 bool m_initializedButtonQcop : 1; 398 bool m_initializedButtonQcop : 1;
398 399
399 /* values for changeMixerForAlarm */ 400 /* values for changeMixerForAlarm */
400 int m_sound, m_vol, m_mixer; 401 int m_sound, m_vol, m_mixer;
401}; 402};
402 403
403extern bool isQWS(); 404extern bool isQWS();
404extern QCString makeChannel ( const char *str ); 405extern QCString makeChannel ( const char *str );
405} 406}
406} 407}
407 408
408#endif 409#endif
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index 63b60a7..00939bf 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -1,518 +1,553 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> 3 =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
4 .=l. 4 .=l.
5           .>+-= 5           .>+-=
6 _;:,     .>    :=|. This program is free software; you can 6 _;:,     .>    :=|. This program is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 8:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; version 2 of the License. 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11     ._= =}       : 11     ._= =}       :
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This program is distributed in the hope that 13    .i_,=:_.      -<s. This program is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18..}^=.=       =       ; Library General Public License for more 18..}^=.=       =       ; Library General Public License for more
19++=   -.     .`     .: details. 19++=   -.     .`     .: details.
20 :     =  ...= . :.=- 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU 21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with 22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB. 23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation, 24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330, 25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
29 29
30#include "odevice_ipaq.h" 30#include "odevice_ipaq.h"
31 31
32/* QT */ 32/* QT */
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qdir.h> 34#include <qdir.h>
35#include <qfile.h> 35#include <qfile.h>
36#include <qtextstream.h> 36#include <qtextstream.h>
37#include <qwindowsystem_qws.h> 37#include <qwindowsystem_qws.h>
38 38
39/* OPIE */ 39/* OPIE */
40#include <qpe/config.h> 40#include <qpe/config.h>
41#include <qpe/sound.h> 41#include <qpe/sound.h>
42#include <qpe/qcopenvelope_qws.h> 42#include <qpe/qcopenvelope_qws.h>
43 43
44#include <opie2/okeyfilter.h> 44#include <opie2/okeyfilter.h>
45#include <opie2/oresource.h> 45#include <opie2/oresource.h>
46 46
47/* STD */ 47/* STD */
48#include <fcntl.h> 48#include <fcntl.h>
49#include <math.h> 49#include <math.h>
50#include <stdlib.h> 50#include <stdlib.h>
51#include <signal.h> 51#include <signal.h>
52#include <sys/ioctl.h> 52#include <sys/ioctl.h>
53#include <sys/time.h> 53#include <sys/time.h>
54#include <unistd.h> 54#include <unistd.h>
55#ifndef QT_NO_SOUND 55#ifndef QT_NO_SOUND
56#include <linux/soundcard.h> 56#include <linux/soundcard.h>
57#endif 57#endif
58 58
59 59
60using namespace Opie::Core; 60using namespace Opie::Core;
61using namespace Opie::Core::Internal; 61using namespace Opie::Core::Internal;
62 62
63/* KERNEL */ 63/* KERNEL */
64#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) 64#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 ))
65 65
66#define OD_IO(type,number) OD_IOC(0,type,number,0) 66#define OD_IO(type,number) OD_IOC(0,type,number,0)
67#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) 67#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size))
68#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) 68#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size))
69#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) 69#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
70 70
71typedef struct { 71typedef struct {
72 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */ 72 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */
73 unsigned char TotalTime; /* Units of 5 seconds */ 73 unsigned char TotalTime; /* Units of 5 seconds */
74 unsigned char OnTime; /* units of 100m/s */ 74 unsigned char OnTime; /* units of 100m/s */
75 unsigned char OffTime; /* units of 100m/s */ 75 unsigned char OffTime; /* units of 100m/s */
76} LED_IN; 76} LED_IN;
77 77
78typedef struct { 78typedef struct {
79 unsigned char mode; 79 unsigned char mode;
80 unsigned char pwr; 80 unsigned char pwr;
81 unsigned char brightness; 81 unsigned char brightness;
82} FLITE_IN; 82} FLITE_IN;
83 83
84#define LED_ON OD_IOW( 'f', 5, LED_IN ) 84#define LED_ON OD_IOW( 'f', 5, LED_IN )
85#define FLITE_ON OD_IOW( 'f', 7, FLITE_IN ) 85#define FLITE_ON OD_IOW( 'f', 7, FLITE_IN )
86 86
87struct i_button ipaq_buttons [] = { 87struct i_button ipaq_buttons [] = {
88 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, 88 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx,
89 Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), 89 Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"),
90 "devicebuttons/ipaq_calendar", 90 "devicebuttons/ipaq_calendar",
91 "datebook", "nextView()", 91 "datebook", "nextView()",
92 "today", "raise()" }, 92 "today", "raise()" },
93 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, 93 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx,
94 Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), 94 Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"),
95 "devicebuttons/ipaq_contact", 95 "devicebuttons/ipaq_contact",
96 "addressbook", "raise()", 96 "addressbook", "raise()",
97 "addressbook", "beamBusinessCard()" }, 97 "addressbook", "beamBusinessCard()" },
98 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, 98 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx,
99 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), 99 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
100 "devicebuttons/ipaq_menu", 100 "devicebuttons/ipaq_menu",
101 "QPE/TaskBar", "toggleMenu()", 101 "QPE/TaskBar", "toggleMenu()",
102 "QPE/TaskBar", "toggleStartMenu()" }, 102 "QPE/TaskBar", "toggleStartMenu()" },
103 { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, 103 { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx,
104 Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), 104 Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"),
105 "devicebuttons/ipaq_mail", 105 "devicebuttons/ipaq_mail",
106 "opiemail", "raise()", 106 "opiemail", "raise()",
107 "opiemail", "newMail()" }, 107 "opiemail", "newMail()" },
108 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, 108 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H4xxx,
109 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), 109 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"),
110 "devicebuttons/ipaq_home", 110 "devicebuttons/ipaq_home",
111 "QPE/Launcher", "home()", 111 "QPE/Launcher", "home()",
112 "buttonsettings", "raise()" }, 112 "buttonsettings", "raise()" },
113 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, 113 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx,
114 Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), 114 Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"),
115 "devicebuttons/ipaq_record", 115 "devicebuttons/ipaq_record",
116 "QPE/VMemo", "toggleRecord()", 116 "QPE/VMemo", "toggleRecord()",
117 "sound", "raise()" }, 117 "sound", "raise()" },
118 118
119 { Model_iPAQ_H191x, 119 { Model_iPAQ_H191x | Model_iPAQ_H4xxx,
120 Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"), 120 Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"),
121 "devicebuttons/ipaq_mail", 121 "devicebuttons/ipaq_mail",
122 "opiemail", "raise()", 122 "opiemail", "raise()",
123 "opiemail", "newMail()" }, 123 "opiemail", "newMail()" },
124 { Model_iPAQ_H191x, 124 { Model_iPAQ_H191x | Model_iPAQ_H4xxx,
125 Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"), 125 Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"),
126 "devicebuttons/ipaq_record", 126 "devicebuttons/ipaq_record",
127 "QPE/VMemo", "toggleRecord()", 127 "QPE/VMemo", "toggleRecord()",
128 "sound", "raise()" }, 128 "sound", "raise()" },
129 129
130 //h2200 has different button mapping
131 { Model_iPAQ_H22xx,
132 Qt::Key_NumLock, QT_TRANSLATE_NOOP("Button", "Mail Button"),
133 "devicebuttons/ipaq_mail",
134 "opiemail", "raise()",
135 "opiemail", "newMail()" },
136 { Model_iPAQ_H22xx,
137 Qt::Key_ScrollLock, QT_TRANSLATE_NOOP("Button", "Menu Button"),
138 "devicebuttons/ipaq_menu",
139 "QPE/TaskBar", "toggleMenu()",
140 "QPE/TaskBar", "toggleStartMenu()" },
141 // and hx4700 has different button mapping still
142 { Model_iPAQ_HX4700,
143 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"),
144 "devicebuttons/ipaq_mail",
145 "opiemail", "raise()",
146 "opiemail", "newMail()" },
147 { Model_iPAQ_HX4700,
148 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Record Button"),
149 "devicebuttons/ipaq_record",
150 "QPE/VMemo", "toggleRecord()",
151 "sound", "raise()" },
152 { Model_iPAQ_HX4700,
153 Qt::Key_Home, QT_TRANSLATE_NOOP("Button", "Home Button"),
154 "devicebuttons/ipaq_home",
155 "QPE/Launcher", "home()",
156 "buttonsettings", "raise()" },
157
130}; 158};
131 159
132void iPAQ::init(const QString& model) 160void iPAQ::init(const QString& model)
133{ 161{
134 d->m_vendorstr = "HP"; 162 d->m_vendorstr = "HP";
135 d->m_vendor = Vendor_HP; 163 d->m_vendor = Vendor_HP;
136 164
137 d->m_modelstr = model.mid(model.findRev('H')); 165 d->m_modelstr = model.mid(model.findRev('H'));
138 166
139 if ( d->m_modelstr == "H3100" ) 167 if ( d->m_modelstr == "H3100" )
140 d->m_model = Model_iPAQ_H31xx; 168 d->m_model = Model_iPAQ_H31xx;
141 else if ( d->m_modelstr == "H3600" ) 169 else if ( d->m_modelstr == "H3600" )
142 d->m_model = Model_iPAQ_H36xx; 170 d->m_model = Model_iPAQ_H36xx;
143 else if ( d->m_modelstr == "H3700" ) 171 else if ( d->m_modelstr == "H3700" )
144 d->m_model = Model_iPAQ_H37xx; 172 d->m_model = Model_iPAQ_H37xx;
145 else if ( d->m_modelstr == "H3800" ) 173 else if ( d->m_modelstr == "H3800" )
146 d->m_model = Model_iPAQ_H38xx; 174 d->m_model = Model_iPAQ_H38xx;
147 else if ( d->m_modelstr == "H3900" ) 175 else if ( d->m_modelstr == "H3900" )
148 d->m_model = Model_iPAQ_H39xx; 176 d->m_model = Model_iPAQ_H39xx;
149 else if ( d->m_modelstr == "H5400" ) 177 else if ( d->m_modelstr == "H5400" )
150 d->m_model = Model_iPAQ_H5xxx; 178 d->m_model = Model_iPAQ_H5xxx;
151 else if ( d->m_modelstr == "H2200" ) 179 else if ( d->m_modelstr == "H2200" )
152 d->m_model = Model_iPAQ_H22xx; 180 d->m_model = Model_iPAQ_H22xx;
153 else if ( d->m_modelstr == "H1910" ) 181 else if ( d->m_modelstr == "H1910" )
154 d->m_model = Model_iPAQ_H191x; 182 d->m_model = Model_iPAQ_H191x;
155 else if ( d->m_modelstr == "H1940" ) 183 else if ( d->m_modelstr == "H1940" )
156 d->m_model = Model_iPAQ_H1940; 184 d->m_model = Model_iPAQ_H1940;
157 else if ( d->m_modelstr == "HX4700" ) 185 else if ( d->m_modelstr == "HX4700" )
158 d->m_model = Model_iPAQ_HX4700; 186 d->m_model = Model_iPAQ_HX4700;
187 else if ( d->m_modelstr == "H4000" )
188 d->m_model = Model_iPAQ_H4xxx;
159 189
160 else 190 else
161 d->m_model = Model_Unknown; 191 d->m_model = Model_Unknown;
162 192
163 switch ( d->m_model ) { 193 switch ( d->m_model ) {
164 case Model_iPAQ_H31xx: 194 case Model_iPAQ_H31xx:
165 case Model_iPAQ_H38xx: 195 case Model_iPAQ_H38xx:
166 d->m_rotation = Rot90; 196 d->m_rotation = Rot90;
167 break; 197 break;
168 case Model_iPAQ_H5xxx: 198 case Model_iPAQ_H5xxx:
169 case Model_iPAQ_H22xx: 199 case Model_iPAQ_H22xx:
170 case Model_iPAQ_H191x: 200 case Model_iPAQ_H191x:
171 case Model_iPAQ_H1940: 201 case Model_iPAQ_H1940:
172 case Model_iPAQ_HX4700: 202 case Model_iPAQ_HX4700:
203 case Model_iPAQ_H4xxx:
173 d->m_rotation = Rot0; 204 d->m_rotation = Rot0;
174 break; 205 break;
175 case Model_iPAQ_H36xx: 206 case Model_iPAQ_H36xx:
176 case Model_iPAQ_H37xx: 207 case Model_iPAQ_H37xx:
177 case Model_iPAQ_H39xx: 208 case Model_iPAQ_H39xx:
178 default: 209 default:
179 d->m_rotation = Rot270; 210 d->m_rotation = Rot270;
180 break; 211 break;
181 212
182 } 213 }
183 214
184 m_leds [0] = m_leds [1] = Led_Off; 215 m_leds [0] = m_leds [1] = Led_Off;
185 216
186 m_power_timer = 0; 217 m_power_timer = 0;
187 218
188} 219}
189 220
190void iPAQ::initButtons() 221void iPAQ::initButtons()
191{ 222{
192 if ( d->m_buttons ) 223 if ( d->m_buttons )
193 return; 224 return;
194 225
195 if ( isQWS( ) ) { 226 if ( isQWS( ) ) {
196 addPreHandler(this); 227 addPreHandler(this);
197 } 228 }
198 229
199 d->m_buttons = new QValueList <ODeviceButton>; 230 d->m_buttons = new QValueList <ODeviceButton>;
200 231
201 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { 232 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) {
202 i_button *ib = ipaq_buttons + i; 233 i_button *ib = ipaq_buttons + i;
203 ODeviceButton b; 234 ODeviceButton b;
204 235
205 if (( ib->model & d->m_model ) == d->m_model ) { 236 if (( ib->model & d->m_model ) == d->m_model ) {
206 b. setKeycode ( ib->code ); 237 b. setKeycode ( ib->code );
207 b. setUserText ( QObject::tr ( "Button", ib->utext )); 238 b. setUserText ( QObject::tr ( "Button", ib->utext ));
208 b. setPixmap ( OResource::loadPixmap ( ib->pix )); 239 b. setPixmap ( OResource::loadPixmap ( ib->pix ));
209 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); 240 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction ));
210 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); 241 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction ));
211 242
212 d->m_buttons->append ( b ); 243 d->m_buttons->append ( b );
213 } 244 }
214 } 245 }
215 reloadButtonMapping(); 246 reloadButtonMapping();
216} 247}
217 248
218QValueList <OLed> iPAQ::ledList() const 249QValueList <OLed> iPAQ::ledList() const
219{ 250{
220 QValueList <OLed> vl; 251 QValueList <OLed> vl;
221 vl << Led_Power; 252 vl << Led_Power;
222 253
223 if ( d->m_model == Model_iPAQ_H38xx ) 254 if ( d->m_model == Model_iPAQ_H38xx )
224 vl << Led_BlueTooth; 255 vl << Led_BlueTooth;
225 return vl; 256 return vl;
226} 257}
227 258
228QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const 259QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const
229{ 260{
230 QValueList <OLedState> vl; 261 QValueList <OLedState> vl;
231 262
232 if ( l == Led_Power ) 263 if ( l == Led_Power )
233 vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast; 264 vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast;
234 else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx ) 265 else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx )
235 vl << Led_Off; // << Led_On << ??? 266 vl << Led_Off; // << Led_On << ???
236 267
237 return vl; 268 return vl;
238} 269}
239 270
240OLedState iPAQ::ledState ( OLed l ) const 271OLedState iPAQ::ledState ( OLed l ) const
241{ 272{
242 switch ( l ) { 273 switch ( l ) {
243 case Led_Power: 274 case Led_Power:
244 return m_leds [0]; 275 return m_leds [0];
245 case Led_BlueTooth: 276 case Led_BlueTooth:
246 return m_leds [1]; 277 return m_leds [1];
247 default: 278 default:
248 return Led_Off; 279 return Led_Off;
249 } 280 }
250} 281}
251 282
252bool iPAQ::setLedState ( OLed l, OLedState st ) 283bool iPAQ::setLedState ( OLed l, OLedState st )
253{ 284{
254 static int fd = ::open ( "/dev/touchscreen/0", O_RDWR | O_NONBLOCK ); 285 static int fd = ::open ( "/dev/touchscreen/0", O_RDWR | O_NONBLOCK );
255 286
256 if ( l == Led_Power ) { 287 if ( l == Led_Power ) {
257 if ( fd >= 0 ) { 288 if ( fd >= 0 ) {
258 LED_IN leds; 289 LED_IN leds;
259 ::memset ( &leds, 0, sizeof( leds )); 290 ::memset ( &leds, 0, sizeof( leds ));
260 leds. TotalTime = 0; 291 leds. TotalTime = 0;
261 leds. OnTime = 0; 292 leds. OnTime = 0;
262 leds. OffTime = 1; 293 leds. OffTime = 1;
263 leds. OffOnBlink = 2; 294 leds. OffOnBlink = 2;
264 295
265 switch ( st ) { 296 switch ( st ) {
266 case Led_Off : leds. OffOnBlink = 0; break; 297 case Led_Off : leds. OffOnBlink = 0; break;
267 case Led_On : leds. OffOnBlink = 1; break; 298 case Led_On : leds. OffOnBlink = 1; break;
268 case Led_BlinkSlow: leds. OnTime = 10; leds. OffTime = 10; break; 299 case Led_BlinkSlow: leds. OnTime = 10; leds. OffTime = 10; break;
269 case Led_BlinkFast: leds. OnTime = 5; leds. OffTime = 5; break; 300 case Led_BlinkFast: leds. OnTime = 5; leds. OffTime = 5; break;
270 } 301 }
271 302
272 if ( ::ioctl ( fd, LED_ON, &leds ) >= 0 ) { 303 if ( ::ioctl ( fd, LED_ON, &leds ) >= 0 ) {
273 m_leds [0] = st; 304 m_leds [0] = st;
274 return true; 305 return true;
275 } 306 }
276 } 307 }
277 } 308 }
278 return false; 309 return false;
279} 310}
280 311
281 312
282bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) 313bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat )
283{ 314{
284 int newkeycode = keycode; 315 int newkeycode = keycode;
285 316
286 switch ( keycode ) { 317 switch ( keycode ) {
287 // H38xx/H39xx have no "Q" key anymore - this is now the Mail key 318 // H38xx/H39xx have no "Q" key anymore - this is now the Mail key
288 case HardKey_Menu: { 319 case HardKey_Menu: {
289 if (( d->m_model == Model_iPAQ_H38xx ) || 320 if (( d->m_model == Model_iPAQ_H38xx ) ||
290 ( d->m_model == Model_iPAQ_H39xx ) || 321 ( d->m_model == Model_iPAQ_H39xx ) ||
291 ( d->m_model == Model_iPAQ_H5xxx)) { 322 ( d->m_model == Model_iPAQ_H5xxx)) {
292 newkeycode = HardKey_Mail; 323 newkeycode = HardKey_Mail;
293 } 324 }
294 break; 325 break;
295 } 326 }
296 327
297 // Rotate cursor keys 180 or 270 328 // Rotate cursor keys 180 or 270
298 case Key_Left : 329 case Key_Left :
299 case Key_Right: 330 case Key_Right:
300 case Key_Up : 331 case Key_Up :
301 case Key_Down : { 332 case Key_Down : {
302 if (( d->m_model == Model_iPAQ_H31xx ) || 333 if (( d->m_model == Model_iPAQ_H31xx ) ||
303 ( d->m_model == Model_iPAQ_H38xx )) { 334 ( d->m_model == Model_iPAQ_H38xx )) {
304 newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4; 335 newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4;
305 } 336 }
306 // Rotate the cursor keys by 270 337 // Rotate the cursor keys by 270
307 // keycode - Key_Left = position of the button starting from left clockwise 338 // keycode - Key_Left = position of the button starting from left clockwise
308 // add the rotation to it and modolo. No we've the original offset 339 // add the rotation to it and modolo. No we've the original offset
309 // add the offset to the Key_Left key 340 // add the offset to the Key_Left key
310 if (( d->m_model == Model_iPAQ_H5xxx ) || 341 if (( d->m_model == Model_iPAQ_H5xxx ) ||
311 ( d->m_model == Model_iPAQ_H191x ) || 342 ( d->m_model == Model_iPAQ_H191x ) ||
343 ( d->m_model == Model_iPAQ_H4xxx ) ||
312 ( d->m_model == Model_iPAQ_H1940 )) 344 ( d->m_model == Model_iPAQ_H1940 ))
313 newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4; 345 newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4;
314 break; 346 break;
315 } 347 }
316 348
317 // map Power Button short/long press to F6 for h191x 349 // map Power Button short/long press to F6 for h191x
318 case Key_F6: 350 case Key_F6:
319 if ( d->m_model != Model_iPAQ_H191x ) 351 if ( d->m_model != Model_iPAQ_H191x && d->m_model != Model_iPAQ_H4xxx )
320 break; 352 break;
321 // map Power Button short/long press to F34/F35 353 // map Power Button short/long press to F34/F35
322 case Key_SysReq: { 354 case Key_SysReq: {
323 if ( isPress ) { 355 if ( isPress ) {
324 if ( m_power_timer ) 356 if ( m_power_timer )
325 killTimer ( m_power_timer ); 357 killTimer ( m_power_timer );
326 m_power_timer = startTimer ( 500 ); 358 m_power_timer = startTimer ( 500 );
327 } 359 }
328 else if ( m_power_timer ) { 360 else if ( m_power_timer ) {
329 killTimer ( m_power_timer ); 361 killTimer ( m_power_timer );
330 m_power_timer = 0; 362 m_power_timer = 0;
331 QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); 363 QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false );
332 QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); 364 QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false );
333 } 365 }
334 newkeycode = Key_unknown; 366 newkeycode = Key_unknown;
335 break; 367 break;
336 } 368 }
337 } 369 }
338 370
339 if ( newkeycode != keycode ) { 371 if ( newkeycode != keycode ) {
340 if ( newkeycode != Key_unknown ) 372 if ( newkeycode != Key_unknown )
341 QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); 373 QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat );
342 return true; 374 return true;
343 } 375 }
344 else 376 else
345 return false; 377 return false;
346} 378}
347 379
348void iPAQ::timerEvent ( QTimerEvent * ) 380void iPAQ::timerEvent ( QTimerEvent * )
349{ 381{
350 killTimer ( m_power_timer ); 382 killTimer ( m_power_timer );
351 m_power_timer = 0; 383 m_power_timer = 0;
352 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); 384 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false );
353 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); 385 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false );
354} 386}
355 387
356 388
357void iPAQ::playAlarmSound() 389void iPAQ::playAlarmSound()
358{ 390{
359#ifndef QT_NO_SOUND 391#ifndef QT_NO_SOUND
360 static Sound snd ( "alarm" ); 392 static Sound snd ( "alarm" );
361 if(!snd.isFinished()) 393 if(!snd.isFinished())
362 return; 394 return;
363 395
364 changeMixerForAlarm(0, "/dev/sound/mixer", &snd ); 396 changeMixerForAlarm(0, "/dev/sound/mixer", &snd );
365 snd. play(); 397 snd. play();
366#endif 398#endif
367} 399}
368 400
369bool iPAQ::setDisplayBrightness ( int bright ) 401bool iPAQ::setDisplayBrightness ( int bright )
370{ 402{
371 bool res = false; 403 bool res = false;
372 int fd; 404 int fd;
373 405
374 if ( bright > 255 ) 406 if ( bright > 255 )
375 bright = 255; 407 bright = 255;
376 if ( bright < 0 ) 408 if ( bright < 0 )
377 bright = 0; 409 bright = 0;
378 410
379 QString cmdline; 411 QString cmdline;
380 412
381 switch ( model()) { 413 switch ( model()) {
382 case Model_iPAQ_H191x: 414 case Model_iPAQ_H191x:
415 case Model_iPAQ_H4xxx:
383 { 416 {
384 QDir sysClass( "/sys/class/backlight/pxafb/" ); 417 QDir sysClass( "/sys/class/backlight/pxafb/" );
385 sysClass.setFilter(QDir::Dirs); 418 sysClass.setFilter(QDir::Dirs);
386 int fd; 419 int fd;
387 if ( sysClass.exists() ) { 420 if ( sysClass.exists() ) {
388 QString sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/power" ); 421 QString sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/power" );
389 fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); 422 fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK );
390 if ( fd ) { 423 if ( fd ) {
391 char buf[10]; 424 char buf[10];
392 buf[0] = bright ? 0 : 4; 425 buf[0] = bright ? 0 : 4;
393 buf[1] = '\0'; 426 buf[1] = '\0';
394 res = ( ::write( fd, &buf[0], 2 ) == 0 ); 427 res = ( ::write( fd, &buf[0], 2 ) == 0 );
395 ::close( fd ); 428 ::close( fd );
396 } 429 }
397 sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/brightness" ); 430 sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/brightness" );
398 fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); 431 fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK );
399 if ( fd ) { 432 if ( fd ) {
400 char buf[100]; 433 char buf[100];
401 int len = ::snprintf( &buf[0], sizeof buf, "%d", bright ); 434 int len = ::snprintf( &buf[0], sizeof buf, "%d", bright );
402 res = ( ::write( fd, &buf[0], len ) == 0 ); 435 res = ( ::write( fd, &buf[0], len ) == 0 );
403 ::close( fd ); 436 ::close( fd );
404 } 437 }
405 } 438 }
406 } 439 }
407 break; 440 break;
408 441
409 case Model_iPAQ_HX4700: 442 case Model_iPAQ_HX4700:
410 cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/w100fb/brightness" ).arg( bright ); 443 cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/w100fb/brightness" ).arg( bright );
411 // No Global::shellQuote as we gurantee it to be sane 444 // No Global::shellQuote as we gurantee it to be sane
412 res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); 445 res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
413 break; 446 break;
414 447
415 448
416 default: 449 default:
417 if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { 450 if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) {
418 FLITE_IN bl; 451 FLITE_IN bl;
419 bl. mode = 1; 452 bl. mode = 1;
420 bl. pwr = bright ? 1 : 0; 453 bl. pwr = bright ? 1 : 0;
421 bl. brightness = ( bright * ( displayBrightnessResolution() - 1 ) + 127 ) / 255; 454 bl. brightness = ( bright * ( displayBrightnessResolution() - 1 ) + 127 ) / 255;
422 res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); 455 res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 );
423 ::close ( fd ); 456 ::close ( fd );
424 } 457 }
425 } 458 }
426 return res; 459 return res;
427} 460}
428 461
429int iPAQ::displayBrightnessResolution() const 462int iPAQ::displayBrightnessResolution() const
430{ 463{
431 switch ( model()) { 464 switch ( model()) {
432 case Model_iPAQ_H31xx: 465 case Model_iPAQ_H31xx:
433 case Model_iPAQ_H36xx: 466 case Model_iPAQ_H36xx:
434 case Model_iPAQ_H37xx: 467 case Model_iPAQ_H37xx:
435 return 128; // really 256, but >128 could damage the LCD 468 return 128; // really 256, but >128 could damage the LCD
436 469
437 case Model_iPAQ_H38xx: 470 case Model_iPAQ_H38xx:
438 case Model_iPAQ_H39xx: 471 case Model_iPAQ_H39xx:
439 return 64; 472 return 64;
440 case Model_iPAQ_H5xxx: 473 case Model_iPAQ_H5xxx:
441 case Model_iPAQ_HX4700: 474 case Model_iPAQ_HX4700:
475 case Model_iPAQ_H4xxx:
442 return 255; 476 return 255;
443 case Model_iPAQ_H191x: 477 case Model_iPAQ_H191x:
444 return 7; 478 return 7;
445 case Model_iPAQ_H1940: 479 case Model_iPAQ_H1940:
446 return 44; 480 return 44;
447 default: 481 default:
448 return 2; 482 return 2;
449 } 483 }
450} 484}
451 485
452bool iPAQ::setDisplayStatus ( bool on ) 486bool iPAQ::setDisplayStatus ( bool on )
453{ 487{
454 bool res = false; 488 bool res = false;
455 489
456 QString cmdline; 490 QString cmdline;
457 491
458 if ( model() == Model_iPAQ_H191x ) { 492 if ( model() == Model_iPAQ_H191x ) {
459 QDir sysClass( "/sys/class/lcd/pxafb/" ); 493 QDir sysClass( "/sys/class/lcd/pxafb/" );
460 sysClass.setFilter(QDir::Dirs); 494 sysClass.setFilter(QDir::Dirs);
461 if ( sysClass.exists() ) { 495 if ( sysClass.exists() ) {
462 QString sysClassPath = sysClass.absFilePath( "/sys/class/lcd/pxafb/power" ); 496 QString sysClassPath = sysClass.absFilePath( "/sys/class/lcd/pxafb/power" );
463 int fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); 497 int fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK );
464 if ( fd ) { 498 if ( fd ) {
465 char buf[10]; 499 char buf[10];
466 buf[0] = on ? 0 : 4; 500 buf[0] = on ? 0 : 4;
467 buf[1] = '\0'; 501 buf[1] = '\0';
468 res = ( ::write( fd, &buf[0], 2 ) == 0 ); 502 res = ( ::write( fd, &buf[0], 2 ) == 0 );
469 ::close( fd ); 503 ::close( fd );
470 } 504 }
471 } 505 }
472 return res; 506 return res;
473 } else { 507 } else {
474 return OAbstractMobileDevice::setDisplayStatus(on); 508 return OAbstractMobileDevice::setDisplayStatus(on);
475 } 509 }
476 510
477 res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); 511 res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
478 512
479 return res; 513 return res;
480} 514}
481 515
482bool iPAQ::hasLightSensor() const 516bool iPAQ::hasLightSensor() const
483{ 517{
484 switch (model()) { 518 switch (model()) {
485 case Model_iPAQ_H191x: 519 case Model_iPAQ_H191x:
520 case Model_iPAQ_H4xxx:
486 return false; 521 return false;
487 default: 522 default:
488 return true; 523 return true;
489 } 524 }
490} 525}
491 526
492int iPAQ::readLightSensor() 527int iPAQ::readLightSensor()
493{ 528{
494 int fd; 529 int fd;
495 int val = -1; 530 int val = -1;
496 531
497 if (( fd = ::open ( "/proc/hal/light_sensor", O_RDONLY )) >= 0 ) { 532 if (( fd = ::open ( "/proc/hal/light_sensor", O_RDONLY )) >= 0 ) {
498 char buffer [8]; 533 char buffer [8];
499 534
500 if ( ::read ( fd, buffer, 5 ) == 5 ) { 535 if ( ::read ( fd, buffer, 5 ) == 5 ) {
501 char *endptr; 536 char *endptr;
502 537
503 buffer [4] = 0; 538 buffer [4] = 0;
504 val = ::strtol ( buffer + 2, &endptr, 16 ); 539 val = ::strtol ( buffer + 2, &endptr, 16 );
505 540
506 if ( *endptr != 0 ) 541 if ( *endptr != 0 )
507 val = -1; 542 val = -1;
508 } 543 }
509 ::close ( fd ); 544 ::close ( fd );
510 } 545 }
511 546
512 return val; 547 return val;
513} 548}
514 549
515int iPAQ::lightSensorResolution() const 550int iPAQ::lightSensorResolution() const
516{ 551{
517 return 256; 552 return 256;
518} 553}