diff options
Diffstat (limited to 'lib/cpp/src/thrift/qt/TQIODeviceTransport.h')
-rw-r--r-- | lib/cpp/src/thrift/qt/TQIODeviceTransport.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/cpp/src/thrift/qt/TQIODeviceTransport.h b/lib/cpp/src/thrift/qt/TQIODeviceTransport.h index c5221dd6b..8091d3287 100644 --- a/lib/cpp/src/thrift/qt/TQIODeviceTransport.h +++ b/lib/cpp/src/thrift/qt/TQIODeviceTransport.h @@ -26,13 +26,16 @@ class QIODevice; -namespace apache { namespace thrift { namespace transport { +namespace apache { +namespace thrift { +namespace transport { /** * Transport that operates on a QIODevice (socket, file, etc). */ -class TQIODeviceTransport : public apache::thrift::transport::TVirtualTransport<TQIODeviceTransport> { - public: +class TQIODeviceTransport + : public apache::thrift::transport::TVirtualTransport<TQIODeviceTransport> { +public: explicit TQIODeviceTransport(boost::shared_ptr<QIODevice> dev); virtual ~TQIODeviceTransport(); @@ -41,7 +44,7 @@ class TQIODeviceTransport : public apache::thrift::transport::TVirtualTransport< bool peek(); void close(); - uint32_t readAll(uint8_t *buf, uint32_t len); + uint32_t readAll(uint8_t* buf, uint32_t len); uint32_t read(uint8_t* buf, uint32_t len); void write(const uint8_t* buf, uint32_t len); @@ -52,13 +55,14 @@ class TQIODeviceTransport : public apache::thrift::transport::TVirtualTransport< uint8_t* borrow(uint8_t* buf, uint32_t* len); void consume(uint32_t len); - private: - TQIODeviceTransport(const TQIODeviceTransport&); - TQIODeviceTransport& operator=(const TQIODeviceTransport&); +private: + TQIODeviceTransport(const TQIODeviceTransport&); + TQIODeviceTransport& operator=(const TQIODeviceTransport&); - boost::shared_ptr<QIODevice> dev_; + boost::shared_ptr<QIODevice> dev_; }; -}}} // apache::thrift::transport +} +} +} // apache::thrift::transport #endif // #ifndef _THRIFT_ASYNC_TQIODEVICE_TRANSPORT_H_ - |