| PROP_DICTIONARY(3) | Library Functions Manual | PROP_DICTIONARY(3) | 
prop_dictionary,
  prop_dictionary_create,
  prop_dictionary_create_with_capacity,
  prop_dictionary_copy,
  prop_dictionary_copy_mutable,
  prop_dictionary_count,
  prop_dictionary_ensure_capacity,
  prop_dictionary_iterator,
  prop_dictionary_all_keys,
  prop_dictionary_make_immutable,
  prop_dictionary_mutable,
  prop_dictionary_get,
  prop_dictionary_set,
  prop_dictionary_remove,
  prop_dictionary_get_keysym,
  prop_dictionary_set_keysym,
  prop_dictionary_remove_keysym,
  prop_dictionary_externalize,
  prop_dictionary_internalize,
  prop_dictionary_externalize_to_file,
  prop_dictionary_internalize_from_file,
  prop_dictionary_externalize_to_pref,
  prop_dictionary_internalize_from_pref,
  prop_dictionary_equals,
  prop_dictionary_keysym_cstring_nocopy,
  prop_dictionary_keysym_equals —
#include <prop/proplib.h>
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);
bool
  
  prop_dictionary_externalize_to_pref(prop_dictionary_t
    dict, struct plistref
    *pref);
bool
  
  prop_dictionary_internalize_from_pref(const
    struct plistref *pref,
    prop_dictionary_t
    *dictp);
prop_dictionary() family of functions operate on the
  dictionary property collection object type. A dictionary is an unordered set
  of objects stored as key-value pairs.
prop_dictionary_create(void)NULL on failure.prop_dictionary_create_with_capacity(unsigned
    int capacity)NULL on failure.prop_dictionary_copy(prop_dictionary_t
    dict)prop_dictionary_copy_mutable(prop_dictionary_t
    dict)prop_dictionary_copy(), except the resulting
      dictionary is always mutable.prop_dictionary_count(prop_dictionary_t
    dict)prop_dictionary_ensure_capacity(prop_dictionary_t
    dict, unsigned int capacity)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_iterator(prop_dictionary_t
    dict)NULL on failure.prop_dictionary_all_keys(prop_dictionary_t
    dict)NULL on failure.prop_dictionary_make_immutable(prop_dictionary_t
    dict)prop_dictionary_mutable(prop_dictionary_t
    dict)true if the dictionary is mutable.prop_dictionary_get(prop_dictionary_t
    dict, const char *key)NULL is returned.prop_dictionary_set(prop_dictionary_t
    dict, const char *key,
    prop_object_t obj)true if storing the object was successful and
      false otherwise.prop_dictionary_remove(prop_dictionary_t
    dict, const char *key)prop_dictionary_get_keysym(prop_dictionary_t
    dict, prop_dictionary_keysym_t sym)prop_dictionary_get(), 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_set_keysym(prop_dictionary_t
    dict, prop_dictionary_keysym_t sym,
    prop_object_t obj)prop_dictionary_set(), 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_remove_keysym(prop_dictionary_t
    dict, prop_dictionary_keysym_t sym)prop_dictionary_remove(), 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_equals(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_cstring_nocopy(prop_dictionary_keysym_t
    keysym)prop_dictionary_keysym_equals(prop_dictionary_keysym_t
    keysym1, prop_dictionary_keysym_t keysym2)true if the two dictionary key symbols are
      equivalent.prop_dictionary_externalize(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.
prop_dictionary_internalize(const
    char *xml)NULL if parsing fails for any reason.prop_dictionary_externalize_to_file(prop_dictionary_t
    dict, const char *path)0666 as modified by the process's file creation
      mask (see umask(2)) and is
      written atomically. Returns false if externalizing
      or writing the dictionary fails for any reason.prop_dictionary_internalize_from_file(const
    char *path)NULL on failure.prop_dictionary_externalize_to_pref(prop_dictionary_t
    dict, struct plistref *pref)false if
      externalizing the dictionary fails for any reason.prop_dictionary_internalize_from_pref(const
    struct plistref *pref, prop_dictionary_t
    *dictp)false if internalizing or writing the dictionary
      fails for any reason.| December 5, 2009 | NetBSD 9.3 |