+void yf::SessionShared::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, "resultset"))
+ {
+ const struct _xmlAttr *attr;
+ for (attr = ptr->properties; attr; attr = attr->next)
+ {
+ if (!strcmp((const char *) attr->name, "ttl"))
+ m_p->m_resultset_ttl =
+ mp::xml::get_int(attr->children, 30);
+ else if (!strcmp((const char *) attr->name, "max"))
+ {
+ m_p->m_resultset_max =
+ mp::xml::get_int(attr->children, 10);
+ }
+ else
+ throw mp::filter::FilterException(
+ "Bad attribute " + std::string((const char *)
+ attr->name));
+ }
+ }
+ else if (!strcmp((const char *) ptr->name, "session"))
+ {
+ const struct _xmlAttr *attr;
+ for (attr = ptr->properties; attr; attr = attr->next)
+ {
+ if (!strcmp((const char *) attr->name, "ttl"))
+ m_p->m_session_ttl =
+ mp::xml::get_int(attr->children, 120);
+ else
+ throw mp::filter::FilterException(
+ "Bad attribute " + std::string((const char *)
+ attr->name));
+ }
+ }
+ else
+ {
+ throw mp::filter::FilterException("Bad element "
+ + std::string((const char *)
+ ptr->name));
+ }
+ }
+}
+