* NTLM authentication support with the ntlm library, in Unix systems.
[alpine.git] / ldap / inckit / srchpref.h
blobfe8a422c598df566da3902f85593dc739e897c0f
1 /*
2 * Copyright (c) 1993, 1994 Regents of the University of Michigan.
3 * All rights reserved.
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
17 #ifndef _SRCHPREF_H
18 #define _SRCHPREF_H
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
25 struct ldap_searchattr {
26 char *sa_attrlabel;
27 char *sa_attr;
28 /* max 32 matchtypes for now */
29 unsigned long sa_matchtypebitmap;
30 char *sa_selectattr;
31 char *sa_selecttext;
32 struct ldap_searchattr *sa_next;
35 struct ldap_searchmatch {
36 char *sm_matchprompt;
37 char *sm_filter;
38 struct ldap_searchmatch *sm_next;
41 struct ldap_searchobj {
42 char *so_objtypeprompt;
43 unsigned long so_options;
44 char *so_prompt;
45 short so_defaultscope;
46 char *so_filterprefix;
47 char *so_filtertag;
48 char *so_defaultselectattr;
49 char *so_defaultselecttext;
50 struct ldap_searchattr *so_salist;
51 struct ldap_searchmatch *so_smlist;
52 struct ldap_searchobj *so_next;
55 #define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
58 * global search object options
60 #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
62 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
63 (((so)->so_options & option ) != 0 )
65 #define LDAP_SEARCHPREF_VERSION_ZERO 0
66 #define LDAP_SEARCHPREF_VERSION 1
68 #define LDAP_SEARCHPREF_ERR_VERSION 1
69 #define LDAP_SEARCHPREF_ERR_MEM 2
70 #define LDAP_SEARCHPREF_ERR_SYNTAX 3
71 #define LDAP_SEARCHPREF_ERR_FILE 4
74 #ifndef NEEDPROTOS
75 int ldap_init_searchprefs();
76 int ldap_init_searchprefs_buf();
77 void ldap_free_searchprefs();
78 struct ldap_searchobj *ldap_first_searchobj();
79 struct ldap_searchobj *ldap_next_searchobj();
81 #else /* !NEEDPROTOS */
83 LDAPFUNCDECL int
84 ldap_init_searchprefs( char *file, struct ldap_searchobj **solistp );
86 LDAPFUNCDECL int
87 ldap_init_searchprefs_buf( char *buf, long buflen,
88 struct ldap_searchobj **solistp );
90 LDAPFUNCDECL void
91 ldap_free_searchprefs( struct ldap_searchobj *solist );
93 LDAPFUNCDECL struct ldap_searchobj *
94 ldap_first_searchobj( struct ldap_searchobj *solist );
96 LDAPFUNCDECL struct ldap_searchobj *
97 ldap_next_searchobj( struct ldap_searchobj *sollist,
98 struct ldap_searchobj *so );
100 #endif /* !NEEDPROTOS */
103 #ifdef __cplusplus
105 #endif
106 #endif /* _SRCHPREF_H */