2010-08-18 17:50:50 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2004-2010, Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2004-02-01 08:50:56 +03:00
|
|
|
#ifndef _ADD_ON_MONITOR_H
|
|
|
|
#define _ADD_ON_MONITOR_H
|
|
|
|
|
2010-08-18 17:50:50 +04:00
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
#include <list>
|
2010-08-18 17:50:50 +04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string>
|
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
#include <Looper.h>
|
|
|
|
#include <MessageRunner.h>
|
2010-08-18 17:50:50 +04:00
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
namespace Storage {
|
|
|
|
|
2010-08-18 17:50:50 +04:00
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
class AddOnMonitorHandler;
|
|
|
|
|
2010-08-18 17:50:50 +04:00
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
class AddOnMonitor : public BLooper {
|
|
|
|
private:
|
2010-08-18 17:50:50 +04:00
|
|
|
typedef BLooper inherited;
|
2004-02-01 08:50:56 +03:00
|
|
|
public:
|
2010-12-05 17:59:27 +03:00
|
|
|
AddOnMonitor();
|
|
|
|
// Does not automatically run the looper.
|
2010-08-18 17:50:50 +04:00
|
|
|
AddOnMonitor(AddOnMonitorHandler* handler);
|
2010-12-05 17:59:27 +03:00
|
|
|
// Automatically runs the looper.
|
2010-08-18 17:50:50 +04:00
|
|
|
virtual ~AddOnMonitor();
|
2004-02-01 08:50:56 +03:00
|
|
|
|
2010-08-18 17:50:50 +04:00
|
|
|
virtual status_t InitCheck();
|
2004-02-01 08:50:56 +03:00
|
|
|
|
2010-12-05 17:59:27 +03:00
|
|
|
void SetHandler(AddOnMonitorHandler* handler);
|
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
private:
|
2010-08-18 17:50:50 +04:00
|
|
|
status_t fInitCheck;
|
|
|
|
BMessageRunner* fPulseRunner;
|
2004-02-01 08:50:56 +03:00
|
|
|
};
|
|
|
|
|
2010-08-18 17:50:50 +04:00
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
}; // namespace Storage
|
|
|
|
}; // namespace BPrivate
|
|
|
|
|
2010-08-18 17:50:50 +04:00
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
using namespace BPrivate::Storage;
|
|
|
|
|
2010-08-18 17:50:50 +04:00
|
|
|
|
2004-02-01 08:50:56 +03:00
|
|
|
#endif // _ADD_ON_MONITOR_H
|