Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

proplib(3) [netbsd man page]

PROPLIB(3)						   BSD Library Functions Manual 						PROPLIB(3)

NAME
proplib -- property container object library LIBRARY
Property Container Object Library (libprop, -lprop) SYNOPSIS
#include <prop/proplib.h> DESCRIPTION
The proplib library provides an abstract interface for creating and manipulating property lists. Property lists have object types for bool- ean values, opaque data, numbers, and strings. Structure is provided by the array and dictionary collection types. Property lists can be passed across protection boundaries by translating them to an external representation. This external representation is an XML document whose format is described by the following DTD: http://www.apple.com/DTDs/PropertyList-1.0.dtd Property container objects are reference counted. When an object is created, its reference count is set to 1. Any code that keeps a refer- ence to an object, including the collection types (arrays and dictionaries), must ``retain'' the object (increment its reference count). When that reference is dropped, the object must be ``released'' (reference count decremented). When an object's reference count drops to 0, it is automatically freed. The rules for managing reference counts are very simple: o If you create an object and do not explicitly maintain a reference to it, you must release it. o If you get a reference to an object from other code and wish to maintain a reference to it, you must retain the object. You are respon- sible for releasing the object once you drop that reference. o You must never release an object unless you create it or retain it. Object collections may be iterated by creating a special iterator object. Iterator objects are special; they may not be retained, and they are released using an iterator-specific release function. SEE ALSO
prop_array(3), prop_bool(3), prop_data(3), prop_dictionary(3), prop_dictionary_util(3), prop_number(3), prop_object(3), prop_send_ioctl(3), prop_send_syscall(3), prop_string(3) HISTORY
The proplib property container object library first appeared in NetBSD 4.0. CAVEATS
proplib does not have a 'date' object type, and thus will not parse 'date' elements from an Apple XML property list. The proplib 'number' object type differs from the Apple XML property list format in the following ways: o The external representation is in base 16, not base 10. proplib is able to parse base 8, base 10, and base 16 'integer' elements. o Internally, integers are always stored as unsigned numbers (uint64_t). Therefore, the external representation will never be negative. o Because floating point numbers are not supported, 'real' elements from an Apple XML property list will not be parsed. In order to facilitate use of proplib in kernel, standalone, and user space environments, the proplib parser is not a real XML parser. It is hard-coded to parse only the property list external representation. BSD
January 17, 2011 BSD

Check Out this Related Man Page

PROP_OBJECT(3)						   BSD Library Functions Manual 					    PROP_OBJECT(3)

NAME
prop_object, prop_object_retain, prop_object_release, prop_object_type, prop_object_equals, prop_object_iterator_next, prop_object_iterator_reset, prop_object_iterator_release -- general property container object functions LIBRARY
Property Container Object Library (libprop, -lprop) SYNOPSIS
#include <prop/proplib.h> void prop_object_retain(prop_object_t obj); void prop_object_release(prop_object_t obj); prop_type_t prop_object_type(prop_object_t obj); bool prop_object_equals(prop_object_t obj1, prop_object_t obj2); prop_object_t prop_object_iterator_next(prop_object_iterator_t iter); void prop_object_iterator_reset(prop_object_iterator_t iter); void prop_object_iterator_release(prop_object_iterator_t iter); DESCRIPTION
The prop_object family of functions operate on all property container object types. prop_object_retain(prop_object_t obj) Increment the reference count on an object. prop_object_release(prop_object_t obj) Decrement the reference count on an object. If the last reference is dropped, the object is freed. prop_object_type(prop_object_t obj) Determine the type of the object. Objects are one of the following types: PROP_TYPE_BOOL Boolean value (prop_bool_t) PROP_TYPE_NUMBER Number (prop_number_t) PROP_TYPE_STRING String (prop_string_t) PROP_TYPE_DATA Opaque data (prop_data_t) PROP_TYPE_ARRAY Array (prop_array_t) PROP_TYPE_DICTIONARY Dictionary (prop_dictionary_t) PROP_TYPE_DICT_KEYSYM Dictionary key symbol (prop_dictionary_keysym_t) If obj is NULL, then PROP_TYPE_UNKNOWN is returned. prop_object_equals(prop_object_t obj1, prop_object_t obj2) Returns true if the two objects are of the same type and are equivalent. prop_object_iterator_next(prop_object_iterator_t iter) Return the next object in the collection (array or dictionary) being iterated by the iterator iter. If there are no more objects in the collection, NULL is returned. prop_object_iterator_reset(prop_object_iterator_t iter) Reset the iterator to the first object in the collection being iterated by the iterator iter. prop_object_iterator_release(prop_object_iterator_t iter) Release the iterator iter. SEE ALSO
prop_array(3), prop_bool(3), prop_data(3), prop_dictionary(3), prop_number(3), prop_string(3), proplib(3) HISTORY
The proplib property container object library first appeared in NetBSD 4.0. BSD
August 21, 2006 BSD
Man Page