8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libldap5 / include / ldap / srchpref.h
blob03afaf3a0fa4514ff583300cf13c3f6df72ca2a5
1 /*
2 * Copyright (c) 2001 by Sun Microsystems, Inc.
3 * All rights reserved.
4 */
6 #pragma ident "%Z%%M% %I% %E% SMI"
8 /*
9 * The contents of this file are subject to the Netscape Public
10 * License Version 1.1 (the "License"); you may not use this file
11 * except in compliance with the License. You may obtain a copy of
12 * the License at http://www.mozilla.org/NPL/
14 * Software distributed under the License is distributed on an "AS
15 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
16 * implied. See the License for the specific language governing
17 * rights and limitations under the License.
19 * The Original Code is Mozilla Communicator client code, released
20 * March 31, 1998.
22 * The Initial Developer of the Original Code is Netscape
23 * Communications Corporation. Portions created by Netscape are
24 * Copyright (C) 1998-1999 Netscape Communications Corporation. All
25 * Rights Reserved.
27 * Contributor(s):
31 * Copyright (c) 1993, 1994 Regents of the University of Michigan.
32 * All rights reserved.
34 * Redistribution and use in source and binary forms are permitted
35 * provided that this notice is preserved and that due credit is given
36 * to the University of Michigan at Ann Arbor. The name of the University
37 * may not be used to endorse or promote products derived from this
38 * software without specific prior written permission. This software
39 * is provided ``as is'' without express or implied warranty.
41 * searchpref.h: display template library defines
45 #ifndef _SRCHPREF_H
46 #define _SRCHPREF_H
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
52 /* calling conventions used by library */
53 #ifndef LDAP_CALL
54 #if defined( _WINDOWS ) || defined( _WIN32 )
55 #define LDAP_C __cdecl
56 #ifndef _WIN32
57 #define __stdcall _far _pascal
58 #define LDAP_CALLBACK _loadds
59 #else
60 #define LDAP_CALLBACK
61 #endif /* _WIN32 */
62 #define LDAP_PASCAL __stdcall
63 #define LDAP_CALL LDAP_PASCAL
64 #else /* _WINDOWS */
65 #define LDAP_C
66 #define LDAP_CALLBACK
67 #define LDAP_PASCAL
68 #define LDAP_CALL
69 #endif /* _WINDOWS */
70 #endif /* LDAP_CALL */
72 #ifndef _SOLARIS_SDK
74 struct ldap_searchattr {
75 char *sa_attrlabel;
76 char *sa_attr;
77 /* max 32 matchtypes for now */
78 unsigned long sa_matchtypebitmap;
79 char *sa_selectattr;
80 char *sa_selecttext;
81 struct ldap_searchattr *sa_next;
84 struct ldap_searchmatch {
85 char *sm_matchprompt;
86 char *sm_filter;
87 struct ldap_searchmatch *sm_next;
90 struct ldap_searchobj {
91 char *so_objtypeprompt;
92 unsigned long so_options;
93 char *so_prompt;
94 short so_defaultscope;
95 char *so_filterprefix;
96 char *so_filtertag;
97 char *so_defaultselectattr;
98 char *so_defaultselecttext;
99 struct ldap_searchattr *so_salist;
100 struct ldap_searchmatch *so_smlist;
101 struct ldap_searchobj *so_next;
104 #define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
107 * global search object options
109 #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
111 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
112 (((so)->so_options & option ) != 0 )
114 #define LDAP_SEARCHPREF_VERSION_ZERO 0
115 #define LDAP_SEARCHPREF_VERSION 1
117 #define LDAP_SEARCHPREF_ERR_VERSION 1
118 #define LDAP_SEARCHPREF_ERR_MEM 2
119 #define LDAP_SEARCHPREF_ERR_SYNTAX 3
120 #define LDAP_SEARCHPREF_ERR_FILE 4
123 LDAP_API(int)
124 LDAP_CALL
125 ldap_init_searchprefs( char *file, struct ldap_searchobj **solistp );
127 LDAP_API(int)
128 LDAP_CALL
129 ldap_init_searchprefs_buf( char *buf, long buflen,
130 struct ldap_searchobj **solistp );
132 LDAP_API(void)
133 LDAP_CALL
134 ldap_free_searchprefs( struct ldap_searchobj *solist );
136 LDAP_API(struct ldap_searchobj *)
137 LDAP_CALL
138 ldap_first_searchobj( struct ldap_searchobj *solist );
140 LDAP_API(struct ldap_searchobj *)
141 LDAP_CALL
142 ldap_next_searchobj( struct ldap_searchobj *sollist,
143 struct ldap_searchobj *so );
145 #endif /* _SOLARIS_SDK */
147 #ifdef __cplusplus
149 #endif
150 #endif /* _SRCHPREF_H */