]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/pollable.h
Rename to libmspcore
[libs/core.git] / source / core / pollable.h
diff --git a/source/core/pollable.h b/source/core/pollable.h
new file mode 100644 (file)
index 0000000..f676d55
--- /dev/null
@@ -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 <sigc++/sigc++.h>
+
+namespace Msp {
+
+class Pollable
+{
+public:
+       sigc::signal<void> signal_deleted;
+
+       virtual short poll(short, int =0);
+       virtual ~Pollable() { signal_deleted.emit(); }
+protected:
+       virtual int get_fd()=0;
+
+       friend class Poller;
+};
+
+}
+
+#endif