|
|
|
@ -1,12 +1,13 @@
|
|
|
|
|
/**
|
|
|
|
|
* Autogenerated by Thrift Compiler (0.7.0)
|
|
|
|
|
* Autogenerated by Thrift Compiler (0.9.0)
|
|
|
|
|
*
|
|
|
|
|
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
|
|
* @generated
|
|
|
|
|
*/
|
|
|
|
|
#ifndef Pos_H
|
|
|
|
|
#define Pos_H
|
|
|
|
|
|
|
|
|
|
#include <TProcessor.h>
|
|
|
|
|
#include <thrift/TDispatchProcessor.h>
|
|
|
|
|
#include "pos_types.h"
|
|
|
|
|
|
|
|
|
|
namespace pos {
|
|
|
|
@ -36,6 +37,30 @@ class PosIf {
|
|
|
|
|
virtual void toString(std::vector<std::string> & _return) = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class PosIfFactory {
|
|
|
|
|
public:
|
|
|
|
|
typedef PosIf Handler;
|
|
|
|
|
|
|
|
|
|
virtual ~PosIfFactory() {}
|
|
|
|
|
|
|
|
|
|
virtual PosIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0;
|
|
|
|
|
virtual void releaseHandler(PosIf* /* handler */) = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class PosIfSingletonFactory : virtual public PosIfFactory {
|
|
|
|
|
public:
|
|
|
|
|
PosIfSingletonFactory(const boost::shared_ptr<PosIf>& iface) : iface_(iface) {}
|
|
|
|
|
virtual ~PosIfSingletonFactory() {}
|
|
|
|
|
|
|
|
|
|
virtual PosIf* getHandler(const ::apache::thrift::TConnectionInfo&) {
|
|
|
|
|
return iface_.get();
|
|
|
|
|
}
|
|
|
|
|
virtual void releaseHandler(PosIf* /* handler */) {}
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
boost::shared_ptr<PosIf> iface_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class PosNull : virtual public PosIf {
|
|
|
|
|
public:
|
|
|
|
|
virtual ~PosNull() {}
|
|
|
|
@ -235,7 +260,7 @@ typedef struct _Pos_getSalt_result__isset {
|
|
|
|
|
class Pos_getSalt_result {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_getSalt_result() : success("") {
|
|
|
|
|
Pos_getSalt_result() : success() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_getSalt_result() throw() {}
|
|
|
|
@ -292,7 +317,7 @@ typedef struct _Pos_getAccountFromHash_args__isset {
|
|
|
|
|
class Pos_getAccountFromHash_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_getAccountFromHash_args() : dataToHash("") {
|
|
|
|
|
Pos_getAccountFromHash_args() : dataToHash() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_getAccountFromHash_args() throw() {}
|
|
|
|
@ -508,7 +533,7 @@ typedef struct _Pos_getHashesFromAccountName_args__isset {
|
|
|
|
|
class Pos_getHashesFromAccountName_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_getHashesFromAccountName_args() : account("") {
|
|
|
|
|
Pos_getHashesFromAccountName_args() : account() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_getHashesFromAccountName_args() throw() {}
|
|
|
|
@ -616,7 +641,7 @@ typedef struct _Pos_getHashAccountBalance_args__isset {
|
|
|
|
|
class Pos_getHashAccountBalance_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_getHashAccountBalance_args() : dataToHash("") {
|
|
|
|
|
Pos_getHashAccountBalance_args() : dataToHash() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_getHashAccountBalance_args() throw() {}
|
|
|
|
@ -832,7 +857,7 @@ typedef struct _Pos_getNameAccountBalance_args__isset {
|
|
|
|
|
class Pos_getNameAccountBalance_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_getNameAccountBalance_args() : account("") {
|
|
|
|
|
Pos_getNameAccountBalance_args() : account() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_getNameAccountBalance_args() throw() {}
|
|
|
|
@ -942,7 +967,7 @@ typedef struct _Pos_associateHashWithId_args__isset {
|
|
|
|
|
class Pos_associateHashWithId_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_associateHashWithId_args() : auth(""), dataToHash(""), account(0) {
|
|
|
|
|
Pos_associateHashWithId_args() : auth(), dataToHash(), account(0) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_associateHashWithId_args() throw() {}
|
|
|
|
@ -1068,7 +1093,7 @@ typedef struct _Pos_associateHashWithName_args__isset {
|
|
|
|
|
class Pos_associateHashWithName_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_associateHashWithName_args() : auth(""), dataToHash(""), account("") {
|
|
|
|
|
Pos_associateHashWithName_args() : auth(), dataToHash(), account() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_associateHashWithName_args() throw() {}
|
|
|
|
@ -1193,7 +1218,7 @@ typedef struct _Pos_deassociateHash_args__isset {
|
|
|
|
|
class Pos_deassociateHash_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_deassociateHash_args() : auth(""), dataToHash("") {
|
|
|
|
|
Pos_deassociateHash_args() : auth(), dataToHash() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_deassociateHash_args() throw() {}
|
|
|
|
@ -1419,7 +1444,7 @@ typedef struct _Pos_setUPCPrice_args__isset {
|
|
|
|
|
class Pos_setUPCPrice_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_setUPCPrice_args() : auth(""), upc(0), price(0) {
|
|
|
|
|
Pos_setUPCPrice_args() : auth(), upc(0), price(0) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_setUPCPrice_args() throw() {}
|
|
|
|
@ -1545,7 +1570,7 @@ typedef struct _Pos_doTransactionOnHash_args__isset {
|
|
|
|
|
class Pos_doTransactionOnHash_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_doTransactionOnHash_args() : auth(""), dataToHash(""), delta(0) {
|
|
|
|
|
Pos_doTransactionOnHash_args() : auth(), dataToHash(), delta(0) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_doTransactionOnHash_args() throw() {}
|
|
|
|
@ -1671,7 +1696,7 @@ typedef struct _Pos_doTransactionOnId_args__isset {
|
|
|
|
|
class Pos_doTransactionOnId_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_doTransactionOnId_args() : auth(""), account(0), delta(0) {
|
|
|
|
|
Pos_doTransactionOnId_args() : auth(), account(0), delta(0) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_doTransactionOnId_args() throw() {}
|
|
|
|
@ -1797,7 +1822,7 @@ typedef struct _Pos_doTransactionOnName_args__isset {
|
|
|
|
|
class Pos_doTransactionOnName_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_doTransactionOnName_args() : auth(""), account(""), delta(0) {
|
|
|
|
|
Pos_doTransactionOnName_args() : auth(), account(), delta(0) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_doTransactionOnName_args() throw() {}
|
|
|
|
@ -1922,7 +1947,7 @@ typedef struct _Pos_revertTransaction_args__isset {
|
|
|
|
|
class Pos_revertTransaction_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_revertTransaction_args() : auth(""), serial(0) {
|
|
|
|
|
Pos_revertTransaction_args() : auth(), serial(0) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_revertTransaction_args() throw() {}
|
|
|
|
@ -2148,7 +2173,7 @@ typedef struct _Pos_doStockChange_args__isset {
|
|
|
|
|
class Pos_doStockChange_args {
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Pos_doStockChange_args() : auth(""), upc(0), delta(0) {
|
|
|
|
|
Pos_doStockChange_args() : auth(), upc(0), delta(0) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~Pos_doStockChange_args() throw() {}
|
|
|
|
@ -2445,12 +2470,14 @@ class PosClient : virtual public PosIf {
|
|
|
|
|
::apache::thrift::protocol::TProtocol* oprot_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class PosProcessor : virtual public ::apache::thrift::TProcessor {
|
|
|
|
|
class PosProcessor : public ::apache::thrift::TDispatchProcessor {
|
|
|
|
|
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);
|
|
|
|
|
virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const 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_;
|
|
|
|
|
typedef void (PosProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
|
|
|
|
|
typedef std::map<std::string, ProcessFunction> ProcessMap;
|
|
|
|
|
ProcessMap 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);
|
|
|
|
@ -2496,10 +2523,20 @@ class PosProcessor : virtual public ::apache::thrift::TProcessor {
|
|
|
|
|
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 PosProcessorFactory : public ::apache::thrift::TProcessorFactory {
|
|
|
|
|
public:
|
|
|
|
|
PosProcessorFactory(const ::boost::shared_ptr< PosIfFactory >& handlerFactory) :
|
|
|
|
|
handlerFactory_(handlerFactory) {}
|
|
|
|
|
|
|
|
|
|
::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
::boost::shared_ptr< PosIfFactory > handlerFactory_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class PosMultiface : virtual public PosIf {
|
|
|
|
|
public:
|
|
|
|
|
PosMultiface(std::vector<boost::shared_ptr<PosIf> >& ifaces) : ifaces_(ifaces) {
|
|
|
|
@ -2514,222 +2551,186 @@ class PosMultiface : virtual public PosIf {
|
|
|
|
|
public:
|
|
|
|
|
void ping() {
|
|
|
|
|
size_t sz = ifaces_.size();
|
|
|
|
|
for (size_t i = 0; i < sz; ++i) {
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->ping();
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getSalt(_return);
|
|
|
|
|
}
|
|
|
|
|
ifaces_[i]->getSalt(_return);
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getAccountFromHash(dataToHash);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getHashesFromAccountId(_return, account);
|
|
|
|
|
}
|
|
|
|
|
ifaces_[i]->getHashesFromAccountId(_return, account);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getHashesFromAccountName(_return, account);
|
|
|
|
|
}
|
|
|
|
|
ifaces_[i]->getHashesFromAccountName(_return, account);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getHashAccountBalance(dataToHash);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getIdAccountBalance(account);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getNameAccountBalance(account);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->associateHashWithId(auth, dataToHash, account);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->associateHashWithName(auth, dataToHash, account);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->deassociateHash(auth, dataToHash);
|
|
|
|
|
}
|
|
|
|
|
return ifaces_[i]->deassociateHash(auth, dataToHash);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t getUPCPrice(const int64_t upc) {
|
|
|
|
|
size_t sz = ifaces_.size();
|
|
|
|
|
for (size_t i = 0; i < sz; ++i) {
|
|
|
|
|
if (i == sz - 1) {
|
|
|
|
|
return ifaces_[i]->getUPCPrice(upc);
|
|
|
|
|
} else {
|
|
|
|
|
ifaces_[i]->getUPCPrice(upc);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getUPCPrice(upc);
|
|
|
|
|
}
|
|
|
|
|
return ifaces_[i]->getUPCPrice(upc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int64_t setUPCPrice(const std::string& auth, const int64_t upc, 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, price);
|
|
|
|
|
} else {
|
|
|
|
|
ifaces_[i]->setUPCPrice(auth, upc, price);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->setUPCPrice(auth, upc, price);
|
|
|
|
|
}
|
|
|
|
|
return ifaces_[i]->setUPCPrice(auth, upc, 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->doTransactionOnHash(auth, dataToHash, delta);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->doTransactionOnId(auth, account, delta);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->doTransactionOnName(auth, account, delta);
|
|
|
|
|
}
|
|
|
|
|
return 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->revertTransaction(auth, serial);
|
|
|
|
|
}
|
|
|
|
|
return ifaces_[i]->revertTransaction(auth, serial);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t getStock(const int64_t upc) {
|
|
|
|
|
size_t sz = ifaces_.size();
|
|
|
|
|
for (size_t i = 0; i < sz; ++i) {
|
|
|
|
|
if (i == sz - 1) {
|
|
|
|
|
return ifaces_[i]->getStock(upc);
|
|
|
|
|
} else {
|
|
|
|
|
ifaces_[i]->getStock(upc);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->getStock(upc);
|
|
|
|
|
}
|
|
|
|
|
return ifaces_[i]->getStock(upc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int64_t doStockChange(const std::string& auth, const int64_t upc, 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, delta);
|
|
|
|
|
} else {
|
|
|
|
|
ifaces_[i]->doStockChange(auth, upc, delta);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->doStockChange(auth, upc, delta);
|
|
|
|
|
}
|
|
|
|
|
return ifaces_[i]->doStockChange(auth, upc, 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);
|
|
|
|
|
}
|
|
|
|
|
size_t i = 0;
|
|
|
|
|
for (; i < (sz - 1); ++i) {
|
|
|
|
|
ifaces_[i]->toString(_return);
|
|
|
|
|
}
|
|
|
|
|
ifaces_[i]->toString(_return);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|