1 #ifndef fooprotocolnativehfoo
2 #define fooprotocolnativehfoo
5 This file is part of PulseAudio.
7 Copyright 2004-2006 Lennart Poettering
8 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
10 PulseAudio is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published
12 by the Free Software Foundation; either version 2 of the License,
13 or (at your option) any later version.
15 PulseAudio is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with PulseAudio; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 #include <pulsecore/core.h>
27 #include <pulsecore/ipacl.h>
28 #include <pulsecore/auth-cookie.h>
29 #include <pulsecore/iochannel.h>
30 #include <pulsecore/module.h>
31 #include <pulsecore/modargs.h>
32 #include <pulsecore/strlist.h>
33 #include <pulsecore/hook-list.h>
35 typedef struct pa_native_protocol pa_native_protocol
;
37 typedef struct pa_native_options
{
42 pa_bool_t auth_anonymous
;
44 pa_ip_acl
*auth_ip_acl
;
45 pa_auth_cookie
*auth_cookie
;
49 pa_native_protocol
* pa_native_protocol_get(pa_core
*core
);
50 pa_native_protocol
* pa_native_protocol_ref(pa_native_protocol
*p
);
51 void pa_native_protocol_unref(pa_native_protocol
*p
);
52 void pa_native_protocol_connect(pa_native_protocol
*p
, pa_iochannel
*io
, pa_native_options
*a
);
53 void pa_native_protocol_disconnect(pa_native_protocol
*p
, pa_module
*m
);
55 void pa_native_protocol_add_server_string(pa_native_protocol
*p
, const char *name
);
56 void pa_native_protocol_remove_server_string(pa_native_protocol
*p
, const char *name
);
58 pa_hook
*pa_native_protocol_servers_changed(pa_native_protocol
*p
);
59 pa_strlist
*pa_native_protocol_servers(pa_native_protocol
*p
);
61 /* typedef void (*pa_native_protocol_extension_cb_t)(pa_native_protocol *p, pa_module *m, pa_pstream *p, uint32_t tag, pa_tagstruct *t); */
62 /* int pa_native_protocol_install_extension(pa_native_protocol *p, pa_module *m, pa_native_protocol_extension_cb_t cb); */
63 /* void pa_native_protocol_remove_extension(pa_native_protocol *p, pa_module *m); */
65 pa_native_options
* pa_native_options_new(void);
66 pa_native_options
* pa_native_options_ref(pa_native_options
*o
);
67 void pa_native_options_unref(pa_native_options
*o
);
68 int pa_native_options_parse(pa_native_options
*o
, pa_core
*c
, pa_modargs
*ma
);