6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / man / man3ldap / ldap_get_lang_values.3ldap
blobe8c759d28343dfae8b8b37f7c1092dac43e39ceb
1 '\" te
2 .\" Copyright (C) 1990, Regents of the University of Michigan.  All Rights Reserved.
3 .\" Portions Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved.
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH LDAP_GET_LANG_VALUES 3LDAP "Oct 25, 2001"
8 .SH NAME
9 ldap_get_lang_values, ldap_get_lang_values_len \- return an attribute's  values
10 that matches a specified language subtype
11 .SH SYNOPSIS
12 .LP
13 .nf
14 \fBcc\fR \fB-flag \&.\|.\|.\fR \fIfile\fR\&.\|.\|.\fB-l\fRldap [\fB -library \&.\|.\|. \fR]
15 #include <ldap.h>
17 \fBchar **\fR\fBldap_get_lang_values\fR(\fBLDAP *\fR\fIld\fR, \fBLDAPMessage *\fR\fIentry\fR,
18      \fBconst char *\fR\fItarget\fR,\ \fBchar **\fR\fItype\fR
19 .fi
21 .LP
22 .nf
23 \fBstruct berval **\fR\fBldap_get_lang_values_len\fR(\fBLDAP *\fR\fIld\fR, \fBLDAPMessage *\fR\fIentry\fR,
24      \fBconst char *\fR\fItarget\fR, \fBchar **\fR\fItype\fR
25 .fi
27 .SH DESCRIPTION
28 .sp
29 .LP
30 The \fBldap_get_lang_values()\fR function returns an array of an attribute's
31 string values that matches a specified language subtype. To retrieve the binary
32 data from an attribute, call the \fBldap_get_lang_values_len()\fR function
33 instead.
34 .sp
35 .LP
36 \fBldap_get_lang_values()\fR should be called to retrieve a null-terminated
37 array of an attribute's string values that match a specified language  subtype.
38 The \fIentry\fR parameter is the entry retrieved from the directory.   The
39 \fItarget\fR parameter should contain the attribute type the values that are
40 required, including the optional language subtype. The \fItype\fR  parameter
41 points to a buffer that returns the attribute type retrieved by  this function.
42 Unlike the \fBldap_get_values()\fR function, if a language subtype is
43 specified, this function first attempts to find and return      values that
44 match that subtype, for example, \fBcn;lang-en\fR.
45 .sp
46 .LP
47 \fBldap_get_lang_values_len()\fR returns a null-terminated array of pointers
48 to \fBberval\fR structures, each containing the length and pointer to a binary
49 value of an attribute for a given entry. The \fIentry\fR parameter is the
50 result returned by \fBldap_result()\fR or \fBldap_search_s()\fR functions. The
51 \fItarget\fR parameter is the attribute returned by the call to
52 \fBldap_first_attribute()\fR or \fBldap_next_attribute()\fR, or the attribute
53 as a  literal string, such as \fBjpegPhoto\fR or \fBaudio\fR.
54 .sp
55 .LP
56 These functions are deprecated. Use \fBldap_get_values()\fR or
57 \fBldap_get_values_len()\fR instead.
58 .SH RETURN VALUES
59 .sp
60 .LP
61 If successful, \fBldap_get_lang_values()\fR returns a null-terminated array of
62 the attribute's values. If the call is unsuccessful, or if no such attribute
63 exists in the \fIentry\fR, it returns a \fINULL\fR and sets the appropriate
64 error code in the LDAP structure.
65 .sp
66 .LP
67 The \fBldap_get_lang_values_len()\fR function returns a null-terminated array
68 of pointers to \fBberval\fR structures, which in turn, if successful, contain
69 pointers to the  attribute's binary values. If the call is unsuccessful, or if
70 no such attribute exists in the \fIentry\fR, it returns a \fINULL\fR and sets
71 the appropriate error code in the LDAP structure.
72 .SH ATTRIBUTES
73 .sp
74 .LP
75 See \fBattributes\fR(5)  for descriptions of the following attributes:
76 .sp
78 .sp
79 .TS
80 box;
81 c | c
82 l | l .
83 ATTRIBUTE TYPE  ATTRIBUTE VALUE
85 Interface Stability     Obsolete
86 .TE
88 .SH SEE ALSO
89 .sp
90 .LP
91 \fBldap_first_attribute\fR(3LDAP), \fBldap_first_attribute\fR(3LDAP),
92 \fBldap_get_values\fR(3LDAP), \fBldap_result\fR(3LDAP),
93 \fBldap_search\fR(3LDAP), \fBattributes\fR(5)