]> git.sur5r.net Git - openldap/blob - doc/man/man3/ldap_searchprefs.3
Update misleading statement about ldap_init(). It use is actually
[openldap] / doc / man / man3 / ldap_searchprefs.3
1 .TH SEARCHPREFS 3 "22 September 1998" "OpenLDAP LDVERSION"
2 .SH NAME
3 ldap_init_searchprefs, ldap_init_searchprefs_buf, ldap_free_searchprefs, ldap_first_searchobj, ldap_next_searchobj \- LDAP search preference configuration routeines
4 .SH SYNOPSIS
5 .nf
6 .ft B
7 #include <srchpref.h>
8 .ft
9 .fi
10 .LP
11 .nf
12 .ft B
13 struct ldap_searchattr {
14         char                            *sa_attrlabel;
15         char                            *sa_attr;
16                                         /* max 32 matchtypes for now */
17         u_long                          sa_matchtypebitmap;
18         char                            *sa_selectattr;
19         char                            *sa_selecttext;
20         struct ldap_searchattr          *sa_next;
21 };
22
23 struct ldap_searchmatch {
24         char                            *sm_matchprompt;
25         char                            *sm_filter;
26         struct ldap_searchmatch         *sm_next;
27 };
28
29 struct ldap_searchobj {
30         char                            *so_objtypeprompt;
31         unsigned long                   so_options;
32         char                            *so_prompt;
33         short                           so_defaultscope;
34         char                            *so_filterprefix;
35         char                            *so_filtertag;
36         char                            *so_defaultselectattr;
37         char                            *so_defaultselecttext;
38         struct ldap_searchattr          *so_salist;
39         struct ldap_searchmatch         *so_smlist;
40         struct ldap_searchobj           *so_next;
41 };
42 .ft
43 .fi
44 .LP
45 .nf
46 .ft B
47 int ldap_init_searchprefs( file, solistp )
48         char            \(**file;
49         struct ldap_searchobj   \(***solistp;
50 .ft
51 .fi
52 .LP
53 .nf
54 .ft B
55 int ldap_init_searchprefs_buf( buf, buflen, solistp )
56         char            \(**buf;
57         unsigned long   len;
58         struct ldap_searchobj   \(***solistp;
59 .ft
60 .fi
61 .LP
62 .nf
63 .ft B
64 struct ldap_searchobj \(**ldap_free_searchprefs( solist )
65         struct ldap_searchobj   \(**solist;
66 .ft
67 .fi
68 .LP
69 .nf
70 .ft B
71 struct ldap_searchobj \(**ldap_first_searchobj( solist )
72         struct ldap_seachobj    \(**solist;
73 .ft
74 .fi
75 .LP
76 .nf
77 .ft B
78 struct ldap_searchobj \(**ldap_next_searchobj( solist, so )
79         struct ldap_searchobj   \(**solist;
80         struct ldap_searchobj   \(**so;
81
82 .SH DESCRIPTION
83 These functions provide a standard way to access LDAP search preference
84 configuration data.  LDAP search preference configurations are typically
85 used by LDAP client programs to specify which attributes a user may
86 search by, labels for the attributes, and LDAP filters and scopes
87 associated with those searches.  Client software presents these choices
88 to a user, who can then specify the type of search to be performed.
89 .LP
90 .B ldap_init_searchprefs(\|)
91 reads a sequence of search preference configurations from a valid LDAP 
92 searchpref configuration file
93 (see ldapsearchprefs.conf(5))
94 .I Zero
95 is returned upon success, and 
96 .I solistp
97 is set to point to a list of search preference data structures.
98 .LP
99 .B ldap_init_searchprefs_buf(\|)
100 reads a sequence of search preference configurations from
101 .I buf
102 (whose size is
103 .I buflen).
104 .I buf
105 should point to the data in the format defined for an LDAP search preference 
106 configuration file (see ldapsearchprefs.conf(5))
107 .I Zero
108 is returned upon success, and 
109 .I solistp
110 is set to point to a list of search preference data structures.
111
112 .LP
113 .B ldap_free_searchprefs(\|)
114 disposes of the data structures allocated by
115 .B ldap_init_searchprefs(\|).
116 .LP
117 .B ldap_first_searchpref(\|)
118 returns the first search preference data structure in the list
119 .I solist.
120 The
121 .I solist
122 is typically obtained by calling
123 .B ldap_init_searchprefs(\|).
124 .LP
125 .B ldap_next_searchpref(\|)
126 returns the search preference after
127 .I so
128 in the template list
129 .I solist.  A
130 .SM NULL
131 pointer is returned if
132 .I so
133 is the last entry in the list.
134 .LP
135 .SH ERRORS
136 The init preferences functions return
137 .B LDAP_SEARCHPREF_ERR_VERSION
138 if buf points to data that is newer than can be handled, and
139 .B LDAP_SEARCHPREF_ERR_MEM
140 if there is a memory allocation problem.
141 .SH NOTES
142 .SH SEE ALSO
143 .BR ldap (3),
144 .BR ldapsearchprefs.conf (5),
145 .BR ldapd (8)
146 .LP
147 Yeong, W., Howes, T., and Hardcastle-Kille, S., "Lightweight Directory Access
148 Protocol", OSI-DS-26, April 1992.
149 .LP
150 Howes, T., Hardcastle-Kille, S., Yeong, W., and Robbins, C., "Lightweight
151 Directory Access Protocol", OSI-DS-26, April 1992.
152 .LP
153 Hardcastle-Kille, S., "A String Representation of Distinguished Names",
154 OSI-DS-23, April 1992.
155 .LP
156 Information Processing - Open Systems Interconnection - The Directory,
157 International Organization for Standardization.  International Standard
158 9594, (1988).
159 .SH ACKNOWLEDGEMENTS
160 .B      OpenLDAP
161 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
162 .B      OpenLDAP
163 is derived from University of Michigan LDAP 3.3 Release.