Commit Graph

73 Commits

Author SHA1 Message Date
Max Kellermann
b5d224ce22 fs/{StandardDirectory,CheckFile}: move to fs/glue/
Distangle library dependencies.
2023-03-06 19:43:09 +01:00
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
Rosen Penev
250011f016 return by braced init list
shorter

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-22 23:28:08 -08:00
Max Kellermann
5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann
7a58b8c3e8 fs/AllocatedPath: pass std::string_view to FromUTF8() 2020-04-03 16:21:41 +02:00
Rosen Penev
ab9f5d2067
replace assert.h with cassert
The former was deprecated with C++14.

According to the C++11 and C++17 standards, both files are identical.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07: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
71a5c8b819 Main: allocate Instance on the stack 2019-05-29 21:22:25 +02:00
Max Kellermann
feb5ff9bd2 Mapper: remove empty function mapper_finish() 2019-02-05 23:01:09 +01:00
Max Kellermann
f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01: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
bbc5212436 fs/AllocatedPath: make the nullptr_t constructor public 2018-01-17 12:17:41 +01:00
Max Kellermann
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
Max Kellermann
5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann
1aee89f5ea *: include cleanup (using iwyu) 2016-03-01 22:08:13 +01:00
Max Kellermann
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann
c880099deb util/StringCompare: add StringIsEmpty() 2015-11-06 09:37:07 +01:00
Max Kellermann
7f3518333d Mapper: don't use C-style prototypes 2015-03-24 22:03:17 +01:00
Max Kellermann
77e163e5b8 Mapper: use Path::IsAbsolute() 2015-02-28 23:50:18 +01:00
Max Kellermann
0e00b9009d fs/Path: pass Path to Relative() 2015-02-28 23:45:16 +01:00
Max Kellermann
cdd0ccc67a fs/Path: rename RelativeFS() to Relative() 2015-02-28 23:19:34 +01:00
Max Kellermann
44b9197354 Mapper: use class Path 2015-02-28 23:00:27 +01:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann
6798af52b6 Mapper: obtain music directory from Storage
Eliminate duplicate variable.
2014-02-07 23:34:29 +01:00
Max Kellermann
4d5ebafa6d Main: check the music directory
Move call from Mapper.cxx.
2014-02-07 23:29:20 +01:00
Max Kellermann
ec8873b178 Mapper: move check_directory() to the filesystem library 2014-02-07 23:25:47 +01:00
Max Kellermann
c45f205593 Main: chop separators from music directory
Move call from Mapper.cxx.
2014-02-07 23:13:24 +01:00
Max Kellermann
027b2063ba Mapper: remove unused functions 2014-02-07 23:03:25 +01:00
Max Kellermann
ffd16b55a6 StoragePlugin: add method MapToRelativeUTF8()
Replaces map_to_relative_path() from Mapper.cxx.
2014-02-07 19:09:28 +01:00
Max Kellermann
37ec29b225 Mapper: remove unused function map_song_fs() 2014-02-07 18:51:19 +01:00
Max Kellermann
c13810ebaa Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
2014-02-07 00:42:14 +01:00
Max Kellermann
19a982cf69 Mapper: convert IsInDatabase() check to assertion in map_song_detach() 2014-02-07 00:42:14 +01:00
Max Kellermann
9ae7f186bc LocalStorage: new API abstracting filesystem walk
Prepare to make this a new plugin API, for example to use a SMB share
for the music_directory.
2014-02-05 10:04:03 +01:00
Max Kellermann
ff650d50a2 Mapper: assert that Song::parent is not nullptr 2014-01-31 23:14:13 +01:00
Max Kellermann
4465e2c46b db: add compile-time option to disable database 2014-01-30 20:39:40 +01:00
Max Kellermann
9d34fc394c Database*: move to db/ 2014-01-24 16:38:44 +01:00
Max Kellermann
7471f65d95 LightSong: add attribute "real_uri"
The UPnP database plugin can now show relative song URIs for remote
songs.
2014-01-21 21:08:11 +01:00
Max Kellermann
5d4b450c52 DetachedSong: add attribute "real_uri"
Prepare for UPnP songs that retain there database identity.
2014-01-21 21:06:56 +01:00
Max Kellermann
f5ae1ce00b LightSong: new class to be used by DatabasePlugin callbacks
Detach the Song class completely from the public API, only to be used
by SimpleDatabase and the update thread.
2014-01-19 17:04:51 +01:00
Max Kellermann
61b01f82ef Mapper: add function map_song_detach()
Make the DetachedSong(Song) conversion constructor private.  Everybody
should use map_song_detach() which will take over more
responsibilities soon.
2014-01-17 23:51:14 +01:00
Max Kellermann
4f83c60296 copyright year 2014 2014-01-13 22:31:55 +01:00
Max Kellermann
322b061632 DetachedSong: fork of struct Song
From now on, struct Song will be used by the database only, and
DetachedSong will be used by everybody else.  DetachedSong is easier
to use, but Song has lower overhead.
2014-01-09 09:05:58 +01:00
Denis Krjuchkov
0a6c4c31b2 fs/Traits: split PathTraits type into PathTraitsFS and PathTraitsUTF8 2013-12-05 03:53:43 +06:00
Max Kellermann
f90abe9530 include cleanup using iwyu 2013-11-28 11:50:54 +01:00
Max Kellermann
67b8124a1d Mapper: _get_music_directory_utf8() may return nullptr
If no music_directory is configured, return nullptr instead of an
empty string.  This fixes a crash when db_file is configured without
music_directory.
2013-11-22 00:02:17 +01:00
Max Kellermann
20597b3632 *: use nullptr instead of NULL 2013-10-28 23:58:17 +01:00
Max Kellermann
ff626ac763 *: use references instead of pointers 2013-10-19 18:48:38 +02:00
Max Kellermann
abfbd55305 fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being
responsible for allocation/deallocation.  The FileSystem.hxx library
accepts Path arguments instead of AllocatedPath, to avoid forcing
callers to allocate another string object.
2013-10-17 23:43:46 +02:00