diff options
Diffstat (limited to 'veslibrary/ves_cpplibrary/src/lib/transport/gen-cpp/XRpcTransport.h')
-rwxr-xr-x | veslibrary/ves_cpplibrary/src/lib/transport/gen-cpp/XRpcTransport.h | 296 |
1 files changed, 296 insertions, 0 deletions
diff --git a/veslibrary/ves_cpplibrary/src/lib/transport/gen-cpp/XRpcTransport.h b/veslibrary/ves_cpplibrary/src/lib/transport/gen-cpp/XRpcTransport.h new file mode 100755 index 0000000..124702e --- /dev/null +++ b/veslibrary/ves_cpplibrary/src/lib/transport/gen-cpp/XRpcTransport.h @@ -0,0 +1,296 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef XRpcTransport_H +#define XRpcTransport_H + +#include <thrift/TDispatchProcessor.h> +#include <thrift/async/TConcurrentClientSyncInfo.h> +#include "rpc_types.h" + +namespace vagt { namespace transport { namespace rpc { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class XRpcTransportIf { + public: + virtual ~XRpcTransportIf() {} + virtual int16_t post(const std::string& data) = 0; +}; + +class XRpcTransportIfFactory { + public: + typedef XRpcTransportIf Handler; + + virtual ~XRpcTransportIfFactory() {} + + virtual XRpcTransportIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(XRpcTransportIf* /* handler */) = 0; +}; + +class XRpcTransportIfSingletonFactory : virtual public XRpcTransportIfFactory { + public: + XRpcTransportIfSingletonFactory(const ::apache::thrift::stdcxx::shared_ptr<XRpcTransportIf>& iface) : iface_(iface) {} + virtual ~XRpcTransportIfSingletonFactory() {} + + virtual XRpcTransportIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(XRpcTransportIf* /* handler */) {} + + protected: + ::apache::thrift::stdcxx::shared_ptr<XRpcTransportIf> iface_; +}; + +class XRpcTransportNull : virtual public XRpcTransportIf { + public: + virtual ~XRpcTransportNull() {} + int16_t post(const std::string& /* data */) { + int16_t _return = 0; + return _return; + } +}; + +typedef struct _XRpcTransport_post_args__isset { + _XRpcTransport_post_args__isset() : data(false) {} + bool data :1; +} _XRpcTransport_post_args__isset; + +class XRpcTransport_post_args { + public: + + XRpcTransport_post_args(const XRpcTransport_post_args&); + XRpcTransport_post_args& operator=(const XRpcTransport_post_args&); + XRpcTransport_post_args() : data() { + } + + virtual ~XRpcTransport_post_args() throw(); + std::string data; + + _XRpcTransport_post_args__isset __isset; + + void __set_data(const std::string& val); + + bool operator == (const XRpcTransport_post_args & rhs) const + { + if (!(data == rhs.data)) + return false; + return true; + } + bool operator != (const XRpcTransport_post_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const XRpcTransport_post_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class XRpcTransport_post_pargs { + public: + + + virtual ~XRpcTransport_post_pargs() throw(); + const std::string* data; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _XRpcTransport_post_result__isset { + _XRpcTransport_post_result__isset() : success(false) {} + bool success :1; +} _XRpcTransport_post_result__isset; + +class XRpcTransport_post_result { + public: + + XRpcTransport_post_result(const XRpcTransport_post_result&); + XRpcTransport_post_result& operator=(const XRpcTransport_post_result&); + XRpcTransport_post_result() : success(0) { + } + + virtual ~XRpcTransport_post_result() throw(); + int16_t success; + + _XRpcTransport_post_result__isset __isset; + + void __set_success(const int16_t val); + + bool operator == (const XRpcTransport_post_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const XRpcTransport_post_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const XRpcTransport_post_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _XRpcTransport_post_presult__isset { + _XRpcTransport_post_presult__isset() : success(false) {} + bool success :1; +} _XRpcTransport_post_presult__isset; + +class XRpcTransport_post_presult { + public: + + + virtual ~XRpcTransport_post_presult() throw(); + int16_t* success; + + _XRpcTransport_post_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class XRpcTransportClient : virtual public XRpcTransportIf { + public: + XRpcTransportClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + XRpcTransportClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + int16_t post(const std::string& data); + void send_post(const std::string& data); + int16_t recv_post(); + protected: + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class XRpcTransportProcessor : public ::apache::thrift::TDispatchProcessor { + protected: + ::apache::thrift::stdcxx::shared_ptr<XRpcTransportIf> iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (XRpcTransportProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map<std::string, ProcessFunction> ProcessMap; + ProcessMap processMap_; + void process_post(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + XRpcTransportProcessor(::apache::thrift::stdcxx::shared_ptr<XRpcTransportIf> iface) : + iface_(iface) { + processMap_["post"] = &XRpcTransportProcessor::process_post; + } + + virtual ~XRpcTransportProcessor() {} +}; + +class XRpcTransportProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + XRpcTransportProcessorFactory(const ::apache::thrift::stdcxx::shared_ptr< XRpcTransportIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + ::apache::thrift::stdcxx::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + ::apache::thrift::stdcxx::shared_ptr< XRpcTransportIfFactory > handlerFactory_; +}; + +class XRpcTransportMultiface : virtual public XRpcTransportIf { + public: + XRpcTransportMultiface(std::vector<apache::thrift::stdcxx::shared_ptr<XRpcTransportIf> >& ifaces) : ifaces_(ifaces) { + } + virtual ~XRpcTransportMultiface() {} + protected: + std::vector<apache::thrift::stdcxx::shared_ptr<XRpcTransportIf> > ifaces_; + XRpcTransportMultiface() {} + void add(::apache::thrift::stdcxx::shared_ptr<XRpcTransportIf> iface) { + ifaces_.push_back(iface); + } + public: + int16_t post(const std::string& data) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->post(data); + } + return ifaces_[i]->post(data); + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class XRpcTransportConcurrentClient : virtual public XRpcTransportIf { + public: + XRpcTransportConcurrentClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + XRpcTransportConcurrentClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + int16_t post(const std::string& data); + int32_t send_post(const std::string& data); + int16_t recv_post(const int32_t seqid); + protected: + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; + ::apache::thrift::async::TConcurrentClientSyncInfo sync_; +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}} // namespace + +#endif |