1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * Copyright (c) 2001 by Sun Microsystems, Inc.
3*7c478bd9Sstevel@tonic-gate  * All rights reserved.
4*7c478bd9Sstevel@tonic-gate  */
5*7c478bd9Sstevel@tonic-gate 
6*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
7*7c478bd9Sstevel@tonic-gate 
8*7c478bd9Sstevel@tonic-gate /*
9*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the Netscape Public
10*7c478bd9Sstevel@tonic-gate  * License Version 1.1 (the "License"); you may not use this file
11*7c478bd9Sstevel@tonic-gate  * except in compliance with the License. You may obtain a copy of
12*7c478bd9Sstevel@tonic-gate  * the License at http://www.mozilla.org/NPL/
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * Software distributed under the License is distributed on an "AS
15*7c478bd9Sstevel@tonic-gate  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
16*7c478bd9Sstevel@tonic-gate  * implied. See the License for the specific language governing
17*7c478bd9Sstevel@tonic-gate  * rights and limitations under the License.
18*7c478bd9Sstevel@tonic-gate  *
19*7c478bd9Sstevel@tonic-gate  * The Original Code is Mozilla Communicator client code, released
20*7c478bd9Sstevel@tonic-gate  * March 31, 1998.
21*7c478bd9Sstevel@tonic-gate  *
22*7c478bd9Sstevel@tonic-gate  * The Initial Developer of the Original Code is Netscape
23*7c478bd9Sstevel@tonic-gate  * Communications Corporation. Portions created by Netscape are
24*7c478bd9Sstevel@tonic-gate  * Copyright (C) 1998-1999 Netscape Communications Corporation. All
25*7c478bd9Sstevel@tonic-gate  * Rights Reserved.
26*7c478bd9Sstevel@tonic-gate  *
27*7c478bd9Sstevel@tonic-gate  * Contributor(s):
28*7c478bd9Sstevel@tonic-gate  */
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate /*
31*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
32*7c478bd9Sstevel@tonic-gate  * All rights reserved.
33*7c478bd9Sstevel@tonic-gate  *
34*7c478bd9Sstevel@tonic-gate  * Redistribution and use in source and binary forms are permitted
35*7c478bd9Sstevel@tonic-gate  * provided that this notice is preserved and that due credit is given
36*7c478bd9Sstevel@tonic-gate  * to the University of Michigan at Ann Arbor. The name of the University
37*7c478bd9Sstevel@tonic-gate  * may not be used to endorse or promote products derived from this
38*7c478bd9Sstevel@tonic-gate  * software without specific prior written permission. This software
39*7c478bd9Sstevel@tonic-gate  * is provided ``as is'' without express or implied warranty.
40*7c478bd9Sstevel@tonic-gate  *
41*7c478bd9Sstevel@tonic-gate  * disptmpl.h:  display template library defines
42*7c478bd9Sstevel@tonic-gate  */
43*7c478bd9Sstevel@tonic-gate 
44*7c478bd9Sstevel@tonic-gate #ifndef _DISPTMPL_H
45*7c478bd9Sstevel@tonic-gate #define _DISPTMPL_H
46*7c478bd9Sstevel@tonic-gate 
47*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
48*7c478bd9Sstevel@tonic-gate extern "C" {
49*7c478bd9Sstevel@tonic-gate #endif
50*7c478bd9Sstevel@tonic-gate 
51*7c478bd9Sstevel@tonic-gate /* calling conventions used by library */
52*7c478bd9Sstevel@tonic-gate #ifndef LDAP_CALL
53*7c478bd9Sstevel@tonic-gate #if defined( _WINDOWS ) || defined( _WIN32 )
54*7c478bd9Sstevel@tonic-gate #define LDAP_C __cdecl
55*7c478bd9Sstevel@tonic-gate #ifndef _WIN32
56*7c478bd9Sstevel@tonic-gate #define __stdcall _far _pascal
57*7c478bd9Sstevel@tonic-gate #define LDAP_CALLBACK _loadds
58*7c478bd9Sstevel@tonic-gate #else
59*7c478bd9Sstevel@tonic-gate #define LDAP_CALLBACK
60*7c478bd9Sstevel@tonic-gate #endif /* _WIN32 */
61*7c478bd9Sstevel@tonic-gate #define LDAP_PASCAL __stdcall
62*7c478bd9Sstevel@tonic-gate #define LDAP_CALL LDAP_PASCAL
63*7c478bd9Sstevel@tonic-gate #else /* _WINDOWS */
64*7c478bd9Sstevel@tonic-gate #define LDAP_C
65*7c478bd9Sstevel@tonic-gate #define LDAP_CALLBACK
66*7c478bd9Sstevel@tonic-gate #define LDAP_PASCAL
67*7c478bd9Sstevel@tonic-gate #define LDAP_CALL
68*7c478bd9Sstevel@tonic-gate #endif /* _WINDOWS */
69*7c478bd9Sstevel@tonic-gate #endif /* LDAP_CALL */
70*7c478bd9Sstevel@tonic-gate 
71*7c478bd9Sstevel@tonic-gate #ifndef _SOLARIS_SDK
72*7c478bd9Sstevel@tonic-gate 
73*7c478bd9Sstevel@tonic-gate #define LDAP_TEMPLATE_VERSION	1
74*7c478bd9Sstevel@tonic-gate 
75*7c478bd9Sstevel@tonic-gate /*
76*7c478bd9Sstevel@tonic-gate  * general types of items (confined to most significant byte)
77*7c478bd9Sstevel@tonic-gate  */
78*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_TYPE_TEXT		0x01000000L
79*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_TYPE_IMAGE		0x02000000L
80*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_TYPE_BOOLEAN		0x04000000L
81*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_TYPE_BUTTON		0x08000000L
82*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_TYPE_ACTION		0x10000000L
83*7c478bd9Sstevel@tonic-gate 
84*7c478bd9Sstevel@tonic-gate 
85*7c478bd9Sstevel@tonic-gate /*
86*7c478bd9Sstevel@tonic-gate  * syntax options (confined to second most significant byte)
87*7c478bd9Sstevel@tonic-gate  */
88*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_OPT_DEFER		0x00010000L
89*7c478bd9Sstevel@tonic-gate 
90*7c478bd9Sstevel@tonic-gate 
91*7c478bd9Sstevel@tonic-gate /*
92*7c478bd9Sstevel@tonic-gate  * display template item syntax ids (defined by common agreement)
93*7c478bd9Sstevel@tonic-gate  * these are the valid values for the ti_syntaxid of the tmplitem
94*7c478bd9Sstevel@tonic-gate  * struct (defined below).  A general type is encoded in the
95*7c478bd9Sstevel@tonic-gate  * most-significant 8 bits, and some options are encoded in the next
96*7c478bd9Sstevel@tonic-gate  * 8 bits.  The lower 16 bits are reserved for the distinct types.
97*7c478bd9Sstevel@tonic-gate  */
98*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_CASEIGNORESTR	( 1 | LDAP_SYN_TYPE_TEXT )
99*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_MULTILINESTR	( 2 | LDAP_SYN_TYPE_TEXT )
100*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_DN		( 3 | LDAP_SYN_TYPE_TEXT )
101*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_BOOLEAN	( 4 | LDAP_SYN_TYPE_BOOLEAN )
102*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_JPEGIMAGE	( 5 | LDAP_SYN_TYPE_IMAGE )
103*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_JPEGBUTTON	( 6 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER )
104*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_FAXIMAGE	( 7 | LDAP_SYN_TYPE_IMAGE )
105*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_FAXBUTTON	( 8 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER )
106*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_AUDIOBUTTON	( 9 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER )
107*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_TIME		( 10 | LDAP_SYN_TYPE_TEXT )
108*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_DATE		( 11 | LDAP_SYN_TYPE_TEXT )
109*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_LABELEDURL	( 12 | LDAP_SYN_TYPE_TEXT )
110*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_SEARCHACTION	( 13 | LDAP_SYN_TYPE_ACTION )
111*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_LINKACTION	( 14 | LDAP_SYN_TYPE_ACTION )
112*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_ADDDNACTION	( 15 | LDAP_SYN_TYPE_ACTION )
113*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_VERIFYDNACTION ( 16 | LDAP_SYN_TYPE_ACTION )
114*7c478bd9Sstevel@tonic-gate #define LDAP_SYN_RFC822ADDR	( 17 | LDAP_SYN_TYPE_TEXT )
115*7c478bd9Sstevel@tonic-gate 
116*7c478bd9Sstevel@tonic-gate 
117*7c478bd9Sstevel@tonic-gate /*
118*7c478bd9Sstevel@tonic-gate  * handy macros
119*7c478bd9Sstevel@tonic-gate  */
120*7c478bd9Sstevel@tonic-gate #define LDAP_GET_SYN_TYPE( syid )	((syid) & 0xFF000000UL )
121*7c478bd9Sstevel@tonic-gate #define LDAP_GET_SYN_OPTIONS( syid )	((syid) & 0x00FF0000UL )
122*7c478bd9Sstevel@tonic-gate 
123*7c478bd9Sstevel@tonic-gate 
124*7c478bd9Sstevel@tonic-gate /*
125*7c478bd9Sstevel@tonic-gate  * display options for output routines (used by entry2text and friends)
126*7c478bd9Sstevel@tonic-gate  */
127*7c478bd9Sstevel@tonic-gate /*
128*7c478bd9Sstevel@tonic-gate  * use calculated label width (based on length of longest label in
129*7c478bd9Sstevel@tonic-gate  * template) instead of contant width
130*7c478bd9Sstevel@tonic-gate  */
131*7c478bd9Sstevel@tonic-gate #define LDAP_DISP_OPT_AUTOLABELWIDTH	0x00000001L
132*7c478bd9Sstevel@tonic-gate #define LDAP_DISP_OPT_HTMLBODYONLY	0x00000002L
133*7c478bd9Sstevel@tonic-gate 
134*7c478bd9Sstevel@tonic-gate /*
135*7c478bd9Sstevel@tonic-gate  * perform search actions (applies to ldap_entry2text_search only)
136*7c478bd9Sstevel@tonic-gate  */
137*7c478bd9Sstevel@tonic-gate #define LDAP_DISP_OPT_DOSEARCHACTIONS	0x00000002L
138*7c478bd9Sstevel@tonic-gate 
139*7c478bd9Sstevel@tonic-gate /*
140*7c478bd9Sstevel@tonic-gate  * include additional info. relevant to "non leaf" entries only
141*7c478bd9Sstevel@tonic-gate  * used by ldap_entry2html and ldap_entry2html_search to include "Browse"
142*7c478bd9Sstevel@tonic-gate  * and "Move Up" HREFs
143*7c478bd9Sstevel@tonic-gate  */
144*7c478bd9Sstevel@tonic-gate #define LDAP_DISP_OPT_NONLEAF		0x00000004L
145*7c478bd9Sstevel@tonic-gate 
146*7c478bd9Sstevel@tonic-gate #endif /* ifndef _SOLARIS_SDK */
147*7c478bd9Sstevel@tonic-gate 
148*7c478bd9Sstevel@tonic-gate /*
149*7c478bd9Sstevel@tonic-gate  * display template item options (may not apply to all types)
150*7c478bd9Sstevel@tonic-gate  * if this bit is set in ti_options, it applies.
151*7c478bd9Sstevel@tonic-gate  */
152*7c478bd9Sstevel@tonic-gate #define LDAP_DITEM_OPT_READONLY		0x00000001L
153*7c478bd9Sstevel@tonic-gate #define LDAP_DITEM_OPT_SORTVALUES	0x00000002L
154*7c478bd9Sstevel@tonic-gate #define LDAP_DITEM_OPT_SINGLEVALUED	0x00000004L
155*7c478bd9Sstevel@tonic-gate #define LDAP_DITEM_OPT_HIDEIFEMPTY	0x00000008L
156*7c478bd9Sstevel@tonic-gate #define LDAP_DITEM_OPT_VALUEREQUIRED	0x00000010L
157*7c478bd9Sstevel@tonic-gate #define LDAP_DITEM_OPT_HIDEIFFALSE	0x00000020L	/* booleans only */
158*7c478bd9Sstevel@tonic-gate 
159*7c478bd9Sstevel@tonic-gate 
160*7c478bd9Sstevel@tonic-gate #ifndef _SOLARIS_SDK
161*7c478bd9Sstevel@tonic-gate 
162*7c478bd9Sstevel@tonic-gate /*
163*7c478bd9Sstevel@tonic-gate  * display template item structure
164*7c478bd9Sstevel@tonic-gate  */
165*7c478bd9Sstevel@tonic-gate struct ldap_tmplitem {
166*7c478bd9Sstevel@tonic-gate     unsigned long		ti_syntaxid;
167*7c478bd9Sstevel@tonic-gate     unsigned long		ti_options;
168*7c478bd9Sstevel@tonic-gate     char  			*ti_attrname;
169*7c478bd9Sstevel@tonic-gate     char			*ti_label;
170*7c478bd9Sstevel@tonic-gate     char			**ti_args;
171*7c478bd9Sstevel@tonic-gate     struct ldap_tmplitem	*ti_next_in_row;
172*7c478bd9Sstevel@tonic-gate     struct ldap_tmplitem	*ti_next_in_col;
173*7c478bd9Sstevel@tonic-gate     void			*ti_appdata;
174*7c478bd9Sstevel@tonic-gate };
175*7c478bd9Sstevel@tonic-gate 
176*7c478bd9Sstevel@tonic-gate #define NULLTMPLITEM	((struct ldap_tmplitem *)0)
177*7c478bd9Sstevel@tonic-gate 
178*7c478bd9Sstevel@tonic-gate #define LDAP_SET_TMPLITEM_APPDATA( ti, datap )	\
179*7c478bd9Sstevel@tonic-gate 	(ti)->ti_appdata = (void *)(datap)
180*7c478bd9Sstevel@tonic-gate 
181*7c478bd9Sstevel@tonic-gate #define LDAP_GET_TMPLITEM_APPDATA( ti, type )	\
182*7c478bd9Sstevel@tonic-gate 	(type)((ti)->ti_appdata)
183*7c478bd9Sstevel@tonic-gate 
184*7c478bd9Sstevel@tonic-gate #define LDAP_IS_TMPLITEM_OPTION_SET( ti, option )	\
185*7c478bd9Sstevel@tonic-gate 	(((ti)->ti_options & option ) != 0 )
186*7c478bd9Sstevel@tonic-gate 
187*7c478bd9Sstevel@tonic-gate 
188*7c478bd9Sstevel@tonic-gate /*
189*7c478bd9Sstevel@tonic-gate  * object class array structure
190*7c478bd9Sstevel@tonic-gate  */
191*7c478bd9Sstevel@tonic-gate struct ldap_oclist {
192*7c478bd9Sstevel@tonic-gate     char		**oc_objclasses;
193*7c478bd9Sstevel@tonic-gate     struct ldap_oclist	*oc_next;
194*7c478bd9Sstevel@tonic-gate };
195*7c478bd9Sstevel@tonic-gate 
196*7c478bd9Sstevel@tonic-gate #define NULLOCLIST	((struct ldap_oclist *)0)
197*7c478bd9Sstevel@tonic-gate 
198*7c478bd9Sstevel@tonic-gate 
199*7c478bd9Sstevel@tonic-gate /*
200*7c478bd9Sstevel@tonic-gate  * add defaults list
201*7c478bd9Sstevel@tonic-gate  */
202*7c478bd9Sstevel@tonic-gate struct ldap_adddeflist {
203*7c478bd9Sstevel@tonic-gate     int			ad_source;
204*7c478bd9Sstevel@tonic-gate #define LDAP_ADSRC_CONSTANTVALUE	1
205*7c478bd9Sstevel@tonic-gate #define LDAP_ADSRC_ADDERSDN		2
206*7c478bd9Sstevel@tonic-gate     char		*ad_attrname;
207*7c478bd9Sstevel@tonic-gate     char		*ad_value;
208*7c478bd9Sstevel@tonic-gate     struct ldap_adddeflist	*ad_next;
209*7c478bd9Sstevel@tonic-gate };
210*7c478bd9Sstevel@tonic-gate 
211*7c478bd9Sstevel@tonic-gate #define NULLADLIST	((struct ldap_adddeflist *)0)
212*7c478bd9Sstevel@tonic-gate 
213*7c478bd9Sstevel@tonic-gate 
214*7c478bd9Sstevel@tonic-gate /*
215*7c478bd9Sstevel@tonic-gate  * display template global options
216*7c478bd9Sstevel@tonic-gate  * if this bit is set in dt_options, it applies.
217*7c478bd9Sstevel@tonic-gate  */
218*7c478bd9Sstevel@tonic-gate /*
219*7c478bd9Sstevel@tonic-gate  * users should be allowed to try to add objects of these entries
220*7c478bd9Sstevel@tonic-gate  */
221*7c478bd9Sstevel@tonic-gate #define LDAP_DTMPL_OPT_ADDABLE		0x00000001L
222*7c478bd9Sstevel@tonic-gate 
223*7c478bd9Sstevel@tonic-gate /*
224*7c478bd9Sstevel@tonic-gate  * users should be allowed to do "modify RDN" operation of these entries
225*7c478bd9Sstevel@tonic-gate  */
226*7c478bd9Sstevel@tonic-gate #define LDAP_DTMPL_OPT_ALLOWMODRDN	0x00000002L
227*7c478bd9Sstevel@tonic-gate 
228*7c478bd9Sstevel@tonic-gate /*
229*7c478bd9Sstevel@tonic-gate  * this template is an alternate view, not a primary view
230*7c478bd9Sstevel@tonic-gate  */
231*7c478bd9Sstevel@tonic-gate #define LDAP_DTMPL_OPT_ALTVIEW		0x00000004L
232*7c478bd9Sstevel@tonic-gate 
233*7c478bd9Sstevel@tonic-gate 
234*7c478bd9Sstevel@tonic-gate /*
235*7c478bd9Sstevel@tonic-gate  * display template structure
236*7c478bd9Sstevel@tonic-gate  */
237*7c478bd9Sstevel@tonic-gate struct ldap_disptmpl {
238*7c478bd9Sstevel@tonic-gate     char			*dt_name;
239*7c478bd9Sstevel@tonic-gate     char			*dt_pluralname;
240*7c478bd9Sstevel@tonic-gate     char			*dt_iconname;
241*7c478bd9Sstevel@tonic-gate     unsigned long		dt_options;
242*7c478bd9Sstevel@tonic-gate     char			*dt_authattrname;
243*7c478bd9Sstevel@tonic-gate     char			*dt_defrdnattrname;
244*7c478bd9Sstevel@tonic-gate     char			*dt_defaddlocation;
245*7c478bd9Sstevel@tonic-gate     struct ldap_oclist		*dt_oclist;
246*7c478bd9Sstevel@tonic-gate     struct ldap_adddeflist	*dt_adddeflist;
247*7c478bd9Sstevel@tonic-gate     struct ldap_tmplitem	*dt_items;
248*7c478bd9Sstevel@tonic-gate     void			*dt_appdata;
249*7c478bd9Sstevel@tonic-gate     struct ldap_disptmpl	*dt_next;
250*7c478bd9Sstevel@tonic-gate };
251*7c478bd9Sstevel@tonic-gate 
252*7c478bd9Sstevel@tonic-gate #define NULLDISPTMPL	((struct ldap_disptmpl *)0)
253*7c478bd9Sstevel@tonic-gate 
254*7c478bd9Sstevel@tonic-gate #define LDAP_SET_DISPTMPL_APPDATA( dt, datap )	\
255*7c478bd9Sstevel@tonic-gate 	(dt)->dt_appdata = (void *)(datap)
256*7c478bd9Sstevel@tonic-gate 
257*7c478bd9Sstevel@tonic-gate #define LDAP_GET_DISPTMPL_APPDATA( dt, type )	\
258*7c478bd9Sstevel@tonic-gate 	(type)((dt)->dt_appdata)
259*7c478bd9Sstevel@tonic-gate 
260*7c478bd9Sstevel@tonic-gate #define LDAP_IS_DISPTMPL_OPTION_SET( dt, option )	\
261*7c478bd9Sstevel@tonic-gate 	(((dt)->dt_options & option ) != 0 )
262*7c478bd9Sstevel@tonic-gate 
263*7c478bd9Sstevel@tonic-gate #define LDAP_TMPL_ERR_VERSION	1
264*7c478bd9Sstevel@tonic-gate #define LDAP_TMPL_ERR_MEM	2
265*7c478bd9Sstevel@tonic-gate #define LDAP_TMPL_ERR_SYNTAX	3
266*7c478bd9Sstevel@tonic-gate #define LDAP_TMPL_ERR_FILE	4
267*7c478bd9Sstevel@tonic-gate 
268*7c478bd9Sstevel@tonic-gate /*
269*7c478bd9Sstevel@tonic-gate  * buffer size needed for entry2text and vals2text
270*7c478bd9Sstevel@tonic-gate  */
271*7c478bd9Sstevel@tonic-gate #define LDAP_DTMPL_BUFSIZ	8192
272*7c478bd9Sstevel@tonic-gate 
273*7c478bd9Sstevel@tonic-gate typedef int (*writeptype)( void *writeparm, char *p, int len );
274*7c478bd9Sstevel@tonic-gate 
275*7c478bd9Sstevel@tonic-gate LDAP_API(int)
276*7c478bd9Sstevel@tonic-gate LDAP_CALL
277*7c478bd9Sstevel@tonic-gate ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp );
278*7c478bd9Sstevel@tonic-gate 
279*7c478bd9Sstevel@tonic-gate LDAP_API(int)
280*7c478bd9Sstevel@tonic-gate LDAP_CALL
281*7c478bd9Sstevel@tonic-gate ldap_init_templates_buf( char *buf, long buflen,
282*7c478bd9Sstevel@tonic-gate 	struct ldap_disptmpl **tmpllistp );
283*7c478bd9Sstevel@tonic-gate 
284*7c478bd9Sstevel@tonic-gate LDAP_API(void)
285*7c478bd9Sstevel@tonic-gate LDAP_CALL
286*7c478bd9Sstevel@tonic-gate ldap_free_templates( struct ldap_disptmpl *tmpllist );
287*7c478bd9Sstevel@tonic-gate 
288*7c478bd9Sstevel@tonic-gate LDAP_API(struct ldap_disptmpl *)
289*7c478bd9Sstevel@tonic-gate LDAP_CALL
290*7c478bd9Sstevel@tonic-gate ldap_first_disptmpl( struct ldap_disptmpl *tmpllist );
291*7c478bd9Sstevel@tonic-gate 
292*7c478bd9Sstevel@tonic-gate LDAP_API(struct ldap_disptmpl *)
293*7c478bd9Sstevel@tonic-gate LDAP_CALL
294*7c478bd9Sstevel@tonic-gate ldap_next_disptmpl( struct ldap_disptmpl *tmpllist,
295*7c478bd9Sstevel@tonic-gate 	struct ldap_disptmpl *tmpl );
296*7c478bd9Sstevel@tonic-gate 
297*7c478bd9Sstevel@tonic-gate LDAP_API(struct ldap_disptmpl *)
298*7c478bd9Sstevel@tonic-gate LDAP_CALL
299*7c478bd9Sstevel@tonic-gate ldap_name2template( char *name, struct ldap_disptmpl *tmpllist );
300*7c478bd9Sstevel@tonic-gate 
301*7c478bd9Sstevel@tonic-gate LDAP_API(struct ldap_disptmpl *)
302*7c478bd9Sstevel@tonic-gate LDAP_CALL
303*7c478bd9Sstevel@tonic-gate ldap_oc2template( char **oclist, struct ldap_disptmpl *tmpllist );
304*7c478bd9Sstevel@tonic-gate 
305*7c478bd9Sstevel@tonic-gate LDAP_API(char **)
306*7c478bd9Sstevel@tonic-gate LDAP_CALL
307*7c478bd9Sstevel@tonic-gate ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, int exclude,
308*7c478bd9Sstevel@tonic-gate 	 unsigned long syntaxmask );
309*7c478bd9Sstevel@tonic-gate 
310*7c478bd9Sstevel@tonic-gate LDAP_API(struct ldap_tmplitem *)
311*7c478bd9Sstevel@tonic-gate LDAP_CALL
312*7c478bd9Sstevel@tonic-gate ldap_first_tmplrow( struct ldap_disptmpl *tmpl );
313*7c478bd9Sstevel@tonic-gate 
314*7c478bd9Sstevel@tonic-gate LDAP_API(struct ldap_tmplitem *)
315*7c478bd9Sstevel@tonic-gate LDAP_CALL
316*7c478bd9Sstevel@tonic-gate ldap_next_tmplrow( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row );
317*7c478bd9Sstevel@tonic-gate 
318*7c478bd9Sstevel@tonic-gate LDAP_API(struct ldap_tmplitem *)
319*7c478bd9Sstevel@tonic-gate LDAP_CALL
320*7c478bd9Sstevel@tonic-gate ldap_first_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row );
321*7c478bd9Sstevel@tonic-gate 
322*7c478bd9Sstevel@tonic-gate LDAP_API(struct ldap_tmplitem *)
323*7c478bd9Sstevel@tonic-gate LDAP_CALL
324*7c478bd9Sstevel@tonic-gate ldap_next_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row,
325*7c478bd9Sstevel@tonic-gate 	struct ldap_tmplitem *col );
326*7c478bd9Sstevel@tonic-gate 
327*7c478bd9Sstevel@tonic-gate LDAP_API(int)
328*7c478bd9Sstevel@tonic-gate LDAP_CALL
329*7c478bd9Sstevel@tonic-gate ldap_entry2text( LDAP *ld, char *buf, LDAPMessage *entry,
330*7c478bd9Sstevel@tonic-gate 	struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
331*7c478bd9Sstevel@tonic-gate 	writeptype writeproc, void *writeparm, char *eol, int rdncount,
332*7c478bd9Sstevel@tonic-gate 	unsigned long opts );
333*7c478bd9Sstevel@tonic-gate 
334*7c478bd9Sstevel@tonic-gate LDAP_API(int)
335*7c478bd9Sstevel@tonic-gate LDAP_CALL
336*7c478bd9Sstevel@tonic-gate ldap_vals2text( LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
337*7c478bd9Sstevel@tonic-gate 	unsigned long syntaxid, writeptype writeproc, void *writeparm,
338*7c478bd9Sstevel@tonic-gate 	char *eol, int rdncount );
339*7c478bd9Sstevel@tonic-gate 
340*7c478bd9Sstevel@tonic-gate LDAP_API(int)
341*7c478bd9Sstevel@tonic-gate LDAP_CALL
342*7c478bd9Sstevel@tonic-gate ldap_entry2text_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry,
343*7c478bd9Sstevel@tonic-gate 	struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
344*7c478bd9Sstevel@tonic-gate 	writeptype writeproc, void *writeparm, char *eol, int rdncount,
345*7c478bd9Sstevel@tonic-gate 	unsigned long opts );
346*7c478bd9Sstevel@tonic-gate 
347*7c478bd9Sstevel@tonic-gate LDAP_API(int)
348*7c478bd9Sstevel@tonic-gate LDAP_CALL
349*7c478bd9Sstevel@tonic-gate ldap_entry2html( LDAP *ld, char *buf, LDAPMessage *entry,
350*7c478bd9Sstevel@tonic-gate 	struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
351*7c478bd9Sstevel@tonic-gate 	writeptype writeproc, void *writeparm, char *eol, int rdncount,
352*7c478bd9Sstevel@tonic-gate 	unsigned long opts, char *urlprefix, char *base );
353*7c478bd9Sstevel@tonic-gate 
354*7c478bd9Sstevel@tonic-gate LDAP_API(int)
355*7c478bd9Sstevel@tonic-gate LDAP_CALL
356*7c478bd9Sstevel@tonic-gate ldap_vals2html( LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
357*7c478bd9Sstevel@tonic-gate 	unsigned long syntaxid, writeptype writeproc, void *writeparm,
358*7c478bd9Sstevel@tonic-gate 	char *eol, int rdncount, char *urlprefix );
359*7c478bd9Sstevel@tonic-gate 
360*7c478bd9Sstevel@tonic-gate LDAP_API(int)
361*7c478bd9Sstevel@tonic-gate LDAP_CALL
362*7c478bd9Sstevel@tonic-gate ldap_entry2html_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry,
363*7c478bd9Sstevel@tonic-gate 	struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
364*7c478bd9Sstevel@tonic-gate 	writeptype writeproc, void *writeparm, char *eol, int rdncount,
365*7c478bd9Sstevel@tonic-gate 	unsigned long opts, char *urlprefix );
366*7c478bd9Sstevel@tonic-gate 
367*7c478bd9Sstevel@tonic-gate #endif /* ifndef _SOLARIS_SDK */
368*7c478bd9Sstevel@tonic-gate 
369*7c478bd9Sstevel@tonic-gate LDAP_API(char *)
370*7c478bd9Sstevel@tonic-gate LDAP_CALL
371*7c478bd9Sstevel@tonic-gate ldap_tmplerr2string( int err );
372*7c478bd9Sstevel@tonic-gate 
373*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
374*7c478bd9Sstevel@tonic-gate }
375*7c478bd9Sstevel@tonic-gate #endif
376*7c478bd9Sstevel@tonic-gate #endif /* _DISPTMPL_H */
377