7 This file is part of PulseAudio.
9 Copyright 2004-2006 Lennart Poettering
11 PulseAudio is free software; you can redistribute it and/or modify
12 it under the terms of the GNU Lesser General Public License as published
13 by the Free Software Foundation; either version 2 of the License,
14 or (at your option) any later version.
16 PulseAudio is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with PulseAudio; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 #include <pulsecore/core.h>
28 #include <pulsecore/strbuf.h>
30 /* The property subsystem is to be used to share data between
31 * modules. Consider them to be kind of "global" variables for a
32 * core. Why not use the hashmap functions directly? The hashmap
33 * functions copy neither the key nor value, while this property
34 * system copies the key. Users of this system have to think about
35 * reference counting themselves. */
37 /* Return a pointer to the value of the specified property. */
38 void* pa_property_get(pa_core *c, const char *name);
40 /* Set the property 'name' to 'data'. This function fails in case a
41 * property by this name already exists. The property data is not
42 * copied or reference counted. This is the caller's job. */
43 int pa_property_set(pa_core *c, const char *name, void *data);
45 /* Remove the specified property. Return non-zero on failure */
46 int pa_property_remove(pa_core *c, const char *name);
48 /* A combination of pa_property_remove() and pa_property_set() */
49 int pa_property_replace(pa_core *c, const char *name, void *data);
51 /* Free all memory used by the property system */
52 void pa_property_cleanup(pa_core *c);
54 /* Initialize the properties subsystem */
55 void pa_property_init(pa_core *c);
57 /* Dump the current set of properties */
58 void pa_property_dump(pa_core *c, pa_strbuf *s);