00001 #ifndef foopulseproplisthfoo
00002 #define foopulseproplisthfoo
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 #define PA_PROP_MEDIA_NAME "media.name"
00086 #define PA_PROP_MEDIA_TITLE "media.title"
00087 #define PA_PROP_MEDIA_ARTIST "media.artist"
00088 #define PA_PROP_MEDIA_LANGUAGE "media.language"
00089 #define PA_PROP_MEDIA_FILENAME "media.filename"
00090 #define PA_PROP_MEDIA_ICON "media.icon"
00091 #define PA_PROP_MEDIA_ICON_NAME "media.icon_name"
00092 #define PA_PROP_MEDIA_ROLE "media.role"
00093 #define PA_PROP_EVENT_ID "event.id"
00094 #define PA_PROP_EVENT_DESCRIPTION "event.description"
00095 #define PA_PROP_EVENT_MOUSE_X "event.mouse.x"
00096 #define PA_PROP_EVENT_MOUSE_Y "event.mouse.y"
00097 #define PA_PROP_EVENT_MOUSE_HPOS "event.mouse.hpos"
00098 #define PA_PROP_EVENT_MOUSE_VPOS "event.mouse.vpos"
00099 #define PA_PROP_EVENT_MOUSE_BUTTON "event.mouse.button"
00100 #define PA_PROP_WINDOW_NAME "window.name"
00101 #define PA_PROP_WINDOW_ID "window.id"
00102 #define PA_PROP_WINDOW_ICON "window.icon"
00103 #define PA_PROP_WINDOW_ICON_NAME "window.icon_name"
00104 #define PA_PROP_WINDOW_X11_DISPLAY "window.x11.display"
00105 #define PA_PROP_WINDOW_X11_SCREEN "window.x11.screen"
00106 #define PA_PROP_WINDOW_X11_MONITOR "window.x11.monitor"
00107 #define PA_PROP_WINDOW_X11_XID "window.x11.xid"
00108 #define PA_PROP_APPLICATION_NAME "application.name"
00109 #define PA_PROP_APPLICATION_ID "application.id"
00110 #define PA_PROP_APPLICATION_VERSION "application.version"
00111 #define PA_PROP_APPLICATION_ICON "application.icon"
00112 #define PA_PROP_APPLICATION_ICON_NAME "application.icon_name"
00113 #define PA_PROP_APPLICATION_LANGUAGE "application.language"
00114 #define PA_PROP_APPLICATION_PROCESS_ID "application.process.id"
00115 #define PA_PROP_APPLICATION_PROCESS_BINARY "application.process.binary"
00116 #define PA_PROP_APPLICATION_PROCESS_USER "application.process.user"
00117 #define PA_PROP_APPLICATION_PROCESS_HOST "application.process.host"
00118 #define PA_PROP_APPLICATION_PROCESS_MACHINE_ID "application.process.machine_id"
00119 #define PA_PROP_DEVICE_STRING "device.string"
00120 #define PA_PROP_DEVICE_API "device.api"
00121 #define PA_PROP_DEVICE_DESCRIPTION "device.description"
00122 #define PA_PROP_DEVICE_BUS_PATH "device.bus_path"
00123 #define PA_PROP_DEVICE_SERIAL "device.serial"
00124 #define PA_PROP_DEVICE_VENDOR_PRODUCT_ID "device.vendor_product_id"
00125 #define PA_PROP_DEVICE_CLASS "device.class"
00126 #define PA_PROP_DEVICE_FORM_FACTOR "device.form_factor"
00127 #define PA_PROP_DEVICE_CONNECTOR "device.connector"
00128 #define PA_PROP_DEVICE_ACCESS_MODE "device.access_mode"
00129 #define PA_PROP_DEVICE_MASTER_DEVICE "device.master_device"
00130 #define PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE "device.buffering.buffer_size"
00131 #define PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE "device.buffering.fragment_size"
00132 #define PA_PROP_DEVICE_PROFILE_NAME "device.profile.name"
00133 #define PA_PROP_DEVICE_PROFILE_DESCRIPTION "device.profile.description"
00134 #define PA_PROP_MODULE_AUTHOR "module.author"
00135 #define PA_PROP_MODULE_DESCRIPTION "module.description"
00136 #define PA_PROP_MODULE_USAGE "module.usage"
00137 #define PA_PROP_MODULE_VERSION "module.version"
00138
00141 typedef struct pa_proplist pa_proplist;
00142
00144 pa_proplist* pa_proplist_new(void);
00145
00147 void pa_proplist_free(pa_proplist* p);
00148
00153 int pa_proplist_sets(pa_proplist *p, const char *key, const char *value);
00154
00160 int pa_proplist_setf(pa_proplist *p, const char *key, const char *format, ...) PA_GCC_PRINTF_ATTR(3,4);
00161
00165 int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes);
00166
00171 const char *pa_proplist_gets(pa_proplist *p, const char *key);
00172
00178 int pa_proplist_get(pa_proplist *p, const char *key, const void **data, size_t *nbytes);
00179
00181 typedef enum pa_update_mode {
00182 PA_UPDATE_SET,
00183
00184
00185
00186 PA_UPDATE_MERGE,
00187
00188
00189
00190
00191 PA_UPDATE_REPLACE
00192
00193
00194
00195 } pa_update_mode_t;
00196
00198 #define PA_UPDATE_SET PA_UPDATE_SET
00199 #define PA_UPDATE_MERGE PA_UPDATE_MERGE
00200 #define PA_UPDATE_REPLACE PA_UPDATE_REPLACE
00201
00205 void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, pa_proplist *other);
00206
00209 int pa_proplist_unset(pa_proplist *p, const char *key);
00210
00216 int pa_proplist_unset_many(pa_proplist *p, const char * const keys[]);
00217
00227 const char *pa_proplist_iterate(pa_proplist *p, void **state);
00228
00233 char *pa_proplist_to_string(pa_proplist *p);
00234
00238 char *pa_proplist_to_string_sep(pa_proplist *p, const char *sep);
00239
00242 pa_proplist *pa_proplist_from_string(const char *str);
00243
00246 int pa_proplist_contains(pa_proplist *p, const char *key);
00247
00249 void pa_proplist_clear(pa_proplist *p);
00250
00253 pa_proplist* pa_proplist_copy(pa_proplist *t);
00254
00256 unsigned pa_proplist_size(pa_proplist *t);
00257
00259 int pa_proplist_isempty(pa_proplist *t);
00260
00261 PA_C_DECL_END
00262
00263 #endif