1c6077ae7SStephan Aßmus /* 2c6077ae7SStephan Aßmus * Copyright 2004-2010, Haiku, Inc. All rights reserved. 3c6077ae7SStephan Aßmus * Distributed under the terms of the MIT License. 4c6077ae7SStephan Aßmus */ 5522f702aSshatty #ifndef _ADD_ON_MONITOR_H 6522f702aSshatty #define _ADD_ON_MONITOR_H 7522f702aSshatty 8c6077ae7SStephan Aßmus 9522f702aSshatty #include <list> 10c6077ae7SStephan Aßmus #include <stdio.h> 11c6077ae7SStephan Aßmus #include <string> 12c6077ae7SStephan Aßmus 13522f702aSshatty #include <Looper.h> 14522f702aSshatty #include <MessageRunner.h> 15c6077ae7SStephan Aßmus 16522f702aSshatty 17522f702aSshatty namespace BPrivate { 18522f702aSshatty namespace Storage { 19522f702aSshatty 20c6077ae7SStephan Aßmus 21522f702aSshatty class AddOnMonitorHandler; 22522f702aSshatty 23c6077ae7SStephan Aßmus 24522f702aSshatty class AddOnMonitor : public BLooper { 25522f702aSshatty private: 26522f702aSshatty typedef BLooper inherited; 27522f702aSshatty public: 28*445751e1SStephan Aßmus AddOnMonitor(); 29*445751e1SStephan Aßmus // Does not automatically run the looper. 30522f702aSshatty AddOnMonitor(AddOnMonitorHandler* handler); 31*445751e1SStephan Aßmus // Automatically runs the looper. 32522f702aSshatty virtual ~AddOnMonitor(); 33522f702aSshatty 34522f702aSshatty virtual status_t InitCheck(); 35522f702aSshatty 36*445751e1SStephan Aßmus void SetHandler(AddOnMonitorHandler* handler); 37*445751e1SStephan Aßmus 38522f702aSshatty private: 39522f702aSshatty status_t fInitCheck; 40522f702aSshatty BMessageRunner* fPulseRunner; 41522f702aSshatty }; 42522f702aSshatty 43c6077ae7SStephan Aßmus 44522f702aSshatty }; // namespace Storage 45522f702aSshatty }; // namespace BPrivate 46522f702aSshatty 47c6077ae7SStephan Aßmus 48522f702aSshatty using namespace BPrivate::Storage; 49522f702aSshatty 50c6077ae7SStephan Aßmus 51522f702aSshatty #endif // _ADD_ON_MONITOR_H 52