1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 1996,2008 Oracle.  All rights reserved.
5 *
6 * $Id: qam_stub.c,v 12.14 2008/01/30 12:18:23 mjc Exp $
7 */
8
9#ifndef	HAVE_QUEUE
10#include "db_config.h"
11
12#include "db_int.h"
13#include "dbinc/db_page.h"
14#include "dbinc/qam.h"
15
16/*
17 * If the library wasn't compiled with the Queue access method, various
18 * routines aren't available.  Stub them here, returning an appropriate
19 * error.
20 */
21
22/*
23 * __db_no_queue_am --
24 *	Error when a Berkeley DB build doesn't include the access method.
25 *
26 * PUBLIC: int __db_no_queue_am __P((ENV *));
27 */
28int
29__db_no_queue_am(env)
30	ENV *env;
31{
32	__db_errx(env,
33    "library build did not include support for the Queue access method");
34	return (DB_OPNOTSUP);
35}
36
37int
38__db_prqueue(dbp, flags)
39	DB *dbp;
40	u_int32_t flags;
41{
42	COMPQUIET(flags, 0);
43	return (__db_no_queue_am(dbp->env));
44}
45
46int
47__qam_31_qammeta(dbp, real_name, buf)
48	DB *dbp;
49	char *real_name;
50	u_int8_t *buf;
51{
52	COMPQUIET(real_name, NULL);
53	COMPQUIET(buf, NULL);
54	return (__db_no_queue_am(dbp->env));
55}
56
57int
58__qam_32_qammeta(dbp, real_name, buf)
59	DB *dbp;
60	char *real_name;
61	u_int8_t *buf;
62{
63	COMPQUIET(real_name, NULL);
64	COMPQUIET(buf, NULL);
65	return (__db_no_queue_am(dbp->env));
66}
67
68int
69__qam_append(dbc, key, data)
70	DBC *dbc;
71	DBT *key, *data;
72{
73	COMPQUIET(key, NULL);
74	COMPQUIET(data, NULL);
75	return (__db_no_queue_am(dbc->env));
76}
77
78int
79__qamc_dup(orig_dbc, new_dbc)
80	DBC *orig_dbc, *new_dbc;
81{
82	COMPQUIET(new_dbc, NULL);
83	return (__db_no_queue_am(orig_dbc->env));
84}
85
86int
87__qamc_init(dbc)
88	DBC *dbc;
89{
90	return (__db_no_queue_am(dbc->env));
91}
92
93int
94__qam_db_close(dbp, flags)
95	DB *dbp;
96	u_int32_t flags;
97{
98	COMPQUIET(dbp, NULL);
99	COMPQUIET(flags, 0);
100	return (0);
101}
102
103int
104__qam_db_create(dbp)
105	DB *dbp;
106{
107	COMPQUIET(dbp, NULL);
108	return (0);
109}
110
111int
112__qam_extent_names(env, name, namelistp)
113	ENV *env;
114	char *name;
115	char ***namelistp;
116{
117	COMPQUIET(name, NULL);
118	COMPQUIET(namelistp, NULL);
119	return (__db_no_queue_am(env));
120}
121
122int
123__qam_gen_filelist(dbp, ip, filelistp)
124	DB *dbp;
125	DB_THREAD_INFO *ip;
126	QUEUE_FILELIST **filelistp;
127{
128	COMPQUIET(ip, NULL);
129	COMPQUIET(filelistp, NULL);
130	return (__db_no_queue_am(dbp->env));
131}
132
133int
134__qam_init_print(env, dtabp)
135	ENV *env;
136	DB_DISTAB *dtabp;
137{
138	COMPQUIET(env, NULL);
139	COMPQUIET(dtabp, NULL);
140	return (0);
141}
142
143int
144__qam_init_recover(env, dtabp)
145	ENV *env;
146	DB_DISTAB *dtabp;
147{
148	COMPQUIET(env, NULL);
149	COMPQUIET(dtabp, NULL);
150	return (0);
151}
152
153int
154__qam_metachk(dbp, name, qmeta)
155	DB *dbp;
156	const char *name;
157	QMETA *qmeta;
158{
159	COMPQUIET(name, NULL);
160	COMPQUIET(qmeta, NULL);
161	return (__db_no_queue_am(dbp->env));
162}
163
164int
165__qam_mswap(env, pg)
166	ENV *env;
167	PAGE *pg;
168{
169	COMPQUIET(pg, NULL);
170	return (__db_no_queue_am(env));
171}
172
173int
174__qam_new_file(dbp, ip, txn, fhp, name)
175	DB *dbp;
176	DB_THREAD_INFO *ip;
177	DB_TXN *txn;
178	DB_FH *fhp;
179	const char *name;
180{
181	COMPQUIET(ip, NULL);
182	COMPQUIET(txn, NULL);
183	COMPQUIET(fhp, NULL);
184	COMPQUIET(name, NULL);
185	return (__db_no_queue_am(dbp->env));
186}
187
188int
189__qam_open(dbp, ip, txn, name, base_pgno, mode, flags)
190	DB *dbp;
191	DB_THREAD_INFO *ip;
192	DB_TXN *txn;
193	const char *name;
194	db_pgno_t base_pgno;
195	int mode;
196	u_int32_t flags;
197{
198	COMPQUIET(ip, NULL);
199	COMPQUIET(txn, NULL);
200	COMPQUIET(name, NULL);
201	COMPQUIET(base_pgno, 0);
202	COMPQUIET(mode, 0);
203	COMPQUIET(flags, 0);
204	return (__db_no_queue_am(dbp->env));
205}
206
207int
208__qam_pgin_out(env, pg, pp, cookie)
209	ENV *env;
210	db_pgno_t pg;
211	void *pp;
212	DBT *cookie;
213{
214	COMPQUIET(pg, 0);
215	COMPQUIET(pp, NULL);
216	COMPQUIET(cookie, NULL);
217	return (__db_no_queue_am(env));
218}
219
220int
221__qam_salvage(dbp, vdp, pgno, h, handle, callback, flags)
222	DB *dbp;
223	VRFY_DBINFO *vdp;
224	db_pgno_t pgno;
225	PAGE *h;
226	void *handle;
227	int (*callback) __P((void *, const void *));
228	u_int32_t flags;
229{
230	COMPQUIET(vdp, NULL);
231	COMPQUIET(pgno, 0);
232	COMPQUIET(h, NULL);
233	COMPQUIET(handle, NULL);
234	COMPQUIET(callback, NULL);
235	COMPQUIET(flags, 0);
236	return (__db_no_queue_am(dbp->env));
237}
238
239int
240__qam_set_ext_data(dbp, name)
241	DB *dbp;
242	const char *name;
243{
244	COMPQUIET(name, NULL);
245	return (__db_no_queue_am(dbp->env));
246}
247
248int
249__qam_stat(dbc, spp, flags)
250	DBC *dbc;
251	void *spp;
252	u_int32_t flags;
253{
254	COMPQUIET(spp, NULL);
255	COMPQUIET(flags, 0);
256	return (__db_no_queue_am(dbc->env));
257}
258
259int
260__qam_stat_print(dbc, flags)
261	DBC *dbc;
262	u_int32_t flags;
263{
264	COMPQUIET(flags, 0);
265	return (__db_no_queue_am(dbc->env));
266}
267
268int
269__qam_sync(dbp)
270	DB *dbp;
271{
272	return (__db_no_queue_am(dbp->env));
273}
274
275int
276__qam_truncate(dbc, countp)
277	DBC *dbc;
278	u_int32_t *countp;
279{
280	COMPQUIET(dbc, NULL);
281	COMPQUIET(countp, NULL);
282	return (__db_no_queue_am(dbc->env));
283}
284
285int
286__qam_vrfy_data(dbp, vdp, h, pgno, flags)
287	DB *dbp;
288	VRFY_DBINFO *vdp;
289	QPAGE *h;
290	db_pgno_t pgno;
291	u_int32_t flags;
292{
293	COMPQUIET(vdp, NULL);
294	COMPQUIET(h, NULL);
295	COMPQUIET(pgno, 0);
296	COMPQUIET(flags, 0);
297	return (__db_no_queue_am(dbp->env));
298}
299
300int
301__qam_vrfy_meta(dbp, vdp, meta, pgno, flags)
302	DB *dbp;
303	VRFY_DBINFO *vdp;
304	QMETA *meta;
305	db_pgno_t pgno;
306	u_int32_t flags;
307{
308	COMPQUIET(vdp, NULL);
309	COMPQUIET(meta, NULL);
310	COMPQUIET(pgno, 0);
311	COMPQUIET(flags, 0);
312	return (__db_no_queue_am(dbp->env));
313}
314
315int
316__qam_vrfy_structure(dbp, vdp, flags)
317	DB *dbp;
318	VRFY_DBINFO *vdp;
319	u_int32_t flags;
320{
321	COMPQUIET(vdp, NULL);
322	COMPQUIET(flags, 0);
323	return (__db_no_queue_am(dbp->env));
324}
325
326int
327__qam_vrfy_walkqueue(dbp, vdp, handle, callback, flags)
328	DB *dbp;
329	VRFY_DBINFO *vdp;
330	void *handle;
331	int (*callback) __P((void *, const void *));
332	u_int32_t flags;
333{
334	COMPQUIET(vdp, NULL);
335	COMPQUIET(handle, NULL);
336	COMPQUIET(callback, NULL);
337	COMPQUIET(flags, 0);
338	return (__db_no_queue_am(dbp->env));
339}
340#endif	/* !HAVE_QUEUE */
341