Commit Graph

56 Commits

Author SHA1 Message Date
Max Kellermann 148aca23be use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
Max Kellermann cc0def15c4 Copyright year 2022 2022-07-14 17:59:35 +02:00
Max Kellermann fdc0329e64 archive/List: add option to disable archive plugins in mpd.conf
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1384
2022-02-14 17:54:21 +01:00
Max Kellermann b1096a9935 test/{visit_archive,dump_text_file}: add basic config file support (not wired yet) 2022-02-14 16:43:37 +01:00
Rosen Penev 4e0e4c00bf treewide: replace lock_guard with scoped_lock
SonarLint reports the latter to be better:

std::scoped_lock basically provides the same feature as std::lock_guard,
but is more generic: It can lock several mutexes at the same time, with a
deadlock prevention mechanism (see {rule:cpp:S5524}). The equivalent code
to perform simultaneous locking with std::lock_guard is significantly more
complex. Therefore, it is simpler to use std::scoped_lock all the time,
even when locking only one mutex (there will be no performance impact).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 17:13:03 -08:00
Max Kellermann 5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann 2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann 9e73ea77b4 input/Init: add RAII class 2019-02-05 22:07:49 +01:00
Max Kellermann c9ba4f3f9c archive/List: add RAII class 2019-02-05 21:40:07 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 0ff0aca2e2 input/Init: use struct ConfigData 2018-07-17 22:05:27 +02:00
Max Kellermann d6529d8c60 test/*: catch and print all exceptions 2018-07-17 21:58:39 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann 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
Max Kellermann d1456ae039 test/*: use class EventThread instead of ScopeIOThread 2017-02-10 22:25:01 +01:00
Max Kellermann 3854211694 input/Plugin: pass EventLoop& to init()
Eliminate dependency on io_thread_get().
2017-01-26 09:26:25 +01:00
Max Kellermann 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann d2046de193 test/run_input, ...: RAII-style global initialization 2017-01-03 12:24:05 +01:00
Max Kellermann 2e182e84c3 thread/Mutex: remove ScopeLock, use std::lock_guard directly 2017-01-03 07:11:57 +01:00
Max Kellermann 8c744efd56 input/InputStream: migrate from class Error to C++ exceptions 2016-09-16 17:43:36 +02:00
Max Kellermann fc7d3f64c0 input/Plugin: migrate open() from class Error to C++ exceptions 2016-09-09 18:15:01 +02:00
Max Kellermann 6ed77f2a27 input/Plugin: migrate init() from class Error to C++ exceptions 2016-09-09 15:16:47 +02:00
Max Kellermann 69ed35ed71 test/{run_input,dump_text_file}: use class ScopeLock 2016-05-02 23:35:43 +02:00
Max Kellermann 1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann 0705f42cf8 playlist/Plugin: pass InputStreamPtr&& to open_stream()
Obsolete class CloseSongEnumerator, which was a kludge.
2016-02-21 12:53:47 +01:00
Max Kellermann cadc67ea40 input: wrap InputStream in std::unique_ptr 2016-02-21 08:03:32 +01:00
Max Kellermann 7cc33d0f27 test/stdbin.h: remove obsolete header 2015-08-15 16:37:58 +02:00
Max Kellermann 712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann 5cbc319e96 configure.ac: require GLib 2.32 (if enabled)
Since version 2.32, g_thread_init() is deprecated and a no-op.  Let's
upgrade that (optional) dependency so we can remove all those
g_thread_init() calls.
2014-12-05 00:21:48 +01:00
Max Kellermann 1aac0b10c9 test/run_input, ...: add struct ScopeIOThread
Auto-stop the IO thread in all error handlers.
2014-10-07 20:02:13 +02:00
Max Kellermann 69ae879c58 input/TextInputStream: return char*
Revert to the old API before commit e9e55b08, removing unnecessary
bloat.
2014-08-07 00:06:02 +02:00
Max Kellermann 82337dec44 InputStream: add virtual destructor
Replaces the method Close().
2014-05-11 17:12:50 +02:00
Max Kellermann 55e128cced test: various fixups for building without GLib 2014-02-18 09:18:42 +01:00
Max Kellermann f8bfea8bae Input*: move to input/ 2014-01-24 16:33:33 +01:00
Max Kellermann 197b503f3e Config*: move to config/ 2014-01-24 00:20:01 +01:00
Max Kellermann 4aa6d39fd8 archive/*: move to archive/plugins/ 2014-01-24 00:09:37 +01:00
Max Kellermann 4f83c60296 copyright year 2014 2014-01-13 22:31:55 +01:00
Max Kellermann aeb2baa495 InputStream: add static method OpenReady()
Merge some duplicate code.
2013-12-29 18:08:49 +01:00
Max Kellermann 1ad52f131c test/*: use fprintf(stderr,...) and Log() instead of g_printerr()
Avoid GLib.
2013-12-24 14:44:08 +01:00
Max Kellermann 8064bbbc3f test/*: remove GLib logging setup
Obsolete, our logging library doesn't ues GLib anymore.
2013-12-24 14:13:03 +01:00
Max Kellermann 93deb84499 input_stream: rename struct to InputStream 2013-10-23 23:12:02 +02:00
Max Kellermann 7c1cf61728 thread/{Cond,Mutex}: use "class" instead of "typedef"
Allows forward-declaration.
2013-10-17 10:06:31 +02:00
Max Kellermann 060814daa8 Log: new logging library API
Prepare to migrate away from GLib.  Currently, we're still using GLib
as a backend.
2013-10-02 08:57:55 +02:00
Max Kellermann 26d92c80ed conf.h: remove obsolete header
Use only ConfigData.hxx in plugin sources to reduce header
dependencies.
2013-09-05 08:47:10 +02:00
Max Kellermann 7d0269d2ce InputLegacy: move functions to the input_stream class 2013-09-05 00:23:14 +02:00
Max Kellermann 29030b54c9 util/Error: new error passing library
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00
Max Kellermann 4db119c01b IOThread: use FatalError() on g_thread_create() error
New GLib versions don't fail.
2013-09-03 11:28:47 +02:00
Max Kellermann 85b77b81ca *: use gcc.h macros instead of GLib 2013-08-04 23:48:01 +02:00
Denis Krjuchkov e9e55b0812 text_input_stream: convert to class 2013-05-12 20:02:27 +06:00