xref: /illumos-gate/usr/src/lib/libnisdb/ldap_nisdbquery.h (revision 201ceb75ab95f9bf1f42ea1dc9ab363b43ba47cf)
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 #ifndef	_LDAP_NISDBQUERY_H
28 #define	_LDAP_NISDBQUERY_H
29 
30 #include <rpcsvc/nis.h>
31 #include "ldap_parse.h"
32 #include "db_query_c.h"
33 #include "ldap_ruleval.h"
34 #include "ldap_map.h"
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 /* Exported functions */
41 item		*buildItem(int len, void *value);
42 void		freeItem(item *i);
43 void		freeQcomp(db_qcomp *qc, int doFree);
44 db_query	*buildQuery(int num_components, db_qcomp *components);
45 db_query	*cloneQuery(db_query *old, int numComps);
46 void		freeQuery(db_query *q);
47 void		freeQueries(db_query **q, int numQ);
48 db_query	**createQuery(int num, char **index, __nis_table_mapping_t *t,
49 			__nis_rule_value_t **rvP, int *numVals);
50 void		printQuery(db_query *q, __nis_table_mapping_t *t);
51 db_query	**createNisPlusEntry(__nis_table_mapping_t *t,
52 			__nis_rule_value_t *rv, db_query *qin,
53 			__nis_obj_attr_t ***objAttr,
54 			int *numQueries);
55 db_query	**ruleValue2Query(__nis_table_mapping_t *t,
56 			__nis_rule_value_t *rv, db_query *qin,
57 			__nis_obj_attr_t ***objAttr,
58 			int *numQueries);
59 db_query	*pseudoEntryObj2Query(entry_obj *e, nis_object *tobj,
60 			__nis_rule_value_t *rv);
61 db_query	*queryFromComponent(db_query *q, int index, db_query *qbuf);
62 
63 #ifdef	__cplusplus
64 }
65 #endif	/* __cplusplus */
66 
67 #endif	/* _LDAP_NISDBQUERY_H */
68