]> code.delx.au - pulseaudio/blob - src/pulse/ext-device-manager.h
device-manager: Change the write function to a rename function.
[pulseaudio] / src / pulse / ext-device-manager.h
1 #ifndef foopulseextdevicemanagerhfoo
2 #define foopulseextdevicemanagerhfoo
3
4 /***
5 This file is part of PulseAudio.
6
7 Copyright 2008 Lennart Poettering
8 Copyright 2009 Colin Guthrie
9
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.
14
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.
19
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
23 USA.
24 ***/
25
26 #include <pulse/context.h>
27 #include <pulse/version.h>
28
29 /** \file
30 *
31 * Routines for controlling module-device-manager
32 */
33
34 PA_C_DECL_BEGIN
35
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;
42
43 /** Callback prototype for pa_ext_device_manager_test(). \since 0.9.19 */
44 typedef void (*pa_ext_device_manager_test_cb_t)(
45 pa_context *c,
46 uint32_t version,
47 void *userdata);
48
49 /** Test if this extension module is available in the server. \since 0.9.19 */
50 pa_operation *pa_ext_device_manager_test(
51 pa_context *c,
52 pa_ext_device_manager_test_cb_t cb,
53 void *userdata);
54
55 /** Callback prototype for pa_ext_device_manager_read(). \since 0.9.19 */
56 typedef void (*pa_ext_device_manager_read_cb_t)(
57 pa_context *c,
58 const pa_ext_device_manager_info *info,
59 int eol,
60 void *userdata);
61
62 /** Read all entries from the device database. \since 0.9.19 */
63 pa_operation *pa_ext_device_manager_read(
64 pa_context *c,
65 pa_ext_device_manager_read_cb_t cb,
66 void *userdata);
67
68 /** Sets the description for a device. \since 0.9.19 */
69 pa_operation *pa_ext_device_manager_set_device_description(
70 pa_context *c,
71 const char* device,
72 const char* description,
73 pa_context_success_cb_t cb,
74 void *userdata);
75
76 /** Delete entries from the device database. \since 0.9.19 */
77 pa_operation *pa_ext_device_manager_delete(
78 pa_context *c,
79 const char *const s[],
80 pa_context_success_cb_t cb,
81 void *userdata);
82
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(
85 pa_context *c,
86 int enable,
87 pa_context_success_cb_t cb,
88 void *userdata);
89
90 /** Prefer a given device in the priority list. \since 0.9.19 */
91 pa_operation *pa_ext_device_manager_prefer_device(
92 pa_context *c,
93 const char* role,
94 const char* device,
95 pa_context_success_cb_t cb,
96 void *userdata);
97
98 /** Defer a given device in the priority list. \since 0.9.19 */
99 pa_operation *pa_ext_device_manager_defer_device(
100 pa_context *c,
101 const char* role,
102 const char* device,
103 pa_context_success_cb_t cb,
104 void *userdata);
105
106 /** Subscribe to changes in the device database. \since 0.9.19 */
107 pa_operation *pa_ext_device_manager_subscribe(
108 pa_context *c,
109 int enable,
110 pa_context_success_cb_t cb,
111 void *userdata);
112
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)(
115 pa_context *c,
116 void *userdata);
117
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(
121 pa_context *c,
122 pa_ext_device_manager_subscribe_cb_t cb,
123 void *userdata);
124
125 PA_C_DECL_END
126
127 #endif