]> git.tdb.fi Git - libs/core.git/blob - source/core/pollable.h
f676d55f2224f4bf62c6a85235018a69ed3aa5d2
[libs/core.git] / source / core / pollable.h
1 /*
2 This file is part of libmspframework
3 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
5 */
6 #ifndef MSP_FRAMEWORK_POLLABLE_H_
7 #define MSP_FRAMEWORK_POLLABLE_H_
8
9 #ifdef WIN32
10 #include "win32poll.h"
11 #endif
12
13 #include <sigc++/sigc++.h>
14
15 namespace Msp {
16
17 class Pollable
18 {
19 public:
20         sigc::signal<void> signal_deleted;
21
22         virtual short poll(short, int =0);
23         virtual ~Pollable() { signal_deleted.emit(); }
24 protected:
25         virtual int get_fd()=0;
26
27         friend class Poller;
28 };
29
30 }
31
32 #endif