oop-adns.h   oop-adns.h 
/* oop-adns.h, liboop, copyright 1999 Dan Egnor /* oop-adns.h, liboop, copyright 1999 Dan Egnor
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_ADNS_H #ifndef OOP_ADNS_H
#define OOP_ADNS_H #define OOP_ADNS_H
#ifndef ADNS_H_INCLUDED #ifndef ADNS_H_INCLUDED
#error You must include "adns.h" before "oop_adns.h"! #error You must include "adns.h" before "oop-adns.h"!
#endif #endif
#include "oop.h" #include "oop.h"
typedef struct oop_adapter_adns oop_adapter_adns; typedef struct oop_adapter_adns oop_adapter_adns;
typedef struct oop_adns_query oop_adns_query; typedef struct oop_adns_query oop_adns_query;
typedef void *oop_adns_call(oop_adapter_adns *,adns_answer *,void *); typedef void *oop_adns_call(oop_adapter_adns *,adns_answer *,void *);
/* A liboop adns adapter creates an adns instance tied to a liboop source. /* A liboop adns adapter creates an adns instance tied to a liboop source.
oop_adns_new() Returns NULL on failure.*/ oop_adns_new() Returns NULL on failure.*/
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 oop.h   oop.h 
skipping to change at line 29 skipping to change at line 29
typedef enum { typedef enum {
OOP_READ, OOP_READ,
OOP_WRITE, OOP_WRITE,
OOP_NUM_EVENTS OOP_NUM_EVENTS
} oop_event; } oop_event;
/* Pass this to on_time to schedule an event immediately */ /* Pass this to on_time to schedule an event immediately */
static const struct timeval OOP_TIME_NOW = { 0, 0 }; static const struct timeval OOP_TIME_NOW = { 0, 0 };
/* Maximum signal number. (The OS may have a stricter limit!) */
#define OOP_NUM_SIGNALS 256
/* Callbacks may return one of these */ /* Callbacks may return one of these */
#define OOP_CONTINUE NULL #define OOP_CONTINUE NULL
#define OOP_HALT ((void *) 1) /* (or any non-NULL pointer of your choice) * / #define OOP_HALT ((void *) 1) /* (or any non-NULL pointer of your choice) * /
/* Callback function prototypes */ /* Callback function prototypes */
typedef void *oop_call_fd(oop_source *,int fd,oop_event,void *); typedef void *oop_call_fd(oop_source *,int fd,oop_event,void *);
typedef void *oop_call_time(oop_source *,struct timeval,void *); typedef void *oop_call_time(oop_source *,struct timeval,void *);
typedef void *oop_call_signal(oop_source *,int sig,void *); typedef void *oop_call_signal(oop_source *,int sig,void *);
struct oop_source { struct oop_source {
void (*on_fd)(oop_source *,int fd,oop_event,oop_call_fd *,void *); void (*on_fd)(oop_source *,int fd,oop_event,oop_call_fd *,void *);
void (*cancel_fd)(oop_source *,int fd,oop_event,oop_call_fd *,void * ); void (*cancel_fd)(oop_source *,int fd,oop_event);
void (*on_time)(oop_source *,struct timeval,oop_call_time *,void *); void (*on_time)(oop_source *,struct timeval,oop_call_time *,void *);
void (*cancel_time)(oop_source *,struct timeval,oop_call_time *,void *); void (*cancel_time)(oop_source *,struct timeval,oop_call_time *,void *);
void (*on_signal)(oop_source *,int sig,oop_call_signal *,void *); void (*on_signal)(oop_source *,int sig,oop_call_signal *,void *);
void (*cancel_signal)(oop_source *,int sig,oop_call_signal *,void *) ; void (*cancel_signal)(oop_source *,int sig,oop_call_signal *,void *) ;
}; };
/* ------------------------------------------------------------------------ - */ /* ------------------------------------------------------------------------ - */
skipping to change at line 95 skipping to change at line 98
oop_source *, oop_source *,
oop_call_select *, oop_call_select *,
void *); void *);
void oop_select_set( void oop_select_set(
oop_adapter_select *,int num_fd, oop_adapter_select *,int num_fd,
fd_set *rfd,fd_set *wfd,struct timeval *timeout); fd_set *rfd,fd_set *wfd,struct timeval *timeout);
void oop_select_delete(oop_adapter_select *); void oop_select_delete(oop_adapter_select *);
/* ------------------------------------------------------------------------
- */
/* Helper for event sources without signal handling. */
typedef struct oop_adapter_signal oop_adapter_signal;
oop_adapter_signal *oop_signal_new(oop_source *);
void oop_signal_delete(oop_adapter_signal *);
oop_source *oop_signal_source(oop_adapter_signal *);
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 14 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/