VOM reshuffle

split the VOM into two halves; a top/front-end and a bottom/backend.
Only the backend includes the auto-generated VAPI.
This serves two purposes:
1 - improves ompile times for VOM, since the VAPI is included
    only in the backend.
2 - does not expose VAPI to users of VOM

Change-Id: I17b93aeaef10c0eba8612016d9034aca5628d9f7
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
diff --git a/src/vpp-api/vom/nat_binding_cmds.cpp b/src/vpp-api/vom/nat_binding_cmds.cpp
index 38630c1..106ec5e 100644
--- a/src/vpp-api/vom/nat_binding_cmds.cpp
+++ b/src/vpp-api/vom/nat_binding_cmds.cpp
@@ -13,12 +13,13 @@
  * limitations under the License.
  */
 
-#include "vom/nat_binding.hpp"
+#include "vom/nat_binding_cmds.hpp"
 
 namespace VOM {
-nat_binding::bind_44_input_cmd::bind_44_input_cmd(HW::item<bool>& item,
-                                                  const handle_t& itf,
-                                                  const zone_t& zone)
+namespace nat_binding_cmds {
+bind_44_input_cmd::bind_44_input_cmd(HW::item<bool>& item,
+                                     const handle_t& itf,
+                                     const nat_binding::zone_t& zone)
   : rpc_cmd(item)
   , m_itf(itf)
   , m_zone(zone)
@@ -26,19 +27,19 @@
 }
 
 bool
-nat_binding::bind_44_input_cmd::operator==(const bind_44_input_cmd& other) const
+bind_44_input_cmd::operator==(const bind_44_input_cmd& other) const
 {
   return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
 }
 
 rc_t
-nat_binding::bind_44_input_cmd::issue(connection& con)
+bind_44_input_cmd::issue(connection& con)
 {
   msg_t req(con.ctx(), std::ref(*this));
 
   auto& payload = req.get_request().get_payload();
   payload.is_add = 1;
-  payload.is_inside = (zone_t::INSIDE == m_zone ? 1 : 0);
+  payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0);
   payload.sw_if_index = m_itf.value();
 
   VAPI_CALL(req.execute());
@@ -49,7 +50,7 @@
 }
 
 std::string
-nat_binding::bind_44_input_cmd::to_string() const
+bind_44_input_cmd::to_string() const
 {
   std::ostringstream s;
   s << "nat-44-input-binding-create: " << m_hw_item.to_string()
@@ -58,9 +59,9 @@
   return (s.str());
 }
 
-nat_binding::unbind_44_input_cmd::unbind_44_input_cmd(HW::item<bool>& item,
-                                                      const handle_t& itf,
-                                                      const zone_t& zone)
+unbind_44_input_cmd::unbind_44_input_cmd(HW::item<bool>& item,
+                                         const handle_t& itf,
+                                         const nat_binding::zone_t& zone)
   : rpc_cmd(item)
   , m_itf(itf)
   , m_zone(zone)
@@ -68,20 +69,19 @@
 }
 
 bool
-nat_binding::unbind_44_input_cmd::operator==(
-  const unbind_44_input_cmd& other) const
+unbind_44_input_cmd::operator==(const unbind_44_input_cmd& other) const
 {
   return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
 }
 
 rc_t
-nat_binding::unbind_44_input_cmd::issue(connection& con)
+unbind_44_input_cmd::issue(connection& con)
 {
   msg_t req(con.ctx(), std::ref(*this));
 
   auto& payload = req.get_request().get_payload();
   payload.is_add = 0;
-  payload.is_inside = (zone_t::INSIDE == m_zone ? 1 : 0);
+  payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0);
   payload.sw_if_index = m_itf.value();
 
   VAPI_CALL(req.execute());
@@ -92,7 +92,7 @@
 }
 
 std::string
-nat_binding::unbind_44_input_cmd::to_string() const
+unbind_44_input_cmd::to_string() const
 {
   std::ostringstream s;
   s << "nat-44-input-binding-create: " << m_hw_item.to_string()
@@ -101,22 +101,22 @@
   return (s.str());
 }
 
-nat_binding::dump_44_cmd::dump_44_cmd()
+dump_44_cmd::dump_44_cmd()
 {
 }
 
-nat_binding::dump_44_cmd::dump_44_cmd(const dump_44_cmd& d)
+dump_44_cmd::dump_44_cmd(const dump_44_cmd& d)
 {
 }
 
 bool
-nat_binding::dump_44_cmd::operator==(const dump_44_cmd& other) const
+dump_44_cmd::operator==(const dump_44_cmd& other) const
 {
   return (true);
 }
 
 rc_t
-nat_binding::dump_44_cmd::issue(connection& con)
+dump_44_cmd::issue(connection& con)
 {
   m_dump.reset(new msg_t(con.ctx(), std::ref(*this)));
 
@@ -128,11 +128,12 @@
 }
 
 std::string
-nat_binding::dump_44_cmd::to_string() const
+dump_44_cmd::to_string() const
 {
   return ("nat-binding-dump");
 }
 }
+}
 
 /*
  * fd.io coding-style-patch-verification: ON