1 .\" $NetBSD: prop_object.3,v 1.6 2007/08/16 16:31:00 thorpej Exp $
3 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Jason R. Thorpe.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
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.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nm prop_object_retain ,
36 .Nm prop_object_release ,
37 .Nm prop_object_type ,
38 .Nm prop_object_equals ,
39 .Nm prop_object_iterator_next ,
40 .Nm prop_object_iterator_reset ,
41 .Nm prop_object_iterator_release
42 .Nd general property container object functions
49 .Fn prop_object_retain "prop_object_t obj"
51 .Fn prop_object_release "prop_object_t obj"
54 .Fn prop_object_type "prop_object_t obj"
56 .Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2"
59 .Fn prop_object_iterator_next "prop_object_iterator_t iter"
61 .Fn prop_object_iterator_reset "prop_object_iterator_t iter"
63 .Fn prop_object_iterator_release "prop_object_iterator_t iter"
67 family of functions operate on all property container object types.
69 .It Fn prop_object_retain "prop_object_t obj"
70 Increment the reference count on an object.
71 .It Fn prop_object_release "prop_object_t obj"
72 Decrement the reference count on an object.
73 If the last reference is dropped, the object is freed.
74 .It Fn prop_object_type "prop_object_t obj"
75 Determine the type of the object. Objects are one of the following types:
77 .Bl -tag -width "PROP_TYPE_DICT_KEYSYM" -compact
81 .It Dv PROP_TYPE_NUMBER
84 .It Dv PROP_TYPE_STRING
90 .It Dv PROP_TYPE_ARRAY
93 .It Dv PROP_TYPE_DICTIONARY
96 .It Dv PROP_TYPE_DICT_KEYSYM
98 .Pq prop_dictionary_keysym_t
106 .Dv PROP_TYPE_UNKNOWN
108 .It Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2"
111 if the two objects are of the same type and are equivalent.
112 .It Fn prop_object_iterator_next "prop_object_iterator_t iter"
113 Return the next object in the collection
114 .Pq array or dictionary
115 being iterated by the iterator
117 If there are no more objects in the collection,
120 .It Fn prop_object_iterator_reset "prop_object_iterator_t iter"
121 Reset the iterator to the first object in the collection being iterated
124 .It Fn prop_object_iterator_release "prop_object_iterator_t iter"
132 .Xr prop_dictionary 3 ,
139 property container object library first appeared in