3 * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
6 * Redistribution and use in source and binary forms are permitted only
7 * as authorized by the OpenLDAP Public License. A copy of this
8 * license is available at http://www.OpenLDAP.org/license.html or
9 * in file LICENSE in the top-level directory of the distribution.
12 * Copyright (c) 1993, 1994 Regents of the University of Michigan.
13 * All rights reserved.
15 * Redistribution and use in source and binary forms are permitted
16 * provided that this notice is preserved and that due credit is given
17 * to the University of Michigan at Ann Arbor. The name of the University
18 * may not be used to endorse or promote products derived from this
19 * software without specific prior written permission. This software
20 * is provided ``as is'' without express or implied warranty.
22 * searchpref.h: display template library defines
23 * 16 May 1994 by Gordon Good
30 #include <ldap_cdefs.h>
34 struct ldap_searchattr {
37 /* max 32 matchtypes for now */
38 unsigned long sa_matchtypebitmap;
41 struct ldap_searchattr *sa_next;
44 struct ldap_searchmatch {
47 struct ldap_searchmatch *sm_next;
50 struct ldap_searchobj {
51 char *so_objtypeprompt;
52 unsigned long so_options;
54 short so_defaultscope;
55 char *so_filterprefix;
57 char *so_defaultselectattr;
58 char *so_defaultselecttext;
59 struct ldap_searchattr *so_salist;
60 struct ldap_searchmatch *so_smlist;
61 struct ldap_searchobj *so_next;
65 * global search object options
67 #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
69 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
70 (((so)->so_options & (option) ) != 0 )
72 #define LDAP_SEARCHPREF_VERSION_ZERO 0
73 #define LDAP_SEARCHPREF_VERSION 1
75 #define LDAP_SEARCHPREF_ERR_VERSION 1
76 #define LDAP_SEARCHPREF_ERR_MEM 2
77 #define LDAP_SEARCHPREF_ERR_SYNTAX 3
78 #define LDAP_SEARCHPREF_ERR_FILE 4
82 ldap_init_searchprefs LDAP_P(( char *file,
83 struct ldap_searchobj **solistp ));
86 ldap_init_searchprefs_buf LDAP_P(( char *buf,
88 struct ldap_searchobj **solistp ));
91 ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
93 LIBLDAP_F( struct ldap_searchobj * )
94 ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
96 LIBLDAP_F( struct ldap_searchobj * )
97 ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
98 struct ldap_searchobj *so ));
103 #endif /* _SRCHPREF_H */