murphyif: Free the connect timer when unloading
[profile/ivi/pulseaudio-module-murphy-ivi.git] / murphy / loopback.h
1 /*
2  * module-murphy-ivi -- PulseAudio module for providing audio routing support
3  * Copyright (c) 2012, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU Lesser General Public License,
7  * version 2.1, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston,
17  * MA 02110-1301 USA.
18  *
19  */
20 #ifndef fooloopbackfoo
21 #define fooloopbackfoo
22
23 #include <pulsecore/core.h>
24 #include <pulsecore/sink-input.h>
25
26 #include "list.h"
27
28 typedef struct pa_loopnode pa_loopnode;
29
30 typedef enum {
31     PA_LOOPBACK_TYPE_UNKNOWN = 0,
32     PA_LOOPBACK_SOURCE,
33     PA_LOOPBACK_SINK,
34 } pa_loopback_type;
35
36 typedef struct pa_loopback {
37     PA_LLIST_HEAD(pa_loopnode, loopnodes);
38 } pa_loopback;
39
40
41 struct pa_loopnode {
42     PA_LLIST_FIELDS(pa_loopnode);
43     uint32_t   module_index;
44     uint32_t   node_index;
45     uint32_t   sink_input_index;
46     uint32_t   source_output_index;
47 };
48
49 pa_loopback *pa_loopback_init(void);
50
51 void pa_loopback_done(pa_loopback *, pa_core *);
52
53 pa_loopnode *pa_loopback_create(pa_loopback *, pa_core *, pa_loopback_type,
54                                 uint32_t, uint32_t, uint32_t, const char *,
55                                 uint32_t, uint32_t, uint32_t);
56 void pa_loopback_destroy(pa_loopback *, pa_core *, pa_loopnode *);
57
58 uint32_t pa_loopback_get_sink_index(pa_core *, pa_loopnode *);
59
60 int pa_loopback_print(pa_loopnode *, char *, int);
61
62
63 #endif /* fooloopbackfoo */
64
65 /*
66  * Local Variables:
67  * c-basic-offset: 4
68  * indent-tabs-mode: nil
69  * End:
70  *
71  */