default: esd is obsolete, hence don't load it anymore by default
[pulseaudio-mirror.git] / src / pulsecore / protocol-native.h
blob971262742ddea06e24257232a8396f6870a11600
1 #ifndef fooprotocolnativehfoo
2 #define fooprotocolnativehfoo
4 /***
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.1 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
23 USA.
24 ***/
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>
34 #include <pulsecore/pstream.h>
35 #include <pulsecore/tagstruct.h>
37 typedef struct pa_native_protocol pa_native_protocol;
39 typedef struct pa_native_connection pa_native_connection;
41 typedef struct pa_native_options {
42 PA_REFCNT_DECLARE;
44 pa_module *module;
46 pa_bool_t auth_anonymous;
47 char *auth_group;
48 pa_ip_acl *auth_ip_acl;
49 pa_auth_cookie *auth_cookie;
50 } pa_native_options;
52 typedef enum pa_native_hook {
53 PA_NATIVE_HOOK_SERVERS_CHANGED,
54 PA_NATIVE_HOOK_CONNECTION_PUT,
55 PA_NATIVE_HOOK_CONNECTION_UNLINK,
56 PA_NATIVE_HOOK_MAX
57 } pa_native_hook_t;
59 pa_native_protocol* pa_native_protocol_get(pa_core *core);
60 pa_native_protocol* pa_native_protocol_ref(pa_native_protocol *p);
61 void pa_native_protocol_unref(pa_native_protocol *p);
62 void pa_native_protocol_connect(pa_native_protocol *p, pa_iochannel *io, pa_native_options *a);
63 void pa_native_protocol_disconnect(pa_native_protocol *p, pa_module *m);
65 pa_hook *pa_native_protocol_hooks(pa_native_protocol *p);
67 void pa_native_protocol_add_server_string(pa_native_protocol *p, const char *name);
68 void pa_native_protocol_remove_server_string(pa_native_protocol *p, const char *name);
69 pa_strlist *pa_native_protocol_servers(pa_native_protocol *p);
71 typedef int (*pa_native_protocol_ext_cb_t)(
72 pa_native_protocol *p,
73 pa_module *m,
74 pa_native_connection *c,
75 uint32_t tag,
76 pa_tagstruct *t);
78 int pa_native_protocol_install_ext(pa_native_protocol *p, pa_module *m, pa_native_protocol_ext_cb_t cb);
79 void pa_native_protocol_remove_ext(pa_native_protocol *p, pa_module *m);
81 pa_pstream* pa_native_connection_get_pstream(pa_native_connection *c);
82 pa_client* pa_native_connection_get_client(pa_native_connection *c);
84 pa_native_options* pa_native_options_new(void);
85 pa_native_options* pa_native_options_ref(pa_native_options *o);
86 void pa_native_options_unref(pa_native_options *o);
87 int pa_native_options_parse(pa_native_options *o, pa_core *c, pa_modargs *ma);
89 #endif