Max Kellermann
bca5d79f88
util/AllocatedString: add const_pointer constructor
2021-03-04 18:04:17 +01:00
Max Kellermann
6e1c8edf09
util/AllocatedString: add string_view constructor
...
Replaces the static Duplicate() method.
2021-03-04 18:04:11 +01:00
Max Kellermann
32b7b2e2fa
util/AllocatedString: add default constructor
2021-03-04 18:04:06 +01:00
Max Kellermann
cfb7f8ab84
util/AllocatedString: rename to BasicAllocatedString
...
To make things simpler, AllocatedString is now a non-template class.
2021-03-04 18:03:56 +01:00
Max Kellermann
d4bbb8c851
Merge branch 'struc' of git://github.com/neheb/MPD
2021-03-04 17:50:53 +01:00
Érico Rolim
8d80280ab9
time/ISO8601: don't use glibc extension in strptime.
...
Per the manual for strptime, %F is equivalent %Y-%m-%d, so use that
directly.
2021-03-04 17:49:51 +01:00
Érico Rolim
c95e3dc065
storage/plugins/CurlStorage: don't use glibc extension in
...
ParseTimePoint.
%Z is a glibc extension to strptime, and is a no-op there, due to the
mapping between timezone names and their definition (especially when the
name comes from a different machine) being ambiguous / impossible. Time
in HTTP headers is guaranteed to be UTC.
Passing an unknown format to strptime() implementations that don't
support it will generally cause them to return NULL, which will lead to
ParseTimePoint throwing an exception and ParseTimeStamp using an
unnecessary fallback.
Since the timezone name goes at the end of the string, we don't need to
use %Z to skip it (could be an issue in a different time stamp format),
so simply removing %Z works best.
2021-03-04 17:48:23 +01:00
Max Kellermann
428f769c38
output/pipewire: new output plugin
...
Very rough draft. Barely works.
2021-03-03 18:44:39 +01:00
Max Kellermann
133c8834df
output/httpd: update API documentation
2021-03-02 18:24:57 +01:00
Max Kellermann
99217593bf
test/util/TestIntrusiveList: add AutoUnlink test
2021-03-02 18:15:37 +01:00
Max Kellermann
1c6e4a2b18
test/util/TestIntrusiveList: new unit test
2021-03-02 18:12:15 +01:00
Max Kellermann
a6eb264770
util/IntrusiveList: add type alias "Hook"
...
By casting to SafeLinkIntrusiveListHook if appropriate, this fixes a
bug in the erase() method, where erase() calls
IntrusiveListHook::unlink() instead of
SafeLinkIntrusiveListHook::unlink().
2021-03-02 17:51:50 +01:00
Max Kellermann
f5f296b13a
event/TimerWheel: add a "ready" list as a special case
...
This reduces delays of zero-duration timers from up to 1 second to
zero. libavahi-client schedules zero-duration timers often.
2021-03-02 17:14:33 +01:00
Max Kellermann
0091c4e12b
util/Exception: add FindNested()
2021-03-02 17:13:29 +01:00
Max Kellermann
80172e17ac
util/Exception: remove redundant std::exception catch clause
...
The "std::nested_exception" catch block already covers this perfectly.
2021-03-02 17:13:21 +01:00
Max Kellermann
2d96b05403
test/util/TestException: add CheckFindRetrowNested() unit test
2021-03-02 17:12:43 +01:00
Max Kellermann
ec0c1f0d02
util/Exception: fix comment typo
2021-03-02 17:12:20 +01:00
Max Kellermann
00a520a4c3
doc/user.rst: update Windows&Android build dependencies
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1112
2021-02-26 00:59:10 +01:00
Max Kellermann
946b3c1f80
util/IntrusiveList: add method erase_and_dispose()
2021-02-25 14:12:47 +01:00
Max Kellermann
a0dc398f36
util/IntrusiveList: erase() returns an iterator
2021-02-25 14:12:39 +01:00
Max Kellermann
b54d2d984a
util/IntrusiveList: use ToHook() in erase()
2021-02-25 14:12:10 +01:00
Max Kellermann
4ab73f9de9
util/IntrusiveList: add missing ToNode() cast in iterator_to()
2021-02-25 14:10:55 +01:00
Max Kellermann
5ebe23e4bb
db/upnp/Discovery: use class IntrusiveList
2021-02-24 20:39:42 +01:00
Max Kellermann
aa227cded1
input/qobuz: use class IntrusiveList
2021-02-24 20:31:47 +01:00
Max Kellermann
e406bdbb80
input/tidal: use class IntrusiveList
2021-02-24 20:31:13 +01:00
Max Kellermann
1048f23680
util/IntrusiveList: add hook class SafeLinkIntrusiveListHook
...
Similar to boost::intrusive::safe_link.
2021-02-24 20:29:16 +01:00
Max Kellermann
8fe8f09027
util/IntrusiveList: add noexcept
2021-02-24 20:17:28 +01:00
Max Kellermann
78670c0941
util/IntrusiveList: add constexpr
2021-02-24 20:16:54 +01:00
Max Kellermann
34f735890e
output/snapcast: remove obsolete TODO comment
2021-02-24 17:05:14 +01:00
Max Kellermann
f08810b202
output/snapcast: add missing #ifdef HAVE_ZEROCONF
2021-02-24 17:04:15 +01:00
Max Kellermann
7a68775e6c
output/snapcast: Zeroconf support
2021-02-24 17:03:30 +01:00
Max Kellermann
e4fccc85c8
Main: move Zeroconf to the I/O thread
...
This will allow using Zeroconf in output plugins (preparing for
Snapcast with Zeroconf).
2021-02-24 16:29:33 +01:00
Max Kellermann
2efa142ec9
output/init: use the real-time I/O thread only for the ALSA plugin
2021-02-24 16:09:11 +01:00
Max Kellermann
29b49dd630
zeroconf/{bonjour,avahi}: pass service_type as parameter
2021-02-24 15:11:11 +01:00
Max Kellermann
9d6bf7e720
test/run_avahi: refactor to RunZeroconf (both avahi and bonjour)
2021-02-24 15:09:10 +01:00
Max Kellermann
5f34508aae
zeroconf/Glue: move code to the ZeroconfHelper constructor
2021-02-24 15:09:10 +01:00
Max Kellermann
2d8ecd561b
zeroconf: return a publisher object
2021-02-24 15:09:10 +01:00
Max Kellermann
2059195ae9
zeroconf: add dependency on event_dep
2021-02-24 15:09:10 +01:00
Max Kellermann
d89856f77b
zeroconf/avahi/Helper: make class SharedAvahiClient final
2021-02-24 15:09:10 +01:00
Max Kellermann
975d5be046
zeroconf/avahi/Init: return a std::unique_ptr<AvahiHelper>
2021-02-24 14:41:37 +01:00
Max Kellermann
b01ef1b9a6
zeroconf/Bonjour: return a std::unique_ptr<BonjourHelper>
2021-02-24 14:25:06 +01:00
Max Kellermann
ceb76b6a82
zeroconf/Bonjour: pass a context pointer to the callback
2021-02-24 14:18:35 +01:00
Max Kellermann
a7e697b588
zeroconf/Bonjour: add const
2021-02-24 14:18:17 +01:00
Max Kellermann
3ecd918442
zeroconf/Bonjour: move the DNSServiceRegister() call to the constructor
2021-02-24 14:17:59 +01:00
Max Kellermann
4fbdb3a2d5
zeroconf/Bonjour: convert the callback function to a method
2021-02-24 14:15:26 +01:00
Max Kellermann
0157643667
zeroconf/Glue: add noexcept
2021-02-24 14:15:26 +01:00
Max Kellermann
fe741bd767
zeroconf/Glue: allow ZeroconfInit() to throw
2021-02-24 14:15:04 +01:00
Max Kellermann
06b9bdba2c
zeroconf/Bonjour: disallow copying
2021-02-24 13:53:36 +01:00
Max Kellermann
bd0aa74bdd
zeroconf/Bonjour: rename class BonjourMonitor to BonjourHelper
2021-02-24 13:53:35 +01:00
Max Kellermann
47461df59c
zeroconf/Bonjour: don't call DNSServiceRefDeallocate() if DNSServiceRegister() fails
...
According to
https://developer.apple.com/documentation/dnssd/1804733-dnsserviceregister
the DNSServiceRef is initialized only if DNSServiceRegister() returns
kDNSServiceErr_NoError. The faulty error handling code could
therefore crash.
2021-02-24 13:49:03 +01:00