-/* $Id: filter_multi.cpp,v 1.16 2006-05-15 11:40:26 adam Exp $
+/* $Id: filter_multi.cpp,v 1.17 2006-05-15 13:22:02 adam Exp $
Copyright (c) 2005-2006, Index Data.
%LICENSE%
FrontendPtr get_frontend(Package &package);
void release_frontend(Package &package);
private:
- std::map<std::string, Multi::Map>m_maps;
std::map<std::string,std::string> m_target_route;
boost::mutex m_mutex;
boost::condition m_cond_session_ready;
}
-void yf::Multi::add_map_host2hosts(std::string host,
- std::list<std::string> hosts,
- std::string route)
-{
- m_p->m_maps[host] = Multi::Map(hosts, route);
-}
-
void yf::Multi::Backend::operator() (void)
{
m_package->move(m_route);
std::cout << "route=" << route << " target=" << target << "\n";
m_p->m_target_route[target] = route;
}
- else if (!strcmp((const char *) ptr->name, "virtual"))
- {
- std::list<std::string> targets;
- std::string vhost;
- xmlNode *v_node = ptr->children;
- for (; v_node; v_node = v_node->next)
- {
- if (v_node->type != XML_ELEMENT_NODE)
- continue;
-
- if (mp::xml::is_element_yp2(v_node, "vhost"))
- vhost = mp::xml::get_text(v_node);
- else if (mp::xml::is_element_yp2(v_node, "target"))
- targets.push_back(mp::xml::get_text(v_node));
- else
- throw mp::filter::FilterException
- ("Bad element "
- + std::string((const char *) v_node->name)
- + " in virtual section"
- );
- }
- std::string route = mp::xml::get_route(ptr);
- add_map_host2hosts(vhost, targets, route);
- std::list<std::string>::const_iterator it;
- for (it = targets.begin(); it != targets.end(); it++)
- {
- std::cout << "Add " << vhost << "->" << *it
- << "," << route << "\n";
- }
- }
else
{
throw mp::filter::FilterException
-/* $Id: filter_virt_db.cpp,v 1.38 2006-05-15 11:43:01 adam Exp $
+/* $Id: filter_virt_db.cpp,v 1.39 2006-05-15 13:22:02 adam Exp $
Copyright (c) 2005-2006, Index Data.
%LICENSE%
fixup_npr(gdu->u.z3950->u.searchResponse->records, database, odr);
p.response() = gdu;
}
-
}
void yf::Virt_db::Frontend::present(Package &package, Z_APDU *apdu_req)