prop_dictionary_t
prop_dictionary_create(
void
)
prop_dictionary_t
prop_dictionary_create_with_capacity(
unsigned int capacity
)
prop_dictionary_t
prop_dictionary_copy(
prop_dictionary_t dict
)
prop_dictionary_t
prop_dictionary_copy_mutable(
prop_dictionary_t dict
)
unsigned
int
prop_dictionary_count(
prop_dictionary_t dict
)
bool
prop_dictionary_ensure_capacity(
prop_dictionary_t dict
, unsigned int capacity
)
prop_object_iterator_t
prop_dictionary_iterator(
prop_dictionary_t dict
)
prop_array_t
prop_dictionary_all_keys(
prop_dictionary_t dict
)
void
prop_dictionary_make_immutable(
prop_dictionary_t dict
)
bool
prop_dictionary_mutable(
prop_dictionary_t dict
)
prop_object_t
prop_dictionary_get(
prop_dictionary_t dict
, const char *key
)
bool
prop_dictionary_set(
prop_dictionary_t dict
, const char *key
, prop_object_t obj
)
void
prop_dictionary_remove(
prop_dictionary_t dict
, const char *key
)
prop_object_t
prop_dictionary_get_keysym(
prop_dictionary_t dict
, prop_dictionary_keysym_t keysym
)
bool
prop_dictionary_set_keysym(
prop_dictionary_t dict
, prop_dictionary_keysym_t keysym
, prop_object_t obj
)
void
prop_dictionary_remove_keysym(
prop_dictionary_t dict
, prop_dictionary_keysym_t keysym
)
bool
prop_dictionary_equals(
prop_dictionary_t dict1
, prop_dictionary_t dict2
)
const
char
*
prop_dictionary_keysym_cstring_nocopy(
prop_dictionary_keysym_t sym
)
bool
prop_dictionary_keysym_equals(
prop_dictionary_keysym_t keysym1
, prop_dictionary_keysym_t keysym2
)
char
*
prop_dictionary_externalize(
prop_dictionary_t dict
)
prop_dictionary_t
prop_dictionary_internalize(
const char *xml
)
bool
prop_dictionary_externalize_to_file(
prop_dictionary_t dict
, const char *path
)
prop_dictionary_t
prop_dictionary_internalize_from_file(
const char *path
)
void
)
NULL
on failure.
unsigned int capacity
)
capacity
objects.
Returns
NULL
on failure.
prop_dictionary_t dict
)
prop_dictionary_t dict
)
),
except the resulting dictionary is always mutable.
prop_dictionary_t dict
)
prop_dictionary_t dict
)
capacity
,
including objects already stored in the dictionary.
Returns
true
if the capacity of the dictionary is greater or equal to
capacity
or if the expansion of the dictionary's capacity was successful
and
false
otherwise.
If the supplied object isn't a dictionary,
false
is returned.
prop_dictionary_t dict
)
NULL
on failure.
prop_dictionary_t dict
)
NULL
on failure.
prop_dictionary_t dict
)
dict
immutable.
prop_dictionary_t dict
)
true
if the dictionary is mutable.
prop_dictionary_t dict
, const char *key
)
key
.
If no object is stored with the specified key,
NULL
is returned.
prop_dictionary_t dict
, const char *key
, prop_object_t obj
)
obj
with the key
key
.
The object will be retained by the dictionary.
If the key already exists in the dictionary, the object associated with
that key will be released and replaced with the new object.
Returns
true
if storing the object was successful and
false
otherwise.
prop_dictionary_t dict
, const char *key
)
key
.
The object will be released.
prop_dictionary_t dict
, prop_dictionary_keysym_t sym
)
),
but the lookup is performed using a key symbol returned by a dictionary
iterator.
The results are undefined if the iterator used to obtain the key symbol
is not associated with
dict
.
prop_dictionary_t dict
, prop_dictionary_keysym_t sym
, prop_object_t obj
)
),
but the lookup of the object to replace is performed using a key symbol
returned by a dictionary iterator.
The results are undefined if the iterator used to obtain the key symbol
is not associated with
dict
.
prop_dictionary_t dict
, prop_dictionary_keysym_t sym
)
),
but the lookup of the object to remove is performed using a key symbol
returned by a dictionary iterator.
The results are undefined if the iterator used to obtain the key symbol
is not associated with
dict
.
prop_dictionary_t dict1
, prop_dictionary_t dict2
)
true
if the two dictionaries are equivalent.
Note: Objects contained in the dictionary are compared by value, not by
reference.
prop_dictionary_keysym_t keysym
)
prop_dictionary_keysym_t keysym1
, prop_dictionary_keysym_t keysym2
)
true
if the two dictionary key symbols are equivalent.
prop_dictionary_t dict
)
NULL
is returned.
In user space, the buffer is allocated using
malloc(3).
In the kernel, the buffer is allocated using
malloc(9)
using the malloc type
M_TEMP
.
const char *xml
)
xml
and return the corresponding dictionary.
Returns
NULL
if parsing fails for any reason.
prop_dictionary_t dict
, const char *path
)
path
.
The file is saved with the mode
0666
as modified by the process's file creation mask
(seeumask(3))
and is written atomically.
Returns
false
if externalizing or writing the dictionary fails for any reason.
const char *path
)
path
,
internalizes it, and returns the corresponding array.
Returns
NULL
on failure.