proplist.h File Reference

Go to the source code of this file.

Defines

#define PA_PROP_MEDIA_NAME   "media.name"
#define PA_PROP_MEDIA_TITLE   "media.title"
#define PA_PROP_MEDIA_ARTIST   "media.artist"
#define PA_PROP_MEDIA_LANGUAGE   "media.language"
#define PA_PROP_MEDIA_FILENAME   "media.filename"
#define PA_PROP_MEDIA_ICON   "media.icon"
#define PA_PROP_MEDIA_ICON_NAME   "media.icon_name"
#define PA_PROP_MEDIA_ROLE   "media.role"
#define PA_PROP_EVENT_ID   "event.id"
#define PA_PROP_EVENT_DESCRIPTION   "event.description"
#define PA_PROP_EVENT_MOUSE_X   "event.mouse.x"
#define PA_PROP_EVENT_MOUSE_Y   "event.mouse.y"
#define PA_PROP_EVENT_MOUSE_HPOS   "event.mouse.hpos"
#define PA_PROP_EVENT_MOUSE_VPOS   "event.mouse.vpos"
#define PA_PROP_EVENT_MOUSE_BUTTON   "event.mouse.button"
#define PA_PROP_WINDOW_NAME   "window.name"
#define PA_PROP_WINDOW_ID   "window.id"
#define PA_PROP_WINDOW_ICON   "window.icon"
#define PA_PROP_WINDOW_ICON_NAME   "window.icon_name"
#define PA_PROP_WINDOW_X11_DISPLAY   "window.x11.display"
#define PA_PROP_WINDOW_X11_SCREEN   "window.x11.screen"
#define PA_PROP_WINDOW_X11_MONITOR   "window.x11.monitor"
#define PA_PROP_WINDOW_X11_XID   "window.x11.xid"
#define PA_PROP_APPLICATION_NAME   "application.name"
#define PA_PROP_APPLICATION_ID   "application.id"
#define PA_PROP_APPLICATION_VERSION   "application.version"
#define PA_PROP_APPLICATION_ICON   "application.icon"
#define PA_PROP_APPLICATION_ICON_NAME   "application.icon_name"
#define PA_PROP_APPLICATION_LANGUAGE   "application.language"
#define PA_PROP_APPLICATION_PROCESS_ID   "application.process.id"
#define PA_PROP_APPLICATION_PROCESS_BINARY   "application.process.binary"
#define PA_PROP_APPLICATION_PROCESS_USER   "application.process.user"
#define PA_PROP_APPLICATION_PROCESS_HOST   "application.process.host"
#define PA_PROP_DEVICE_STRING   "device.string"
#define PA_PROP_DEVICE_API   "device.api"
#define PA_PROP_DEVICE_DESCRIPTION   "device.description"
#define PA_PROP_DEVICE_BUS_PATH   "device.bus_path"
#define PA_PROP_DEVICE_SERIAL   "device.serial"
#define PA_PROP_DEVICE_VENDOR_PRODUCT_ID   "device.vendor_product_id"
#define PA_PROP_DEVICE_CLASS   "device.class"
#define PA_PROP_DEVICE_FORM_FACTOR   "device.form_factor"
#define PA_PROP_DEVICE_CONNECTOR   "device.connector"
#define PA_PROP_DEVICE_ACCESS_MODE   "device.access_mode"
#define PA_PROP_DEVICE_MASTER_DEVICE   "device.master_device"
#define PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE   "device.buffering.buffer_size"
#define PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE   "device.buffering.fragment_size"

Typedefs

typedef struct pa_proplist pa_proplist
 A property list object.
typedef enum pa_update_mode pa_update_mode_t
 Update mode enum for pa_proplist_update().

Enumerations

enum  pa_update_mode {
  PA_UPDATE_SET,
  PA_UPDATE_MERGE,
  PA_UPDATE_REPLACE
}
 Update mode enum for pa_proplist_update(). More...

Functions

pa_proplistpa_proplist_new (void)
 Allocate a property list.
void pa_proplist_free (pa_proplist *p)
 Free the property list.
int pa_proplist_sets (pa_proplist *p, const char *key, const char *value)
 Append a new string entry to the property list, possibly overwriting an already existing entry with the same key.
