summaryrefslogtreecommitdiffstats
path: root/servers/slapd/back-ndb/proto-ndb.h
blob: 458c00f09cc63a9a0ab2fd467d4531f476e5319c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 *
 * Copyright 2008-2021 The OpenLDAP Foundation.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted only as authorized by the OpenLDAP
 * Public License.
 *
 * A copy of this license is available in the file LICENSE in the
 * top-level directory of the distribution or, alternatively, at
 * <http://www.OpenLDAP.org/license.html>.
 */
/* ACKNOWLEDGEMENTS:
 * This work was initially developed by Howard Chu for inclusion
 * in OpenLDAP Software. This work was sponsored by MySQL.
 */

#ifndef _PROTO_NDB_H
#define _PROTO_NDB_H

LDAP_BEGIN_DECL

extern BI_init		ndb_back_initialize;

extern BI_open		ndb_back_open;
extern BI_close		ndb_back_close;
extern BI_destroy	ndb_back_destroy;

extern BI_db_init	ndb_back_db_init;
extern BI_db_destroy	ndb_back_db_destroy;

extern BI_op_bind	ndb_back_bind;
extern BI_op_unbind	ndb_back_unbind;
extern BI_op_search	ndb_back_search;
extern BI_op_compare	ndb_back_compare;
extern BI_op_modify	ndb_back_modify;
extern BI_op_modrdn	ndb_back_modrdn;
extern BI_op_add	ndb_back_add;
extern BI_op_delete	ndb_back_delete;

extern BI_operational	ndb_operational;
extern BI_has_subordinates	ndb_has_subordinates;
extern BI_entry_get_rw	ndb_entry_get;

extern BI_tool_entry_open	ndb_tool_entry_open;
extern BI_tool_entry_close	ndb_tool_entry_close;
extern BI_tool_entry_first	ndb_tool_entry_first;
extern BI_tool_entry_next	ndb_tool_entry_next;
extern BI_tool_entry_get	ndb_tool_entry_get;
extern BI_tool_entry_put	ndb_tool_entry_put;
extern BI_tool_dn2id_get	ndb_tool_dn2id_get;

extern int ndb_modify_internal(
	Operation *op,
	NdbArgs *NA,
	const char **text,
	char *textbuf,
	size_t textlen );

extern int
ndb_entry_get_data(
	Operation *op,
	NdbArgs *args,
	int update );

extern int
ndb_entry_put_data(
	BackendDB *be,
	NdbArgs *args );

extern int
ndb_entry_del_data(
	BackendDB *be,
	NdbArgs *args );

extern int
ndb_entry_put_info(
	BackendDB *be,
	NdbArgs *args,
	int update );

extern int
ndb_entry_get_info(
	Operation *op,
	NdbArgs *args,
	int update,
	struct berval *matched );

extern "C" int
ndb_entry_del_info(
	BackendDB *be,
	NdbArgs *args );

extern int
ndb_dn2rdns(
	struct berval *dn,
	NdbRdns *buf );

extern NdbAttrInfo *
ndb_ai_find( struct ndb_info *ni, AttributeType *at );

extern NdbAttrInfo *
ndb_ai_get( struct ndb_info *ni, struct berval *at );

extern int
ndb_aset_get( struct ndb_info *ni, struct berval *sname, struct berval *attrs, NdbOcInfo **ret );

extern int
ndb_aset_create( struct ndb_info *ni, NdbOcInfo *oci );

extern int
ndb_oc_read( struct ndb_info *ni, const NdbDictionary::Dictionary *dict );

extern int
ndb_oc_attrs(
	NdbTransaction *txn,
	const NdbDictionary::Table *myTable,
	Entry *e,
	NdbOcInfo *no,
	NdbAttrInfo **attrs,
	int nattrs,
	Attribute *old );

extern int
ndb_has_children(
	NdbArgs *NA,
	int *hasChildren );

extern struct berval *
ndb_str2bvarray(
	char *str,
	int len,
	char delim,
	void *ctx );

extern struct berval *
ndb_ref2oclist(
	const char *ref,
	void *ctx );

extern int
ndb_next_id(
	BackendDB *be,
	Ndb *ndb,
	ID *id );

extern int
ndb_thread_handle(
	Operation *op,
	Ndb **ndb );

extern int
ndb_back_init_cf(
	BackendInfo *bi );

extern "C" void
ndb_trans_backoff( int num_retries );

extern "C" void
ndb_check_referral( Operation *op, SlapReply *rs, NdbArgs *NA );

LDAP_END_DECL

#endif /* _PROTO_NDB_H */