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
00030 PA_C_DECL_BEGIN
00031
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 #define PA_PROP_MEDIA_NAME "media.name"
00082 #define PA_PROP_MEDIA_TITLE "media.title"
00083 #define PA_PROP_MEDIA_ARTIST "media.artist"
00084 #define PA_PROP_MEDIA_LANGUAGE "media.language"
00085 #define PA_PROP_MEDIA_FILENAME "media.filename"
00086 #define PA_PROP_MEDIA_ICON "media.icon"
00087 #define PA_PROP_MEDIA_ICON_NAME "media.icon_name"
00088 #define PA_PROP_MEDIA_ROLE "media.role"
00089 #define PA_PROP_EVENT_ID "event.id"
00090 #define PA_PROP_EVENT_DESCRIPTION "event.description"
00091 #define PA_PROP_EVENT_MOUSE_X "event.mouse.x"
00092 #define PA_PROP_EVENT_MOUSE_Y "event.mouse.y"
00093 #define PA_PROP_EVENT_MOUSE_HPOS "event.mouse.hpos"
00094 #define PA_PROP_EVENT_MOUSE_VPOS "event.mouse.vpos"
00095 #define PA_PROP_EVENT_MOUSE_BUTTON "event.mouse.button"
00096 #define PA_PROP_WINDOW_NAME "window.name"
00097 #define PA_PROP_WINDOW_ID "window.id"
00098 #define PA_PROP_WINDOW_ICON "window.icon"
00099 #define PA_PROP_WINDOW_ICON_NAME "window.icon_name"
00100 #define PA_PROP_WINDOW_X11_DISPLAY "window.x11.display"
00101 #define PA_PROP_WINDOW_X11_SCREEN "window.x11.screen"
00102 #define PA_PROP_WINDOW_X11_MONITOR "window.x11.monitor"
00103 #define PA_PROP_WINDOW_X11_XID "window.x11.xid"
00104 #define PA_PROP_APPLICATION_NAME "application.name"
00105 #define PA_PROP_APPLICATION_ID "application.id"
00106 #define PA_PROP_APPLICATION_VERSION "application.version"
00107 #define PA_PROP_APPLICATION_ICON "application.icon"
00108 #define PA_PROP_APPLICATION_ICON_NAME "application.icon_name"
00109 #define PA_PROP_APPLICATION_LANGUAGE "application.language"
00110 #define PA_PROP_APPLICATION_PROCESS_ID "application.process.id"
00111 #define PA_PROP_APPLICATION_PROCESS_BINARY "application.process.binary"
00112 #define PA_PROP_APPLICATION_PROCESS_USER "application.process.user"
00113 #define PA_PROP_APPLICATION_PROCESS_HOST "application.process.host"
00114 #define PA_PROP_DEVICE_STRING "device.string"
00115 #define PA_PROP_DEVICE_API "device.api"
00116 #define PA_PROP_DEVICE_DESCRIPTION "device.description"
00117 #define PA_PROP_DEVICE_BUS_PATH "device.bus_path"
00118 #define PA_PROP_DEVICE_SERIAL "device.serial"
00119 #define PA_PROP_DEVICE_VENDOR_PRODUCT_ID "device.vendor_product_id"
00120 #define PA_PROP_DEVICE_CLASS "device.class"
00121 #define PA_PROP_DEVICE_FORM_FACTOR "device.form_factor"
00122 #define PA_PROP_DEVICE_CONNECTOR "device.connector"
00123 #define PA_PROP_DEVICE_ACCESS_MODE "device.access_mode"
00124 #define PA_PROP_DEVICE_MASTER_DEVICE "device.master_device"
00125 #define PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE "device.buffering.buffer_size"
00126 #define PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE "device.buffering.fragment_size"
00127
00130 typedef struct pa_proplist pa_proplist;
00131
00133 pa_proplist* pa_proplist_new(void);
00134
00136 void pa_proplist_free(pa_proplist* p);
00137
00142 int pa_proplist_sets(pa_proplist *p, const char *key, const char *value);
00143
00149 int pa_proplist_setf(pa_proplist *p, const char *key, const char *format, ...) PA_GCC_PRINTF_ATTR(3,4);
00150
00154 int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes);
00155
00156
00157
00158
00159
00160 const char *pa_proplist_gets(pa_proplist *p, const char *key);
00161
00167 int pa_proplist_get(pa_proplist *p, const char *key, const void **data, size_t *nbytes);
00168
00170 typedef enum pa_update_mode {
00171 PA_UPDATE_SET,
00172
00173
00174
00175 PA_UPDATE_MERGE,
00176
00177
00178
00179
00180 PA_UPDATE_REPLACE
00181
00182
00183
00184 } pa_update_mode_t;
00185
00188 void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, pa_proplist *other);
00189
00192 int pa_proplist_unset(pa_proplist *p, const char *key);
00193
00199 int pa_proplist_unset_many(pa_proplist *p, const char * const keys[]);
00200
00210 const char *pa_proplist_iterate(pa_proplist *p, void **state);
00211
00214 char *pa_proplist_to_string(pa_proplist *p);
00215
00218 int pa_proplist_contains(pa_proplist *p, const char *key);
00219
00221 void pa_proplist_clear(pa_proplist *p);
00222
00225 pa_proplist* pa_proplist_copy(pa_proplist *t);
00226
00227 PA_C_DECL_END
00228
00229 #endif