Year 2007.
[metaproxy-moved-to-github.git] / src / filter_virt_db.hpp
index 9e2991e..4daa8e1 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: filter_virt_db.hpp,v 1.5 2006-01-04 11:19:04 adam Exp $
-   Copyright (c) 2005, Index Data.
+/* $Id: filter_virt_db.hpp,v 1.18 2007-01-25 14:05:54 adam Exp $
+   Copyright (c) 2005-2007, Index Data.
 
-%LICENSE%
+   See the LICENSE file for details
  */
 
 #ifndef FILTER_VIRT_DB_HPP
 #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 VirtualDB : 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);
+            ~VirtualDB();
+            VirtualDB();
+            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:
             boost::scoped_ptr<Rep> m_p;
         };
@@ -29,7 +42,7 @@ namespace yp2 {
 }
 
 extern "C" {
-    extern const struct yp2_filter_struct yp2_filter_virt_db;
+    extern struct metaproxy_1_filter_struct metaproxy_1_filter_virt_db;
 }
 
 #endif