-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | libopie2/opiecore/device/device.pro | 14 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 24 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_motorola_ezx.cpp | 325 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_motorola_ezx.h | 102 |
7 files changed, 457 insertions, 18 deletions
@@ -1,360 +1,361 @@ | |||
1 | 2005-??-??Opie 1.2.2 | 1 | 2005-??-??Opie 1.2.2 |
2 | 2 | ||
3 | 3 | ||
4 | New Features | 4 | New Features |
5 | ------------ | 5 | ------------ |
6 | * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw) | 6 | * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw) |
7 | * Opie-Notes: Notes application based on NoteZ (hrw) | 7 | * Opie-Notes: Notes application based on NoteZ (hrw) |
8 | * Opie-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw) | 8 | * Opie-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw) |
9 | * Added hardware support for HTC Universal (ljp) | 9 | * Added hardware support for HTC Universal (ljp) |
10 | * Make Opie-Bluetooth subsystem actually usable (korovkin) | 10 | * Made Opie-Bluetooth subsystem actually usable (korovkin) |
11 | * Added hardware support for the Motorola EZX platform (mickeyl) | ||
11 | 12 | ||
12 | Fixed Bugs | 13 | Fixed Bugs |
13 | ---------- | 14 | ---------- |
14 | * #1695 - Date selector use too small fontsize on VGA screen (hrw) | 15 | * #1695 - Date selector use too small fontsize on VGA screen (hrw) |
15 | * #1686 - opie-console lack UI setting for switching scrollbar (hrw) | 16 | * #1686 - opie-console lack UI setting for switching scrollbar (hrw) |
16 | * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) | 17 | * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) |
17 | * #1624 - Button settngs changes are applied only after restart (hrw) | 18 | * #1624 - Button settngs changes are applied only after restart (hrw) |
18 | * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) | 19 | * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) |
19 | * n.a. - remove hardcoded font size from wellenreiter (hrw) | 20 | * n.a. - remove hardcoded font size from wellenreiter (hrw) |
20 | * n.a. - added patch to build QT/E 2.3.10 with gcc 4.x.x (hrw) | 21 | * n.a. - added patch to build QT/E 2.3.10 with gcc 4.x.x (hrw) |
21 | * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) | 22 | * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) |
22 | * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) | 23 | * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) |
23 | * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) | 24 | * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) |
24 | * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw) | 25 | * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw) |
25 | * n.a. - Set version to 1.2.1 in About applet (hrw) | 26 | * n.a. - Set version to 1.2.1 in About applet (hrw) |
26 | * n.a. - add firstusage and background pictures for 480x640 devices (mickeyl) | 27 | * n.a. - add firstusage and background pictures for 480x640 devices (mickeyl) |
27 | * n.a. - many bluetooth fixes (korovkin) | 28 | * n.a. - many bluetooth fixes (korovkin) |
28 | 29 | ||
29 | Internal | 30 | Internal |
30 | -------- | 31 | -------- |
31 | * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw) | 32 | * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw) |
32 | * libopiecore: SL6000 (tosa) now uses corgi-bl (Dirk Opfer) | 33 | * libopiecore: SL6000 (tosa) now uses corgi-bl (Dirk Opfer) |
33 | * library/version.h: introduce integer version code in OPIE_VERSION for conditional compilation | 34 | * library/version.h: introduce integer version code in OPIE_VERSION for conditional compilation |
34 | 35 | ||
35 | 2005-09-11Opie 1.2.1 | 36 | 2005-09-11Opie 1.2.1 |
36 | 37 | ||
37 | 38 | ||
38 | New Features | 39 | New Features |
39 | ------------ | 40 | ------------ |
40 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) | 41 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) |
41 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) | 42 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) |
42 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) | 43 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) |
43 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) | 44 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) |
44 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) | 45 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) |
45 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) | 46 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) |
46 | * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) | 47 | * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) |
47 | * ZSafe: Made UI conform to Opie standards (drw) | 48 | * ZSafe: Made UI conform to Opie standards (drw) |
48 | * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) | 49 | * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) |
49 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) | 50 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) |
50 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) | 51 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) |
51 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) | 52 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) |
52 | * Opie-smb: Added Opie front end for Samba (ljp) | 53 | * Opie-smb: Added Opie front end for Samba (ljp) |
53 | * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) | 54 | * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) |
54 | * Opieplayer: rudimentary podcast support (ljp) | 55 | * Opieplayer: rudimentary podcast support (ljp) |
55 | 56 | ||
56 | Fixed Bugs | 57 | Fixed Bugs |
57 | ---------- | 58 | ---------- |
58 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) | 59 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) |
59 | - We actually suspend the complete Opie now in that case. | 60 | - We actually suspend the complete Opie now in that case. |
60 | * #1384 - Battery status updated improperly when charging (skyhusker) | 61 | * #1384 - Battery status updated improperly when charging (skyhusker) |
61 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) | 62 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) |
62 | * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) | 63 | * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) |
63 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) | 64 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) |
64 | * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) | 65 | * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) |
65 | * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) | 66 | * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) |
66 | * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) | 67 | * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) |
67 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) | 68 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) |
68 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) | 69 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) |
69 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) | 70 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) |
70 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) | 71 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) |
71 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) | 72 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) |
72 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) | 73 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) |
73 | * #1679 - Security PIN plugin is QVGA sized (hrw) | 74 | * #1679 - Security PIN plugin is QVGA sized (hrw) |
74 | * #1682 - Properly resize tab control in OTabWidget (drw) | 75 | * #1682 - Properly resize tab control in OTabWidget (drw) |
75 | * n.a. - always show volume and wireless applet popups inside visible screen (deller) | 76 | * n.a. - always show volume and wireless applet popups inside visible screen (deller) |
76 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) | 77 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) |
77 | * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) | 78 | * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) |
78 | * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) | 79 | * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) |
79 | * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) | 80 | * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) |
80 | * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) | 81 | * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) |
81 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) | 82 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) |
82 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) | 83 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) |
83 | * n.a. - remove hardcoded font size from netsystemtime (hrw) | 84 | * n.a. - remove hardcoded font size from netsystemtime (hrw) |
84 | * n.a. - remove hardcoded font size from checkbook graphs (hrw) | 85 | * n.a. - remove hardcoded font size from checkbook graphs (hrw) |
85 | * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) | 86 | * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) |
86 | 87 | ||
87 | 88 | ||
88 | Internal | 89 | Internal |
89 | -------- | 90 | -------- |
90 | * Make BluezApplet use OTaskbarApplet (mickeyl) | 91 | * Make BluezApplet use OTaskbarApplet (mickeyl) |
91 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) | 92 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) |
92 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) | 93 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) |
93 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) | 94 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) |
94 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) | 95 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) |
95 | * libopienet: Miscellaneous API cleanups (mickeyl) | 96 | * libopienet: Miscellaneous API cleanups (mickeyl) |
96 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) | 97 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) |
97 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) | 98 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) |
98 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) | 99 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) |
99 | * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) | 100 | * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) |
100 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) | 101 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) |
101 | * Fix / Optimize number of scanned directories (ljp) | 102 | * Fix / Optimize number of scanned directories (ljp) |
102 | * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) | 103 | * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) |
103 | 104 | ||
104 | 2005-03-25Opie 1.2.0 | 105 | 2005-03-25Opie 1.2.0 |
105 | 106 | ||
106 | Fixed Bugs | 107 | Fixed Bugs |
107 | ---------- | 108 | ---------- |
108 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 109 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
109 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 110 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
110 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 111 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
111 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 112 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
112 | * n.a.- make qpeglobal.h include qglobal.h (zecke) | 113 | * n.a.- make qpeglobal.h include qglobal.h (zecke) |
113 | 114 | ||
114 | 2005-03-20Opie 1.2.0-rc1 | 115 | 2005-03-20Opie 1.2.0-rc1 |
115 | 116 | ||
116 | 117 | ||
117 | New Features | 118 | New Features |
118 | ------------ | 119 | ------------ |
119 | * Launcher: Support a static background pixmap (mickeyl) | 120 | * Launcher: Support a static background pixmap (mickeyl) |
120 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 121 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
121 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 122 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
122 | * Added hi-res inline images for large resolution devices (drw) | 123 | * Added hi-res inline images for large resolution devices (drw) |
123 | * Improved launcher icons for consistency (ar) | 124 | * Improved launcher icons for consistency (ar) |
124 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 125 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
125 | 126 | ||
126 | Fixed Bugs | 127 | Fixed Bugs |
127 | ---------- | 128 | ---------- |
128 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 129 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
129 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 130 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
130 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 131 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
131 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 132 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
132 | * #1482 - Fix double '/' in paths (zecke) | 133 | * #1482 - Fix double '/' in paths (zecke) |
133 | * #1536 - Autosave of custom locations in opie backup (ar) | 134 | * #1536 - Autosave of custom locations in opie backup (ar) |
134 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 135 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
135 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 136 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
136 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 137 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
137 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 138 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
138 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 139 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
139 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 140 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
140 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 141 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
141 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 142 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
142 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 143 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
143 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 144 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
144 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 145 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
145 | * #1604 - Checkbook crashed on startup (drw) | 146 | * #1604 - Checkbook crashed on startup (drw) |
146 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 147 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
147 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 148 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
148 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 149 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
149 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 150 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
150 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 151 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
151 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 152 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
152 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 153 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
153 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 154 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
154 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 155 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
155 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 156 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
156 | 157 | ||
157 | Internal | 158 | Internal |
158 | -------- | 159 | -------- |
159 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 160 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
160 | * Killed the need for weak symbols in QtE (zecke) | 161 | * Killed the need for weak symbols in QtE (zecke) |
161 | * Added optional building libqpe without inline images (mickeyl) | 162 | * Added optional building libqpe without inline images (mickeyl) |
162 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 163 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
163 | 164 | ||
164 | 2005-02-03Opie 1.1.9 | 165 | 2005-02-03Opie 1.1.9 |
165 | 166 | ||
166 | New Features | 167 | New Features |
167 | ------------ | 168 | ------------ |
168 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 169 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
169 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 170 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
170 | * Usability enhancements in OpieIRC (skyhusker) | 171 | * Usability enhancements in OpieIRC (skyhusker) |
171 | 172 | ||
172 | Fixed Bugs | 173 | Fixed Bugs |
173 | ---------- | 174 | ---------- |
174 | * #1501 - Fixed bug in todo sql backend (eilers) | 175 | * #1501 - Fixed bug in todo sql backend (eilers) |
175 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 176 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
176 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 177 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
177 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 178 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
178 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 179 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
179 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 180 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
180 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 181 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
181 | 182 | ||
182 | Internal | 183 | Internal |
183 | -------- | 184 | -------- |
184 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 185 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
185 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 186 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
186 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 187 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
187 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 188 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
188 | * Build tree cleanups (mickeyl) | 189 | * Build tree cleanups (mickeyl) |
189 | 190 | ||
190 | 2004-11-26Opie 1.1.8 | 191 | 2004-11-26Opie 1.1.8 |
191 | 192 | ||
192 | New Features | 193 | New Features |
193 | ------------ | 194 | ------------ |
194 | * PackageManager supports installation of local ipkg files (drw) | 195 | * PackageManager supports installation of local ipkg files (drw) |
195 | * PackageManager supports linking of applications to root (drw) | 196 | * PackageManager supports linking of applications to root (drw) |
196 | * PackageManager supports src/gz feeds (drw,wimpie) | 197 | * PackageManager supports src/gz feeds (drw,wimpie) |
197 | * Added a syslog information tab to sysinfo (mickeyl) | 198 | * Added a syslog information tab to sysinfo (mickeyl) |
198 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 199 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
199 | 200 | ||
200 | Fixed Bugs | 201 | Fixed Bugs |
201 | ---------- | 202 | ---------- |
202 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 203 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
203 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 204 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
204 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 205 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
205 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 206 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
206 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 207 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
207 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 208 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
208 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 209 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
209 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 210 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
210 | 211 | ||
211 | Internal | 212 | Internal |
212 | -------- | 213 | -------- |
213 | * Moved libopie1 to unsupported (mickeyl) | 214 | * Moved libopie1 to unsupported (mickeyl) |
214 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 215 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
215 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 216 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
216 | 217 | ||
217 | 2004-11-14Opie 1.1.7 | 218 | 2004-11-14Opie 1.1.7 |
218 | 219 | ||
219 | New Features | 220 | New Features |
220 | ------------ | 221 | ------------ |
221 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 222 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
222 | * Backup now uses the busy indicator when backing up and restore (ar) | 223 | * Backup now uses the busy indicator when backing up and restore (ar) |
223 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 224 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
224 | * OpiePlayer2 better error handling (zecke) | 225 | * OpiePlayer2 better error handling (zecke) |
225 | * OpiePlayer2 progress indication while streaming (zecke) | 226 | * OpiePlayer2 progress indication while streaming (zecke) |
226 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 227 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
227 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 228 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
228 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 229 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
229 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 230 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
230 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 231 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
231 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 232 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
232 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 233 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
233 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 234 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
234 | * Opie-Security gained a 'test authentication' button (clem) | 235 | * Opie-Security gained a 'test authentication' button (clem) |
235 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 236 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
236 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 237 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
237 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 238 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
238 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 239 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
239 | 240 | ||
240 | Fixed Bugs | 241 | Fixed Bugs |
241 | ---------- | 242 | ---------- |
242 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 243 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
243 | * #608 - Make Opie usable for left handed users (zecke) | 244 | * #608 - Make Opie usable for left handed users (zecke) |
244 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 245 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
245 | * #1245 - Opie-Go 'paused' (zecke) | 246 | * #1245 - Opie-Go 'paused' (zecke) |
246 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 247 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
247 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 248 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
248 | * #1395 - Build VNC Backend with gcc3.4 | 249 | * #1395 - Build VNC Backend with gcc3.4 |
249 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 250 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
250 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 251 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
251 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 252 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
252 | * #1448 - Brightness Applet added (mickeyl) | 253 | * #1448 - Brightness Applet added (mickeyl) |
253 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 254 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
254 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 255 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
255 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 256 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
256 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 257 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
257 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 258 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
258 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 259 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) |
259 | * 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) | 260 | * 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) |
260 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 261 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
261 | 262 | ||
262 | Internal | 263 | Internal |
263 | -------- | 264 | -------- |
264 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 265 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
265 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 266 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
266 | 267 | ||
267 | 2004-09-17Opie 1.1.6 | 268 | 2004-09-17Opie 1.1.6 |
268 | 269 | ||
269 | New Features | 270 | New Features |
270 | ------------ | 271 | ------------ |
271 | * Fifteen gained configurable number of items (zecke) | 272 | * Fifteen gained configurable number of items (zecke) |
272 | * Fifteen can have custom background images (zecke) | 273 | * Fifteen can have custom background images (zecke) |
273 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) | 274 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) |
274 | * Integrated the new security framework into libopie2 (zecke,clem) | 275 | * Integrated the new security framework into libopie2 (zecke,clem) |
275 | * Converted the launcher to use the new security framework (zecke) | 276 | * Converted the launcher to use the new security framework (zecke) |
276 | * Backup can now handle custom locations for backup and restore (ar) | 277 | * Backup can now handle custom locations for backup and restore (ar) |
277 | * Implemented right-on-hold feedback (wimpie,zecke) | 278 | * Implemented right-on-hold feedback (wimpie,zecke) |
278 | * Lots of new features in opie-reader (tim,pohly) | 279 | * Lots of new features in opie-reader (tim,pohly) |
279 | * Build system cleanups (schurig) | 280 | * Build system cleanups (schurig) |
280 | 281 | ||
281 | Fixed Bugs | 282 | Fixed Bugs |
282 | -------- | 283 | -------- |
283 | * #1005 - Fixed backup to CompactFlash (ar) | 284 | * #1005 - Fixed backup to CompactFlash (ar) |
284 | * #1167 - Fixed Opie write crashing on more text than one page (ar) | 285 | * #1167 - Fixed Opie write crashing on more text than one page (ar) |
285 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) | 286 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) |
286 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) | 287 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) |
287 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) | 288 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) |
288 | * #1370 - Pimconverter now reacts on cancel key (eilers) | 289 | * #1370 - Pimconverter now reacts on cancel key (eilers) |
289 | * #1376 - Bring back the capslock/numlock display (zecke) | 290 | * #1376 - Bring back the capslock/numlock display (zecke) |
290 | * #1383 - Language settings now warns about losing open apps (Markus Litz) | 291 | * #1383 - Language settings now warns about losing open apps (Markus Litz) |
291 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) | 292 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) |
292 | * #1394 - Fixed oversized headline in opie-login (coredump) | 293 | * #1394 - Fixed oversized headline in opie-login (coredump) |
293 | * #1396 - Opie-console captures the escape key and vim is working (zecke) | 294 | * #1396 - Opie-console captures the escape key and vim is working (zecke) |
294 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) | 295 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) |
295 | 296 | ||
296 | 2004-07-06Opie 1.1.4 | 297 | 2004-07-06Opie 1.1.4 |
297 | 298 | ||
298 | New Features | 299 | New Features |
299 | ------------ | 300 | ------------ |
300 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) | 301 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) |
301 | * Added Conversion tool for pim-data (eilers) | 302 | * Added Conversion tool for pim-data (eilers) |
302 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) | 303 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) |
303 | * Modified the PIM API for providing generic use of OPimRecords (eilers) | 304 | * Modified the PIM API for providing generic use of OPimRecords (eilers) |
304 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) | 305 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) |
305 | 306 | ||
306 | Fixed Bugs | 307 | Fixed Bugs |
307 | -------- | 308 | -------- |
308 | * #1068 - Country Drop Down Box Off Screen | 309 | * #1068 - Country Drop Down Box Off Screen |
309 | * #1291 - Opie tinykate does not open .desktop files (ar) | 310 | * #1291 - Opie tinykate does not open .desktop files (ar) |
310 | * #1291 - Opie sheet not saving correctly (ar) | 311 | * #1291 - Opie sheet not saving correctly (ar) |
311 | * #1294 - Opie does not know about British Summer Time | 312 | * #1294 - Opie does not know about British Summer Time |
312 | * #1314 - Drawpad initialization (mickeyl) | 313 | * #1314 - Drawpad initialization (mickeyl) |
313 | * #1317 - Packagemanager crashes on hold-down or install (chicken) | 314 | * #1317 - Packagemanager crashes on hold-down or install (chicken) |
314 | * #1321 - Batteryapplet graphic glitch (harlekin) | 315 | * #1321 - Batteryapplet graphic glitch (harlekin) |
315 | * #1324 - ZSafe not starting up (mickeyl) | 316 | * #1324 - ZSafe not starting up (mickeyl) |
316 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) | 317 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) |
317 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) | 318 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) |
318 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) | 319 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) |
319 | * #1348 - Datebook dependency on libopiedb2 (chicken) | 320 | * #1348 - Datebook dependency on libopiedb2 (chicken) |
320 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) | 321 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) |
321 | 322 | ||
322 | 2004-04-25Opie 1.1.3 | 323 | 2004-04-25Opie 1.1.3 |
323 | 324 | ||
324 | * Introduced first implementation of SQL-Support using SQLite (eilers) | 325 | * Introduced first implementation of SQL-Support using SQLite (eilers) |
325 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) | 326 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) |
326 | * Added a real system graffiti character set (brad) | 327 | * Added a real system graffiti character set (brad) |
327 | * Added Generic Keyconfig Widget (zecke) | 328 | * Added Generic Keyconfig Widget (zecke) |
328 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) | 329 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) |
329 | * Added new Bible reader app - opie-dagger (drw) | 330 | * Added new Bible reader app - opie-dagger (drw) |
330 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) | 331 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) |
331 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) | 332 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) |
332 | * Enabled the possibility to pass command line arguments to applications (mickeyl) | 333 | * Enabled the possibility to pass command line arguments to applications (mickeyl) |
333 | * Added an about applet showing some credits and information about Opie (mickeyl) | 334 | * Added an about applet showing some credits and information about Opie (mickeyl) |
334 | * Added benchmarking functionality to sysinfo (mickeyl) | 335 | * Added benchmarking functionality to sysinfo (mickeyl) |
335 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) | 336 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) |
336 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) | 337 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) |
337 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) | 338 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) |
338 | * Clean-up of package information in control files (drw) | 339 | * Clean-up of package information in control files (drw) |
339 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) | 340 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) |
340 | * Improved big-screen support (zecke,ar) | 341 | * Improved big-screen support (zecke,ar) |
341 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) | 342 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) |
342 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) | 343 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) |
343 | * Added new package manager - opie-packagemanager (drw) | 344 | * Added new package manager - opie-packagemanager (drw) |
344 | * Improved light-n-power for C7x0 (mickeyl) | 345 | * Improved light-n-power for C7x0 (mickeyl) |
345 | * Added automatic rotation support for C7x0 (treke) | 346 | * Added automatic rotation support for C7x0 (treke) |
346 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) | 347 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) |
347 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) | 348 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) |
348 | 349 | ||
349 | 2003-11-29Opie 1.0.3 | 350 | 2003-11-29Opie 1.0.3 |
350 | 351 | ||
351 | * Released as Version 1.0.3 | 352 | * Released as Version 1.0.3 |
352 | * Improved i18n (various contributors) | 353 | * Improved i18n (various contributors) |
353 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) | 354 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) |
354 | * Made the Documents Tab optional (mickeyl) | 355 | * Made the Documents Tab optional (mickeyl) |
355 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) | 356 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) |
356 | 357 | ||
357 | 2003-08-04Opie 1.0.0 | 358 | 2003-08-04Opie 1.0.0 |
358 | 359 | ||
359 | * Released as Version 1.0.0 | 360 | * Released as Version 1.0.0 |
360 | * Including a PPP module for easy dial up (tille,harlekin,zecke) | 361 | * Including a PPP module for easy dial up (tille,harlekin,zecke) |
@@ -1,109 +1,112 @@ | |||
1 | 1. How to use the Opie build system | 1 | 1. How to use the Opie build system |
2 | ==================================== | 2 | ==================================== |
3 | There's a tutorial document at: | 3 | There's a tutorial document at: |
4 | http://www.uv-ac.de/opiedev/opiedev.html | 4 | http://www.uv-ac.de/opiedev/opiedev.html |
5 | 5 | ||
6 | The API reference currently is at: | 6 | The API reference currently is at: |
7 | http://handhelds.org/~zecke/apidocs/index.html | 7 | http://handhelds.org/~zecke/apidocs/index.html |
8 | 8 | ||
9 | You will need qvfb, uic and | 9 | You will need qvfb, uic and |
10 | (if you want to develop applications) designer | 10 | (if you want to develop applications) designer |
11 | compiled and linked against Qt/X11. | 11 | compiled and linked against Qt/X11. |
12 | That means you must download and configure/make it: | 12 | That means you must download and configure/make it: |
13 | wget ftp://ftp.trolltech.com/qt/source/qt-x11-2.3.2.tar.gz | 13 | wget ftp://ftp.trolltech.com/qt/source/qt-x11-2.3.2.tar.gz |
14 | (Alternatively, you can get static binaries from http://www.vanille.de/tools) | 14 | (Alternatively, you can get static binaries from http://www.vanille.de/tools) |
15 | 15 | ||
16 | You will need Qt/Embedded 2.3.10. Note that we don't support any | 16 | You will need Qt/Embedded 2.3.10. Note that we don't support any |
17 | other Qt/Embedded version anymore. | 17 | other Qt/Embedded version anymore. |
18 | 18 | ||
19 | You can get it from: | 19 | You can get it from: |
20 | ftp://ftp.trolltech.com/qt/source/qt-embedded-2.3.10-free.tar.bz2 | 20 | ftp://ftp.trolltech.com/qt/source/qt-embedded-2.3.10-free.tar.bz2 |
21 | 21 | ||
22 | Set QTDIR to point to your qt/embedded source tree, such as: | 22 | Set QTDIR to point to your qt/embedded source tree, such as: |
23 | export QTDIR=/opt/qt-2.3.10 | 23 | export QTDIR=/opt/qt-2.3.10 |
24 | 24 | ||
25 | You need to do set the OPIEDIR environment variable: | 25 | You need to do set the OPIEDIR environment variable: |
26 | export OPIEDIR=`pwd` | 26 | export OPIEDIR=`pwd` |
27 | or | 27 | or |
28 | export OPIEDIR=~/projects/sources/opie | 28 | export OPIEDIR=~/projects/sources/opie |
29 | or wherever you placed the Opie sources. | 29 | or wherever you placed the Opie sources. |
30 | 30 | ||
31 | You need to adjust your runtime library search path, | 31 | You need to adjust your runtime library search path, |
32 | so that the Qt/Embedded and Opie libraries can be found: | 32 | so that the Qt/Embedded and Opie libraries can be found: |
33 | export LD_LIBRARY_PATH=$OPIEDIR/lib:$QTDIR/lib:$LD_LIBRARY_PATH | 33 | export LD_LIBRARY_PATH=$OPIEDIR/lib:$QTDIR/lib:$LD_LIBRARY_PATH |
34 | 34 | ||
35 | You have to apply the patches corresponding to your Qt/Embedded version | 35 | You have to apply the patches corresponding to your Qt/Embedded version |
36 | and copy the qconfig-qpe.h file to $QTDIR/src/tools: | 36 | and copy the qconfig-qpe.h file to $QTDIR/src/tools: |
37 | cd $QTDIR; cat $OPIEDIR/qt/qt-<version>.patch/qte<version>-all.patch | patch -p1 | 37 | cd $QTDIR; cat $OPIEDIR/qt/qt-<version>.patch/qte<version>-all.patch | patch -p1 |
38 | cp $OPIEDIR/qt/qconfig-qpe.h $QTDIR/src/tools | 38 | cp $OPIEDIR/qt/qconfig-qpe.h $QTDIR/src/tools |
39 | 39 | ||
40 | You are now ready to configure and build Qt/Embedded | 40 | You are now ready to configure and build Qt/Embedded |
41 | 41 | ||
42 | cd $QTDIR | 42 | cd $QTDIR |
43 | echo 'yes' | ./configure -qconfig qpe -depths 4,16,24,32 -system-jpeg -system-libpng -system-zlib -no-xkb -no-sm -no-xft -qvfb | 43 | echo 'yes' | ./configure -qconfig qpe -depths 4,16,24,32 -system-jpeg -system-libpng -system-zlib -no-xkb -no-sm -no-xft -qvfb |
44 | make | 44 | make |
45 | 45 | ||
46 | Note that the above command ( -qvfb ) compiles in the Virtual | 46 | Note that the above command ( -qvfb ) compiles in the Virtual |
47 | Framebuffer and is mostly meant for development on your host system. | 47 | Framebuffer and is mostly meant for development on your host system. |
48 | For cross compiling, you will need to use the -xplatform switch. | 48 | For cross compiling, you will need to use the -xplatform switch. |
49 | See ./configure --help for details about the possible options. | 49 | See ./configure --help for details about the possible options. |
50 | 50 | ||
51 | Once you have these compiled, be sure to set the PATH to ensure your (cross)compiler | 51 | Once you have these compiled, be sure to set the PATH to ensure your (cross)compiler |
52 | is available. | 52 | is available. |
53 | 53 | ||
54 | Then do the following in the opie source tree: | 54 | Then do the following in the opie source tree: |
55 | 55 | ||
56 | make clean | 56 | make clean |
57 | make menuconfig | 57 | make menuconfig |
58 | 58 | ||
59 | Now you can move through the menu and select or deselect anything.. | 59 | Now you can move through the menu and select or deselect anything.. |
60 | Exit and save the configuration and enter "make" to build everything selected. | 60 | Exit and save the configuration and enter "make" to build everything selected. |
61 | 61 | ||
62 | Have fun! | 62 | Have fun! |
63 | 63 | ||
64 | 2. Required Libraries | 64 | 2. Required Libraries |
65 | ===================== | 65 | ===================== |
66 | 66 | ||
67 | For a successful Opie build, you need to install the following libraries and headers: | 67 | For a successful Opie build, you need to install the following libraries and headers: |
68 | 68 | ||
69 | * libsdl >= 1.2.0 | 69 | * libsdl >= 1.2.0 |
70 | http://www.libsdl.org/download-1.2.php | 70 | http://www.libsdl.org/download-1.2.php |
71 | 71 | ||
72 | * libxine >= 1.0 | 72 | * libxine >= 1.0 |
73 | http://prdownloads.sourceforge.net/xine/ | 73 | http://prdownloads.sourceforge.net/xine/ |
74 | 74 | ||
75 | * libpcap >= 0.7.2 | 75 | * libpcap >= 0.7.2 |
76 | http://www.tcpdump.org/release/ | 76 | http://www.tcpdump.org/release/ |
77 | 77 | ||
78 | * libetpan >= 0.34 | 78 | * libetpan >= 0.34 |
79 | http://prdownloads.sourceforge.net/libetpan/ | 79 | http://prdownloads.sourceforge.net/libetpan/ |
80 | 80 | ||
81 | * libsqlite >= 3.0.0 | 81 | * libsqlite >= 3.0.0 |
82 | http://www.sqlite.org/download.html | 82 | http://www.sqlite.org/download.html |
83 | 83 | ||
84 | * libipk >= 138 | 84 | * libipk >= 138 |
85 | ftp://handhelds.org/linux/packages/ipkg | 85 | ftp://handhelds.org/linux/packages/ipkg |
86 | 86 | ||
87 | * libobexftp >= 0.19 | 87 | * libobexftp >= 0.19 |
88 | http://triq.net/obexftp.html | 88 | http://triq.net/obexftp.html |
89 | 89 | ||
90 | 3. Required Programs | 90 | 3. Required Programs |
91 | ==================== | 91 | ==================== |
92 | 92 | ||
93 | For a successful usage of Opie, you should install the following programs: | 93 | For a successful usage of Opie, you should install the following programs: |
94 | 94 | ||
95 | * obexftpd | 95 | * obexftpd |
96 | * obextool | 96 | * obextool |
97 | 97 | ||
98 | 4. Supported Devices | 98 | 4. Supported Devices |
99 | ==================== | 99 | ==================== |
100 | 100 | ||
101 | Sharp Zaurus SL-5x00, SL-B500, SL-C7x0, SL-C8x0, SL-C1000, SL-C3000, SL-C3100, SL-6000 | 101 | Sharp Zaurus SL-5x00, SL-B500, SL-C7x0, SL-C8x0, SL-C1000, SL-C3000, SL-C3100, SL-6000 |
102 | 102 | ||
103 | HP iPAQ 36xx, 37xx, 38xx, 39xx, 54xx, 55xx | 103 | HP iPAQ 36xx, 37xx, 38xx, 39xx, 54xx, 55xx |
104 | 104 | ||
105 | SIEMENS SIMpad CL4, SL4, SLC, T-SinusPAD | 105 | SIEMENS SIMpad CL4, SL4, SLC, T-SinusPAD |
106 | 106 | ||
107 | MasterIA Beagle, Tradesquare.NL Tuxpad 1 | 107 | MasterIA Beagle, Tradesquare.NL Tuxpad 1 |
108 | 108 | ||
109 | GMate Yopy 3x00 | 109 | GMate Yopy 3x00 |
110 | |||
111 | Motorola EZX A780, E680 | ||
112 | |||
diff --git a/libopie2/opiecore/device/device.pro b/libopie2/opiecore/device/device.pro index 0954733..b517032 100644 --- a/libopie2/opiecore/device/device.pro +++ b/libopie2/opiecore/device/device.pro | |||
@@ -1,28 +1,30 @@ | |||
1 | HEADERS += device/odevice.h \ | 1 | HEADERS += device/odevice.h \ |
2 | device/odevicebutton.h \ | 2 | device/odevicebutton.h \ |
3 | device/odevice_abstractmobiledevice.h \ | 3 | device/odevice_abstractmobiledevice.h \ |
4 | device/odevice_beagle.h \ | 4 | device/odevice_beagle.h \ |
5 | device/odevice_ipaq.h \ | 5 | device/odevice_ipaq.h \ |
6 | device/odevice_jornada.h \ | 6 | device/odevice_jornada.h \ |
7 | device/odevice_ramses.h \ | 7 | device/odevice_ramses.h \ |
8 | device/odevice_simpad.h \ | 8 | device/odevice_simpad.h \ |
9 | device/odevice_zaurus.h \ | 9 | device/odevice_zaurus.h \ |
10 | device/odevice_genuineintel.h \ | 10 | device/odevice_genuineintel.h \ |
11 | device/odevice_yopy.h \ | 11 | device/odevice_yopy.h \ |
12 | device/odevice_mypal.h \ | 12 | device/odevice_mypal.h \ |
13 | device/odevice_htc.h | 13 | device/odevice_htc.h \ |
14 | device/odevice_motorola_ezx.h | ||
14 | 15 | ||
15 | SOURCES += device/odevice.cpp \ | 16 | SOURCES += device/odevice.cpp \ |
16 | device/odevicebutton.cpp \ | 17 | device/odevicebutton.cpp \ |
17 | device/odevice_abstractmobiledevice.cpp \ | 18 | device/odevice_abstractmobiledevice.cpp \ |
18 | device/odevice_beagle.cpp \ | 19 | device/odevice_beagle.cpp \ |
19 | device/odevice_ipaq.cpp \ | 20 | device/odevice_ipaq.cpp \ |
20 | device/odevice_jornada.cpp\ | 21 | device/odevice_jornada.cpp\ |
21 | device/odevice_ramses.cpp \ | 22 | device/odevice_ramses.cpp \ |
22 | device/odevice_simpad.cpp \ | 23 | device/odevice_simpad.cpp \ |
23 | device/odevice_zaurus.cpp \ | 24 | device/odevice_zaurus.cpp \ |
24 | device/odevice_genuineintel.cpp \ | 25 | device/odevice_genuineintel.cpp \ |
25 | device/odevice_yopy.cpp \ | 26 | device/odevice_yopy.cpp \ |
26 | device/odevice_mypal.cpp \ | 27 | device/odevice_mypal.cpp \ |
27 | device/odevice_htc.cpp | 28 | device/odevice_htc.cpp \ |
29 | device/odevice_motorola_ezx.cpp | ||
28 | 30 | ||
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index c6e031f..8f5be8b 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -1,532 +1,534 @@ | |||
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-2006 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 | 30 | ||
31 | #include "odevice_beagle.h" | 31 | #include "odevice_beagle.h" |
32 | #include "odevice_ipaq.h" | 32 | #include "odevice_ipaq.h" |
33 | #include "odevice_mypal.h" | 33 | #include "odevice_mypal.h" |
34 | #include "odevice_jornada.h" | 34 | #include "odevice_jornada.h" |
35 | #include "odevice_ramses.h" | 35 | #include "odevice_ramses.h" |
36 | #include "odevice_simpad.h" | 36 | #include "odevice_simpad.h" |
37 | #include "odevice_yopy.h" | 37 | #include "odevice_yopy.h" |
38 | #include "odevice_zaurus.h" | 38 | #include "odevice_zaurus.h" |
39 | #include "odevice_genuineintel.h" | 39 | #include "odevice_genuineintel.h" |
40 | #include "odevice_htc.h" | 40 | #include "odevice_htc.h" |
41 | #include "odevice_motorola_ezx.h" | ||
41 | 42 | ||
42 | /* QT */ | 43 | /* QT */ |
43 | #include <qapplication.h> | 44 | #include <qapplication.h> |
44 | #include <qfile.h> | 45 | #include <qfile.h> |
45 | #include <qtextstream.h> | 46 | #include <qtextstream.h> |
46 | #include <qwindowsystem_qws.h> | 47 | #include <qwindowsystem_qws.h> |
47 | 48 | ||
48 | /* OPIE */ | 49 | /* OPIE */ |
49 | #include <qpe/config.h> | 50 | #include <qpe/config.h> |
50 | #include <qpe/sound.h> | 51 | #include <qpe/sound.h> |
51 | #include <qpe/qcopenvelope_qws.h> | 52 | #include <qpe/qcopenvelope_qws.h> |
52 | #include <qpe/sound.h> | 53 | #include <qpe/sound.h> |
53 | 54 | ||
54 | #include <opie2/okeyfilter.h> | 55 | #include <opie2/okeyfilter.h> |
55 | #include <opie2/oresource.h> | 56 | #include <opie2/oresource.h> |
56 | 57 | ||
57 | /* STD */ | 58 | /* STD */ |
58 | #include <fcntl.h> | 59 | #include <fcntl.h> |
59 | #include <math.h> | 60 | #include <math.h> |
60 | #include <stdlib.h> | 61 | #include <stdlib.h> |
61 | #include <signal.h> | 62 | #include <signal.h> |
62 | #include <sys/ioctl.h> | 63 | #include <sys/ioctl.h> |
63 | #include <sys/time.h> | 64 | #include <sys/time.h> |
64 | #include <unistd.h> | 65 | #include <unistd.h> |
65 | #ifndef QT_NO_SOUND | 66 | #ifndef QT_NO_SOUND |
66 | #include <linux/soundcard.h> | 67 | #include <linux/soundcard.h> |
67 | #endif | 68 | #endif |
68 | 69 | ||
69 | namespace Opie { | 70 | namespace Opie { |
70 | namespace Core { | 71 | namespace Core { |
71 | 72 | ||
72 | static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; | 73 | static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; |
73 | 74 | ||
74 | 75 | ||
75 | /* STATIC and common implementation */ | 76 | /* STATIC and common implementation */ |
76 | /* EXPORT */ ODistribution distributions[] = { | 77 | /* EXPORT */ ODistribution distributions[] = { |
77 | { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, | 78 | { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, |
78 | { System_OpenZaurus, "OpenZaurus", "/etc/openzaurus-version" }, | 79 | { System_OpenZaurus, "OpenZaurus", "/etc/openzaurus-version" }, |
79 | { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, | 80 | { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, |
80 | { System_Unknown, "Linux", "/etc/issue" }, | 81 | { System_Unknown, "Linux", "/etc/issue" }, |
81 | }; | 82 | }; |
82 | 83 | ||
83 | 84 | ||
84 | /* EXPORT */ bool isQWS(){ | 85 | /* EXPORT */ bool isQWS(){ |
85 | return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; | 86 | return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; |
86 | } | 87 | } |
87 | 88 | ||
88 | /* EXPORT */ QCString makeChannel ( const char *str ){ | 89 | /* EXPORT */ QCString makeChannel ( const char *str ){ |
89 | if ( str && !::strchr ( str, '/' )) | 90 | if ( str && !::strchr ( str, '/' )) |
90 | return QCString ( "QPE/Application/" ) + str; | 91 | return QCString ( "QPE/Application/" ) + str; |
91 | else | 92 | else |
92 | return str; | 93 | return str; |
93 | } | 94 | } |
94 | 95 | ||
95 | 96 | ||
96 | 97 | ||
97 | /* Now the default implementation of ODevice */ | 98 | /* Now the default implementation of ODevice */ |
98 | 99 | ||
99 | struct default_button default_buttons [] = { | 100 | struct default_button default_buttons [] = { |
100 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 101 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
101 | "devicebuttons/z_calendar", | 102 | "devicebuttons/z_calendar", |
102 | "datebook", "nextView()", | 103 | "datebook", "nextView()", |
103 | "today", "raise()" }, | 104 | "today", "raise()" }, |
104 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 105 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
105 | "devicebuttons/z_contact", | 106 | "devicebuttons/z_contact", |
106 | "addressbook", "raise()", | 107 | "addressbook", "raise()", |
107 | "addressbook", "beamBusinessCard()" }, | 108 | "addressbook", "beamBusinessCard()" }, |
108 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 109 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
109 | "devicebuttons/z_home", | 110 | "devicebuttons/z_home", |
110 | "QPE/Launcher", "home()", | 111 | "QPE/Launcher", "home()", |
111 | "buttonsettings", "raise()" }, | 112 | "buttonsettings", "raise()" }, |
112 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 113 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
113 | "devicebuttons/z_menu", | 114 | "devicebuttons/z_menu", |
114 | "QPE/TaskBar", "toggleMenu()", | 115 | "QPE/TaskBar", "toggleMenu()", |
115 | "QPE/TaskBar", "toggleStartMenu()" }, | 116 | "QPE/TaskBar", "toggleStartMenu()" }, |
116 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 117 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
117 | "devicebuttons/z_mail", | 118 | "devicebuttons/z_mail", |
118 | "opiemail", "raise()", | 119 | "opiemail", "raise()", |
119 | "opiemail", "newMail()" }, | 120 | "opiemail", "newMail()" }, |
120 | }; | 121 | }; |
121 | 122 | ||
122 | ODevice *ODevice::inst() | 123 | ODevice *ODevice::inst() |
123 | { | 124 | { |
124 | static ODevice *dev = 0; | 125 | static ODevice *dev = 0; |
125 | QString cpu_info; | 126 | QString cpu_info; |
126 | 127 | ||
127 | if ( !dev ) | 128 | if ( !dev ) |
128 | { | 129 | { |
129 | QFile f( PATH_PROC_CPUINFO ); | 130 | QFile f( PATH_PROC_CPUINFO ); |
130 | if ( f.open( IO_ReadOnly ) ) | 131 | if ( f.open( IO_ReadOnly ) ) |
131 | { | 132 | { |
132 | QTextStream s( &f ); | 133 | QTextStream s( &f ); |
133 | while ( !s.atEnd() ) | 134 | while ( !s.atEnd() ) |
134 | { | 135 | { |
135 | QString line; | 136 | QString line; |
136 | line = s.readLine(); | 137 | line = s.readLine(); |
137 | if ( line.startsWith( "Hardware" ) ) | 138 | if ( line.startsWith( "Hardware" ) ) |
138 | { | 139 | { |
139 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 140 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
140 | cpu_info = line; | 141 | cpu_info = line; |
141 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); | 142 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); |
142 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); | 143 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); |
143 | else if ( line.contains( "mypal", false ) ) dev = new Internal::MyPal(); | 144 | else if ( line.contains( "mypal", false ) ) dev = new Internal::MyPal(); |
144 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); | 145 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); |
145 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); | 146 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); |
146 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); | 147 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); |
147 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); | 148 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); |
148 | else if ( line.contains( "HTC", false ) ) dev = new Internal::HTC(); | 149 | else if ( line.contains( "HTC", false ) ) dev = new Internal::HTC(); |
150 | else if ( line.contains( "Motorola", false ) ) dev = new Internal::Motorola_EZX(); | ||
149 | 151 | ||
150 | else qWarning( "ODevice() - unknown hardware - using default." ); | 152 | else qWarning( "ODevice() - unknown hardware - using default." ); |
151 | break; | 153 | break; |
152 | } else if ( line.startsWith( "vendor_id" ) ) { | 154 | } else if ( line.startsWith( "vendor_id" ) ) { |
153 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 155 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
154 | cpu_info = line; | 156 | cpu_info = line; |
155 | if( line.contains( "genuineintel", false ) ) { | 157 | if( line.contains( "genuineintel", false ) ) { |
156 | dev = new Internal::GenuineIntel(); | 158 | dev = new Internal::GenuineIntel(); |
157 | break; | 159 | break; |
158 | } | 160 | } |
159 | } | 161 | } |
160 | } | 162 | } |
161 | } | 163 | } |
162 | else | 164 | else |
163 | { | 165 | { |
164 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); | 166 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); |
165 | } | 167 | } |
166 | if ( !dev ) dev = new ODevice(); | 168 | if ( !dev ) dev = new ODevice(); |
167 | dev->init(cpu_info); | 169 | dev->init(cpu_info); |
168 | } | 170 | } |
169 | return dev; | 171 | return dev; |
170 | } | 172 | } |
171 | 173 | ||
172 | ODevice::ODevice() | 174 | ODevice::ODevice() |
173 | { | 175 | { |
174 | d = new ODeviceData; | 176 | d = new ODeviceData; |
175 | 177 | ||
176 | d->m_modelstr = "Unknown"; | 178 | d->m_modelstr = "Unknown"; |
177 | d->m_model = Model_Unknown; | 179 | d->m_model = Model_Unknown; |
178 | d->m_vendorstr = "Unknown"; | 180 | d->m_vendorstr = "Unknown"; |
179 | d->m_vendor = Vendor_Unknown; | 181 | d->m_vendor = Vendor_Unknown; |
180 | d->m_systemstr = "Unknown"; | 182 | d->m_systemstr = "Unknown"; |
181 | d->m_system = System_Unknown; | 183 | d->m_system = System_Unknown; |
182 | d->m_sysverstr = "0.0"; | 184 | d->m_sysverstr = "0.0"; |
183 | d->m_rotation = Rot0; | 185 | d->m_rotation = Rot0; |
184 | d->m_direction = CW; | 186 | d->m_direction = CW; |
185 | d->m_qteDriver = "Transformed"; | 187 | d->m_qteDriver = "Transformed"; |
186 | 188 | ||
187 | d->m_holdtime = 1000; // 1000ms | 189 | d->m_holdtime = 1000; // 1000ms |
188 | d->m_buttons = 0; | 190 | d->m_buttons = 0; |
189 | d->m_cpu_frequencies = new QStrList; | 191 | d->m_cpu_frequencies = new QStrList; |
190 | 192 | ||
191 | 193 | ||
192 | /* mixer */ | 194 | /* mixer */ |
193 | d->m_sound = d->m_vol = d->m_mixer = -1; | 195 | d->m_sound = d->m_vol = d->m_mixer = -1; |
194 | 196 | ||
195 | /* System QCopChannel created */ | 197 | /* System QCopChannel created */ |
196 | d->m_initializedButtonQcop = false; | 198 | d->m_initializedButtonQcop = false; |
197 | 199 | ||
198 | // New distribution detection code first checks for legacy distributions, | 200 | // New distribution detection code first checks for legacy distributions, |
199 | // identified by /etc/familiar-version or /etc/oz_version. | 201 | // identified by /etc/familiar-version or /etc/oz_version. |
200 | // Then check for OpenEmbedded and lastly, read /etc/issue | 202 | // Then check for OpenEmbedded and lastly, read /etc/issue |
201 | 203 | ||
202 | for ( unsigned int i = 0; i < sizeof(distributions)/sizeof(ODistribution); ++i ) | 204 | for ( unsigned int i = 0; i < sizeof(distributions)/sizeof(ODistribution); ++i ) |
203 | { | 205 | { |
204 | if ( QFile::exists( distributions[i].sysvfile ) ) | 206 | if ( QFile::exists( distributions[i].sysvfile ) ) |
205 | { | 207 | { |
206 | d->m_systemstr = distributions[i].sysstr; | 208 | d->m_systemstr = distributions[i].sysstr; |
207 | d->m_system = distributions[i].system; | 209 | d->m_system = distributions[i].system; |
208 | d->m_sysverstr = "<Unknown>"; | 210 | d->m_sysverstr = "<Unknown>"; |
209 | QFile f( distributions[i].sysvfile ); | 211 | QFile f( distributions[i].sysvfile ); |
210 | if ( f.open( IO_ReadOnly ) ) | 212 | if ( f.open( IO_ReadOnly ) ) |
211 | { | 213 | { |
212 | QTextStream ts( &f ); | 214 | QTextStream ts( &f ); |
213 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); | 215 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); |
214 | } | 216 | } |
215 | break; | 217 | break; |
216 | } | 218 | } |
217 | } | 219 | } |
218 | } | 220 | } |
219 | 221 | ||
220 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) | 222 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) |
221 | { | 223 | { |
222 | if ( msg == "deviceButtonMappingChanged()" ) { | 224 | if ( msg == "deviceButtonMappingChanged()" ) { |
223 | reloadButtonMapping(); | 225 | reloadButtonMapping(); |
224 | } | 226 | } |
225 | } | 227 | } |
226 | 228 | ||
227 | void ODevice::init(const QString&) | 229 | void ODevice::init(const QString&) |
228 | { | 230 | { |
229 | } | 231 | } |
230 | 232 | ||
231 | /** | 233 | /** |
232 | * This method initialises the button mapping | 234 | * This method initialises the button mapping |
233 | */ | 235 | */ |
234 | void ODevice::initButtons() | 236 | void ODevice::initButtons() |
235 | { | 237 | { |
236 | if ( d->m_buttons ) | 238 | if ( d->m_buttons ) |
237 | return; | 239 | return; |
238 | 240 | ||
239 | qDebug ( "init Buttons" ); | 241 | qDebug ( "init Buttons" ); |
240 | d->m_buttons = new QValueList <ODeviceButton>; | 242 | d->m_buttons = new QValueList <ODeviceButton>; |
241 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { | 243 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { |
242 | default_button *db = default_buttons + i; | 244 | default_button *db = default_buttons + i; |
243 | ODeviceButton b; | 245 | ODeviceButton b; |
244 | b. setKeycode ( db->code ); | 246 | b. setKeycode ( db->code ); |
245 | b. setUserText ( QObject::tr ( "Button", db->utext )); | 247 | b. setUserText ( QObject::tr ( "Button", db->utext )); |
246 | b. setPixmap ( OResource::loadPixmap ( db->pix )); | 248 | b. setPixmap ( OResource::loadPixmap ( db->pix )); |
247 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); | 249 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); |
248 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); | 250 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); |
249 | d->m_buttons->append ( b ); | 251 | d->m_buttons->append ( b ); |
250 | } | 252 | } |
251 | 253 | ||
252 | reloadButtonMapping(); | 254 | reloadButtonMapping(); |
253 | } | 255 | } |
254 | 256 | ||
255 | ODevice::~ODevice() | 257 | ODevice::~ODevice() |
256 | { | 258 | { |
257 | // we leak m_devicebuttons and m_cpu_frequency | 259 | // we leak m_devicebuttons and m_cpu_frequency |
258 | // but it's a singleton and it is not so importantant | 260 | // but it's a singleton and it is not so importantant |
259 | // -zecke | 261 | // -zecke |
260 | delete d; | 262 | delete d; |
261 | } | 263 | } |
262 | 264 | ||
263 | /** | 265 | /** |
264 | * This method will try to suspend the device | 266 | * This method will try to suspend the device |
265 | * It only works if the user is the QWS Server and the apm application | 267 | * It only works if the user is the QWS Server and the apm application |
266 | * is installed. | 268 | * is installed. |
267 | * It tries to suspend and then waits some time cause some distributions | 269 | * It tries to suspend and then waits some time cause some distributions |
268 | * do have asynchronus apm implementations. | 270 | * do have asynchronus apm implementations. |
269 | * This method will either fail and return false or it'll suspend the | 271 | * This method will either fail and return false or it'll suspend the |
270 | * device and return once the device got woken up | 272 | * device and return once the device got woken up |
271 | * | 273 | * |
272 | * @return if the device got suspended | 274 | * @return if the device got suspended |
273 | */ | 275 | */ |
274 | bool ODevice::suspend() | 276 | bool ODevice::suspend() |
275 | { | 277 | { |
276 | return false; // default implementation == unknown device or qvfb | 278 | return false; // default implementation == unknown device or qvfb |
277 | } | 279 | } |
278 | 280 | ||
279 | /** | 281 | /** |
280 | * This sets the display on or off | 282 | * This sets the display on or off |
281 | */ | 283 | */ |
282 | bool ODevice::setDisplayStatus( bool on ) | 284 | bool ODevice::setDisplayStatus( bool on ) |
283 | { | 285 | { |
284 | qDebug( "ODevice::setDisplayStatus( %d ) - please override me.", on ); | 286 | qDebug( "ODevice::setDisplayStatus( %d ) - please override me.", on ); |
285 | return false; // don't do anything for unknown models | 287 | return false; // don't do anything for unknown models |
286 | } | 288 | } |
287 | 289 | ||
288 | /** | 290 | /** |
289 | * This sets the display brightness | 291 | * This sets the display brightness |
290 | * | 292 | * |
291 | * @param b The brightness to be set on a scale from 0 to 255 | 293 | * @param b The brightness to be set on a scale from 0 to 255 |
292 | * @return success or failure | 294 | * @return success or failure |
293 | */ | 295 | */ |
294 | bool ODevice::setDisplayBrightness( int b ) | 296 | bool ODevice::setDisplayBrightness( int b ) |
295 | { | 297 | { |
296 | qDebug( "ODevice::setDisplayBrightness( %d ) - please override me.", b ); | 298 | qDebug( "ODevice::setDisplayBrightness( %d ) - please override me.", b ); |
297 | return false; | 299 | return false; |
298 | } | 300 | } |
299 | 301 | ||
300 | /** | 302 | /** |
301 | * | 303 | * |
302 | * @returns the number of steppings on the brightness slider | 304 | * @returns the number of steppings on the brightness slider |
303 | * in the Light-'n-Power settings. Values smaller than zero and bigger | 305 | * in the Light-'n-Power settings. Values smaller than zero and bigger |
304 | * than 255 do not make sense. | 306 | * than 255 do not make sense. |
305 | * | 307 | * |
306 | * \sa QSlider::setLineStep | 308 | * \sa QSlider::setLineStep |
307 | * \sa QSlider::setPageStep | 309 | * \sa QSlider::setPageStep |
308 | */ | 310 | */ |
309 | int ODevice::displayBrightnessResolution() const | 311 | int ODevice::displayBrightnessResolution() const |
310 | { | 312 | { |
311 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); | 313 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); |
312 | return 16; | 314 | return 16; |
313 | } | 315 | } |
314 | 316 | ||
315 | /** | 317 | /** |
316 | * This sets the display contrast | 318 | * This sets the display contrast |
317 | * @param p The contrast to be set on a scale from 0 to 255 | 319 | * @param p The contrast to be set on a scale from 0 to 255 |
318 | * @returns success or failure | 320 | * @returns success or failure |
319 | */ | 321 | */ |
320 | bool ODevice::setDisplayContrast( int p ) | 322 | bool ODevice::setDisplayContrast( int p ) |
321 | { | 323 | { |
322 | qDebug( "ODevice::setDisplayContrast( %d ) - please override me.", p ); | 324 | qDebug( "ODevice::setDisplayContrast( %d ) - please override me.", p ); |
323 | return false; | 325 | return false; |
324 | } | 326 | } |
325 | 327 | ||
326 | /** | 328 | /** |
327 | * @returns the maximum value for the contrast settings slider | 329 | * @returns the maximum value for the contrast settings slider |
328 | * or 0 if the device doesn't support setting of a contrast | 330 | * or 0 if the device doesn't support setting of a contrast |
329 | */ | 331 | */ |
330 | int ODevice::displayContrastResolution() const | 332 | int ODevice::displayContrastResolution() const |
331 | { | 333 | { |
332 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); | 334 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); |
333 | return 0; | 335 | return 0; |
334 | } | 336 | } |
335 | 337 | ||
336 | /** | 338 | /** |
337 | * This returns the vendor as string | 339 | * This returns the vendor as string |
338 | * @return Vendor as QString | 340 | * @return Vendor as QString |
339 | */ | 341 | */ |
340 | QString ODevice::vendorString() const | 342 | QString ODevice::vendorString() const |
341 | { | 343 | { |
342 | return d->m_vendorstr; | 344 | return d->m_vendorstr; |
343 | } | 345 | } |
344 | 346 | ||
345 | /** | 347 | /** |
346 | * This returns the vendor as one of the values of OVendor | 348 | * This returns the vendor as one of the values of OVendor |
347 | * @return OVendor | 349 | * @return OVendor |
348 | */ | 350 | */ |
349 | OVendor ODevice::vendor() const | 351 | OVendor ODevice::vendor() const |
350 | { | 352 | { |
351 | return d->m_vendor; | 353 | return d->m_vendor; |
352 | } | 354 | } |
353 | 355 | ||
354 | /** | 356 | /** |
355 | * This returns the model as a string | 357 | * This returns the model as a string |
356 | * @return A string representing the model | 358 | * @return A string representing the model |
357 | */ | 359 | */ |
358 | QString ODevice::modelString() const | 360 | QString ODevice::modelString() const |
359 | { | 361 | { |
360 | return d->m_modelstr; | 362 | return d->m_modelstr; |
361 | } | 363 | } |
362 | 364 | ||
363 | /** | 365 | /** |
364 | * This does return the OModel used | 366 | * This does return the OModel used |
365 | */ | 367 | */ |
366 | OModel ODevice::model() const | 368 | OModel ODevice::model() const |
367 | { | 369 | { |
368 | return d->m_model; | 370 | return d->m_model; |
369 | } | 371 | } |
370 | 372 | ||
371 | /** | 373 | /** |
372 | * This does return the systen name | 374 | * This does return the systen name |
373 | */ | 375 | */ |
374 | QString ODevice::systemString() const | 376 | QString ODevice::systemString() const |
375 | { | 377 | { |
376 | return d->m_systemstr; | 378 | return d->m_systemstr; |
377 | } | 379 | } |
378 | 380 | ||
379 | /** | 381 | /** |
380 | * Return System as OSystem value | 382 | * Return System as OSystem value |
381 | */ | 383 | */ |
382 | OSystem ODevice::system() const | 384 | OSystem ODevice::system() const |
383 | { | 385 | { |
384 | return d->m_system; | 386 | return d->m_system; |
385 | } | 387 | } |
386 | 388 | ||
387 | /** | 389 | /** |
388 | * @return the version string of the base system | 390 | * @return the version string of the base system |
389 | */ | 391 | */ |
390 | QString ODevice::systemVersionString() const | 392 | QString ODevice::systemVersionString() const |
391 | { | 393 | { |
392 | return d->m_sysverstr; | 394 | return d->m_sysverstr; |
393 | } | 395 | } |
394 | 396 | ||
395 | /** | 397 | /** |
396 | * @return the current Transformation | 398 | * @return the current Transformation |
397 | */ | 399 | */ |
398 | Transformation ODevice::rotation() const | 400 | Transformation ODevice::rotation() const |
399 | { | 401 | { |
400 | return d->m_rotation; | 402 | return d->m_rotation; |
401 | } | 403 | } |
402 | 404 | ||
403 | /** | 405 | /** |
404 | * @return the current rotation direction | 406 | * @return the current rotation direction |
405 | */ | 407 | */ |
406 | ODirection ODevice::direction() const | 408 | ODirection ODevice::direction() const |
407 | { | 409 | { |
408 | return d->m_direction; | 410 | return d->m_direction; |
409 | } | 411 | } |
410 | 412 | ||
411 | QString ODevice::qteDriver() const | 413 | QString ODevice::qteDriver() const |
412 | { | 414 | { |
413 | return d->m_qteDriver; | 415 | return d->m_qteDriver; |
414 | } | 416 | } |
415 | 417 | ||
416 | /** | 418 | /** |
417 | * This plays an alarm sound | 419 | * This plays an alarm sound |
418 | */ | 420 | */ |
419 | void ODevice::playAlarmSound() | 421 | void ODevice::playAlarmSound() |
420 | { | 422 | { |
421 | #ifndef QT_NO_SOUND | 423 | #ifndef QT_NO_SOUND |
422 | static Sound snd ( "alarm" ); | 424 | static Sound snd ( "alarm" ); |
423 | 425 | ||
424 | if ( snd. isFinished()) | 426 | if ( snd. isFinished()) |
425 | snd. play(); | 427 | snd. play(); |
426 | #endif | 428 | #endif |
427 | } | 429 | } |
428 | 430 | ||
429 | /** | 431 | /** |
430 | * This plays a key sound | 432 | * This plays a key sound |
431 | */ | 433 | */ |
432 | void ODevice::playKeySound() | 434 | void ODevice::playKeySound() |
433 | { | 435 | { |
434 | #ifndef QT_NO_SOUND | 436 | #ifndef QT_NO_SOUND |
435 | static Sound snd ( "keysound" ); | 437 | static Sound snd ( "keysound" ); |
436 | 438 | ||
437 | if ( snd. isFinished()) | 439 | if ( snd. isFinished()) |
438 | snd. play(); | 440 | snd. play(); |
439 | #endif | 441 | #endif |
440 | } | 442 | } |
441 | 443 | ||
442 | /** | 444 | /** |
443 | * This plays a touch sound | 445 | * This plays a touch sound |
444 | */ | 446 | */ |
445 | void ODevice::playTouchSound() | 447 | void ODevice::playTouchSound() |
446 | { | 448 | { |
447 | #ifndef QT_NO_SOUND | 449 | #ifndef QT_NO_SOUND |
448 | static Sound snd ( "touchsound" ); | 450 | static Sound snd ( "touchsound" ); |
449 | 451 | ||
450 | if ( snd. isFinished()) | 452 | if ( snd. isFinished()) |
451 | snd. play(); | 453 | snd. play(); |
452 | #endif | 454 | #endif |
453 | } | 455 | } |
454 | 456 | ||
455 | /** | 457 | /** |
456 | * This method will return a list of leds | 458 | * This method will return a list of leds |
457 | * available on this device | 459 | * available on this device |
458 | * @return a list of LEDs. | 460 | * @return a list of LEDs. |
459 | */ | 461 | */ |
460 | QValueList <OLed> ODevice::ledList() const | 462 | QValueList <OLed> ODevice::ledList() const |
461 | { | 463 | { |
462 | return QValueList <OLed>(); | 464 | return QValueList <OLed>(); |
463 | } | 465 | } |
464 | 466 | ||
465 | /** | 467 | /** |
466 | * This does return the state of the LEDs | 468 | * This does return the state of the LEDs |
467 | */ | 469 | */ |
468 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const | 470 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const |
469 | { | 471 | { |
470 | return QValueList <OLedState>(); | 472 | return QValueList <OLedState>(); |
471 | } | 473 | } |
472 | 474 | ||
473 | /** | 475 | /** |
474 | * @return the state for a given OLed | 476 | * @return the state for a given OLed |
475 | */ | 477 | */ |
476 | OLedState ODevice::ledState ( OLed /*which*/ ) const | 478 | OLedState ODevice::ledState ( OLed /*which*/ ) const |
477 | { | 479 | { |
478 | return Led_Off; | 480 | return Led_Off; |
479 | } | 481 | } |
480 | 482 | ||
481 | /** | 483 | /** |
482 | * Set the state for a LED | 484 | * Set the state for a LED |
483 | * @param which Which OLed to use | 485 | * @param which Which OLed to use |
484 | * @param st The state to set | 486 | * @param st The state to set |
485 | * @return success or failure | 487 | * @return success or failure |
486 | */ | 488 | */ |
487 | bool ODevice::setLedState ( OLed which, OLedState st ) | 489 | bool ODevice::setLedState ( OLed which, OLedState st ) |
488 | { | 490 | { |
489 | Q_UNUSED( which ) | 491 | Q_UNUSED( which ) |
490 | Q_UNUSED( st ) | 492 | Q_UNUSED( st ) |
491 | return false; | 493 | return false; |
492 | } | 494 | } |
493 | 495 | ||
494 | /** | 496 | /** |
495 | * @return if the device has a light sensor | 497 | * @return if the device has a light sensor |
496 | */ | 498 | */ |
497 | bool ODevice::hasLightSensor() const | 499 | bool ODevice::hasLightSensor() const |
498 | { | 500 | { |
499 | return false; | 501 | return false; |
500 | } | 502 | } |
501 | 503 | ||
502 | /** | 504 | /** |
503 | * @return a value from the light sensor | 505 | * @return a value from the light sensor |
504 | */ | 506 | */ |
505 | int ODevice::readLightSensor() | 507 | int ODevice::readLightSensor() |
506 | { | 508 | { |
507 | return -1; | 509 | return -1; |
508 | } | 510 | } |
509 | 511 | ||
510 | /** | 512 | /** |
511 | * @return the light sensor resolution | 513 | * @return the light sensor resolution |
512 | */ | 514 | */ |
513 | int ODevice::lightSensorResolution() const | 515 | int ODevice::lightSensorResolution() const |
514 | { | 516 | { |
515 | return 0; | 517 | return 0; |
516 | } | 518 | } |
517 | 519 | ||
518 | /** | 520 | /** |
519 | * @return if the device has a hinge sensor | 521 | * @return if the device has a hinge sensor |
520 | */ | 522 | */ |
521 | bool ODevice::hasHingeSensor() const | 523 | bool ODevice::hasHingeSensor() const |
522 | { | 524 | { |
523 | return false; | 525 | return false; |
524 | } | 526 | } |
525 | 527 | ||
526 | /** | 528 | /** |
527 | * @return a value from the hinge sensor | 529 | * @return a value from the hinge sensor |
528 | */ | 530 | */ |
529 | OHingeStatus ODevice::readHingeSensor()const | 531 | OHingeStatus ODevice::readHingeSensor()const |
530 | { | 532 | { |
531 | return CASE_UNKNOWN; | 533 | return CASE_UNKNOWN; |
532 | } | 534 | } |
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 2566979..9afb92d 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -1,397 +1,401 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> | 3 | (C) 2002-2006 The Opie Team <opie-devel@handhelds.org> |
4 | =. | 4 | =. |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; version 2 of the License. |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef ODEVICE_H_ | 30 | #ifndef ODEVICE_H_ |
31 | #define ODEVICE_H_ | 31 | #define ODEVICE_H_ |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/odevicebutton.h> | 34 | #include <opie2/odevicebutton.h> |
35 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ | 35 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | #include <qnamespace.h> | 38 | #include <qnamespace.h> |
39 | #include <qobject.h> | 39 | #include <qobject.h> |
40 | #include <qstring.h> | 40 | #include <qstring.h> |
41 | 41 | ||
42 | 42 | ||
43 | #include <qstrlist.h> | 43 | #include <qstrlist.h> |
44 | #include <qwindowsystem_qws.h> | 44 | #include <qwindowsystem_qws.h> |
45 | 45 | ||
46 | 46 | ||
47 | class Sound; | 47 | class Sound; |
48 | 48 | ||
49 | namespace Opie{ | 49 | namespace Opie{ |
50 | namespace Core{ | 50 | namespace Core{ |
51 | 51 | ||
52 | class ODeviceData; | 52 | class ODeviceData; |
53 | /** | 53 | /** |
54 | * The available devices | 54 | * The available devices |
55 | */ | 55 | */ |
56 | enum OModel { | 56 | enum OModel { |
57 | Model_Unknown, // = 0 | 57 | Model_Unknown, // = 0 |
58 | 58 | ||
59 | Model_Series_Mask = 0xffff0000, | 59 | Model_Series_Mask = 0xffff0000, |
60 | 60 | ||
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_Jornada = ( 6 << 16 ), | 74 | Model_Jornada = ( 6 << 16 ), |
75 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), | 75 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), |
76 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), | 76 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), |
77 | 77 | ||
78 | Model_Zaurus = ( 2 << 16 ), | 78 | Model_Zaurus = ( 2 << 16 ), |
79 | 79 | ||
80 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), | 80 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), |
81 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), | 81 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), |
82 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), | 82 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), |
83 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), | 83 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), |
84 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), | 84 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), |
85 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), | 85 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), |
86 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), | 86 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), |
87 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), | 87 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), |
88 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), | 88 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), |
89 | 89 | ||
90 | Model_SIMpad = ( 3 << 16 ), | 90 | Model_SIMpad = ( 3 << 16 ), |
91 | 91 | ||
92 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), | 92 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), |
93 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), | 93 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), |
94 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), | 94 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), |
95 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), | 95 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), |
96 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), | 96 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), |
97 | 97 | ||
98 | Model_Ramses = ( 4 << 16 ), | 98 | Model_Ramses = ( 4 << 16 ), |
99 | 99 | ||
100 | Model_Ramses_All = ( Model_Ramses | 0xffff ), | 100 | Model_Ramses_All = ( Model_Ramses | 0xffff ), |
101 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), | 101 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), |
102 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), | 102 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), |
103 | 103 | ||
104 | Model_Yopy = ( 5 << 16 ), | 104 | Model_Yopy = ( 5 << 16 ), |
105 | 105 | ||
106 | Model_Yopy_All = ( Model_Yopy | 0xffff ), | 106 | Model_Yopy_All = ( Model_Yopy | 0xffff ), |
107 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), | 107 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), |
108 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), | 108 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), |
109 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), | 109 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), |
110 | 110 | ||
111 | Model_Beagle = ( 6 << 16 ), | 111 | Model_Beagle = ( 6 << 16 ), |
112 | 112 | ||
113 | Model_Beagle_All = ( Model_Beagle | 0xffff ), | 113 | Model_Beagle_All = ( Model_Beagle | 0xffff ), |
114 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), | 114 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), |
115 | 115 | ||
116 | Model_GenuineIntel = ( 7 << 16 ), | 116 | Model_GenuineIntel = ( 7 << 16 ), |
117 | 117 | ||
118 | Model_MyPal = ( 8 << 16 ), | 118 | Model_MyPal = ( 8 << 16 ), |
119 | 119 | ||
120 | Model_MyPal_All = ( Model_MyPal | 0xffff ), | 120 | Model_MyPal_All = ( Model_MyPal | 0xffff ), |
121 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), | 121 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), |
122 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), | 122 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), |
123 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ), | 123 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ), |
124 | 124 | ||
125 | Model_HTC = ( 9 << 16 ), | 125 | Model_HTC = ( 9 << 16 ), |
126 | Model_HTC_All = ( Model_HTC | 0xffff ), | 126 | Model_HTC_All = ( Model_HTC | 0xffff ), |
127 | Model_HTC_Universal = ( Model_HTC | 0x0001 ) | 127 | Model_HTC_Universal = ( Model_HTC | 0x0001 ), |
128 | |||
129 | Model_Motorola = ( 9 << 17 ), | ||
130 | Model_Motorola_All = ( Model_Motorola | 0xffff ), | ||
131 | Model_Motorola_EZX = ( Model_Motorola | 0x0001 ), | ||
132 | |||
128 | }; | 133 | }; |
129 | 134 | ||
130 | /** | 135 | /** |
131 | * The vendor of the device | 136 | * The vendor of the device |
132 | */ | 137 | */ |
133 | enum OVendor { | 138 | enum OVendor { |
134 | Vendor_Unknown, | 139 | Vendor_Unknown, |
135 | 140 | ||
136 | Vendor_HP, | 141 | Vendor_HP, |
137 | Vendor_Sharp, | 142 | Vendor_Sharp, |
138 | Vendor_SIEMENS, | 143 | Vendor_SIEMENS, |
139 | Vendor_MundN, | 144 | Vendor_MundN, |
140 | Vendor_GMate, | 145 | Vendor_GMate, |
141 | Vendor_MasterIA, | 146 | Vendor_MasterIA, |
142 | Vendor_GenuineIntel, | 147 | Vendor_GenuineIntel, |
143 | Vendor_Asus, | 148 | Vendor_Asus, |
144 | Vendor_HTC | 149 | Vendor_HTC, |
150 | Vendor_Motorola, | ||
145 | }; | 151 | }; |
146 | 152 | ||
147 | /** | 153 | /** |
148 | * The System used | 154 | * The System used |
149 | */ | 155 | */ |
150 | enum OSystem { | 156 | enum OSystem { |
151 | System_Unknown, | 157 | System_Unknown, |
152 | 158 | ||
153 | System_Familiar, | 159 | System_Familiar, |
154 | System_Zaurus, | 160 | System_Zaurus, |
155 | System_OpenZaurus, | 161 | System_OpenZaurus, |
156 | System_Linupy, | 162 | System_Linupy, |
157 | System_OpenEmbedded, | 163 | System_OpenEmbedded, |
158 | System_PC | 164 | System_PC, |
165 | System_OpenEZX, | ||
166 | System_Angstrom, | ||
159 | }; | 167 | }; |
160 | 168 | ||
161 | typedef struct { | 169 | typedef struct { |
162 | OSystem system; | 170 | OSystem system; |
163 | char* sysstr; | 171 | char* sysstr; |
164 | char* sysvfile; | 172 | char* sysvfile; |
165 | } ODistribution; | 173 | } ODistribution; |
166 | 174 | ||
167 | extern ODistribution distributions[]; | 175 | extern ODistribution distributions[]; |
168 | 176 | ||
169 | 177 | ||
170 | enum OLedState { | 178 | enum OLedState { |
171 | Led_Off, | 179 | Led_Off, |
172 | Led_On, | 180 | Led_On, |
173 | Led_BlinkSlow, | 181 | Led_BlinkSlow, |
174 | Led_BlinkFast | 182 | Led_BlinkFast |
175 | }; | 183 | }; |
176 | 184 | ||
177 | enum OLed { | 185 | enum OLed { |
178 | Led_Mail, | 186 | Led_Mail, |
179 | Led_Power, | 187 | Led_Power, |
180 | Led_BlueTooth | 188 | Led_BlueTooth |
181 | }; | 189 | }; |
182 | 190 | ||
183 | enum OHardKey { | 191 | enum OHardKey { |
184 | HardKey_Datebook = Qt::Key_F9, | 192 | HardKey_Datebook = Qt::Key_F9, |
185 | HardKey_Contacts = Qt::Key_F10, | 193 | HardKey_Contacts = Qt::Key_F10, |
186 | HardKey_Menu = Qt::Key_F11, | 194 | HardKey_Menu = Qt::Key_F11, |
187 | HardKey_Home = Qt::Key_F12, | 195 | HardKey_Home = Qt::Key_F12, |
188 | HardKey_Mail = Qt::Key_F13, | 196 | HardKey_Mail = Qt::Key_F13, |
189 | HardKey_Record = Qt::Key_F24, | 197 | HardKey_Record = Qt::Key_F24, |
190 | HardKey_Suspend = Qt::Key_F34, | 198 | HardKey_Suspend = Qt::Key_F34, |
191 | HardKey_Backlight = Qt::Key_F35, | 199 | HardKey_Backlight = Qt::Key_F35, |
192 | HardKey_Action = Qt::Key_F10, | 200 | HardKey_Action = Qt::Key_F10, |
193 | HardKey_OK = Qt::Key_F11, | 201 | HardKey_OK = Qt::Key_F11, |
194 | HardKey_End = Qt::Key_F12, | 202 | HardKey_End = Qt::Key_F12, |
195 | }; | 203 | }; |
196 | 204 | ||
197 | enum ODirection { | 205 | enum ODirection { |
198 | CW = 0, | 206 | CW = 0, |
199 | CCW = 1, | 207 | CCW = 1, |
200 | Flip = 2, | 208 | Flip = 2, |
201 | }; | 209 | }; |
202 | 210 | ||
203 | enum OHingeStatus { | 211 | enum OHingeStatus { |
204 | CASE_CLOSED = 3, | 212 | CASE_CLOSED = 3, |
205 | CASE_PORTRAIT = 2, | 213 | CASE_PORTRAIT = 2, |
206 | CASE_LANDSCAPE = 0, | 214 | CASE_LANDSCAPE = 0, |
207 | CASE_UNKNOWN = 1, | 215 | CASE_UNKNOWN = 1, |
208 | }; | 216 | }; |
209 | 217 | ||
210 | /* default button for qvfb or such | 218 | /* default button for qvfb or such |
211 | * see odevice.cpp for details. | 219 | * see odevice.cpp for details. |
212 | * hint: manage a user defined button for qvfb? | 220 | * hint: manage a user defined button for qvfb? |
213 | * alwin | 221 | * alwin |
214 | */ | 222 | */ |
215 | struct default_button { | 223 | struct default_button { |
216 | Qt::Key code; | 224 | Qt::Key code; |
217 | char *utext; | 225 | char *utext; |
218 | char *pix; | 226 | char *pix; |
219 | char *fpressedservice; | 227 | char *fpressedservice; |
220 | char *fpressedaction; | 228 | char *fpressedaction; |
221 | char *fheldservice; | 229 | char *fheldservice; |
222 | char *fheldaction; | 230 | char *fheldaction; |
223 | }; | 231 | }; |
224 | 232 | ||
225 | /** | 233 | /** |
226 | * A singleton which gives informations about device specefic option | 234 | * A singleton which gives informations about device specefic option |
227 | * like the Hardware used, LEDs, the Base Distribution and | 235 | * like the Hardware used, LEDs, the Base Distribution and |
228 | * hardware key mappings. | 236 | * hardware key mappings. |
229 | * | 237 | * |
230 | * @short A small class for device specific options | 238 | * @short A small class for device specific options |
231 | * @see QObject | 239 | * @see QObject |
232 | * @author Robert Griebl | 240 | * @author Robert Griebl |
233 | * @version 1.0 | 241 | * @version 1.0 |
234 | */ | 242 | */ |
235 | class ODevice : public QObject | 243 | class ODevice : public QObject |
236 | { | 244 | { |
237 | Q_OBJECT | 245 | Q_OBJECT |
238 | 246 | ||
239 | private: | 247 | private: |
240 | /* disable copy */ | 248 | /* disable copy */ |
241 | ODevice ( const ODevice & ); | 249 | ODevice ( const ODevice & ); |
242 | 250 | ||
243 | protected: | 251 | protected: |
244 | ODevice(); | 252 | ODevice(); |
245 | virtual void init(const QString&); | 253 | virtual void init(const QString&); |
246 | virtual void initButtons(); | 254 | virtual void initButtons(); |
247 | static void sendSuspendmsg(); | 255 | static void sendSuspendmsg(); |
248 | 256 | ||
249 | ODeviceData *d; | 257 | ODeviceData *d; |
250 | 258 | ||
251 | public: | 259 | public: |
252 | // sandman do we want to allow destructions? -zecke? | 260 | // sandman do we want to allow destructions? -zecke? |
253 | virtual ~ODevice(); | 261 | virtual ~ODevice(); |
254 | static ODevice *inst(); | 262 | static ODevice *inst(); |
255 | 263 | ||
256 | // information | 264 | // information |
257 | QString modelString() const; | 265 | QString modelString() const; |
258 | OModel model() const; | 266 | OModel model() const; |
259 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } | 267 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } |
260 | 268 | ||
261 | QString vendorString() const; | 269 | QString vendorString() const; |
262 | OVendor vendor() const; | 270 | OVendor vendor() const; |
263 | 271 | ||
264 | QString systemString() const; | 272 | QString systemString() const; |
265 | OSystem system() const; | 273 | OSystem system() const; |
266 | 274 | ||
267 | QString systemVersionString() const; | 275 | QString systemVersionString() const; |
268 | 276 | ||
269 | virtual Transformation rotation() const; | 277 | virtual Transformation rotation() const; |
270 | virtual ODirection direction() const; | 278 | virtual ODirection direction() const; |
271 | 279 | ||
272 | QString qteDriver() const; | 280 | QString qteDriver() const; |
273 | 281 | ||
274 | // system | 282 | // system |
275 | virtual bool suspend(); | 283 | virtual bool suspend(); |
276 | 284 | ||
277 | virtual bool setDisplayStatus ( bool on ); | 285 | virtual bool setDisplayStatus ( bool on ); |
278 | virtual bool setDisplayBrightness ( int brightness ); | 286 | virtual bool setDisplayBrightness ( int brightness ); |
279 | virtual int displayBrightnessResolution() const; | 287 | virtual int displayBrightnessResolution() const; |
280 | virtual bool setDisplayContrast ( int contrast ); | 288 | virtual bool setDisplayContrast ( int contrast ); |
281 | virtual int displayContrastResolution() const; | 289 | virtual int displayContrastResolution() const; |
282 | 290 | ||
283 | // don't add new virtual methods, use this: | 291 | // don't add new virtual methods, use this: |
284 | // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; | 292 | // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; |
285 | // and in your subclass do overwrite | 293 | // and in your subclass do overwrite |
286 | // protected virtual int virtual_hook(int, void *) | 294 | // protected virtual int virtual_hook(int, void *) |
287 | // which is defined below | 295 | // which is defined below |
288 | 296 | ||
289 | // input / output | 297 | // input / output |
290 | virtual void playAlarmSound(); | 298 | virtual void playAlarmSound(); |
291 | virtual void playKeySound(); | 299 | virtual void playKeySound(); |
292 | virtual void playTouchSound(); | 300 | virtual void playTouchSound(); |
293 | 301 | ||
294 | virtual QValueList <OLed> ledList() const; | 302 | virtual QValueList <OLed> ledList() const; |
295 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 303 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
296 | virtual OLedState ledState ( OLed led ) const; | 304 | virtual OLedState ledState ( OLed led ) const; |
297 | virtual bool setLedState ( OLed led, OLedState st ); | 305 | virtual bool setLedState ( OLed led, OLedState st ); |
298 | 306 | ||
299 | virtual bool hasLightSensor() const; | 307 | virtual bool hasLightSensor() const; |
300 | virtual int readLightSensor(); | 308 | virtual int readLightSensor(); |
301 | virtual int lightSensorResolution() const; | 309 | virtual int lightSensorResolution() const; |
302 | 310 | ||
303 | virtual bool hasHingeSensor() const; | 311 | virtual bool hasHingeSensor() const; |
304 | virtual OHingeStatus readHingeSensor()const; | 312 | virtual OHingeStatus readHingeSensor()const; |
305 | 313 | ||
306 | const QStrList &allowedCpuFrequencies() const; | 314 | const QStrList &allowedCpuFrequencies() const; |
307 | bool setCurrentCpuFrequency(uint index); | 315 | bool setCurrentCpuFrequency(uint index); |
308 | 316 | ||
309 | /** | 317 | /** |
310 | * Returns the available buttons on this device. The number and location | 318 | * Returns the available buttons on this device. The number and location |
311 | * of buttons will vary depending on the device. Button numbers will be assigned | 319 | * of buttons will vary depending on the device. Button numbers will be assigned |
312 | * by the device manufacturer and will be from most preferred button to least preffered | 320 | * by the device manufacturer and will be from most preferred button to least preffered |
313 | * button. Note that this list only contains "user mappable" buttons. | 321 | * button. Note that this list only contains "user mappable" buttons. |
314 | * | 322 | * |
315 | * @todo Make method const and take care of calling initButtons or make that const too | 323 | * @todo Make method const and take care of calling initButtons or make that const too |
316 | * | 324 | * |
317 | */ | 325 | */ |
318 | const QValueList<ODeviceButton> &buttons(); | 326 | const QValueList<ODeviceButton> &buttons(); |
319 | 327 | ||
320 | /** | 328 | /** |
321 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it | 329 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it |
322 | * returns 0L | 330 | * returns 0L |
323 | */ | 331 | */ |
324 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); | 332 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); |
325 | 333 | ||
326 | /** | 334 | /** |
327 | * Reassigns the pressed action for \a button. To return to the factory | 335 | * Reassigns the pressed action for \a button. To return to the factory |
328 | * default pass an empty string as \a qcopMessage. | 336 | * default pass an empty string as \a qcopMessage. |
329 | */ | 337 | */ |
330 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); | 338 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); |
331 | 339 | ||
332 | /** | 340 | /** |
333 | * Reassigns the held action for \a button. To return to the factory | 341 | * Reassigns the held action for \a button. To return to the factory |
334 | * default pass an empty string as \a qcopMessage. | 342 | * default pass an empty string as \a qcopMessage. |
335 | */ | 343 | */ |
336 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); | 344 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); |
337 | 345 | ||
338 | /** | 346 | /** |
339 | * How long (in ms) you have to press a button for a "hold" action | 347 | * How long (in ms) you have to press a button for a "hold" action |
340 | */ | 348 | */ |
341 | uint buttonHoldTime() const; | 349 | uint buttonHoldTime() const; |
342 | 350 | ||
343 | signals: | 351 | signals: |
344 | void buttonMappingChanged(); | 352 | void buttonMappingChanged(); |
345 | 353 | ||
346 | private slots: | 354 | private slots: |
347 | void systemMessage ( const QCString &, const QByteArray & ); | 355 | void systemMessage ( const QCString &, const QByteArray & ); |
348 | void playingStopped(); | 356 | void playingStopped(); |
349 | 357 | ||
350 | protected: | 358 | protected: |
351 | void addPreHandler(QWSServer::KeyboardFilter*aFilter); | 359 | void addPreHandler(QWSServer::KeyboardFilter*aFilter); |
352 | void remPreHandler(QWSServer::KeyboardFilter*aFilter); | 360 | void remPreHandler(QWSServer::KeyboardFilter*aFilter); |
353 | void reloadButtonMapping(); | 361 | void reloadButtonMapping(); |
354 | void changeMixerForAlarm( int mixer, const char* file, Sound *snd); | 362 | void changeMixerForAlarm( int mixer, const char* file, Sound *snd); |
355 | 363 | ||
356 | /* ugly virtual hook */ | 364 | /* ugly virtual hook */ |
357 | virtual void virtual_hook( int id, void* data ); | 365 | virtual void virtual_hook( int id, void* data ); |
358 | }; | 366 | }; |
359 | 367 | ||
360 | class ODeviceData { | 368 | class ODeviceData { |
361 | 369 | ||
362 | public: | 370 | public: |
363 | QString m_vendorstr; | 371 | QString m_vendorstr; |
364 | OVendor m_vendor; | 372 | OVendor m_vendor; |
365 | 373 | ||
366 | QString m_modelstr; | 374 | QString m_modelstr; |
367 | OModel m_model; | 375 | OModel m_model; |
368 | 376 | ||
369 | QString m_systemstr; | 377 | QString m_systemstr; |
370 | OSystem m_system; | 378 | OSystem m_system; |
371 | 379 | ||
372 | QString m_sysverstr; | 380 | QString m_sysverstr; |
373 | 381 | ||
374 | Transformation m_rotation; | 382 | Transformation m_rotation; |
375 | ODirection m_direction; | 383 | ODirection m_direction; |
376 | 384 | ||
377 | QString m_qteDriver; | 385 | QString m_qteDriver; |
378 | 386 | ||
379 | QValueList <ODeviceButton> *m_buttons; | 387 | QValueList <ODeviceButton> *m_buttons; |
380 | uint m_holdtime; | 388 | uint m_holdtime; |
381 | QStrList *m_cpu_frequencies; | 389 | QStrList *m_cpu_frequencies; |
382 | bool m_initializedButtonQcop : 1; | 390 | bool m_initializedButtonQcop : 1; |
383 | 391 | ||
384 | /* values for changeMixerForAlarm */ | 392 | /* values for changeMixerForAlarm */ |
385 | int m_sound, m_vol, m_mixer; | 393 | int m_sound, m_vol, m_mixer; |
386 | }; | 394 | }; |
387 | 395 | ||
388 | extern bool isQWS(); | 396 | extern bool isQWS(); |
389 | extern QCString makeChannel ( const char *str ); | 397 | extern QCString makeChannel ( const char *str ); |
390 | } | 398 | } |
391 | } | 399 | } |
392 | 400 | ||
393 | |||
394 | |||
395 | |||
396 | #endif | 401 | #endif |
397 | |||
diff --git a/libopie2/opiecore/device/odevice_motorola_ezx.cpp b/libopie2/opiecore/device/odevice_motorola_ezx.cpp new file mode 100644 index 0000000..69256dd --- a/dev/null +++ b/libopie2/opiecore/device/odevice_motorola_ezx.cpp | |||
@@ -0,0 +1,325 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | =. (C) 2006 Michael 'Mickey' Lauer <mickey@Vanille.de> | ||
4 | .=l. | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This program is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; version 2 of the License. | ||
11 | ._= =} : | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This program is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
18 | ..}^=.= = ; Library General Public License for more | ||
19 | ++= -. .` .: details. | ||
20 | : = ...= . :.=- | ||
21 | -. .:....=;==+<; You should have received a copy of the GNU | ||
22 | -_. . . )=. = Library General Public License along with | ||
23 | -- :-=` this library; see the file COPYING.LIB. | ||
24 | If not, write to the Free Software Foundation, | ||
25 | Inc., 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | */ | ||
28 | |||
29 | #include "odevice_motorola_ezx.h" | ||
30 | |||
31 | /* OPIE */ | ||
32 | #include <opie2/oinputsystem.h> | ||
33 | #include <opie2/oresource.h> | ||
34 | |||
35 | #include <qpe/config.h> | ||
36 | #include <qpe/sound.h> | ||
37 | |||
38 | /* QT */ | ||
39 | #include <qapplication.h> | ||
40 | #include <qfile.h> | ||
41 | #include <qtextstream.h> | ||
42 | #include <qwindowsystem_qws.h> | ||
43 | #include <qcopchannel_qws.h> | ||
44 | |||
45 | /* STD */ | ||
46 | #include <assert.h> | ||
47 | #include <string.h> | ||
48 | #include <errno.h> | ||
49 | #include <fcntl.h> | ||
50 | #include <math.h> | ||
51 | #include <stdlib.h> | ||
52 | #include <signal.h> | ||
53 | #include <sys/ioctl.h> | ||
54 | #include <sys/time.h> | ||
55 | #include <unistd.h> | ||
56 | #ifndef QT_NO_SOUND | ||
57 | #include <linux/soundcard.h> | ||
58 | #endif | ||
59 | |||
60 | using namespace Opie::Core; | ||
61 | using namespace Opie::Core::Internal; | ||
62 | |||
63 | struct ezx_button ezx_buttons [] = { | ||
64 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | ||
65 | "devicebuttons/z_calendar", | ||
66 | "datebook", "nextView()", | ||
67 | "today", "raise()" }, | ||
68 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | ||
69 | "devicebuttons/z_contact", | ||
70 | "addressbook", "raise()", | ||
71 | "addressbook", "beamBusinessCard()" }, | ||
72 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | ||
73 | "devicebuttons/z_home", | ||
74 | "QPE/Launcher", "home()", | ||
75 | "buttonsettings", "raise()" }, | ||
76 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | ||
77 | "devicebuttons/z_menu", | ||
78 | "QPE/TaskBar", "toggleMenu()", | ||
79 | "QPE/TaskBar", "toggleStartMenu()" }, | ||
80 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | ||
81 | "devicebuttons/z_mail", | ||
82 | "opiemail", "raise()", | ||
83 | "opiemail", "newMail()" }, | ||
84 | }; | ||
85 | |||
86 | void Motorola_EZX::init(const QString& cpu_info) | ||
87 | { | ||
88 | qDebug( "Motorola_EZX::init()" ); | ||
89 | // Set the time to wait until the system is really suspended | ||
90 | // the delta between apm --suspend and sleeping | ||
91 | setAPMTimeOut( 15000 ); | ||
92 | |||
93 | d->m_vendorstr = "OpenEZX Team"; | ||
94 | d->m_systemstr = "OpenEZX"; | ||
95 | d->m_system = System_OpenEZX; | ||
96 | // sysver already gathered | ||
97 | |||
98 | // check the Motorola_EZX model | ||
99 | QString model; | ||
100 | int loc = cpu_info.find( ":" ); | ||
101 | if ( loc != -1 ) | ||
102 | model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); | ||
103 | else | ||
104 | model = cpu_info; | ||
105 | |||
106 | if ( model == "Motorola Ezx Platform" ) { | ||
107 | d->m_model = Model_Motorola_EZX; | ||
108 | d->m_modelstr = "Motorola_EZX"; | ||
109 | } else assert( 0 ); | ||
110 | |||
111 | // set path to backlight device in kernel 2.6 | ||
112 | m_backlightdev = "/sys/class/backlight/ezx-bl/"; | ||
113 | d->m_rotation = Rot0; | ||
114 | //initHingeSensor(); | ||
115 | |||
116 | // set default qte driver and led state | ||
117 | d->m_qteDriver = "Transformed"; | ||
118 | m_leds[0] = Led_Off; | ||
119 | |||
120 | qDebug( "Motorola_EZX::init() - Using the 2.6 OpenEZX HAL on a %s", (const char*) d->m_modelstr ); | ||
121 | } | ||
122 | |||
123 | void Motorola_EZX::initButtons() | ||
124 | { | ||
125 | qDebug( "Motorola_EZX::initButtons()" ); | ||
126 | if ( d->m_buttons ) | ||
127 | return; | ||
128 | |||
129 | d->m_buttons = new QValueList <ODeviceButton>; | ||
130 | |||
131 | struct ezx_button * ezx_buttons; | ||
132 | int buttoncount; | ||
133 | |||
134 | /* | ||
135 | |||
136 | switch ( d->m_model ) | ||
137 | { | ||
138 | case Model_Motorola_EZX_SL6000: | ||
139 | pezx_buttons = ezx_buttons_6000; | ||
140 | buttoncount = ARRAY_SIZE(ezx_buttons_6000); | ||
141 | break; | ||
142 | case Model_Motorola_EZX_SLC3100: // fallthrough | ||
143 | case Model_Motorola_EZX_SLC3000: // fallthrough | ||
144 | case Model_Motorola_EZX_SLC1000: // fallthrough | ||
145 | case Model_Motorola_EZX_SLC7x0: | ||
146 | if ( isQWS( ) ) | ||
147 | { | ||
148 | addPreHandler(this); | ||
149 | } | ||
150 | pezx_buttons = ezx_buttons_c700; | ||
151 | buttoncount = ARRAY_SIZE(ezx_buttons_c700); | ||
152 | break; | ||
153 | default: | ||
154 | pezx_buttons = ezx_buttons; | ||
155 | buttoncount = ARRAY_SIZE(ezx_buttons); | ||
156 | break; | ||
157 | } | ||
158 | |||
159 | for ( int i = 0; i < buttoncount; i++ ) { | ||
160 | struct ezx_button *zb = pezx_buttons + i; | ||
161 | ODeviceButton b; | ||
162 | |||
163 | b.setKeycode( zb->code ); | ||
164 | b.setUserText( QObject::tr( "Button", zb->utext )); | ||
165 | b.setPixmap( OResource::loadPixmap( zb->pix )); | ||
166 | b.setFactoryPresetPressedAction( OQCopMessage( makeChannel ( zb->fpressedservice ), zb->fpressedaction )); | ||
167 | b.setFactoryPresetHeldAction( OQCopMessage( makeChannel ( zb->fheldservice ), zb->fheldaction )); | ||
168 | d->m_buttons->append( b ); | ||
169 | } | ||
170 | */ | ||
171 | reloadButtonMapping(); | ||
172 | } | ||
173 | |||
174 | void Motorola_EZX::playAlarmSound() | ||
175 | { | ||
176 | #ifndef QT_NO_SOUND | ||
177 | static Sound snd ( "alarm" ); | ||
178 | if(!snd.isFinished()) | ||
179 | return; | ||
180 | |||
181 | changeMixerForAlarm(0, "/dev/sound/mixer", &snd ); | ||
182 | snd. play(); | ||
183 | #endif | ||
184 | } | ||
185 | |||
186 | QValueList <OLed> Motorola_EZX::ledList() const | ||
187 | { | ||
188 | QValueList <OLed> vl; | ||
189 | vl << Led_Mail; | ||
190 | return vl; | ||
191 | } | ||
192 | |||
193 | QValueList <OLedState> Motorola_EZX::ledStateList( OLed l ) const | ||
194 | { | ||
195 | QValueList <OLedState> vl; | ||
196 | |||
197 | if ( l == Led_Mail ) | ||
198 | vl << Led_Off << Led_On << Led_BlinkSlow; | ||
199 | return vl; | ||
200 | } | ||
201 | |||
202 | OLedState Motorola_EZX::ledState( OLed which ) const | ||
203 | { | ||
204 | if ( which == Led_Mail ) | ||
205 | return m_leds [0]; | ||
206 | else | ||
207 | return Led_Off; | ||
208 | } | ||
209 | |||
210 | bool Motorola_EZX::setLedState( OLed which, OLedState st ) | ||
211 | { | ||
212 | // Currently not supported | ||
213 | qDebug( "Motorola_EZX::setLedState: ODevice handling not yet implemented" ); | ||
214 | return false; | ||
215 | } | ||
216 | |||
217 | int Motorola_EZX::displayBrightnessResolution() const | ||
218 | { | ||
219 | // Currently not supported | ||
220 | qDebug( "Motorola_EZX::displayBrightnessResolution: ODevice handling not yet implemented" ); | ||
221 | return 100; | ||
222 | |||
223 | #if 0 | ||
224 | int res = 1; | ||
225 | if (m_embedix) | ||
226 | { | ||
227 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_RDWR|O_NONBLOCK ); | ||
228 | if ( fd ) | ||
229 | { | ||
230 | int value = ::ioctl( fd, SHARP_FL_IOCTL_GET_STEP, 0 ); | ||
231 | ::close( fd ); | ||
232 | return value ? value : res; | ||
233 | } | ||
234 | } | ||
235 | else | ||
236 | { | ||
237 | int fd = ::open( m_backlightdev + "max_brightness", O_RDONLY|O_NONBLOCK ); | ||
238 | if ( fd ) | ||
239 | { | ||
240 | char buf[100]; | ||
241 | if ( ::read( fd, &buf[0], sizeof buf ) ) ::sscanf( &buf[0], "%d", &res ); | ||
242 | ::close( fd ); | ||
243 | } | ||
244 | } | ||
245 | return res; | ||
246 | #endif | ||
247 | } | ||
248 | |||
249 | bool Motorola_EZX::setDisplayBrightness( int bright ) | ||
250 | { | ||
251 | qDebug( "Motorola_EZX::setDisplayBrightness( %d )", bright ); | ||
252 | return false; | ||
253 | |||
254 | #if 0 | ||
255 | bool res = false; | ||
256 | |||
257 | if ( bright > 255 ) bright = 255; | ||
258 | if ( bright < 0 ) bright = 0; | ||
259 | |||
260 | int numberOfSteps = displayBrightnessResolution(); | ||
261 | int val = ( bright == 1 ) ? 1 : ( bright * numberOfSteps ) / 255; | ||
262 | |||
263 | if ( m_embedix ) | ||
264 | { | ||
265 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); | ||
266 | if ( fd ) | ||
267 | { | ||
268 | res = ( ::ioctl( fd, SHARP_FL_IOCTL_STEP_CONTRAST, val ) == 0 ); | ||
269 | ::close( fd ); | ||
270 | } | ||
271 | } | ||
272 | else | ||
273 | { | ||
274 | int fd = ::open( m_backlightdev + "brightness", O_WRONLY|O_NONBLOCK ); | ||
275 | if ( fd ) | ||
276 | { | ||
277 | char buf[100]; | ||
278 | int len = ::snprintf( &buf[0], sizeof buf, "%d", val ); | ||
279 | res = ( ::write( fd, &buf[0], len ) == 0 ); | ||
280 | ::close( fd ); | ||
281 | } | ||
282 | } | ||
283 | return res; | ||
284 | #endif | ||
285 | } | ||
286 | |||
287 | bool Motorola_EZX::setDisplayStatus( bool on ) | ||
288 | { | ||
289 | bool res = false; | ||
290 | int fd = ::open( m_backlightdev + "power", O_WRONLY|O_NONBLOCK ); | ||
291 | if ( fd ) | ||
292 | { | ||
293 | char buf[10]; | ||
294 | buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; | ||
295 | buf[1] = '\0'; | ||
296 | res = ( ::write( fd, &buf[0], 2 ) == 0 ); | ||
297 | ::close( fd ); | ||
298 | } | ||
299 | return res; | ||
300 | } | ||
301 | |||
302 | void Motorola_EZX::systemMessage( const QCString &msg, const QByteArray & ) | ||
303 | { | ||
304 | if ( msg == "deviceButtonMappingChanged()" ) { | ||
305 | reloadButtonMapping(); | ||
306 | } | ||
307 | } | ||
308 | |||
309 | bool Motorola_EZX::suspend() { | ||
310 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | ||
311 | return false; | ||
312 | |||
313 | bool res = false; | ||
314 | QCopChannel::send( "QPE/System", "aboutToSuspend()" ); | ||
315 | |||
316 | struct timeval tvs, tvn; | ||
317 | ::gettimeofday ( &tvs, 0 ); | ||
318 | |||
319 | ::sync(); // flush fs caches | ||
320 | res = ( ::system ( "apm --suspend" ) == 0 ); | ||
321 | |||
322 | QCopChannel::send( "QPE/System", "returnFromSuspend()" ); | ||
323 | |||
324 | return res; | ||
325 | } | ||
diff --git a/libopie2/opiecore/device/odevice_motorola_ezx.h b/libopie2/opiecore/device/odevice_motorola_ezx.h new file mode 100644 index 0000000..c0bd6c7 --- a/dev/null +++ b/libopie2/opiecore/device/odevice_motorola_ezx.h | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | =. (C) 2006 Michael 'Mickey' Lauer <mickey@Vanille.de> | ||
4 | .=l. | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This program is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; version 2 of the License. | ||
11 | ._= =} : | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This program is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
18 | ..}^=.= = ; Library General Public License for more | ||
19 | ++= -. .` .: details. | ||
20 | : = ...= . :.=- | ||
21 | -. .:....=;==+<; You should have received a copy of the GNU | ||
22 | -_. . . )=. = Library General Public License along with | ||
23 | -- :-=` this library; see the file COPYING.LIB. | ||
24 | If not, write to the Free Software Foundation, | ||
25 | Inc., 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | */ | ||
28 | |||
29 | #ifndef ODEVICE_MOTOROLA_EZX | ||
30 | #define ODEVICE_MOTOROLA_EZX | ||
31 | |||
32 | #include "odevice_abstractmobiledevice.h" | ||
33 | |||
34 | /* QT */ | ||
35 | #include <qfile.h> | ||
36 | #include <qwindowsystem_qws.h> | ||
37 | |||
38 | #ifndef ARRAY_SIZE | ||
39 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
40 | #endif | ||
41 | |||
42 | // Audio | ||
43 | // LED | ||
44 | // Power Management | ||
45 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) | ||
46 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) | ||
47 | #define APM_EVT_POWER_BUTTON (1 << 0) | ||
48 | |||
49 | // Vesa Standard | ||
50 | #define FB_BLANK_UNBLANK 0 | ||
51 | #define FB_BLANK_POWERDOWN 4 | ||
52 | |||
53 | namespace Opie { | ||
54 | namespace Core { | ||
55 | namespace Internal { | ||
56 | |||
57 | class Motorola_EZX : public OAbstractMobileDevice | ||
58 | { | ||
59 | Q_OBJECT | ||
60 | |||
61 | protected: | ||
62 | virtual void init(const QString&); | ||
63 | virtual void initButtons(); | ||
64 | //void initHingeSensor(); | ||
65 | |||
66 | protected slots: | ||
67 | //void hingeSensorTriggered(); | ||
68 | void systemMessage( const QCString &msg, const QByteArray & ); | ||
69 | |||
70 | public: | ||
71 | virtual bool setDisplayBrightness( int b ); | ||
72 | virtual bool setDisplayStatus( bool on ); | ||
73 | virtual int displayBrightnessResolution() const; | ||
74 | |||
75 | virtual void playAlarmSound(); | ||
76 | |||
77 | virtual QValueList <OLed> ledList() const; | ||
78 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | ||
79 | virtual OLedState ledState( OLed led ) const; | ||
80 | virtual bool setLedState( OLed led, OLedState st ); | ||
81 | |||
82 | virtual bool suspend(); | ||
83 | |||
84 | protected: | ||
85 | QString m_backlightdev; | ||
86 | OLedState m_leds[1]; | ||
87 | QFile m_hinge; | ||
88 | }; | ||
89 | |||
90 | struct ezx_button { | ||
91 | Qt::Key code; | ||
92 | char *utext; | ||
93 | char *pix; | ||
94 | char *fpressedservice; | ||
95 | char *fpressedaction; | ||
96 | char *fheldservice; | ||
97 | char *fheldaction; | ||
98 | }; | ||
99 | } | ||
100 | } | ||
101 | } | ||
102 | #endif | ||