2 .\" Copyright (c) 2003, 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 SLPOPEN 3SLP "Jan 16, 2003"
8 SLPOpen \- open an SLP handle
12 cc [ \fIflag\fR... ] \fIfile\fR... \fB-lslp\fR [ \fIlibrary\fR... ]
15 \fBSLPError\fR \fBSLPOpen\fR(\fBconst char *\fR\fIpcLang\fR, \fBSLPBoolean\fR \fIisAsync\fR, \fBSLPHandle *\fR\fIphSLP\fR);
21 The \fBSLPOpen()\fR function returns a \fBSLPHandle\fR handle in the
22 \fIphSLP\fR parameter for the language locale passed in as the
23 \fIpcLang\fR parameter. The client indicates if operations on the handle
24 are to be synchronous or asynchronous through the \fIisAsync\fR parameter.
25 The handle encapsulates the language locale for \fBSLP\fR requests issued
26 through the handle, and any other resources required by the
27 implementation. \fBSLP\fR properties are not encapsulated by the handle,
28 they are global. The return value of the function is an \fBSLPError\fR
29 code indicating the status of the operation. Upon failure, the
30 \fIphSLP\fR parameter is \fINULL\fR.
33 An \fBSLPHandle\fR can only be used for one \fBSLP\fR \fBAPI\fR operation at a
34 time. If the original operation was started asynchronously, any attempt to
35 start an additional operation on the handle while the original operation is
36 pending results in the return of an \fBSLP_HANDLE_IN_USE\fR error from the
37 \fBAPI\fR function. The \fBSLPClose()\fR function terminates any outstanding
46 A pointer to an array of characters containing the language tag set forth
47 in \fIRFC 1766\fR for the natural language locale of requests issued on the
48 handle. This parameter cannot be \fINULL\fR.
57 An \fBSLPBoolean\fR indicating whether or not the \fBSLPHandle\fR should be
58 opened for an asynchronous operation.
67 A pointer to an \fBSLPHandle\fR in which the open \fBSLPHandle\fR is returned.
68 If an error occurs, the value upon return is \fINULL\fR.
74 This function or its callback may return any \fBSLP\fR error code. See the
75 ERRORS section in \fBslp_api\fR(3SLP).
78 \fBExample 1 \fRUsing \fBSLPOpen()\fR
81 Use the following example to open a synchronous handle for the German ("de")
87 SLPHandle HSLP; SLPError err; err = SLPOpen("de", SLP_FALSE, &hSLP)
91 .SH ENVIRONMENT VARIABLES
95 \fB\fBSLP_CONF_FILE\fR\fR
98 When set, use this file for configuration.
104 \fBslpd\fR(1M), \fBslp_api\fR(3SLP), \fBslp.conf\fR(4), \fBslpd.reg\fR(4),
108 \fISystem Administration Guide: Network Services\fR
111 Alvestrand, H. \fIRFC 1766, Tags for the Identification of Languages\fR.
112 Network Working Group. March 1995.
115 Kempf, J. and Guttman, E. \fIRFC 2614, An API for Service Location\fR. The
116 Internet Society. June 1999.