
#ifndef __FD_WATCHER_H__
#define __FD_WATCHER_H__

#include "fd_watcher_entry.h"

typedef struct s_FDWatcher FDWatcher;

FDWatcher * fd_watcher_new (void);
void fd_watcher_destroy (void *ptr);

FDWatcher * fd_watcher_getInstance (void);

void fd_watcher_watchRead (FDWatcher *instance, int fd, FDWatcherDelegate delegate, void *context);
void fd_watcher_watchWrite (FDWatcher *instance, int fd, FDWatcherDelegate delegate, void *context);

void fd_watcher_watchFD (FDWatcher *instance, int fd, FDWatcherDelegate delegate, void *context, short events);
void fd_watcher_removeWatchFD (FDWatcher *instance, int fd);


#endif
