]>
code.delx.au - pulseaudio/blob - polyp/ioline.h
7 This file is part of polypaudio.
9 polypaudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published
11 by the Free Software Foundation; either version 2 of the License,
12 or (at your option) any later version.
14 polypaudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with polypaudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 #include "iochannel.h"
27 /* An ioline wraps an iochannel for line based communication. A
28 * callback function is called whenever a new line has been recieved
33 struct pa_ioline
* pa_ioline_new(struct pa_iochannel
*io
);
34 void pa_ioline_unref(struct pa_ioline
*l
);
35 struct pa_ioline
* pa_ioline_ref(struct pa_ioline
*l
);
36 void pa_ioline_close(struct pa_ioline
*l
);
38 /* Write a string to the channel */
39 void pa_ioline_puts(struct pa_ioline
*s
, const char *c
);
41 /* Set the callback function that is called for every recieved line */
42 void pa_ioline_set_callback(struct pa_ioline
*io
, void (*callback
)(struct pa_ioline
*io
, const char *s
, void *userdata
), void *userdata
);