]> code.delx.au - pulseaudio/blob - src/modules/raop/raop_client.h
Modularise the RAOP stuff that requires OpenSSL and make it optional at compile time
[pulseaudio] / src / modules / raop / raop_client.h
1 #ifndef fooraopclientfoo
2 #define fooraopclientfoo
3
4 /***
5 This file is part of PulseAudio.
6
7 Copyright 2008 Colin Guthrie
8
9 PulseAudio 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.
13
14 PulseAudio 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.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with PulseAudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 USA.
23 ***/
24
25 #include <pulse/mainloop-api.h>
26 #include <pulsecore/iochannel.h>
27 #include <pulsecore/core.h>
28
29 typedef struct pa_raop_client pa_raop_client;
30
31 pa_raop_client* pa_raop_client_new(pa_core *core, const char* host);
32 void pa_raop_client_free(pa_raop_client* c);
33
34 int pa_raop_connect(pa_raop_client* c);
35 int pa_raop_flush(pa_raop_client* c);
36
37 int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume);
38 int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchunk* encoded);
39
40 typedef void (*pa_raop_client_cb_t)(int fd, void *userdata);
41 void pa_raop_client_set_callback(pa_raop_client* c, pa_raop_client_cb_t callback, void *userdata);
42
43 typedef void (*pa_raop_client_closed_cb_t)(void *userdata);
44 void pa_raop_client_set_closed_callback(pa_raop_client* c, pa_raop_client_closed_cb_t callback, void *userdata);
45
46 #endif