Initial client. Thrift-generated code.
authorMarc Burns <m4burns@strombola.csclub.uwaterloo.ca>
Fri, 11 Nov 2011 01:28:04 +0000 (20:28 -0500)
committerMarc Burns <m4burns@strombola.csclub.uwaterloo.ca>
Fri, 11 Nov 2011 01:28:04 +0000 (20:28 -0500)
12 files changed:
database/client.cpp [new file with mode: 0644]
database/db.conf [new file with mode: 0644]
database/gen-cpp/Pos.cpp [new file with mode: 0644]
database/gen-cpp/Pos.h [new file with mode: 0644]
database/gen-cpp/Pos_server.skeleton.cpp [new file with mode: 0644]
database/gen-cpp/pos_constants.cpp [new file with mode: 0644]
database/gen-cpp/pos_constants.h [new file with mode: 0644]
database/gen-cpp/pos_types.cpp [new file with mode: 0644]
database/gen-cpp/pos_types.h [new file with mode: 0644]
database/pos.thrift
database/sha1.cpp
database/sha1.h

diff --git a/database/client.cpp b/database/client.cpp
new file mode 100644 (file)
index 0000000..cdc8d18
--- /dev/null
@@ -0,0 +1,39 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <protocol/TBinaryProtocol.h>
+#include <transport/TSocket.h>
+#include <transport/TTransportUtils.h>
+#include "Pos.h"
+#include "sha1.h"
+#include <iostream>
+
+using namespace std;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+
+using namespace pos;
+
+using namespace boost;
+
+int main(int argc, char** argv) {
+  shared_ptr<TTransport> socket(new TSocket("localhost", 9090));
+  shared_ptr<TTransport> transport(new TBufferedTransport(socket));
+  shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));
+  PosClient client(protocol);
+
+  try {
+    transport->open();
+
+    client.ping();
+    std::string s;
+    client.getSalt(s);
+    cout << (s = SHA1Hash(s + "balls").toHex()) << "\n";
+    cout << s << " " << client.associateHashWithName(s, "dongs dongs dongs", "m4burns") << "\n";
+  } catch(TException & e) {
+    std::cerr << e.what() << "\n";
+  }
+
+  return 0;
+}
+
diff --git a/database/db.conf b/database/db.conf
new file mode 100644 (file)
index 0000000..77a458e
--- /dev/null
@@ -0,0 +1,4 @@
+key_lifetime = 120
+salt_size = 256
+secret = balls
+db_file = db
diff --git a/database/gen-cpp/Pos.cpp b/database/gen-cpp/Pos.cpp
new file mode 100644 (file)
index 0000000..c6d3862
--- /dev/null
@@ -0,0 +1,5780 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "Pos.h"
+
+namespace pos {
+
+uint32_t Pos_ping_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_ping_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_ping_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_ping_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_ping_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_ping_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_ping_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_ping_result");
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_ping_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getSalt_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getSalt_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getSalt_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getSalt_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getSalt_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getSalt_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getSalt_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getSalt_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getSalt_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getAccountFromHash_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->dataToHash);
+          this->__isset.dataToHash = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getAccountFromHash_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getAccountFromHash_args");
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->dataToHash);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getAccountFromHash_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getAccountFromHash_pargs");
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->dataToHash)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getAccountFromHash_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getAccountFromHash_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getAccountFromHash_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0);
+    xfer += oprot->writeI32(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getAccountFromHash_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountId_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->account);
+          this->__isset.account = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountId_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getHashesFromAccountId_args");
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeI32(this->account);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getHashesFromAccountId_pargs");
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeI32((*(this->account)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountId_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size0;
+            ::apache::thrift::protocol::TType _etype3;
+            iprot->readListBegin(_etype3, _size0);
+            this->success.resize(_size0);
+            uint32_t _i4;
+            for (_i4 = 0; _i4 < _size0; ++_i4)
+            {
+              xfer += iprot->readString(this->success[_i4]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountId_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getHashesFromAccountId_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
+      std::vector<std::string> ::const_iterator _iter5;
+      for (_iter5 = this->success.begin(); _iter5 != this->success.end(); ++_iter5)
+      {
+        xfer += oprot->writeString((*_iter5));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountId_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size6;
+            ::apache::thrift::protocol::TType _etype9;
+            iprot->readListBegin(_etype9, _size6);
+            (*(this->success)).resize(_size6);
+            uint32_t _i10;
+            for (_i10 = 0; _i10 < _size6; ++_i10)
+            {
+              xfer += iprot->readString((*(this->success))[_i10]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountName_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->account);
+          this->__isset.account = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountName_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getHashesFromAccountName_args");
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->account);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountName_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getHashesFromAccountName_pargs");
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->account)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountName_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size11;
+            ::apache::thrift::protocol::TType _etype14;
+            iprot->readListBegin(_etype14, _size11);
+            this->success.resize(_size11);
+            uint32_t _i15;
+            for (_i15 = 0; _i15 < _size11; ++_i15)
+            {
+              xfer += iprot->readString(this->success[_i15]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountName_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getHashesFromAccountName_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
+      std::vector<std::string> ::const_iterator _iter16;
+      for (_iter16 = this->success.begin(); _iter16 != this->success.end(); ++_iter16)
+      {
+        xfer += oprot->writeString((*_iter16));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashesFromAccountName_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size17;
+            ::apache::thrift::protocol::TType _etype20;
+            iprot->readListBegin(_etype20, _size17);
+            (*(this->success)).resize(_size17);
+            uint32_t _i21;
+            for (_i21 = 0; _i21 < _size17; ++_i21)
+            {
+              xfer += iprot->readString((*(this->success))[_i21]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashAccountBalance_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->dataToHash);
+          this->__isset.dataToHash = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashAccountBalance_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getHashAccountBalance_args");
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->dataToHash);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashAccountBalance_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getHashAccountBalance_pargs");
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->dataToHash)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashAccountBalance_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getHashAccountBalance_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getHashAccountBalance_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0);
+    xfer += oprot->writeI32(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getHashAccountBalance_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getIdAccountBalance_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->account);
+          this->__isset.account = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getIdAccountBalance_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getIdAccountBalance_args");
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeI32(this->account);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getIdAccountBalance_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getIdAccountBalance_pargs");
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeI32((*(this->account)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getIdAccountBalance_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getIdAccountBalance_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getIdAccountBalance_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0);
+    xfer += oprot->writeI32(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getIdAccountBalance_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getNameAccountBalance_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->account);
+          this->__isset.account = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getNameAccountBalance_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getNameAccountBalance_args");
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->account);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getNameAccountBalance_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getNameAccountBalance_pargs");
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->account)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getNameAccountBalance_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getNameAccountBalance_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getNameAccountBalance_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0);
+    xfer += oprot->writeI32(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getNameAccountBalance_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithId_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->dataToHash);
+          this->__isset.dataToHash = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->account);
+          this->__isset.account = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithId_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_associateHashWithId_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->dataToHash);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32(this->account);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_associateHashWithId_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->dataToHash)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((*(this->account)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithId_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithId_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_associateHashWithId_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithId_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithName_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->dataToHash);
+          this->__isset.dataToHash = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->account);
+          this->__isset.account = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithName_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_associateHashWithName_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->dataToHash);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString(this->account);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithName_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_associateHashWithName_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->dataToHash)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString((*(this->account)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithName_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithName_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_associateHashWithName_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_associateHashWithName_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_deassociateHash_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->dataToHash);
+          this->__isset.dataToHash = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_deassociateHash_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_deassociateHash_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->dataToHash);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_deassociateHash_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_deassociateHash_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->dataToHash)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_deassociateHash_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_deassociateHash_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_deassociateHash_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_deassociateHash_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getUPCPrice_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->upc_high);
+          this->__isset.upc_high = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->upc_low);
+          this->__isset.upc_low = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getUPCPrice_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getUPCPrice_args");
+  xfer += oprot->writeFieldBegin("upc_high", ::apache::thrift::protocol::T_I64, 1);
+  xfer += oprot->writeI64(this->upc_high);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_low", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64(this->upc_low);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getUPCPrice_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getUPCPrice_pargs");
+  xfer += oprot->writeFieldBegin("upc_high", ::apache::thrift::protocol::T_I64, 1);
+  xfer += oprot->writeI64((*(this->upc_high)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_low", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64((*(this->upc_low)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getUPCPrice_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getUPCPrice_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getUPCPrice_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0);
+    xfer += oprot->writeI32(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getUPCPrice_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_setUPCPrice_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->upc_high);
+          this->__isset.upc_high = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->upc_low);
+          this->__isset.upc_low = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->price);
+          this->__isset.price = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_setUPCPrice_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_setUPCPrice_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_high", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64(this->upc_high);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_low", ::apache::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64(this->upc_low);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("price", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32(this->price);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_setUPCPrice_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_setUPCPrice_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_high", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64((*(this->upc_high)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_low", ::apache::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64((*(this->upc_low)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("price", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((*(this->price)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_setUPCPrice_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_setUPCPrice_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_setUPCPrice_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_setUPCPrice_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnHash_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->dataToHash);
+          this->__isset.dataToHash = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->delta);
+          this->__isset.delta = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnHash_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnHash_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->dataToHash);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32(this->delta);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnHash_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnHash_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->dataToHash)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((*(this->delta)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnHash_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnHash_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnHash_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnHash_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnId_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->account);
+          this->__isset.account = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->delta);
+          this->__isset.delta = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnId_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnId_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeI32(this->account);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32(this->delta);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnId_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeI32((*(this->account)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((*(this->delta)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnId_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnId_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnId_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnId_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnName_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->account);
+          this->__isset.account = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->delta);
+          this->__isset.delta = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnName_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnName_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->account);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32(this->delta);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnName_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnName_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->account)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((*(this->delta)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnName_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnName_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_doTransactionOnName_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doTransactionOnName_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_revertTransaction_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->serial);
+          this->__isset.serial = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_revertTransaction_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_revertTransaction_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("serial", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64(this->serial);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_revertTransaction_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_revertTransaction_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("serial", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64((*(this->serial)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_revertTransaction_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_revertTransaction_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_revertTransaction_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_revertTransaction_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getStock_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->upc_high);
+          this->__isset.upc_high = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->upc_low);
+          this->__isset.upc_low = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getStock_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getStock_args");
+  xfer += oprot->writeFieldBegin("upc_high", ::apache::thrift::protocol::T_I64, 1);
+  xfer += oprot->writeI64(this->upc_high);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_low", ::apache::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64(this->upc_low);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getStock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_getStock_pargs");
+  xfer += oprot->writeFieldBegin("upc_high", ::apache::thrift::protocol::T_I64, 1);
+  xfer += oprot->writeI64((*(this->upc_high)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_low", ::apache::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64((*(this->upc_low)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getStock_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_getStock_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_getStock_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0);
+    xfer += oprot->writeI32(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_getStock_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doStockChange_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->auth);
+          this->__isset.auth = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->upc_high);
+          this->__isset.upc_high = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->upc_low);
+          this->__isset.upc_low = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->delta);
+          this->__isset.delta = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doStockChange_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_doStockChange_args");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->auth);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_high", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64(this->upc_high);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_low", ::apache::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64(this->upc_low);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32(this->delta);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doStockChange_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_doStockChange_pargs");
+  xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->auth)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_high", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64((*(this->upc_high)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("upc_low", ::apache::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64((*(this->upc_low)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((*(this->delta)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doStockChange_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_doStockChange_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_doStockChange_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+    xfer += oprot->writeI64(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_doStockChange_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_toString_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_toString_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_toString_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_toString_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pos_toString_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_toString_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size22;
+            ::apache::thrift::protocol::TType _etype25;
+            iprot->readListBegin(_etype25, _size22);
+            this->success.resize(_size22);
+            uint32_t _i26;
+            for (_i26 = 0; _i26 < _size22; ++_i26)
+            {
+              xfer += iprot->readString(this->success[_i26]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pos_toString_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Pos_toString_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
+      std::vector<std::string> ::const_iterator _iter27;
+      for (_iter27 = this->success.begin(); _iter27 != this->success.end(); ++_iter27)
+      {
+        xfer += oprot->writeString((*_iter27));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Pos_toString_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size28;
+            ::apache::thrift::protocol::TType _etype31;
+            iprot->readListBegin(_etype31, _size28);
+            (*(this->success)).resize(_size28);
+            uint32_t _i32;
+            for (_i32 = 0; _i32 < _size28; ++_i32)
+            {
+              xfer += iprot->readString((*(this->success))[_i32]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+void PosClient::ping()
+{
+  send_ping();
+  recv_ping();
+}
+
+void PosClient::send_ping()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("ping", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_ping_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void PosClient::recv_ping()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("ping") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Pos_ping_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  return;
+}
+
+void PosClient::getSalt(std::string& _return)
+{
+  send_getSalt();
+  recv_getSalt(_return);
+}
+
+void PosClient::send_getSalt()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getSalt", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getSalt_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void PosClient::recv_getSalt(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getSalt") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Pos_getSalt_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getSalt failed: unknown result");
+}
+
+int32_t PosClient::getAccountFromHash(const std::string& dataToHash)
+{
+  send_getAccountFromHash(dataToHash);
+  return recv_getAccountFromHash();
+}
+
+void PosClient::send_getAccountFromHash(const std::string& dataToHash)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getAccountFromHash", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getAccountFromHash_pargs args;
+  args.dataToHash = &dataToHash;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int32_t PosClient::recv_getAccountFromHash()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getAccountFromHash") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int32_t _return;
+  Pos_getAccountFromHash_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getAccountFromHash failed: unknown result");
+}
+
+void PosClient::getHashesFromAccountId(std::vector<std::string> & _return, const int32_t account)
+{
+  send_getHashesFromAccountId(account);
+  recv_getHashesFromAccountId(_return);
+}
+
+void PosClient::send_getHashesFromAccountId(const int32_t account)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getHashesFromAccountId", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getHashesFromAccountId_pargs args;
+  args.account = &account;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void PosClient::recv_getHashesFromAccountId(std::vector<std::string> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getHashesFromAccountId") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Pos_getHashesFromAccountId_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getHashesFromAccountId failed: unknown result");
+}
+
+void PosClient::getHashesFromAccountName(std::vector<std::string> & _return, const std::string& account)
+{
+  send_getHashesFromAccountName(account);
+  recv_getHashesFromAccountName(_return);
+}
+
+void PosClient::send_getHashesFromAccountName(const std::string& account)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getHashesFromAccountName", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getHashesFromAccountName_pargs args;
+  args.account = &account;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void PosClient::recv_getHashesFromAccountName(std::vector<std::string> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getHashesFromAccountName") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Pos_getHashesFromAccountName_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getHashesFromAccountName failed: unknown result");
+}
+
+int32_t PosClient::getHashAccountBalance(const std::string& dataToHash)
+{
+  send_getHashAccountBalance(dataToHash);
+  return recv_getHashAccountBalance();
+}
+
+void PosClient::send_getHashAccountBalance(const std::string& dataToHash)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getHashAccountBalance", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getHashAccountBalance_pargs args;
+  args.dataToHash = &dataToHash;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int32_t PosClient::recv_getHashAccountBalance()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getHashAccountBalance") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int32_t _return;
+  Pos_getHashAccountBalance_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getHashAccountBalance failed: unknown result");
+}
+
+int32_t PosClient::getIdAccountBalance(const int32_t account)
+{
+  send_getIdAccountBalance(account);
+  return recv_getIdAccountBalance();
+}
+
+void PosClient::send_getIdAccountBalance(const int32_t account)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getIdAccountBalance", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getIdAccountBalance_pargs args;
+  args.account = &account;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int32_t PosClient::recv_getIdAccountBalance()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getIdAccountBalance") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int32_t _return;
+  Pos_getIdAccountBalance_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getIdAccountBalance failed: unknown result");
+}
+
+int32_t PosClient::getNameAccountBalance(const std::string& account)
+{
+  send_getNameAccountBalance(account);
+  return recv_getNameAccountBalance();
+}
+
+void PosClient::send_getNameAccountBalance(const std::string& account)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getNameAccountBalance", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getNameAccountBalance_pargs args;
+  args.account = &account;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int32_t PosClient::recv_getNameAccountBalance()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getNameAccountBalance") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int32_t _return;
+  Pos_getNameAccountBalance_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getNameAccountBalance failed: unknown result");
+}
+
+int64_t PosClient::associateHashWithId(const std::string& auth, const std::string& dataToHash, const int32_t account)
+{
+  send_associateHashWithId(auth, dataToHash, account);
+  return recv_associateHashWithId();
+}
+
+void PosClient::send_associateHashWithId(const std::string& auth, const std::string& dataToHash, const int32_t account)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("associateHashWithId", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_associateHashWithId_pargs args;
+  args.auth = &auth;
+  args.dataToHash = &dataToHash;
+  args.account = &account;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_associateHashWithId()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("associateHashWithId") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_associateHashWithId_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "associateHashWithId failed: unknown result");
+}
+
+int64_t PosClient::associateHashWithName(const std::string& auth, const std::string& dataToHash, const std::string& account)
+{
+  send_associateHashWithName(auth, dataToHash, account);
+  return recv_associateHashWithName();
+}
+
+void PosClient::send_associateHashWithName(const std::string& auth, const std::string& dataToHash, const std::string& account)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("associateHashWithName", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_associateHashWithName_pargs args;
+  args.auth = &auth;
+  args.dataToHash = &dataToHash;
+  args.account = &account;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_associateHashWithName()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("associateHashWithName") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_associateHashWithName_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "associateHashWithName failed: unknown result");
+}
+
+int64_t PosClient::deassociateHash(const std::string& auth, const std::string& dataToHash)
+{
+  send_deassociateHash(auth, dataToHash);
+  return recv_deassociateHash();
+}
+
+void PosClient::send_deassociateHash(const std::string& auth, const std::string& dataToHash)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("deassociateHash", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_deassociateHash_pargs args;
+  args.auth = &auth;
+  args.dataToHash = &dataToHash;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_deassociateHash()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("deassociateHash") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_deassociateHash_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "deassociateHash failed: unknown result");
+}
+
+int32_t PosClient::getUPCPrice(const int64_t upc_high, const int64_t upc_low)
+{
+  send_getUPCPrice(upc_high, upc_low);
+  return recv_getUPCPrice();
+}
+
+void PosClient::send_getUPCPrice(const int64_t upc_high, const int64_t upc_low)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getUPCPrice", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getUPCPrice_pargs args;
+  args.upc_high = &upc_high;
+  args.upc_low = &upc_low;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int32_t PosClient::recv_getUPCPrice()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getUPCPrice") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int32_t _return;
+  Pos_getUPCPrice_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getUPCPrice failed: unknown result");
+}
+
+int64_t PosClient::setUPCPrice(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t price)
+{
+  send_setUPCPrice(auth, upc_high, upc_low, price);
+  return recv_setUPCPrice();
+}
+
+void PosClient::send_setUPCPrice(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t price)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("setUPCPrice", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_setUPCPrice_pargs args;
+  args.auth = &auth;
+  args.upc_high = &upc_high;
+  args.upc_low = &upc_low;
+  args.price = &price;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_setUPCPrice()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("setUPCPrice") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_setUPCPrice_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "setUPCPrice failed: unknown result");
+}
+
+int64_t PosClient::doTransactionOnHash(const std::string& auth, const std::string& dataToHash, const int32_t delta)
+{
+  send_doTransactionOnHash(auth, dataToHash, delta);
+  return recv_doTransactionOnHash();
+}
+
+void PosClient::send_doTransactionOnHash(const std::string& auth, const std::string& dataToHash, const int32_t delta)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("doTransactionOnHash", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_doTransactionOnHash_pargs args;
+  args.auth = &auth;
+  args.dataToHash = &dataToHash;
+  args.delta = &delta;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_doTransactionOnHash()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("doTransactionOnHash") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_doTransactionOnHash_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "doTransactionOnHash failed: unknown result");
+}
+
+int64_t PosClient::doTransactionOnId(const std::string& auth, const int32_t account, const int32_t delta)
+{
+  send_doTransactionOnId(auth, account, delta);
+  return recv_doTransactionOnId();
+}
+
+void PosClient::send_doTransactionOnId(const std::string& auth, const int32_t account, const int32_t delta)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("doTransactionOnId", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_doTransactionOnId_pargs args;
+  args.auth = &auth;
+  args.account = &account;
+  args.delta = &delta;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_doTransactionOnId()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("doTransactionOnId") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_doTransactionOnId_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "doTransactionOnId failed: unknown result");
+}
+
+int64_t PosClient::doTransactionOnName(const std::string& auth, const std::string& account, const int32_t delta)
+{
+  send_doTransactionOnName(auth, account, delta);
+  return recv_doTransactionOnName();
+}
+
+void PosClient::send_doTransactionOnName(const std::string& auth, const std::string& account, const int32_t delta)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("doTransactionOnName", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_doTransactionOnName_pargs args;
+  args.auth = &auth;
+  args.account = &account;
+  args.delta = &delta;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_doTransactionOnName()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("doTransactionOnName") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_doTransactionOnName_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "doTransactionOnName failed: unknown result");
+}
+
+int64_t PosClient::revertTransaction(const std::string& auth, const int64_t serial)
+{
+  send_revertTransaction(auth, serial);
+  return recv_revertTransaction();
+}
+
+void PosClient::send_revertTransaction(const std::string& auth, const int64_t serial)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("revertTransaction", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_revertTransaction_pargs args;
+  args.auth = &auth;
+  args.serial = &serial;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_revertTransaction()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("revertTransaction") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_revertTransaction_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revertTransaction failed: unknown result");
+}
+
+int32_t PosClient::getStock(const int64_t upc_high, const int64_t upc_low)
+{
+  send_getStock(upc_high, upc_low);
+  return recv_getStock();
+}
+
+void PosClient::send_getStock(const int64_t upc_high, const int64_t upc_low)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getStock", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_getStock_pargs args;
+  args.upc_high = &upc_high;
+  args.upc_low = &upc_low;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int32_t PosClient::recv_getStock()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getStock") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int32_t _return;
+  Pos_getStock_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getStock failed: unknown result");
+}
+
+int64_t PosClient::doStockChange(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t delta)
+{
+  send_doStockChange(auth, upc_high, upc_low, delta);
+  return recv_doStockChange();
+}
+
+void PosClient::send_doStockChange(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t delta)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("doStockChange", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_doStockChange_pargs args;
+  args.auth = &auth;
+  args.upc_high = &upc_high;
+  args.upc_low = &upc_low;
+  args.delta = &delta;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int64_t PosClient::recv_doStockChange()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("doStockChange") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int64_t _return;
+  Pos_doStockChange_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "doStockChange failed: unknown result");
+}
+
+void PosClient::toString(std::vector<std::string> & _return)
+{
+  send_toString();
+  recv_toString(_return);
+}
+
+void PosClient::send_toString()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("toString", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Pos_toString_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void PosClient::recv_toString(std::vector<std::string> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("toString") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Pos_toString_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "toString failed: unknown result");
+}
+
+bool PosProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) {
+
+  ::apache::thrift::protocol::TProtocol* iprot = piprot.get();
+  ::apache::thrift::protocol::TProtocol* oprot = poprot.get();
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+  int32_t seqid;
+
+  iprot->readMessageBegin(fname, mtype, seqid);
+
+  if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) {
+    iprot->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot->readMessageEnd();
+    iprot->getTransport()->readEnd();
+    ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+    oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return false;
+  }
+
+  return process_fn(iprot, oprot, fname, seqid, callContext);
+}
+
+bool PosProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) {
+  std::map<std::string, void (PosProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)>::iterator pfn;
+  pfn = processMap_.find(fname);
+  if (pfn == processMap_.end()) {
+    iprot->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot->readMessageEnd();
+    iprot->getTransport()->readEnd();
+    ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'");
+    oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return false;
+  }
+  (this->*(pfn->second))(seqid, iprot, oprot, callContext);
+  return true;
+}
+
+void PosProcessor::process_ping(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.ping", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.ping");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.ping");
+  }
+
+  Pos_ping_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.ping", bytes);
+  }
+
+  Pos_ping_result result;
+  try {
+    iface_->ping();
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.ping");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("ping", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.ping");
+  }
+
+  oprot->writeMessageBegin("ping", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.ping", bytes);
+  }
+}
+
+void PosProcessor::process_getSalt(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getSalt", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getSalt");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getSalt");
+  }
+
+  Pos_getSalt_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getSalt", bytes);
+  }
+
+  Pos_getSalt_result result;
+  try {
+    iface_->getSalt(result.success);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getSalt");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getSalt", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getSalt");
+  }
+
+  oprot->writeMessageBegin("getSalt", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getSalt", bytes);
+  }
+}
+
+void PosProcessor::process_getAccountFromHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getAccountFromHash", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getAccountFromHash");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getAccountFromHash");
+  }
+
+  Pos_getAccountFromHash_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getAccountFromHash", bytes);
+  }
+
+  Pos_getAccountFromHash_result result;
+  try {
+    result.success = iface_->getAccountFromHash(args.dataToHash);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getAccountFromHash");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getAccountFromHash", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getAccountFromHash");
+  }
+
+  oprot->writeMessageBegin("getAccountFromHash", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getAccountFromHash", bytes);
+  }
+}
+
+void PosProcessor::process_getHashesFromAccountId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getHashesFromAccountId", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getHashesFromAccountId");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getHashesFromAccountId");
+  }
+
+  Pos_getHashesFromAccountId_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getHashesFromAccountId", bytes);
+  }
+
+  Pos_getHashesFromAccountId_result result;
+  try {
+    iface_->getHashesFromAccountId(result.success, args.account);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getHashesFromAccountId");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getHashesFromAccountId", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getHashesFromAccountId");
+  }
+
+  oprot->writeMessageBegin("getHashesFromAccountId", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getHashesFromAccountId", bytes);
+  }
+}
+
+void PosProcessor::process_getHashesFromAccountName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getHashesFromAccountName", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getHashesFromAccountName");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getHashesFromAccountName");
+  }
+
+  Pos_getHashesFromAccountName_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getHashesFromAccountName", bytes);
+  }
+
+  Pos_getHashesFromAccountName_result result;
+  try {
+    iface_->getHashesFromAccountName(result.success, args.account);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getHashesFromAccountName");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getHashesFromAccountName", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getHashesFromAccountName");
+  }
+
+  oprot->writeMessageBegin("getHashesFromAccountName", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getHashesFromAccountName", bytes);
+  }
+}
+
+void PosProcessor::process_getHashAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getHashAccountBalance", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getHashAccountBalance");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getHashAccountBalance");
+  }
+
+  Pos_getHashAccountBalance_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getHashAccountBalance", bytes);
+  }
+
+  Pos_getHashAccountBalance_result result;
+  try {
+    result.success = iface_->getHashAccountBalance(args.dataToHash);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getHashAccountBalance");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getHashAccountBalance", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getHashAccountBalance");
+  }
+
+  oprot->writeMessageBegin("getHashAccountBalance", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getHashAccountBalance", bytes);
+  }
+}
+
+void PosProcessor::process_getIdAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getIdAccountBalance", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getIdAccountBalance");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getIdAccountBalance");
+  }
+
+  Pos_getIdAccountBalance_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getIdAccountBalance", bytes);
+  }
+
+  Pos_getIdAccountBalance_result result;
+  try {
+    result.success = iface_->getIdAccountBalance(args.account);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getIdAccountBalance");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getIdAccountBalance", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getIdAccountBalance");
+  }
+
+  oprot->writeMessageBegin("getIdAccountBalance", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getIdAccountBalance", bytes);
+  }
+}
+
+void PosProcessor::process_getNameAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getNameAccountBalance", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getNameAccountBalance");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getNameAccountBalance");
+  }
+
+  Pos_getNameAccountBalance_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getNameAccountBalance", bytes);
+  }
+
+  Pos_getNameAccountBalance_result result;
+  try {
+    result.success = iface_->getNameAccountBalance(args.account);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getNameAccountBalance");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getNameAccountBalance", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getNameAccountBalance");
+  }
+
+  oprot->writeMessageBegin("getNameAccountBalance", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getNameAccountBalance", bytes);
+  }
+}
+
+void PosProcessor::process_associateHashWithId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.associateHashWithId", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.associateHashWithId");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.associateHashWithId");
+  }
+
+  Pos_associateHashWithId_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.associateHashWithId", bytes);
+  }
+
+  Pos_associateHashWithId_result result;
+  try {
+    result.success = iface_->associateHashWithId(args.auth, args.dataToHash, args.account);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.associateHashWithId");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("associateHashWithId", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.associateHashWithId");
+  }
+
+  oprot->writeMessageBegin("associateHashWithId", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.associateHashWithId", bytes);
+  }
+}
+
+void PosProcessor::process_associateHashWithName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.associateHashWithName", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.associateHashWithName");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.associateHashWithName");
+  }
+
+  Pos_associateHashWithName_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.associateHashWithName", bytes);
+  }
+
+  Pos_associateHashWithName_result result;
+  try {
+    result.success = iface_->associateHashWithName(args.auth, args.dataToHash, args.account);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.associateHashWithName");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("associateHashWithName", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.associateHashWithName");
+  }
+
+  oprot->writeMessageBegin("associateHashWithName", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.associateHashWithName", bytes);
+  }
+}
+
+void PosProcessor::process_deassociateHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.deassociateHash", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.deassociateHash");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.deassociateHash");
+  }
+
+  Pos_deassociateHash_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.deassociateHash", bytes);
+  }
+
+  Pos_deassociateHash_result result;
+  try {
+    result.success = iface_->deassociateHash(args.auth, args.dataToHash);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.deassociateHash");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("deassociateHash", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.deassociateHash");
+  }
+
+  oprot->writeMessageBegin("deassociateHash", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.deassociateHash", bytes);
+  }
+}
+
+void PosProcessor::process_getUPCPrice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getUPCPrice", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getUPCPrice");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getUPCPrice");
+  }
+
+  Pos_getUPCPrice_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getUPCPrice", bytes);
+  }
+
+  Pos_getUPCPrice_result result;
+  try {
+    result.success = iface_->getUPCPrice(args.upc_high, args.upc_low);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getUPCPrice");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getUPCPrice", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getUPCPrice");
+  }
+
+  oprot->writeMessageBegin("getUPCPrice", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getUPCPrice", bytes);
+  }
+}
+
+void PosProcessor::process_setUPCPrice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.setUPCPrice", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.setUPCPrice");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.setUPCPrice");
+  }
+
+  Pos_setUPCPrice_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.setUPCPrice", bytes);
+  }
+
+  Pos_setUPCPrice_result result;
+  try {
+    result.success = iface_->setUPCPrice(args.auth, args.upc_high, args.upc_low, args.price);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.setUPCPrice");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("setUPCPrice", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.setUPCPrice");
+  }
+
+  oprot->writeMessageBegin("setUPCPrice", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.setUPCPrice", bytes);
+  }
+}
+
+void PosProcessor::process_doTransactionOnHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.doTransactionOnHash", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.doTransactionOnHash");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.doTransactionOnHash");
+  }
+
+  Pos_doTransactionOnHash_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.doTransactionOnHash", bytes);
+  }
+
+  Pos_doTransactionOnHash_result result;
+  try {
+    result.success = iface_->doTransactionOnHash(args.auth, args.dataToHash, args.delta);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.doTransactionOnHash");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("doTransactionOnHash", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.doTransactionOnHash");
+  }
+
+  oprot->writeMessageBegin("doTransactionOnHash", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.doTransactionOnHash", bytes);
+  }
+}
+
+void PosProcessor::process_doTransactionOnId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.doTransactionOnId", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.doTransactionOnId");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.doTransactionOnId");
+  }
+
+  Pos_doTransactionOnId_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.doTransactionOnId", bytes);
+  }
+
+  Pos_doTransactionOnId_result result;
+  try {
+    result.success = iface_->doTransactionOnId(args.auth, args.account, args.delta);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.doTransactionOnId");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("doTransactionOnId", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.doTransactionOnId");
+  }
+
+  oprot->writeMessageBegin("doTransactionOnId", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.doTransactionOnId", bytes);
+  }
+}
+
+void PosProcessor::process_doTransactionOnName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.doTransactionOnName", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.doTransactionOnName");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.doTransactionOnName");
+  }
+
+  Pos_doTransactionOnName_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.doTransactionOnName", bytes);
+  }
+
+  Pos_doTransactionOnName_result result;
+  try {
+    result.success = iface_->doTransactionOnName(args.auth, args.account, args.delta);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.doTransactionOnName");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("doTransactionOnName", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.doTransactionOnName");
+  }
+
+  oprot->writeMessageBegin("doTransactionOnName", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.doTransactionOnName", bytes);
+  }
+}
+
+void PosProcessor::process_revertTransaction(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.revertTransaction", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.revertTransaction");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.revertTransaction");
+  }
+
+  Pos_revertTransaction_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.revertTransaction", bytes);
+  }
+
+  Pos_revertTransaction_result result;
+  try {
+    result.success = iface_->revertTransaction(args.auth, args.serial);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.revertTransaction");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("revertTransaction", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.revertTransaction");
+  }
+
+  oprot->writeMessageBegin("revertTransaction", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.revertTransaction", bytes);
+  }
+}
+
+void PosProcessor::process_getStock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.getStock", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getStock");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.getStock");
+  }
+
+  Pos_getStock_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.getStock", bytes);
+  }
+
+  Pos_getStock_result result;
+  try {
+    result.success = iface_->getStock(args.upc_high, args.upc_low);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.getStock");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getStock", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.getStock");
+  }
+
+  oprot->writeMessageBegin("getStock", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.getStock", bytes);
+  }
+}
+
+void PosProcessor::process_doStockChange(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.doStockChange", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.doStockChange");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.doStockChange");
+  }
+
+  Pos_doStockChange_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.doStockChange", bytes);
+  }
+
+  Pos_doStockChange_result result;
+  try {
+    result.success = iface_->doStockChange(args.auth, args.upc_high, args.upc_low, args.delta);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.doStockChange");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("doStockChange", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.doStockChange");
+  }
+
+  oprot->writeMessageBegin("doStockChange", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.doStockChange", bytes);
+  }
+}
+
+void PosProcessor::process_toString(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Pos.toString", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.toString");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Pos.toString");
+  }
+
+  Pos_toString_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Pos.toString", bytes);
+  }
+
+  Pos_toString_result result;
+  try {
+    iface_->toString(result.success);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Pos.toString");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("toString", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Pos.toString");
+  }
+
+  oprot->writeMessageBegin("toString", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Pos.toString", bytes);
+  }
+}
+
+} // namespace
+
diff --git a/database/gen-cpp/Pos.h b/database/gen-cpp/Pos.h
new file mode 100644 (file)
index 0000000..29f7c13
--- /dev/null
@@ -0,0 +1,2775 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef Pos_H
+#define Pos_H
+
+#include <TProcessor.h>
+#include "pos_types.h"
+
+namespace pos {
+
+class PosIf {
+ public:
+  virtual ~PosIf() {}
+  virtual void ping() = 0;
+  virtual void getSalt(std::string& _return) = 0;
+  virtual int32_t getAccountFromHash(const std::string& dataToHash) = 0;
+  virtual void getHashesFromAccountId(std::vector<std::string> & _return, const int32_t account) = 0;
+  virtual void getHashesFromAccountName(std::vector<std::string> & _return, const std::string& account) = 0;
+  virtual int32_t getHashAccountBalance(const std::string& dataToHash) = 0;
+  virtual int32_t getIdAccountBalance(const int32_t account) = 0;
+  virtual int32_t getNameAccountBalance(const std::string& account) = 0;
+  virtual int64_t associateHashWithId(const std::string& auth, const std::string& dataToHash, const int32_t account) = 0;
+  virtual int64_t associateHashWithName(const std::string& auth, const std::string& dataToHash, const std::string& account) = 0;
+  virtual int64_t deassociateHash(const std::string& auth, const std::string& dataToHash) = 0;
+  virtual int32_t getUPCPrice(const int64_t upc_high, const int64_t upc_low) = 0;
+  virtual int64_t setUPCPrice(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t price) = 0;
+  virtual int64_t doTransactionOnHash(const std::string& auth, const std::string& dataToHash, const int32_t delta) = 0;
+  virtual int64_t doTransactionOnId(const std::string& auth, const int32_t account, const int32_t delta) = 0;
+  virtual int64_t doTransactionOnName(const std::string& auth, const std::string& account, const int32_t delta) = 0;
+  virtual int64_t revertTransaction(const std::string& auth, const int64_t serial) = 0;
+  virtual int32_t getStock(const int64_t upc_high, const int64_t upc_low) = 0;
+  virtual int64_t doStockChange(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t delta) = 0;
+  virtual void toString(std::vector<std::string> & _return) = 0;
+};
+
+class PosNull : virtual public PosIf {
+ public:
+  virtual ~PosNull() {}
+  void ping() {
+    return;
+  }
+  void getSalt(std::string& /* _return */) {
+    return;
+  }
+  int32_t getAccountFromHash(const std::string& /* dataToHash */) {
+    int32_t _return = 0;
+    return _return;
+  }
+  void getHashesFromAccountId(std::vector<std::string> & /* _return */, const int32_t /* account */) {
+    return;
+  }
+  void getHashesFromAccountName(std::vector<std::string> & /* _return */, const std::string& /* account */) {
+    return;
+  }
+  int32_t getHashAccountBalance(const std::string& /* dataToHash */) {
+    int32_t _return = 0;
+    return _return;
+  }
+  int32_t getIdAccountBalance(const int32_t /* account */) {
+    int32_t _return = 0;
+    return _return;
+  }
+  int32_t getNameAccountBalance(const std::string& /* account */) {
+    int32_t _return = 0;
+    return _return;
+  }
+  int64_t associateHashWithId(const std::string& /* auth */, const std::string& /* dataToHash */, const int32_t /* account */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  int64_t associateHashWithName(const std::string& /* auth */, const std::string& /* dataToHash */, const std::string& /* account */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  int64_t deassociateHash(const std::string& /* auth */, const std::string& /* dataToHash */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  int32_t getUPCPrice(const int64_t /* upc_high */, const int64_t /* upc_low */) {
+    int32_t _return = 0;
+    return _return;
+  }
+  int64_t setUPCPrice(const std::string& /* auth */, const int64_t /* upc_high */, const int64_t /* upc_low */, const int32_t /* price */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  int64_t doTransactionOnHash(const std::string& /* auth */, const std::string& /* dataToHash */, const int32_t /* delta */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  int64_t doTransactionOnId(const std::string& /* auth */, const int32_t /* account */, const int32_t /* delta */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  int64_t doTransactionOnName(const std::string& /* auth */, const std::string& /* account */, const int32_t /* delta */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  int64_t revertTransaction(const std::string& /* auth */, const int64_t /* serial */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  int32_t getStock(const int64_t /* upc_high */, const int64_t /* upc_low */) {
+    int32_t _return = 0;
+    return _return;
+  }
+  int64_t doStockChange(const std::string& /* auth */, const int64_t /* upc_high */, const int64_t /* upc_low */, const int32_t /* delta */) {
+    int64_t _return = 0;
+    return _return;
+  }
+  void toString(std::vector<std::string> & /* _return */) {
+    return;
+  }
+};
+
+
+class Pos_ping_args {
+ public:
+
+  Pos_ping_args() {
+  }
+
+  virtual ~Pos_ping_args() throw() {}
+
+
+  bool operator == (const Pos_ping_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Pos_ping_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_ping_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_ping_pargs {
+ public:
+
+
+  virtual ~Pos_ping_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_ping_result {
+ public:
+
+  Pos_ping_result() {
+  }
+
+  virtual ~Pos_ping_result() throw() {}
+
+
+  bool operator == (const Pos_ping_result & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Pos_ping_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_ping_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_ping_presult {
+ public:
+
+
+  virtual ~Pos_ping_presult() throw() {}
+
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Pos_getSalt_args {
+ public:
+
+  Pos_getSalt_args() {
+  }
+
+  virtual ~Pos_getSalt_args() throw() {}
+
+
+  bool operator == (const Pos_getSalt_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Pos_getSalt_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getSalt_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getSalt_pargs {
+ public:
+
+
+  virtual ~Pos_getSalt_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getSalt_result__isset {
+  _Pos_getSalt_result__isset() : success(false) {}
+  bool success;
+} _Pos_getSalt_result__isset;
+
+class Pos_getSalt_result {
+ public:
+
+  Pos_getSalt_result() : success("") {
+  }
+
+  virtual ~Pos_getSalt_result() throw() {}
+
+  std::string success;
+
+  _Pos_getSalt_result__isset __isset;
+
+  void __set_success(const std::string& val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getSalt_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getSalt_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getSalt_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getSalt_presult__isset {
+  _Pos_getSalt_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getSalt_presult__isset;
+
+class Pos_getSalt_presult {
+ public:
+
+
+  virtual ~Pos_getSalt_presult() throw() {}
+
+  std::string* success;
+
+  _Pos_getSalt_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_getAccountFromHash_args__isset {
+  _Pos_getAccountFromHash_args__isset() : dataToHash(false) {}
+  bool dataToHash;
+} _Pos_getAccountFromHash_args__isset;
+
+class Pos_getAccountFromHash_args {
+ public:
+
+  Pos_getAccountFromHash_args() : dataToHash("") {
+  }
+
+  virtual ~Pos_getAccountFromHash_args() throw() {}
+
+  std::string dataToHash;
+
+  _Pos_getAccountFromHash_args__isset __isset;
+
+  void __set_dataToHash(const std::string& val) {
+    dataToHash = val;
+  }
+
+  bool operator == (const Pos_getAccountFromHash_args & rhs) const
+  {
+    if (!(dataToHash == rhs.dataToHash))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getAccountFromHash_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getAccountFromHash_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getAccountFromHash_pargs {
+ public:
+
+
+  virtual ~Pos_getAccountFromHash_pargs() throw() {}
+
+  const std::string* dataToHash;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getAccountFromHash_result__isset {
+  _Pos_getAccountFromHash_result__isset() : success(false) {}
+  bool success;
+} _Pos_getAccountFromHash_result__isset;
+
+class Pos_getAccountFromHash_result {
+ public:
+
+  Pos_getAccountFromHash_result() : success(0) {
+  }
+
+  virtual ~Pos_getAccountFromHash_result() throw() {}
+
+  int32_t success;
+
+  _Pos_getAccountFromHash_result__isset __isset;
+
+  void __set_success(const int32_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getAccountFromHash_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getAccountFromHash_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getAccountFromHash_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getAccountFromHash_presult__isset {
+  _Pos_getAccountFromHash_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getAccountFromHash_presult__isset;
+
+class Pos_getAccountFromHash_presult {
+ public:
+
+
+  virtual ~Pos_getAccountFromHash_presult() throw() {}
+
+  int32_t* success;
+
+  _Pos_getAccountFromHash_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_getHashesFromAccountId_args__isset {
+  _Pos_getHashesFromAccountId_args__isset() : account(false) {}
+  bool account;
+} _Pos_getHashesFromAccountId_args__isset;
+
+class Pos_getHashesFromAccountId_args {
+ public:
+
+  Pos_getHashesFromAccountId_args() : account(0) {
+  }
+
+  virtual ~Pos_getHashesFromAccountId_args() throw() {}
+
+  int32_t account;
+
+  _Pos_getHashesFromAccountId_args__isset __isset;
+
+  void __set_account(const int32_t val) {
+    account = val;
+  }
+
+  bool operator == (const Pos_getHashesFromAccountId_args & rhs) const
+  {
+    if (!(account == rhs.account))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getHashesFromAccountId_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getHashesFromAccountId_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getHashesFromAccountId_pargs {
+ public:
+
+
+  virtual ~Pos_getHashesFromAccountId_pargs() throw() {}
+
+  const int32_t* account;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getHashesFromAccountId_result__isset {
+  _Pos_getHashesFromAccountId_result__isset() : success(false) {}
+  bool success;
+} _Pos_getHashesFromAccountId_result__isset;
+
+class Pos_getHashesFromAccountId_result {
+ public:
+
+  Pos_getHashesFromAccountId_result() {
+  }
+
+  virtual ~Pos_getHashesFromAccountId_result() throw() {}
+
+  std::vector<std::string>  success;
+
+  _Pos_getHashesFromAccountId_result__isset __isset;
+
+  void __set_success(const std::vector<std::string> & val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getHashesFromAccountId_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getHashesFromAccountId_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getHashesFromAccountId_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getHashesFromAccountId_presult__isset {
+  _Pos_getHashesFromAccountId_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getHashesFromAccountId_presult__isset;
+
+class Pos_getHashesFromAccountId_presult {
+ public:
+
+
+  virtual ~Pos_getHashesFromAccountId_presult() throw() {}
+
+  std::vector<std::string> * success;
+
+  _Pos_getHashesFromAccountId_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_getHashesFromAccountName_args__isset {
+  _Pos_getHashesFromAccountName_args__isset() : account(false) {}
+  bool account;
+} _Pos_getHashesFromAccountName_args__isset;
+
+class Pos_getHashesFromAccountName_args {
+ public:
+
+  Pos_getHashesFromAccountName_args() : account("") {
+  }
+
+  virtual ~Pos_getHashesFromAccountName_args() throw() {}
+
+  std::string account;
+
+  _Pos_getHashesFromAccountName_args__isset __isset;
+
+  void __set_account(const std::string& val) {
+    account = val;
+  }
+
+  bool operator == (const Pos_getHashesFromAccountName_args & rhs) const
+  {
+    if (!(account == rhs.account))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getHashesFromAccountName_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getHashesFromAccountName_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getHashesFromAccountName_pargs {
+ public:
+
+
+  virtual ~Pos_getHashesFromAccountName_pargs() throw() {}
+
+  const std::string* account;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getHashesFromAccountName_result__isset {
+  _Pos_getHashesFromAccountName_result__isset() : success(false) {}
+  bool success;
+} _Pos_getHashesFromAccountName_result__isset;
+
+class Pos_getHashesFromAccountName_result {
+ public:
+
+  Pos_getHashesFromAccountName_result() {
+  }
+
+  virtual ~Pos_getHashesFromAccountName_result() throw() {}
+
+  std::vector<std::string>  success;
+
+  _Pos_getHashesFromAccountName_result__isset __isset;
+
+  void __set_success(const std::vector<std::string> & val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getHashesFromAccountName_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getHashesFromAccountName_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getHashesFromAccountName_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getHashesFromAccountName_presult__isset {
+  _Pos_getHashesFromAccountName_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getHashesFromAccountName_presult__isset;
+
+class Pos_getHashesFromAccountName_presult {
+ public:
+
+
+  virtual ~Pos_getHashesFromAccountName_presult() throw() {}
+
+  std::vector<std::string> * success;
+
+  _Pos_getHashesFromAccountName_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_getHashAccountBalance_args__isset {
+  _Pos_getHashAccountBalance_args__isset() : dataToHash(false) {}
+  bool dataToHash;
+} _Pos_getHashAccountBalance_args__isset;
+
+class Pos_getHashAccountBalance_args {
+ public:
+
+  Pos_getHashAccountBalance_args() : dataToHash("") {
+  }
+
+  virtual ~Pos_getHashAccountBalance_args() throw() {}
+
+  std::string dataToHash;
+
+  _Pos_getHashAccountBalance_args__isset __isset;
+
+  void __set_dataToHash(const std::string& val) {
+    dataToHash = val;
+  }
+
+  bool operator == (const Pos_getHashAccountBalance_args & rhs) const
+  {
+    if (!(dataToHash == rhs.dataToHash))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getHashAccountBalance_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getHashAccountBalance_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getHashAccountBalance_pargs {
+ public:
+
+
+  virtual ~Pos_getHashAccountBalance_pargs() throw() {}
+
+  const std::string* dataToHash;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getHashAccountBalance_result__isset {
+  _Pos_getHashAccountBalance_result__isset() : success(false) {}
+  bool success;
+} _Pos_getHashAccountBalance_result__isset;
+
+class Pos_getHashAccountBalance_result {
+ public:
+
+  Pos_getHashAccountBalance_result() : success(0) {
+  }
+
+  virtual ~Pos_getHashAccountBalance_result() throw() {}
+
+  int32_t success;
+
+  _Pos_getHashAccountBalance_result__isset __isset;
+
+  void __set_success(const int32_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getHashAccountBalance_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getHashAccountBalance_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getHashAccountBalance_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getHashAccountBalance_presult__isset {
+  _Pos_getHashAccountBalance_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getHashAccountBalance_presult__isset;
+
+class Pos_getHashAccountBalance_presult {
+ public:
+
+
+  virtual ~Pos_getHashAccountBalance_presult() throw() {}
+
+  int32_t* success;
+
+  _Pos_getHashAccountBalance_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_getIdAccountBalance_args__isset {
+  _Pos_getIdAccountBalance_args__isset() : account(false) {}
+  bool account;
+} _Pos_getIdAccountBalance_args__isset;
+
+class Pos_getIdAccountBalance_args {
+ public:
+
+  Pos_getIdAccountBalance_args() : account(0) {
+  }
+
+  virtual ~Pos_getIdAccountBalance_args() throw() {}
+
+  int32_t account;
+
+  _Pos_getIdAccountBalance_args__isset __isset;
+
+  void __set_account(const int32_t val) {
+    account = val;
+  }
+
+  bool operator == (const Pos_getIdAccountBalance_args & rhs) const
+  {
+    if (!(account == rhs.account))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getIdAccountBalance_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getIdAccountBalance_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getIdAccountBalance_pargs {
+ public:
+
+
+  virtual ~Pos_getIdAccountBalance_pargs() throw() {}
+
+  const int32_t* account;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getIdAccountBalance_result__isset {
+  _Pos_getIdAccountBalance_result__isset() : success(false) {}
+  bool success;
+} _Pos_getIdAccountBalance_result__isset;
+
+class Pos_getIdAccountBalance_result {
+ public:
+
+  Pos_getIdAccountBalance_result() : success(0) {
+  }
+
+  virtual ~Pos_getIdAccountBalance_result() throw() {}
+
+  int32_t success;
+
+  _Pos_getIdAccountBalance_result__isset __isset;
+
+  void __set_success(const int32_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getIdAccountBalance_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getIdAccountBalance_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getIdAccountBalance_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getIdAccountBalance_presult__isset {
+  _Pos_getIdAccountBalance_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getIdAccountBalance_presult__isset;
+
+class Pos_getIdAccountBalance_presult {
+ public:
+
+
+  virtual ~Pos_getIdAccountBalance_presult() throw() {}
+
+  int32_t* success;
+
+  _Pos_getIdAccountBalance_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_getNameAccountBalance_args__isset {
+  _Pos_getNameAccountBalance_args__isset() : account(false) {}
+  bool account;
+} _Pos_getNameAccountBalance_args__isset;
+
+class Pos_getNameAccountBalance_args {
+ public:
+
+  Pos_getNameAccountBalance_args() : account("") {
+  }
+
+  virtual ~Pos_getNameAccountBalance_args() throw() {}
+
+  std::string account;
+
+  _Pos_getNameAccountBalance_args__isset __isset;
+
+  void __set_account(const std::string& val) {
+    account = val;
+  }
+
+  bool operator == (const Pos_getNameAccountBalance_args & rhs) const
+  {
+    if (!(account == rhs.account))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getNameAccountBalance_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getNameAccountBalance_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getNameAccountBalance_pargs {
+ public:
+
+
+  virtual ~Pos_getNameAccountBalance_pargs() throw() {}
+
+  const std::string* account;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getNameAccountBalance_result__isset {
+  _Pos_getNameAccountBalance_result__isset() : success(false) {}
+  bool success;
+} _Pos_getNameAccountBalance_result__isset;
+
+class Pos_getNameAccountBalance_result {
+ public:
+
+  Pos_getNameAccountBalance_result() : success(0) {
+  }
+
+  virtual ~Pos_getNameAccountBalance_result() throw() {}
+
+  int32_t success;
+
+  _Pos_getNameAccountBalance_result__isset __isset;
+
+  void __set_success(const int32_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getNameAccountBalance_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getNameAccountBalance_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getNameAccountBalance_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getNameAccountBalance_presult__isset {
+  _Pos_getNameAccountBalance_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getNameAccountBalance_presult__isset;
+
+class Pos_getNameAccountBalance_presult {
+ public:
+
+
+  virtual ~Pos_getNameAccountBalance_presult() throw() {}
+
+  int32_t* success;
+
+  _Pos_getNameAccountBalance_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_associateHashWithId_args__isset {
+  _Pos_associateHashWithId_args__isset() : auth(false), dataToHash(false), account(false) {}
+  bool auth;
+  bool dataToHash;
+  bool account;
+} _Pos_associateHashWithId_args__isset;
+
+class Pos_associateHashWithId_args {
+ public:
+
+  Pos_associateHashWithId_args() : auth(""), dataToHash(""), account(0) {
+  }
+
+  virtual ~Pos_associateHashWithId_args() throw() {}
+
+  std::string auth;
+  std::string dataToHash;
+  int32_t account;
+
+  _Pos_associateHashWithId_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_dataToHash(const std::string& val) {
+    dataToHash = val;
+  }
+
+  void __set_account(const int32_t val) {
+    account = val;
+  }
+
+  bool operator == (const Pos_associateHashWithId_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(dataToHash == rhs.dataToHash))
+      return false;
+    if (!(account == rhs.account))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_associateHashWithId_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_associateHashWithId_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_associateHashWithId_pargs {
+ public:
+
+
+  virtual ~Pos_associateHashWithId_pargs() throw() {}
+
+  const std::string* auth;
+  const std::string* dataToHash;
+  const int32_t* account;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_associateHashWithId_result__isset {
+  _Pos_associateHashWithId_result__isset() : success(false) {}
+  bool success;
+} _Pos_associateHashWithId_result__isset;
+
+class Pos_associateHashWithId_result {
+ public:
+
+  Pos_associateHashWithId_result() : success(0) {
+  }
+
+  virtual ~Pos_associateHashWithId_result() throw() {}
+
+  int64_t success;
+
+  _Pos_associateHashWithId_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_associateHashWithId_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_associateHashWithId_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_associateHashWithId_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_associateHashWithId_presult__isset {
+  _Pos_associateHashWithId_presult__isset() : success(false) {}
+  bool success;
+} _Pos_associateHashWithId_presult__isset;
+
+class Pos_associateHashWithId_presult {
+ public:
+
+
+  virtual ~Pos_associateHashWithId_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_associateHashWithId_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_associateHashWithName_args__isset {
+  _Pos_associateHashWithName_args__isset() : auth(false), dataToHash(false), account(false) {}
+  bool auth;
+  bool dataToHash;
+  bool account;
+} _Pos_associateHashWithName_args__isset;
+
+class Pos_associateHashWithName_args {
+ public:
+
+  Pos_associateHashWithName_args() : auth(""), dataToHash(""), account("") {
+  }
+
+  virtual ~Pos_associateHashWithName_args() throw() {}
+
+  std::string auth;
+  std::string dataToHash;
+  std::string account;
+
+  _Pos_associateHashWithName_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_dataToHash(const std::string& val) {
+    dataToHash = val;
+  }
+
+  void __set_account(const std::string& val) {
+    account = val;
+  }
+
+  bool operator == (const Pos_associateHashWithName_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(dataToHash == rhs.dataToHash))
+      return false;
+    if (!(account == rhs.account))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_associateHashWithName_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_associateHashWithName_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_associateHashWithName_pargs {
+ public:
+
+
+  virtual ~Pos_associateHashWithName_pargs() throw() {}
+
+  const std::string* auth;
+  const std::string* dataToHash;
+  const std::string* account;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_associateHashWithName_result__isset {
+  _Pos_associateHashWithName_result__isset() : success(false) {}
+  bool success;
+} _Pos_associateHashWithName_result__isset;
+
+class Pos_associateHashWithName_result {
+ public:
+
+  Pos_associateHashWithName_result() : success(0) {
+  }
+
+  virtual ~Pos_associateHashWithName_result() throw() {}
+
+  int64_t success;
+
+  _Pos_associateHashWithName_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_associateHashWithName_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_associateHashWithName_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_associateHashWithName_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_associateHashWithName_presult__isset {
+  _Pos_associateHashWithName_presult__isset() : success(false) {}
+  bool success;
+} _Pos_associateHashWithName_presult__isset;
+
+class Pos_associateHashWithName_presult {
+ public:
+
+
+  virtual ~Pos_associateHashWithName_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_associateHashWithName_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_deassociateHash_args__isset {
+  _Pos_deassociateHash_args__isset() : auth(false), dataToHash(false) {}
+  bool auth;
+  bool dataToHash;
+} _Pos_deassociateHash_args__isset;
+
+class Pos_deassociateHash_args {
+ public:
+
+  Pos_deassociateHash_args() : auth(""), dataToHash("") {
+  }
+
+  virtual ~Pos_deassociateHash_args() throw() {}
+
+  std::string auth;
+  std::string dataToHash;
+
+  _Pos_deassociateHash_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_dataToHash(const std::string& val) {
+    dataToHash = val;
+  }
+
+  bool operator == (const Pos_deassociateHash_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(dataToHash == rhs.dataToHash))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_deassociateHash_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_deassociateHash_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_deassociateHash_pargs {
+ public:
+
+
+  virtual ~Pos_deassociateHash_pargs() throw() {}
+
+  const std::string* auth;
+  const std::string* dataToHash;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_deassociateHash_result__isset {
+  _Pos_deassociateHash_result__isset() : success(false) {}
+  bool success;
+} _Pos_deassociateHash_result__isset;
+
+class Pos_deassociateHash_result {
+ public:
+
+  Pos_deassociateHash_result() : success(0) {
+  }
+
+  virtual ~Pos_deassociateHash_result() throw() {}
+
+  int64_t success;
+
+  _Pos_deassociateHash_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_deassociateHash_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_deassociateHash_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_deassociateHash_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_deassociateHash_presult__isset {
+  _Pos_deassociateHash_presult__isset() : success(false) {}
+  bool success;
+} _Pos_deassociateHash_presult__isset;
+
+class Pos_deassociateHash_presult {
+ public:
+
+
+  virtual ~Pos_deassociateHash_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_deassociateHash_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_getUPCPrice_args__isset {
+  _Pos_getUPCPrice_args__isset() : upc_high(false), upc_low(false) {}
+  bool upc_high;
+  bool upc_low;
+} _Pos_getUPCPrice_args__isset;
+
+class Pos_getUPCPrice_args {
+ public:
+
+  Pos_getUPCPrice_args() : upc_high(0), upc_low(0) {
+  }
+
+  virtual ~Pos_getUPCPrice_args() throw() {}
+
+  int64_t upc_high;
+  int64_t upc_low;
+
+  _Pos_getUPCPrice_args__isset __isset;
+
+  void __set_upc_high(const int64_t val) {
+    upc_high = val;
+  }
+
+  void __set_upc_low(const int64_t val) {
+    upc_low = val;
+  }
+
+  bool operator == (const Pos_getUPCPrice_args & rhs) const
+  {
+    if (!(upc_high == rhs.upc_high))
+      return false;
+    if (!(upc_low == rhs.upc_low))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getUPCPrice_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getUPCPrice_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getUPCPrice_pargs {
+ public:
+
+
+  virtual ~Pos_getUPCPrice_pargs() throw() {}
+
+  const int64_t* upc_high;
+  const int64_t* upc_low;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getUPCPrice_result__isset {
+  _Pos_getUPCPrice_result__isset() : success(false) {}
+  bool success;
+} _Pos_getUPCPrice_result__isset;
+
+class Pos_getUPCPrice_result {
+ public:
+
+  Pos_getUPCPrice_result() : success(0) {
+  }
+
+  virtual ~Pos_getUPCPrice_result() throw() {}
+
+  int32_t success;
+
+  _Pos_getUPCPrice_result__isset __isset;
+
+  void __set_success(const int32_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getUPCPrice_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getUPCPrice_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getUPCPrice_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getUPCPrice_presult__isset {
+  _Pos_getUPCPrice_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getUPCPrice_presult__isset;
+
+class Pos_getUPCPrice_presult {
+ public:
+
+
+  virtual ~Pos_getUPCPrice_presult() throw() {}
+
+  int32_t* success;
+
+  _Pos_getUPCPrice_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_setUPCPrice_args__isset {
+  _Pos_setUPCPrice_args__isset() : auth(false), upc_high(false), upc_low(false), price(false) {}
+  bool auth;
+  bool upc_high;
+  bool upc_low;
+  bool price;
+} _Pos_setUPCPrice_args__isset;
+
+class Pos_setUPCPrice_args {
+ public:
+
+  Pos_setUPCPrice_args() : auth(""), upc_high(0), upc_low(0), price(0) {
+  }
+
+  virtual ~Pos_setUPCPrice_args() throw() {}
+
+  std::string auth;
+  int64_t upc_high;
+  int64_t upc_low;
+  int32_t price;
+
+  _Pos_setUPCPrice_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_upc_high(const int64_t val) {
+    upc_high = val;
+  }
+
+  void __set_upc_low(const int64_t val) {
+    upc_low = val;
+  }
+
+  void __set_price(const int32_t val) {
+    price = val;
+  }
+
+  bool operator == (const Pos_setUPCPrice_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(upc_high == rhs.upc_high))
+      return false;
+    if (!(upc_low == rhs.upc_low))
+      return false;
+    if (!(price == rhs.price))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_setUPCPrice_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_setUPCPrice_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_setUPCPrice_pargs {
+ public:
+
+
+  virtual ~Pos_setUPCPrice_pargs() throw() {}
+
+  const std::string* auth;
+  const int64_t* upc_high;
+  const int64_t* upc_low;
+  const int32_t* price;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_setUPCPrice_result__isset {
+  _Pos_setUPCPrice_result__isset() : success(false) {}
+  bool success;
+} _Pos_setUPCPrice_result__isset;
+
+class Pos_setUPCPrice_result {
+ public:
+
+  Pos_setUPCPrice_result() : success(0) {
+  }
+
+  virtual ~Pos_setUPCPrice_result() throw() {}
+
+  int64_t success;
+
+  _Pos_setUPCPrice_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_setUPCPrice_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_setUPCPrice_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_setUPCPrice_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_setUPCPrice_presult__isset {
+  _Pos_setUPCPrice_presult__isset() : success(false) {}
+  bool success;
+} _Pos_setUPCPrice_presult__isset;
+
+class Pos_setUPCPrice_presult {
+ public:
+
+
+  virtual ~Pos_setUPCPrice_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_setUPCPrice_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_doTransactionOnHash_args__isset {
+  _Pos_doTransactionOnHash_args__isset() : auth(false), dataToHash(false), delta(false) {}
+  bool auth;
+  bool dataToHash;
+  bool delta;
+} _Pos_doTransactionOnHash_args__isset;
+
+class Pos_doTransactionOnHash_args {
+ public:
+
+  Pos_doTransactionOnHash_args() : auth(""), dataToHash(""), delta(0) {
+  }
+
+  virtual ~Pos_doTransactionOnHash_args() throw() {}
+
+  std::string auth;
+  std::string dataToHash;
+  int32_t delta;
+
+  _Pos_doTransactionOnHash_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_dataToHash(const std::string& val) {
+    dataToHash = val;
+  }
+
+  void __set_delta(const int32_t val) {
+    delta = val;
+  }
+
+  bool operator == (const Pos_doTransactionOnHash_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(dataToHash == rhs.dataToHash))
+      return false;
+    if (!(delta == rhs.delta))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_doTransactionOnHash_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_doTransactionOnHash_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_doTransactionOnHash_pargs {
+ public:
+
+
+  virtual ~Pos_doTransactionOnHash_pargs() throw() {}
+
+  const std::string* auth;
+  const std::string* dataToHash;
+  const int32_t* delta;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_doTransactionOnHash_result__isset {
+  _Pos_doTransactionOnHash_result__isset() : success(false) {}
+  bool success;
+} _Pos_doTransactionOnHash_result__isset;
+
+class Pos_doTransactionOnHash_result {
+ public:
+
+  Pos_doTransactionOnHash_result() : success(0) {
+  }
+
+  virtual ~Pos_doTransactionOnHash_result() throw() {}
+
+  int64_t success;
+
+  _Pos_doTransactionOnHash_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_doTransactionOnHash_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_doTransactionOnHash_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_doTransactionOnHash_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_doTransactionOnHash_presult__isset {
+  _Pos_doTransactionOnHash_presult__isset() : success(false) {}
+  bool success;
+} _Pos_doTransactionOnHash_presult__isset;
+
+class Pos_doTransactionOnHash_presult {
+ public:
+
+
+  virtual ~Pos_doTransactionOnHash_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_doTransactionOnHash_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_doTransactionOnId_args__isset {
+  _Pos_doTransactionOnId_args__isset() : auth(false), account(false), delta(false) {}
+  bool auth;
+  bool account;
+  bool delta;
+} _Pos_doTransactionOnId_args__isset;
+
+class Pos_doTransactionOnId_args {
+ public:
+
+  Pos_doTransactionOnId_args() : auth(""), account(0), delta(0) {
+  }
+
+  virtual ~Pos_doTransactionOnId_args() throw() {}
+
+  std::string auth;
+  int32_t account;
+  int32_t delta;
+
+  _Pos_doTransactionOnId_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_account(const int32_t val) {
+    account = val;
+  }
+
+  void __set_delta(const int32_t val) {
+    delta = val;
+  }
+
+  bool operator == (const Pos_doTransactionOnId_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(account == rhs.account))
+      return false;
+    if (!(delta == rhs.delta))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_doTransactionOnId_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_doTransactionOnId_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_doTransactionOnId_pargs {
+ public:
+
+
+  virtual ~Pos_doTransactionOnId_pargs() throw() {}
+
+  const std::string* auth;
+  const int32_t* account;
+  const int32_t* delta;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_doTransactionOnId_result__isset {
+  _Pos_doTransactionOnId_result__isset() : success(false) {}
+  bool success;
+} _Pos_doTransactionOnId_result__isset;
+
+class Pos_doTransactionOnId_result {
+ public:
+
+  Pos_doTransactionOnId_result() : success(0) {
+  }
+
+  virtual ~Pos_doTransactionOnId_result() throw() {}
+
+  int64_t success;
+
+  _Pos_doTransactionOnId_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_doTransactionOnId_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_doTransactionOnId_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_doTransactionOnId_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_doTransactionOnId_presult__isset {
+  _Pos_doTransactionOnId_presult__isset() : success(false) {}
+  bool success;
+} _Pos_doTransactionOnId_presult__isset;
+
+class Pos_doTransactionOnId_presult {
+ public:
+
+
+  virtual ~Pos_doTransactionOnId_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_doTransactionOnId_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_doTransactionOnName_args__isset {
+  _Pos_doTransactionOnName_args__isset() : auth(false), account(false), delta(false) {}
+  bool auth;
+  bool account;
+  bool delta;
+} _Pos_doTransactionOnName_args__isset;
+
+class Pos_doTransactionOnName_args {
+ public:
+
+  Pos_doTransactionOnName_args() : auth(""), account(""), delta(0) {
+  }
+
+  virtual ~Pos_doTransactionOnName_args() throw() {}
+
+  std::string auth;
+  std::string account;
+  int32_t delta;
+
+  _Pos_doTransactionOnName_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_account(const std::string& val) {
+    account = val;
+  }
+
+  void __set_delta(const int32_t val) {
+    delta = val;
+  }
+
+  bool operator == (const Pos_doTransactionOnName_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(account == rhs.account))
+      return false;
+    if (!(delta == rhs.delta))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_doTransactionOnName_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_doTransactionOnName_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_doTransactionOnName_pargs {
+ public:
+
+
+  virtual ~Pos_doTransactionOnName_pargs() throw() {}
+
+  const std::string* auth;
+  const std::string* account;
+  const int32_t* delta;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_doTransactionOnName_result__isset {
+  _Pos_doTransactionOnName_result__isset() : success(false) {}
+  bool success;
+} _Pos_doTransactionOnName_result__isset;
+
+class Pos_doTransactionOnName_result {
+ public:
+
+  Pos_doTransactionOnName_result() : success(0) {
+  }
+
+  virtual ~Pos_doTransactionOnName_result() throw() {}
+
+  int64_t success;
+
+  _Pos_doTransactionOnName_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_doTransactionOnName_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_doTransactionOnName_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_doTransactionOnName_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_doTransactionOnName_presult__isset {
+  _Pos_doTransactionOnName_presult__isset() : success(false) {}
+  bool success;
+} _Pos_doTransactionOnName_presult__isset;
+
+class Pos_doTransactionOnName_presult {
+ public:
+
+
+  virtual ~Pos_doTransactionOnName_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_doTransactionOnName_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_revertTransaction_args__isset {
+  _Pos_revertTransaction_args__isset() : auth(false), serial(false) {}
+  bool auth;
+  bool serial;
+} _Pos_revertTransaction_args__isset;
+
+class Pos_revertTransaction_args {
+ public:
+
+  Pos_revertTransaction_args() : auth(""), serial(0) {
+  }
+
+  virtual ~Pos_revertTransaction_args() throw() {}
+
+  std::string auth;
+  int64_t serial;
+
+  _Pos_revertTransaction_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_serial(const int64_t val) {
+    serial = val;
+  }
+
+  bool operator == (const Pos_revertTransaction_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(serial == rhs.serial))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_revertTransaction_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_revertTransaction_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_revertTransaction_pargs {
+ public:
+
+
+  virtual ~Pos_revertTransaction_pargs() throw() {}
+
+  const std::string* auth;
+  const int64_t* serial;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_revertTransaction_result__isset {
+  _Pos_revertTransaction_result__isset() : success(false) {}
+  bool success;
+} _Pos_revertTransaction_result__isset;
+
+class Pos_revertTransaction_result {
+ public:
+
+  Pos_revertTransaction_result() : success(0) {
+  }
+
+  virtual ~Pos_revertTransaction_result() throw() {}
+
+  int64_t success;
+
+  _Pos_revertTransaction_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_revertTransaction_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_revertTransaction_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_revertTransaction_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_revertTransaction_presult__isset {
+  _Pos_revertTransaction_presult__isset() : success(false) {}
+  bool success;
+} _Pos_revertTransaction_presult__isset;
+
+class Pos_revertTransaction_presult {
+ public:
+
+
+  virtual ~Pos_revertTransaction_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_revertTransaction_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_getStock_args__isset {
+  _Pos_getStock_args__isset() : upc_high(false), upc_low(false) {}
+  bool upc_high;
+  bool upc_low;
+} _Pos_getStock_args__isset;
+
+class Pos_getStock_args {
+ public:
+
+  Pos_getStock_args() : upc_high(0), upc_low(0) {
+  }
+
+  virtual ~Pos_getStock_args() throw() {}
+
+  int64_t upc_high;
+  int64_t upc_low;
+
+  _Pos_getStock_args__isset __isset;
+
+  void __set_upc_high(const int64_t val) {
+    upc_high = val;
+  }
+
+  void __set_upc_low(const int64_t val) {
+    upc_low = val;
+  }
+
+  bool operator == (const Pos_getStock_args & rhs) const
+  {
+    if (!(upc_high == rhs.upc_high))
+      return false;
+    if (!(upc_low == rhs.upc_low))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getStock_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getStock_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_getStock_pargs {
+ public:
+
+
+  virtual ~Pos_getStock_pargs() throw() {}
+
+  const int64_t* upc_high;
+  const int64_t* upc_low;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getStock_result__isset {
+  _Pos_getStock_result__isset() : success(false) {}
+  bool success;
+} _Pos_getStock_result__isset;
+
+class Pos_getStock_result {
+ public:
+
+  Pos_getStock_result() : success(0) {
+  }
+
+  virtual ~Pos_getStock_result() throw() {}
+
+  int32_t success;
+
+  _Pos_getStock_result__isset __isset;
+
+  void __set_success(const int32_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_getStock_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_getStock_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_getStock_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_getStock_presult__isset {
+  _Pos_getStock_presult__isset() : success(false) {}
+  bool success;
+} _Pos_getStock_presult__isset;
+
+class Pos_getStock_presult {
+ public:
+
+
+  virtual ~Pos_getStock_presult() throw() {}
+
+  int32_t* success;
+
+  _Pos_getStock_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Pos_doStockChange_args__isset {
+  _Pos_doStockChange_args__isset() : auth(false), upc_high(false), upc_low(false), delta(false) {}
+  bool auth;
+  bool upc_high;
+  bool upc_low;
+  bool delta;
+} _Pos_doStockChange_args__isset;
+
+class Pos_doStockChange_args {
+ public:
+
+  Pos_doStockChange_args() : auth(""), upc_high(0), upc_low(0), delta(0) {
+  }
+
+  virtual ~Pos_doStockChange_args() throw() {}
+
+  std::string auth;
+  int64_t upc_high;
+  int64_t upc_low;
+  int32_t delta;
+
+  _Pos_doStockChange_args__isset __isset;
+
+  void __set_auth(const std::string& val) {
+    auth = val;
+  }
+
+  void __set_upc_high(const int64_t val) {
+    upc_high = val;
+  }
+
+  void __set_upc_low(const int64_t val) {
+    upc_low = val;
+  }
+
+  void __set_delta(const int32_t val) {
+    delta = val;
+  }
+
+  bool operator == (const Pos_doStockChange_args & rhs) const
+  {
+    if (!(auth == rhs.auth))
+      return false;
+    if (!(upc_high == rhs.upc_high))
+      return false;
+    if (!(upc_low == rhs.upc_low))
+      return false;
+    if (!(delta == rhs.delta))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_doStockChange_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_doStockChange_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_doStockChange_pargs {
+ public:
+
+
+  virtual ~Pos_doStockChange_pargs() throw() {}
+
+  const std::string* auth;
+  const int64_t* upc_high;
+  const int64_t* upc_low;
+  const int32_t* delta;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_doStockChange_result__isset {
+  _Pos_doStockChange_result__isset() : success(false) {}
+  bool success;
+} _Pos_doStockChange_result__isset;
+
+class Pos_doStockChange_result {
+ public:
+
+  Pos_doStockChange_result() : success(0) {
+  }
+
+  virtual ~Pos_doStockChange_result() throw() {}
+
+  int64_t success;
+
+  _Pos_doStockChange_result__isset __isset;
+
+  void __set_success(const int64_t val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_doStockChange_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_doStockChange_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_doStockChange_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_doStockChange_presult__isset {
+  _Pos_doStockChange_presult__isset() : success(false) {}
+  bool success;
+} _Pos_doStockChange_presult__isset;
+
+class Pos_doStockChange_presult {
+ public:
+
+
+  virtual ~Pos_doStockChange_presult() throw() {}
+
+  int64_t* success;
+
+  _Pos_doStockChange_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Pos_toString_args {
+ public:
+
+  Pos_toString_args() {
+  }
+
+  virtual ~Pos_toString_args() throw() {}
+
+
+  bool operator == (const Pos_toString_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Pos_toString_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_toString_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Pos_toString_pargs {
+ public:
+
+
+  virtual ~Pos_toString_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_toString_result__isset {
+  _Pos_toString_result__isset() : success(false) {}
+  bool success;
+} _Pos_toString_result__isset;
+
+class Pos_toString_result {
+ public:
+
+  Pos_toString_result() {
+  }
+
+  virtual ~Pos_toString_result() throw() {}
+
+  std::vector<std::string>  success;
+
+  _Pos_toString_result__isset __isset;
+
+  void __set_success(const std::vector<std::string> & val) {
+    success = val;
+  }
+
+  bool operator == (const Pos_toString_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Pos_toString_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pos_toString_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Pos_toString_presult__isset {
+  _Pos_toString_presult__isset() : success(false) {}
+  bool success;
+} _Pos_toString_presult__isset;
+
+class Pos_toString_presult {
+ public:
+
+
+  virtual ~Pos_toString_presult() throw() {}
+
+  std::vector<std::string> * success;
+
+  _Pos_toString_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+class PosClient : virtual public PosIf {
+ public:
+  PosClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
+    piprot_(prot),
+    poprot_(prot) {
+    iprot_ = prot.get();
+    oprot_ = prot.get();
+  }
+  PosClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) :
+    piprot_(iprot),
+    poprot_(oprot) {
+    iprot_ = iprot.get();
+    oprot_ = oprot.get();
+  }
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
+    return piprot_;
+  }
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
+    return poprot_;
+  }
+  void ping();
+  void send_ping();
+  void recv_ping();
+  void getSalt(std::string& _return);
+  void send_getSalt();
+  void recv_getSalt(std::string& _return);
+  int32_t getAccountFromHash(const std::string& dataToHash);
+  void send_getAccountFromHash(const std::string& dataToHash);
+  int32_t recv_getAccountFromHash();
+  void getHashesFromAccountId(std::vector<std::string> & _return, const int32_t account);
+  void send_getHashesFromAccountId(const int32_t account);
+  void recv_getHashesFromAccountId(std::vector<std::string> & _return);
+  void getHashesFromAccountName(std::vector<std::string> & _return, const std::string& account);
+  void send_getHashesFromAccountName(const std::string& account);
+  void recv_getHashesFromAccountName(std::vector<std::string> & _return);
+  int32_t getHashAccountBalance(const std::string& dataToHash);
+  void send_getHashAccountBalance(const std::string& dataToHash);
+  int32_t recv_getHashAccountBalance();
+  int32_t getIdAccountBalance(const int32_t account);
+  void send_getIdAccountBalance(const int32_t account);
+  int32_t recv_getIdAccountBalance();
+  int32_t getNameAccountBalance(const std::string& account);
+  void send_getNameAccountBalance(const std::string& account);
+  int32_t recv_getNameAccountBalance();
+  int64_t associateHashWithId(const std::string& auth, const std::string& dataToHash, const int32_t account);
+  void send_associateHashWithId(const std::string& auth, const std::string& dataToHash, const int32_t account);
+  int64_t recv_associateHashWithId();
+  int64_t associateHashWithName(const std::string& auth, const std::string& dataToHash, const std::string& account);
+  void send_associateHashWithName(const std::string& auth, const std::string& dataToHash, const std::string& account);
+  int64_t recv_associateHashWithName();
+  int64_t deassociateHash(const std::string& auth, const std::string& dataToHash);
+  void send_deassociateHash(const std::string& auth, const std::string& dataToHash);
+  int64_t recv_deassociateHash();
+  int32_t getUPCPrice(const int64_t upc_high, const int64_t upc_low);
+  void send_getUPCPrice(const int64_t upc_high, const int64_t upc_low);
+  int32_t recv_getUPCPrice();
+  int64_t setUPCPrice(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t price);
+  void send_setUPCPrice(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t price);
+  int64_t recv_setUPCPrice();
+  int64_t doTransactionOnHash(const std::string& auth, const std::string& dataToHash, const int32_t delta);
+  void send_doTransactionOnHash(const std::string& auth, const std::string& dataToHash, const int32_t delta);
+  int64_t recv_doTransactionOnHash();
+  int64_t doTransactionOnId(const std::string& auth, const int32_t account, const int32_t delta);
+  void send_doTransactionOnId(const std::string& auth, const int32_t account, const int32_t delta);
+  int64_t recv_doTransactionOnId();
+  int64_t doTransactionOnName(const std::string& auth, const std::string& account, const int32_t delta);
+  void send_doTransactionOnName(const std::string& auth, const std::string& account, const int32_t delta);
+  int64_t recv_doTransactionOnName();
+  int64_t revertTransaction(const std::string& auth, const int64_t serial);
+  void send_revertTransaction(const std::string& auth, const int64_t serial);
+  int64_t recv_revertTransaction();
+  int32_t getStock(const int64_t upc_high, const int64_t upc_low);
+  void send_getStock(const int64_t upc_high, const int64_t upc_low);
+  int32_t recv_getStock();
+  int64_t doStockChange(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t delta);
+  void send_doStockChange(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t delta);
+  int64_t recv_doStockChange();
+  void toString(std::vector<std::string> & _return);
+  void send_toString();
+  void recv_toString(std::vector<std::string> & _return);
+ protected:
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
+  ::apache::thrift::protocol::TProtocol* iprot_;
+  ::apache::thrift::protocol::TProtocol* oprot_;
+};
+
+class PosProcessor : virtual public ::apache::thrift::TProcessor {
+ protected:
+  boost::shared_ptr<PosIf> iface_;
+  virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext);
+ private:
+  std::map<std::string, void (PosProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)> processMap_;
+  void process_ping(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getSalt(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getAccountFromHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getHashesFromAccountId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getHashesFromAccountName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getHashAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getIdAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getNameAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_associateHashWithId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_associateHashWithName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_deassociateHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getUPCPrice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_setUPCPrice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_doTransactionOnHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_doTransactionOnId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_doTransactionOnName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_revertTransaction(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getStock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_doStockChange(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_toString(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ public:
+  PosProcessor(boost::shared_ptr<PosIf> iface) :
+    iface_(iface) {
+    processMap_["ping"] = &PosProcessor::process_ping;
+    processMap_["getSalt"] = &PosProcessor::process_getSalt;
+    processMap_["getAccountFromHash"] = &PosProcessor::process_getAccountFromHash;
+    processMap_["getHashesFromAccountId"] = &PosProcessor::process_getHashesFromAccountId;
+    processMap_["getHashesFromAccountName"] = &PosProcessor::process_getHashesFromAccountName;
+    processMap_["getHashAccountBalance"] = &PosProcessor::process_getHashAccountBalance;
+    processMap_["getIdAccountBalance"] = &PosProcessor::process_getIdAccountBalance;
+    processMap_["getNameAccountBalance"] = &PosProcessor::process_getNameAccountBalance;
+    processMap_["associateHashWithId"] = &PosProcessor::process_associateHashWithId;
+    processMap_["associateHashWithName"] = &PosProcessor::process_associateHashWithName;
+    processMap_["deassociateHash"] = &PosProcessor::process_deassociateHash;
+    processMap_["getUPCPrice"] = &PosProcessor::process_getUPCPrice;
+    processMap_["setUPCPrice"] = &PosProcessor::process_setUPCPrice;
+    processMap_["doTransactionOnHash"] = &PosProcessor::process_doTransactionOnHash;
+    processMap_["doTransactionOnId"] = &PosProcessor::process_doTransactionOnId;
+    processMap_["doTransactionOnName"] = &PosProcessor::process_doTransactionOnName;
+    processMap_["revertTransaction"] = &PosProcessor::process_revertTransaction;
+    processMap_["getStock"] = &PosProcessor::process_getStock;
+    processMap_["doStockChange"] = &PosProcessor::process_doStockChange;
+    processMap_["toString"] = &PosProcessor::process_toString;
+  }
+
+  virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext);
+  virtual ~PosProcessor() {}
+};
+
+class PosMultiface : virtual public PosIf {
+ public:
+  PosMultiface(std::vector<boost::shared_ptr<PosIf> >& ifaces) : ifaces_(ifaces) {
+  }
+  virtual ~PosMultiface() {}
+ protected:
+  std::vector<boost::shared_ptr<PosIf> > ifaces_;
+  PosMultiface() {}
+  void add(boost::shared_ptr<PosIf> iface) {
+    ifaces_.push_back(iface);
+  }
+ public:
+  void ping() {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      ifaces_[i]->ping();
+    }
+  }
+
+  void getSalt(std::string& _return) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getSalt(_return);
+        return;
+      } else {
+        ifaces_[i]->getSalt(_return);
+      }
+    }
+  }
+
+  int32_t getAccountFromHash(const std::string& dataToHash) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->getAccountFromHash(dataToHash);
+      } else {
+        ifaces_[i]->getAccountFromHash(dataToHash);
+      }
+    }
+  }
+
+  void getHashesFromAccountId(std::vector<std::string> & _return, const int32_t account) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getHashesFromAccountId(_return, account);
+        return;
+      } else {
+        ifaces_[i]->getHashesFromAccountId(_return, account);
+      }
+    }
+  }
+
+  void getHashesFromAccountName(std::vector<std::string> & _return, const std::string& account) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getHashesFromAccountName(_return, account);
+        return;
+      } else {
+        ifaces_[i]->getHashesFromAccountName(_return, account);
+      }
+    }
+  }
+
+  int32_t getHashAccountBalance(const std::string& dataToHash) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->getHashAccountBalance(dataToHash);
+      } else {
+        ifaces_[i]->getHashAccountBalance(dataToHash);
+      }
+    }
+  }
+
+  int32_t getIdAccountBalance(const int32_t account) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->getIdAccountBalance(account);
+      } else {
+        ifaces_[i]->getIdAccountBalance(account);
+      }
+    }
+  }
+
+  int32_t getNameAccountBalance(const std::string& account) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->getNameAccountBalance(account);
+      } else {
+        ifaces_[i]->getNameAccountBalance(account);
+      }
+    }
+  }
+
+  int64_t associateHashWithId(const std::string& auth, const std::string& dataToHash, const int32_t account) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->associateHashWithId(auth, dataToHash, account);
+      } else {
+        ifaces_[i]->associateHashWithId(auth, dataToHash, account);
+      }
+    }
+  }
+
+  int64_t associateHashWithName(const std::string& auth, const std::string& dataToHash, const std::string& account) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->associateHashWithName(auth, dataToHash, account);
+      } else {
+        ifaces_[i]->associateHashWithName(auth, dataToHash, account);
+      }
+    }
+  }
+
+  int64_t deassociateHash(const std::string& auth, const std::string& dataToHash) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->deassociateHash(auth, dataToHash);
+      } else {
+        ifaces_[i]->deassociateHash(auth, dataToHash);
+      }
+    }
+  }
+
+  int32_t getUPCPrice(const int64_t upc_high, const int64_t upc_low) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->getUPCPrice(upc_high, upc_low);
+      } else {
+        ifaces_[i]->getUPCPrice(upc_high, upc_low);
+      }
+    }
+  }
+
+  int64_t setUPCPrice(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t price) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->setUPCPrice(auth, upc_high, upc_low, price);
+      } else {
+        ifaces_[i]->setUPCPrice(auth, upc_high, upc_low, price);
+      }
+    }
+  }
+
+  int64_t doTransactionOnHash(const std::string& auth, const std::string& dataToHash, const int32_t delta) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->doTransactionOnHash(auth, dataToHash, delta);
+      } else {
+        ifaces_[i]->doTransactionOnHash(auth, dataToHash, delta);
+      }
+    }
+  }
+
+  int64_t doTransactionOnId(const std::string& auth, const int32_t account, const int32_t delta) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->doTransactionOnId(auth, account, delta);
+      } else {
+        ifaces_[i]->doTransactionOnId(auth, account, delta);
+      }
+    }
+  }
+
+  int64_t doTransactionOnName(const std::string& auth, const std::string& account, const int32_t delta) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->doTransactionOnName(auth, account, delta);
+      } else {
+        ifaces_[i]->doTransactionOnName(auth, account, delta);
+      }
+    }
+  }
+
+  int64_t revertTransaction(const std::string& auth, const int64_t serial) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->revertTransaction(auth, serial);
+      } else {
+        ifaces_[i]->revertTransaction(auth, serial);
+      }
+    }
+  }
+
+  int32_t getStock(const int64_t upc_high, const int64_t upc_low) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->getStock(upc_high, upc_low);
+      } else {
+        ifaces_[i]->getStock(upc_high, upc_low);
+      }
+    }
+  }
+
+  int64_t doStockChange(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t delta) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->doStockChange(auth, upc_high, upc_low, delta);
+      } else {
+        ifaces_[i]->doStockChange(auth, upc_high, upc_low, delta);
+      }
+    }
+  }
+
+  void toString(std::vector<std::string> & _return) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->toString(_return);
+        return;
+      } else {
+        ifaces_[i]->toString(_return);
+      }
+    }
+  }
+
+};
+
+} // namespace
+
+#endif
diff --git a/database/gen-cpp/Pos_server.skeleton.cpp b/database/gen-cpp/Pos_server.skeleton.cpp
new file mode 100644 (file)
index 0000000..17ea6e7
--- /dev/null
@@ -0,0 +1,172 @@
+// This autogenerated skeleton file illustrates how to build a server.
+// You should copy it to another filename to avoid overwriting it.
+
+#include "Pos.h"
+#include <protocol/TBinaryProtocol.h>
+#include <server/TSimpleServer.h>
+#include <transport/TServerSocket.h>
+#include <transport/TBufferTransports.h>
+#include <iostream>
+#include "db_if.h"
+#include "db.h"
+#include "sha1.h"
+
+using namespace ::apache::thrift;
+using namespace ::apache::thrift::protocol;
+using namespace ::apache::thrift::transport;
+using namespace ::apache::thrift::server;
+
+using boost::shared_ptr;
+
+using namespace pos;
+
+DbIf * d;
+
+class PosHandler : virtual public PosIf {
+ public:
+  PosHandler() {
+       std::cerr << "Pos server starting.\n";
+  }
+
+  void ping() { }
+
+  void getSalt(std::string& _return) {
+    _return = d->getSalt();
+  }
+
+  int32_t getAccountFromHash(const std::string& dataToHash) {
+    return d->getDb().getAccountFromHash(SHA1Hash(dataToHash));
+  }
+
+  void getHashesFromAccountId(std::vector<std::string> & _return, const int32_t account) {
+    std::list<std::string> rv = d->getDb().getHashesFromAccount(account);
+    _return.reserve(rv.size());
+    for(std::list<std::string>::iterator p = rv.begin(); p != rv.end(); ++p)
+      _return.push_back(*p);
+  }
+
+  void getHashesFromAccountName(std::vector<std::string> & _return, const std::string& account) {
+    std::list<std::string> rv = d->getDb().getHashesFromAccount(account);
+    _return.reserve(rv.size());
+    for(std::list<std::string>::iterator p = rv.begin(); p != rv.end(); ++p)
+      _return.push_back(*p);
+  }
+
+  int32_t getHashAccountBalance(const std::string& dataToHash) {
+    return d->getDb().getAccountBalance(SHA1Hash(dataToHash));
+  }
+
+  int32_t getIdAccountBalance(const int32_t account) {
+    return d->getDb().getAccountBalance(account);
+  }
+
+  int32_t getNameAccountBalance(const std::string& account) {
+    return d->getDb().getAccountBalance(account);
+  }
+
+  int64_t associateHashWithId(const std::string& auth, const std::string& dataToHash, const int32_t account) {
+    if(d->consumeKey(auth))
+      return d->getDb().associateHash(SHA1Hash(dataToHash), account);
+    else
+      return 0;
+  }
+
+  int64_t associateHashWithName(const std::string& auth, const std::string& dataToHash, const std::string& account) {
+    if(d->consumeKey(auth))
+      return d->getDb().associateHash(SHA1Hash(dataToHash), account);
+    else
+      return 0;
+  }
+
+  int64_t deassociateHash(const std::string& auth, const std::string& dataToHash) {
+    if(d->consumeKey(auth))
+      return d->getDb().deassociateHash(SHA1Hash(dataToHash));
+    else
+      return 0;
+  }
+
+  int32_t getUPCPrice(const int64_t upc_high, const int64_t upc_low) {
+    UPC u;
+    u.l = upc_low;
+    u.h = upc_high;
+    return d->getDb().getUPCPrice(u);
+  }
+
+  int64_t setUPCPrice(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t price) {
+    if(d->consumeKey(auth)) {
+      UPC u;
+      u.l = upc_low;
+      u.h = upc_high;
+      return d->getDb().setUPCPrice(u, price);
+    } else
+      return 0;
+  }
+
+  int64_t doTransactionOnHash(const std::string& auth, const std::string& dataToHash, const int32_t delta) {
+    if(d->consumeKey(auth))
+      return d->getDb().doTransaction(SHA1Hash(dataToHash), delta);
+    else
+      return 0;
+  }
+
+  int64_t doTransactionOnId(const std::string& auth, const int32_t account, const int32_t delta) {
+    if(d->consumeKey(auth))
+      return d->getDb().doTransaction(account, delta);
+    else
+      return 0;
+  }
+
+  int64_t doTransactionOnName(const std::string& auth, const std::string& account, const int32_t delta) {
+    if(d->consumeKey(auth))
+      return d->getDb().doTransaction(account, delta);
+    else
+      return 0;
+  }
+
+  int64_t revertTransaction(const std::string& auth, const int64_t serial) {
+    if(d->consumeKey(auth))
+      return d->getDb().revertTransaction(serial);
+    else
+      return 0;
+  }
+
+  int32_t getStock(const int64_t upc_high, const int64_t upc_low) {
+    UPC u;
+    u.h = upc_high;
+    u.l = upc_low;
+    return d->getDb().getStock(u);
+  }
+
+  int64_t doStockChange(const std::string& auth, const int64_t upc_high, const int64_t upc_low, const int32_t delta) {
+    if(d->consumeKey(auth)) {
+      UPC u;
+      u.h = upc_high;
+      u.l = upc_low;
+      return d->getDb().doStockChange(u, delta);
+    } else
+      return 0;
+  }
+
+  void toString(std::vector<std::string> & _return) {
+    _return = d->getDb().toString();
+  }
+
+};
+
+int main(int argc, char **argv) {
+  int port = 9090;
+
+  DbIf ds(argc, argv);
+  d = & ds;
+
+  shared_ptr<PosHandler> handler(new PosHandler());
+  shared_ptr<TProcessor> processor(new PosProcessor(handler));
+  shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
+  shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
+  shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+
+  TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
+  server.serve();
+  return 0;
+}
+
diff --git a/database/gen-cpp/pos_constants.cpp b/database/gen-cpp/pos_constants.cpp
new file mode 100644 (file)
index 0000000..de1c36d
--- /dev/null
@@ -0,0 +1,16 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "pos_constants.h"
+
+namespace pos {
+
+const posConstants g_pos_constants;
+
+posConstants::posConstants() {
+}
+
+} // namespace
+
diff --git a/database/gen-cpp/pos_constants.h b/database/gen-cpp/pos_constants.h
new file mode 100644 (file)
index 0000000..d263c6e
--- /dev/null
@@ -0,0 +1,23 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef pos_CONSTANTS_H
+#define pos_CONSTANTS_H
+
+#include "pos_types.h"
+
+namespace pos {
+
+class posConstants {
+ public:
+  posConstants();
+
+};
+
+extern const posConstants g_pos_constants;
+
+} // namespace
+
+#endif
diff --git a/database/gen-cpp/pos_types.cpp b/database/gen-cpp/pos_types.cpp
new file mode 100644 (file)
index 0000000..8bd73b0
--- /dev/null
@@ -0,0 +1,10 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "pos_types.h"
+
+namespace pos {
+
+} // namespace
diff --git a/database/gen-cpp/pos_types.h b/database/gen-cpp/pos_types.h
new file mode 100644 (file)
index 0000000..4a4de6f
--- /dev/null
@@ -0,0 +1,20 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef pos_TYPES_H
+#define pos_TYPES_H
+
+#include <Thrift.h>
+#include <TApplicationException.h>
+#include <protocol/TProtocol.h>
+#include <transport/TTransport.h>
+
+
+
+namespace pos {
+
+} // namespace
+
+#endif
index 541f3fc..bbe7a8f 100644 (file)
@@ -5,24 +5,29 @@ service Pos {
 
        string getSalt(),
 
-       i32 getAccountFromHash(1:string auth, 2:string dataToHash),
-       list<string> getHashesFromAccountId(1:string auth, 2:i32 account),
-       list<string> getHashesFromAccountName(1:string auth, 2:string account),
+       i32 getAccountFromHash(1:string dataToHash),
+       list<string> getHashesFromAccountId(1:i32 account),
+       list<string> getHashesFromAccountName(1:string account),
 
-       i32 getHashAccountBalance(1:string auth, 2:string dataToHash),
-       i32 getIdAccountBalance(1:string auth, 2:i32 account),
-       i32 getNameAccountBalance(1:string auth, 2:string account),
+       i32 getHashAccountBalance(1:string dataToHash),
+       i32 getIdAccountBalance(1:i32 account),
+       i32 getNameAccountBalance(1:string account),
 
        i64 associateHashWithId(1:string auth, 2:string dataToHash, 3:i32 account),
        i64 associateHashWithName(1:string auth, 2:string dataToHash, 3:string account),
        i64 deassociateHash(1:string auth, 2:string dataToHash),
 
+       i32 getUPCPrice(1:i64 upc_high, 2:i64 upc_low),
+       i64 setUPCPrice(1:string auth, 2:i64 upc_high, 3:i64 upc_low, 4:i32 price),
+
        i64 doTransactionOnHash(1:string auth, 2:string dataToHash, 3:i32 delta),
        i64 doTransactionOnId(1:string auth, 2:i32 account, 3:i32 delta),
        i64 doTransactionOnName(1:string auth, 2:string account, 3:i32 delta),
        i64 revertTransaction(1:string auth, 2:i64 serial),
 
-       i32 getStock(1:string auth, 2:i64 upc_high, 3:i64 upc_low),
-       i64 doStockChange(1:string auth, 2:i64 upc_high, 3:i64 upc_low, 4:i32 delta)
+       i32 getStock(1:i64 upc_high, 3:i64 upc_low),
+       i64 doStockChange(1:string auth, 2:i64 upc_high, 3:i64 upc_low, 4:i32 delta),
+
+       list<string> toString()
 }
 
index 644ea16..e063123 100644 (file)
@@ -13,16 +13,23 @@ SHA1Hash::SHA1Hash(const char * str) {
 }
 
 SHA1Hash::SHA1Hash(const std::string str) {
-       SHA1Hash(str.c_str());
+       blk_SHA_CTX ctx;
+        blk_SHA1_Init(&ctx);
+        blk_SHA1_Update(&ctx, (const unsigned char*)str.c_str(), str.length());
+        blk_SHA1_Final(data, &ctx);
 }
 
 SHA1Hash::SHA1Hash(const SHA1Hash & other) {
        memcpy(data, other.data, sizeof(unsigned char) * 20);
 }
 
+SHA1Hash & SHA1Hash::operator=(const SHA1Hash & other) {
+       memcpy(data, other.data, sizeof(unsigned char) * 20);
+       return *this;
+}
+
 std::string SHA1Hash::toHex() {
        char bfr[41];
-       int c = 0;
        for(int i=0;i<20;++i)
                snprintf(bfr + 2*i, 3, "%02x", data[i]);
        return std::string(bfr);
index c30b709..cc6d1f8 100644 (file)
@@ -8,6 +8,7 @@ struct __attribute__ ((packed)) SHA1Hash {
        explicit SHA1Hash(const char * str);
        explicit SHA1Hash(const std::string str);
        SHA1Hash(const SHA1Hash & other);
+       SHA1Hash & operator=(const SHA1Hash & other);
        std::string toHex();
        void fromHex(std::string s);
        bool operator==(const SHA1Hash & other) const;