|
PulseAudio
9.0
|
00001 #ifndef foopulseproplisthfoo 00002 #define foopulseproplisthfoo 00003 00004 /*** 00005 This file is part of PulseAudio. 00006 00007 Copyright 2007 Lennart Poettering 00008 00009 PulseAudio is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU Lesser General Public License as 00011 published by the Free Software Foundation; either version 2.1 of the 00012 License, or (at your option) any later version. 00013 00014 PulseAudio is distributed in the hope that it will be useful, but 00015 WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public 00020 License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. 00021 ***/ 00022 00023 #include <sys/types.h> 00024 00025 #include <pulse/cdecl.h> 00026 #include <pulse/gccmacro.h> 00027 #include <pulse/version.h> 00028 00032 PA_C_DECL_BEGIN 00033 00035 #define PA_PROP_MEDIA_NAME "media.name" 00036 00038 #define PA_PROP_MEDIA_TITLE "media.title" 00039 00041 #define PA_PROP_MEDIA_ARTIST "media.artist" 00042 00044 #define PA_PROP_MEDIA_COPYRIGHT "media.copyright" 00045 00047 #define PA_PROP_MEDIA_SOFTWARE "media.software" 00048 00050 #define PA_PROP_MEDIA_LANGUAGE "media.language" 00051 00053 #define PA_PROP_MEDIA_FILENAME "media.filename" 00054 00057 #define PA_PROP_MEDIA_ICON "media.icon" 00058 00061 #define PA_PROP_MEDIA_ICON_NAME "media.icon_name" 00062 00064 #define PA_PROP_MEDIA_ROLE "media.role" 00065 00067 #define PA_PROP_FILTER_WANT "filter.want" 00068 00070 #define PA_PROP_FILTER_APPLY "filter.apply" 00071 00073 #define PA_PROP_FILTER_SUPPRESS "filter.suppress" 00074 00076 #define PA_PROP_EVENT_ID "event.id" 00077 00079 #define PA_PROP_EVENT_DESCRIPTION "event.description" 00080 00082 #define PA_PROP_EVENT_MOUSE_X "event.mouse.x" 00083 00085 #define PA_PROP_EVENT_MOUSE_Y "event.mouse.y" 00086 00088 #define PA_PROP_EVENT_MOUSE_HPOS "event.mouse.hpos" 00089 00091 #define PA_PROP_EVENT_MOUSE_VPOS "event.mouse.vpos" 00092 00094 #define PA_PROP_EVENT_MOUSE_BUTTON "event.mouse.button" 00095 00097 #define PA_PROP_WINDOW_NAME "window.name" 00098 00100 #define PA_PROP_WINDOW_ID "window.id" 00101 00104 #define PA_PROP_WINDOW_ICON "window.icon" 00105 00108 #define PA_PROP_WINDOW_ICON_NAME "window.icon_name" 00109 00111 #define PA_PROP_WINDOW_X "window.x" 00112 00114 #define PA_PROP_WINDOW_Y "window.y" 00115 00117 #define PA_PROP_WINDOW_WIDTH "window.width" 00118 00120 #define PA_PROP_WINDOW_HEIGHT "window.height" 00121 00123 #define PA_PROP_WINDOW_HPOS "window.hpos" 00124 00126 #define PA_PROP_WINDOW_VPOS "window.vpos" 00127 00129 #define PA_PROP_WINDOW_DESKTOP "window.desktop" 00130 00132 #define PA_PROP_WINDOW_X11_DISPLAY "window.x11.display" 00133 00135 #define PA_PROP_WINDOW_X11_SCREEN "window.x11.screen" 00136 00138 #define PA_PROP_WINDOW_X11_MONITOR "window.x11.monitor" 00139 00141 #define PA_PROP_WINDOW_X11_XID "window.x11.xid" 00142 00144 #define PA_PROP_APPLICATION_NAME "application.name" 00145 00147 #define PA_PROP_APPLICATION_ID "application.id" 00148 00150 #define PA_PROP_APPLICATION_VERSION "application.version" 00151 00154 #define PA_PROP_APPLICATION_ICON "application.icon" 00155 00158 #define PA_PROP_APPLICATION_ICON_NAME "application.icon_name" 00159 00161 #define PA_PROP_APPLICATION_LANGUAGE "application.language" 00162 00164 #define PA_PROP_APPLICATION_PROCESS_ID "application.process.id" 00165 00167 #define PA_PROP_APPLICATION_PROCESS_BINARY "application.process.binary" 00168 00170 #define PA_PROP_APPLICATION_PROCESS_USER "application.process.user" 00171 00173 #define PA_PROP_APPLICATION_PROCESS_HOST "application.process.host" 00174 00176 #define PA_PROP_APPLICATION_PROCESS_MACHINE_ID "application.process.machine_id" 00177 00179 #define PA_PROP_APPLICATION_PROCESS_SESSION_ID "application.process.session_id" 00180 00182 #define PA_PROP_DEVICE_STRING "device.string" 00183 00185 #define PA_PROP_DEVICE_API "device.api" 00186 00188 #define PA_PROP_DEVICE_DESCRIPTION "device.description" 00189 00191 #define PA_PROP_DEVICE_BUS_PATH "device.bus_path" 00192 00194 #define PA_PROP_DEVICE_SERIAL "device.serial" 00195 00197 #define PA_PROP_DEVICE_VENDOR_ID "device.vendor.id" 00198 00200 #define PA_PROP_DEVICE_VENDOR_NAME "device.vendor.name" 00201 00203 #define PA_PROP_DEVICE_PRODUCT_ID "device.product.id" 00204 00206 #define PA_PROP_DEVICE_PRODUCT_NAME "device.product.name" 00207 00209 #define PA_PROP_DEVICE_CLASS "device.class" 00210 00212 #define PA_PROP_DEVICE_FORM_FACTOR "device.form_factor" 00213 00215 #define PA_PROP_DEVICE_BUS "device.bus" 00216 00219 #define PA_PROP_DEVICE_ICON "device.icon" 00220 00223 #define PA_PROP_DEVICE_ICON_NAME "device.icon_name" 00224 00226 #define PA_PROP_DEVICE_ACCESS_MODE "device.access_mode" 00227 00229 #define PA_PROP_DEVICE_MASTER_DEVICE "device.master_device" 00230 00232 #define PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE "device.buffering.buffer_size" 00233 00235 #define PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE "device.buffering.fragment_size" 00236 00238 #define PA_PROP_DEVICE_PROFILE_NAME "device.profile.name" 00239 00241 #define PA_PROP_DEVICE_INTENDED_ROLES "device.intended_roles" 00242 00244 #define PA_PROP_DEVICE_PROFILE_DESCRIPTION "device.profile.description" 00245 00247 #define PA_PROP_MODULE_AUTHOR "module.author" 00248 00250 #define PA_PROP_MODULE_DESCRIPTION "module.description" 00251 00253 #define PA_PROP_MODULE_USAGE "module.usage" 00254 00256 #define PA_PROP_MODULE_VERSION "module.version" 00257 00259 #define PA_PROP_FORMAT_SAMPLE_FORMAT "format.sample_format" 00260 00262 #define PA_PROP_FORMAT_RATE "format.rate" 00263 00265 #define PA_PROP_FORMAT_CHANNELS "format.channels" 00266 00268 #define PA_PROP_FORMAT_CHANNEL_MAP "format.channel_map" 00269 00272 typedef struct pa_proplist pa_proplist; 00273 00275 pa_proplist* pa_proplist_new(void); 00276 00278 void pa_proplist_free(pa_proplist* p); 00279 00281 int pa_proplist_key_valid(const char *key); 00282 00287 int pa_proplist_sets(pa_proplist *p, const char *key, const char *value); 00288 00295 int pa_proplist_setp(pa_proplist *p, const char *pair); 00296 00302 int pa_proplist_setf(pa_proplist *p, const char *key, const char *format, ...) PA_GCC_PRINTF_ATTR(3,4); 00303 00307 int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes); 00308 00313 const char *pa_proplist_gets(pa_proplist *p, const char *key); 00314 00320 int pa_proplist_get(pa_proplist *p, const char *key, const void **data, size_t *nbytes); 00321 00323 typedef enum pa_update_mode { 00324 PA_UPDATE_SET, 00327 00328 PA_UPDATE_MERGE, 00332 00333 PA_UPDATE_REPLACE 00337 } pa_update_mode_t; 00338 00340 #define PA_UPDATE_SET PA_UPDATE_SET 00341 #define PA_UPDATE_MERGE PA_UPDATE_MERGE 00342 #define PA_UPDATE_REPLACE PA_UPDATE_REPLACE 00343 00347 void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, const pa_proplist *other); 00348 00351 int pa_proplist_unset(pa_proplist *p, const char *key); 00352 00358 int pa_proplist_unset_many(pa_proplist *p, const char * const keys[]); 00359 00369 const char *pa_proplist_iterate(pa_proplist *p, void **state); 00370 00375 char *pa_proplist_to_string(pa_proplist *p); 00376 00380 char *pa_proplist_to_string_sep(pa_proplist *p, const char *sep); 00381 00384 pa_proplist *pa_proplist_from_string(const char *str); 00385 00388 int pa_proplist_contains(pa_proplist *p, const char *key); 00389 00391 void pa_proplist_clear(pa_proplist *p); 00392 00395 pa_proplist* pa_proplist_copy(const pa_proplist *p); 00396 00398 unsigned pa_proplist_size(pa_proplist *p); 00399 00401 int pa_proplist_isempty(pa_proplist *p); 00402 00405 int pa_proplist_equal(pa_proplist *a, pa_proplist *b); 00406 00407 PA_C_DECL_END 00408 00409 #endif