]> code.delx.au - pulseaudio/blob - src/pulsecore/protocol-native.h
Updated catalan po
[pulseaudio] / src / pulsecore / protocol-native.h
1 #ifndef fooprotocolnativehfoo
2 #define fooprotocolnativehfoo
3
4 /***
5 This file is part of PulseAudio.
6
7 Copyright 2004-2006 Lennart Poettering
8 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
9
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.
14
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.
19
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 ***/
25
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>
36
37 typedef struct pa_native_protocol pa_native_protocol;
38
39 typedef struct pa_native_connection pa_native_connection;
40
41 typedef struct pa_native_options {
42 PA_REFCNT_DECLARE;
43
44 pa_module *module;
45
46 pa_bool_t auth_anonymous;
47 char *auth_group;
48 pa_ip_acl *auth_ip_acl;
49 pa_auth_cookie *auth_cookie;
50
51 } pa_native_options;
52
53 typedef enum pa_native_hook {
54 PA_NATIVE_HOOK_SERVERS_CHANGED,
55 PA_NATIVE_HOOK_CONNECTION_PUT,
56 PA_NATIVE_HOOK_CONNECTION_UNLINK,
57 PA_NATIVE_HOOK_MAX
58 } pa_native_hook_t;
59
60 pa_native_protocol* pa_native_protocol_get(pa_core *core);
61 pa_native_protocol* pa_native_protocol_ref(pa_native_protocol *p);
62 void pa_native_protocol_unref(pa_native_protocol *p);
63 void pa_native_protocol_connect(pa_native_protocol *p, pa_iochannel *io, pa_native_options *a);
64 void pa_native_protocol_disconnect(pa_native_protocol *p, pa_module *m);
65
66 pa_hook *pa_native_protocol_hooks(pa_native_protocol *p);
67
68 void pa_native_protocol_add_server_string(pa_native_protocol *p, const char *name);
69 void pa_native_protocol_remove_server_string(pa_native_protocol *p, const char *name);
70 pa_strlist *pa_native_protocol_servers(pa_native_protocol *p);
71
72 typedef int (*pa_native_protocol_ext_cb_t)(
73 pa_native_protocol *p,
74 pa_module *m,
75 pa_native_connection *c,
76 uint32_t tag,
77 pa_tagstruct *t);
78
79 int pa_native_protocol_install_ext(pa_native_protocol *p, pa_module *m, pa_native_protocol_ext_cb_t cb);
80 void pa_native_protocol_remove_ext(pa_native_protocol *p, pa_module *m);
81
82 pa_pstream* pa_native_connection_get_pstream(pa_native_connection *c);
83
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);
88
89 #endif