int pa_proplist_setf (pa_proplist *p, const char *key, const char *format,...) PA_GCC_PRINTF_ATTR(3
 Append a new string entry to the property list, possibly overwriting an already existing entry with the same key.
int int pa_proplist_set (pa_proplist *p, const char *key, const void *data, size_t nbytes)
 Append a new arbitrary data entry to the property list, possibly overwriting an already existing entry with the same key.
const char * pa_proplist_gets (pa_proplist *p, const char *key)
int pa_proplist_get (pa_proplist *p, const char *key, const void **data, size_t *nbytes)
 Return the the value for the specified key.
void pa_proplist_update (pa_proplist *p, pa_update_mode_t mode, pa_proplist *other)
 Merge property list "other" into "p", adhering the merge mode as specified in "mode".
int pa_proplist_unset (pa_proplist *p, const char *key)
 Removes a single entry from the property list, identified be the specified key name.
int pa_proplist_unset_many (pa_proplist *p, const char *const keys[])
 Similar to pa_proplist_remove() but takes an array of keys to remove.
const char * pa_proplist_iterate (pa_proplist *p, void **state)
 Iterate through the property list.
char * pa_proplist_to_string (pa_proplist *p)
 Format the property list nicely as a human readable string.
int pa_proplist_contains (pa_proplist *p, const char *key)
 Returns 1 if an entry for the specified key is existant in the property list.
void pa_proplist_clear (pa_proplist *p)
 Remove all entries from the property list object.
pa_proplistpa_proplist_copy (pa_proplist *t)
 Allocate a new property list and copy over every single entry from the specific list.


Define Documentation

#define PA_PROP_APPLICATION_ICON   "application.icon"

#define PA_PROP_APPLICATION_ICON_NAME   "application.icon_name"

#define PA_PROP_APPLICATION_ID   "application.id"

#define PA_PROP_APPLICATION_LANGUAGE   "application.language"

#define PA_PROP_APPLICATION_NAME   "application.name"

#define PA_PROP_APPLICATION_PROCESS_BINARY   "application.process.binary"

#define PA_PROP_APPLICATION_PROCESS_HOST   "application.process.host"

#define PA_PROP_APPLICATION_PROCESS_ID   "application.process.id"

#define PA_PROP_APPLICATION_PROCESS_USER   "application.process.user"

#define PA_PROP_APPLICATION_VERSION   "application.version"

#define PA_PROP_DEVICE_ACCESS_MODE   "device.access_mode"

#define PA_PROP_DEVICE_API   "device.api"

#define PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE   "device.buffering.buffer_size"

#define PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE   "device.buffering.fragment_size"

#define PA_PROP_DEVICE_BUS_PATH   "device.bus_path"

#define PA_PROP_DEVICE_CLASS   "device.class"

#define PA_PROP_DEVICE_CONNECTOR   "device.connector"

#define PA_PROP_DEVICE_DESCRIPTION   "device.description"

#define PA_PROP_DEVICE_FORM_FACTOR   "device.form_factor"

#define PA_PROP_DEVICE_MASTER_DEVICE   "device.master_device"

#define PA_PROP_DEVICE_SERIAL   "device.serial"

#define PA_PROP_DEVICE_STRING   "device.string"

#define PA_PROP_DEVICE_VENDOR_PRODUCT_ID   "device.vendor_product_id"

#define PA_PROP_EVENT_DESCRIPTION   "event.description"

#define PA_PROP_EVENT_ID   "event.id"

#define PA_PROP_EVENT_MOUSE_BUTTON   "event.mouse.button"

#define PA_PROP_EVENT_MOUSE_HPOS   "event.mouse.hpos"

#define PA_PROP_EVENT_MOUSE_VPOS   "event.mouse.vpos"

#define PA_PROP_EVENT_MOUSE_X   "event.mouse.x"

#define PA_PROP_EVENT_MOUSE_Y   "event.mouse.y"

#define PA_PROP_MEDIA_ARTIST   "media.artist"

#define PA_PROP_MEDIA_FILENAME   "media.filename"

#define PA_PROP_MEDIA_ICON   "media.icon"

#define PA_PROP_MEDIA_ICON_NAME   "media.icon_name"

#define PA_PROP_MEDIA_LANGUAGE   "media.language"

#define PA_PROP_MEDIA_NAME   "media.name"

#define PA_PROP_MEDIA_ROLE   "media.role"

#define PA_PROP_MEDIA_TITLE   "media.title"

#define PA_PROP_WINDOW_ICON   "window.icon"

#define PA_PROP_WINDOW_ICON_NAME   "window.icon_name"

#define PA_PROP_WINDOW_ID   "window.id"

#define PA_PROP_WINDOW_NAME   "window.name"

#define PA_PROP_WINDOW_X11_DISPLAY   "window.x11.display"

#define PA_PROP_WINDOW_X11_MONITOR   "window.x11.monitor"

#define PA_PROP_WINDOW_X11_SCREEN   "window.x11.screen"

#define PA_PROP_WINDOW_X11_XID   "window.x11.xid"


Typedef Documentation

typedef struct pa_proplist pa_proplist

A property list object.

Basically a dictionary with UTF-8 strings as keys and arbitrary data as values.

Since:
0.9.11

Update mode enum for pa_proplist_update().

Since:
0.9.11


Enumeration Type Documentation

Update mode enum for pa_proplist_update().

Since:
0.9.11
Enumerator:
PA_UPDATE_SET 
PA_UPDATE_MERGE 
PA_UPDATE_REPLACE 


Function Documentation

void pa_proplist_clear ( pa_proplist p  ) 

Remove all entries from the property list object.

Since:
0.9.11

int pa_proplist_contains ( pa_proplist p,
const char *  key 
)

Returns 1 if an entry for the specified key is existant in the property list.

Since:
0.9.11

pa_proplist* pa_proplist_copy ( pa_proplist t  ) 

Allocate a new property list and copy over every single entry from the specific list.

Since:
0.9.11

void pa_proplist_free ( pa_proplist p  ) 

Free the property list.

Since:
0.9.11

int pa_proplist_get ( pa_proplist p,
const char *  key,
const void **  data,
size_t *  nbytes 
)

Return the the value for the specified key.

Will return a NUL-terminated string for string entries. The pointer returned will point to an internally allocated buffer. The caller should make a copy of the data before the property list is accessed again.

Since:
0.9.11

const char* pa_proplist_gets ( pa_proplist p,
const char *  key 
)

const char* pa_proplist_iterate ( pa_proplist p,
void **  state 
)

Iterate through the property list.

The user should allocate a state variable of type void* and initialize it with NULL. A pointer to this variable should then be passed to pa_proplist_iterate() which should be called in a loop until it returns NULL which signifies EOL. The property list should not be modified during iteration through the list -- except for deleting the current looked at entry. On each invication this function will return the key string for the next entry. The keys in the property list do not have any particular order.

Since:
0.9.11

pa_proplist* pa_proplist_new ( void   ) 

Allocate a property list.

Since:
0.9.11

int int pa_proplist_set ( pa_proplist p,
const char *  key,
const void *  data,
size_t  nbytes 
)

Append a new arbitrary data entry to the property list, possibly overwriting an already existing entry with the same key.

An internal copy of the data passed is made.

Since:
0.9.11

int pa_proplist_setf ( pa_proplist p,
const char *  key,
const char *  format,
  ... 
)

Append a new string entry to the property list, possibly overwriting an already existing entry with the same key.

An internal copy of the data passed is made. Will accept only valid UTF-8. The data can be passed as printf()-style format string with arguments.

Since:
0.9.11

int pa_proplist_sets ( pa_proplist p,
const char *  key,
const char *  value 
)

Append a new string entry to the property list, possibly overwriting an already existing entry with the same key.

An internal copy of the data passed is made. Will accept only valid UTF-8.

Since:
0.9.11

char* pa_proplist_to_string ( pa_proplist p  ) 

Format the property list nicely as a human readable string.

Call pa_xfree() on the result.

Since:
0.9.11

int pa_proplist_unset ( pa_proplist p,
const char *  key 
)

Removes a single entry from the property list, identified be the specified key name.

Since:
0.9.11

int pa_proplist_unset_many ( pa_proplist p,
const char *const   keys[] 
)

Similar to pa_proplist_remove() but takes an array of keys to remove.

The array should be terminated by a NULL pointer. Return -1 on failure, otherwise the number of entries actually removed (which might even be 0, if there where no matching entries to remove).

Since:
0.9.11

void pa_proplist_update ( pa_proplist p,
pa_update_mode_t  mode,
pa_proplist other 
)

Merge property list "other" into "p", adhering the merge mode as specified in "mode".

Since:
0.9.11


Generated on Sat Mar 14 08:08:28 2009 for PulseAudio by  doxygen 1.5.6