GlobalEvents: expose the internal class

Move the GlobalEvents::Monitor instance into class Instance.
Eliminate all global variables.
This commit is contained in:
Max Kellermann
2016-03-05 20:14:12 +01:00
parent b4d594eeff
commit 0e87ce4680
7 changed files with 38 additions and 58 deletions

View File

@@ -38,7 +38,6 @@
#include "Idle.hxx"
#include "Log.hxx"
#include "LogInit.hxx"
#include "GlobalEvents.hxx"
#include "input/Init.hxx"
#include "event/Loop.hxx"
#include "IOThread.hxx"
@@ -520,8 +519,7 @@ static int mpd_main_after_fork(struct options options)
try {
Error error;
GlobalEvents::Initialize(instance->event_loop);
GlobalEvents::Register(GlobalEvents::IDLE, idle_event_emitted);
instance->global_events.Register(GlobalEvents::IDLE, idle_event_emitted);
if (!ConfigureFS(error)) {
LogError(error);
@@ -689,8 +687,6 @@ try {
sticker_global_finish();
#endif
GlobalEvents::Deinitialize();
playlist_list_global_finish();
input_stream_global_finish();