Commit ced4abcd authored by Max Kellermann's avatar Max Kellermann

update: added update_global_init() and update_global_finish()

Those two functions are called when MPD starts and exits. It allows the update library to perform global initialization and deinitialization. The implementations are currently empty.
parent bd0653f4
...@@ -416,6 +416,7 @@ int main(int argc, char *argv[]) ...@@ -416,6 +416,7 @@ int main(int argc, char *argv[])
initPermissions(); initPermissions();
initPlaylist(); initPlaylist();
decoder_plugin_init_all(); decoder_plugin_init_all();
update_global_init();
init_main_notify(); init_main_notify();
...@@ -497,6 +498,7 @@ int main(int argc, char *argv[]) ...@@ -497,6 +498,7 @@ int main(int argc, char *argv[])
dc_deinit(); dc_deinit();
pc_deinit(); pc_deinit();
command_finish(); command_finish();
update_global_finish();
decoder_plugin_deinit_all(); decoder_plugin_deinit_all();
music_pipe_free(); music_pipe_free();
cleanUpPidFile(); cleanUpPidFile();
......
...@@ -580,3 +580,11 @@ void reap_update_task(void) ...@@ -580,3 +580,11 @@ void reap_update_task(void)
progress = UPDATE_PROGRESS_IDLE; progress = UPDATE_PROGRESS_IDLE;
} }
} }
void update_global_init(void)
{
}
void update_global_finish(void)
{
}
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
#ifndef MPD_UPDATE_H #ifndef MPD_UPDATE_H
#define MPD_UPDATE_H #define MPD_UPDATE_H
void update_global_init(void);
void update_global_finish(void);
unsigned unsigned
isUpdatingDB(void); isUpdatingDB(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment