/* */ #ifndef _D_ABSTRACT_BT_EVENT_LISTENER_H_ #define _D_ABSTRACT_BT_EVENT_LISTENER_H_ #include "BtEventListener.h" namespace aria2 { class AbstractBtEventListener : public BtEventListener { public: virtual ~AbstractBtEventListener() {} virtual bool canHandle(const SharedHandle& event) = 0; virtual void handleEventInternal(const SharedHandle& event) = 0; virtual void handleEvent(const SharedHandle& event) { if(canHandle(event)) { handleEventInternal(event); } } }; } // namespace aria2 #endif // _D_ABSTRACT_BT_EVENT_LISTENER_H_