1 .\" $NetBSD: prop_object.3,v 1.8 2011/01/20 10:44:42 wiz 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.
76 Objects are one of the following types:
78 .Bl -tag -width "PROP_TYPE_DICT_KEYSYM" -compact
82 .It Dv PROP_TYPE_NUMBER
85 .It Dv PROP_TYPE_STRING
91 .It Dv PROP_TYPE_ARRAY
94 .It Dv PROP_TYPE_DICTIONARY
97 .It Dv PROP_TYPE_DICT_KEYSYM
99 .Pq prop_dictionary_keysym_t
107 .Dv PROP_TYPE_UNKNOWN
109 .It Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2"
112 if the two objects are of the same type and are equivalent.
113 .It Fn prop_object_iterator_next "prop_object_iterator_t iter"
114 Return the next object in the collection
115 .Pq array or dictionary
116 being iterated by the iterator
118 If there are no more objects in the collection,
121 .It Fn prop_object_iterator_reset "prop_object_iterator_t iter"
122 Reset the iterator to the first object in the collection being iterated
125 .It Fn prop_object_iterator_release "prop_object_iterator_t iter"
133 .Xr prop_dictionary 3 ,
140 property container object library first appeared in