Add a way to register loopers for quit

* BApplication can now take the job to quit a BLooper at
the application quit. It's rejecting requests from windows too.
* BMediaRoster is using now this service in conjunction with the
MediaRosterUndertaker.
* The BeBook specify that we should have a valid BApplication
before to instantiate the BMediaRoster. While in theory we should
add a debugger call when this situation happens, in pratice this
might lead to more problems. For example libraries might use the
media_kit and create a BApplication object, but they aren't
applications, this is a design problem. So I decided to replace it
with a TRACE call for the moment.
This commit is contained in:
Dario Casalinuovo
2015-11-28 16:35:03 +01:00
parent 893e3de866
commit 05962bb1e1
3 changed files with 61 additions and 3 deletions
+5
View File
@@ -85,6 +85,11 @@ public:
BHandler* handler);
void SetPulseRate(bigtime_t rate);
// Register a BLooper to be quit before the BApplication
// object is destroyed.
status_t RegisterLooper(BLooper* looper);
status_t UnregisterLooper(BLooper* looper);
// More scripting
virtual status_t GetSupportedSuites(BMessage* data);