Rename from yp2 to metaproxy. The namespace for all definitions
[metaproxy-moved-to-github.git] / src / filter_virt_db.hpp
index cd06081..447b2eb 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: filter_virt_db.hpp,v 1.1 2005-10-24 14:33:30 adam Exp $
-   Copyright (c) 2005, Index Data.
+/* $Id: filter_virt_db.hpp,v 1.15 2006-03-16 10:40:59 adam Exp $
+   Copyright (c) 2005-2006, Index Data.
 
 %LICENSE%
  */
@@ -9,24 +9,42 @@
 
 #include <stdexcept>
 #include <list>
+#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
 
 #include "filter.hpp"
 
-namespace yp2 {
+namespace metaproxy_1 {
     namespace filter {
         class Virt_db : public Base {
             class Rep;
+            struct Frontend;
+            struct Map;
+            struct Set;
+            struct Backend;
+            typedef boost::shared_ptr<Backend> BackendPtr;
+            typedef boost::shared_ptr<Frontend> FrontendPtr;
         public:
             ~Virt_db();
             Virt_db();
-            void process(yp2::Package & package) const;
-            void add_map_db2vhost(std::string db, std::string vhost);
+            void process(metaproxy_1::Package & package) const;
+            void configure(const xmlNode * ptr);
+            void add_map_db2targets(std::string db,
+                                    std::list<std::string> targets,
+                                    std::string route);
+            void add_map_db2target(std::string db,
+                                   std::string target,
+                                   std::string route);
         private:
-            Rep *m_p;
+            boost::scoped_ptr<Rep> m_p;
         };
     }
 }
 
+extern "C" {
+    extern struct metaproxy_1_filter_struct metaproxy_1_filter_virt_db;
+}
+
 #endif
 /*
  * Local variables: