1/* 2 * Copyright 2004-2010, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _ADD_ON_MONITOR_H 6#define _ADD_ON_MONITOR_H 7 8 9#include <list> 10#include <stdio.h> 11#include <string> 12 13#include <Looper.h> 14#include <MessageRunner.h> 15 16 17namespace BPrivate { 18namespace Storage { 19 20 21class AddOnMonitorHandler; 22 23 24class AddOnMonitor : public BLooper { 25private: 26 typedef BLooper inherited; 27public: 28 AddOnMonitor(); 29 // Does not automatically run the looper. 30 AddOnMonitor(AddOnMonitorHandler* handler); 31 // Automatically runs the looper. 32 virtual ~AddOnMonitor(); 33 34 virtual status_t InitCheck(); 35 36 void SetHandler(AddOnMonitorHandler* handler); 37 38private: 39 status_t fInitCheck; 40 BMessageRunner* fPulseRunner; 41}; 42 43 44}; // namespace Storage 45}; // namespace BPrivate 46 47 48using namespace BPrivate::Storage; 49 50 51#endif // _ADD_ON_MONITOR_H 52