]> git.sur5r.net Git - openldap/blob - include/srchpref.h
Fix bad merge of dnl multimaster
[openldap] / include / srchpref.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA
4  * All rights reserved.
5  *
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.
10  */
11 /* Portions
12  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
13  * All rights reserved.
14  *
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.
21  *
22  * searchpref.h:  display template library defines
23  * 16 May 1994 by Gordon Good
24  */
25
26
27 #ifndef _SRCHPREF_H
28 #define _SRCHPREF_H
29
30 #include <ldap_cdefs.h>
31
32 LDAP_BEGIN_DECL
33
34 struct ldap_searchattr {
35         char                            *sa_attrlabel;
36         char                            *sa_attr;
37                                         /* max 32 matchtypes for now */
38         unsigned long                   sa_matchtypebitmap;
39         char                            *sa_selectattr;
40         char                            *sa_selecttext;
41         struct ldap_searchattr          *sa_next;
42 };
43
44 struct ldap_searchmatch {
45         char                            *sm_matchprompt;
46         char                            *sm_filter;
47         struct ldap_searchmatch         *sm_next;
48 };
49
50 struct ldap_searchobj {
51         char                            *so_objtypeprompt;
52         unsigned long                   so_options;
53         char                            *so_prompt;
54         short                           so_defaultscope;
55         char                            *so_filterprefix;
56         char                            *so_filtertag;
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;
62 };
63
64 /*
65  * global search object options
66  */
67 #define LDAP_SEARCHOBJ_OPT_INTERNAL     0x00000001
68
69 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option )      \
70         (((so)->so_options & (option) ) != 0 )
71
72 #define LDAP_SEARCHPREF_VERSION_ZERO    0
73 #define LDAP_SEARCHPREF_VERSION         1
74
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
79
80
81 LDAP_F( int )
82 ldap_init_searchprefs LDAP_P(( char *file,
83         struct ldap_searchobj **solistp ));
84
85 LDAP_F( int )
86 ldap_init_searchprefs_buf LDAP_P(( char *buf,
87         ber_len_t buflen,
88         struct ldap_searchobj **solistp ));
89
90 LDAP_F( void )
91 ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
92
93 LDAP_F( struct ldap_searchobj * )
94 ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
95
96 LDAP_F( struct ldap_searchobj * )
97 ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
98         struct ldap_searchobj *so ));
99
100
101 LDAP_END_DECL
102
103 #endif /* _SRCHPREF_H */