Commit Graph

8806 Commits

Author SHA1 Message Date
Max Kellermann
ad7f2b2aec test/ShutdownHandler: make the constructor "explicit" 2014-02-05 00:00:00 +01:00
Max Kellermann
ff665b37cb db/DatabaseListener: add method OnDatabaseSongRemoved()
Decouples db/update/Remove.cpp from global variables.
2014-02-04 19:53:37 +01:00
Max Kellermann
ce73843014 db/proxy: include cleanup 2014-02-04 19:53:12 +01:00
Max Kellermann
bae6f653d1 Instance: merge DatabaseModified() into OnDatabaseModified() 2014-02-04 19:17:22 +01:00
Max Kellermann
eec6d09959 db/update/Service: use DatabaseListener instead of Instance
Don't use the global variable "instance".
2014-02-04 18:54:54 +01:00
Max Kellermann
c5fa8ed321 db/update/Service: use EventLoop::IsInside()
Don't use the global variable "main_thread".
2014-02-04 18:54:45 +01:00
Max Kellermann
abc16b919d {Message,Neighbor}Commands: use Client::partition instead of Main.hxx 2014-02-04 11:35:23 +01:00
Max Kellermann
2de7cd32ea ClientMessage: undefine GetMessage on WIN32 2014-02-04 11:35:14 +01:00
Max Kellermann
098aa18538 GlobalEvents: remove obsolete event DELETE 2014-02-04 11:25:41 +01:00
Max Kellermann
cf6281a5a7 Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
2014-02-04 11:22:33 +01:00
Max Kellermann
f00710a57e Main: create UpdateService instance in glue_db_init_and_load() 2014-02-04 11:22:32 +01:00
Max Kellermann
c953904343 db/update/Service: initialize "progress" and "update_task_id"
Database update was randomly broken due to these uninitialized
variables.
2014-02-04 11:22:13 +01:00
Max Kellermann
ddd36338da StateFile: pass Database to SongLoader
Fixes loading database songs from state file (regression by commit
29072797c).
2014-02-04 10:30:51 +01:00
Max Kellermann
d76b6f878e db/update/Service: add SimpleDatabase reference
Don't use the global variables from the DatabaseSimple library.
2014-02-04 09:05:32 +01:00
Max Kellermann
f25ef8d682 db/update/Walk: add Directory reference parameter
Remove dependency on the DatabaseSimple library.
2014-02-04 09:05:32 +01:00
Max Kellermann
33a2c01ea2 db/Simple: remove unused function db_get_directory() 2014-02-04 09:03:17 +01:00
Max Kellermann
9c637df77e SongSticker: add Database reference parameter 2014-02-04 01:15:08 +01:00
Max Kellermann
29072797ca db/DatabasePlaylist: pass Database reference around
Reduce global variable usage, move to frontend code.
2014-02-04 00:57:43 +01:00
Max Kellermann
db69ceade6 db/LightSong: make "real_uri" a pointer
Reduce overhead.  LightSong can always point to the "real" allocated
string.
2014-02-04 00:38:52 +01:00
Max Kellermann
b9c248e7e7 PlaylistFile: use class SongLoader 2014-02-03 23:50:19 +01:00
Max Kellermann
d533b59ee3 PlaylistFile: switch spl_append_uri() arguments
Playlist file name first, to be consistent with the other functions in
this library.
2014-02-03 23:33:25 +01:00
Max Kellermann
5ad2980d69 QueueSave: use class SongLoader 2014-02-03 23:32:31 +01:00
Max Kellermann
ca36ac2ba1 SongLoader: new class that merges duplicate code
There was quite a lot of duplicate code for loading DetachedSong
objects, with different semantics for "securely" loading local files.
2014-02-03 23:32:10 +01:00
Max Kellermann
ba675d6a55 FileCommands: use PathTraitsUTF8::IsAbsolute() 2014-02-03 23:31:28 +01:00
Max Kellermann
e4c5a4f61b PlaylistSave: remove redundant backslash conversion
This is already being done by FixSeparators(), called from
PathToUTF8().
2014-02-03 23:15:57 +01:00
Max Kellermann
a8e52ad89f ClientFile: move client_allow_file() into the Client class 2014-02-02 13:59:07 +01:00
Max Kellermann
8cf4fb53aa Playlist: pass Database to DatabaseModified()
Don't use global variable.
2014-02-01 00:45:58 +01:00
Max Kellermann
1769ae54e4 Partition: disable DatabaseModified() if not ENABLE_DATABASE 2014-02-01 00:44:41 +01:00
Max Kellermann
e545679265 Main: don't measure DatabaseGlobalDeinit() time
Useless information.
2014-02-01 00:39:42 +01:00
Max Kellermann
981080500b Stats: pass Database reference around
Call GetDatabase() only once.
2014-02-01 00:38:57 +01:00
Max Kellermann
636d28b784 Stats: remove obsolete "simple" plugin special case
The proxy plugin has now implemented the "idle" event listener.
2014-02-01 00:37:01 +01:00
Max Kellermann
188783ac1a Stats: return false if update has failed 2014-02-01 00:36:36 +01:00
Max Kellermann
ff650d50a2 Mapper: assert that Song::parent is not nullptr 2014-01-31 23:14:13 +01:00
Max Kellermann
78689645dc db/update/Archive: delete archive from database on error 2014-01-31 22:24:28 +01:00
Max Kellermann
26970579b8 db/update/Editor: add locking method variants 2014-01-31 22:17:49 +01:00
Max Kellermann
04b4f53488 db/update: convert runtime check to assertion 2014-01-31 21:59:35 +01:00
Max Kellermann
c310941f69 fs/AllocatedPath: add conversion constructor from Path 2014-01-30 23:36:57 +01:00
Max Kellermann
c02f146791 fs/DirectoryReader: GetEntry() returns Path, not AllocatedPath
Reduce overhead, don't duplicate the string.
2014-01-30 22:20:57 +01:00
Max Kellermann
a631200cca update/Walk: declare std::string at assignment
Reduce overhead.
2014-01-30 22:19:56 +01:00
Max Kellermann
6207a3f999 PlaylistFile: narrow LoadPlaylistFileInfo() API to accept Path 2014-01-30 22:17:35 +01:00
Max Kellermann
0bd01824f6 fs/AllocatedPath: add Build() overlays with Path arguments 2014-01-30 22:15:13 +01:00
Max Kellermann
4465e2c46b db: add compile-time option to disable database 2014-01-30 20:39:40 +01:00
Max Kellermann
34b309b99a OtherCommands: merge duplicate code from handle_update(), handle_rescan() 2014-01-30 20:39:40 +01:00
Max Kellermann
c6725884bc db/update: convert to OO API
Move global variables into the new classes.  That may allow multiple
update threads for multiple databases one day.
2014-01-30 18:47:05 +01:00
Max Kellermann
a31738f6f1 Main, OutputThread: increase kernel timer slack (Linux)
Allows the kernel to combine timer wakeups with other processes,
reducing power usage.
2014-01-30 18:43:40 +01:00
Max Kellermann
39a2867ea8 NEWS: mention thread names 2014-01-30 18:43:16 +01:00
Max Kellermann
468c3df82d NEWS: add "threads" section 2014-01-30 18:43:03 +01:00
Max Kellermann
d5b017407d ExcludeList: move to db/update/ 2014-01-30 10:11:12 +01:00
Max Kellermann
4b044bd8e1 InotifyUpdate: pass EventLoop to mpd_inotify_init() 2014-01-29 18:36:32 +01:00
Max Kellermann
aeaf64b467 Listen: pass EventLoop to listen_global_init()
Don't use global variables.
2014-01-29 18:32:28 +01:00