/[pengfork]/pengfork/include/engine.h
ViewVC logotype

Diff of /pengfork/include/engine.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by chupa, Fri Sep 6 23:03:55 2002 UTC revision 1.3 by chupa, Mon Sep 9 22:59:42 2002 UTC
# Line 31  Line 31 
31  /* the timeout in seconds */  /* the timeout in seconds */
32  #define ENGINE_TIMEOUT  5  #define ENGINE_TIMEOUT  5
33    
34  typedef void (*init_fn_t) (buffer_t *, buffer_t *);  struct engine_functions
35  typedef int (*want_read_fn_t) (buffer_t *, buffer_t *);  {
36  typedef void (*readfn_fn_t) (buffer_t *, buffer_t *, int);    void (*init) (buffer_t * bufin, buffer_t * bufout);
37  typedef int (*end_fn_t) (buffer_t *, buffer_t *);    int (*want_read) (buffer_t * bufin);
38      int (*want_write) (buffer_t * bufout);
39      void (*readfn) (buffer_t * bufin);
40      void (*writefn) (buffer_t * bufout);
41      void (*timeoutfn) (buffer_t * bufin, buffer_t * bufout, int timeout);
42      int (*end) (buffer_t * bufin, buffer_t * bufout);
43    };
44    
45  int engine_init (void);  int engine_init (void);
46  void engine_loop (void);  void engine_loop (void);
47  void engine_stop (void);  void engine_stop (void);
48  void engine_register (int fd, int timeout_notify, init_fn_t init,  void engine_register (int fd, struct engine_functions fn);
                       want_read_fn_t want_read, readfn_fn_t readfn,  
                       end_fn_t end);  
49  void engine_unregister (int fd);  void engine_unregister (int fd);
50  void engine_set_readers (fd_set * fdset, int *maxfd);  void engine_set_readers (fd_set * fdset, int *maxfd);
51  void engine_set_writers (fd_set * fdset, int *maxfd);  void engine_set_writers (fd_set * fdset, int *maxfd);
52  void engine_read (fd_set * fdset);  void engine_read (fd_set * fdset);
53  void engine_write (fd_set * fdset);  void engine_write (fd_set * fdset);
54  void engine_timeout (int timeouts);  void engine_timeout ();
55    
56    
57  #endif /* __ENGINE_H__ */  #endif /* __ENGINE_H__ */

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26