2 * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
5 * Redistribution and use in source and binary forms are permitted only
6 * as authorized by the OpenLDAP Public License. A copy of this
7 * license is available at http://www.OpenLDAP.org/license.html or
8 * in file LICENSE in the top-level directory of the distribution.
11 * Copyright (c) 1993, 1994 Regents of the University of Michigan.
12 * All rights reserved.
14 * Redistribution and use in source and binary forms are permitted
15 * provided that this notice is preserved and that due credit is given
16 * to the University of Michigan at Ann Arbor. The name of the University
17 * may not be used to endorse or promote products derived from this
18 * software without specific prior written permission. This software
19 * is provided ``as is'' without express or implied warranty.
21 * searchpref.h: display template library defines
22 * 16 May 1994 by Gordon Good
29 #include <ldap_cdefs.h>
33 struct ldap_searchattr {
36 /* max 32 matchtypes for now */
37 unsigned long sa_matchtypebitmap;
40 struct ldap_searchattr *sa_next;
43 struct ldap_searchmatch {
46 struct ldap_searchmatch *sm_next;
49 struct ldap_searchobj {
50 char *so_objtypeprompt;
51 unsigned long so_options;
53 short so_defaultscope;
54 char *so_filterprefix;
56 char *so_defaultselectattr;
57 char *so_defaultselecttext;
58 struct ldap_searchattr *so_salist;
59 struct ldap_searchmatch *so_smlist;
60 struct ldap_searchobj *so_next;
63 #define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
66 * global search object options
68 #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
70 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
71 (((so)->so_options & (option) ) != 0 )
73 #define LDAP_SEARCHPREF_VERSION_ZERO 0
74 #define LDAP_SEARCHPREF_VERSION 1
76 #define LDAP_SEARCHPREF_ERR_VERSION 1
77 #define LDAP_SEARCHPREF_ERR_MEM 2
78 #define LDAP_SEARCHPREF_ERR_SYNTAX 3
79 #define LDAP_SEARCHPREF_ERR_FILE 4
83 ldap_init_searchprefs LDAP_P(( char *file,
84 struct ldap_searchobj **solistp ));
87 ldap_init_searchprefs_buf LDAP_P(( char *buf,
89 struct ldap_searchobj **solistp ));
92 ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
94 LDAP_F struct ldap_searchobj *
95 ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
97 LDAP_F struct ldap_searchobj *
98 ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
99 struct ldap_searchobj *so ));
104 #endif /* _SRCHPREF_H */