2 * Copyright (C) 2005-2006, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: retrieval.c,v 1.1 2006-05-04 20:00:45 adam Exp $
9 * \brief Retrieval utility
17 #include <yaz/retrieval.h>
18 #include <yaz/wrbuf.h>
19 #include <yaz/xmalloc.h>
21 #include <yaz/tpath.h>
24 #include <libxml/parser.h>
25 #include <libxml/tree.h>
26 #include <libxml/xinclude.h>
27 #include <libxslt/xsltutils.h>
28 #include <libxslt/transform.h>
30 /** \brief The internal structure for yaz_retrieval_t */
31 struct yaz_retrieval_struct {
32 /** \brief memory for configuration */
35 /** \brief string buffer for error messages */
38 /** \brief record conversion */
39 yaz_record_conv_t record_conv;
42 yaz_retrieval_t yaz_retrieval_create()
44 yaz_retrieval_t p = xmalloc(sizeof(*p));
45 p->nmem = nmem_create();
46 p->wr_error = wrbuf_alloc();
47 p->record_conv = yaz_record_conv_create();
51 void yaz_retrieval_destroy(yaz_retrieval_t p)
55 nmem_destroy(p->nmem);
56 wrbuf_free(p->wr_error, 1);
57 yaz_record_conv_destroy(p->record_conv);
62 int yaz_retrieval_configure(yaz_retrieval_t p, const void *node)
64 wrbuf_rewind(p->wr_error);
65 wrbuf_printf(p->wr_error, "yaz_retrieval_request: not implemented");
69 int yaz_retrieval_request(yaz_retrieval_t p, const char *schema,
70 const char *format, yaz_record_conv_t *rc)
72 wrbuf_rewind(p->wr_error);
73 wrbuf_printf(p->wr_error, "yaz_retrieval_request: not implemented");
77 const char *yaz_retrieval_get_error(yaz_retrieval_t p)
79 return wrbuf_buf(p->wr_error);
82 void yaz_retrieval_set_path(yaz_retrieval_t p, const char *path)
84 yaz_record_conv_set_path(p->record_conv, path);
92 * indent-tabs-mode: nil
94 * vim: shiftwidth=4 tabstop=8 expandtab