
#ifndef __FD_WATCHER_ENTRY_H__
#define __FD_WATCHER_ENTRY_H__

typedef struct s_FDWatcherEntry FDWatcherEntry;

typedef void (*FDWatcherDelegate) (void *context, int fd, short events);

FDWatcherEntry * fd_watcher_entry_new (int fd, FDWatcherDelegate function, void *context, short events);
void fd_watcher_entry_destroy (void *ptr);

void fd_watcher_entry_addEvent (FDWatcherEntry *instance, short event);

void fd_watcher_entry_invoke (FDWatcherEntry *instance, short events);

int fd_watcher_entry_getFD (FDWatcherEntry *instance);
short fd_watcher_entry_getEvents (FDWatcherEntry *instance);

#endif
