+void yf::Z3950Client::configure(const xmlNode *ptr)
+{
+ for (ptr = ptr->children; ptr; ptr = ptr->next)
+ {
+ if (ptr->type != XML_ELEMENT_NODE)
+ continue;
+ if (!strcmp((const char *) ptr->name, "timeout"))
+ {
+ std::string timeout_str = mp::xml::get_text(ptr);
+ int timeout_sec = atoi(timeout_str.c_str());
+ if (timeout_sec < 2)
+ throw mp::filter::FilterException("Bad timeout value "
+ + timeout_str);
+ m_p->m_timeout_sec = timeout_sec;
+ }
+ else
+ {
+ throw mp::filter::FilterException("Bad element "
+ + std::string((const char *)
+ ptr->name));
+ }
+ }
+}
+
+static mp::filter::Base* filter_creator()
+{
+ return new mp::filter::Z3950Client;
+}
+
+extern "C" {
+ struct metaproxy_1_filter_struct metaproxy_1_filter_z3950_client = {
+ 0,
+ "z3950_client",
+ filter_creator
+ };
+}