node-manager: adding support for pulse ext api to manage nodes
[profile/ivi/pulseaudio-module-murphy-ivi.git] / murphy / userdata.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 foouserdatafoo
21 #define foouserdatafoo
22
23 #include <stdbool.h>
24 #include <pulsecore/core.h>
25 #include <pulsecore/protocol-native.h>
26
27 #include "multiplex.h"
28 #include "loopback.h"
29
30 #define DIM(a) (sizeof(a)/sizeof((a)[0]))
31
32 #define PA_PROP_ROUTING_CLASS_NAME     "routing.class.name"
33 #define PA_PROP_ROUTING_CLASS_ID       "routing.class.id"
34 #define PA_PROP_ROUTING_METHOD         "routing.method"
35 #define PA_PROP_ROUTING_TABLE          "routing.table"
36 #define PA_PROP_NODE_INDEX             "node.index"
37
38 #define PA_ROUTING_DEFAULT             "default"
39 #define PA_ROUTING_EXPLICIT            "explicit"
40
41 typedef struct pa_card                  pa_card;
42 typedef struct pa_sink                  pa_sink;
43
44 typedef struct pa_null_sink             pa_null_sink;
45 typedef struct pa_tracker               pa_tracker;
46 typedef struct pa_audiomgr              pa_audiomgr;
47 typedef struct pa_routerif              pa_routerif;
48 typedef struct pa_discover              pa_discover;
49 typedef struct pa_router                pa_router;
50 typedef struct pa_constrain             pa_constrain;
51 typedef struct pa_fader                 pa_fader;
52 typedef struct pa_scripting             pa_scripting;
53 typedef struct pa_mir_volume            pa_mir_volume;
54 typedef struct pa_mir_config            pa_mir_config;
55 typedef struct pa_nodeset               pa_nodeset;
56 typedef struct pa_node_card             pa_node_card;
57 typedef struct pa_card_hooks            pa_card_hooks;
58 typedef struct pa_port_hooks            pa_port_hooks;
59 typedef struct pa_sink_hooks            pa_sink_hooks;
60 typedef struct pa_source_hooks          pa_source_hooks;
61 typedef struct pa_sink_input_hooks      pa_sink_input_hooks;
62 typedef struct pa_source_output_hooks   pa_source_output_hooks;
63 typedef struct pa_extapi                pa_extapi;
64
65 typedef enum   mir_direction            mir_direction;
66 typedef enum   mir_implement            mir_implement;
67 typedef enum   mir_location             mir_location;
68 typedef enum   mir_node_type            mir_node_type;
69 typedef enum   mir_privacy              mir_privacy; 
70 typedef struct mir_node                 mir_node;
71 typedef struct mir_rtgroup              mir_rtgroup;
72 typedef struct mir_rtentry              mir_rtentry;
73 typedef struct mir_connection           mir_connection;
74 typedef struct mir_constr_link          mir_constr_link;
75 typedef struct mir_constr_def           mir_constr_def;
76 typedef struct mir_vlim                 mir_vlim;
77 typedef struct mir_volume_suppress_arg  mir_volume_suppress_arg;
78
79 typedef struct scripting_node           scripting_node;
80 typedef struct scripting_rtgroup        scripting_rtgroup;
81 typedef struct scripting_apclass        scripting_apclass;
82 typedef struct scripting_vollim         scripting_vollim;
83
84 typedef enum   am_method                am_method;
85 typedef struct am_domainreg_data        am_domainreg_data;
86 typedef struct am_nodereg_data          am_nodereg_data;
87 typedef struct am_nodeunreg_data        am_nodeunreg_data;
88 typedef struct am_ack_data              am_ack_data;
89 typedef struct am_connect_data          am_connect_data;
90
91
92
93 typedef struct {
94     char *profile;    /**< During profile change it contains the new profile
95                            name. Otherwise it is NULL. When sink tracking
96                            hooks called the card's active_profile still
97                            points to the old profile */
98     uint32_t sink;
99     uint32_t source;
100 } pa_mir_state;
101
102
103 struct userdata {
104     pa_core       *core;
105     pa_module     *module;
106     pa_null_sink  *nullsink;
107     pa_nodeset    *nodeset;
108     pa_audiomgr   *audiomgr;
109     pa_routerif   *routerif;
110     pa_discover   *discover;
111     pa_tracker    *tracker;
112     pa_router     *router;
113     pa_constrain  *constrain;
114     pa_multiplex  *multiplex;
115     pa_loopback   *loopback;
116     pa_fader      *fader;
117     pa_scripting  *scripting;
118     pa_mir_volume *volume;
119     pa_mir_config *config;
120     pa_mir_state   state;
121     pa_extapi     *extapi;
122     pa_native_protocol *protocol;
123 };
124
125 #endif
126
127 /*
128  * Local Variables:
129  * c-basic-offset: 4
130  * indent-tabs-mode: nil
131  * End:
132  *
133  */