projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use _chdir on Windows
[pazpar2-moved-to-github.git]
/
src
/
eventl.h
diff --git
a/src/eventl.h
b/src/eventl.h
index
1e701b8
..
de189a6
100644
(file)
--- a/
src/eventl.h
+++ b/
src/eventl.h
@@
-1,5
+1,5
@@
/* This file is part of Pazpar2.
/* This file is part of Pazpar2.
- Copyright (C) 2006-2010 Index Data
+ Copyright (C) 2006-2011 Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-25,8
+25,6
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
struct iochan;
typedef void (*IOC_CALLBACK)(struct iochan *i, int event);
struct iochan;
typedef void (*IOC_CALLBACK)(struct iochan *i, int event);
-typedef int (*IOC_SOCKETFUN)(struct iochan *i);
-typedef int (*IOC_MASKFUN)(struct iochan *i);
typedef struct iochan_man_s *iochan_man_t;
typedef struct iochan_man_s *iochan_man_t;
@@
-39,8
+37,6
@@
typedef struct iochan
#define EVENT_EXCEPT 0x04
#define EVENT_TIMEOUT 0x08
IOC_CALLBACK fun;
#define EVENT_EXCEPT 0x04
#define EVENT_TIMEOUT 0x08
IOC_CALLBACK fun;
- IOC_SOCKETFUN socketfun;
- IOC_MASKFUN maskfun;
void *data;
int destroyed;
time_t last_event;
void *data;
int destroyed;
time_t last_event;
@@
-61,6
+57,7
@@
void iochan_man_destroy(iochan_man_t *mp);
#define iochan_destroy(i) (void)((i)->destroyed = 1)
#define iochan_getfd(i) ((i)->fd)
#define iochan_destroy(i) (void)((i)->destroyed = 1)
#define iochan_getfd(i) ((i)->fd)
+#define iochan_setfd(i, d) ((i)->fd = d)
#define iochan_getdata(i) ((i)->data)
#define iochan_setdata(i, d) ((i)->data = d)
#define iochan_setflags(i, d) ((i)->flags = d)
#define iochan_getdata(i) ((i)->data)
#define iochan_setdata(i, d) ((i)->data = d)
#define iochan_setflags(i, d) ((i)->flags = d)
@@
-69,13
+66,11
@@
void iochan_man_destroy(iochan_man_t *mp);
#define iochan_getflag(i, d) ((i)->flags & d ? 1 : 0)
#define iochan_settimeout(i, t) ((i)->max_idle = (t), (i)->last_event = time(0))
#define iochan_activity(i) ((i)->last_event = time(0))
#define iochan_getflag(i, d) ((i)->flags & d ? 1 : 0)
#define iochan_settimeout(i, t) ((i)->max_idle = (t), (i)->last_event = time(0))
#define iochan_activity(i) ((i)->last_event = time(0))
-#define iochan_setsocketfun(i, f) ((i)->socketfun = (f))
-#define iochan_getsocketfun(i) ((i)->socketfun)
-#define iochan_setmaskfun(i, f) ((i)->maskfun = (f))
-#define iochan_getmaskfun(i) ((i)->maskfun)
IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags, const char *name);
IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags, const char *name);
+void pazpar2_sleep(double d);
+
#endif
/*
* Local variables:
#endif
/*
* Local variables: