2004-06-08 23:54:24 +00:00
|
|
|
#ifndef fooiochannelhfoo
|
|
|
|
|
#define fooiochannelhfoo
|
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
2004-06-23 23:17:30 +00:00
|
|
|
#include "mainloop-api.h"
|
2004-06-08 23:54:24 +00:00
|
|
|
|
|
|
|
|
struct iochannel;
|
|
|
|
|
|
2004-06-23 23:17:30 +00:00
|
|
|
struct iochannel* iochannel_new(struct pa_mainloop_api*m, int ifd, int ofd);
|
2004-06-08 23:54:24 +00:00
|
|
|
void iochannel_free(struct iochannel*io);
|
|
|
|
|
|
|
|
|
|
ssize_t iochannel_write(struct iochannel*io, const void*data, size_t l);
|
|
|
|
|
ssize_t iochannel_read(struct iochannel*io, void*data, size_t l);
|
|
|
|
|
|
|
|
|
|
int iochannel_is_readable(struct iochannel*io);
|
|
|
|
|
int iochannel_is_writable(struct iochannel*io);
|
|
|
|
|
|
2004-06-19 19:27:47 +00:00
|
|
|
void iochannel_set_noclose(struct iochannel*io, int b);
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
void iochannel_set_callback(struct iochannel*io, void (*callback)(struct iochannel*io, void *userdata), void *userdata);
|
|
|
|
|
|
2004-06-23 23:17:30 +00:00
|
|
|
void iochannel_peer_to_string(struct iochannel*io, char*s, size_t l);
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
#endif
|