router: add missing accessor
[staging/agl-audio-plugin.git] / config.h
1 /*
2  * module-agl-audio -- PulseAudio module for providing audio routing support
3  * (forked from "module-murphy-ivi" - https://github.com/otcshare )
4  * Copyright (c) 2012, Intel Corporation.
5  * Copyright (c) 2016, IoT.bzh
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms and conditions of the GNU Lesser General Public License,
9  * version 2.1, as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston,
19  * MA 02110-1301 USA.
20  *
21  */
22 #ifndef paaglconfig
23 #define paaglconfig
24
25 #include "userdata.h"
26 #include "router.h"
27
28  /* ZONES ("driver", "passenger1"...) */
29 typedef struct {
30         const char *name;
31 } zone_def;
32
33  /* ROUTING GROUPS ("default" card, "phone" card...) */
34 typedef struct {
35         agl_direction type;             /* agl_input/agl_output */
36         const char *name;
37         const char *node_desc;
38         agl_rtgroup_accept_t accept;
39         agl_rtgroup_effect_t effect;
40 } rtgroup_def;
41
42  /* CLASS MAP (agl_phone="phone" card routing group...) */
43 typedef struct {
44         agl_node_type class;            /* agl_device/agl_stream */
45         uint32_t zone;
46         agl_direction type;             /* agl_input/agl_output */
47         const char *rtgroup;
48 } classmap_def;
49
50  /* TYPE MAP ("event"=agl_event, "music"=agl_player...) */
51 typedef struct {
52         const char *id;
53         agl_node_type type;
54 } typemap_def;
55
56  /* PRIORITY MAP (agl_event=5, agl_phone=4, [...] agl_player=1...) */
57 typedef struct {
58         agl_node_type class;
59         int priority;
60 } prior_def;
61
62 const char *agl_config_file_get_path (const char *, const char *, char *, size_t);
63 bool agl_config_parse_file (struct userdata *, const char *);
64 bool agl_config_dofile (struct userdata *, const char *);
65
66 #endif