This changes the API.
virtual void process(Package & package) const = 0;
/// configuration during filter load
- virtual void configure(const xmlNode * ptr, bool test_only);
+ virtual void configure(const xmlNode * ptr, bool test_only,
+ const char *path) = 0;
virtual void start() const;
};
}
return package.move();
};
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path) { };
};
int main(int argc, char **argv)
namespace mp = metaproxy_1;
-void mp::filter::Base::configure(const xmlNode * ptr, bool test_only)
-{
- mp::xml::check_empty(ptr);
-}
-
void mp::filter::Base::start() const
{
-
}
-
/*
* Local variables:
* c-basic-offset: 4
// Read XML config.. Put config info in m_p.
-void mp::filter::AuthSimple::configure(const xmlNode * ptr, bool test_only)
+void mp::filter::AuthSimple::configure(const xmlNode * ptr, bool test_only,
+ const char *path)
{
std::string userRegisterName;
std::string targetRegisterName;
public:
AuthSimple();
~AuthSimple();
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
void process(metaproxy_1::Package & package) const;
private:
void config_userRegister(std::string filename);
m_p->m_sessions.release(package.session());
}
+void mp::filter::BackendTest::configure(const xmlNode * ptr, bool test_only,
+ const char *path)
+{
+ mp::xml::check_empty(ptr);
+}
+
static mp::filter::Base* filter_creator()
{
return new mp::filter::BackendTest;
~BackendTest();
BackendTest();
void process(metaproxy_1::Package & package) const;
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
private:
boost::scoped_ptr<Rep> m_p;
};
return;
}
+void mp::filter::Bounce::configure(const xmlNode * ptr, bool test_only,
+ const char *path)
+{
+ mp::xml::check_empty(ptr);
+}
+
static mp::filter::Base* filter_creator()
{
return new mp::filter::Bounce;
Bounce();
~Bounce();
void process(metaproxy_1::Package & package) const;
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
package.move();
}
-void yf::CGI::configure(const xmlNode *ptr, bool test_only)
+void yf::CGI::configure(const xmlNode *ptr, bool test_only, const char *path)
{
for (ptr = ptr->children; ptr; ptr = ptr->next)
{
CGI();
~CGI();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::CQLtoRPN::configure(const xmlNode *xmlnode, bool test_only)
+void yf::CQLtoRPN::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
CQLtoRPN();
~CQLtoRPN();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
private:
};
}
class Filter_dl: public mp::filter::Base {
public:
void process(mp::Package & package) const;
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
{
}
+void mp::filter::Filter_dl::configure(const xmlNode * ptr, bool test_only,
+ const char *path)
+{
+ mp::xml::check_empty(ptr);
+}
+
static mp::filter::Base* filter_creator()
{
return new mp::filter::Filter_dl;
delete tt;
}
-void mp::filter::FrontendNet::configure(const xmlNode * ptr, bool test_only)
+void mp::filter::FrontendNet::configure(const xmlNode * ptr, bool test_only,
+ const char *path)
{
if (!ptr || !ptr->children)
{
FrontendNet();
~FrontendNet();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
public:
/// set ports
void set_ports(std::vector<Port> &ports);
package.move();
}
-void mp::filter::HttpFile::configure(const xmlNode * ptr, bool test_only)
+void mp::filter::HttpFile::configure(const xmlNode * ptr, bool test_only,
+ const char *path)
{
for (ptr = ptr->children; ptr; ptr = ptr->next)
{
HttpFile();
~HttpFile();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::Limit::configure(const xmlNode *xmlnode, bool test_only)
+void yf::Limit::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
Limit();
~Limit();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::LoadBalance::configure(const xmlNode *xmlnode, bool test_only)
+void yf::LoadBalance::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
LoadBalance();
~LoadBalance();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::Log::configure(const xmlNode *xmlnode, bool test_only)
+void yf::Log::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
Log(const std::string &x);
~Log();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
- //class LFile;
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
private:
class Impl;
boost::scoped_ptr<Impl> m_p;
m_p->release_frontend(package);
}
-void mp::filter::Multi::configure(const xmlNode * ptr, bool test_only)
+void mp::filter::Multi::configure(const xmlNode * ptr, bool test_only,
+ const char *path)
{
for (ptr = ptr->children; ptr; ptr = ptr->next)
{
~Multi();
Multi();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
void add_map_host2hosts(std::string host,
std::list<std::string> hosts,
std::string route);
m_p->process(package);
}
-void mp::filter::QueryRewrite::configure(const xmlNode *ptr, bool test_only)
+void mp::filter::QueryRewrite::configure(const xmlNode *ptr, bool test_only,
+ const char *path)
{
m_p->configure(ptr);
}
QueryRewrite();
~QueryRewrite();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::RecordTransform::configure(const xmlNode *xmlnode, bool test_only)
+void yf::RecordTransform::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
RecordTransform();
~RecordTransform();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
m_p->release_frontend(package);
}
-void yf::SessionShared::configure(const xmlNode *ptr, bool test_only)
+void yf::SessionShared::configure(const xmlNode *ptr, bool test_only,
+ const char *path)
{
for (ptr = ptr->children; ptr; ptr = ptr->next)
{
~SessionShared();
SessionShared();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
void start() const;
private:
boost::scoped_ptr<Rep> m_p;
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::SRUtoZ3950::configure(const xmlNode *xmlnode, bool test_only)
+void yf::SRUtoZ3950::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
public:
SRUtoZ3950();
~SRUtoZ3950();
- void configure(const xmlNode *xmlnode, bool test_only);
+ void configure(const xmlNode *xmlnode, bool test_only,
+ const char *path);
void process(metaproxy_1::Package & package) const;
};
}
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::Template::configure(const xmlNode *xmlnode, bool test_only)
+void yf::Template::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
Template();
~Template();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
m_p->release_frontend(package);
}
-void mp::filter::VirtualDB::configure(const xmlNode * ptr, bool test_only)
+void mp::filter::VirtualDB::configure(const xmlNode * ptr, bool test_only,
+ const char *path)
{
for (ptr = ptr->children; ptr; ptr = ptr->next)
{
~VirtualDB();
VirtualDB();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
void add_map_db2targets(std::string db,
std::list<std::string> targets,
std::string route);
}
}
-void yf::Z3950Client::configure(const xmlNode *ptr, bool test_only)
+void yf::Z3950Client::configure(const xmlNode *ptr, bool test_only,
+ const char *path)
{
for (ptr = ptr->children; ptr; ptr = ptr->next)
{
~Z3950Client();
Z3950Client();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
private:
boost::scoped_ptr<Rep> m_p;
};
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::ZeeRexExplain::configure(const xmlNode *xmlnode, bool test_only)
+void yf::ZeeRexExplain::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
public:
ZeeRexExplain();
~ZeeRexExplain();
- void configure(const xmlNode *xmlnode, bool test_only);
+ void configure(const xmlNode *xmlnode, bool test_only,
+ const char *path);
void process(metaproxy_1::Package & package) const;
};
}
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::Zoom::configure(const xmlNode *xmlnode, bool test_only)
+void yf::Zoom::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode, test_only);
}
Zoom();
~Zoom();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * ptr, bool test_only);
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
};
}
}
}
mp::filter::Base* filter_base = m_factory->create(type_value);
- filter_base->configure(node, test_only);
+ filter_base->configure(node, test_only, file_include_path);
if (m_id_filter_map.find(id_value) != m_id_filter_map.end())
throw mp::XMLError("Filter " + id_value + " already defined");
}
mp::filter::Base* filter_base = m_factory->create(type_value);
- filter_base->configure(node3, test_only);
+ filter_base->configure(node3, test_only, file_include_path);
route.m_list.push_back(
boost::shared_ptr<mp::filter::Base>(filter_base));
class TFilter: public mp::filter::Base {
public:
void process(mp::Package & package) const {};
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path) { };
};
void process(mp::Package & package) const {
package.move();
};
- void configure(const xmlNode* ptr, bool test_only);
+ void configure(const xmlNode* ptr, bool test_only, const char *path);
int get_constant() const { return m_constant; };
private:
const xmlNode *m_ptr;
};
-void FilterConstant::configure(const xmlNode* ptr, bool test_only)
+void FilterConstant::configure(const xmlNode* ptr, bool test_only,
+ const char *path)
{
m_ptr = ptr;
void process(mp::Package & package) const {
package.move();
};
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path) { };
};
{
xmlNodePtr root_element = xmlDocGetRootElement(doc);
- base->configure(root_element, true);
+ base->configure(root_element, true, 0);
xmlFreeDoc(doc);
}
}
package.move();
};
+ void configure(const xmlNode* ptr, bool test_only, const char *path) {};
};
class XFilter: public mp::filter::Base {
public:
void process(mp::Package & package) const;
+ void configure(const xmlNode* ptr, bool test_only, const char *path) {};
};
void XFilter::process(mp::Package & package) const
class YFilter: public mp::filter::Base {
public:
void process(mp::Package & package) const;
+ void configure(const xmlNode* ptr, bool test_only, const char *path) {};
};
void YFilter::process(mp::Package & package) const
}
return package.move();
};
+ void configure(const xmlNode* ptr, bool test_only, const char *path) {};
};
}
return package.move();
};
+ void configure(const xmlNode* ptr, bool test_only, const char *path) {};
};
}
package.move();
};
+ void configure(const xmlNode* ptr, bool test_only, const char *path) {};
};
// creating and configuring filter
mp::filter::QueryRewrite f_query_rewrite;
- f_query_rewrite.configure(root_element, true);
+ f_query_rewrite.configure(root_element, true, 0);
// remeber to free XML DOM
xmlFreeDoc(doc);
// creating and configuring filter
mp::filter::RecordTransform f_rec_trans;
- f_rec_trans.configure(root_element, true);
+ f_rec_trans.configure(root_element, true, 0);
// remeber to free XML DOM
xmlFreeDoc(doc);
void process(mp::Package & package) const {};
TFilter() { tfilter_ref++; };
~TFilter() { tfilter_ref--; };
+ void configure(const xmlNode* ptr, bool test_only, const char *path) {};
};
static mp::filter::Base* filter_creator()