aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapper.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-02-07Mapper: move map_song_detach() to db/DatabaseSong.cxxMax Kellermann1-15/+0
Use Storage::MapUTF8() internally, don't use global variables.
2014-02-07Mapper: convert IsInDatabase() check to assertion in map_song_detach()Max Kellermann1-1/+2
2014-02-05LocalStorage: new API abstracting filesystem walkMax Kellermann1-2/+11
Prepare to make this a new plugin API, for example to use a SMB share for the music_directory.
2014-01-31Mapper: assert that Song::parent is not nullptrMax Kellermann1-18/+3
2014-01-30db: add compile-time option to disable databaseMax Kellermann1-1/+34
2014-01-24Database*: move to db/Max Kellermann1-3/+3
2014-01-21LightSong: add attribute "real_uri"Max Kellermann1-1/+1
The UPnP database plugin can now show relative song URIs for remote songs.
2014-01-21DetachedSong: add attribute "real_uri"Max Kellermann1-2/+11
Prepare for UPnP songs that retain there database identity.
2014-01-19LightSong: new class to be used by DatabasePlugin callbacksMax Kellermann1-1/+1
Detach the Song class completely from the public API, only to be used by SimpleDatabase and the update thread.
2014-01-17Mapper: add function map_song_detach()Max Kellermann1-0/+6
Make the DetachedSong(Song) conversion constructor private. Everybody should use map_song_detach() which will take over more responsibilities soon.
2014-01-13copyright year 2014Max Kellermann1-1/+1
2014-01-09DetachedSong: fork of struct SongMax Kellermann1-6/+11
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.
2013-12-05fs/Traits: split PathTraits type into PathTraitsFS and PathTraitsUTF8Denis Krjuchkov1-2/+2
2013-11-28include cleanup using iwyuMax Kellermann1-2/+0
2013-11-22Mapper: _get_music_directory_utf8() may return nullptrMax Kellermann1-1/+3
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-10-28*: use nullptr instead of NULLMax Kellermann1-2/+2
2013-10-19*: use references instead of pointersMax Kellermann1-11/+11
2013-10-17fs/Path: rename to AllocatedPathMax Kellermann1-34/+35
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-17fs/Path: move definitions to struct PathTraitsMax Kellermann1-2/+3
2013-10-17fs/Path: move configuration code to Config.cxxMax Kellermann1-1/+2
2013-10-17Mapper: use std::stringMax Kellermann1-16/+11
2013-10-15Mapper: remove obsolete variable music_dir_fs_lengthMax Kellermann1-2/+0
2013-10-14fs/Path: add separator constants/functionsMax Kellermann1-17/+4
2013-10-14fs/Path: add method RelativeFS()Max Kellermann1-11/+5
Move code from map_fs_to_utf8().
2013-10-14Mapper, ...: use memcmp() instead of strncmp() where appropriateMax Kellermann1-1/+1
Micro-optimization.
2013-10-14Mapper: map_fs_to_utf8() returns std::stringMax Kellermann1-6/+2
Avoid the conversion to an allocated char*, let the caller decide.
2013-10-02Log: new logging library APIMax Kellermann1-12/+14
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-10-01Daemon, Mapper: move-assign the Path objectsMax Kellermann1-2/+2
2013-08-07ConfigPath: return a Path objectMax Kellermann1-32/+20
Migrate all callers to use Path directly, instead of doing the conversion in each caller.
2013-07-28song: convert header to C++Max Kellermann1-5/+5
2013-05-05DirectoryReader: rename Failed() to HasFailed() for consistency with TextFileDenis Krjuchkov1-1/+1
2013-01-28Path::FromUTF8() returns nulled instance on error, add error handling where ↵Denis Krjuchkov1-9/+36
required
2013-01-28Path: convert fs_charset_to_utf8() to static method Path::ToUTF8()Denis Krjuchkov1-1/+5
2013-01-26Mapper: improve usage of Path classDenis Krjuchkov1-31/+28
2013-01-22Path: move to fs subdirectoryDenis Krjuchkov1-1/+1
2013-01-18Path: new class "Path" wraps filesystem path stringsMax Kellermann1-51/+31
2013-01-17path: convert to C++Max Kellermann1-4/+1
2013-01-03Directory: rename struct directory to DirectoryMax Kellermann1-2/+2
2013-01-02Directory: turn functions to methodsMax Kellermann1-2/+2
2013-01-02Directory: make the header C++ onlyMax Kellermann1-1/+1
2013-01-02mapper: convert to C++Max Kellermann1-2/+5
2012-08-15Song: add function song_dup_detached()Max Kellermann1-1/+20
Initial support for "detached" songs that come from the database, but are private copies.
2012-08-15mapper: fix potential crash in file permission checkMax Kellermann1-3/+3
2012-08-14mapper: fix non-UTF8 music directory nameMax Kellermann1-32/+57
Duplicate the music_dir variable: one encoded in UTF-8, and another one using the configured filesystem character set. This fixes an ancient MPD bug.
2012-02-13mapper: add mapper_get_music_directory()Max Kellermann1-3/+3
Shortcut for map_directory_fs(db_get_root()).
2011-11-28mapper: check "r" permission on music directoryMax Kellermann1-0/+7
Yet another common support case.
2011-11-28mapper: check "x" permission on music directoryMax Kellermann1-0/+8
This is a common support case, and hopefully, the new error message will allow the user to understand the error without requiring support.
2011-11-28mapper: fix the bogus "not a directory" error messageMax Kellermann1-1/+13
Use stat() instead of g_file_test() to detect other types of errors, such as "permission denied".
2011-11-28mapper: move code to check_directory()Max Kellermann1-8/+11
2011-01-29copyright year 2011Max Kellermann1-1/+1