X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Ffilter_zoom.cpp;h=68252b2aa6486b7db09b2b94d86dd3bcfe8430fc;hb=f769e0395476e212ad2757538e546503edfda838;hp=de0727230d7adcf01dba2b1d1b37fed439e3bfa2;hpb=85c1dafe0ef729111322b69aa7160c59838d16b4;p=metaproxy-moved-to-github.git diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index de07272..68252b2 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -42,6 +42,7 @@ namespace yf = mp::filter; namespace metaproxy_1 { namespace filter { struct Zoom::Searchable : boost::noncopyable { + std::string authentication; std::string database; std::string target; std::string query_encoding; @@ -202,7 +203,7 @@ int yf::Zoom::Backend::get_error(const char **addinfo) yf::Zoom::Searchable::Searchable() { piggyback = true; - use_turbomarc = false; + use_turbomarc = true; ccl_bibset = ccl_qual_mk(); } @@ -297,7 +298,12 @@ void yf::Zoom::Impl::parse_torus(const xmlNode *ptr1) { if (ptr3->type != XML_ELEMENT_NODE) continue; - if (!strcmp((const char *) ptr3->name, "id")) + if (!strcmp((const char *) ptr3->name, + "authentication")) + { + s->authentication = mp::xml::get_text(ptr3); + } + else if (!strcmp((const char *) ptr3->name, "id")) { s->database = mp::xml::get_text(ptr3); } @@ -342,7 +348,7 @@ void yf::Zoom::Impl::parse_torus(const xmlNode *ptr1) else if (!strcmp((const char *) ptr3->name, "useTurboMarc")) { - s->use_turbomarc = mp::xml::get_bool(ptr3, false); + ; // useTurboMarc is ignored } else if (!strncmp((const char *) ptr3->name, "cclmap_", 7)) @@ -466,6 +472,9 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( if (sptr->query_encoding.length()) b->set_option("rpnCharset", sptr->query_encoding.c_str()); + if (sptr->authentication.length()) + b->set_option("user", sptr->authentication.c_str()); + std::string url; if (sptr->sru.length()) {