oop.h | oop.h | |||
---|---|---|---|---|
skipping to change at line 12 | skipping to change at line 12 | |||
This is free software; you can redistribute it and/or modify it under th e | This is free software; you can redistribute it and/or modify it under th e | |||
terms of the GNU Lesser General Public License, version 2.1 or later. | terms of the GNU Lesser General Public License, version 2.1 or later. | |||
See the file COPYING for details. */ | See the file COPYING for details. */ | |||
#ifndef OOP_H | #ifndef OOP_H | |||
#define OOP_H | #define OOP_H | |||
#include <sys/time.h> | #include <sys/time.h> | |||
#include <sys/types.h> | #include <sys/types.h> | |||
#include <unistd.h> | ||||
/* ------------------------------------------------------------------------ - */ | /* ------------------------------------------------------------------------ - */ | |||
typedef struct oop_source oop_source; | typedef struct oop_source oop_source; | |||
/* File descriptor action types */ | /* File descriptor action types */ | |||
typedef enum { | typedef enum { | |||
OOP_READ, | OOP_READ, | |||
OOP_WRITE, | OOP_WRITE, | |||
skipping to change at line 74 | skipping to change at line 75 | |||
1 -- some callback returns non-NULL; will return the value in question. | 1 -- some callback returns non-NULL; will return the value in question. | |||
2 -- no callbacks are registered; will return NULL. */ | 2 -- no callbacks are registered; will return NULL. */ | |||
void *oop_sys_run(oop_source_sys *); | void *oop_sys_run(oop_source_sys *); | |||
/* Delete a system event source. No callbacks may be registered. */ | /* Delete a system event source. No callbacks may be registered. */ | |||
void oop_sys_delete(oop_source_sys *); | void oop_sys_delete(oop_source_sys *); | |||
/* Get the event registration interface for a system event source. */ | /* Get the event registration interface for a system event source. */ | |||
oop_source *oop_sys_source(oop_source_sys *); | oop_source *oop_sys_source(oop_source_sys *); | |||
/* ------------------------------------------------------------------------ | ||||
- */ | ||||
/* Helper for select-style asynchronous interfaces. */ | ||||
typedef struct oop_adapter_select oop_adapter_select; | ||||
typedef void *oop_call_select( | ||||
oop_adapter_select *, | ||||
int num,fd_set *r,fd_set *w, | ||||
struct timeval now,void *); | ||||
oop_adapter_select *oop_select_new( | ||||
oop_source *, | ||||
oop_call_select *, | ||||
void *); | ||||
void oop_select_set( | ||||
oop_adapter_select *,int num_fd, | ||||
fd_set *rfd,fd_set *wfd,struct timeval *timeout); | ||||
void oop_select_delete(oop_adapter_select *); | ||||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 22 lines changed or added | |||