author | llornkcor <llornkcor> | 2006-04-23 20:19:27 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2006-04-23 20:19:27 (UTC) |
commit | 226ccbb7d87a54411d640432f0ac19cbd942aa01 (patch) (unidiff) | |
tree | 6d343d37cc3e9c2c4b9a8148a8f7cb32d110c322 | |
parent | fce7a143353e2bdd41d878c6f0a1224e0f2a158e (diff) | |
download | opie-226ccbb7d87a54411d640432f0ac19cbd942aa01.zip opie-226ccbb7d87a54411d640432f0ac19cbd942aa01.tar.gz opie-226ccbb7d87a54411d640432f0ac19cbd942aa01.tar.bz2 |
add support for HTC Universal device
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Vars.make | 3 | ||||
-rw-r--r-- | config.in | 6 | ||||
-rw-r--r-- | libopie2/opiecore/device/device.pro | 6 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 9 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_htc.h | 154 | ||||
-rw-r--r-- | mkspecs/qws/linux-htc-g++/qmake.conf | 81 |
8 files changed, 260 insertions, 5 deletions
@@ -1,356 +1,357 @@ | |||
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 | 9 | * Added hardware support for HTC Universal (ljp) | |
10 | |||
10 | Fixed Bugs | 11 | Fixed Bugs |
11 | ---------- | 12 | ---------- |
12 | * #1695 - Date selector use too small fontsize on VGA screen (hrw) | 13 | * #1695 - Date selector use too small fontsize on VGA screen (hrw) |
13 | * #1686 - opie-console lack UI setting for switching scrollbar (hrw) | 14 | * #1686 - opie-console lack UI setting for switching scrollbar (hrw) |
14 | * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) | 15 | * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) |
15 | * #1624 - Button settngs changes are applied only after restart (hrw) | 16 | * #1624 - Button settngs changes are applied only after restart (hrw) |
16 | * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) | 17 | * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) |
17 | * n.a. - remove hardcoded font size from wellenreiter (hrw) | 18 | * n.a. - remove hardcoded font size from wellenreiter (hrw) |
18 | * n.a. - added patch to build QT/E 2.3.10 with gcc 4.x.x (hrw) | 19 | * n.a. - added patch to build QT/E 2.3.10 with gcc 4.x.x (hrw) |
19 | * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) | 20 | * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) |
20 | * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) | 21 | * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) |
21 | * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) | 22 | * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) |
22 | * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw) | 23 | * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw) |
23 | * n.a. - Set version to 1.2.1 in About applet (hrw) | 24 | * n.a. - Set version to 1.2.1 in About applet (hrw) |
24 | * n.a. - add firstusage and background pictures for 480x640 devices (mickeyl) | 25 | * n.a. - add firstusage and background pictures for 480x640 devices (mickeyl) |
25 | 26 | ||
26 | Internal | 27 | Internal |
27 | -------- | 28 | -------- |
28 | * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw) | 29 | * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw) |
29 | * libopiecore: SL6000 (tosa) now uses corgi-bl (Dirk Opfer) | 30 | * libopiecore: SL6000 (tosa) now uses corgi-bl (Dirk Opfer) |
30 | 31 | ||
31 | 2005-09-11Opie 1.2.1 | 32 | 2005-09-11Opie 1.2.1 |
32 | 33 | ||
33 | 34 | ||
34 | New Features | 35 | New Features |
35 | ------------ | 36 | ------------ |
36 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) | 37 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) |
37 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) | 38 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) |
38 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) | 39 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) |
39 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) | 40 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) |
40 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) | 41 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) |
41 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) | 42 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) |
42 | * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) | 43 | * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) |
43 | * ZSafe: Made UI conform to Opie standards (drw) | 44 | * ZSafe: Made UI conform to Opie standards (drw) |
44 | * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) | 45 | * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) |
45 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) | 46 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) |
46 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) | 47 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) |
47 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) | 48 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) |
48 | * Opie-smb: Added Opie front end for Samba (ljp) | 49 | * Opie-smb: Added Opie front end for Samba (ljp) |
49 | * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) | 50 | * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) |
50 | * Opieplayer: rudimentary podcast support (ljp) | 51 | * Opieplayer: rudimentary podcast support (ljp) |
51 | 52 | ||
52 | Fixed Bugs | 53 | Fixed Bugs |
53 | ---------- | 54 | ---------- |
54 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) | 55 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) |
55 | - We actually suspend the complete Opie now in that case. | 56 | - We actually suspend the complete Opie now in that case. |
56 | * #1384 - Battery status updated improperly when charging (skyhusker) | 57 | * #1384 - Battery status updated improperly when charging (skyhusker) |
57 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) | 58 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) |
58 | * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) | 59 | * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) |
59 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) | 60 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) |
60 | * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) | 61 | * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) |
61 | * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) | 62 | * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) |
62 | * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) | 63 | * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) |
63 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) | 64 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) |
64 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) | 65 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) |
65 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) | 66 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) |
66 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) | 67 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) |
67 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) | 68 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) |
68 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) | 69 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) |
69 | * #1679 - Security PIN plugin is QVGA sized (hrw) | 70 | * #1679 - Security PIN plugin is QVGA sized (hrw) |
70 | * #1682 - Properly resize tab control in OTabWidget (drw) | 71 | * #1682 - Properly resize tab control in OTabWidget (drw) |
71 | * n.a. - always show volume and wireless applet popups inside visible screen (deller) | 72 | * n.a. - always show volume and wireless applet popups inside visible screen (deller) |
72 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) | 73 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) |
73 | * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) | 74 | * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) |
74 | * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) | 75 | * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) |
75 | * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) | 76 | * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) |
76 | * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) | 77 | * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) |
77 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) | 78 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) |
78 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) | 79 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) |
79 | * n.a. - remove hardcoded font size from netsystemtime (hrw) | 80 | * n.a. - remove hardcoded font size from netsystemtime (hrw) |
80 | * n.a. - remove hardcoded font size from checkbook graphs (hrw) | 81 | * n.a. - remove hardcoded font size from checkbook graphs (hrw) |
81 | * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) | 82 | * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) |
82 | 83 | ||
83 | 84 | ||
84 | Internal | 85 | Internal |
85 | -------- | 86 | -------- |
86 | * Make BluezApplet use OTaskbarApplet (mickeyl) | 87 | * Make BluezApplet use OTaskbarApplet (mickeyl) |
87 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) | 88 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) |
88 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) | 89 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) |
89 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) | 90 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) |
90 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) | 91 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) |
91 | * libopienet: Miscellaneous API cleanups (mickeyl) | 92 | * libopienet: Miscellaneous API cleanups (mickeyl) |
92 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) | 93 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) |
93 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) | 94 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) |
94 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) | 95 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) |
95 | * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) | 96 | * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) |
96 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) | 97 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) |
97 | * Fix / Optimize number of scanned directories (ljp) | 98 | * Fix / Optimize number of scanned directories (ljp) |
98 | * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) | 99 | * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) |
99 | 100 | ||
100 | 2005-03-25Opie 1.2.0 | 101 | 2005-03-25Opie 1.2.0 |
101 | 102 | ||
102 | Fixed Bugs | 103 | Fixed Bugs |
103 | ---------- | 104 | ---------- |
104 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 105 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
105 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 106 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
106 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 107 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
107 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 108 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
108 | * n.a.- make qpeglobal.h include qglobal.h (zecke) | 109 | * n.a.- make qpeglobal.h include qglobal.h (zecke) |
109 | 110 | ||
110 | 2005-03-20Opie 1.2.0-rc1 | 111 | 2005-03-20Opie 1.2.0-rc1 |
111 | 112 | ||
112 | 113 | ||
113 | New Features | 114 | New Features |
114 | ------------ | 115 | ------------ |
115 | * Launcher: Support a static background pixmap (mickeyl) | 116 | * Launcher: Support a static background pixmap (mickeyl) |
116 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 117 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
117 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 118 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
118 | * Added hi-res inline images for large resolution devices (drw) | 119 | * Added hi-res inline images for large resolution devices (drw) |
119 | * Improved launcher icons for consistency (ar) | 120 | * Improved launcher icons for consistency (ar) |
120 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 121 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
121 | 122 | ||
122 | Fixed Bugs | 123 | Fixed Bugs |
123 | ---------- | 124 | ---------- |
124 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 125 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
125 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 126 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
126 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 127 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
127 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 128 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
128 | * #1482 - Fix double '/' in paths (zecke) | 129 | * #1482 - Fix double '/' in paths (zecke) |
129 | * #1536 - Autosave of custom locations in opie backup (ar) | 130 | * #1536 - Autosave of custom locations in opie backup (ar) |
130 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 131 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
131 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 132 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
132 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 133 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
133 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 134 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
134 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 135 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
135 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 136 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
136 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 137 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
137 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 138 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
138 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 139 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
139 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 140 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
140 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 141 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
141 | * #1604 - Checkbook crashed on startup (drw) | 142 | * #1604 - Checkbook crashed on startup (drw) |
142 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 143 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
143 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 144 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
144 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 145 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
145 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 146 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
146 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 147 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
147 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 148 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
148 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 149 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
149 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 150 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
150 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 151 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
151 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 152 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
152 | 153 | ||
153 | Internal | 154 | Internal |
154 | -------- | 155 | -------- |
155 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 156 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
156 | * Killed the need for weak symbols in QtE (zecke) | 157 | * Killed the need for weak symbols in QtE (zecke) |
157 | * Added optional building libqpe without inline images (mickeyl) | 158 | * Added optional building libqpe without inline images (mickeyl) |
158 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 159 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
159 | 160 | ||
160 | 2005-02-03Opie 1.1.9 | 161 | 2005-02-03Opie 1.1.9 |
161 | 162 | ||
162 | New Features | 163 | New Features |
163 | ------------ | 164 | ------------ |
164 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 165 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
165 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 166 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
166 | * Usability enhancements in OpieIRC (skyhusker) | 167 | * Usability enhancements in OpieIRC (skyhusker) |
167 | 168 | ||
168 | Fixed Bugs | 169 | Fixed Bugs |
169 | ---------- | 170 | ---------- |
170 | * #1501 - Fixed bug in todo sql backend (eilers) | 171 | * #1501 - Fixed bug in todo sql backend (eilers) |
171 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 172 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
172 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 173 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
173 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 174 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
174 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 175 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
175 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 176 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
176 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 177 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
177 | 178 | ||
178 | Internal | 179 | Internal |
179 | -------- | 180 | -------- |
180 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 181 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
181 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 182 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
182 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 183 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
183 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 184 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
184 | * Build tree cleanups (mickeyl) | 185 | * Build tree cleanups (mickeyl) |
185 | 186 | ||
186 | 2004-11-26Opie 1.1.8 | 187 | 2004-11-26Opie 1.1.8 |
187 | 188 | ||
188 | New Features | 189 | New Features |
189 | ------------ | 190 | ------------ |
190 | * PackageManager supports installation of local ipkg files (drw) | 191 | * PackageManager supports installation of local ipkg files (drw) |
191 | * PackageManager supports linking of applications to root (drw) | 192 | * PackageManager supports linking of applications to root (drw) |
192 | * PackageManager supports src/gz feeds (drw,wimpie) | 193 | * PackageManager supports src/gz feeds (drw,wimpie) |
193 | * Added a syslog information tab to sysinfo (mickeyl) | 194 | * Added a syslog information tab to sysinfo (mickeyl) |
194 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 195 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
195 | 196 | ||
196 | Fixed Bugs | 197 | Fixed Bugs |
197 | ---------- | 198 | ---------- |
198 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 199 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
199 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 200 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
200 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 201 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
201 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 202 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
202 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 203 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
203 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 204 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
204 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 205 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
205 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 206 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
206 | 207 | ||
207 | Internal | 208 | Internal |
208 | -------- | 209 | -------- |
209 | * Moved libopie1 to unsupported (mickeyl) | 210 | * Moved libopie1 to unsupported (mickeyl) |
210 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 211 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
211 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 212 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
212 | 213 | ||
213 | 2004-11-14Opie 1.1.7 | 214 | 2004-11-14Opie 1.1.7 |
214 | 215 | ||
215 | New Features | 216 | New Features |
216 | ------------ | 217 | ------------ |
217 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 218 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
218 | * Backup now uses the busy indicator when backing up and restore (ar) | 219 | * Backup now uses the busy indicator when backing up and restore (ar) |
219 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 220 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
220 | * OpiePlayer2 better error handling (zecke) | 221 | * OpiePlayer2 better error handling (zecke) |
221 | * OpiePlayer2 progress indication while streaming (zecke) | 222 | * OpiePlayer2 progress indication while streaming (zecke) |
222 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 223 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
223 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 224 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
224 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 225 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
225 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 226 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
226 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 227 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
227 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 228 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
228 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 229 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
229 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 230 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
230 | * Opie-Security gained a 'test authentication' button (clem) | 231 | * Opie-Security gained a 'test authentication' button (clem) |
231 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 232 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
232 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 233 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
233 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 234 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
234 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 235 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
235 | 236 | ||
236 | Fixed Bugs | 237 | Fixed Bugs |
237 | ---------- | 238 | ---------- |
238 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 239 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
239 | * #608 - Make Opie usable for left handed users (zecke) | 240 | * #608 - Make Opie usable for left handed users (zecke) |
240 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 241 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
241 | * #1245 - Opie-Go 'paused' (zecke) | 242 | * #1245 - Opie-Go 'paused' (zecke) |
242 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 243 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
243 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 244 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
244 | * #1395 - Build VNC Backend with gcc3.4 | 245 | * #1395 - Build VNC Backend with gcc3.4 |
245 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 246 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
246 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 247 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
247 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 248 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
248 | * #1448 - Brightness Applet added (mickeyl) | 249 | * #1448 - Brightness Applet added (mickeyl) |
249 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 250 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
250 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 251 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
251 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 252 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
252 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 253 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
253 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 254 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
254 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 255 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) |
255 | * 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) | 256 | * 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) |
256 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 257 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
257 | 258 | ||
258 | Internal | 259 | Internal |
259 | -------- | 260 | -------- |
260 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 261 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
261 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 262 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
262 | 263 | ||
263 | 2004-09-17Opie 1.1.6 | 264 | 2004-09-17Opie 1.1.6 |
264 | 265 | ||
265 | New Features | 266 | New Features |
266 | ------------ | 267 | ------------ |
267 | * Fifteen gained configurable number of items (zecke) | 268 | * Fifteen gained configurable number of items (zecke) |
268 | * Fifteen can have custom background images (zecke) | 269 | * Fifteen can have custom background images (zecke) |
269 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) | 270 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) |
270 | * Integrated the new security framework into libopie2 (zecke,clem) | 271 | * Integrated the new security framework into libopie2 (zecke,clem) |
271 | * Converted the launcher to use the new security framework (zecke) | 272 | * Converted the launcher to use the new security framework (zecke) |
272 | * Backup can now handle custom locations for backup and restore (ar) | 273 | * Backup can now handle custom locations for backup and restore (ar) |
273 | * Implemented right-on-hold feedback (wimpie,zecke) | 274 | * Implemented right-on-hold feedback (wimpie,zecke) |
274 | * Lots of new features in opie-reader (tim,pohly) | 275 | * Lots of new features in opie-reader (tim,pohly) |
275 | * Build system cleanups (schurig) | 276 | * Build system cleanups (schurig) |
276 | 277 | ||
277 | Fixed Bugs | 278 | Fixed Bugs |
278 | -------- | 279 | -------- |
279 | * #1005 - Fixed backup to CompactFlash (ar) | 280 | * #1005 - Fixed backup to CompactFlash (ar) |
280 | * #1167 - Fixed Opie write crashing on more text than one page (ar) | 281 | * #1167 - Fixed Opie write crashing on more text than one page (ar) |
281 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) | 282 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) |
282 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) | 283 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) |
283 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) | 284 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) |
284 | * #1370 - Pimconverter now reacts on cancel key (eilers) | 285 | * #1370 - Pimconverter now reacts on cancel key (eilers) |
285 | * #1376 - Bring back the capslock/numlock display (zecke) | 286 | * #1376 - Bring back the capslock/numlock display (zecke) |
286 | * #1383 - Language settings now warns about losing open apps (Markus Litz) | 287 | * #1383 - Language settings now warns about losing open apps (Markus Litz) |
287 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) | 288 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) |
288 | * #1394 - Fixed oversized headline in opie-login (coredump) | 289 | * #1394 - Fixed oversized headline in opie-login (coredump) |
289 | * #1396 - Opie-console captures the escape key and vim is working (zecke) | 290 | * #1396 - Opie-console captures the escape key and vim is working (zecke) |
290 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) | 291 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) |
291 | 292 | ||
292 | 2004-07-06Opie 1.1.4 | 293 | 2004-07-06Opie 1.1.4 |
293 | 294 | ||
294 | New Features | 295 | New Features |
295 | ------------ | 296 | ------------ |
296 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) | 297 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) |
297 | * Added Conversion tool for pim-data (eilers) | 298 | * Added Conversion tool for pim-data (eilers) |
298 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) | 299 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) |
299 | * Modified the PIM API for providing generic use of OPimRecords (eilers) | 300 | * Modified the PIM API for providing generic use of OPimRecords (eilers) |
300 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) | 301 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) |
301 | 302 | ||
302 | Fixed Bugs | 303 | Fixed Bugs |
303 | -------- | 304 | -------- |
304 | * #1068 - Country Drop Down Box Off Screen | 305 | * #1068 - Country Drop Down Box Off Screen |
305 | * #1291 - Opie tinykate does not open .desktop files (ar) | 306 | * #1291 - Opie tinykate does not open .desktop files (ar) |
306 | * #1291 - Opie sheet not saving correctly (ar) | 307 | * #1291 - Opie sheet not saving correctly (ar) |
307 | * #1294 - Opie does not know about British Summer Time | 308 | * #1294 - Opie does not know about British Summer Time |
308 | * #1314 - Drawpad initialization (mickeyl) | 309 | * #1314 - Drawpad initialization (mickeyl) |
309 | * #1317 - Packagemanager crashes on hold-down or install (chicken) | 310 | * #1317 - Packagemanager crashes on hold-down or install (chicken) |
310 | * #1321 - Batteryapplet graphic glitch (harlekin) | 311 | * #1321 - Batteryapplet graphic glitch (harlekin) |
311 | * #1324 - ZSafe not starting up (mickeyl) | 312 | * #1324 - ZSafe not starting up (mickeyl) |
312 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) | 313 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) |
313 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) | 314 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) |
314 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) | 315 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) |
315 | * #1348 - Datebook dependency on libopiedb2 (chicken) | 316 | * #1348 - Datebook dependency on libopiedb2 (chicken) |
316 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) | 317 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) |
317 | 318 | ||
318 | 2004-04-25Opie 1.1.3 | 319 | 2004-04-25Opie 1.1.3 |
319 | 320 | ||
320 | * Introduced first implementation of SQL-Support using SQLite (eilers) | 321 | * Introduced first implementation of SQL-Support using SQLite (eilers) |
321 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) | 322 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) |
322 | * Added a real system graffiti character set (brad) | 323 | * Added a real system graffiti character set (brad) |
323 | * Added Generic Keyconfig Widget (zecke) | 324 | * Added Generic Keyconfig Widget (zecke) |
324 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) | 325 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) |
325 | * Added new Bible reader app - opie-dagger (drw) | 326 | * Added new Bible reader app - opie-dagger (drw) |
326 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) | 327 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) |
327 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) | 328 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) |
328 | * Enabled the possibility to pass command line arguments to applications (mickeyl) | 329 | * Enabled the possibility to pass command line arguments to applications (mickeyl) |
329 | * Added an about applet showing some credits and information about Opie (mickeyl) | 330 | * Added an about applet showing some credits and information about Opie (mickeyl) |
330 | * Added benchmarking functionality to sysinfo (mickeyl) | 331 | * Added benchmarking functionality to sysinfo (mickeyl) |
331 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) | 332 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) |
332 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) | 333 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) |
333 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) | 334 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) |
334 | * Clean-up of package information in control files (drw) | 335 | * Clean-up of package information in control files (drw) |
335 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) | 336 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) |
336 | * Improved big-screen support (zecke,ar) | 337 | * Improved big-screen support (zecke,ar) |
337 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) | 338 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) |
338 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) | 339 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) |
339 | * Added new package manager - opie-packagemanager (drw) | 340 | * Added new package manager - opie-packagemanager (drw) |
340 | * Improved light-n-power for C7x0 (mickeyl) | 341 | * Improved light-n-power for C7x0 (mickeyl) |
341 | * Added automatic rotation support for C7x0 (treke) | 342 | * Added automatic rotation support for C7x0 (treke) |
342 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) | 343 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) |
343 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) | 344 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) |
344 | 345 | ||
345 | 2003-11-29Opie 1.0.3 | 346 | 2003-11-29Opie 1.0.3 |
346 | 347 | ||
347 | * Released as Version 1.0.3 | 348 | * Released as Version 1.0.3 |
348 | * Improved i18n (various contributors) | 349 | * Improved i18n (various contributors) |
349 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) | 350 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) |
350 | * Made the Documents Tab optional (mickeyl) | 351 | * Made the Documents Tab optional (mickeyl) |
351 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) | 352 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) |
352 | 353 | ||
353 | 2003-08-04Opie 1.0.0 | 354 | 2003-08-04Opie 1.0.0 |
354 | 355 | ||
355 | * Released as Version 1.0.0 | 356 | * Released as Version 1.0.0 |
356 | * Including a PPP module for easy dial up (tille,harlekin,zecke) | 357 | * Including a PPP module for easy dial up (tille,harlekin,zecke) |
@@ -1,138 +1,141 @@ | |||
1 | prefix=/opt/QtPalmtop | 1 | prefix=/opt/QtPalmtop |
2 | 2 | ||
3 | ifeq ($(OPIEDIR),) | 3 | ifeq ($(OPIEDIR),) |
4 | export OPIEDIR:=$(TOPDIR) | 4 | export OPIEDIR:=$(TOPDIR) |
5 | endif | 5 | endif |
6 | ifeq ($(IPK_DIR),) | 6 | ifeq ($(IPK_DIR),) |
7 | export IPK_DIR:=$(OPIEDIR) | 7 | export IPK_DIR:=$(OPIEDIR) |
8 | endif | 8 | endif |
9 | 9 | ||
10 | ifneq ($(wildcard $(TOPDIR)/.config),) | 10 | ifneq ($(wildcard $(TOPDIR)/.config),) |
11 | include $(TOPDIR)/.config | 11 | include $(TOPDIR)/.config |
12 | endif | 12 | endif |
13 | 13 | ||
14 | ifndef CONFIG_TARGET_OE | 14 | ifndef CONFIG_TARGET_OE |
15 | ifndef QTDIR | 15 | ifndef QTDIR |
16 | $(error QTDIR not set) | 16 | $(error QTDIR not set) |
17 | endif | 17 | endif |
18 | else | 18 | else |
19 | OEDIR:=$(shell echo $(CONFIG_OE_BUILD_DIR) | sed -e's/"//g') | 19 | OEDIR:=$(shell echo $(CONFIG_OE_BUILD_DIR) | sed -e's/"//g') |
20 | OEHOSTSYS:=$(shell echo $(CONFIG_OE_HOST_SYS) | sed -e's/"//g') | 20 | OEHOSTSYS:=$(shell echo $(CONFIG_OE_HOST_SYS) | sed -e's/"//g') |
21 | OETARGETSYS:=$(shell echo $(CONFIG_OE_TARGET_SYS) | sed -e's/"//g') | 21 | OETARGETSYS:=$(shell echo $(CONFIG_OE_TARGET_SYS) | sed -e's/"//g') |
22 | QTDIR:=$(shell echo $(OEDIR) | sed -e's/"//g')/tmp/staging/$(OETARGETSYS)/qt2 | 22 | QTDIR:=$(shell echo $(OEDIR) | sed -e's/"//g')/tmp/staging/$(OETARGETSYS)/qt2 |
23 | $(shell mkdir -p $(QTDIR)/src/moc) | 23 | $(shell mkdir -p $(QTDIR)/src/moc) |
24 | $(shell echo -e "all: \n\t" >>$(QTDIR)/src/moc/Makefile) | 24 | $(shell echo -e "all: \n\t" >>$(QTDIR)/src/moc/Makefile) |
25 | PLATFORM=sharp-linux | 25 | PLATFORM=sharp-linux |
26 | endif | 26 | endif |
27 | 27 | ||
28 | ifdef CONFIG_TARGET_X86 | 28 | ifdef CONFIG_TARGET_X86 |
29 | PLATFORM=x86-linux | 29 | PLATFORM=x86-linux |
30 | endif | 30 | endif |
31 | ifdef CONFIG_TARGET_64BIT | 31 | ifdef CONFIG_TARGET_64BIT |
32 | PLATFORM=64bit-linux | 32 | PLATFORM=64bit-linux |
33 | endif | 33 | endif |
34 | ifdef CONFIG_TARGET_SHARP | 34 | ifdef CONFIG_TARGET_SHARP |
35 | PLATFORM=sharp-linux | 35 | PLATFORM=sharp-linux |
36 | endif | 36 | endif |
37 | ifdef CONFIG_TARGET_IPAQ | 37 | ifdef CONFIG_TARGET_IPAQ |
38 | PLATFORM=ipaq-linux | 38 | PLATFORM=ipaq-linux |
39 | endif | 39 | endif |
40 | ifdef CONFIG_TARGET_RAMSES | 40 | ifdef CONFIG_TARGET_RAMSES |
41 | PLATFORM=ramses-linux | 41 | PLATFORM=ramses-linux |
42 | endif | 42 | endif |
43 | ifdef CONFIG_TARGET_SIMPAD | 43 | ifdef CONFIG_TARGET_SIMPAD |
44 | PLATFORM=simpad-linux | 44 | PLATFORM=simpad-linux |
45 | endif | 45 | endif |
46 | 46 | ||
47 | ifdef CONFIG_TARGET_YOPY | 47 | ifdef CONFIG_TARGET_YOPY |
48 | PLATFORM=yopy-linux | 48 | PLATFORM=yopy-linux |
49 | endif | 49 | endif |
50 | ifdef CONFIG_TARGET_MACOSX | 50 | ifdef CONFIG_TARGET_MACOSX |
51 | PLATFORM=macx-darwin | 51 | PLATFORM=macx-darwin |
52 | endif | 52 | endif |
53 | ifdef CONFIG_TARGET_HTC | ||
54 | PLATFORM=htc-linux | ||
55 | endif | ||
53 | 56 | ||
54 | export QMAKE:=$(OPIEDIR)/qmake/qmake | 57 | export QMAKE:=$(OPIEDIR)/qmake/qmake |
55 | export QMAKESPECSDIR=$(OPIEDIR)/mkspecs | 58 | export QMAKESPECSDIR=$(OPIEDIR)/mkspecs |
56 | 59 | ||
57 | ifeq ($(QPE_VERSION),) | 60 | ifeq ($(QPE_VERSION),) |
58 | VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) | 61 | VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) |
59 | VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) | 62 | VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) |
60 | VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h)) | 63 | VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h)) |
61 | QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT) | 64 | QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT) |
62 | 65 | ||
63 | ifeq ($(QPE_VERSION),..) | 66 | ifeq ($(QPE_VERSION),..) |
64 | QPE_VERSION=1.1.2 | 67 | QPE_VERSION=1.1.2 |
65 | endif | 68 | endif |
66 | endif | 69 | endif |
67 | export QPE_VERSION | 70 | export QPE_VERSION |
68 | 71 | ||
69 | SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h)) | 72 | SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h)) |
70 | ifeq ($(VERSION_CVS),) | 73 | ifeq ($(VERSION_CVS),) |
71 | VERSION_CVS:=$(shell date +%s) | 74 | VERSION_CVS:=$(shell date +%s) |
72 | endif | 75 | endif |
73 | ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),) | 76 | ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),) |
74 | SUB_VERSION:=$(VERSION_CVS) | 77 | SUB_VERSION:=$(VERSION_CVS) |
75 | endif | 78 | endif |
76 | export SUB_VERSION | 79 | export SUB_VERSION |
77 | 80 | ||
78 | ifneq ($(strip $(SUB_VERSION)),) | 81 | ifneq ($(strip $(SUB_VERSION)),) |
79 | EXTRAVERSION=-$(SUB_VERSION) | 82 | EXTRAVERSION=-$(SUB_VERSION) |
80 | endif | 83 | endif |
81 | 84 | ||
82 | ifeq ($(QTE_REVISION),) | 85 | ifeq ($(QTE_REVISION),) |
83 | QTE_REVISION=6 | 86 | QTE_REVISION=6 |
84 | endif | 87 | endif |
85 | export QTE_REVISION | 88 | export QTE_REVISION |
86 | 89 | ||
87 | export DEB_VERSION=2.0 | 90 | export DEB_VERSION=2.0 |
88 | 91 | ||
89 | ifeq ($(QTE_BASEVERSION),) | 92 | ifeq ($(QTE_BASEVERSION),) |
90 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) | 93 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) |
91 | QTE_BASEVERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION'|grep -v STR|sed -e 's/\#define QT_VERSION\t*//; s/.*\([0-9]\)\([0-9]\)\([0-9]\).*/\1.\2.\3/;') | 94 | QTE_BASEVERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION'|grep -v STR|sed -e 's/\#define QT_VERSION\t*//; s/.*\([0-9]\)\([0-9]\)\([0-9]\).*/\1.\2.\3/;') |
92 | else | 95 | else |
93 | QTE_BASEVERSION=2.3.7 | 96 | QTE_BASEVERSION=2.3.7 |
94 | endif | 97 | endif |
95 | endif | 98 | endif |
96 | export QTE_BASEVERSION | 99 | export QTE_BASEVERSION |
97 | 100 | ||
98 | ifeq ($(QTE_VERSION),) | 101 | ifeq ($(QTE_VERSION),) |
99 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) | 102 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) |
100 | QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;') | 103 | QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;') |
101 | else | 104 | else |
102 | QTE_VERSION=2.3.7 | 105 | QTE_VERSION=2.3.7 |
103 | endif | 106 | endif |
104 | endif | 107 | endif |
105 | export QTE_VERSION | 108 | export QTE_VERSION |
106 | 109 | ||
107 | export PATH:=$(OPIEDIR)/scripts:$(PATH) | 110 | export PATH:=$(OPIEDIR)/scripts:$(PATH) |
108 | export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) | 111 | export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) |
109 | 112 | ||
110 | ifdef CONFIG_OPTIMIZATIONS | 113 | ifdef CONFIG_OPTIMIZATIONS |
111 | export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) | 114 | export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) |
112 | export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) | 115 | export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) |
113 | endif | 116 | endif |
114 | 117 | ||
115 | ifeq ($(STRIP),) | 118 | ifeq ($(STRIP),) |
116 | ifneq ($(CONFIG_TARGET_X86),) | 119 | ifneq ($(CONFIG_TARGET_X86),) |
117 | STRIP=strip | 120 | STRIP=strip |
118 | endif | 121 | endif |
119 | ifneq ($(CONFIG_TARGET_64BIT),) | 122 | ifneq ($(CONFIG_TARGET_64BIT),) |
120 | STRIP=strip | 123 | STRIP=strip |
121 | endif | 124 | endif |
122 | ifneq ($(CONFIG_TARGET_IPAQ),) | 125 | ifneq ($(CONFIG_TARGET_IPAQ),) |
123 | STRIP=arm-linux-strip | 126 | STRIP=arm-linux-strip |
124 | endif | 127 | endif |
125 | ifneq ($(CONFIG_TARGET_SHARP),) | 128 | ifneq ($(CONFIG_TARGET_SHARP),) |
126 | STRIP=arm-linux-strip | 129 | STRIP=arm-linux-strip |
127 | endif | 130 | endif |
128 | ifneq ($(CONFIG_TARGET_RAMSES),) | 131 | ifneq ($(CONFIG_TARGET_RAMSES),) |
129 | STRIP=arm-linux-strip | 132 | STRIP=arm-linux-strip |
130 | endif | 133 | endif |
131 | ifneq ($(CONFIG_TARGET_SIMPAD),) | 134 | ifneq ($(CONFIG_TARGET_SIMPAD),) |
132 | STRIP=arm-linux-strip | 135 | STRIP=arm-linux-strip |
133 | endif | 136 | endif |
134 | ifneq ($(CONFIG_TARGET_YOPY),) | 137 | ifneq ($(CONFIG_TARGET_YOPY),) |
135 | STRIP=arm-linux-strip | 138 | STRIP=arm-linux-strip |
136 | endif | 139 | endif |
137 | endif | 140 | endif |
138 | 141 | ||
@@ -1,291 +1,297 @@ | |||
1 | mainmenu "Opie Configuration" | 1 | mainmenu "Opie Configuration" |
2 | 2 | ||
3 | menu "Build Parameters" | 3 | menu "Build Parameters" |
4 | 4 | ||
5 | choice | 5 | choice |
6 | prompt "Target Machine" | 6 | prompt "Target Machine" |
7 | default TARGET_X86 | 7 | default TARGET_X86 |
8 | help | 8 | help |
9 | Please select the architecture of the machine you will be | 9 | Please select the architecture of the machine you will be |
10 | building the OpenZaurus buildroot for. | 10 | building the OpenZaurus buildroot for. |
11 | 11 | ||
12 | config TARGET_X86 | 12 | config TARGET_X86 |
13 | boolean "Intel X86" | 13 | boolean "Intel X86" |
14 | 14 | ||
15 | config TARGET_MACOSX | 15 | config TARGET_MACOSX |
16 | boolean "Mac OS X (DARWIN)" | 16 | boolean "Mac OS X (DARWIN)" |
17 | 17 | ||
18 | config TARGET_SHARP | 18 | config TARGET_SHARP |
19 | boolean "Sharp Zaurus w/ SA1100 (5000 and 5500)" | 19 | boolean "Sharp Zaurus w/ SA1100 (5000 and 5500)" |
20 | 20 | ||
21 | config TARGET_C700 | 21 | config TARGET_C700 |
22 | boolean "Sharp Zaurus w/ PXA25x (5600, C7x0, C8x0)" | 22 | boolean "Sharp Zaurus w/ PXA25x (5600, C7x0, C8x0)" |
23 | 23 | ||
24 | config TARGET_OE | 24 | config TARGET_OE |
25 | boolean "OpenEmbedded w/ OE build dir set below" | 25 | boolean "OpenEmbedded w/ OE build dir set below" |
26 | 26 | ||
27 | config TARGET_IPAQ | 27 | config TARGET_IPAQ |
28 | boolean "iPAQ" | 28 | boolean "iPAQ" |
29 | 29 | ||
30 | config TARGET_RAMSES | 30 | config TARGET_RAMSES |
31 | boolean "Ramses" | 31 | boolean "Ramses" |
32 | 32 | ||
33 | config TARGET_SIMPAD | 33 | config TARGET_SIMPAD |
34 | boolean "SIMpad" | 34 | boolean "SIMpad" |
35 | 35 | ||
36 | config TARGET_YOPY | 36 | config TARGET_YOPY |
37 | boolean "Yopy 3500/3700" | 37 | boolean "Yopy 3500/3700" |
38 | 38 | ||
39 | config TARGET_HTC | ||
40 | boolean "HTC" | ||
41 | |||
39 | config TARGET_64BIT | 42 | config TARGET_64BIT |
40 | boolean "64 BIT" | 43 | boolean "64 BIT" |
41 | 44 | ||
42 | endchoice | 45 | endchoice |
43 | 46 | ||
44 | config OE_BUILD_DIR | 47 | config OE_BUILD_DIR |
45 | depends TARGET_OE | 48 | depends TARGET_OE |
46 | string "OE build directory" | 49 | string "OE build directory" |
47 | default ">>>set OpenEmbedded build directory here<<<" | 50 | default ">>>set OpenEmbedded build directory here<<<" |
48 | 51 | ||
49 | config OE_HOST_SYS | 52 | config OE_HOST_SYS |
50 | depends TARGET_OE | 53 | depends TARGET_OE |
51 | string "OE host system" | 54 | string "OE host system" |
52 | default "i686-linux" | 55 | default "i686-linux" |
53 | 56 | ||
54 | config OE_TARGET_SYS | 57 | config OE_TARGET_SYS |
55 | depends TARGET_OE | 58 | depends TARGET_OE |
56 | string "OE target system" | 59 | string "OE target system" |
57 | default "arm-linux" | 60 | default "arm-linux" |
58 | 61 | ||
59 | config OPTIMIZE | 62 | config OPTIMIZE |
60 | boolean "Use optimizations" | 63 | boolean "Use optimizations" |
61 | default "y" if ! TARGET_X86 | 64 | default "y" if ! TARGET_X86 |
62 | 65 | ||
63 | config THREADED | 66 | config THREADED |
64 | boolean "Enable threaded build" | 67 | boolean "Enable threaded build" |
65 | default "n" | 68 | default "n" |
66 | 69 | ||
67 | config STATIC | 70 | config STATIC |
68 | boolean "Build static libraries" | 71 | boolean "Build static libraries" |
69 | default "n" | 72 | default "n" |
70 | 73 | ||
71 | config DEBUG | 74 | config DEBUG |
72 | boolean "Enable debug builds" | 75 | boolean "Enable debug builds" |
73 | default n | 76 | default n |
74 | 77 | ||
75 | config RELEASE | 78 | config RELEASE |
76 | bool | 79 | bool |
77 | default y | 80 | default y |
78 | depends !DEBUG | 81 | depends !DEBUG |
79 | 82 | ||
80 | config QUICK_LAUNCH | 83 | config QUICK_LAUNCH |
81 | boolean "Enable Quick Launch" | 84 | boolean "Enable Quick Launch" |
82 | default n if TARGET_X86 | 85 | default n if TARGET_X86 |
83 | default y if ! TARGET_X86 | 86 | default y if ! TARGET_X86 |
84 | 87 | ||
85 | config QUICKLAUNCH_PATH | 88 | config QUICKLAUNCH_PATH |
86 | string "Path to quicklauncher" | 89 | string "Path to quicklauncher" |
87 | default "./quicklauncher" if TARGET_X86 | 90 | default "./quicklauncher" if TARGET_X86 |
88 | default "/opt/QtPalmtop/bin/quicklauncher" if ! TARGET_X86 | 91 | default "/opt/QtPalmtop/bin/quicklauncher" if ! TARGET_X86 |
89 | 92 | ||
90 | config SPECFILE | 93 | config SPECFILE |
91 | string | 94 | string |
92 | default "qws/linux-generic-g++" if TARGET_X86 && (! X11) | 95 | default "qws/linux-generic-g++" if TARGET_X86 && (! X11) |
93 | default "linux-g++" if TARGET_X86 && X11 | 96 | default "linux-g++" if TARGET_X86 && X11 |
94 | default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) | 97 | default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) |
95 | default "linux-g++" if TARGET_SHARP && X11 | 98 | default "linux-g++" if TARGET_SHARP && X11 |
96 | default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) | 99 | default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) |
97 | default "linux-g++" if TARGET_IPAQ && X11 | 100 | default "linux-g++" if TARGET_IPAQ && X11 |
98 | default "qws/linux-ramses-g++" if TARGET_RAMSES && (! X11) | 101 | default "qws/linux-ramses-g++" if TARGET_RAMSES && (! X11) |
99 | default "linux-g++" if TARGET_RAMSES && X11 | 102 | default "linux-g++" if TARGET_RAMSES && X11 |
100 | default "qws/linux-simpad-g++" if TARGET_SIMPAD && (! X11) | 103 | default "qws/linux-simpad-g++" if TARGET_SIMPAD && (! X11) |
101 | default "linux-g++" if TARGET_SIMPAD && X11 | 104 | default "linux-g++" if TARGET_SIMPAD && X11 |
102 | default "qws/linux-yopy-g++" if TARGET_YOPY && (! X11) | 105 | default "qws/linux-yopy-g++" if TARGET_YOPY && (! X11) |
103 | default "qws/macx-generic-g++" if TARGET_MACOSX && (! X11) | 106 | default "qws/macx-generic-g++" if TARGET_MACOSX && (! X11) |
104 | default "qws/linux-oe-g++" if TARGET_OE && (!X11) | 107 | default "qws/linux-oe-g++" if TARGET_OE && (!X11) |
108 | default "qws/linux-htc-g++" if TARGET_HTC && (! X11) | ||
109 | default "linux-g++" if TARGET_HTC && X11 | ||
105 | 110 | ||
106 | config CUSTOMFILE | 111 | config CUSTOMFILE |
107 | string | 112 | string |
108 | default "custom-ipaq.h" if TARGET_IPAQ | 113 | default "custom-ipaq.h" if TARGET_IPAQ |
109 | default "custom-sharp.h" if TARGET_SHARP | 114 | default "custom-sharp.h" if TARGET_SHARP |
110 | default "custom-ramses.h" if TARGET_RAMSES | 115 | default "custom-ramses.h" if TARGET_RAMSES |
111 | default "custom-ipaq.h" if TARGET_SIMPAD | 116 | default "custom-ipaq.h" if TARGET_SIMPAD |
112 | default "custom-yopy.h" if TARGET_YOPY | 117 | default "custom-yopy.h" if TARGET_YOPY |
113 | 118 | ||
114 | config OPTIMIZATIONS | 119 | config OPTIMIZATIONS |
115 | string "Optimization flags" | 120 | string "Optimization flags" |
116 | depends OPTIMIZE | 121 | depends OPTIMIZE |
117 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ | 122 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ |
118 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_YOPY | 123 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_YOPY |
119 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP | 124 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP |
120 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_RAMSES | 125 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_RAMSES |
121 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SIMPAD | 126 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SIMPAD |
122 | default "-march=armv5te -mtune=xscale -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_C700 | 127 | default "-march=armv5te -mtune=xscale -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_C700 |
128 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_HTC | ||
123 | 129 | ||
124 | config EXPERIMENTAL | 130 | config EXPERIMENTAL |
125 | bool "Prompt for development and/or incomplete items" | 131 | bool "Prompt for development and/or incomplete items" |
126 | default y | 132 | default y |
127 | 133 | ||
128 | config USE_CCACHE | 134 | config USE_CCACHE |
129 | bool "Use ccache, if available?" | 135 | bool "Use ccache, if available?" |
130 | default y | 136 | default y |
131 | 137 | ||
132 | endmenu | 138 | endmenu |
133 | 139 | ||
134 | menu "Configuration" | 140 | menu "Configuration" |
135 | config OPIE_NO_BUILTIN_SHUTDOWN | 141 | config OPIE_NO_BUILTIN_SHUTDOWN |
136 | boolean "Disable the built in shutdown application" | 142 | boolean "Disable the built in shutdown application" |
137 | default y | 143 | default y |
138 | 144 | ||
139 | config OPIE_NO_BUILTIN_CALIBRATE | 145 | config OPIE_NO_BUILTIN_CALIBRATE |
140 | boolean "Disable the built in calibrate application" | 146 | boolean "Disable the built in calibrate application" |
141 | default y if TARGET_YOPY | 147 | default y if TARGET_YOPY |
142 | default n if ! TARGET_YOPY | 148 | default n if ! TARGET_YOPY |
143 | 149 | ||
144 | config OPIE_SOUND_FRAGMENT_SHIFT | 150 | config OPIE_SOUND_FRAGMENT_SHIFT |
145 | string "The sound fragment used in Opie Player I" | 151 | string "The sound fragment used in Opie Player I" |
146 | default "14" if TARGET_IPAQ | 152 | default "14" if TARGET_IPAQ |
147 | default "16" if ! TARGET_IPAQ | 153 | default "16" if ! TARGET_IPAQ |
148 | 154 | ||
149 | config USE_REALTIME_AUDIO_THREAD | 155 | config USE_REALTIME_AUDIO_THREAD |
150 | boolean "Use a realtime thread in Opie Player I" | 156 | boolean "Use a realtime thread in Opie Player I" |
151 | default y if TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP | 157 | default y if TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP |
152 | default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) | 158 | default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) |
153 | 159 | ||
154 | config QT_QWS_ALLOW_OVERCLOCK | 160 | config QT_QWS_ALLOW_OVERCLOCK |
155 | boolean "Allow the user to overclock the device" | 161 | boolean "Allow the user to overclock the device" |
156 | depends TARGET_RAMSES | 162 | depends TARGET_RAMSES |
157 | default n | 163 | default n |
158 | 164 | ||
159 | config USE_FILE_NOTIFICATION | 165 | config USE_FILE_NOTIFICATION |
160 | boolean "Substitute (some) polling interfaces with OFileNotifier" | 166 | boolean "Substitute (some) polling interfaces with OFileNotifier" |
161 | default y | 167 | default y |
162 | 168 | ||
163 | config OPIE_NEW_ALLOC | 169 | config OPIE_NEW_ALLOC |
164 | boolean "Use malloc and free for the implementation" | 170 | boolean "Use malloc and free for the implementation" |
165 | default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP | 171 | default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP |
166 | default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) | 172 | default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) |
167 | 173 | ||
168 | config OPIE_TASKBAR_LOCK_KEY_STATE | 174 | config OPIE_TASKBAR_LOCK_KEY_STATE |
169 | boolean "Have a KeyLock state indicator on the taskbar" | 175 | boolean "Have a KeyLock state indicator on the taskbar" |
170 | default y if TARGET_SHARP | 176 | default y if TARGET_SHARP |
171 | default n if !TARGET_SHARP | 177 | default n if !TARGET_SHARP |
172 | 178 | ||
173 | config LIBQPE_WITHROHFEEDBACK | 179 | config LIBQPE_WITHROHFEEDBACK |
174 | boolean "Build libqpe with Right-On-Hold feedback" | 180 | boolean "Build libqpe with Right-On-Hold feedback" |
175 | default y | 181 | default y |
176 | 182 | ||
177 | config LIBQPE_NO_INLINE_IMAGES | 183 | config LIBQPE_NO_INLINE_IMAGES |
178 | boolean "Build libqpe without inline images" | 184 | boolean "Build libqpe without inline images" |
179 | default n | 185 | default n |
180 | 186 | ||
181 | config OPIE_NO_SOUND_PCM_READ_BITS | 187 | config OPIE_NO_SOUND_PCM_READ_BITS |
182 | boolean "There is not a pcm_read_bits io control" | 188 | boolean "There is not a pcm_read_bits io control" |
183 | default y if TARGET_SHARP | 189 | default y if TARGET_SHARP |
184 | default n if ! TARGET_SHARP | 190 | default n if ! TARGET_SHARP |
185 | endmenu | 191 | endmenu |
186 | 192 | ||
187 | menu "Dependencies" | 193 | menu "Dependencies" |
188 | source dependencies.in | 194 | source dependencies.in |
189 | endmenu | 195 | endmenu |
190 | 196 | ||
191 | menu "Base" | 197 | menu "Base" |
192 | choice | 198 | choice |
193 | prompt "Qpe Library Selection" | 199 | prompt "Qpe Library Selection" |
194 | default LIBQPE | 200 | default LIBQPE |
195 | source library/config.in | 201 | source library/config.in |
196 | source x11/config.in | 202 | source x11/config.in |
197 | endchoice | 203 | endchoice |
198 | source libopie2/config.in | 204 | source libopie2/config.in |
199 | source libqtaux/config.in | 205 | source libqtaux/config.in |
200 | source rsync/config.in | 206 | source rsync/config.in |
201 | source core/opie-login/config.in | 207 | source core/opie-login/config.in |
202 | source core/opiealarm/config.in | 208 | source core/opiealarm/config.in |
203 | source core/tools/quicklauncher/config.in | 209 | source core/tools/quicklauncher/config.in |
204 | source core/tools/hotplug-qcop/config.in | 210 | source core/tools/hotplug-qcop/config.in |
205 | source core/launcher/config.in | 211 | source core/launcher/config.in |
206 | source core/symlinker/config.in | 212 | source core/symlinker/config.in |
207 | endmenu | 213 | endmenu |
208 | 214 | ||
209 | comment "" | 215 | comment "" |
210 | 216 | ||
211 | menu "Applets" | 217 | menu "Applets" |
212 | source core/applets/config.in | 218 | source core/applets/config.in |
213 | source noncore/applets/config.in | 219 | source noncore/applets/config.in |
214 | endmenu | 220 | endmenu |
215 | 221 | ||
216 | menu "Apps" | 222 | menu "Apps" |
217 | source core/apps/config.in | 223 | source core/apps/config.in |
218 | source noncore/apps/config.in | 224 | source noncore/apps/config.in |
219 | endmenu | 225 | endmenu |
220 | 226 | ||
221 | menu "Communications and Networking" | 227 | menu "Communications and Networking" |
222 | source noncore/comm/config.in | 228 | source noncore/comm/config.in |
223 | source noncore/net/config.in | 229 | source noncore/net/config.in |
224 | endmenu | 230 | endmenu |
225 | 231 | ||
226 | menu "Games" | 232 | menu "Games" |
227 | source noncore/games/config.in | 233 | source noncore/games/config.in |
228 | endmenu | 234 | endmenu |
229 | 235 | ||
230 | menu "Graphics and Multimedia" | 236 | menu "Graphics and Multimedia" |
231 | source freetype/config.in | 237 | source freetype/config.in |
232 | source noncore/graphics/config.in | 238 | source noncore/graphics/config.in |
233 | source core/multimedia/config.in | 239 | source core/multimedia/config.in |
234 | source noncore/multimedia/config.in | 240 | source noncore/multimedia/config.in |
235 | endmenu | 241 | endmenu |
236 | 242 | ||
237 | menu "Input methods" | 243 | menu "Input methods" |
238 | source inputmethods/config.in | 244 | source inputmethods/config.in |
239 | endmenu | 245 | endmenu |
240 | 246 | ||
241 | menu "Pim" | 247 | menu "Pim" |
242 | source core/obex/config.in | 248 | source core/obex/config.in |
243 | source core/pim/config.in | 249 | source core/pim/config.in |
244 | comment "Today Plugins ---" | 250 | comment "Today Plugins ---" |
245 | source noncore/todayplugins/config.in | 251 | source noncore/todayplugins/config.in |
246 | source core/pim/today/plugins/config.in | 252 | source core/pim/today/plugins/config.in |
247 | comment "Holiday Plugins ---" | 253 | comment "Holiday Plugins ---" |
248 | source core/pim/datebook/holiday/config.in | 254 | source core/pim/datebook/holiday/config.in |
249 | endmenu | 255 | endmenu |
250 | 256 | ||
251 | menu "Settings" | 257 | menu "Settings" |
252 | source core/settings/config.in | 258 | source core/settings/config.in |
253 | source noncore/settings/config.in | 259 | source noncore/settings/config.in |
254 | source noncore/securityplugins/config.in | 260 | source noncore/securityplugins/config.in |
255 | endmenu | 261 | endmenu |
256 | 262 | ||
257 | menu "Theming" | 263 | menu "Theming" |
258 | comment "Decorations ---" | 264 | comment "Decorations ---" |
259 | source noncore/decorations/config.in | 265 | source noncore/decorations/config.in |
260 | comment "Styles ---" | 266 | comment "Styles ---" |
261 | source noncore/styles/config.in | 267 | source noncore/styles/config.in |
262 | endmenu | 268 | endmenu |
263 | 269 | ||
264 | menu "Tools" | 270 | menu "Tools" |
265 | source noncore/tools/config.in | 271 | source noncore/tools/config.in |
266 | endmenu | 272 | endmenu |
267 | 273 | ||
268 | menu "Development" | 274 | menu "Development" |
269 | source development/keyview/config.in | 275 | source development/keyview/config.in |
270 | #source development/debugviewer/config.in | 276 | #source development/debugviewer/config.in |
271 | endmenu | 277 | endmenu |
272 | 278 | ||
273 | menu "Examples" | 279 | menu "Examples" |
274 | config EXAMPLES | 280 | config EXAMPLES |
275 | boolean "Compile Example Application" | 281 | boolean "Compile Example Application" |
276 | source examples/config.in | 282 | source examples/config.in |
277 | endmenu | 283 | endmenu |
278 | 284 | ||
279 | comment "" | 285 | comment "" |
280 | 286 | ||
281 | menu "Unsupported / Unmaintained" | 287 | menu "Unsupported / Unmaintained" |
282 | source noncore/unsupported/config.in | 288 | source noncore/unsupported/config.in |
283 | endmenu | 289 | endmenu |
284 | 290 | ||
285 | comment "" | 291 | comment "" |
286 | depends on EXPERIMENTAL | 292 | depends on EXPERIMENTAL |
287 | menu "Experimental" | 293 | menu "Experimental" |
288 | depends on EXPERIMENTAL | 294 | depends on EXPERIMENTAL |
289 | source libslcompat/config.in | 295 | source libslcompat/config.in |
290 | source core/qws/config.in | 296 | source core/qws/config.in |
291 | endmenu | 297 | endmenu |
diff --git a/libopie2/opiecore/device/device.pro b/libopie2/opiecore/device/device.pro index 8469398..0954733 100644 --- a/libopie2/opiecore/device/device.pro +++ b/libopie2/opiecore/device/device.pro | |||
@@ -1,26 +1,28 @@ | |||
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 | 14 | ||
14 | SOURCES += device/odevice.cpp \ | 15 | SOURCES += device/odevice.cpp \ |
15 | device/odevicebutton.cpp \ | 16 | device/odevicebutton.cpp \ |
16 | device/odevice_abstractmobiledevice.cpp \ | 17 | device/odevice_abstractmobiledevice.cpp \ |
17 | device/odevice_beagle.cpp \ | 18 | device/odevice_beagle.cpp \ |
18 | device/odevice_ipaq.cpp \ | 19 | device/odevice_ipaq.cpp \ |
19 | device/odevice_jornada.cpp\ | 20 | device/odevice_jornada.cpp\ |
20 | device/odevice_ramses.cpp \ | 21 | device/odevice_ramses.cpp \ |
21 | device/odevice_simpad.cpp \ | 22 | device/odevice_simpad.cpp \ |
22 | device/odevice_zaurus.cpp \ | 23 | device/odevice_zaurus.cpp \ |
23 | device/odevice_genuineintel.cpp \ | 24 | device/odevice_genuineintel.cpp \ |
24 | device/odevice_yopy.cpp \ | 25 | device/odevice_yopy.cpp \ |
25 | device/odevice_mypal.cpp | 26 | device/odevice_mypal.cpp \ |
27 | device/odevice_htc.cpp | ||
26 | 28 | ||
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 7b99eb4..c6e031f 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -1,817 +1,820 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> | 3 | =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> |
4 | .=l. | 4 | .=l. |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This program is free software; you can | 6 | _;:, .> :=|. This program is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; version 2 of the License. | 10 | - . .-<_> .<> Foundation; version 2 of the License. |
11 | ._= =} : | 11 | ._= =} : |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This program is distributed in the hope that | 13 | .i_,=:_. -<s. This program is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
18 | ..}^=.= = ; Library General Public License for more | 18 | ..}^=.= = ; Library General Public License for more |
19 | ++= -. .` .: details. | 19 | ++= -. .` .: details. |
20 | : = ...= . :.=- | 20 | : = ...= . :.=- |
21 | -. .:....=;==+<; You should have received a copy of the GNU | 21 | -. .:....=;==+<; You should have received a copy of the GNU |
22 | -_. . . )=. = Library General Public License along with | 22 | -_. . . )=. = Library General Public License along with |
23 | -- :-=` this library; see the file COPYING.LIB. | 23 | -- :-=` this library; see the file COPYING.LIB. |
24 | If not, write to the Free Software Foundation, | 24 | If not, write to the Free Software Foundation, |
25 | Inc., 59 Temple Place - Suite 330, | 25 | Inc., 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | 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 | 41 | ||
41 | /* QT */ | 42 | /* QT */ |
42 | #include <qapplication.h> | 43 | #include <qapplication.h> |
43 | #include <qfile.h> | 44 | #include <qfile.h> |
44 | #include <qtextstream.h> | 45 | #include <qtextstream.h> |
45 | #include <qwindowsystem_qws.h> | 46 | #include <qwindowsystem_qws.h> |
46 | 47 | ||
47 | /* OPIE */ | 48 | /* OPIE */ |
48 | #include <qpe/config.h> | 49 | #include <qpe/config.h> |
49 | #include <qpe/sound.h> | 50 | #include <qpe/sound.h> |
50 | #include <qpe/qcopenvelope_qws.h> | 51 | #include <qpe/qcopenvelope_qws.h> |
51 | #include <qpe/sound.h> | 52 | #include <qpe/sound.h> |
52 | 53 | ||
53 | #include <opie2/okeyfilter.h> | 54 | #include <opie2/okeyfilter.h> |
54 | #include <opie2/oresource.h> | 55 | #include <opie2/oresource.h> |
55 | 56 | ||
56 | /* STD */ | 57 | /* STD */ |
57 | #include <fcntl.h> | 58 | #include <fcntl.h> |
58 | #include <math.h> | 59 | #include <math.h> |
59 | #include <stdlib.h> | 60 | #include <stdlib.h> |
60 | #include <signal.h> | 61 | #include <signal.h> |
61 | #include <sys/ioctl.h> | 62 | #include <sys/ioctl.h> |
62 | #include <sys/time.h> | 63 | #include <sys/time.h> |
63 | #include <unistd.h> | 64 | #include <unistd.h> |
64 | #ifndef QT_NO_SOUND | 65 | #ifndef QT_NO_SOUND |
65 | #include <linux/soundcard.h> | 66 | #include <linux/soundcard.h> |
66 | #endif | 67 | #endif |
67 | 68 | ||
68 | namespace Opie { | 69 | namespace Opie { |
69 | namespace Core { | 70 | namespace Core { |
70 | 71 | ||
71 | static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; | 72 | static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; |
72 | 73 | ||
73 | 74 | ||
74 | /* STATIC and common implementation */ | 75 | /* STATIC and common implementation */ |
75 | /* EXPORT */ ODistribution distributions[] = { | 76 | /* EXPORT */ ODistribution distributions[] = { |
76 | { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, | 77 | { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, |
77 | { System_OpenZaurus, "OpenZaurus", "/etc/openzaurus-version" }, | 78 | { System_OpenZaurus, "OpenZaurus", "/etc/openzaurus-version" }, |
78 | { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, | 79 | { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, |
79 | { System_Unknown, "Linux", "/etc/issue" }, | 80 | { System_Unknown, "Linux", "/etc/issue" }, |
80 | }; | 81 | }; |
81 | 82 | ||
82 | 83 | ||
83 | /* EXPORT */ bool isQWS(){ | 84 | /* EXPORT */ bool isQWS(){ |
84 | return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; | 85 | return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; |
85 | } | 86 | } |
86 | 87 | ||
87 | /* EXPORT */ QCString makeChannel ( const char *str ){ | 88 | /* EXPORT */ QCString makeChannel ( const char *str ){ |
88 | if ( str && !::strchr ( str, '/' )) | 89 | if ( str && !::strchr ( str, '/' )) |
89 | return QCString ( "QPE/Application/" ) + str; | 90 | return QCString ( "QPE/Application/" ) + str; |
90 | else | 91 | else |
91 | return str; | 92 | return str; |
92 | } | 93 | } |
93 | 94 | ||
94 | 95 | ||
95 | 96 | ||
96 | /* Now the default implementation of ODevice */ | 97 | /* Now the default implementation of ODevice */ |
97 | 98 | ||
98 | struct default_button default_buttons [] = { | 99 | struct default_button default_buttons [] = { |
99 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 100 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
100 | "devicebuttons/z_calendar", | 101 | "devicebuttons/z_calendar", |
101 | "datebook", "nextView()", | 102 | "datebook", "nextView()", |
102 | "today", "raise()" }, | 103 | "today", "raise()" }, |
103 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 104 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
104 | "devicebuttons/z_contact", | 105 | "devicebuttons/z_contact", |
105 | "addressbook", "raise()", | 106 | "addressbook", "raise()", |
106 | "addressbook", "beamBusinessCard()" }, | 107 | "addressbook", "beamBusinessCard()" }, |
107 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 108 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
108 | "devicebuttons/z_home", | 109 | "devicebuttons/z_home", |
109 | "QPE/Launcher", "home()", | 110 | "QPE/Launcher", "home()", |
110 | "buttonsettings", "raise()" }, | 111 | "buttonsettings", "raise()" }, |
111 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 112 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
112 | "devicebuttons/z_menu", | 113 | "devicebuttons/z_menu", |
113 | "QPE/TaskBar", "toggleMenu()", | 114 | "QPE/TaskBar", "toggleMenu()", |
114 | "QPE/TaskBar", "toggleStartMenu()" }, | 115 | "QPE/TaskBar", "toggleStartMenu()" }, |
115 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 116 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
116 | "devicebuttons/z_mail", | 117 | "devicebuttons/z_mail", |
117 | "opiemail", "raise()", | 118 | "opiemail", "raise()", |
118 | "opiemail", "newMail()" }, | 119 | "opiemail", "newMail()" }, |
119 | }; | 120 | }; |
120 | 121 | ||
121 | ODevice *ODevice::inst() | 122 | ODevice *ODevice::inst() |
122 | { | 123 | { |
123 | static ODevice *dev = 0; | 124 | static ODevice *dev = 0; |
124 | QString cpu_info; | 125 | QString cpu_info; |
125 | 126 | ||
126 | if ( !dev ) | 127 | if ( !dev ) |
127 | { | 128 | { |
128 | QFile f( PATH_PROC_CPUINFO ); | 129 | QFile f( PATH_PROC_CPUINFO ); |
129 | if ( f.open( IO_ReadOnly ) ) | 130 | if ( f.open( IO_ReadOnly ) ) |
130 | { | 131 | { |
131 | QTextStream s( &f ); | 132 | QTextStream s( &f ); |
132 | while ( !s.atEnd() ) | 133 | while ( !s.atEnd() ) |
133 | { | 134 | { |
134 | QString line; | 135 | QString line; |
135 | line = s.readLine(); | 136 | line = s.readLine(); |
136 | if ( line.startsWith( "Hardware" ) ) | 137 | if ( line.startsWith( "Hardware" ) ) |
137 | { | 138 | { |
138 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 139 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
139 | cpu_info = line; | 140 | cpu_info = line; |
140 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); | 141 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); |
141 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); | 142 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); |
142 | else if ( line.contains( "mypal", false ) ) dev = new Internal::MyPal(); | 143 | else if ( line.contains( "mypal", false ) ) dev = new Internal::MyPal(); |
143 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); | 144 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); |
144 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); | 145 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); |
145 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); | 146 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); |
146 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); | 147 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); |
148 | else if ( line.contains( "HTC", false ) ) dev = new Internal::HTC(); | ||
149 | |||
147 | else qWarning( "ODevice() - unknown hardware - using default." ); | 150 | else qWarning( "ODevice() - unknown hardware - using default." ); |
148 | break; | 151 | break; |
149 | } else if ( line.startsWith( "vendor_id" ) ) { | 152 | } else if ( line.startsWith( "vendor_id" ) ) { |
150 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 153 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
151 | cpu_info = line; | 154 | cpu_info = line; |
152 | if( line.contains( "genuineintel", false ) ) { | 155 | if( line.contains( "genuineintel", false ) ) { |
153 | dev = new Internal::GenuineIntel(); | 156 | dev = new Internal::GenuineIntel(); |
154 | break; | 157 | break; |
155 | } | 158 | } |
156 | } | 159 | } |
157 | } | 160 | } |
158 | } | 161 | } |
159 | else | 162 | else |
160 | { | 163 | { |
161 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); | 164 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); |
162 | } | 165 | } |
163 | if ( !dev ) dev = new ODevice(); | 166 | if ( !dev ) dev = new ODevice(); |
164 | dev->init(cpu_info); | 167 | dev->init(cpu_info); |
165 | } | 168 | } |
166 | return dev; | 169 | return dev; |
167 | } | 170 | } |
168 | 171 | ||
169 | ODevice::ODevice() | 172 | ODevice::ODevice() |
170 | { | 173 | { |
171 | d = new ODeviceData; | 174 | d = new ODeviceData; |
172 | 175 | ||
173 | d->m_modelstr = "Unknown"; | 176 | d->m_modelstr = "Unknown"; |
174 | d->m_model = Model_Unknown; | 177 | d->m_model = Model_Unknown; |
175 | d->m_vendorstr = "Unknown"; | 178 | d->m_vendorstr = "Unknown"; |
176 | d->m_vendor = Vendor_Unknown; | 179 | d->m_vendor = Vendor_Unknown; |
177 | d->m_systemstr = "Unknown"; | 180 | d->m_systemstr = "Unknown"; |
178 | d->m_system = System_Unknown; | 181 | d->m_system = System_Unknown; |
179 | d->m_sysverstr = "0.0"; | 182 | d->m_sysverstr = "0.0"; |
180 | d->m_rotation = Rot0; | 183 | d->m_rotation = Rot0; |
181 | d->m_direction = CW; | 184 | d->m_direction = CW; |
182 | d->m_qteDriver = "Transformed"; | 185 | d->m_qteDriver = "Transformed"; |
183 | 186 | ||
184 | d->m_holdtime = 1000; // 1000ms | 187 | d->m_holdtime = 1000; // 1000ms |
185 | d->m_buttons = 0; | 188 | d->m_buttons = 0; |
186 | d->m_cpu_frequencies = new QStrList; | 189 | d->m_cpu_frequencies = new QStrList; |
187 | 190 | ||
188 | 191 | ||
189 | /* mixer */ | 192 | /* mixer */ |
190 | d->m_sound = d->m_vol = d->m_mixer = -1; | 193 | d->m_sound = d->m_vol = d->m_mixer = -1; |
191 | 194 | ||
192 | /* System QCopChannel created */ | 195 | /* System QCopChannel created */ |
193 | d->m_initializedButtonQcop = false; | 196 | d->m_initializedButtonQcop = false; |
194 | 197 | ||
195 | // New distribution detection code first checks for legacy distributions, | 198 | // New distribution detection code first checks for legacy distributions, |
196 | // identified by /etc/familiar-version or /etc/oz_version. | 199 | // identified by /etc/familiar-version or /etc/oz_version. |
197 | // Then check for OpenEmbedded and lastly, read /etc/issue | 200 | // Then check for OpenEmbedded and lastly, read /etc/issue |
198 | 201 | ||
199 | for ( unsigned int i = 0; i < sizeof(distributions)/sizeof(ODistribution); ++i ) | 202 | for ( unsigned int i = 0; i < sizeof(distributions)/sizeof(ODistribution); ++i ) |
200 | { | 203 | { |
201 | if ( QFile::exists( distributions[i].sysvfile ) ) | 204 | if ( QFile::exists( distributions[i].sysvfile ) ) |
202 | { | 205 | { |
203 | d->m_systemstr = distributions[i].sysstr; | 206 | d->m_systemstr = distributions[i].sysstr; |
204 | d->m_system = distributions[i].system; | 207 | d->m_system = distributions[i].system; |
205 | d->m_sysverstr = "<Unknown>"; | 208 | d->m_sysverstr = "<Unknown>"; |
206 | QFile f( distributions[i].sysvfile ); | 209 | QFile f( distributions[i].sysvfile ); |
207 | if ( f.open( IO_ReadOnly ) ) | 210 | if ( f.open( IO_ReadOnly ) ) |
208 | { | 211 | { |
209 | QTextStream ts( &f ); | 212 | QTextStream ts( &f ); |
210 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); | 213 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); |
211 | } | 214 | } |
212 | break; | 215 | break; |
213 | } | 216 | } |
214 | } | 217 | } |
215 | } | 218 | } |
216 | 219 | ||
217 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) | 220 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) |
218 | { | 221 | { |
219 | if ( msg == "deviceButtonMappingChanged()" ) { | 222 | if ( msg == "deviceButtonMappingChanged()" ) { |
220 | reloadButtonMapping(); | 223 | reloadButtonMapping(); |
221 | } | 224 | } |
222 | } | 225 | } |
223 | 226 | ||
224 | void ODevice::init(const QString&) | 227 | void ODevice::init(const QString&) |
225 | { | 228 | { |
226 | } | 229 | } |
227 | 230 | ||
228 | /** | 231 | /** |
229 | * This method initialises the button mapping | 232 | * This method initialises the button mapping |
230 | */ | 233 | */ |
231 | void ODevice::initButtons() | 234 | void ODevice::initButtons() |
232 | { | 235 | { |
233 | if ( d->m_buttons ) | 236 | if ( d->m_buttons ) |
234 | return; | 237 | return; |
235 | 238 | ||
236 | qDebug ( "init Buttons" ); | 239 | qDebug ( "init Buttons" ); |
237 | d->m_buttons = new QValueList <ODeviceButton>; | 240 | d->m_buttons = new QValueList <ODeviceButton>; |
238 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { | 241 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { |
239 | default_button *db = default_buttons + i; | 242 | default_button *db = default_buttons + i; |
240 | ODeviceButton b; | 243 | ODeviceButton b; |
241 | b. setKeycode ( db->code ); | 244 | b. setKeycode ( db->code ); |
242 | b. setUserText ( QObject::tr ( "Button", db->utext )); | 245 | b. setUserText ( QObject::tr ( "Button", db->utext )); |
243 | b. setPixmap ( OResource::loadPixmap ( db->pix )); | 246 | b. setPixmap ( OResource::loadPixmap ( db->pix )); |
244 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); | 247 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); |
245 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); | 248 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); |
246 | d->m_buttons->append ( b ); | 249 | d->m_buttons->append ( b ); |
247 | } | 250 | } |
248 | 251 | ||
249 | reloadButtonMapping(); | 252 | reloadButtonMapping(); |
250 | } | 253 | } |
251 | 254 | ||
252 | ODevice::~ODevice() | 255 | ODevice::~ODevice() |
253 | { | 256 | { |
254 | // we leak m_devicebuttons and m_cpu_frequency | 257 | // we leak m_devicebuttons and m_cpu_frequency |
255 | // but it's a singleton and it is not so importantant | 258 | // but it's a singleton and it is not so importantant |
256 | // -zecke | 259 | // -zecke |
257 | delete d; | 260 | delete d; |
258 | } | 261 | } |
259 | 262 | ||
260 | /** | 263 | /** |
261 | * This method will try to suspend the device | 264 | * This method will try to suspend the device |
262 | * It only works if the user is the QWS Server and the apm application | 265 | * It only works if the user is the QWS Server and the apm application |
263 | * is installed. | 266 | * is installed. |
264 | * It tries to suspend and then waits some time cause some distributions | 267 | * It tries to suspend and then waits some time cause some distributions |
265 | * do have asynchronus apm implementations. | 268 | * do have asynchronus apm implementations. |
266 | * This method will either fail and return false or it'll suspend the | 269 | * This method will either fail and return false or it'll suspend the |
267 | * device and return once the device got woken up | 270 | * device and return once the device got woken up |
268 | * | 271 | * |
269 | * @return if the device got suspended | 272 | * @return if the device got suspended |
270 | */ | 273 | */ |
271 | bool ODevice::suspend() | 274 | bool ODevice::suspend() |
272 | { | 275 | { |
273 | return false; // default implementation == unknown device or qvfb | 276 | return false; // default implementation == unknown device or qvfb |
274 | } | 277 | } |
275 | 278 | ||
276 | /** | 279 | /** |
277 | * This sets the display on or off | 280 | * This sets the display on or off |
278 | */ | 281 | */ |
279 | bool ODevice::setDisplayStatus( bool on ) | 282 | bool ODevice::setDisplayStatus( bool on ) |
280 | { | 283 | { |
281 | qDebug( "ODevice::setDisplayStatus( %d ) - please override me.", on ); | 284 | qDebug( "ODevice::setDisplayStatus( %d ) - please override me.", on ); |
282 | return false; // don't do anything for unknown models | 285 | return false; // don't do anything for unknown models |
283 | } | 286 | } |
284 | 287 | ||
285 | /** | 288 | /** |
286 | * This sets the display brightness | 289 | * This sets the display brightness |
287 | * | 290 | * |
288 | * @param b The brightness to be set on a scale from 0 to 255 | 291 | * @param b The brightness to be set on a scale from 0 to 255 |
289 | * @return success or failure | 292 | * @return success or failure |
290 | */ | 293 | */ |
291 | bool ODevice::setDisplayBrightness( int b ) | 294 | bool ODevice::setDisplayBrightness( int b ) |
292 | { | 295 | { |
293 | qDebug( "ODevice::setDisplayBrightness( %d ) - please override me.", b ); | 296 | qDebug( "ODevice::setDisplayBrightness( %d ) - please override me.", b ); |
294 | return false; | 297 | return false; |
295 | } | 298 | } |
296 | 299 | ||
297 | /** | 300 | /** |
298 | * | 301 | * |
299 | * @returns the number of steppings on the brightness slider | 302 | * @returns the number of steppings on the brightness slider |
300 | * in the Light-'n-Power settings. Values smaller than zero and bigger | 303 | * in the Light-'n-Power settings. Values smaller than zero and bigger |
301 | * than 255 do not make sense. | 304 | * than 255 do not make sense. |
302 | * | 305 | * |
303 | * \sa QSlider::setLineStep | 306 | * \sa QSlider::setLineStep |
304 | * \sa QSlider::setPageStep | 307 | * \sa QSlider::setPageStep |
305 | */ | 308 | */ |
306 | int ODevice::displayBrightnessResolution() const | 309 | int ODevice::displayBrightnessResolution() const |
307 | { | 310 | { |
308 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); | 311 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); |
309 | return 16; | 312 | return 16; |
310 | } | 313 | } |
311 | 314 | ||
312 | /** | 315 | /** |
313 | * This sets the display contrast | 316 | * This sets the display contrast |
314 | * @param p The contrast to be set on a scale from 0 to 255 | 317 | * @param p The contrast to be set on a scale from 0 to 255 |
315 | * @returns success or failure | 318 | * @returns success or failure |
316 | */ | 319 | */ |
317 | bool ODevice::setDisplayContrast( int p ) | 320 | bool ODevice::setDisplayContrast( int p ) |
318 | { | 321 | { |
319 | qDebug( "ODevice::setDisplayContrast( %d ) - please override me.", p ); | 322 | qDebug( "ODevice::setDisplayContrast( %d ) - please override me.", p ); |
320 | return false; | 323 | return false; |
321 | } | 324 | } |
322 | 325 | ||
323 | /** | 326 | /** |
324 | * @returns the maximum value for the contrast settings slider | 327 | * @returns the maximum value for the contrast settings slider |
325 | * or 0 if the device doesn't support setting of a contrast | 328 | * or 0 if the device doesn't support setting of a contrast |
326 | */ | 329 | */ |
327 | int ODevice::displayContrastResolution() const | 330 | int ODevice::displayContrastResolution() const |
328 | { | 331 | { |
329 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); | 332 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); |
330 | return 0; | 333 | return 0; |
331 | } | 334 | } |
332 | 335 | ||
333 | /** | 336 | /** |
334 | * This returns the vendor as string | 337 | * This returns the vendor as string |
335 | * @return Vendor as QString | 338 | * @return Vendor as QString |
336 | */ | 339 | */ |
337 | QString ODevice::vendorString() const | 340 | QString ODevice::vendorString() const |
338 | { | 341 | { |
339 | return d->m_vendorstr; | 342 | return d->m_vendorstr; |
340 | } | 343 | } |
341 | 344 | ||
342 | /** | 345 | /** |
343 | * This returns the vendor as one of the values of OVendor | 346 | * This returns the vendor as one of the values of OVendor |
344 | * @return OVendor | 347 | * @return OVendor |
345 | */ | 348 | */ |
346 | OVendor ODevice::vendor() const | 349 | OVendor ODevice::vendor() const |
347 | { | 350 | { |
348 | return d->m_vendor; | 351 | return d->m_vendor; |
349 | } | 352 | } |
350 | 353 | ||
351 | /** | 354 | /** |
352 | * This returns the model as a string | 355 | * This returns the model as a string |
353 | * @return A string representing the model | 356 | * @return A string representing the model |
354 | */ | 357 | */ |
355 | QString ODevice::modelString() const | 358 | QString ODevice::modelString() const |
356 | { | 359 | { |
357 | return d->m_modelstr; | 360 | return d->m_modelstr; |
358 | } | 361 | } |
359 | 362 | ||
360 | /** | 363 | /** |
361 | * This does return the OModel used | 364 | * This does return the OModel used |
362 | */ | 365 | */ |
363 | OModel ODevice::model() const | 366 | OModel ODevice::model() const |
364 | { | 367 | { |
365 | return d->m_model; | 368 | return d->m_model; |
366 | } | 369 | } |
367 | 370 | ||
368 | /** | 371 | /** |
369 | * This does return the systen name | 372 | * This does return the systen name |
370 | */ | 373 | */ |
371 | QString ODevice::systemString() const | 374 | QString ODevice::systemString() const |
372 | { | 375 | { |
373 | return d->m_systemstr; | 376 | return d->m_systemstr; |
374 | } | 377 | } |
375 | 378 | ||
376 | /** | 379 | /** |
377 | * Return System as OSystem value | 380 | * Return System as OSystem value |
378 | */ | 381 | */ |
379 | OSystem ODevice::system() const | 382 | OSystem ODevice::system() const |
380 | { | 383 | { |
381 | return d->m_system; | 384 | return d->m_system; |
382 | } | 385 | } |
383 | 386 | ||
384 | /** | 387 | /** |
385 | * @return the version string of the base system | 388 | * @return the version string of the base system |
386 | */ | 389 | */ |
387 | QString ODevice::systemVersionString() const | 390 | QString ODevice::systemVersionString() const |
388 | { | 391 | { |
389 | return d->m_sysverstr; | 392 | return d->m_sysverstr; |
390 | } | 393 | } |
391 | 394 | ||
392 | /** | 395 | /** |
393 | * @return the current Transformation | 396 | * @return the current Transformation |
394 | */ | 397 | */ |
395 | Transformation ODevice::rotation() const | 398 | Transformation ODevice::rotation() const |
396 | { | 399 | { |
397 | return d->m_rotation; | 400 | return d->m_rotation; |
398 | } | 401 | } |
399 | 402 | ||
400 | /** | 403 | /** |
401 | * @return the current rotation direction | 404 | * @return the current rotation direction |
402 | */ | 405 | */ |
403 | ODirection ODevice::direction() const | 406 | ODirection ODevice::direction() const |
404 | { | 407 | { |
405 | return d->m_direction; | 408 | return d->m_direction; |
406 | } | 409 | } |
407 | 410 | ||
408 | QString ODevice::qteDriver() const | 411 | QString ODevice::qteDriver() const |
409 | { | 412 | { |
410 | return d->m_qteDriver; | 413 | return d->m_qteDriver; |
411 | } | 414 | } |
412 | 415 | ||
413 | /** | 416 | /** |
414 | * This plays an alarm sound | 417 | * This plays an alarm sound |
415 | */ | 418 | */ |
416 | void ODevice::playAlarmSound() | 419 | void ODevice::playAlarmSound() |
417 | { | 420 | { |
418 | #ifndef QT_NO_SOUND | 421 | #ifndef QT_NO_SOUND |
419 | static Sound snd ( "alarm" ); | 422 | static Sound snd ( "alarm" ); |
420 | 423 | ||
421 | if ( snd. isFinished()) | 424 | if ( snd. isFinished()) |
422 | snd. play(); | 425 | snd. play(); |
423 | #endif | 426 | #endif |
424 | } | 427 | } |
425 | 428 | ||
426 | /** | 429 | /** |
427 | * This plays a key sound | 430 | * This plays a key sound |
428 | */ | 431 | */ |
429 | void ODevice::playKeySound() | 432 | void ODevice::playKeySound() |
430 | { | 433 | { |
431 | #ifndef QT_NO_SOUND | 434 | #ifndef QT_NO_SOUND |
432 | static Sound snd ( "keysound" ); | 435 | static Sound snd ( "keysound" ); |
433 | 436 | ||
434 | if ( snd. isFinished()) | 437 | if ( snd. isFinished()) |
435 | snd. play(); | 438 | snd. play(); |
436 | #endif | 439 | #endif |
437 | } | 440 | } |
438 | 441 | ||
439 | /** | 442 | /** |
440 | * This plays a touch sound | 443 | * This plays a touch sound |
441 | */ | 444 | */ |
442 | void ODevice::playTouchSound() | 445 | void ODevice::playTouchSound() |
443 | { | 446 | { |
444 | #ifndef QT_NO_SOUND | 447 | #ifndef QT_NO_SOUND |
445 | static Sound snd ( "touchsound" ); | 448 | static Sound snd ( "touchsound" ); |
446 | 449 | ||
447 | if ( snd. isFinished()) | 450 | if ( snd. isFinished()) |
448 | snd. play(); | 451 | snd. play(); |
449 | #endif | 452 | #endif |
450 | } | 453 | } |
451 | 454 | ||
452 | /** | 455 | /** |
453 | * This method will return a list of leds | 456 | * This method will return a list of leds |
454 | * available on this device | 457 | * available on this device |
455 | * @return a list of LEDs. | 458 | * @return a list of LEDs. |
456 | */ | 459 | */ |
457 | QValueList <OLed> ODevice::ledList() const | 460 | QValueList <OLed> ODevice::ledList() const |
458 | { | 461 | { |
459 | return QValueList <OLed>(); | 462 | return QValueList <OLed>(); |
460 | } | 463 | } |
461 | 464 | ||
462 | /** | 465 | /** |
463 | * This does return the state of the LEDs | 466 | * This does return the state of the LEDs |
464 | */ | 467 | */ |
465 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const | 468 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const |
466 | { | 469 | { |
467 | return QValueList <OLedState>(); | 470 | return QValueList <OLedState>(); |
468 | } | 471 | } |
469 | 472 | ||
470 | /** | 473 | /** |
471 | * @return the state for a given OLed | 474 | * @return the state for a given OLed |
472 | */ | 475 | */ |
473 | OLedState ODevice::ledState ( OLed /*which*/ ) const | 476 | OLedState ODevice::ledState ( OLed /*which*/ ) const |
474 | { | 477 | { |
475 | return Led_Off; | 478 | return Led_Off; |
476 | } | 479 | } |
477 | 480 | ||
478 | /** | 481 | /** |
479 | * Set the state for a LED | 482 | * Set the state for a LED |
480 | * @param which Which OLed to use | 483 | * @param which Which OLed to use |
481 | * @param st The state to set | 484 | * @param st The state to set |
482 | * @return success or failure | 485 | * @return success or failure |
483 | */ | 486 | */ |
484 | bool ODevice::setLedState ( OLed which, OLedState st ) | 487 | bool ODevice::setLedState ( OLed which, OLedState st ) |
485 | { | 488 | { |
486 | Q_UNUSED( which ) | 489 | Q_UNUSED( which ) |
487 | Q_UNUSED( st ) | 490 | Q_UNUSED( st ) |
488 | return false; | 491 | return false; |
489 | } | 492 | } |
490 | 493 | ||
491 | /** | 494 | /** |
492 | * @return if the device has a light sensor | 495 | * @return if the device has a light sensor |
493 | */ | 496 | */ |
494 | bool ODevice::hasLightSensor() const | 497 | bool ODevice::hasLightSensor() const |
495 | { | 498 | { |
496 | return false; | 499 | return false; |
497 | } | 500 | } |
498 | 501 | ||
499 | /** | 502 | /** |
500 | * @return a value from the light sensor | 503 | * @return a value from the light sensor |
501 | */ | 504 | */ |
502 | int ODevice::readLightSensor() | 505 | int ODevice::readLightSensor() |
503 | { | 506 | { |
504 | return -1; | 507 | return -1; |
505 | } | 508 | } |
506 | 509 | ||
507 | /** | 510 | /** |
508 | * @return the light sensor resolution | 511 | * @return the light sensor resolution |
509 | */ | 512 | */ |
510 | int ODevice::lightSensorResolution() const | 513 | int ODevice::lightSensorResolution() const |
511 | { | 514 | { |
512 | return 0; | 515 | return 0; |
513 | } | 516 | } |
514 | 517 | ||
515 | /** | 518 | /** |
516 | * @return if the device has a hinge sensor | 519 | * @return if the device has a hinge sensor |
517 | */ | 520 | */ |
518 | bool ODevice::hasHingeSensor() const | 521 | bool ODevice::hasHingeSensor() const |
519 | { | 522 | { |
520 | return false; | 523 | return false; |
521 | } | 524 | } |
522 | 525 | ||
523 | /** | 526 | /** |
524 | * @return a value from the hinge sensor | 527 | * @return a value from the hinge sensor |
525 | */ | 528 | */ |
526 | OHingeStatus ODevice::readHingeSensor()const | 529 | OHingeStatus ODevice::readHingeSensor()const |
527 | { | 530 | { |
528 | return CASE_UNKNOWN; | 531 | return CASE_UNKNOWN; |
529 | } | 532 | } |
530 | 533 | ||
531 | /** | 534 | /** |
532 | * @return a list with CPU frequencies supported by the hardware | 535 | * @return a list with CPU frequencies supported by the hardware |
533 | */ | 536 | */ |
534 | const QStrList &ODevice::allowedCpuFrequencies() const | 537 | const QStrList &ODevice::allowedCpuFrequencies() const |
535 | { | 538 | { |
536 | return *d->m_cpu_frequencies; | 539 | return *d->m_cpu_frequencies; |
537 | } | 540 | } |
538 | 541 | ||
539 | 542 | ||
540 | /** | 543 | /** |
541 | * Set desired CPU frequency | 544 | * Set desired CPU frequency |
542 | * | 545 | * |
543 | * @param index index into d->m_cpu_frequencies of the frequency to be set | 546 | * @param index index into d->m_cpu_frequencies of the frequency to be set |
544 | */ | 547 | */ |
545 | bool ODevice::setCurrentCpuFrequency(uint index) | 548 | bool ODevice::setCurrentCpuFrequency(uint index) |
546 | { | 549 | { |
547 | if (index >= d->m_cpu_frequencies->count()) | 550 | if (index >= d->m_cpu_frequencies->count()) |
548 | return false; | 551 | return false; |
549 | 552 | ||
550 | char *freq = d->m_cpu_frequencies->at(index); | 553 | char *freq = d->m_cpu_frequencies->at(index); |
551 | qWarning("set freq to %s", freq); | 554 | qWarning("set freq to %s", freq); |
552 | 555 | ||
553 | int fd; | 556 | int fd; |
554 | 557 | ||
555 | if ((fd = ::open("/proc/sys/cpu/0/speed", O_WRONLY)) >= 0) { | 558 | if ((fd = ::open("/proc/sys/cpu/0/speed", O_WRONLY)) >= 0) { |
556 | char writeCommand[50]; | 559 | char writeCommand[50]; |
557 | const int count = sprintf(writeCommand, "%s\n", freq); | 560 | const int count = sprintf(writeCommand, "%s\n", freq); |
558 | int res = (::write(fd, writeCommand, count) != -1); | 561 | int res = (::write(fd, writeCommand, count) != -1); |
559 | ::close(fd); | 562 | ::close(fd); |
560 | return res; | 563 | return res; |
561 | } | 564 | } |
562 | 565 | ||
563 | return false; | 566 | return false; |
564 | } | 567 | } |
565 | 568 | ||
566 | 569 | ||
567 | /** | 570 | /** |
568 | * @return a list of hardware buttons | 571 | * @return a list of hardware buttons |
569 | */ | 572 | */ |
570 | const QValueList <ODeviceButton> &ODevice::buttons() | 573 | const QValueList <ODeviceButton> &ODevice::buttons() |
571 | { | 574 | { |
572 | initButtons(); | 575 | initButtons(); |
573 | 576 | ||
574 | return *d->m_buttons; | 577 | return *d->m_buttons; |
575 | } | 578 | } |
576 | 579 | ||
577 | /** | 580 | /** |
578 | * @return The amount of time that would count as a hold | 581 | * @return The amount of time that would count as a hold |
579 | */ | 582 | */ |
580 | uint ODevice::buttonHoldTime() const | 583 | uint ODevice::buttonHoldTime() const |
581 | { | 584 | { |
582 | return d->m_holdtime; | 585 | return d->m_holdtime; |
583 | } | 586 | } |
584 | 587 | ||
585 | /** | 588 | /** |
586 | * This method return a ODeviceButton for a key code | 589 | * This method return a ODeviceButton for a key code |
587 | * or 0 if no special hardware button is available for the device | 590 | * or 0 if no special hardware button is available for the device |
588 | * | 591 | * |
589 | * @return The devicebutton or 0l | 592 | * @return The devicebutton or 0l |
590 | * @see ODeviceButton | 593 | * @see ODeviceButton |
591 | */ | 594 | */ |
592 | const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) | 595 | const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) |
593 | { | 596 | { |
594 | initButtons(); | 597 | initButtons(); |
595 | 598 | ||
596 | for ( QValueListConstIterator<ODeviceButton> it = d->m_buttons->begin(); it != d->m_buttons->end(); ++it ) { | 599 | for ( QValueListConstIterator<ODeviceButton> it = d->m_buttons->begin(); it != d->m_buttons->end(); ++it ) { |
597 | if ( (*it).keycode() == code ) | 600 | if ( (*it).keycode() == code ) |
598 | return &(*it); | 601 | return &(*it); |
599 | } | 602 | } |
600 | return 0; | 603 | return 0; |
601 | } | 604 | } |
602 | 605 | ||
603 | void ODevice::reloadButtonMapping() | 606 | void ODevice::reloadButtonMapping() |
604 | { | 607 | { |
605 | if(!d->m_buttons) | 608 | if(!d->m_buttons) |
606 | initButtons(); | 609 | initButtons(); |
607 | 610 | ||
608 | if(!d->m_initializedButtonQcop) { | 611 | if(!d->m_initializedButtonQcop) { |
609 | QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); | 612 | QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); |
610 | connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), | 613 | connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), |
611 | this,SLOT(systemMessage(const QCString&,const QByteArray&))); | 614 | this,SLOT(systemMessage(const QCString&,const QByteArray&))); |
612 | d->m_initializedButtonQcop = true; | 615 | d->m_initializedButtonQcop = true; |
613 | } | 616 | } |
614 | 617 | ||
615 | Config cfg ( "ButtonSettings" ); | 618 | Config cfg ( "ButtonSettings" ); |
616 | 619 | ||
617 | for ( uint i = 0; i < d->m_buttons->count(); i++ ) { | 620 | for ( uint i = 0; i < d->m_buttons->count(); i++ ) { |
618 | ODeviceButton &b = ( *d->m_buttons ) [i]; | 621 | ODeviceButton &b = ( *d->m_buttons ) [i]; |
619 | QString group = "Button" + QString::number ( i ); | 622 | QString group = "Button" + QString::number ( i ); |
620 | 623 | ||
621 | QCString pch, hch; | 624 | QCString pch, hch; |
622 | QCString pm, hm; | 625 | QCString pm, hm; |
623 | QByteArray pdata, hdata; | 626 | QByteArray pdata, hdata; |
624 | 627 | ||
625 | if ( cfg. hasGroup ( group )) { | 628 | if ( cfg. hasGroup ( group )) { |
626 | cfg. setGroup ( group ); | 629 | cfg. setGroup ( group ); |
627 | pch = cfg. readEntry ( "PressedActionChannel" ). latin1(); | 630 | pch = cfg. readEntry ( "PressedActionChannel" ). latin1(); |
628 | pm = cfg. readEntry ( "PressedActionMessage" ). latin1(); | 631 | pm = cfg. readEntry ( "PressedActionMessage" ). latin1(); |
629 | // pdata = decodeBase64 ( buttonFile. readEntry ( "PressedActionArgs" )); | 632 | // pdata = decodeBase64 ( buttonFile. readEntry ( "PressedActionArgs" )); |
630 | 633 | ||
631 | hch = cfg. readEntry ( "HeldActionChannel" ). latin1(); | 634 | hch = cfg. readEntry ( "HeldActionChannel" ). latin1(); |
632 | hm = cfg. readEntry ( "HeldActionMessage" ). latin1(); | 635 | hm = cfg. readEntry ( "HeldActionMessage" ). latin1(); |
633 | // hdata = decodeBase64 ( buttonFile. readEntry ( "HeldActionArgs" )); | 636 | // hdata = decodeBase64 ( buttonFile. readEntry ( "HeldActionArgs" )); |
634 | } | 637 | } |
635 | 638 | ||
636 | b. setPressedAction ( OQCopMessage ( pch, pm, pdata )); | 639 | b. setPressedAction ( OQCopMessage ( pch, pm, pdata )); |
637 | b. setHeldAction ( OQCopMessage ( hch, hm, hdata )); | 640 | b. setHeldAction ( OQCopMessage ( hch, hm, hdata )); |
638 | } | 641 | } |
639 | } | 642 | } |
640 | 643 | ||
641 | void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) | 644 | void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) |
642 | { | 645 | { |
643 | initButtons(); | 646 | initButtons(); |
644 | 647 | ||
645 | QString mb_chan; | 648 | QString mb_chan; |
646 | 649 | ||
647 | if ( button >= (int) d->m_buttons->count()) | 650 | if ( button >= (int) d->m_buttons->count()) |
648 | return; | 651 | return; |
649 | 652 | ||
650 | ODeviceButton &b = ( *d->m_buttons ) [button]; | 653 | ODeviceButton &b = ( *d->m_buttons ) [button]; |
651 | b. setPressedAction ( action ); | 654 | b. setPressedAction ( action ); |
652 | 655 | ||
653 | mb_chan=b. pressedAction(). channel(); | 656 | mb_chan=b. pressedAction(). channel(); |
654 | 657 | ||
655 | Config buttonFile ( "ButtonSettings" ); | 658 | Config buttonFile ( "ButtonSettings" ); |
656 | buttonFile. setGroup ( "Button" + QString::number ( button )); | 659 | buttonFile. setGroup ( "Button" + QString::number ( button )); |
657 | buttonFile. writeEntry ( "PressedActionChannel", (const char*) mb_chan); | 660 | buttonFile. writeEntry ( "PressedActionChannel", (const char*) mb_chan); |
658 | buttonFile. writeEntry ( "PressedActionMessage", (const char*) b. pressedAction(). message()); | 661 | buttonFile. writeEntry ( "PressedActionMessage", (const char*) b. pressedAction(). message()); |
659 | 662 | ||
660 | // buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction(). data())); | 663 | // buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction(). data())); |
661 | 664 | ||
662 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); | 665 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); |
663 | } | 666 | } |
664 | 667 | ||
665 | void ODevice::remapHeldAction ( int button, const OQCopMessage &action ) | 668 | void ODevice::remapHeldAction ( int button, const OQCopMessage &action ) |
666 | { | 669 | { |
667 | initButtons(); | 670 | initButtons(); |
668 | 671 | ||
669 | if ( button >= (int) d->m_buttons->count()) | 672 | if ( button >= (int) d->m_buttons->count()) |
670 | return; | 673 | return; |
671 | 674 | ||
672 | ODeviceButton &b = ( *d->m_buttons ) [button]; | 675 | ODeviceButton &b = ( *d->m_buttons ) [button]; |
673 | b. setHeldAction ( action ); | 676 | b. setHeldAction ( action ); |
674 | 677 | ||
675 | Config buttonFile ( "ButtonSettings" ); | 678 | Config buttonFile ( "ButtonSettings" ); |
676 | buttonFile. setGroup ( "Button" + QString::number ( button )); | 679 | buttonFile. setGroup ( "Button" + QString::number ( button )); |
677 | buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction(). channel()); | 680 | buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction(). channel()); |
678 | buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction(). message()); | 681 | buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction(). message()); |
679 | 682 | ||
680 | // buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction(). data())); | 683 | // buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction(). data())); |
681 | 684 | ||
682 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); | 685 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); |
683 | } | 686 | } |
684 | 687 | ||
685 | /** | 688 | /** |
686 | * @internal | 689 | * @internal |
687 | */ | 690 | */ |
688 | void ODevice::virtual_hook(int, void* ){ | 691 | void ODevice::virtual_hook(int, void* ){ |
689 | 692 | ||
690 | } | 693 | } |
691 | 694 | ||
692 | /** | 695 | /** |
693 | * \brief Send a QCOP Message before suspending | 696 | * \brief Send a QCOP Message before suspending |
694 | * | 697 | * |
695 | * Sends a QCOP message to channel QPE/System | 698 | * Sends a QCOP message to channel QPE/System |
696 | * with the message "aboutToSuspend()" if this | 699 | * with the message "aboutToSuspend()" if this |
697 | * is the windowing server. | 700 | * is the windowing server. |
698 | * | 701 | * |
699 | * Call this in your custom \sa suspend() Method | 702 | * Call this in your custom \sa suspend() Method |
700 | * before going to suspend. | 703 | * before going to suspend. |
701 | * | 704 | * |
702 | */ | 705 | */ |
703 | void ODevice::sendSuspendmsg() | 706 | void ODevice::sendSuspendmsg() |
704 | { | 707 | { |
705 | if ( !isQWS() ) | 708 | if ( !isQWS() ) |
706 | return; | 709 | return; |
707 | 710 | ||
708 | QCopEnvelope ( "QPE/System", "aboutToSuspend()" ); | 711 | QCopEnvelope ( "QPE/System", "aboutToSuspend()" ); |
709 | } | 712 | } |
710 | 713 | ||
711 | /** | 714 | /** |
712 | * \brief Prepend the QWSServer::KeyboardFilter to the list of installed KeyFilters | 715 | * \brief Prepend the QWSServer::KeyboardFilter to the list of installed KeyFilters |
713 | * | 716 | * |
714 | * Prepend a QWSServer::KeyboardFilter to the List of Keyboard | 717 | * Prepend a QWSServer::KeyboardFilter to the List of Keyboard |
715 | * Filters. This function is the only way to prepend a KeyFilter. | 718 | * Filters. This function is the only way to prepend a KeyFilter. |
716 | * | 719 | * |
717 | * @param aFilter The KeyFilter to be prepended to the list of filters | 720 | * @param aFilter The KeyFilter to be prepended to the list of filters |
718 | * | 721 | * |
719 | * @see Opie::Core::OKeyFilter | 722 | * @see Opie::Core::OKeyFilter |
720 | * @see Opie::Core::OKeyFilter::inst() | 723 | * @see Opie::Core::OKeyFilter::inst() |
721 | */ | 724 | */ |
722 | void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter) | 725 | void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter) |
723 | { | 726 | { |
724 | Opie::Core::OKeyFilter::inst()->addPreHandler(aFilter); | 727 | Opie::Core::OKeyFilter::inst()->addPreHandler(aFilter); |
725 | } | 728 | } |
726 | 729 | ||
727 | /** | 730 | /** |
728 | * \brief Remove the QWSServer::KeyboardFilter in the param from the list | 731 | * \brief Remove the QWSServer::KeyboardFilter in the param from the list |
729 | * | 732 | * |
730 | * Remove the QWSServer::KeyboardFilter \par aFilter from the List | 733 | * Remove the QWSServer::KeyboardFilter \par aFilter from the List |
731 | * of Keyfilters. Call this when you delete the KeyFilter! | 734 | * of Keyfilters. Call this when you delete the KeyFilter! |
732 | * | 735 | * |
733 | * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter | 736 | * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter |
734 | * @see Opie::Core::ODevice::addPreHandler | 737 | * @see Opie::Core::ODevice::addPreHandler |
735 | */ | 738 | */ |
736 | void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) | 739 | void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) |
737 | { | 740 | { |
738 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); | 741 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); |
739 | } | 742 | } |
740 | 743 | ||
741 | 744 | ||
742 | /** | 745 | /** |
743 | * @internal | 746 | * @internal |
744 | * | 747 | * |
745 | * @see changeMixerForAlarm | 748 | * @see changeMixerForAlarm |
746 | */ | 749 | */ |
747 | void ODevice::playingStopped() { | 750 | void ODevice::playingStopped() { |
748 | if ( sender() ) | 751 | if ( sender() ) |
749 | const_cast<QObject*>(sender())->disconnect( this ); | 752 | const_cast<QObject*>(sender())->disconnect( this ); |
750 | 753 | ||
751 | #ifndef QT_NO_SOUND | 754 | #ifndef QT_NO_SOUND |
752 | if ( d->m_sound >= 0 ) { | 755 | if ( d->m_sound >= 0 ) { |
753 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); | 756 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); |
754 | ::close ( d->m_sound ); | 757 | ::close ( d->m_sound ); |
755 | } | 758 | } |
756 | #endif | 759 | #endif |
757 | } | 760 | } |
758 | 761 | ||
759 | 762 | ||
760 | /** | 763 | /** |
761 | * \brief Change the Volume for the Alarm and set it back after playing is finished | 764 | * \brief Change the Volume for the Alarm and set it back after playing is finished |
762 | * | 765 | * |
763 | * If you play an Alarm Sound you might want to change the Mixer to | 766 | * If you play an Alarm Sound you might want to change the Mixer to |
764 | * full volume and ignore the user setting. After it \sa Sound::isFinished | 767 | * full volume and ignore the user setting. After it \sa Sound::isFinished |
765 | * you would turn the volume back to the user preference. | 768 | * you would turn the volume back to the user preference. |
766 | * The problem is that we used to enter the event loop while waiting | 769 | * The problem is that we used to enter the event loop while waiting |
767 | * for the sound to be finished triggering all kind of reentrance | 770 | * for the sound to be finished triggering all kind of reentrance |
768 | * problems what a library shouldn't introduce. | 771 | * problems what a library shouldn't introduce. |
769 | * Instead of manually waiting for the sound to be finished use | 772 | * Instead of manually waiting for the sound to be finished use |
770 | * this Method and it will automatically restore the Mixer to | 773 | * this Method and it will automatically restore the Mixer to |
771 | * the user configuration after the sound finished playing. | 774 | * the user configuration after the sound finished playing. |
772 | * | 775 | * |
773 | * Note: The onwership of \param snd is not transfered and playing | 776 | * Note: The onwership of \param snd is not transfered and playing |
774 | * is not started in this method. If 'snd' gets deleted before | 777 | * is not started in this method. If 'snd' gets deleted before |
775 | * playing is finished the volume doesn't get set back to | 778 | * playing is finished the volume doesn't get set back to |
776 | * the user preference! | 779 | * the user preference! |
777 | * | 780 | * |
778 | * \code | 781 | * \code |
779 | * static Sound snd("alarm"); | 782 | * static Sound snd("alarm"); |
780 | * if(!snd.isFinished()) | 783 | * if(!snd.isFinished()) |
781 | * return; | 784 | * return; |
782 | * | 785 | * |
783 | * changeMixerForAlarm( my_channel, "/dev/mixer", &snd ); | 786 | * changeMixerForAlarm( my_channel, "/dev/mixer", &snd ); |
784 | * snd.play() | 787 | * snd.play() |
785 | * \endcode | 788 | * \endcode |
786 | * | 789 | * |
787 | * | 790 | * |
788 | * | 791 | * |
789 | * @param mixer The mixer number/channel to use | 792 | * @param mixer The mixer number/channel to use |
790 | * @param file The file name. If you convert from QString use QFile::encodeName | 793 | * @param file The file name. If you convert from QString use QFile::encodeName |
791 | * @param snd The sound to wait for finishing | 794 | * @param snd The sound to wait for finishing |
792 | * | 795 | * |
793 | */ | 796 | */ |
794 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { | 797 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { |
795 | #ifndef QT_NO_SOUND | 798 | #ifndef QT_NO_SOUND |
796 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { | 799 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { |
797 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { | 800 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { |
798 | Config cfg ( "qpe" ); | 801 | Config cfg ( "qpe" ); |
799 | cfg. setGroup ( "Volume" ); | 802 | cfg. setGroup ( "Volume" ); |
800 | 803 | ||
801 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); | 804 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); |
802 | if ( volalarm < 0 ) | 805 | if ( volalarm < 0 ) |
803 | volalarm = 0; | 806 | volalarm = 0; |
804 | else if ( volalarm > 100 ) | 807 | else if ( volalarm > 100 ) |
805 | volalarm = 100; | 808 | volalarm = 100; |
806 | volalarm |= ( volalarm << 8 ); | 809 | volalarm |= ( volalarm << 8 ); |
807 | 810 | ||
808 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) | 811 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) |
809 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); | 812 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); |
810 | } | 813 | } |
811 | d->m_mixer = mixer; | 814 | d->m_mixer = mixer; |
812 | } | 815 | } |
813 | #endif | 816 | #endif |
814 | } | 817 | } |
815 | 818 | ||
816 | } | 819 | } |
817 | } | 820 | } |
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index c70d2af..0c78277 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -1,392 +1,397 @@ | |||
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 | Copyright (C) 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; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
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 | 73 | ||
74 | Model_Jornada = ( 6 << 16 ), | 74 | Model_Jornada = ( 6 << 16 ), |
75 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), | 75 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), |
76 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), | 76 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), |
77 | 77 | ||
78 | Model_Zaurus = ( 2 << 16 ), | 78 | Model_Zaurus = ( 2 << 16 ), |
79 | 79 | ||
80 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), | 80 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), |
81 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), | 81 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), |
82 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), | 82 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), |
83 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), | 83 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), |
84 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), | 84 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), |
85 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), | 85 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), |
86 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), | 86 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), |
87 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), | 87 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), |
88 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), | 88 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), |
89 | 89 | ||
90 | Model_SIMpad = ( 3 << 16 ), | 90 | Model_SIMpad = ( 3 << 16 ), |
91 | 91 | ||
92 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), | 92 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), |
93 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), | 93 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), |
94 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), | 94 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), |
95 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), | 95 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), |
96 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), | 96 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), |
97 | 97 | ||
98 | Model_Ramses = ( 4 << 16 ), | 98 | Model_Ramses = ( 4 << 16 ), |
99 | 99 | ||
100 | Model_Ramses_All = ( Model_Ramses | 0xffff ), | 100 | Model_Ramses_All = ( Model_Ramses | 0xffff ), |
101 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), | 101 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), |
102 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), | 102 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), |
103 | 103 | ||
104 | Model_Yopy = ( 5 << 16 ), | 104 | Model_Yopy = ( 5 << 16 ), |
105 | 105 | ||
106 | Model_Yopy_All = ( Model_Yopy | 0xffff ), | 106 | Model_Yopy_All = ( Model_Yopy | 0xffff ), |
107 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), | 107 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), |
108 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), | 108 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), |
109 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), | 109 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), |
110 | 110 | ||
111 | Model_Beagle = ( 6 << 16 ), | 111 | Model_Beagle = ( 6 << 16 ), |
112 | 112 | ||
113 | Model_Beagle_All = ( Model_Beagle | 0xffff ), | 113 | Model_Beagle_All = ( Model_Beagle | 0xffff ), |
114 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), | 114 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), |
115 | 115 | ||
116 | Model_GenuineIntel = ( 7 << 16 ), | 116 | Model_GenuineIntel = ( 7 << 16 ), |
117 | 117 | ||
118 | Model_MyPal = ( 8 << 16 ), | 118 | Model_MyPal = ( 8 << 16 ), |
119 | 119 | ||
120 | Model_MyPal_All = ( Model_MyPal | 0xffff ), | 120 | Model_MyPal_All = ( Model_MyPal | 0xffff ), |
121 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), | 121 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), |
122 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), | 122 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), |
123 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ) | 123 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ), |
124 | |||
125 | Model_HTC = ( 9 << 16 ), | ||
126 | Model_HTC_All = ( Model_HTC | 0xffff ), | ||
127 | Model_HTC_Universal = ( Model_HTC | 0x0001 ) | ||
124 | }; | 128 | }; |
125 | 129 | ||
126 | /** | 130 | /** |
127 | * The vendor of the device | 131 | * The vendor of the device |
128 | */ | 132 | */ |
129 | enum OVendor { | 133 | enum OVendor { |
130 | Vendor_Unknown, | 134 | Vendor_Unknown, |
131 | 135 | ||
132 | Vendor_HP, | 136 | Vendor_HP, |
133 | Vendor_Sharp, | 137 | Vendor_Sharp, |
134 | Vendor_SIEMENS, | 138 | Vendor_SIEMENS, |
135 | Vendor_MundN, | 139 | Vendor_MundN, |
136 | Vendor_GMate, | 140 | Vendor_GMate, |
137 | Vendor_MasterIA, | 141 | Vendor_MasterIA, |
138 | Vendor_GenuineIntel, | 142 | Vendor_GenuineIntel, |
139 | Vendor_Asus | 143 | Vendor_Asus, |
144 | Vendor_HTC | ||
140 | }; | 145 | }; |
141 | 146 | ||
142 | /** | 147 | /** |
143 | * The System used | 148 | * The System used |
144 | */ | 149 | */ |
145 | enum OSystem { | 150 | enum OSystem { |
146 | System_Unknown, | 151 | System_Unknown, |
147 | 152 | ||
148 | System_Familiar, | 153 | System_Familiar, |
149 | System_Zaurus, | 154 | System_Zaurus, |
150 | System_OpenZaurus, | 155 | System_OpenZaurus, |
151 | System_Linupy, | 156 | System_Linupy, |
152 | System_OpenEmbedded, | 157 | System_OpenEmbedded, |
153 | System_PC | 158 | System_PC |
154 | }; | 159 | }; |
155 | 160 | ||
156 | typedef struct { | 161 | typedef struct { |
157 | OSystem system; | 162 | OSystem system; |
158 | char* sysstr; | 163 | char* sysstr; |
159 | char* sysvfile; | 164 | char* sysvfile; |
160 | } ODistribution; | 165 | } ODistribution; |
161 | 166 | ||
162 | extern ODistribution distributions[]; | 167 | extern ODistribution distributions[]; |
163 | 168 | ||
164 | 169 | ||
165 | enum OLedState { | 170 | enum OLedState { |
166 | Led_Off, | 171 | Led_Off, |
167 | Led_On, | 172 | Led_On, |
168 | Led_BlinkSlow, | 173 | Led_BlinkSlow, |
169 | Led_BlinkFast | 174 | Led_BlinkFast |
170 | }; | 175 | }; |
171 | 176 | ||
172 | enum OLed { | 177 | enum OLed { |
173 | Led_Mail, | 178 | Led_Mail, |
174 | Led_Power, | 179 | Led_Power, |
175 | Led_BlueTooth | 180 | Led_BlueTooth |
176 | }; | 181 | }; |
177 | 182 | ||
178 | enum OHardKey { | 183 | enum OHardKey { |
179 | HardKey_Datebook = Qt::Key_F9, | 184 | HardKey_Datebook = Qt::Key_F9, |
180 | HardKey_Contacts = Qt::Key_F10, | 185 | HardKey_Contacts = Qt::Key_F10, |
181 | HardKey_Menu = Qt::Key_F11, | 186 | HardKey_Menu = Qt::Key_F11, |
182 | HardKey_Home = Qt::Key_F12, | 187 | HardKey_Home = Qt::Key_F12, |
183 | HardKey_Mail = Qt::Key_F13, | 188 | HardKey_Mail = Qt::Key_F13, |
184 | HardKey_Record = Qt::Key_F24, | 189 | HardKey_Record = Qt::Key_F24, |
185 | HardKey_Suspend = Qt::Key_F34, | 190 | HardKey_Suspend = Qt::Key_F34, |
186 | HardKey_Backlight = Qt::Key_F35, | 191 | HardKey_Backlight = Qt::Key_F35, |
187 | HardKey_Action = Qt::Key_F10, | 192 | HardKey_Action = Qt::Key_F10, |
188 | HardKey_OK = Qt::Key_F11, | 193 | HardKey_OK = Qt::Key_F11, |
189 | HardKey_End = Qt::Key_F12, | 194 | HardKey_End = Qt::Key_F12, |
190 | }; | 195 | }; |
191 | 196 | ||
192 | enum ODirection { | 197 | enum ODirection { |
193 | CW = 0, | 198 | CW = 0, |
194 | CCW = 1, | 199 | CCW = 1, |
195 | Flip = 2, | 200 | Flip = 2, |
196 | }; | 201 | }; |
197 | 202 | ||
198 | enum OHingeStatus { | 203 | enum OHingeStatus { |
199 | CASE_CLOSED = 3, | 204 | CASE_CLOSED = 3, |
200 | CASE_PORTRAIT = 2, | 205 | CASE_PORTRAIT = 2, |
201 | CASE_LANDSCAPE = 0, | 206 | CASE_LANDSCAPE = 0, |
202 | CASE_UNKNOWN = 1, | 207 | CASE_UNKNOWN = 1, |
203 | }; | 208 | }; |
204 | 209 | ||
205 | /* default button for qvfb or such | 210 | /* default button for qvfb or such |
206 | * see odevice.cpp for details. | 211 | * see odevice.cpp for details. |
207 | * hint: manage a user defined button for qvfb? | 212 | * hint: manage a user defined button for qvfb? |
208 | * alwin | 213 | * alwin |
209 | */ | 214 | */ |
210 | struct default_button { | 215 | struct default_button { |
211 | Qt::Key code; | 216 | Qt::Key code; |
212 | char *utext; | 217 | char *utext; |
213 | char *pix; | 218 | char *pix; |
214 | char *fpressedservice; | 219 | char *fpressedservice; |
215 | char *fpressedaction; | 220 | char *fpressedaction; |
216 | char *fheldservice; | 221 | char *fheldservice; |
217 | char *fheldaction; | 222 | char *fheldaction; |
218 | }; | 223 | }; |
219 | 224 | ||
220 | /** | 225 | /** |
221 | * A singleton which gives informations about device specefic option | 226 | * A singleton which gives informations about device specefic option |
222 | * like the Hardware used, LEDs, the Base Distribution and | 227 | * like the Hardware used, LEDs, the Base Distribution and |
223 | * hardware key mappings. | 228 | * hardware key mappings. |
224 | * | 229 | * |
225 | * @short A small class for device specific options | 230 | * @short A small class for device specific options |
226 | * @see QObject | 231 | * @see QObject |
227 | * @author Robert Griebl | 232 | * @author Robert Griebl |
228 | * @version 1.0 | 233 | * @version 1.0 |
229 | */ | 234 | */ |
230 | class ODevice : public QObject | 235 | class ODevice : public QObject |
231 | { | 236 | { |
232 | Q_OBJECT | 237 | Q_OBJECT |
233 | 238 | ||
234 | private: | 239 | private: |
235 | /* disable copy */ | 240 | /* disable copy */ |
236 | ODevice ( const ODevice & ); | 241 | ODevice ( const ODevice & ); |
237 | 242 | ||
238 | protected: | 243 | protected: |
239 | ODevice(); | 244 | ODevice(); |
240 | virtual void init(const QString&); | 245 | virtual void init(const QString&); |
241 | virtual void initButtons(); | 246 | virtual void initButtons(); |
242 | static void sendSuspendmsg(); | 247 | static void sendSuspendmsg(); |
243 | 248 | ||
244 | ODeviceData *d; | 249 | ODeviceData *d; |
245 | 250 | ||
246 | public: | 251 | public: |
247 | // sandman do we want to allow destructions? -zecke? | 252 | // sandman do we want to allow destructions? -zecke? |
248 | virtual ~ODevice(); | 253 | virtual ~ODevice(); |
249 | static ODevice *inst(); | 254 | static ODevice *inst(); |
250 | 255 | ||
251 | // information | 256 | // information |
252 | QString modelString() const; | 257 | QString modelString() const; |
253 | OModel model() const; | 258 | OModel model() const; |
254 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } | 259 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } |
255 | 260 | ||
256 | QString vendorString() const; | 261 | QString vendorString() const; |
257 | OVendor vendor() const; | 262 | OVendor vendor() const; |
258 | 263 | ||
259 | QString systemString() const; | 264 | QString systemString() const; |
260 | OSystem system() const; | 265 | OSystem system() const; |
261 | 266 | ||
262 | QString systemVersionString() const; | 267 | QString systemVersionString() const; |
263 | 268 | ||
264 | virtual Transformation rotation() const; | 269 | virtual Transformation rotation() const; |
265 | virtual ODirection direction() const; | 270 | virtual ODirection direction() const; |
266 | 271 | ||
267 | QString qteDriver() const; | 272 | QString qteDriver() const; |
268 | 273 | ||
269 | // system | 274 | // system |
270 | virtual bool suspend(); | 275 | virtual bool suspend(); |
271 | 276 | ||
272 | virtual bool setDisplayStatus ( bool on ); | 277 | virtual bool setDisplayStatus ( bool on ); |
273 | virtual bool setDisplayBrightness ( int brightness ); | 278 | virtual bool setDisplayBrightness ( int brightness ); |
274 | virtual int displayBrightnessResolution() const; | 279 | virtual int displayBrightnessResolution() const; |
275 | virtual bool setDisplayContrast ( int contrast ); | 280 | virtual bool setDisplayContrast ( int contrast ); |
276 | virtual int displayContrastResolution() const; | 281 | virtual int displayContrastResolution() const; |
277 | 282 | ||
278 | // don't add new virtual methods, use this: | 283 | // don't add new virtual methods, use this: |
279 | // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; | 284 | // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; |
280 | // and in your subclass do overwrite | 285 | // and in your subclass do overwrite |
281 | // protected virtual int virtual_hook(int, void *) | 286 | // protected virtual int virtual_hook(int, void *) |
282 | // which is defined below | 287 | // which is defined below |
283 | 288 | ||
284 | // input / output | 289 | // input / output |
285 | virtual void playAlarmSound(); | 290 | virtual void playAlarmSound(); |
286 | virtual void playKeySound(); | 291 | virtual void playKeySound(); |
287 | virtual void playTouchSound(); | 292 | virtual void playTouchSound(); |
288 | 293 | ||
289 | virtual QValueList <OLed> ledList() const; | 294 | virtual QValueList <OLed> ledList() const; |
290 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 295 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
291 | virtual OLedState ledState ( OLed led ) const; | 296 | virtual OLedState ledState ( OLed led ) const; |
292 | virtual bool setLedState ( OLed led, OLedState st ); | 297 | virtual bool setLedState ( OLed led, OLedState st ); |
293 | 298 | ||
294 | virtual bool hasLightSensor() const; | 299 | virtual bool hasLightSensor() const; |
295 | virtual int readLightSensor(); | 300 | virtual int readLightSensor(); |
296 | virtual int lightSensorResolution() const; | 301 | virtual int lightSensorResolution() const; |
297 | 302 | ||
298 | virtual bool hasHingeSensor() const; | 303 | virtual bool hasHingeSensor() const; |
299 | virtual OHingeStatus readHingeSensor()const; | 304 | virtual OHingeStatus readHingeSensor()const; |
300 | 305 | ||
301 | const QStrList &allowedCpuFrequencies() const; | 306 | const QStrList &allowedCpuFrequencies() const; |
302 | bool setCurrentCpuFrequency(uint index); | 307 | bool setCurrentCpuFrequency(uint index); |
303 | 308 | ||
304 | /** | 309 | /** |
305 | * Returns the available buttons on this device. The number and location | 310 | * Returns the available buttons on this device. The number and location |
306 | * of buttons will vary depending on the device. Button numbers will be assigned | 311 | * of buttons will vary depending on the device. Button numbers will be assigned |
307 | * by the device manufacturer and will be from most preferred button to least preffered | 312 | * by the device manufacturer and will be from most preferred button to least preffered |
308 | * button. Note that this list only contains "user mappable" buttons. | 313 | * button. Note that this list only contains "user mappable" buttons. |
309 | * | 314 | * |
310 | * @todo Make method const and take care of calling initButtons or make that const too | 315 | * @todo Make method const and take care of calling initButtons or make that const too |
311 | * | 316 | * |
312 | */ | 317 | */ |
313 | const QValueList<ODeviceButton> &buttons(); | 318 | const QValueList<ODeviceButton> &buttons(); |
314 | 319 | ||
315 | /** | 320 | /** |
316 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it | 321 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it |
317 | * returns 0L | 322 | * returns 0L |
318 | */ | 323 | */ |
319 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); | 324 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); |
320 | 325 | ||
321 | /** | 326 | /** |
322 | * Reassigns the pressed action for \a button. To return to the factory | 327 | * Reassigns the pressed action for \a button. To return to the factory |
323 | * default pass an empty string as \a qcopMessage. | 328 | * default pass an empty string as \a qcopMessage. |
324 | */ | 329 | */ |
325 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); | 330 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); |
326 | 331 | ||
327 | /** | 332 | /** |
328 | * Reassigns the held action for \a button. To return to the factory | 333 | * Reassigns the held action for \a button. To return to the factory |
329 | * default pass an empty string as \a qcopMessage. | 334 | * default pass an empty string as \a qcopMessage. |
330 | */ | 335 | */ |
331 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); | 336 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); |
332 | 337 | ||
333 | /** | 338 | /** |
334 | * How long (in ms) you have to press a button for a "hold" action | 339 | * How long (in ms) you have to press a button for a "hold" action |
335 | */ | 340 | */ |
336 | uint buttonHoldTime() const; | 341 | uint buttonHoldTime() const; |
337 | 342 | ||
338 | signals: | 343 | signals: |
339 | void buttonMappingChanged(); | 344 | void buttonMappingChanged(); |
340 | 345 | ||
341 | private slots: | 346 | private slots: |
342 | void systemMessage ( const QCString &, const QByteArray & ); | 347 | void systemMessage ( const QCString &, const QByteArray & ); |
343 | void playingStopped(); | 348 | void playingStopped(); |
344 | 349 | ||
345 | protected: | 350 | protected: |
346 | void addPreHandler(QWSServer::KeyboardFilter*aFilter); | 351 | void addPreHandler(QWSServer::KeyboardFilter*aFilter); |
347 | void remPreHandler(QWSServer::KeyboardFilter*aFilter); | 352 | void remPreHandler(QWSServer::KeyboardFilter*aFilter); |
348 | void reloadButtonMapping(); | 353 | void reloadButtonMapping(); |
349 | void changeMixerForAlarm( int mixer, const char* file, Sound *snd); | 354 | void changeMixerForAlarm( int mixer, const char* file, Sound *snd); |
350 | 355 | ||
351 | /* ugly virtual hook */ | 356 | /* ugly virtual hook */ |
352 | virtual void virtual_hook( int id, void* data ); | 357 | virtual void virtual_hook( int id, void* data ); |
353 | }; | 358 | }; |
354 | 359 | ||
355 | class ODeviceData { | 360 | class ODeviceData { |
356 | 361 | ||
357 | public: | 362 | public: |
358 | QString m_vendorstr; | 363 | QString m_vendorstr; |
359 | OVendor m_vendor; | 364 | OVendor m_vendor; |
360 | 365 | ||
361 | QString m_modelstr; | 366 | QString m_modelstr; |
362 | OModel m_model; | 367 | OModel m_model; |
363 | 368 | ||
364 | QString m_systemstr; | 369 | QString m_systemstr; |
365 | OSystem m_system; | 370 | OSystem m_system; |
366 | 371 | ||
367 | QString m_sysverstr; | 372 | QString m_sysverstr; |
368 | 373 | ||
369 | Transformation m_rotation; | 374 | Transformation m_rotation; |
370 | ODirection m_direction; | 375 | ODirection m_direction; |
371 | 376 | ||
372 | QString m_qteDriver; | 377 | QString m_qteDriver; |
373 | 378 | ||
374 | QValueList <ODeviceButton> *m_buttons; | 379 | QValueList <ODeviceButton> *m_buttons; |
375 | uint m_holdtime; | 380 | uint m_holdtime; |
376 | QStrList *m_cpu_frequencies; | 381 | QStrList *m_cpu_frequencies; |
377 | bool m_initializedButtonQcop : 1; | 382 | bool m_initializedButtonQcop : 1; |
378 | 383 | ||
379 | /* values for changeMixerForAlarm */ | 384 | /* values for changeMixerForAlarm */ |
380 | int m_sound, m_vol, m_mixer; | 385 | int m_sound, m_vol, m_mixer; |
381 | }; | 386 | }; |
382 | 387 | ||
383 | extern bool isQWS(); | 388 | extern bool isQWS(); |
384 | extern QCString makeChannel ( const char *str ); | 389 | extern QCString makeChannel ( const char *str ); |
385 | } | 390 | } |
386 | } | 391 | } |
387 | 392 | ||
388 | 393 | ||
389 | 394 | ||
390 | 395 | ||
391 | #endif | 396 | #endif |
392 | 397 | ||
diff --git a/libopie2/opiecore/device/odevice_htc.h b/libopie2/opiecore/device/odevice_htc.h new file mode 100644 index 0000000..5b707c8 --- a/dev/null +++ b/libopie2/opiecore/device/odevice_htc.h | |||
@@ -0,0 +1,154 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> | ||
4 | =. Copyright (C) 2002-2005 Michael 'Mickey' Lauer <mickey@Vanille.de> | ||
5 | .=l. | ||
6 | .>+-= | ||
7 | _;:, .> :=|. This program is free software; you can | ||
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; version 2 of the License. | ||
12 | ._= =} : | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This program is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | */ | ||
29 | |||
30 | #ifndef ODEVICE_HTC | ||
31 | #define ODEVICE_HTC | ||
32 | |||
33 | #include "odevice_abstractmobiledevice.h" | ||
34 | |||
35 | /* QT */ | ||
36 | #include <qfile.h> | ||
37 | #include <qwindowsystem_qws.h> | ||
38 | |||
39 | #ifndef ARRAY_SIZE | ||
40 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
41 | #endif | ||
42 | |||
43 | // _IO and friends are only defined in kernel headers ... | ||
44 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) | ||
45 | #define OD_IO(type,number) OD_IOC(0,type,number,0) | ||
46 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) | ||
47 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) | ||
48 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) | ||
49 | |||
50 | // Audio | ||
51 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 | ||
52 | |||
53 | #define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | ||
54 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | ||
55 | |||
56 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | ||
57 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ | ||
58 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ | ||
59 | |||
60 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) | ||
61 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) | ||
62 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) | ||
63 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) | ||
64 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) | ||
65 | |||
66 | // LED | ||
67 | #define SHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | ||
68 | #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) | ||
69 | #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ | ||
70 | |||
71 | #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ | ||
72 | #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ | ||
73 | #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ | ||
74 | |||
75 | // Rotation and Power Management | ||
76 | #define SHARP_IOCTL_GET_ROTATION 0x413c | ||
77 | |||
78 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) | ||
79 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) | ||
80 | #define APM_EVT_POWER_BUTTON (1 << 0) | ||
81 | |||
82 | // Brightness Embedix | ||
83 | #define SHARP_FL_IOCTL_DEVICE "/dev/sharp_fl" | ||
84 | #define SHARP_FL_IOCTL_ON 1 | ||
85 | #define SHARP_FL_IOCTL_OFF 2 | ||
86 | #define SHARP_FL_IOCTL_STEP_CONTRAST 100 | ||
87 | #define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101 | ||
88 | #define SHARP_FL_IOCTL_GET_STEP 102 | ||
89 | |||
90 | // Vesa Standard | ||
91 | #define FB_BLANK_UNBLANK 0 | ||
92 | #define FB_BLANK_POWERDOWN 4 | ||
93 | |||
94 | namespace Opie { | ||
95 | namespace Core { | ||
96 | namespace Internal { | ||
97 | |||
98 | class HTC : public OAbstractMobileDevice, public QWSServer::KeyboardFilter | ||
99 | { | ||
100 | Q_OBJECT | ||
101 | |||
102 | protected: | ||
103 | virtual void init(const QString&); | ||
104 | virtual void initButtons(); | ||
105 | void initHingeSensor(); | ||
106 | |||
107 | protected slots: | ||
108 | void hingeSensorTriggered(); | ||
109 | void systemMessage( const QCString &msg, const QByteArray & ); | ||
110 | |||
111 | public: | ||
112 | virtual bool setDisplayBrightness( int b ); | ||
113 | virtual bool setDisplayStatus( bool on ); | ||
114 | virtual int displayBrightnessResolution() const; | ||
115 | |||
116 | virtual void playAlarmSound(); | ||
117 | virtual void playKeySound(); | ||
118 | virtual void playTouchSound(); | ||
119 | |||
120 | virtual QValueList <OLed> ledList() const; | ||
121 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | ||
122 | virtual OLedState ledState( OLed led ) const; | ||
123 | virtual bool setLedState( OLed led, OLedState st ); | ||
124 | |||
125 | virtual bool hasHingeSensor() const; | ||
126 | virtual OHingeStatus readHingeSensor() const; | ||
127 | |||
128 | virtual Transformation rotation() const; | ||
129 | virtual ODirection direction() const; | ||
130 | virtual bool suspend(); | ||
131 | |||
132 | protected: | ||
133 | virtual void buzzer( int snd ); | ||
134 | virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | ||
135 | |||
136 | QString m_backlightdev; | ||
137 | OLedState m_leds[1]; | ||
138 | bool m_embedix; | ||
139 | QFile m_hinge; | ||
140 | }; | ||
141 | |||
142 | struct htc_button { | ||
143 | Qt::Key code; | ||
144 | char *utext; | ||
145 | char *pix; | ||
146 | char *fpressedservice; | ||
147 | char *fpressedaction; | ||
148 | char *fheldservice; | ||
149 | char *fheldaction; | ||
150 | }; | ||
151 | } | ||
152 | } | ||
153 | } | ||
154 | #endif | ||
diff --git a/mkspecs/qws/linux-htc-g++/qmake.conf b/mkspecs/qws/linux-htc-g++/qmake.conf new file mode 100644 index 0000000..76a0ad5 --- a/dev/null +++ b/mkspecs/qws/linux-htc-g++/qmake.conf | |||
@@ -0,0 +1,81 @@ | |||
1 | # | ||
2 | # $Id$ | ||
3 | # | ||
4 | # qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler | ||
5 | # | ||
6 | |||
7 | MAKEFILE_GENERATOR= UNIX | ||
8 | TEMPLATE = app | ||
9 | CONFIG += qt link_prl | ||
10 | |||
11 | QMAKE_CC = $(CCACHE) $(DISTCC) $(shell which arm-linux-gcc) | ||
12 | QMAKE_LEX = flex | ||
13 | QMAKE_LEXFLAGS = | ||
14 | QMAKE_YACC = yacc | ||
15 | QMAKE_YACCFLAGS = -d | ||
16 | QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA) | ||
17 | QMAKE_CFLAGS_WARN_ON= -Wall -W | ||
18 | QMAKE_CFLAGS_WARN_OFF= | ||
19 | QMAKE_CFLAGS_RELEASE= $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2) | ||
20 | QMAKE_CFLAGS_DEBUG= -g | ||
21 | QMAKE_CFLAGS_SHLIB= -fPIC | ||
22 | QMAKE_CFLAGS_YACC= -Wno-unused -Wno-parentheses | ||
23 | QMAKE_CFLAGS_THREAD= -D_REENTRANT | ||
24 | |||
25 | QMAKE_CXX = $(CCACHE) $(DISTCC) $(shell which arm-linux-g++) -DQT_QWS_IPAQ | ||
26 | QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA) | ||
27 | QMAKE_CXXFLAGS_WARN_ON= $$QMAKE_CFLAGS_WARN_ON | ||
28 | QMAKE_CXXFLAGS_WARN_OFF= $$QMAKE_CFLAGS_WARN_OFF | ||
29 | QMAKE_CXXFLAGS_RELEASE= $$QMAKE_CFLAGS_RELEASE | ||
30 | QMAKE_CXXFLAGS_DEBUG= $$QMAKE_CFLAGS_DEBUG | ||
31 | QMAKE_CXXFLAGS_SHLIB= $$QMAKE_CFLAGS_SHLIB | ||
32 | QMAKE_CXXFLAGS_YACC= $$QMAKE_CFLAGS_YACC | ||
33 | QMAKE_CXXFLAGS_THREAD= $$QMAKE_CFLAGS_THREAD | ||
34 | |||
35 | QMAKE_INCDIR = | ||
36 | QMAKE_LIBDIR = | ||
37 | QMAKE_INCDIR_X11= | ||
38 | QMAKE_LIBDIR_X11= | ||
39 | QMAKE_INCDIR_QT = $(QTDIR)/include | ||
40 | QMAKE_LIBDIR_QT = $(QTDIR)/lib | ||
41 | QMAKE_INCDIR_OPENGL= /usr/X11R6/include | ||
42 | QMAKE_LIBDIR_OPENGL= /usr/X11R6/lib | ||
43 | QMAKE_INCDIR_QTOPIA= $(QPEDIR)/include | ||
44 | QMAKE_LIBDIR_QTOPIA= $(QPEDIR)/lib | ||
45 | |||
46 | QMAKE_LINK = arm-linux-g++ | ||
47 | QMAKE_LINK_SHLIB= arm-linux-g++ | ||
48 | QMAKE_LFLAGS = $(LFLAGS_EXTRA) | ||
49 | QMAKE_LFLAGS_RELEASE= | ||
50 | QMAKE_LFLAGS_DEBUG= | ||
51 | QMAKE_LFLAGS_SHLIB = -shared | ||
52 | QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB | ||
53 | QMAKE_LFLAGS_SONAME = -Wl,-soname, | ||
54 | QMAKE_LFLAGS_THREAD = | ||
55 | QMAKE_RPATH = -Wl,-rpath-link, | ||
56 | |||
57 | QMAKE_LIBS = $(LIBS_EXTRA) | ||
58 | QMAKE_LIBS_DYNLOAD = -ldl | ||
59 | QMAKE_LIBS_X11 = | ||
60 | QMAKE_LIBS_X11SM= | ||
61 | QMAKE_LIBS_QT = -lqte | ||
62 | QMAKE_LIBS_QT_THREAD = -lqte-mt | ||
63 | QMAKE_LIBS_QT_OPENGL= -lqgl | ||
64 | QMAKE_LIBS_QTOPIA= -lqtopia -lqpe | ||
65 | QMAKE_LIBS_THREAD = -lpthread | ||
66 | |||
67 | QMAKE_MOC = $(QTDIR)/bin/moc | ||
68 | QMAKE_UIC = $(QTDIR)/bin/uic | ||
69 | |||
70 | QMAKE_AR = ar cqs | ||
71 | QMAKE_RANLIB = | ||
72 | |||
73 | QMAKE_TAR = tar -cf | ||
74 | QMAKE_GZIP = gzip -9f | ||
75 | |||
76 | QMAKE_COPY = cp -f | ||
77 | QMAKE_MOVE = mv -f | ||
78 | QMAKE_DEL_FILE = rm -f | ||
79 | QMAKE_DEL_DIR = rmdir | ||
80 | QMAKE_CHK_DIR_EXISTS= test -d | ||
81 | QMAKE_MKDIR = mkdir -p | ||