PulseAudio  1.1
proplist.h
Go to the documentation of this file.
1 #ifndef foopulseproplisthfoo
2 #define foopulseproplisthfoo
3 
4 /***
5  This file is part of PulseAudio.
6 
7  Copyright 2007 Lennart Poettering
8 
9  PulseAudio is free software; you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as
11  published by the Free Software Foundation; either version 2.1 of the
12  License, or (at your option) any later version.
13 
14  PulseAudio is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with PulseAudio; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22  USA.
23 ***/
24 
25 #include <sys/types.h>
26 
27 #include <pulse/cdecl.h>
28 #include <pulse/gccmacro.h>
29 #include <pulse/version.h>
30 
31 PA_C_DECL_BEGIN
32 
34 #define PA_PROP_MEDIA_NAME "media.name"
35 
37 #define PA_PROP_MEDIA_TITLE "media.title"
38 
40 #define PA_PROP_MEDIA_ARTIST "media.artist"
41 
43 #define PA_PROP_MEDIA_COPYRIGHT "media.copyright"
44 
46 #define PA_PROP_MEDIA_SOFTWARE "media.software"
47 
49 #define PA_PROP_MEDIA_LANGUAGE "media.language"
50 
52 #define PA_PROP_MEDIA_FILENAME "media.filename"
53 
56 #define PA_PROP_MEDIA_ICON "media.icon"
57 
60 #define PA_PROP_MEDIA_ICON_NAME "media.icon_name"
61 
63 #define PA_PROP_MEDIA_ROLE "media.role"
64 
66 #define PA_PROP_FILTER_WANT "filter.want"
67 
69 #define PA_PROP_FILTER_APPLY "filter.apply"
70 
72 #define PA_PROP_FILTER_SUPPRESS "filter.suppress"
73 
75 #define PA_PROP_EVENT_ID "event.id"
76 
78 #define PA_PROP_EVENT_DESCRIPTION "event.description"
79 
81 #define PA_PROP_EVENT_MOUSE_X "event.mouse.x"
82 
84 #define PA_PROP_EVENT_MOUSE_Y "event.mouse.y"
85 
87 #define PA_PROP_EVENT_MOUSE_HPOS "event.mouse.hpos"
88 
90 #define PA_PROP_EVENT_MOUSE_VPOS "event.mouse.vpos"
91 
93 #define PA_PROP_EVENT_MOUSE_BUTTON "event.mouse.button"
94 
96 #define PA_PROP_WINDOW_NAME "window.name"
97 
99 #define PA_PROP_WINDOW_ID "window.id"
100 
103 #define PA_PROP_WINDOW_ICON "window.icon"
104 
107 #define PA_PROP_WINDOW_ICON_NAME "window.icon_name"
108 
110 #define PA_PROP_WINDOW_X "window.x"
111 
113 #define PA_PROP_WINDOW_Y "window.y"
114 
116 #define PA_PROP_WINDOW_WIDTH "window.width"
117 
119 #define PA_PROP_WINDOW_HEIGHT "window.height"
120 
122 #define PA_PROP_WINDOW_HPOS "window.hpos"
123 
125 #define PA_PROP_WINDOW_VPOS "window.vpos"
126 
128 #define PA_PROP_WINDOW_DESKTOP "window.desktop"
129 
131 #define PA_PROP_WINDOW_X11_DISPLAY "window.x11.display"
132 
134 #define PA_PROP_WINDOW_X11_SCREEN "window.x11.screen"
135 
137 #define PA_PROP_WINDOW_X11_MONITOR "window.x11.monitor"
138 
140 #define PA_PROP_WINDOW_X11_XID "window.x11.xid"
141 
143 #define PA_PROP_APPLICATION_NAME "application.name"
144 
146 #define PA_PROP_APPLICATION_ID "application.id"
147 
149 #define PA_PROP_APPLICATION_VERSION "application.version"
150 
153 #define PA_PROP_APPLICATION_ICON "application.icon"
154 
157 #define PA_PROP_APPLICATION_ICON_NAME "application.icon_name"
158 
160 #define PA_PROP_APPLICATION_LANGUAGE "application.language"
161 
163 #define PA_PROP_APPLICATION_PROCESS_ID "application.process.id"
164 
166 #define PA_PROP_APPLICATION_PROCESS_BINARY "application.process.binary"
167 
169 #define PA_PROP_APPLICATION_PROCESS_USER "application.process.user"
170 
172 #define PA_PROP_APPLICATION_PROCESS_HOST "application.process.host"
173 
175 #define PA_PROP_APPLICATION_PROCESS_MACHINE_ID "application.process.machine_id"
176 
178 #define PA_PROP_APPLICATION_PROCESS_SESSION_ID "application.process.session_id"
179 
181 #define PA_PROP_DEVICE_STRING "device.string"
182 
184 #define PA_PROP_DEVICE_API "device.api"
185 
187 #define PA_PROP_DEVICE_DESCRIPTION "device.description"
188 
190 #define PA_PROP_DEVICE_BUS_PATH "device.bus_path"
191 
193 #define PA_PROP_DEVICE_SERIAL "device.serial"
194 
196 #define PA_PROP_DEVICE_VENDOR_ID "device.vendor.id"
197 
199 #define PA_PROP_DEVICE_VENDOR_NAME "device.vendor.name"
200 
202 #define PA_PROP_DEVICE_PRODUCT_ID "device.product.id"
203 
205 #define PA_PROP_DEVICE_PRODUCT_NAME "device.product.name"
206 
208 #define PA_PROP_DEVICE_CLASS "device.class"
209 
211 #define PA_PROP_DEVICE_FORM_FACTOR "device.form_factor"
212 
214 #define PA_PROP_DEVICE_BUS "device.bus"
215 
218 #define PA_PROP_DEVICE_ICON "device.icon"
219 
222 #define PA_PROP_DEVICE_ICON_NAME "device.icon_name"
223 
225 #define PA_PROP_DEVICE_ACCESS_MODE "device.access_mode"
226 
228 #define PA_PROP_DEVICE_MASTER_DEVICE "device.master_device"
229 
231 #define PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE "device.buffering.buffer_size"
232 
234 #define PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE "device.buffering.fragment_size"
235 
237 #define PA_PROP_DEVICE_PROFILE_NAME "device.profile.name"
238 
240 #define PA_PROP_DEVICE_INTENDED_ROLES "device.intended_roles"
241 
243 #define PA_PROP_DEVICE_PROFILE_DESCRIPTION "device.profile.description"
244 
246 #define PA_PROP_MODULE_AUTHOR "module.author"
247 
249 #define PA_PROP_MODULE_DESCRIPTION "module.description"
250 
252 #define PA_PROP_MODULE_USAGE "module.usage"
253 
255 #define PA_PROP_MODULE_VERSION "module.version"
256 
258 #define PA_PROP_FORMAT_SAMPLE_FORMAT "format.sample_format"
259 
261 #define PA_PROP_FORMAT_RATE "format.rate"
262 
264 #define PA_PROP_FORMAT_CHANNELS "format.channels"
265 
267 #define PA_PROP_FORMAT_CHANNEL_MAP "format.channel_map"
268 
271 typedef struct pa_proplist pa_proplist;
272 
275 
278 
283 int pa_proplist_sets(pa_proplist *p, const char *key, const char *value);
284 
291 int pa_proplist_setp(pa_proplist *p, const char *pair);
292 
298 int pa_proplist_setf(pa_proplist *p, const char *key, const char *format, ...) PA_GCC_PRINTF_ATTR(3,4);
299 
303 int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes);
304 
309 const char *pa_proplist_gets(pa_proplist *p, const char *key);
310 
316 int pa_proplist_get(pa_proplist *p, const char *key, const void **data, size_t *nbytes);
317 
319 typedef enum pa_update_mode {
323 
328 
334 
336 #define PA_UPDATE_SET PA_UPDATE_SET
337 #define PA_UPDATE_MERGE PA_UPDATE_MERGE
338 #define PA_UPDATE_REPLACE PA_UPDATE_REPLACE
339 
344 
347 int pa_proplist_unset(pa_proplist *p, const char *key);
348 
354 int pa_proplist_unset_many(pa_proplist *p, const char * const keys[]);
355 
365 const char *pa_proplist_iterate(pa_proplist *p, void **state);
366 
372 
376 char *pa_proplist_to_string_sep(pa_proplist *p, const char *sep);
377 
380 pa_proplist *pa_proplist_from_string(const char *str);
381 
384 int pa_proplist_contains(pa_proplist *p, const char *key);
385 
388 
392 
394 unsigned pa_proplist_size(pa_proplist *t);
395 
398 
402 
403 PA_C_DECL_END
404 
405 #endif