PulseAudio  11.0
ext-device-manager.h
Go to the documentation of this file.
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, see <http://www.gnu.org/licenses/>.
22 ***/
23 
24 #include <pulse/cdecl.h>
25 #include <pulse/context.h>
26 #include <pulse/version.h>
27 
33 PA_C_DECL_BEGIN
34 
35 /* Don't extend this struct! It will break binary compatibility, because
36  * pa_ext_device_manager_info.role_priorities points to an array of structs
37  * instead of an array of pointers to structs. */
39  const char *role;
40  uint32_t priority;
42 
46  const char *name;
47  const char *description;
48  const char *icon;
49  uint32_t index;
50  uint32_t n_role_priorities;
53 
56  pa_context *c,
57  uint32_t version,
58  void *userdata);
59 
62  pa_context *c,
64  void *userdata);
65 
68  pa_context *c,
69  const pa_ext_device_manager_info *info,
70  int eol,
71  void *userdata);
72 
75  pa_context *c,
77  void *userdata);
78 
81  pa_context *c,
82  const char* device,
83  const char* description,
85  void *userdata);
86 
89  pa_context *c,
90  const char *const s[],
92  void *userdata);
93 
96  pa_context *c,
97  int enable,
99  void *userdata);
100 
103  pa_context *c,
104  const char* role,
105  const char** devices,
107  void *userdata);
108 
111  pa_context *c,
112  int enable,
114  void *userdata);
115 
118  pa_context *c,
119  void *userdata);
120 
124  pa_context *c,
126  void *userdata);
127 
128 PA_C_DECL_END
129 
130 #endif
pa_operation * pa_ext_device_manager_set_device_description(pa_context *c, const char *device, const char *description, pa_context_success_cb_t cb, void *userdata)
Sets the description for a device.
struct pa_context pa_context
An opaque connection context to a daemon.
Definition: context.h:154
uint32_t index
The device index if it is currently available or PA_INVALID_INDEX.
Definition: ext-device-manager.h:49
Connection contexts for asynchronous communication with a server.
struct pa_ext_device_manager_info pa_ext_device_manager_info
Stores information about one device in the device database that is maintained by module-device-manage...
pa_operation * pa_ext_device_manager_test(pa_context *c, pa_ext_device_manager_test_cb_t cb, void *userdata)
Test if this extension module is available in the server.
struct pa_operation pa_operation
An asynchronous operation object.
Definition: operation.h:33
const char * description
The description of the device when it was last seen, if applicable and saved.
Definition: ext-device-manager.h:47
void(* pa_context_success_cb_t)(pa_context *c, int success, void *userdata)
A generic callback for operation completion.
Definition: context.h:160
pa_operation * pa_ext_device_manager_subscribe(pa_context *c, int enable, pa_context_success_cb_t cb, void *userdata)
Subscribe to changes in the device database.
pa_operation * pa_ext_device_manager_enable_role_device_priority_routing(pa_context *c, int enable, pa_context_success_cb_t cb, void *userdata)
Enable the role-based device-priority routing mode.
pa_operation * pa_ext_device_manager_read(pa_context *c, pa_ext_device_manager_read_cb_t cb, void *userdata)
Read all entries from the device database.
pa_operation * pa_ext_device_manager_delete(pa_context *c, const char *const s[], pa_context_success_cb_t cb, void *userdata)
Delete entries from the device database.
const char * icon
The icon given to the device.
Definition: ext-device-manager.h:48
struct pa_ext_device_manager_role_priority_info pa_ext_device_manager_role_priority_info
Stores information about one device in the device database that is maintained by module-device-manage...
Definition: ext-device-manager.h:45
const char * role
Definition: ext-device-manager.h:39
Definition: ext-device-manager.h:38
Define header version.
uint32_t n_role_priorities
How many role priorities do we have?
Definition: ext-device-manager.h:50
uint32_t priority
Definition: ext-device-manager.h:40
void(* pa_ext_device_manager_read_cb_t)(pa_context *c, const pa_ext_device_manager_info *info, int eol, void *userdata)
Callback prototype for pa_ext_device_manager_read().
Definition: ext-device-manager.h:67
pa_ext_device_manager_role_priority_info * role_priorities
An array of role priority structures or NULL.
Definition: ext-device-manager.h:51
void(* pa_ext_device_manager_test_cb_t)(pa_context *c, uint32_t version, void *userdata)
Callback prototype for pa_ext_device_manager_test().
Definition: ext-device-manager.h:55
void(* pa_ext_device_manager_subscribe_cb_t)(pa_context *c, void *userdata)
Callback prototype for pa_ext_device_manager_set_subscribe_cb().
Definition: ext-device-manager.h:117
void pa_ext_device_manager_set_subscribe_cb(pa_context *c, pa_ext_device_manager_subscribe_cb_t cb, void *userdata)
Set the subscription callback that is called when pa_ext_device_manager_subscribe() was called...
pa_operation * pa_ext_device_manager_reorder_devices_for_role(pa_context *c, const char *role, const char **devices, pa_context_success_cb_t cb, void *userdata)
Prefer a given device in the priority list.
const char * name
Identifier string of the device.
Definition: ext-device-manager.h:46