PulseAudio 0.9.22-5.mga1
|
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, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00022 USA. 00023 ***/ 00024 00025 #include <sys/types.h> 00026 00027 #include <pulse/cdecl.h> 00028 #include <pulse/gccmacro.h> 00029 #include <pulse/version.h> 00030 00031 PA_C_DECL_BEGIN 00032 00034 #define PA_PROP_MEDIA_NAME "media.name" 00035 00037 #define PA_PROP_MEDIA_TITLE "media.title" 00038 00040 #define PA_PROP_MEDIA_ARTIST "media.artist" 00041 00043 #define PA_PROP_MEDIA_COPYRIGHT "media.copyright" 00044 00046 #define PA_PROP_MEDIA_SOFTWARE "media.software" 00047 00049 #define PA_PROP_MEDIA_LANGUAGE "media.language" 00050 00052 #define PA_PROP_MEDIA_FILENAME "media.filename" 00053 00056 #define PA_PROP_MEDIA_ICON "media.icon" 00057 00060 #define PA_PROP_MEDIA_ICON_NAME "media.icon_name" 00061 00063 #define PA_PROP_MEDIA_ROLE "media.role" 00064 00066 #define PA_PROP_EVENT_ID "event.id" 00067 00069 #define PA_PROP_EVENT_DESCRIPTION "event.description" 00070 00072 #define PA_PROP_EVENT_MOUSE_X "event.mouse.x" 00073 00075 #define PA_PROP_EVENT_MOUSE_Y "event.mouse.y" 00076 00078 #define PA_PROP_EVENT_MOUSE_HPOS "event.mouse.hpos" 00079 00081 #define PA_PROP_EVENT_MOUSE_VPOS "event.mouse.vpos" 00082 00084 #define PA_PROP_EVENT_MOUSE_BUTTON "event.mouse.button" 00085 00087 #define PA_PROP_WINDOW_NAME "window.name" 00088 00090 #define PA_PROP_WINDOW_ID "window.id" 00091 00094 #define PA_PROP_WINDOW_ICON "window.icon" 00095 00098 #define PA_PROP_WINDOW_ICON_NAME "window.icon_name" 00099 00101 #define PA_PROP_WINDOW_X "window.x" 00102 00104 #define PA_PROP_WINDOW_Y "window.y" 00105 00107 #define PA_PROP_WINDOW_WIDTH "window.width" 00108 00110 #define PA_PROP_WINDOW_HEIGHT "window.height" 00111 00113 #define PA_PROP_WINDOW_HPOS "window.hpos" 00114 00116 #define PA_PROP_WINDOW_VPOS "window.vpos" 00117 00119 #define PA_PROP_WINDOW_DESKTOP "window.desktop" 00120 00122 #define PA_PROP_WINDOW_X11_DISPLAY "window.x11.display" 00123 00125 #define PA_PROP_WINDOW_X11_SCREEN "window.x11.screen" 00126 00128 #define PA_PROP_WINDOW_X11_MONITOR "window.x11.monitor" 00129 00131 #define PA_PROP_WINDOW_X11_XID "window.x11.xid" 00132 00134 #define PA_PROP_APPLICATION_NAME "application.name" 00135 00137 #define PA_PROP_APPLICATION_ID "application.id" 00138 00140 #define PA_PROP_APPLICATION_VERSION "application.version" 00141 00144 #define PA_PROP_APPLICATION_ICON "application.icon" 00145 00148 #define PA_PROP_APPLICATION_ICON_NAME "application.icon_name" 00149 00151 #define PA_PROP_APPLICATION_LANGUAGE "application.language" 00152 00154 #define PA_PROP_APPLICATION_PROCESS_ID "application.process.id" 00155 00157 #define PA_PROP_APPLICATION_PROCESS_BINARY "application.process.binary" 00158 00160 #define PA_PROP_APPLICATION_PROCESS_USER "application.process.user" 00161 00163 #define PA_PROP_APPLICATION_PROCESS_HOST "application.process.host" 00164 00166 #define PA_PROP_APPLICATION_PROCESS_MACHINE_ID "application.process.machine_id" 00167 00169 #define PA_PROP_APPLICATION_PROCESS_SESSION_ID "application.process.session_id" 00170 00172 #define PA_PROP_DEVICE_STRING "device.string" 00173 00175 #define PA_PROP_DEVICE_API "device.api" 00176 00178 #define PA_PROP_DEVICE_DESCRIPTION "device.description" 00179 00181 #define PA_PROP_DEVICE_BUS_PATH "device.bus_path" 00182 00184 #define PA_PROP_DEVICE_SERIAL "device.serial" 00185 00187 #define PA_PROP_DEVICE_VENDOR_ID "device.vendor.id" 00188 00190 #define PA_PROP_DEVICE_VENDOR_NAME "device.vendor.name" 00191 00193 #define PA_PROP_DEVICE_PRODUCT_ID "device.product.id" 00194 00196 #define PA_PROP_DEVICE_PRODUCT_NAME "device.product.name" 00197 00199 #define PA_PROP_DEVICE_CLASS "device.class" 00200 00202 #define PA_PROP_DEVICE_FORM_FACTOR "device.form_factor" 00203 00205 #define PA_PROP_DEVICE_BUS "device.bus" 00206 00209 #define PA_PROP_DEVICE_ICON "device.icon" 00210 00213 #define PA_PROP_DEVICE_ICON_NAME "device.icon_name" 00214 00216 #define PA_PROP_DEVICE_ACCESS_MODE "device.access_mode" 00217 00219 #define PA_PROP_DEVICE_MASTER_DEVICE "device.master_device" 00220 00222 #define PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE "device.buffering.buffer_size" 00223 00225 #define PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE "device.buffering.fragment_size" 00226 00228 #define PA_PROP_DEVICE_PROFILE_NAME "device.profile.name" 00229 00231 #define PA_PROP_DEVICE_INTENDED_ROLES "device.intended_roles" 00232 00234 #define PA_PROP_DEVICE_PROFILE_DESCRIPTION "device.profile.description" 00235 00237 #define PA_PROP_MODULE_AUTHOR "module.author" 00238 00240 #define PA_PROP_MODULE_DESCRIPTION "module.description" 00241 00243 #define PA_PROP_MODULE_USAGE "module.usage" 00244 00246 #define PA_PROP_MODULE_VERSION "module.version" 00247 00250 typedef struct pa_proplist pa_proplist; 00251 00253 pa_proplist* pa_proplist_new(void); 00254 00256 void pa_proplist_free(pa_proplist* p); 00257 00262 int pa_proplist_sets(pa_proplist *p, const char *key, const char *value); 00263 00270 int pa_proplist_setp(pa_proplist *p, const char *pair); 00271 00277 int pa_proplist_setf(pa_proplist *p, const char *key, const char *format, ...) PA_GCC_PRINTF_ATTR(3,4); 00278 00282 int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes); 00283 00288 const char *pa_proplist_gets(pa_proplist *p, const char *key); 00289 00295 int pa_proplist_get(pa_proplist *p, const char *key, const void **data, size_t *nbytes); 00296 00298 typedef enum pa_update_mode { 00299 PA_UPDATE_SET, 00302 00303 PA_UPDATE_MERGE, 00307 00308 PA_UPDATE_REPLACE 00312 } pa_update_mode_t; 00313 00315 #define PA_UPDATE_SET PA_UPDATE_SET 00316 #define PA_UPDATE_MERGE PA_UPDATE_MERGE 00317 #define PA_UPDATE_REPLACE PA_UPDATE_REPLACE 00318 00322 void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, pa_proplist *other); 00323 00326 int pa_proplist_unset(pa_proplist *p, const char *key); 00327 00333 int pa_proplist_unset_many(pa_proplist *p, const char * const keys[]); 00334 00344 const char *pa_proplist_iterate(pa_proplist *p, void **state); 00345 00350 char *pa_proplist_to_string(pa_proplist *p); 00351 00355 char *pa_proplist_to_string_sep(pa_proplist *p, const char *sep); 00356 00359 pa_proplist *pa_proplist_from_string(const char *str); 00360 00363 int pa_proplist_contains(pa_proplist *p, const char *key); 00364 00366 void pa_proplist_clear(pa_proplist *p); 00367 00370 pa_proplist* pa_proplist_copy(pa_proplist *t); 00371 00373 unsigned pa_proplist_size(pa_proplist *t); 00374 00376 int pa_proplist_isempty(pa_proplist *t); 00377 00378 PA_C_DECL_END 00379 00380 #endif