Commit Graph

153 Commits

Author SHA1 Message Date
Max Kellermann a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann 214ddee2f5 util/Time*: move to time/ 2019-05-08 15:47:58 +02:00
Max Kellermann 973c87b351 event/Call, ...: use wait() with predicate 2019-05-07 20:01:45 +02:00
Max Kellermann 92022658f9 thread/Cond: add wait() overload which takes a unique_lock<>
Just like std::condition_variable, which however has no way to specify
the std::mutex directly.
2019-04-26 11:51:45 +02:00
Max Kellermann b51bae5500 thread/*Cond: rename methods to match std::condition_variable 2019-04-25 19:46:43 +02:00
Max Kellermann 2c0a968735 storage/smbclient: use std::lock_guard 2019-04-25 19:23:37 +02:00
Max Kellermann 84c406d5f5 storage/nfs: use class ScopeUnlock 2019-04-25 19:22:57 +02:00
Max Kellermann 093bf5d859 event/*, ...: make GetEventLoop() const 2019-04-04 20:07:57 +02:00
Max Kellermann 83f7610dd1 storage/udisks2: move empty string check out of the fallback block in MapUTF8()
Even if the LocalStorage is available, return the "udisks://" URI when
the MapUTF8() parameter is an empty string.  This fixes the mount URI
in the state file.
2019-02-22 15:07:40 +01:00
Max Kellermann d5983dd362 storage/udisks2: use the relative path
Closes #487
2019-02-22 14:41:56 +01:00
Max Kellermann 98258acc37 storage/udisks2: pass Path to SetMountPoint() 2019-02-22 14:41:56 +01:00
Max Kellermann bbaeea1ab7 storage/udisks2: use existing mount point if already mounted
Fixes the "org.freedesktop.UDisks2.Error.AlreadyMounted" error.

Closes #485
2019-02-21 13:32:03 +01:00
Max Kellermann 0a3aee9d82 storage/udisks2: move code to SetMountPoint() 2019-02-21 13:31:59 +01:00
Max Kellermann 2434020971 storage/udisks2: adjust lambda indent 2019-02-21 13:31:57 +01:00
Max Kellermann 8b5c33cecd Instance: use std::unique_ptr<> to manage the Database pointer 2019-02-20 20:48:20 +01:00
Max Kellermann 281461f0f0 nfs: work around assertion failure on exception during program init
Closes #477
2019-02-15 18:33:58 +01:00
Jacob Vosmaer 66f5b0fed7 Add boost_dep in subdir meson.build files 2018-12-09 17:20:47 +01:00
Max Kellermann bda77ffc5b db/Interface: remove IsPlugin(), use dynamic_cast instead 2018-11-19 19:38:20 +01:00
Max Kellermann 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
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 94592c1406 build with Meson instead of autotools
So long, autotools!  This is my last MPD related project to migrate
away from it.  It has its strengths, but also very obvious weaknesses
and weirdnesses.  Today, many of its quirks are not needed anymore,
and are cumbersome and slow.  Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
Max Kellermann ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Thomas Guillem 735f62be0c storage/nfs: implement follow 2018-08-20 11:29:27 +02:00
Max Kellermann 0b7d7fe069 Merge branch 'v0.20.x' 2018-08-20 11:27:56 +02:00
Thomas Guillem 9127afbf3f lib/nfs/Connection: use nfs_stat64_async
Since nfs_stat_async is deprecated.
2018-08-20 10:51:24 +02:00
Max Kellermann 616abdda26 Merge branch 'v0.20.x' 2018-08-20 00:19:31 +02:00
Joshua Wise 29f78b18b1 storage/plugins/CurlStorage: URL-encode paths in CurlStorage::MapUTF8
When using a database that was not created with a WebDAV music_directory
(i.e., if using a remote database, on which updates happen locally) and
using the Curl storage plugin, MPD would previously send GET requests that
had unescaped spaces in them.  This change uses Curl's URL-encode API to
solve this.
2018-08-17 23:03:56 +02:00
Max Kellermann cf471e830f Merge branch 'v0.20.x' 2018-08-02 11:07:40 +02:00
Max Kellermann 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 #330
2018-08-02 11:01:45 +02:00
Max Kellermann 32290d5eb8 fs/Path: add method ToUTF8Throw() 2018-07-18 16:51:29 +02:00
Max Kellermann d2594c6380 storage/Configured: use struct ConfigData 2018-07-17 22:57:08 +02:00
Max Kellermann 99d5b61698 fs/Path: add operator/(Path,Path)
Modeled after std::filesystem::operator/() from C++17.
2018-07-17 18:33:32 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann 60d5bf0240 util/StringFormat: new utility library 2018-07-06 19:07:02 +02:00
Max Kellermann 5217a74b7f storage/udisks: return file path in MapUTF8()
The absolute udisks:// URI is not usable with InputStream::Open(), and
thus we need to return the LocalStorage::MapUTF8() return value
instead.
2018-06-05 22:01:28 +02:00
Max Kellermann cccf35d140 storage/udisks: add missing MountWait() call to MapFS() 2018-06-05 21:56:28 +02:00
Max Kellermann 249316c8fc storage/udisks: implement MapFS() 2018-06-05 21:54:50 +02:00
Max Kellermann ba8040d068 storage/udisks: new plugin
Documentation will follow soon.
2018-06-04 22:00:52 +02:00
Max Kellermann b30a510b45 Merge tag 'v0.20.18'
release v0.20.18
2018-02-24 23:16:06 +01:00
Max Kellermann cd48d981b5 storage/nfs: use PathTraitsFS::const_pointer_type 2018-02-24 22:44:42 +01:00
Max Kellermann 774d26b982 storage/nfs: assume UTF-8 when accessing NFS from Windows
Fixes two build failures with libnfs on Windows.
2018-02-24 22:44:42 +01:00
Max Kellermann 97f670658f util/StringFormat: new utility library 2018-01-24 13:28:28 +01:00
Max Kellermann b6d858f4d6 lib/expat/Parser: make the "is_final" argument optional 2018-01-21 14:37:10 +01:00
Max Kellermann dedede3caa lib/expat/Parser: add method CompleteParse() 2018-01-21 14:35:47 +01:00
Max Kellermann 61eb2aa328 storage/Interface: wrap StorageDirectoryReader in std::unique_ptr 2018-01-21 11:04:30 +01:00
Max Kellermann bbc5212436 fs/AllocatedPath: make the nullptr_t constructor public 2018-01-17 12:17:41 +01:00
Max Kellermann dcd483bd99 storage/Composite: use std::unique_ptr<Storage> 2018-01-02 16:18:34 +01:00
Max Kellermann 3c5e4e2788 storage/Plugin: return std::unique_ptr<Storage> 2018-01-02 16:11:17 +01:00
Max Kellermann 28c5e7e6a7 Merge branch 'v0.20.x' 2018-01-02 14:16:47 +01:00
Max Kellermann ff624075a8 storage/State: check if a CompositeStorage exists; fixes nullptr dereference
Fixes another crash bug caused by commit
64d141f71e
2018-01-02 14:13:26 +01:00