Last change
on this file since 6958 was 1053, checked in by casaldaliga, 23 years ago |
renamed files to conform MAGIC standard
|
File size:
467 bytes
|
Line | |
---|
1 | #ifndef IONOTIFIER
|
---|
2 | #define IONOTIFIER
|
---|
3 |
|
---|
4 | //for signals
|
---|
5 | #include <sigc++/signal_system.h>
|
---|
6 | using namespace SigC;
|
---|
7 | //for threads
|
---|
8 | #include <pthread.h>
|
---|
9 |
|
---|
10 | class IONotifier
|
---|
11 | {
|
---|
12 | public:
|
---|
13 |
|
---|
14 | Signal0<void> againWritable;
|
---|
15 | Signal0<void> readable;
|
---|
16 | IONotifier(int fd_);
|
---|
17 | ~IONotifier();
|
---|
18 | private:
|
---|
19 | int fd;
|
---|
20 | pthread_t thread;
|
---|
21 | bool againWritableEmited;
|
---|
22 | bool fdIsValid;
|
---|
23 | pthread_mutex_t mutex;
|
---|
24 |
|
---|
25 | static void * watchFor( void* arg);
|
---|
26 | };
|
---|
27 |
|
---|
28 |
|
---|
29 |
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.