#include <boost/shared_ptr.hpp>
#include <metaproxy/util.hpp>
+#include "torus.hpp"
#include <yaz/zgdu.h>
#include <yaz/otherinfo.h>
boost::condition m_cond_session_ready;
std::map<mp::Session, FrontendPtr> m_clients;
bool pass_vhosts;
+ mp::Torus torus;
};
}
}
m_p->release_frontend(package);
}
-
void mp::filter::VirtualDB::configure(const xmlNode * ptr, bool test_only)
{
for (ptr = ptr->children; ptr; ptr = ptr->next)
std::string route = mp::xml::get_route(ptr);
add_map_db2targets(database, targets, route);
}
+ else if (!strcmp((const char *) ptr->name, "torus"))
+ {
+ std::string url;
+ const struct _xmlAttr *attr;
+ for (attr = ptr->properties; attr; attr = attr->next)
+ {
+ if (!strcmp((const char *) attr->name, "url"))
+ url = mp::xml::get_text(attr->children);
+ else
+ throw mp::filter::FilterException(
+ "Bad attribute " + std::string((const char *)
+ attr->name));
+ }
+ m_p->torus.read_searchables(url);
+ }
else
{
throw mp::filter::FilterException