Commit Graph

36 Commits

Author SHA1 Message Date
fb7daa0d05 input/smbclient: use std::throw_with_nested() to construct PluginUnavailable
Preserve the original exception.
2019-03-29 17:32:23 +01:00
ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
3e78c9ab48 input/Plugin: add attribute prefixes 2018-10-24 20:25:32 +02:00
cf471e830f Merge branch 'v0.20.x' 2018-08-02 11:07:40 +02:00
906972973e case-insensitive URI scheme comparison
Required according to RFC 3986:

> An implementation should accept uppercase letters as equivalent to
> lowercase in scheme names

Closes 
2018-08-02 11:01:45 +02:00
d0fbf6db59 input/Stream: remove attribute "cond", replace with handler interface
This adds a bit of overhead, but also adds flexibility to the API,
because arbitrary triggers may be invoked from that virtual method
implementation, not just Cond::signal().

The motivation for this is to make the handlers more dynamic, for the
upcoming buffering class utilizing ProxyInputStream.
2018-06-22 19:37:18 +02:00
7bce6329e3 archive/File, input/Plugin: return InputStreamPtr 2017-12-26 20:05:22 +01:00
e2c81aa9ea Merge branch 'v0.20.x' 2017-11-14 12:31:13 +01:00
31ab78ae8e input/{cdio,ffmpeg,file,smbclient}: unlock the mutex during blocking I/O
InputStream::Read() and InputStream::Seek() are called with the mutex
locked.  That means the implementation must not block, or unlock the
mutex before calling into blocking code.

Previously, a slow CD drive could stall the whole MPD process,
including the main thread, due to this problem.

Closes 
2017-11-13 17:13:10 +01:00
f82e1453e4 input/smbclient: use std::lock_guard 2017-11-13 17:13:10 +01:00
4faef28cc5 Merge tag 'v0.20.7'
release v0.20.7
2017-05-15 23:01:49 +02:00
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
3854211694 input/Plugin: pass EventLoop& to init()
Eliminate dependency on io_thread_get().
2017-01-26 09:26:25 +01:00
5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
2e182e84c3 thread/Mutex: remove ScopeLock, use std::lock_guard directly 2017-01-03 07:11:57 +01:00
8c744efd56 input/InputStream: migrate from class Error to C++ exceptions 2016-09-16 17:43:36 +02:00
fc7d3f64c0 input/Plugin: migrate open() from class Error to C++ exceptions 2016-09-09 18:15:01 +02:00
6ed77f2a27 input/Plugin: migrate init() from class Error to C++ exceptions 2016-09-09 15:16:47 +02:00
a73688a2be input/Plugin: remove InitResult::UNAVAILABLE, throw PluginUnavailable instead 2016-09-09 15:11:52 +02:00
135662d6b0 lib/smbclient/Init: throw std::runtime_error on error 2016-09-05 11:32:20 +02:00
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
733989a284 util/StringUtil: move comparison functions to StringCompare.cxx 2015-11-06 09:20:18 +01:00
90e7ace980 Merge tag 'v0.19.10' 2015-06-21 16:06:02 +02:00
jai
aed0af1e00 input/smbclient: fix DFF playback 2015-05-29 22:37:49 +02:00
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
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
07b93dcf80 InputStream: make Seek() always absolute
Remove the "whence" parameter that is not actually necessary, and only
complicates the InputStream implementations.
2014-05-22 13:52:00 +02:00
fd1b04932a InputStream: remove attribute "plugin" 2014-05-11 18:25:55 +02:00
d4b625b48e InputStream: make various methods abstract
Replace InputPlugin attributes.
2014-05-11 17:14:49 +02:00
82337dec44 InputStream: add virtual destructor
Replaces the method Close().
2014-05-11 17:12:50 +02:00
f1d0700252 input/plugins: make InputStream the base class
Prepare for adding virtual methods.
2014-05-11 17:12:50 +02:00
2bf2f34b12 InputPlugin: allow init() to soft-fail
Add enum InputResult which is a tri-state.  Input plugins may now fail
and just become unavailable.
2014-03-02 00:17:32 +01:00
c8f0c7e9ed */smbclient: protect all libsmbclient calls with a mutex
libsmbclient is not thread-safe nor reentrant.  We must protect all
function calls with a global mutex, unfortunately.
2014-02-06 22:19:59 +01:00
86ca5b3f16 input/smbclient: move code to lib/smbclient/Init.cxx 2014-01-25 23:29:42 +01:00
f8bfea8bae Input*: move to input/ 2014-01-24 16:33:33 +01:00