YAZ  5.34.0
retrieval.h
Go to the documentation of this file.
1 /* This file is part of the YAZ toolkit.
2  * Copyright (C) Index Data.
3  * All rights reserved.
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of Index Data nor the names of its contributors
13  * may be used to endorse or promote products derived from this
14  * software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
33 #ifndef YAZ_RETRIEVAL_H
34 #define YAZ_RETRIEVAL_H
35 
36 #include <stddef.h>
37 #include <yaz/wrbuf.h>
38 #include <yaz/yconfig.h>
39 #include <yaz/oid_util.h>
40 #include <yaz/record_conv.h>
41 
43 
46 
50 YAZ_EXPORT yaz_retrieval_t yaz_retrieval_create(void);
51 
55 YAZ_EXPORT void yaz_retrieval_destroy(yaz_retrieval_t p);
56 
57 #if YAZ_HAVE_XML2
88 YAZ_EXPORT
89 int yaz_retrieval_configure(yaz_retrieval_t p, const xmlNode *node);
90 
91 
101 YAZ_EXPORT
102 int yaz_retrieval_configure_t(yaz_retrieval_t p, const xmlNode *node,
103  struct yaz_record_conv_type *types);
104 
105 #endif
106 
122 YAZ_EXPORT
124  const char *schema, const Odr_oid *syntax,
125  const char **match_schema, Odr_oid **match_syntax,
126  yaz_record_conv_t *rc,
127  const char **backend_schema,
128  Odr_oid **backend_syntax);
129 
134 YAZ_EXPORT
136 
137 
142 YAZ_EXPORT
143 void yaz_retrieval_set_path(yaz_retrieval_t p, const char *path);
144 
146 
147 #endif
148 /*
149  * Local variables:
150  * c-basic-offset: 4
151  * c-file-style: "Stroustrup"
152  * indent-tabs-mode: nil
153  * End:
154  * vim: shiftwidth=4 tabstop=8 expandtab
155  */
156 
static int node(struct cql_node *cn, void(*pr)(const char *buf, void *client_data), void *client_data)
Definition: cql2ccl.c:86
Header for OID basic functions.
short Odr_oid
Definition: oid_util.h:42
Record Conversions Utility.
struct yaz_retrieval_struct * yaz_retrieval_t
Definition: retrieval.h:45
void yaz_retrieval_destroy(yaz_retrieval_t p)
Definition: retrieval.c:87
const char * yaz_retrieval_get_error(yaz_retrieval_t p)
Definition: retrieval.c:402
yaz_retrieval_t yaz_retrieval_create(void)
Definition: retrieval.c:75
int yaz_retrieval_configure_t(yaz_retrieval_t p, const xmlNode *node, struct yaz_record_conv_type *types)
Definition: retrieval.c:258
int yaz_retrieval_request(yaz_retrieval_t p, const char *schema, const Odr_oid *syntax, const char **match_schema, Odr_oid **match_syntax, yaz_record_conv_t *rc, const char **backend_schema, Odr_oid **backend_syntax)
Definition: retrieval.c:297
int yaz_retrieval_configure(yaz_retrieval_t p, const xmlNode *node)
Definition: retrieval.c:292
void yaz_retrieval_set_path(yaz_retrieval_t p, const char *path)
Definition: retrieval.c:407
The internal structure for yaz_record_conv_t.
Definition: record_conv.c:44
The internal structure for yaz_retrieval_t.
Definition: retrieval.c:30
char * path
path for opening files
Definition: retrieval.c:41
Header for WRBUF (growing buffer)
Header with fundamental macros.
#define YAZ_BEGIN_CDECL
Definition: yconfig.h:56
#define YAZ_END_CDECL
Definition: yconfig.h:57