1 #ifndef foopulseextdevicemanagerhfoo
2 #define foopulseextdevicemanagerhfoo
5 This file is part of PulseAudio.
7 Copyright 2008 Lennart Poettering
8 Copyright 2009 Colin Guthrie
10 PulseAudio is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published
12 by the Free Software Foundation; either version 2.1 of the License,
13 or (at your option) any later version.
15 PulseAudio is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with PulseAudio; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 #include <pulse/context.h>
27 #include <pulse/version.h>
31 * Routines for controlling module-device-manager
36 /** Stores information about one device in the device database that is
37 * maintained by module-device-manager. \since 0.9.19 */
38 typedef struct pa_ext_device_manager_info
{
39 const char *name
; /**< Identifier string of the device. A string like "sink:" or similar followed by the name of the device. */
40 const char *description
; /**< The description of the device when it was last seen, if applicable and saved */
41 } pa_ext_device_manager_info
;
43 /** Callback prototype for pa_ext_device_manager_test(). \since 0.9.19 */
44 typedef void (*pa_ext_device_manager_test_cb_t
)(
49 /** Test if this extension module is available in the server. \since 0.9.19 */
50 pa_operation
*pa_ext_device_manager_test(
52 pa_ext_device_manager_test_cb_t cb
,
55 /** Callback prototype for pa_ext_device_manager_read(). \since 0.9.19 */
56 typedef void (*pa_ext_device_manager_read_cb_t
)(
58 const pa_ext_device_manager_info
*info
,
62 /** Read all entries from the device database. \since 0.9.19 */
63 pa_operation
*pa_ext_device_manager_read(
65 pa_ext_device_manager_read_cb_t cb
,
68 /** Sets the description for a device. \since 0.9.19 */
69 pa_operation
*pa_ext_device_manager_set_device_description(
72 const char* description
,
73 pa_context_success_cb_t cb
,
76 /** Delete entries from the device database. \since 0.9.19 */
77 pa_operation
*pa_ext_device_manager_delete(
79 const char *const s
[],
80 pa_context_success_cb_t cb
,
83 /** Enable the role-based device-priority routing mode. \since 0.9.19 */
84 pa_operation
*pa_ext_device_manager_enable_role_device_priority_routing(
87 pa_context_success_cb_t cb
,
90 /** Prefer a given device in the priority list. \since 0.9.19 */
91 pa_operation
*pa_ext_device_manager_prefer_device(
95 pa_context_success_cb_t cb
,
98 /** Defer a given device in the priority list. \since 0.9.19 */
99 pa_operation
*pa_ext_device_manager_defer_device(
103 pa_context_success_cb_t cb
,
106 /** Subscribe to changes in the device database. \since 0.9.19 */
107 pa_operation
*pa_ext_device_manager_subscribe(
110 pa_context_success_cb_t cb
,
113 /** Callback prototype for pa_ext_device_manager_set_subscribe_cb(). \since 0.9.19 */
114 typedef void (*pa_ext_device_manager_subscribe_cb_t
)(
118 /** Set the subscription callback that is called when
119 * pa_ext_device_manager_subscribe() was called. \since 0.9.19 */
120 void pa_ext_device_manager_set_subscribe_cb(
122 pa_ext_device_manager_subscribe_cb_t cb
,