]> code.delx.au - pulseaudio/blob - src/iochannel.h
fix recording for simpel and esound protocols
[pulseaudio] / src / iochannel.h
1 #ifndef fooiochannelhfoo
2 #define fooiochannelhfoo
3
4 #include <sys/types.h>
5 #include "mainloop-api.h"
6
7 /* It is safe to destroy the calling iochannel object from the callback */
8
9 struct pa_iochannel;
10
11 struct pa_iochannel* pa_iochannel_new(struct pa_mainloop_api*m, int ifd, int ofd);
12 void pa_iochannel_free(struct pa_iochannel*io);
13
14 ssize_t pa_iochannel_write(struct pa_iochannel*io, const void*data, size_t l);
15 ssize_t pa_iochannel_read(struct pa_iochannel*io, void*data, size_t l);
16
17 int pa_iochannel_is_readable(struct pa_iochannel*io);
18 int pa_iochannel_is_writable(struct pa_iochannel*io);
19 int pa_iochannel_is_hungup(struct pa_iochannel*io);
20
21 void pa_iochannel_set_noclose(struct pa_iochannel*io, int b);
22
23 void pa_iochannel_set_callback(struct pa_iochannel*io, void (*callback)(struct pa_iochannel*io, void *userdata), void *userdata);
24
25 void pa_iochannel_socket_peer_to_string(struct pa_iochannel*io, char*s, size_t l);
26 int pa_iochannel_socket_set_rcvbuf(struct pa_iochannel*io, size_t l);
27 int pa_iochannel_socket_set_sndbuf(struct pa_iochannel*io, size_t l);
28
29 #endif