private void RunMainLoop ()
{
ThreadAssist.InitializeMainThread ();
ThreadAssist.ProxyToMainHandler = Banshee.ServiceStack.Application.Invoke;
service = new PlayerEngineService ();
service.PlayWhenIdleRequest += delegate { play_when_idles++; };
service.TrackIntercept += delegate { track_intercepts++; return false; };
// TODO call each test w/ permutations of Gapless enabled/disabled, RG enabled/disabled
try {
ServiceManager.RegisterService (service);
} catch {}
((IInitializeService)service).Initialize ();
((IDelayedInitializeService)service).DelayedInitialize ();
main_loop = new GLib.MainLoop ();
started = true;
main_loop.Run ();
}