2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SCF_ENTRY_CREATE 3SCF "Jul 17, 2008"
8 scf_entry_create, scf_entry_handle, scf_entry_destroy,
9 scf_entry_destroy_children, scf_entry_reset, scf_entry_add_value \- create and
10 manipulate transaction in the Service Configuration Facility
14 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lscf\fR [ \fIlibrary\fR\&.\|.\|. ]
17 \fBscf_transaction_entry_t *\fR\fBscf_entry_create\fR(\fBscf_handle_t *\fR\fIhandle\fR);
22 \fBscf_handle_t *\fR\fBscf_entry_handle\fR(\fBscf_transaction_entry_t *\fR\fIentry\fR);
27 \fBvoid\fR \fBscf_entry_destroy\fR(\fBscf_transaction_entry_t *\fR\fIentry\fR);
32 \fBvoid\fR \fBscf_entry_destroy_children\fR(\fBscf_transaction_entry_t *\fR\fIentry\fR);
37 \fBvoid\fR \fBscf_entry_reset\fR(\fBscf_transaction_entry_t *\fR\fIentry\fR);
42 \fBint\fR \fBscf_entry_add_value\fR(\fBscf_transaction_entry_t *\fR\fIentry\fR,
43 \fBscf_value_t *\fR\fIvalue\fR);
49 The \fBscf_entry_create()\fR function allocates a new transaction entry handle.
50 The \fBscf_entry_destroy()\fR function destroys the transaction entry handle.
53 The \fBscf_entry_handle()\fR function retrieves the handle associated with
57 A transaction entry represents a single action on a property in a property
58 group. If an entry is added to a transaction using
59 \fBscf_transaction_property_new\fR(3SCF),
60 \fBscf_transaction_property_change\fR(3SCF), or
61 \fBscf_transaction_property_change_type\fR(3SCF), \fBscf_entry_add_value()\fR
62 can be called zero or more times to set up the set of values for that property.
63 Each value must be set and of a compatible type to the type associated with the
64 entry. When later retrieved from the property, the values will have the type of
65 the entry. If the values are committed successfully with
66 \fBscf_transaction_commit\fR(3SCF), they will be set in the order in which they
67 were added with \fBscf_entry_add_value()\fR.
70 The \fBscf_entry_reset()\fR function resets a transaction entry, disassociating
71 it from any transaction it is a part of (invalidating the transaction in the
72 process), and disassociating any values that were added to it.
75 The \fBscf_entry_destroy_children()\fR function destroys all values associated
76 with the transaction entry. The entry itself is not destroyed.
80 Upon successful completion, \fBscf_entry_create()\fR returns a new
81 \fBscf_transaction_entry_t\fR. Otherwise, it returns \fINULL\fR.
84 Upon successful completion, \fBscf_entry_handle()\fR returns the handle
85 associated with the transaction entry. Otherwise, it returns \fINULL\fR.
88 Upon successful completion, \fBscf_entry_add_value()\fR returns 0. Otherwise,
93 The \fBscf_entry_create()\fR function will fail if:
97 \fB\fBSCF_ERROR_INVALID_ARGUMENT\fR\fR
100 The \fIhandle\fR argument is \fINULL\fR.
106 \fB\fBSCF_ERROR_NO_MEMORY\fR\fR
109 There is not enough memory to allocate an \fBscf_transaction_entry_t\fR.
114 The \fBscf_entry_handle()\fR function will fail if:
118 \fB\fBSCF_ERROR_HANDLE_DESTROYED\fR\fR
121 The handle associated with entry has been destroyed.
126 The \fBscf_entry_add_value()\fR function will fail if:
130 \fB\fBSCF_ERROR_HANDLE_MISMATCH\fR\fR
133 The \fIvalue\fR and \fIentry\fR arguments are not derived from the same handle.
139 \fB\fBSCF_ERROR_IN_USE\fR\fR
142 The value has been added to another entry.
148 \fB\fBSCF_ERROR_INTERNAL\fR\fR
151 An internal error occurred.
157 \fB\fBSCF_ERROR_INVALID_ARGUMENT\fR\fR
160 The \fIvalue\fR argument is not set, or the entry was added to the transaction
161 using \fBscf_transaction_property_delete\fR(3SCF).
167 \fB\fBSCF_ERROR_NOT_SET\fR\fR
170 The transaction entry is not associated with a transaction.
176 \fB\fBSCF_ERROR_TYPE_MISMATCH\fR\fR
179 The type of the \fIvalue\fR argument does not match the type that was set using
180 \fBscf_transaction_property_new()\fR, \fBscf_transaction_property_change()\fR,
181 or \fBscf_transaction_property_change_type()\fR.
186 The \fBscf_error\fR(3SCF) function can be used to retrieve the error value.
190 See \fBattributes\fR(5) for descriptions of the following attributes:
198 ATTRIBUTE TYPE ATTRIBUTE VALUE
200 Interface Stability Committed
208 \fBlibscf\fR(3LIB), \fBscf_error\fR(3SCF), \fBscf_transaction_commit\fR(3SCF),
209 \fBscf_transaction_property_change\fR(3SCF),
210 \fBscf_transaction_property_change_type\fR(3SCF),
211 \fBscf_transaction_property_delete\fR(3SCF),
212 \fBscf_transaction_property_new\fR(3SCF), \fBscf_transaction_reset\fR(3SCF),