2 * Copyright (c) 2001 by Sun Microsystems, Inc.
6 #pragma ident "%Z%%M% %I% %E% SMI"
9 * The contents of this file are subject to the Netscape Public
10 * License Version 1.1 (the "License"); you may not use this file
11 * except in compliance with the License. You may obtain a copy of
12 * the License at http://www.mozilla.org/NPL/
14 * Software distributed under the License is distributed on an "AS
15 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
16 * implied. See the License for the specific language governing
17 * rights and limitations under the License.
19 * The Original Code is Mozilla Communicator client code, released
22 * The Initial Developer of the Original Code is Netscape
23 * Communications Corporation. Portions created by Netscape are
24 * Copyright (C) 1998-1999 Netscape Communications Corporation. All
31 * Copyright (c) 1993, 1994 Regents of the University of Michigan.
32 * All rights reserved.
34 * Redistribution and use in source and binary forms are permitted
35 * provided that this notice is preserved and that due credit is given
36 * to the University of Michigan at Ann Arbor. The name of the University
37 * may not be used to endorse or promote products derived from this
38 * software without specific prior written permission. This software
39 * is provided ``as is'' without express or implied warranty.
41 * searchpref.h: display template library defines
52 /* calling conventions used by library */
54 #if defined( _WINDOWS ) || defined( _WIN32 )
55 #define LDAP_C __cdecl
57 #define __stdcall _far _pascal
58 #define LDAP_CALLBACK _loadds
62 #define LDAP_PASCAL __stdcall
63 #define LDAP_CALL LDAP_PASCAL
70 #endif /* LDAP_CALL */
74 struct ldap_searchattr
{
77 /* max 32 matchtypes for now */
78 unsigned long sa_matchtypebitmap
;
81 struct ldap_searchattr
*sa_next
;
84 struct ldap_searchmatch
{
87 struct ldap_searchmatch
*sm_next
;
90 struct ldap_searchobj
{
91 char *so_objtypeprompt
;
92 unsigned long so_options
;
94 short so_defaultscope
;
95 char *so_filterprefix
;
97 char *so_defaultselectattr
;
98 char *so_defaultselecttext
;
99 struct ldap_searchattr
*so_salist
;
100 struct ldap_searchmatch
*so_smlist
;
101 struct ldap_searchobj
*so_next
;
104 #define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
107 * global search object options
109 #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
111 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
112 (((so)->so_options & option ) != 0 )
114 #define LDAP_SEARCHPREF_VERSION_ZERO 0
115 #define LDAP_SEARCHPREF_VERSION 1
117 #define LDAP_SEARCHPREF_ERR_VERSION 1
118 #define LDAP_SEARCHPREF_ERR_MEM 2
119 #define LDAP_SEARCHPREF_ERR_SYNTAX 3
120 #define LDAP_SEARCHPREF_ERR_FILE 4
125 ldap_init_searchprefs( char *file
, struct ldap_searchobj
**solistp
);
129 ldap_init_searchprefs_buf( char *buf
, long buflen
,
130 struct ldap_searchobj
**solistp
);
134 ldap_free_searchprefs( struct ldap_searchobj
*solist
);
136 LDAP_API(struct ldap_searchobj
*)
138 ldap_first_searchobj( struct ldap_searchobj
*solist
);
140 LDAP_API(struct ldap_searchobj
*)
142 ldap_next_searchobj( struct ldap_searchobj
*sollist
,
143 struct ldap_searchobj
*so
);
145 #endif /* _SOLARIS_SDK */
150 #endif /* _SRCHPREF_H */