From 45beb75c13c772c5dc305cb443208862f33061c7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 12 Aug 2010 15:27:24 +0200 Subject: [PATCH] Rename yaz_solr_encode -> yaz_solr_encode_request --- client/client.c | 2 +- include/yaz/srw.h | 13 +++++++++++-- src/solr.c | 4 ++-- src/zoom-sru.c | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/client/client.c b/client/client.c index d4bd50e..6bb6b5e 100644 --- a/client/client.c +++ b/client/client.c @@ -1284,7 +1284,7 @@ static int send_srw_host_path(Z_SRW_PDU *sr, const char *host_port, } else if (!yaz_matchstr(sru_method, "solr")) { - yaz_solr_encode(gdu->u.HTTP_Request, sr, out, charset); + yaz_solr_encode_request(gdu->u.HTTP_Request, sr, out, charset); } return send_gdu(gdu); diff --git a/include/yaz/srw.h b/include/yaz/srw.h index 981097a..7c2e575 100644 --- a/include/yaz/srw.h +++ b/include/yaz/srw.h @@ -309,8 +309,17 @@ YAZ_EXPORT int yaz_sru_post_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, ODR encode, const char *charset); YAZ_EXPORT int yaz_sru_soap_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, ODR odr, const char *charset); -YAZ_EXPORT int yaz_solr_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, - ODR encode, const char *charset); + +/** \brief encode SOLR request (HTTP) + \param hreq HTTP request to be modified (with encoded request) + \param srw_pdu SRW request + \param encode ODR for result + \param charset character set for request (may be NULL) + \retval -1 fail + \retval 0 OK +*/ +YAZ_EXPORT int yaz_solr_encode_request(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, + ODR encode, const char *charset); YAZ_EXPORT char *yaz_negotiate_sru_version(char *input_ver); diff --git a/src/solr.c b/src/solr.c index 1783440..c602d2e 100644 --- a/src/solr.c +++ b/src/solr.c @@ -132,8 +132,8 @@ int yaz_solr_decode_response(ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup) #endif } -int yaz_solr_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, - ODR encode, const char *charset) +int yaz_solr_encode_request(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, + ODR encode, const char *charset) { const char *solr_op = 0; char *name[30], *value[30]; diff --git a/src/zoom-sru.c b/src/zoom-sru.c index 0ff4e3c..2319387 100644 --- a/src/zoom-sru.c +++ b/src/zoom-sru.c @@ -51,7 +51,7 @@ static zoom_ret send_srw(ZOOM_connection c, Z_SRW_PDU *sr) } else if (c->sru_mode == zoom_sru_solr) { - yaz_solr_encode(gdu->u.HTTP_Request, sr, c->odr_out, c->charset); + yaz_solr_encode_request(gdu->u.HTTP_Request, sr, c->odr_out, c->charset); } if (!z_GDU(c->odr_out, &gdu, 0, 0)) return zoom_complete; -- 1.7.10.4