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