Commit Graph

1059 Commits

Author SHA1 Message Date
Max Kellermann 63920be17e lib/nfs/Connection: make server and export_name const 2024-05-06 16:55:57 +02:00
Max Kellermann bcc39be784 lib/nfs/Base: use std::string_view 2024-05-06 15:25:55 +02:00
Max Kellermann b6314b4c4b lib/nfs/Base: use std::array 2024-05-06 15:22:49 +02:00
Max Kellermann 23d895415a lib/nfs/meson.build: require libnfs 4.0
All Linux distributions have at least version 4, and thus I cannot
test with older versions.
2024-05-06 14:54:04 +02:00
Max Kellermann 615f6f50ce lib/yajl: drop "yajl/" prefix from #include paths
According to the yajl API documentation, #include lines should have
the "yajl/" path prefix, but the actual pkg-config file contains:

 includedir=${dollar}{prefix}/include/yajl

.. which already contains this directory name, and thus the "yajl/"
prefix cannot work.  Unfortunately, the yajl project hasn't been
maintained for nearly 10 years, and there's little chance this bug
will ever be fixed.
2024-05-06 13:31:34 +02:00
Max Kellermann 0c1ecc96a8 *: let libfmt quote strings 2024-04-16 11:50:18 +02:00
Max Kellermann 39c9e92f42 lib/fmt: require libfmt 9
Version 9 added the "debug format" which I'd like to use.
2024-04-16 11:50:18 +02:00
Max Kellermann 0d8498f1d1 lib/fmt/SocketAddressFormatter: simpler template syntax 2024-04-16 11:02:36 +02:00
Max Kellermann 7198db758d lib/fmt/PathFormatter: eliminate AllocatedPath specialization with std::convertible_to<Path> 2024-04-16 11:00:21 +02:00
Max Kellermann 4c56e87e36 lib/curl/Global: remove empty line 2024-04-04 09:18:34 +02:00
Max Kellermann 541707f9a8 lib/curl/Easy: add SetRequestBody() overload with std::span 2024-03-11 15:32:24 +01:00
Max Kellermann 00cf036d58 lib/avahi/Client: relax assertion after COLLISION/REGISTERING
Turns out that `AVAHI_CLIENT_S_COLLISION` can occur after
`AVAHI_CLIENT_S_RUNNING`, and `connected==true`.  Relaxing this fixes
a bogus assertion failure.
2024-03-11 15:32:24 +01:00
Max Kellermann be84b189dc util, io, net, ...: use "#pragma once" 2024-03-11 15:32:24 +01:00
Max Kellermann aef2c5dc14 lib/avahi/Service: add field visible
Now individual services can be hidden or shown at any time.
2024-01-18 18:50:06 +01:00
Max Kellermann 8d02986b0e lib/avahi/Publisher: add missing defer_register_services.Cancel() calls 2024-01-18 18:50:01 +01:00
Max Kellermann 461da92064 lib/avahi/Publisher: make the service list dynamic
This allows editing the list of services at any time instead of
passing a constant list at construction time.  To do this, Service
instances are now caller-owned and managed in an IntrusiveList instead
of Publisher-owned in a std::forward_list.
2024-01-18 18:48:27 +01:00
Max Kellermann 5023432802 lib/avahi/Publisher: use DeferEvent for RegisterServices()
Prepares making the service list dyammic; the DeferEvent not only
moves the operation out of the current stack frame, but also allows
combining several AddService() calls.
2024-01-18 18:24:08 +01:00
Max Kellermann 4a14248004 lib/avahi/Publisher: move code to RegisterServices(AvahiEntryGroup) 2024-01-18 18:24:04 +01:00
Max Kellermann 1b241fc97a lib/avahi/Publisher: allow RegisterServices() to throw 2024-01-18 18:24:01 +01:00
Max Kellermann 09d1ab7abe lib/avahi/Publisher: move try/catch in GroupCallback() to the top level 2024-01-18 18:23:57 +01:00
Max Kellermann d28cb93835 lib/avahi/Client: add method IsConnected()
Publish only if the client is really connected.
2024-01-18 18:23:52 +01:00
Max Kellermann 6b43338e06 lib/avahi/Client: add assert() 2024-01-18 18:23:48 +01:00
Max Kellermann 9a7a49350c lib/avahi/Client: free the AvahiClient on AVAHI_CLIENT_FAILURE
Previously the AvahiClient was only freed when AVAHI_ERR_DISCONNECTED
was detected, but all other error conditions would lead to a memory
leak.
2024-01-18 18:23:45 +01:00
Max Kellermann f85629afa6 lib/avahi/Client: is if with initializer 2024-01-18 18:23:42 +01:00
Max Kellermann a39473a912 lib/avahi/Service: add API docs 2024-01-18 18:23:37 +01:00
Max Kellermann 05d0e9b8bb lib/avahi/Publisher: reuse the AvahiEntryGroup
The libavahi-client documentation recommends reusing AvahiEntryGroup
instances instead of freeing them and creating new ones.
2024-01-18 18:23:30 +01:00
Max Kellermann b283fe07af lib/expat/ExpatParser: pass std::string_view to CharacterData() 2024-01-04 20:55:14 +01:00
Max Kellermann feeb21577f lib/upnp/Device: use std::forward_list instead of std::vector 2024-01-04 20:51:20 +01:00
Max Kellermann 1fca16737d lib/upnp/Device: remove unnecessary ctors/dtors 2024-01-04 20:49:27 +01:00
Max Kellermann 4ec85a12e3 lib/upnp/Discovery: use std::map instead of std::list 2024-01-04 20:45:24 +01:00
Max Kellermann 3d2aebccad lib/upnp/Discovery: pass std::string_view to LockRemove() 2024-01-04 20:40:47 +01:00
Max Kellermann 22382f799c lib/upnp/Discovery: add noexcept 2024-01-04 20:39:21 +01:00
Max Kellermann 468eceabff lib/upnp/Discovery: remove unreachable exception handler 2024-01-04 18:04:46 +01:00
Max Kellermann 08e0eb79f5 lib/upnp/Discovery: remove unused default ctor 2024-01-04 18:04:21 +01:00
Max Kellermann 997311ba14 lib/curl/Easy: add method TrySetOption() 2024-01-04 17:51:48 +01:00
Max Kellermann cbd031ca7f lib/upnp/Action: common UpnpSendAction() wrapper for pupnp and npupnp
Merge a lot of duplicate code.
2024-01-04 17:40:59 +01:00
Max Kellermann b2ed29b8c0 lib/upnp/ContentDirectoryService: getFriendlyName() returns std::string reference
This can avoid the overhead of casting a C string back to std::string_view.
2024-01-04 14:28:12 +01:00
Max Kellermann 714dbc9294 lib/upnp/Discovery: forward-declare inner class ContentDirectoryDescriptor 2024-01-04 14:28:12 +01:00
Max Kellermann f40eb963fd lib/upnp/Discovery: forward-declare inner class Downloader 2024-01-04 14:28:12 +01:00
Max Kellermann ee4b49d12f lib/expat/ExpatParser: pass std::string_view to Parse() 2024-01-04 14:28:12 +01:00
Max Kellermann 4c9942534c lib/upnp/Device: pass url as std::string_view to Parse() 2024-01-04 14:28:12 +01:00
Max Kellermann d5f7db59a8 lib/upnp/Util: pass std::string_view to path_getfather() 2024-01-04 14:28:12 +01:00
Max Kellermann 8d1b73ae89 lib/upnp/Discovery: use string_view::starts_with() instead of strncmp() 2024-01-04 14:28:08 +01:00
Max Kellermann d0a4270449 lib/upnp/Compat: remove obsolete kludges
Those bugs have been fixed looong ago.
2023-12-28 21:24:58 +01:00
Max Kellermann b9a7a9981e lib/upnp/ContentDirectoryService: remove unused fields 2023-12-28 21:22:41 +01:00
Max Kellermann d9fb152b95 lib/upnp/ContentDirectoryService: include some headers only with libpupnp 2023-12-28 21:18:41 +01:00
Rosen Penev e7e07c39c5 meson: fix flac_dep under Windows
declare_dependency's found() method evaluates to true always, resulting
in MPD trying to build flac when not found. Check for dependency()'s
find() first.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-27 12:43:08 -08:00
Max Kellermann dfef30a737 subprojects: add curl 2023-12-11 10:53:43 +01:00
Max Kellermann 642de1510b lib/curl/Request: remove redundant CurlEasy wrapper methods 2023-12-09 20:54:21 +01:00
Max Kellermann 08a5768764 fs/io/TextFile: split into class FileLineReader and AutoGunzipFileLineReader
Detangle dependencies.
2023-11-25 22:50:32 +01:00