{
Z_SRW_PDU *sr = 0;
ODR o = odr_createmem(ODR_DECODE);
- ret = yaz_solr_decode(o, hres, &sr);
+ ret = yaz_solr_decode_response(o, hres, &sr);
if (ret == 0 && sr->which == Z_SRW_searchRetrieve_response)
handle_srw_response(sr->u.response);
YAZ_EXPORT int yaz_srw_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
Z_SOAP **soap_package, ODR decode, char **charset);
+
YAZ_EXPORT int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
Z_SOAP **soap_package, ODR decode,
char **charset,
Z_SRW_diagnostic **, int *num_diagnostic);
-YAZ_EXPORT int yaz_solr_decode(ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup);
+/** \brief decode SOLR response (HTTP)
+ \param o ODR for result
+ \param hres HTTP response to be decoded
+ \param pdup SRW response pointer (set if successful)
+ \retval -1 fail
+ \retval 0 OK
+*/
+YAZ_EXPORT int yaz_solr_decode_response(ODR o, Z_HTTP_Response *hres,
+ Z_SRW_PDU **pdup);
YAZ_EXPORT void yaz_add_srw_diagnostic(ODR o, Z_SRW_diagnostic **d,
#include <libxml/tree.h>
#endif
-int yaz_solr_decode(ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup)
+int yaz_solr_decode_response(ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup)
{
#if YAZ_HAVE_XML2
const char *content_buf = hres->content_buf;
else if (c->sru_mode == zoom_sru_solr)
{
Z_SRW_PDU *sr;
- ret = yaz_solr_decode(c->odr_in, hres, &sr);
+ ret = yaz_solr_decode_response(c->odr_in, hres, &sr);
if (ret == 0)
if (sr->which == Z_SRW_searchRetrieve_response)
*cret = handle_srw_response(c, sr->u.response);