2 * Copyright (c) 1993, 1994 Regents of the University of Michigan.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of Michigan at Ann Arbor. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
12 * searchpref.h: display template library defines
13 * 16 May 1994 by Gordon Good
20 #include <ldap_cdefs.h>
24 struct ldap_searchattr {
27 /* max 32 matchtypes for now */
28 unsigned long sa_matchtypebitmap;
31 struct ldap_searchattr *sa_next;
34 struct ldap_searchmatch {
37 struct ldap_searchmatch *sm_next;
40 struct ldap_searchobj {
41 char *so_objtypeprompt;
42 unsigned long so_options;
44 short so_defaultscope;
45 char *so_filterprefix;
47 char *so_defaultselectattr;
48 char *so_defaultselecttext;
49 struct ldap_searchattr *so_salist;
50 struct ldap_searchmatch *so_smlist;
51 struct ldap_searchobj *so_next;
54 #define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
57 * global search object options
59 #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
61 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
62 (((so)->so_options & (option) ) != 0 )
64 #define LDAP_SEARCHPREF_VERSION_ZERO 0
65 #define LDAP_SEARCHPREF_VERSION 1
67 #define LDAP_SEARCHPREF_ERR_VERSION 1
68 #define LDAP_SEARCHPREF_ERR_MEM 2
69 #define LDAP_SEARCHPREF_ERR_SYNTAX 3
70 #define LDAP_SEARCHPREF_ERR_FILE 4
74 ldap_init_searchprefs LDAP_P(( char *file,
75 struct ldap_searchobj **solistp ));
78 ldap_init_searchprefs_buf LDAP_P(( char *buf,
80 struct ldap_searchobj **solistp ));
83 ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
85 LDAP_F struct ldap_searchobj *
86 ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
88 LDAP_F struct ldap_searchobj *
89 ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
90 struct ldap_searchobj *so ));
95 #endif /* _SRCHPREF_H */