X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fpollable.h;fp=source%2Fcore%2Fpollable.h;h=f676d55f2224f4bf62c6a85235018a69ed3aa5d2;hb=e1ea831a640fba534e7e42e399f04cdf681ef8d3;hp=0000000000000000000000000000000000000000;hpb=0bcb8d4d6f33cbdad7b921cac787740bfe8e212e;p=libs%2Fcore.git diff --git a/source/core/pollable.h b/source/core/pollable.h new file mode 100644 index 0000000..f676d55 --- /dev/null +++ b/source/core/pollable.h @@ -0,0 +1,32 @@ +/* +This file is part of libmspframework +Copyright © 2006 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ +#ifndef MSP_FRAMEWORK_POLLABLE_H_ +#define MSP_FRAMEWORK_POLLABLE_H_ + +#ifdef WIN32 +#include "win32poll.h" +#endif + +#include + +namespace Msp { + +class Pollable +{ +public: + sigc::signal signal_deleted; + + virtual short poll(short, int =0); + virtual ~Pollable() { signal_deleted.emit(); } +protected: + virtual int get_fd()=0; + + friend class Poller; +}; + +} + +#endif