format: Export pa_format_info int and string property getters

We currently only have setters and clients need to be able to query
these values as well. The return types for these functions needed to be
changed to int since this is public API now.
This commit is contained in:
Arun Raghavan 2012-02-06 11:14:53 +05:30
parent 3927b4b607
commit 6f20d39a1c
3 changed files with 21 additions and 17 deletions

View file

@ -115,6 +115,12 @@ char *pa_format_info_snprint(char *s, size_t l, const pa_format_info *f);
* \a pa_format_info_snprint() into a pa_format_info structure. \since 1.0 */
pa_format_info* pa_format_info_from_string(const char *str);
/** Gets an integer property from the given format info. Returns 0 on success and a negative integer on failure. \since 2.0 */
int pa_format_info_get_prop_int(pa_format_info *f, const char *key, int *v);
/** Gets a string property from the given format info. The caller must free the returned string using \ref pa_xfree. Returns
* 0 on success and a negative integer on failure. \since 2.0 */
int pa_format_info_get_prop_string(pa_format_info *f, const char *key, char **v);
/** Sets an integer property on the given format info. \since 1.0 */
void pa_format_info_set_prop_int(pa_format_info *f, const char *key, int value);
/** Sets a property with a list of integer values on the given format info. \since 1.0 */