3 * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted only as authorized by the OpenLDAP
8 * Public License. A copy of this license is available at
9 * http://www.OpenLDAP.org/license.html or in file LICENSE in the
10 * top-level directory of the distribution.
13 * Copyright (c) 1993, 1994 Regents of the University of Michigan.
14 * All rights reserved.
16 * Redistribution and use in source and binary forms are permitted
17 * provided that this notice is preserved and that due credit is given
18 * to the University of Michigan at Ann Arbor. The name of the University
19 * may not be used to endorse or promote products derived from this
20 * software without specific prior written permission. This software
21 * is provided ``as is'' without express or implied warranty.
23 * searchpref.h: display template library defines
24 * 16 May 1994 by Gordon Good
27 /* DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED */
32 #include <ldap_cdefs.h>
36 struct ldap_searchattr {
39 /* max 32 matchtypes for now */
40 unsigned long sa_matchtypebitmap;
43 struct ldap_searchattr *sa_next;
46 struct ldap_searchmatch {
49 struct ldap_searchmatch *sm_next;
52 struct ldap_searchobj {
53 char *so_objtypeprompt;
54 unsigned long so_options;
56 short so_defaultscope;
57 char *so_filterprefix;
59 char *so_defaultselectattr;
60 char *so_defaultselecttext;
61 struct ldap_searchattr *so_salist;
62 struct ldap_searchmatch *so_smlist;
63 struct ldap_searchobj *so_next;
67 * global search object options
69 #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
71 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
72 (((so)->so_options & (option) ) != 0 )
74 #define LDAP_SEARCHPREF_VERSION_ZERO 0
75 #define LDAP_SEARCHPREF_VERSION 1
77 #define LDAP_SEARCHPREF_ERR_VERSION 1
78 #define LDAP_SEARCHPREF_ERR_MEM 2
79 #define LDAP_SEARCHPREF_ERR_SYNTAX 3
80 #define LDAP_SEARCHPREF_ERR_FILE 4
84 ldap_init_searchprefs LDAP_P(( char *file,
85 struct ldap_searchobj **solistp ));
88 ldap_init_searchprefs_buf LDAP_P(( char *buf,
90 struct ldap_searchobj **solistp ));
93 ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
95 LDAP_F( struct ldap_searchobj * )
96 ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
98 LDAP_F( struct ldap_searchobj * )
99 ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
100 struct ldap_searchobj *so ));
105 #endif /* _SRCHPREF_H */