Refactored AddOnMonitor to allow an alternative constructor which does not

yet take the AddOnMonitorHandler (and also does not Run() the looper
automatically). Added SetHandler() method which allows to set the handler
afterward. Does not require updates in existing clients.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39740 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2010-12-05 14:59:27 +00:00
parent a906d0a031
commit 445751e17a
2 changed files with 56 additions and 22 deletions
+5
View File
@@ -25,11 +25,16 @@ class AddOnMonitor : public BLooper {
private:
typedef BLooper inherited;
public:
AddOnMonitor();
// Does not automatically run the looper.
AddOnMonitor(AddOnMonitorHandler* handler);
// Automatically runs the looper.
virtual ~AddOnMonitor();
virtual status_t InitCheck();
void SetHandler(AddOnMonitorHandler* handler);
private:
status_t fInitCheck;
BMessageRunner* fPulseRunner;