Commit Graph

59 Commits

Author SHA1 Message Date
Max Kellermann 931b571e3d neighbor/udisks: add this-> to work around GCC 6 bug
Since `this` was captured, it does not need to be specified, but GCC 6
can't do it.  Since we want to support the standard compiler from
Debian Stretch (stable), we need to work around this problem:

 src/neighbor/plugins/UdisksNeighborPlugin.cxx:239:12: error: cannot call member function 'void UdisksNeighborExplorer::Insert(UDisks2::Object&&)' without object
       Insert(std::move(o));
       ~~~~~~^~~~~~~~~~~~~~

This fixes #300 which I previously thought was a different bug.
2018-09-02 08:12:51 +02:00
Max Kellermann ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Max Kellermann 9ff2606bb8 config/Data: use std::forward_list to manage params and blocks 2018-07-18 11:03:19 +02:00
Max Kellermann 4f678aa244 neighbor/Glue: use struct ConfigData 2018-07-17 23:11:33 +02:00
Max Kellermann 5b192beaa5 config/Global: remove ConfigBlock::SetUsed() call, let caller do that
This fixes an old bug which caused the "unused" warnings to be
unreliable; only the first block in the list was marked as being
"used", no matter if it was really used, and the rest was never marked
as "used", suppressing all warnings for them.
2018-07-17 21:08:41 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann 7eee79c145 neighbor/udisks: move code to class UDisks2::ParseObjects(ODBus::Message) 2018-06-04 21:50:34 +02:00
Max Kellermann 9626523420 neighbor/udisks: move code to class UDisks2::ParseObjects(ReadMessageIter) 2018-06-04 21:41:51 +02:00
Max Kellermann 03c89c9cec neighbor/udisks: move ParseObject() to UDisks2.cxx 2018-06-04 17:23:55 +02:00
Max Kellermann 640de5518b neighbor/udisks: move struct UdisksObject to UDisks2.hxx 2018-06-04 17:23:55 +02:00
Max Kellermann a159299a4b lib/dbus/AsyncRequest: new helper class 2018-06-04 12:21:17 +02:00
Max Kellermann aea6d354b7 lib/dbus/ObjectManager: use TypeTraits instead of CPP macro 2018-06-03 20:30:08 +02:00
Max Kellermann 8d49c2d028 neighbor/udisks: show only filesystems, hide raw drives 2018-06-03 20:20:37 +02:00
Max Kellermann e560f6bc63 lib/dbus/ReadIter: add ForEachProperty() 2018-06-03 20:18:46 +02:00
Max Kellermann 6c81fa1ec5 neighbor/udisks: move code to ForEachInterface() 2018-06-03 14:47:12 +02:00
Max Kellermann 32064a23c1 neighbor/udisks2: move Open()/Close() calls into the I/O thread
Fixes assertion failure.
2018-06-03 10:08:11 +02:00
Max Kellermann c60b50b1ae neighbor/udisks2: use SafeSingleton for managing the ODBus::Glue instance
Allows other objects to use the same single instance as well.
2018-06-03 09:58:34 +02:00
Max Kellermann f3ffdaf21f lib/dbus/Glue: singleton for global initialization 2018-06-03 09:28:04 +02:00
Max Kellermann 3aade67046 basic udisks2 support
To get udisks2 support started, this commit contains the configure.ac
option and a "neighbor" plugin which shows block devices.  Later, this
will allow mounting removable media with a new storage plugin.
2018-06-02 19:44:46 +02:00
Max Kellermann 201210cfe1 neighbor/Plugin: std::unique_ptr<NeighborExplorer> 2018-01-02 17:04:23 +01:00
Max Kellermann cd6de3b24e neighbor/{Explorer,Listener}: add "noexcept" 2018-01-02 16:58:14 +01:00
Max Kellermann 1fd8d46064 lib/upnp/ClientInit: return UpnpClient_Handle 2018-01-02 12:22:44 +01:00
Max Kellermann 914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +01:00
Max Kellermann 732f6aaa30 neighbor/Explorer: add "noexcept" 2017-08-25 10:09:34 +02:00
Max Kellermann dd422c7b8b neighbor/plugins/*: remove redundant "virtual" 2017-08-25 10:07:32 +02:00
Max Kellermann c8f7a859ea lib/upnp/Discovery: use CURL instead of UpnpDownloadUrlItem()
We can do CURL requests asynchronously, and we don't need a
synchronous WorkQueue thread for that.

This allows parallelizing lookups and allows immediate cancellation.
2017-08-25 09:52:44 +02:00
Max Kellermann 979f1b6c39 Merge tag 'v0.20.9'
release v0.20.9
2017-06-04 12:57:05 +02:00
Max Kellermann a057b4f6d8 *: add lost of "noexcept" specifications 2017-06-04 12:46:48 +02:00
Max Kellermann 59e4f1ee0f *: remove lots of GCC 4.8 fallback code
We can remove those C++11 and C++14 kludges because we require GCC 4.9
now.
2017-05-16 11:29:15 +02:00
Max Kellermann 4faef28cc5 Merge tag 'v0.20.7'
release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann 71f0ed8b74 *: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann 781487c4dd thread/Thread: use BoundMethod 2017-02-10 22:46:09 +01:00
Max Kellermann 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann 2e182e84c3 thread/Mutex: remove ScopeLock, use std::lock_guard directly 2017-01-03 07:11:57 +01:00
Max Kellermann 7ec707927d lib/nfs/Blocking, neighbor/smbclient: pass std::chrono::duration to Cond::timed_wait() 2016-12-29 11:37:18 +01:00
Max Kellermann 5b2b4bf13c config/Param: use CamelCase 2016-10-28 11:38:37 +02:00
Max Kellermann 871063dab7 neighbor/Plugin: migrate from class Error to C++ exceptions 2016-09-05 11:37:58 +02:00
Max Kellermann 135662d6b0 lib/smbclient/Init: throw std::runtime_error on error 2016-09-05 11:32:20 +02:00
Max Kellermann a69c3c1848 neighbor/Glue: support C++ exceptions 2016-09-05 11:31:23 +02:00
Max Kellermann d3c7fac606 thread/Thread: throw std::system_error on error 2016-06-17 19:11:20 +02:00
Max Kellermann 1aee89f5ea *: include cleanup (using iwyu) 2016-03-01 22:08:13 +01:00
Max Kellermann 1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann 7ae9e49f51 playlist/Stream, db/upnp: add missing includes 2016-02-22 17:30:36 +01:00
Max Kellermann 3ee5093b03 lib/upnp: use C++ exceptions instead of class Error 2016-02-07 12:53:21 +01:00
Max Kellermann 3d446d3266 lib/upnp/Discovery: apply naming convention 2015-02-02 21:12:19 +00:00
Max Kellermann 4fa5538e2b config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
2015-01-21 23:56:33 +01:00
Max Kellermann 1c3f5517fa config/Option: convert to strictly-typed enum 2015-01-21 23:30:00 +01:00
Max Kellermann fe85fa3bea ConfigData: move struct config_param to Param.hxx 2015-01-21 21:23:02 +01:00
Max Kellermann 712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann d93172bee8 Compiler.h: add macro CLANG_OR_GCC_VERSION() 2014-11-28 19:09:56 +01:00