1.\" $NetBSD: prop_object.3,v 1.2 2006/05/18 03:05:19 thorpej Exp $ 2.\" 3.\" Copyright (c) 2006 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Jason R. Thorpe. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. All advertising materials mentioning features or use of this software 18.\" must display the following acknowledgement: 19.\" This product includes software developed by the NetBSD 20.\" Foundation, Inc. and its contributors. 21.\" 4. Neither the name of The NetBSD Foundation nor the names of its 22.\" contributors may be used to endorse or promote products derived 23.\" from this software without specific prior written permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35.\" POSSIBILITY OF SUCH DAMAGE. 36.\" 37.Dd April 22, 2006 38.Dt PROP_OBJECT 3 39.Os 40.Sh NAME 41.Nm prop_object , 42.Nm prop_object_retain , 43.Nm prop_object_release , 44.Nm prop_object_type , 45.Nm prop_object_equals , 46.Nm prop_object_iterator_next , 47.Nm prop_object_iterator_reset , 48.Nm prop_object_iterator_release 49.Nd general property container object functions 50.Sh LIBRARY 51.Lb libprop 52.Sh SYNOPSIS 53.In prop/proplib.h 54.\" 55.Ft void 56.Fn prop_object_retain "prop_object_t obj" 57.Ft void 58.Fn prop_object_release "prop_object_t obj" 59.\" 60.Ft prop_type_t 61.Fn prop_object_type "prop_object_t obj" 62.Ft boolean_t 63.Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2" 64.\" 65.Ft prop_object_t 66.Fn prop_object_iterator_next "prop_object_iterator_t iter" 67.Ft void 68.Fn prop_object_iterator_reset "prop_object_iterator_t iter" 69.Ft void 70.Fn prop_object_iterator_release "prop_object_iterator_t iter" 71.Sh DESCRIPTION 72The 73.Nm prop_object 74family of functions operate on all property container object types. 75.Bl -tag -width "" 76.It Fn prop_object_retain "prop_object_t obj" 77Increment the reference count on an object. 78.It Fn prop_object_release "prop_object_t obj" 79Decrement the reference count on an object. 80If the last reference is dropped, the object is freed. 81.It Fn prop_object_type "prop_object_t obj" 82Determine the type of the object. Objects are one of the following types: 83.Pp 84.Bl -tag -width "PROP_TYPE_DICT_KEYSYM" -compact 85.It Dv PROP_TYPE_BOOL 86Boolean value 87.Pq prop_bool_t 88.It Dv PROP_TYPE_NUMBER 89Number 90.Pq prop_number_t 91.It Dv PROP_TYPE_STRING 92String 93.Pq prop_string_t 94.It Dv PROP_TYPE_DATA 95Opaque data 96.Pq prop_data_t 97.It Dv PROP_TYPE_ARRAY 98Array 99.Pq prop_array_t 100.It Dv PROP_TYPE_DICTIONARY 101Dictionary 102.Pq prop_dictionary_t 103.It Dv PROP_TYPE_DICT_KEYSYM 104Dictionary key symbol 105.Pq prop_dictionary_keysym_t 106.El 107.It Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2" 108Returns 109.Dv TRUE 110if the two objects are of the same type and are equivalent. 111.It Fn prop_object_iterator_next "prop_object_iterator_t iter" 112Return the next object in the collection 113.Pq array or dictionary 114being iterated by the iterator 115.Fa iter . 116If there are no more objects in the collection, 117.Dv NULL 118is returned. 119.It Fn prop_object_iterator_reset "prop_object_iterator_t iter" 120Reset the iterator to the first object in the collection being iterated 121by the iterator 122.Fa iter . 123.It Fn prop_object_iterator_release "prop_object_iterator_t iter" 124Release the iterator 125.Fa iter . 126.El 127.Sh SEE ALSO 128.Xr prop_array 3 , 129.Xr prop_bool 3 , 130.Xr prop_data 3 , 131.Xr prop_dictionary 3 , 132.Xr prop_number 3 , 133.Xr prop_string 3 , 134.Xr proplib 3 135.Sh HISTORY 136The 137.Nm proplib 138property container object library first appeared in 139.Nx 4.0 . 140