4 Copyright (C) Andrew Tridgell 2004
6 ** NOTE! The following LGPL license applies to the ldb
7 ** library. This does NOT imply that all of Samba is released
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 3 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, see <http://www.gnu.org/licenses/>.
24 #ifndef __LDB_COMPAT_H__
25 #define __LDB_COMPAT_H__
27 char *ldb_binary_encode(void *mem_ctx, struct ldb_val val);
28 struct ldb_parse_tree *ldb_parse_tree(void *mem_ctx, const char *s);
31 structures for ldb_parse_tree handling code
33 enum ldb_parse_op { LDB_OP_AND=1, LDB_OP_OR=2, LDB_OP_NOT=3,
34 LDB_OP_EQUALITY=4, LDB_OP_SUBSTRING=5,
35 LDB_OP_GREATER=6, LDB_OP_LESS=7, LDB_OP_PRESENT=8,
36 LDB_OP_APPROX=9, LDB_OP_EXTENDED=10 };
38 struct ldb_parse_tree {
39 enum ldb_parse_op operation;
42 struct ldb_parse_tree *child;
50 int start_with_wildcard;
51 int end_with_wildcard;
52 struct ldb_val **chunks;
68 unsigned int num_elements;
69 struct ldb_parse_tree **elements;
74 struct ldb_message_element {
77 unsigned int num_values;
78 struct ldb_val *values;