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.
This commit is contained in:
Max Kellermann 2008-11-27 19:34:54 +01:00
parent bd0653f440
commit ced4abcd64
3 changed files with 14 additions and 0 deletions

View File

@ -416,6 +416,7 @@ int main(int argc, char *argv[])
initPermissions();
initPlaylist();
decoder_plugin_init_all();
update_global_init();
init_main_notify();
@ -497,6 +498,7 @@ int main(int argc, char *argv[])
dc_deinit();
pc_deinit();
command_finish();
update_global_finish();
decoder_plugin_deinit_all();
music_pipe_free();
cleanUpPidFile();

View File

@ -580,3 +580,11 @@ void reap_update_task(void)
progress = UPDATE_PROGRESS_IDLE;
}
}
void update_global_init(void)
{
}
void update_global_finish(void)
{
}

View File

@ -20,6 +20,10 @@
#ifndef MPD_UPDATE_H
#define MPD_UPDATE_H
void update_global_init(void);
void update_global_finish(void);
unsigned
isUpdatingDB(void);