2 * module-murphy-ivi -- PulseAudio module for providing audio routing support
3 * Copyright (c) 2012, Intel Corporation.
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.
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.
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,
20 #ifndef fooaudiomgrfoo
21 #define fooaudiomgrfoo
26 #include <dbus/dbus.h>
27 typedef dbus_bool_t am_bool_t;
28 typedef dbus_int16_t am_int16_t;
29 typedef dbus_uint16_t am_uint16_t;
30 typedef dbus_int32_t am_int32_t;
31 typedef dbus_uint32_t am_uint32_t;
34 typedef bool am_bool_t;
35 typedef int16_t am_int16_t;
36 typedef uint16_t am_uint16_t;
37 typedef int32_t am_int32_t;
38 typedef uint32_t am_uint32_t;
45 #define E_OUT_OF_RANGE 2
47 #define E_DATABSE_ERROR 4
48 #define E_ALREADY_EXISTS 5
50 #define E_NOT_POSSIBLE 7
51 #define E_NON_EXISTENT 8
53 #define E_WRONG_FORMAT 10
57 struct am_domainreg_data {
58 am_uint16_t domain_id;
59 const char *name; /**< domain name in audio manager */
60 const char *bus_name; /**< audio manager's internal bus name
61 (not to confuse this with D-Bus name) */
62 const char *node_name; /**< node name on audio manager's internal bus*/
68 struct am_nodereg_data {
69 const char *key; /* for node lookup's */
74 am_uint16_t state; /* 1=on, 2=off */
78 am_int16_t status; /* 1=available, 2=unavailable */
79 am_int16_t reason; /* 1=newmedia, 2=same media, 3=nomedia */
83 am_uint16_t interrupt; /* 1=off, 2=interrupted */
86 struct am_nodeunreg_data {
92 struct am_connect_data {
94 am_uint16_t connection;
108 pa_audiomgr *pa_audiomgr_init(struct userdata *);
109 void pa_audiomgr_done(struct userdata *);
111 void pa_audiomgr_register_domain(struct userdata *);
112 void pa_audiomgr_domain_registered(struct userdata *, uint16_t, uint16_t,
113 am_domainreg_data *);
115 void pa_audiomgr_unregister_domain(struct userdata *, pa_bool_t);
118 void pa_audiomgr_register_node(struct userdata *, mir_node *);
119 void pa_audiomgr_node_registered(struct userdata *, uint16_t, uint16_t,
122 void pa_audiomgr_unregister_node(struct userdata *, mir_node *);
123 void pa_audiomgr_node_unregistered(struct userdata *, am_nodeunreg_data *);
125 void pa_audiomgr_connect(struct userdata *, am_connect_data *);
126 void pa_audiomgr_disconnect(struct userdata *, am_connect_data *);
134 * indent-tabs-mode: nil