router: get routing group from classmap
[staging/agl-audio-plugin.git] / userdata.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 paagluserdata
23 #define paagluserdata
24
25 #include <pulsecore/pulsecore-config.h> /* required for "core.h" and "module.h" */
26 #include <pulsecore/core.h>
27 #include <pulsecore/module.h>
28
29 #define AM_ID_INVALID 65535             /* invalid state in several places */
30
31
32 typedef struct agl_null_sink agl_null_sink;
33 typedef struct agl_zoneset agl_zoneset;
34 typedef struct agl_nodeset agl_nodeset;
35 typedef struct agl_audiomgr agl_audiomgr;
36 typedef struct agl_routerif agl_routerif;
37 typedef struct agl_router agl_router;
38 typedef struct agl_discover agl_discover;
39 typedef struct agl_tracker agl_tracker;
40
41 typedef struct agl_nodeset_resdef agl_nodeset_resdef;
42 typedef struct agl_nodeset_map agl_nodeset_map;
43 typedef struct agl_node_card agl_node_card;
44 typedef struct agl_node_rset agl_node_rset;
45
46 typedef struct pa_card_hooks pa_card_hooks;
47 typedef struct pa_port_hooks pa_port_hooks;
48 typedef struct pa_sink_hooks pa_sink_hooks;
49 typedef struct pa_source_hooks pa_source_hooks;
50 typedef struct pa_sink_input_hooks pa_sink_input_hooks;
51 typedef struct pa_source_output_hooks pa_source_output_hooks;
52
53 typedef struct agl_zone agl_zone;
54 typedef struct agl_node agl_node;
55 typedef struct agl_rtgroup agl_rtgroup;
56 typedef struct agl_connection agl_connection;
57
58 typedef struct {
59     char *profile;
60     uint32_t sink;
61     uint32_t source;
62 } pa_agl_state;
63
64 struct userdata {
65         pa_core       *core;
66         pa_module     *module;
67         char          *nsnam;
68         agl_zoneset    *zoneset;
69         agl_nodeset    *nodeset;
70         agl_audiomgr   *audiomgr;
71         agl_routerif   *routerif;
72         agl_router     *router;
73         agl_discover   *discover;
74         agl_tracker    *tracker;
75         pa_agl_state state;
76 };
77
78  /* application classes */
79 typedef enum agl_node_type {
80         agl_node_type_unknown = 0,
81
82         agl_application_class_begin,
83         agl_radio = agl_application_class_begin,
84         agl_player,
85         agl_navigator,
86         agl_game,
87         agl_browser,
88         agl_camera,
89         agl_phone,                  /**< telephony voice */
90         agl_alert,                  /**< ringtone, alarm */
91         agl_event,                  /**< notifications */
92         agl_system,                 /**< always audible system notifications, events */
93         agl_application_class_end,
94 } agl_node_type;
95
96 typedef enum agl_direction {
97         agl_direction_unknown = 0,
98         agl_input,
99         agl_output
100 } agl_direction;
101
102 typedef enum agl_implement {
103         agl_implementation_unknown = 0,
104         agl_device,
105         agl_stream
106 } agl_implement;
107
108 typedef enum agl_location {
109         agl_location_unknown = 0,
110         agl_internal,
111         agl_external
112 } agl_location;
113
114 typedef enum agl_privacy {
115         agl_privacy_unknown = 0,
116         agl_public,
117         agl_private
118 } agl_privacy;
119
120 #endif