summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/autodetection.cpp (follow)
Commit message (Collapse)AuthorAge
* Fix crash when detecting a player in MTP mode.Dominik Riebeling2014-05-24
| | | | Change-Id: I65bf6928584735d6a179750c313fb8e7dcf7add5
* Use cutelogger for Rockbox Utility internal trace.Dominik Riebeling2013-11-04
| | | | | | | | Change tracing from qDebug() to use cutelogger, which is available under the LGPL2.1. This allows to automatically add filename and line number to the log, and also provides multiple log levels. Change-Id: I5dbdaf902ba54ea99f07ae10a07467c52fdac910
* Use function for updating detected device entry.Dominik Riebeling2013-09-30
| | | | | | | Use a function instead of looking for an existing entry and creating a new one if necessary every time. Change-Id: I7b385dad7366f27370545a7d1a9f7052510cca11
* Rework autodetection to better handle ambiguous cases.Dominik Riebeling2013-09-18
| | | | | | | | | | | | | | | | | | | | The old detection code simply assumed only one player to be connected and threw all information it could find together, causing wrong results in various cases. Rewrite it to better handle this. - Don't expect only a single player to be attached. Return a list of players found instead. The configuration dialog can then show the user a list to select from. This is not implemented yet, the configuration dialog will only show the devices found and tell the user to disconnect all but one. - Handle ambiguous cases better. A player found that is ambiguous is treated as such, and if refining the result didn't lead to a single match for each possible player a single entry is created that indicates it being ambiguous. The current code needs a bit of additional cleanup (the result exposes internal data to the caller it shouldn't) to be done later. Change-Id: I22dc2f73cdd6a9d90c34f3a0703aa9e0a2d2087a
* Change autodetection result to a list.Dominik Riebeling2013-04-09
| | | | | | | | | | | | | | | | | Both autodetection functionality and the configuration dialog assumed detection to only return one found device. This isn't necessarily true, especially since some players can be detected but detecting their mountpoint might be ambiguous (only if no previous Rockbox installation is present). Instead of returning individual results (found "ok" player, found "error" player etc.) return a list containing an entry for each player. Current autodetection code will never return more than one entry since it doesn't handle multiple devices yet, and the configuration dialog will show an error if multiple devices are found. Thus there is no user visible change yet. Both autodetection and configuration dialog can now get extended to handle multiple devices. Change-Id: I79b763dbd6e7111783194bcc22ab7cc06a4061c1
* Extend Utils::mountpoints() to allow filtering for supported types.Dominik Riebeling2013-04-04
| | | | | | | Instead of trying every mountpoint during autodetection allow filtering out filesystems that are not supported when retrieving the system mountpoints. Change-Id: Ic23a5c804cb7c78c146dbc1af7443c67ce12464e
* Provide dealloc function to sansapatcher.Dominik Riebeling2013-01-01
| | | | | | | Similar as done with ipodpatcher provide a function to free the allocated sector buffer. Change-Id: Ie51e82f7191496bb48973148af1cc35cd37993d3
* Provide dealloc function to ipodpatcher.Dominik Riebeling2013-01-01
| | | | | | | | | On Windows the sector buffer is allocated using VirtualAlloc, thus releasing this buffer should be done using VirtualFree. Provide an additional function for deallocating the buffer so users of ipodpatcher do not need to know about this. Change-Id: Ibb0fc575a185148a389e63935e86a392bf8d180d
* sansapatcher: move sectorbuf pointer into sansa_t structure.Dominik Riebeling2013-01-01
| | | | | | | | Similar as the ipod_t structure for ipodpatcher the sansa_t structure holds all relevant information for sansapatcher. Put the global sansa_sectorbuf pointer into it as well. Change-Id: Iad08ef6aafc49609c3d0d556914246f230ee0179
* ipodpatcher: move sectorbuf pointer into ipod_t structure.Dominik Riebeling2013-01-01
| | | | | | | | | The ipod_t structure holds all relevant information for ipodpatcher. Put the global ipod_sectorbuf pointer into it as well. Allows the Rockbox Utility Ipod class to be instanciated multiple times since each instance can now have its own buffer. Change-Id: Ie319cbadbc20c367ceadba9a46b4dc34b57a79a7
* Allow USB IDs to be non-unique.Dominik Riebeling2012-10-06
| | | | | | | | | | | When retrieving USB IDs create a list of players matching to a USB ID instead of assuming only one player. This prevents non-unique IDs overwriting each other and will be used for improved autodetection later. Currently only the first ID is used during detection, and no additional IDs have been added yet. Change-Id: Ieac5594108bae708e364bd2c8df88f61fcdcbdcd
* Remove svn keyword lines from sources.Dominik Riebeling2011-10-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30806 a1c6a512-1295-4272-9138-f99709370657
* Move some helper functions out of Autodetection.Dominik Riebeling2011-07-17
| | | | | | Those functions are rather general, so put them into the Utils class instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30146 a1c6a512-1295-4272-9138-f99709370657
* Remove Ipod Video 64MB handling.Dominik Riebeling2010-09-01
| | | | | | | Since the builds for the Ipod Video 32MB and 64MB are now unified there is no need to handle them separately in Rockbox Utility anymore. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27966 a1c6a512-1295-4272-9138-f99709370657
* Handle device name resolving failures.Dominik Riebeling2010-04-27
| | | | | | | | | | Improve tracing of device name resolving. Explicitly fail if resolving the device name from the mountpoint failed during ipod / sansa bootloader installation. Fixes bootloader installation trying to use an empty device name in some cases which can happen if the mountpoint to get resolved uses an incompatible file system. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25743 a1c6a512-1295-4272-9138-f99709370657
* Log failures in mountpoint resolving, log filesystem formats in mountpoints().Dominik Riebeling2010-04-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25718 a1c6a512-1295-4272-9138-f99709370657
* Move utils.cpp functions into separate class and split it up.Dominik Riebeling2010-04-02
| | | | | | | | | Move class-less functions in utils.cpp into a new Utils class and make the old functions static. This prevents clashes with system C functions. Rename some functions to avoid macro problems (check() is a macro on OS X). Split out the RockboxInfo class into a separate file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25441 a1c6a512-1295-4272-9138-f99709370657
* Use the data partition device node when trying to resolve the mountpoint.Dominik Riebeling2010-02-27
| | | | | | | | The stricter matching for device nodes introduced with r24802 broke resolving the mountpoint during autodetection as sansapatcher and ipodpatcher return the device node of the player instead of its data partition. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24936 a1c6a512-1295-4272-9138-f99709370657
* Be more strict when when resolving devices and allow hfs too.Dominik Riebeling2010-02-20
| | | | | | | | | | | On OS X HFS is a valid filesystem on an Ipod. When resolving device node to mountpoints and vice versa also check mounts of hfs partitions. This results in trying to install the bootloader on a MacPod to show the (intended) MacPod warning instead of failing with a "could not open ipod" error because no valid device node could be retrieved. Also, be more strict on matching to prevent problems with one name being a subset of another. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24802 a1c6a512-1295-4272-9138-f99709370657
* Recognize and handle MacPods during autodetection.Dominik Riebeling2010-02-20
| | | | | | | | | Previously MacPods were detected but the mountpoint can't get resolved due to the different partition layout, thus having a MacPod would only detect the Ipod itself but not the mountpoint. Rockbox does not support MacPods, so inform the user as soon as possible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24799 a1c6a512-1295-4272-9138-f99709370657
* rbutil: split RbSettings. use Stable/unstable status from server.Dominik Wenger2010-01-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24331 a1c6a512-1295-4272-9138-f99709370657
* Fix Ipod Video 64MB workaround for rockbox-info.txt detection.Dominik Riebeling2009-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24013 a1c6a512-1295-4272-9138-f99709370657
* FS#10100: Wait for the system to remount the player after bootloader ↵Dominik Riebeling2009-11-22
| | | | | | | | | | | | | | installation. OS X requires to unmount the player during bootloader installation on Sansas / Ipods. The system remounts the player automatically after a short while. Not waiting for the system to remount the player will result in a changed mount point, making the small / full install write the main build to the wrong location. This currently waits up to 60 seconds for the player to get remounted until it errors out. This value seems to be sufficient, if it's not please report so we can adjust it. Also, the waiting can't be interrupted right now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23716 a1c6a512-1295-4272-9138-f99709370657
* Fix stupid combination of CnP error and typo.Dominik Riebeling2009-11-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23703 a1c6a512-1295-4272-9138-f99709370657
* OS X uses msdos as filesystem for vfat which is the same OpenBSD does. Fixes ↵Dominik Riebeling2009-11-22
| | | | | | mountpoint resolving. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23701 a1c6a512-1295-4272-9138-f99709370657
* Add special handling for ipodvideo64mb when detecting the player via ↵Dominik Riebeling2009-09-25
| | | | | | rockbox-info.txt. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22831 a1c6a512-1295-4272-9138-f99709370657
* Improve notification about unsupported players.Dominik Riebeling2009-08-15
| | | | | | | - Display the name of a detected unsupported player when running autodetection from the configuration window. - Extend the list of known-unsupported players. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22334 a1c6a512-1295-4272-9138-f99709370657
* Clean up and rename Detect class.Dominik Riebeling2009-08-10
| | | | | | Move check() function out of the Detect class and place it into utils.cpp for now. Rename Detect class to System, as it now only retrieves data about the underlying system and doesn't detect anything anymore. Cleans up with the confusion between Detect and Autodetection. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22238 a1c6a512-1295-4272-9138-f99709370657
* Simplify and cleanup rockbox-info.txt handling.Dominik Riebeling2009-08-10
| | | | | | Simplify RockboxInfo file handling. Remove Detect::installedVersion() and Detect::installedTarget(), as those became wrappers around RockboxInfo without functionality. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22237 a1c6a512-1295-4272-9138-f99709370657
* Clean up some debug output, kill some trailing spaces and break some overly ↵Dominik Riebeling2009-08-08
| | | | | | long lines. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22204 a1c6a512-1295-4272-9138-f99709370657
* rbutil: make RbSettings a static class. (FS#10183 with improvements)Dominik Wenger2009-05-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20890 a1c6a512-1295-4272-9138-f99709370657
* Bootloader installation for ipod and sansa: override the scanning with the ↵Dominik Riebeling2009-04-30
| | | | | | device pointed to by the mountpoint. This allows selecting the correct player if two of the same brand are connected (FS#10096). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20832 a1c6a512-1295-4272-9138-f99709370657
* Refactor USB ID map retrieval from device settings file and minimize ↵Dominik Riebeling2009-04-16
| | | | | | duplicated code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20716 a1c6a512-1295-4272-9138-f99709370657
* rbutil: create a RockboxInfo class so all rockbox-info.txt handling is in ↵Dominik Wenger2009-03-21
| | | | | | one place. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20429 a1c6a512-1295-4272-9138-f99709370657
* Rename getMountpoints() to mountpoints() to be in line with general (and Qt) ↵Dominik Riebeling2008-12-13
| | | | | | naming -- get functions don't get a get prefix. Make the function static. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19426 a1c6a512-1295-4272-9138-f99709370657
* rbutil fixes for OpenBSD (FS#9340 by Brian Waichunas).Dominik Riebeling2008-12-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19417 a1c6a512-1295-4272-9138-f99709370657
* Don't export includes unless needed.Dominik Riebeling2008-10-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18815 a1c6a512-1295-4272-9138-f99709370657
* Separate basic functionality from GUI parts by moving it into a separate ↵Dominik Riebeling2008-10-12
folder. Some files still need to get cleaned up prior moving them too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18788 a1c6a512-1295-4272-9138-f99709370657