xref: /titanic_50/usr/src/lib/libnisdb/ldap_nisdbquery.h (revision c5c4113dfcabb1eed3d4bdf7609de5170027a794)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 #ifndef	_LDAP_NISDBQUERY_H
30 #define	_LDAP_NISDBQUERY_H
31 
32 #include <rpcsvc/nis.h>
33 #include "ldap_parse.h"
34 #include "db_query_c.h"
35 #include "ldap_ruleval.h"
36 #include "ldap_map.h"
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 /* Exported functions */
43 item		*buildItem(int len, void *value);
44 void		freeItem(item *i);
45 void		freeQcomp(db_qcomp *qc, int doFree);
46 db_query	*buildQuery(int num_components, db_qcomp *components);
47 db_query	*cloneQuery(db_query *old, int numComps);
48 void		freeQuery(db_query *q);
49 void		freeQueries(db_query **q, int numQ);
50 db_query	**createQuery(int num, char **index, __nis_table_mapping_t *t,
51 			__nis_rule_value_t **rvP, int *numVals);
52 void		printQuery(db_query *q, __nis_table_mapping_t *t);
53 db_query	**createNisPlusEntry(__nis_table_mapping_t *t,
54 			__nis_rule_value_t *rv, db_query *qin,
55 			__nis_obj_attr_t ***objAttr,
56 			int *numQueries);
57 db_query	**ruleValue2Query(__nis_table_mapping_t *t,
58 			__nis_rule_value_t *rv, db_query *qin,
59 			__nis_obj_attr_t ***objAttr,
60 			int *numQueries);
61 db_query	*pseudoEntryObj2Query(entry_obj *e, nis_object *tobj,
62 			__nis_rule_value_t *rv);
63 db_query	*queryFromComponent(db_query *q, int index, db_query *qbuf);
64 
65 #ifdef	__cplusplus
66 }
67 #endif	/* __cplusplus */
68 
69 #endif	/* _LDAP_NISDBQUERY_H */
70