summaryrefslogtreecommitdiff
path: root/lib/cpp/src/thrift/async/TEvhttpClientChannel.h
diff options
context:
space:
mode:
authorKonrad Grochowski <hcorg@apache.org>2014-11-13 15:33:38 +0100
committerKonrad Grochowski <hcorg@apache.org>2014-11-18 11:39:10 +0100
commit16a23a6618754a5a87aeb8df99a72516b0272fb3 (patch)
tree3d3a5250cc06e9010c0e0bef5eed4454a3c6be18 /lib/cpp/src/thrift/async/TEvhttpClientChannel.h
parent240120c8434b49d1f76d207aff4e3530d3ada14b (diff)
downloadthrift-16a23a6618754a5a87aeb8df99a72516b0272fb3.tar.gz
THRIFT-2729: C++ - .clang-format created and applied
Client: C++ Patch: Konrad Grochowski make style command added
Diffstat (limited to 'lib/cpp/src/thrift/async/TEvhttpClientChannel.h')
-rw-r--r--lib/cpp/src/thrift/async/TEvhttpClientChannel.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/lib/cpp/src/thrift/async/TEvhttpClientChannel.h b/lib/cpp/src/thrift/async/TEvhttpClientChannel.h
index a7229e9be..72ed40fff 100644
--- a/lib/cpp/src/thrift/async/TEvhttpClientChannel.h
+++ b/lib/cpp/src/thrift/async/TEvhttpClientChannel.h
@@ -28,39 +28,46 @@ struct event_base;
struct evhttp_connection;
struct evhttp_request;
-namespace apache { namespace thrift { namespace transport {
+namespace apache {
+namespace thrift {
+namespace transport {
class TMemoryBuffer;
-}}}
+}
+}
+}
-namespace apache { namespace thrift { namespace async {
+namespace apache {
+namespace thrift {
+namespace async {
class TEvhttpClientChannel : public TAsyncChannel {
- public:
+public:
using TAsyncChannel::VoidCallback;
- TEvhttpClientChannel(
- const std::string& host,
- const std::string& path,
- const char* address,
- int port,
- struct event_base* eb);
+ TEvhttpClientChannel(const std::string& host,
+ const std::string& path,
+ const char* address,
+ int port,
+ struct event_base* eb);
~TEvhttpClientChannel();
virtual void sendAndRecvMessage(const VoidCallback& cob,
apache::thrift::transport::TMemoryBuffer* sendBuf,
apache::thrift::transport::TMemoryBuffer* recvBuf);
- virtual void sendMessage(const VoidCallback& cob, apache::thrift::transport::TMemoryBuffer* message);
- virtual void recvMessage(const VoidCallback& cob, apache::thrift::transport::TMemoryBuffer* message);
+ virtual void sendMessage(const VoidCallback& cob,
+ apache::thrift::transport::TMemoryBuffer* message);
+ virtual void recvMessage(const VoidCallback& cob,
+ apache::thrift::transport::TMemoryBuffer* message);
void finish(struct evhttp_request* req);
- //XXX
+ // XXX
virtual bool good() const { return true; }
virtual bool error() const { return false; }
virtual bool timedOut() const { return false; }
- private:
+private:
static void response(struct evhttp_request* req, void* arg);
std::string host_;
@@ -68,9 +75,9 @@ class TEvhttpClientChannel : public TAsyncChannel {
VoidCallback cob_;
apache::thrift::transport::TMemoryBuffer* recvBuf_;
struct evhttp_connection* conn_;
-
};
-
-}}} // apache::thrift::async
+}
+}
+} // apache::thrift::async
#endif // #ifndef _THRIFT_TEVHTTP_CLIENT_CHANNEL_H_