diff options
Diffstat (limited to 'base/message_loop.h')
-rw-r--r-- | base/message_loop.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/base/message_loop.h b/base/message_loop.h index 69db8c1..6cd0ef4 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -473,14 +473,21 @@ class MessageLoopForIO : public MessageLoop { #elif defined(OS_POSIX) typedef base::MessagePumpLibevent::Watcher Watcher; - typedef base::MessagePumpLibevent::FileWatcher FileWatcher; - - // Please see MessagePumpLibevent for definitions of these methods. - void WatchSocket(int socket, short interest_mask, - struct event* e, Watcher* watcher); - void WatchFileHandle(int fd, short interest_mask, event* e, FileWatcher*); - void UnwatchSocket(struct event* e); - void UnwatchFileHandle(event* e); + typedef base::MessagePumpLibevent::FileDescriptorWatcher + FileDescriptorWatcher; + + enum Mode { + WATCH_READ = base::MessagePumpLibevent::WATCH_READ, + WATCH_WRITE = base::MessagePumpLibevent::WATCH_WRITE, + WATCH_READ_WRITE = base::MessagePumpLibevent::WATCH_READ_WRITE + }; + + // Please see MessagePumpLibevent for definition. + bool WatchFileDescriptor(int fd, + bool persistent, + Mode mode, + FileDescriptorWatcher *controller, + Watcher *delegate); #endif // defined(OS_POSIX) }; |