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
Max Kellermann
b3611524f4
fs/Path: move definitions to struct PathTraits
2013-10-17 23:23:25 +02:00
Max Kellermann
080ee87e07
fs/Path: move configuration code to Config.cxx
2013-10-17 22:29:03 +02:00
Max Kellermann
196ec25682
Mapper: use std::string
2013-10-17 19:54:58 +02:00
Max Kellermann
8ed9f7effa
Mapper: remove obsolete variable music_dir_fs_length
2013-10-15 22:48:01 +02:00
Max Kellermann
47d655ea7f
fs/Path: add separator constants/functions
2013-10-14 22:26:23 +02:00
Max Kellermann
0b27ac2f5c
fs/Path: add method RelativeFS()
...
Move code from map_fs_to_utf8().
2013-10-14 22:09:02 +02:00
Max Kellermann
6fd481df97
Mapper, ...: use memcmp() instead of strncmp() where appropriate
...
Micro-optimization.
2013-10-14 22:00:21 +02:00
Max Kellermann
9067da2df8
Mapper: map_fs_to_utf8() returns std::string
...
Avoid the conversion to an allocated char*, let the caller decide.
2013-10-14 21:43:41 +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
0e0be0243b
Daemon, Mapper: move-assign the Path objects
2013-10-01 18:50:18 +02:00
Max Kellermann
b76a29a69a
ConfigPath: return a Path object
...
Migrate all callers to use Path directly, instead of doing the
conversion in each caller.
2013-08-07 19:59:09 +02:00
Max Kellermann
ba161ec572
song: convert header to C++
2013-07-28 13:25:12 +02:00
Denis Krjuchkov
896015bf53
DirectoryReader: rename Failed() to HasFailed() for consistency with TextFile
2013-05-05 13:34:12 +06:00
Denis Krjuchkov
e98e2a0b07
Path::FromUTF8() returns nulled instance on error, add error handling where required
2013-01-28 00:13:46 +06:00