Commit Graph

365 Commits

Author SHA1 Message Date
Max Kellermann
879bafb837 Instance: move OnIdle() to Instance.cxx 2020-01-20 13:32:43 +01:00
Max Kellermann
6fcea2d484 Instance: move code to OnStateModified() 2020-01-20 13:28:00 +01:00
Max Kellermann
5d597a3646 Instance: manage StateFile with std::unique_ptr 2020-01-20 13:25:19 +01:00
Max Kellermann
5afec8256a Main: move code to Partition::BeginShutdown() 2020-01-20 09:22:28 +01:00
Max Kellermann
cd612c4eef AudioFormat: move to pcm/ 2020-01-18 20:24:59 +01:00
Max Kellermann
2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann
d663f81420 include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
Max Kellermann
e87f0ca771 pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
Max Kellermann
a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann
5d74b5cee1 input/cache: first draft of the file cache 2019-05-31 17:49:52 +02:00
Max Kellermann
4eb101f046 config/Parser: add ParseSize()
Supports suffixes such as "kB" and "MB".
2019-05-29 22:44:05 +02:00
Max Kellermann
7d599c1afc Main: add Config constructor 2019-05-29 22:22:05 +02:00
Max Kellermann
7c565bce1d Main: move two more functions down 2019-05-29 22:20:02 +02:00
Max Kellermann
d17ff18ec0 Main: move main() to the bottom 2019-05-29 22:18:06 +02:00
Max Kellermann
efc6b1b77a Main: fold mpd_main_after_fork() into MainConfigured() 2019-05-29 22:16:32 +02:00
Max Kellermann
fdbec694c6 config/Param: add method With() 2019-05-29 21:50:04 +02:00
Max Kellermann
39046bed85 Instance: wrap ClientList in std::unique_ptr<> 2019-05-29 21:29:55 +02:00
Max Kellermann
71a5c8b819 Main: allocate Instance on the stack 2019-05-29 21:22:25 +02:00
Max Kellermann
620a39afb4 thread/Slack: use std::chrono::duration 2019-05-29 21:11:32 +02:00
Max Kellermann
14cee01ba1 Main: simplify Android startup 2019-05-29 15:08:39 +02:00
Max Kellermann
c782fdb698 Main: use AtScopeExit() to free Android objects 2019-05-29 15:08:38 +02:00
Max Kellermann
49ba76167e Main: add overload with ConfigData parameter 2019-05-29 15:08:26 +02:00
Max Kellermann
93ab957800 Main: convert int return types to void 2019-05-29 14:52:58 +02:00
Max Kellermann
f764925edc Instance: use std::unique_ptr<> to manage the NeighborGlue pointer 2019-04-25 13:09:31 +02:00
Max Kellermann
692c8025a2 Main: use AtScopeExit() to call NeighborGlue::Close() 2019-04-25 13:03:51 +02:00
Max Kellermann
77c9081f78 sticker/Database: wrap in class StickerDatabase 2019-04-25 12:05:18 +02:00
Max Kellermann
5a3828ed4a sticker/*: rename source files, drop "Sticker" prefix 2019-04-24 15:15:19 +02:00
Max Kellermann
1b62adc894 Instance: add noexcept 2019-04-24 14:56:08 +02:00
Max Kellermann
72ebd5ebdd java/Object: add Object.toString() wrapper 2019-04-24 14:08:51 +02:00
Max Kellermann
fe32db17d7 client/Internal: rename to Config.hxx 2019-04-03 21:31:32 +02:00
Max Kellermann
1213d979f8 client/*: rename source files, remove "Client" prefix 2019-04-03 20:59:00 +02:00
Max Kellermann
cc28a7b67f Main: create Database on stack, move to Instance after Open() succeeded
This fixes use-after-free bug in SimpleDatabase::Close(), accessing
the `root` object which was already freed by the `catch` block in
Open().

By having the Database on the stack first, we can avoid calling
Close() on the failed-to-open Database from Instance's destructor.

Closes #482
2019-02-20 20:50:28 +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
6c28adbcd2 db/Plugin: use std::unique_ptr<> to manage Database pointers 2019-02-20 20:43:31 +01:00
Max Kellermann
f70eb63879 Instance: eliminate FinishShutdownUpdate(), move code to destructor 2019-02-15 18:20:11 +01:00
Max Kellermann
99c23cf139 Instance: eliminate ShutdownDatabase(), move code to destructor
Destruct automatically, even if leaving the scope due to exception
being thrown.
2019-02-15 18:04:23 +01:00
Max Kellermann
e9c45a9140 playlist/Registry: add RAII class 2019-02-05 23:03:29 +01:00
Max Kellermann
a065c6e6b9 Main: use AtScopeExit() to call DeinitFS() 2019-02-05 23:02:50 +01:00
Max Kellermann
feb5ff9bd2 Mapper: remove empty function mapper_finish() 2019-02-05 23:01:09 +01:00
Max Kellermann
98c47d9d36 Instance: remove FinishShutdownPartitions()
The list of partitions is cleared automatically.
2019-02-05 22:53:02 +01:00
Max Kellermann
261a816b21 command/AllCommands: remove empty function command_finish() 2019-02-05 22:15:41 +01:00
Max Kellermann
7a23c123c8 decoder/List: add RAII class 2019-02-05 22:12:22 +01:00
Max Kellermann
9e73ea77b4 input/Init: add RAII class 2019-02-05 22:07:49 +01:00
Max Kellermann
848f6aa5ab Main: stop io_thread and rtio_thread automatically
They will be stopped by ~EventThread() when the `Instance` is deleted.
2019-02-05 21:49:59 +01:00
Max Kellermann
c9ba4f3f9c archive/List: add RAII class 2019-02-05 21:40:07 +01:00
Max Kellermann
096c23f27d unix/SignalHandlers: add RAII class 2019-02-05 21:36:51 +01:00
Max Kellermann
12f4a8255a Main: use DatabasePlugin::RequireStorage() 2018-11-19 19:39:37 +01:00
Max Kellermann
bda77ffc5b db/Interface: remove IsPlugin(), use dynamic_cast instead 2018-11-19 19:38:20 +01:00
Max Kellermann
f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann
2ec94c0497 player/Control: start thread on demand
Keep MPD's footprint small until playback is requested.
2018-09-23 17:32:34 +02:00