Commit Graph

16 Commits

Author SHA1 Message Date
kentsangkm cbe384d142 Add override 2021-06-30 22:05:18 +01:00
Lukas Prediger 83b6bf28f3 No exceptions for error handling! ConnectedDevice::Init now returns bool, indicating success or failure.
As decreed by @hatstand.
2021-06-21 12:51:44 +01:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
Jim Broadus 6c159481ed Handle MTP connection failures more gracefully. (#6256)
Currently, the failure to connect to an MTP device results in the UI displaying
an open device that appears empty. This change introduces a method
ConnectedDevice::ConnectAsync() that is expected to handle any connecting tasks
that could block asynchronously. Upon completion, this emits a ConnectFinished
signal that indicates success or failure. The row in the UI is only updated
after the successful response is received. Upon failure, DeviceManager will
clean up and the row in UI is left in the pre-connect state.

Currently, only the MtpDevice utilizes this mechanism. All other devices use a
default implementation that immediately reports success.
2019-01-15 21:10:05 +00:00
Jim Broadus 122d28eab9 Fix device loader error messages. (#6215)
GPodLoader and MtpLoader Error signals were connected to Error signals in their repective device classes, but the actual signal definition in ConnectedDevice was removed in a refactor several years ago. This change adds LoaderError slots to these device classes and reports the error in the manner of the refactored code.
2018-11-28 10:23:31 +00:00
John Maguire bebd781fdf Reformat all non-3rd-party C/C++/Objective-C++.
Command line:
find src ext -regex '.*\.\(h\|cpp\|mm\)' -exec clang-format -i
 -style='{BasedOnStyle: Google, DerivePointerBinding: false}' {} \;
2014-02-07 16:34:20 +01:00
John Maguire d309d4ab27 Use c++11 instead of boost where possible. 2014-02-06 16:51:39 +01:00
David Sansome 48f15c9fc7 Refactoring: instead of passing individual pointers to useful core classes (like TaskManager or LibraryBackend) to each class that uses them, pass one singleton-like Application instance everywhere. 2012-02-26 14:40:51 +00:00
David Sansome b873209d39 Remove the <xiphcomment.h> include from song.h so that windows headers don't infect everything else. Also move other bits of song.h into song.cpp, and reduce the number of includes in song.h. 2011-11-28 13:56:55 +00:00
David Sansome ed1a25693c Add missing licenses to debian/copyright, and add copyright information to each source file 2010-11-20 13:27:10 +00:00
John Maguire 885a711d3a Detect MTP device removal & free space/capacity on Mac. 2010-09-04 19:32:36 +00:00
David Sansome e4f5e97b17 Allow GetSupportedFiletypes to return an error, and make it possible to request a list of supported filetypes at the same time as opening the device for copying - making things much faster on MTP devices. 2010-08-30 12:22:15 +00:00
David Sansome 5001a5b3d1 Get a list of file formats supported by an MTP device 2010-08-29 00:08:39 +00:00
David Sansome 04e7e26088 Allow devices to report progress information about individual songs back to the Organise object. Implement this for MTP 2010-08-28 21:55:30 +00:00
David Sansome 9fda03aa60 Support copying files to MTP devices 2010-08-14 16:39:45 +00:00
David Sansome 3f5e188045 Initial support for MTP devices 2010-08-14 15:57:05 +00:00