From: Roger Meier Date: Fri, 13 Apr 2012 09:12:31 +0000 (+0000) Subject: THRIFT-1552 Include paths for c/c++ should be prefixed with 'thrift/' X-Git-Tag: 0.9.1~408 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=49ff8b123a0b79aa0ec5a4a1baa288e7cbfdcede;p=common%2Fthrift.git THRIFT-1552 Include paths for c/c++ should be prefixed with 'thrift/' To ensure there are no include path collisions the C and C++ header include paths should include 'thrift' as the root leaf. This will prevent having to place /usr/include/thrift into the compilers include header search path, which might otherwise result in the compiler accidentally picking up headers that it shouldn't. e.g. #include should be #include Change-Id: I48f2b0f549bda0fc81e85506ac857adc800b98a1 git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325674 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/LICENSE b/LICENSE index 9d189ef1..697fc95d 100644 --- a/LICENSE +++ b/LICENSE @@ -223,25 +223,25 @@ the Thrift Software License (see doc/old-thrift-license.txt), and relicensed under the Apache 2.0 License: compiler/cpp/Makefile.am - compiler/cpp/src/generate/t_cocoa_generator.cc - compiler/cpp/src/generate/t_cpp_generator.cc - compiler/cpp/src/generate/t_csharp_generator.cc - compiler/cpp/src/generate/t_erl_generator.cc - compiler/cpp/src/generate/t_hs_generator.cc - compiler/cpp/src/generate/t_java_generator.cc - compiler/cpp/src/generate/t_ocaml_generator.cc - compiler/cpp/src/generate/t_perl_generator.cc - compiler/cpp/src/generate/t_php_generator.cc - compiler/cpp/src/generate/t_py_generator.cc - compiler/cpp/src/generate/t_rb_generator.cc - compiler/cpp/src/generate/t_st_generator.cc - compiler/cpp/src/generate/t_xsd_generator.cc - compiler/cpp/src/main.cc - compiler/cpp/src/parse/t_field.h - compiler/cpp/src/parse/t_program.h - compiler/cpp/src/platform.h - compiler/cpp/src/thriftl.ll - compiler/cpp/src/thrifty.yy + compiler/cpp/src/thrift/generate/t_cocoa_generator.cc + compiler/cpp/src/thrift/generate/t_cpp_generator.cc + compiler/cpp/src/thrift/generate/t_csharp_generator.cc + compiler/cpp/src/thrift/generate/t_erl_generator.cc + compiler/cpp/src/thrift/generate/t_hs_generator.cc + compiler/cpp/src/thrift/generate/t_java_generator.cc + compiler/cpp/src/thrift/generate/t_ocaml_generator.cc + compiler/cpp/src/thrift/generate/t_perl_generator.cc + compiler/cpp/src/thrift/generate/t_php_generator.cc + compiler/cpp/src/thrift/generate/t_py_generator.cc + compiler/cpp/src/thrift/generate/t_rb_generator.cc + compiler/cpp/src/thrift/generate/t_st_generator.cc + compiler/cpp/src/thrift/generate/t_xsd_generator.cc + compiler/cpp/src/thrift/main.cc + compiler/cpp/src/thrift/parse/t_field.h + compiler/cpp/src/thrift/parse/t_program.h + compiler/cpp/src/thrift/platform.h + compiler/cpp/src/thrift/thriftl.ll + compiler/cpp/src/thrift/thrifty.yy lib/csharp/src/Protocol/TBinaryProtocol.cs lib/csharp/src/Protocol/TField.cs lib/csharp/src/Protocol/TList.cs @@ -289,7 +289,7 @@ For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 comp # the copyright notice and this notice are preserved. -------------------------------------------------- -For the compiler/cpp/src/md5.[ch] components: +For the compiler/cpp/src/thrift/md5.[ch] components: /* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. diff --git a/compiler/cpp/compiler.vcxproj b/compiler/cpp/compiler.vcxproj index a01f3f2d..16ea2c06 100644 --- a/compiler/cpp/compiler.vcxproj +++ b/compiler/cpp/compiler.vcxproj @@ -19,66 +19,66 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + {89975A1A-F799-4556-98B8-64E30AB39A90} @@ -126,25 +126,25 @@ true - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(IncludePath) thrift $(ExecutablePath);C:\Program Files (x86)\Git\bin true - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(IncludePath) thrift $(ExecutablePath);C:\Program Files (x86)\Git\bin false - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(IncludePath) thrift $(ExecutablePath);C:\Program Files (x86)\Git\bin false - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(IncludePath) thrift $(ExecutablePath);C:\Program Files (x86)\Git\bin @@ -163,8 +163,8 @@ true - flex -o "src/thriftl.cc" src/thriftl.ll -bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy + flex -o "src\thrift\thriftl.cc" src/thriftl.ll +bison -y -o "src\thrift\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy @@ -182,8 +182,8 @@ bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy true - flex -o "src/thriftl.cc" src/thriftl.ll -bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy + flex -o "src\thrift\thriftl.cc" src/thriftl.ll +bison -y -o "src\thrift\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy @@ -205,8 +205,8 @@ bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy true - flex -o "src/thriftl.cc" src/thriftl.ll -bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy + flex -o "src\thrift\thriftl.cc" src/thriftl.ll +bison -y -o "src\thrift\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy @@ -228,8 +228,8 @@ bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy true - flex -o "src/thriftl.cc" src/thriftl.ll -bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy + flex -o "src\thrift\thriftl.cc" src/thriftl.ll +bison -y -o "src\thrift\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy diff --git a/compiler/cpp/src/generate/t_c_glib_generator.cc b/compiler/cpp/src/generate/t_c_glib_generator.cc index d1fc7028..d22b7232 100644 --- a/compiler/cpp/src/generate/t_c_glib_generator.cc +++ b/compiler/cpp/src/generate/t_c_glib_generator.cc @@ -186,7 +186,7 @@ void t_c_glib_generator::init_generator() { "/* base includes */" << endl << "#include " << endl << "#include " << endl << - "#include " << endl; + "#include " << endl; /* include other thrift includes */ const vector &includes = program_->get_includes(); @@ -217,7 +217,7 @@ void t_c_glib_generator::init_generator() { endl << "#include \"" << this->nspace_lc << program_name_u << "_types.h\"" << endl << - "#include " << endl << + "#include " << endl << endl; f_types_ << @@ -410,7 +410,7 @@ void t_c_glib_generator::generate_service (t_service *tservice) { // include the headers f_service_ << "#include " << endl << - "#include " << endl << + "#include " << endl << "#include " << endl << "#include \"" << filename << ".h\"" << endl << endl; diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc index 6b3f4b64..3bc6a81c 100755 --- a/compiler/cpp/src/generate/t_cpp_generator.cc +++ b/compiler/cpp/src/generate/t_cpp_generator.cc @@ -343,10 +343,10 @@ void t_cpp_generator::init_generator() { // Include base types f_types_ << - "#include " << endl << - "#include " << endl << - "#include " << endl << - "#include " << endl << + "#include " << endl << + "#include " << endl << + "#include " << endl << + "#include " << endl << endl; // Include other Thrift includes @@ -392,7 +392,7 @@ void t_cpp_generator::init_generator() { // the definition of TypeSpec. if (gen_dense_) { f_types_impl_ << - "#include " << endl << + "#include " << endl << endl; } @@ -1571,17 +1571,17 @@ void t_cpp_generator::generate_service(t_service* tservice) { endl; if (gen_cob_style_) { f_header_ << - "#include " << endl << // TMemoryBuffer + "#include " << endl << // TMemoryBuffer "#include " << endl << "namespace apache { namespace thrift { namespace async {" << endl << "class TAsyncChannel;" << endl << "}}}" << endl; } f_header_ << - "#include " << endl; + "#include " << endl; if (gen_cob_style_) { f_header_ << - "#include " << endl; + "#include " << endl; } f_header_ << "#include \"" << get_include_prefix(*get_program()) << program_name_ << @@ -1608,7 +1608,7 @@ void t_cpp_generator::generate_service(t_service* tservice) { "#include \"" << get_include_prefix(*get_program()) << svcname << ".h\"" << endl; if (gen_cob_style_) { f_service_ << - "#include \"async/TAsyncChannel.h\"" << endl; + "#include \"thrift/async/TAsyncChannel.h\"" << endl; } if (gen_templates_) { f_service_ << @@ -1630,7 +1630,7 @@ void t_cpp_generator::generate_service(t_service* tservice) { if (gen_cob_style_) { f_service_tcc_ << - "#include \"async/TAsyncChannel.h\"" << endl; + "#include \"thrift/async/TAsyncChannel.h\"" << endl; } } @@ -1974,8 +1974,8 @@ void t_cpp_generator::generate_service_async_skeleton(t_service* tservice) { "// that would otherwise introduce unwanted latency." << endl << endl << "#include \"" << get_include_prefix(*get_program()) << svcname << ".h\"" << endl << - "#include " << endl << - "#include " << endl << + "#include " << endl << + "#include " << endl << endl << "using namespace ::apache::thrift;" << endl << "using namespace ::apache::thrift::protocol;" << endl << @@ -3703,10 +3703,10 @@ void t_cpp_generator::generate_service_skeleton(t_service* tservice) { "// You should copy it to another filename to avoid overwriting it." << endl << endl << "#include \"" << get_include_prefix(*get_program()) << svcname << ".h\"" << endl << - "#include " << endl << - "#include " << endl << - "#include " << endl << - "#include " << endl << + "#include " << endl << + "#include " << endl << + "#include " << endl << + "#include " << endl << endl << "using namespace ::apache::thrift;" << endl << "using namespace ::apache::thrift::protocol;" << endl << diff --git a/contrib/async-test/test-server.cpp b/contrib/async-test/test-server.cpp index a55c3484..b304e1bc 100644 --- a/contrib/async-test/test-server.cpp +++ b/contrib/async-test/test-server.cpp @@ -1,8 +1,8 @@ #include -#include "protocol/TBinaryProtocol.h" -#include "async/TAsyncProtocolProcessor.h" -#include "async/TEvhttpServer.h" -#include "async/TEvhttpClientChannel.h" +#include +#include +#include +#include #include "Aggr.h" using std::tr1::bind; diff --git a/contrib/fb303/TClientInfo.cpp b/contrib/fb303/TClientInfo.cpp index e07eaa8c..5959fb1f 100644 --- a/contrib/fb303/TClientInfo.cpp +++ b/contrib/fb303/TClientInfo.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include namespace apache { namespace thrift { namespace server { diff --git a/contrib/fb303/TClientInfo.h b/contrib/fb303/TClientInfo.h index 9b2d284f..d0a97702 100644 --- a/contrib/fb303/TClientInfo.h +++ b/contrib/fb303/TClientInfo.h @@ -22,9 +22,9 @@ // for inet_ntop -- #include -#include -#include -#include +#include +#include +#include namespace apache { namespace thrift { namespace server { diff --git a/contrib/fb303/cpp/FacebookBase.h b/contrib/fb303/cpp/FacebookBase.h index fd169e62..2159c95f 100644 --- a/contrib/fb303/cpp/FacebookBase.h +++ b/contrib/fb303/cpp/FacebookBase.h @@ -22,8 +22,8 @@ #include "FacebookService.h" -#include "server/TServer.h" -#include "concurrency/Mutex.h" +#include +#include #include #include diff --git a/contrib/fb303/cpp/ServiceTracker.cpp b/contrib/fb303/cpp/ServiceTracker.cpp index c20a0683..2914ff65 100644 --- a/contrib/fb303/cpp/ServiceTracker.cpp +++ b/contrib/fb303/cpp/ServiceTracker.cpp @@ -21,7 +21,7 @@ #include "FacebookBase.h" #include "ServiceTracker.h" -#include "concurrency/ThreadManager.h" +#include using namespace std; using namespace facebook::fb303; diff --git a/contrib/fb303/cpp/ServiceTracker.h b/contrib/fb303/cpp/ServiceTracker.h index 93043863..9a3edd8f 100644 --- a/contrib/fb303/cpp/ServiceTracker.h +++ b/contrib/fb303/cpp/ServiceTracker.h @@ -100,7 +100,7 @@ #include #include -#include "concurrency/Mutex.h" +#include namespace apache { namespace thrift { namespace concurrency { diff --git a/contrib/thrift_dump.cpp b/contrib/thrift_dump.cpp index 0ddfcec3..59c8ac86 100644 --- a/contrib/thrift_dump.cpp +++ b/contrib/thrift_dump.cpp @@ -20,11 +20,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include using namespace std; using boost::shared_ptr; diff --git a/contrib/zeromq/TZmqClient.h b/contrib/zeromq/TZmqClient.h index 9544503a..9fcfc06a 100644 --- a/contrib/zeromq/TZmqClient.h +++ b/contrib/zeromq/TZmqClient.h @@ -21,7 +21,7 @@ #define _THRIFT_TRANSPORT_TZMQCLIENT_H_ 1 #include -#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/contrib/zeromq/TZmqServer.cpp b/contrib/zeromq/TZmqServer.cpp index c6142d7c..f255a66e 100644 --- a/contrib/zeromq/TZmqServer.cpp +++ b/contrib/zeromq/TZmqServer.cpp @@ -18,7 +18,7 @@ */ #include "TZmqServer.h" -#include +#include #include using boost::shared_ptr; diff --git a/contrib/zeromq/TZmqServer.h b/contrib/zeromq/TZmqServer.h index 1603eacf..f91c6e8b 100644 --- a/contrib/zeromq/TZmqServer.h +++ b/contrib/zeromq/TZmqServer.h @@ -21,7 +21,7 @@ #define _THRIFT_SERVER_TZMQSERVER_H_ 1 #include -#include +#include namespace apache { namespace thrift { namespace server { diff --git a/contrib/zeromq/test-client.cpp b/contrib/zeromq/test-client.cpp index 64e20f69..d2fc56ce 100644 --- a/contrib/zeromq/test-client.cpp +++ b/contrib/zeromq/test-client.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "zmq.hpp" #include "TZmqClient.h" diff --git a/contrib/zeromq/test-sender.cpp b/contrib/zeromq/test-sender.cpp index ca05709d..6b0eef15 100644 --- a/contrib/zeromq/test-sender.cpp +++ b/contrib/zeromq/test-sender.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "zmq.hpp" #include "TZmqClient.h" diff --git a/lib/c_glib/Makefile.am b/lib/c_glib/Makefile.am index 2f03e3d0..d89b22c7 100644 --- a/lib/c_glib/Makefile.am +++ b/lib/c_glib/Makefile.am @@ -24,7 +24,7 @@ pkgconfigdir = $(libdir)/pkgconfig lib_LTLIBRARIES = libthrift_c_glib.la pkgconfig_DATA = thrift_c_glib.pc -common_cflags = -g -Wall -W -Werror -Isrc $(GLIB_CFLAGS) +common_cflags = -g -Wall -W -Werror -Isrc -I src/thrift $(GLIB_CFLAGS) common_ldflags = -g -Wall -W $(GLIB_LDFLAGS) @GCOV_LDFLAGS@ # this removes optimizations and adds coverage flags @@ -32,56 +32,56 @@ CFLAGS = @GCOV_CFLAGS@ # Define the source files for the module -libthrift_c_glib_la_SOURCES = src/thrift.c \ - src/thrift_struct.c \ - src/thrift_application_exception.c \ - src/processor/thrift_processor.c \ - src/protocol/thrift_protocol.c \ - src/protocol/thrift_protocol_factory.c \ - src/protocol/thrift_binary_protocol.c \ - src/protocol/thrift_binary_protocol_factory.c \ - src/transport/thrift_transport.c \ - src/transport/thrift_transport_factory.c \ - src/transport/thrift_socket.c \ - src/transport/thrift_server_transport.c \ - src/transport/thrift_server_socket.c \ - src/transport/thrift_buffered_transport.c \ - src/transport/thrift_framed_transport.c \ - src/transport/thrift_memory_buffer.c \ - src/server/thrift_server.c \ - src/server/thrift_simple_server.c +libthrift_c_glib_la_SOURCES = src/thrift/thrift.c \ + src/thrift/thrift_struct.c \ + src/thrift/thrift_application_exception.c \ + src/thrift/processor/thrift_processor.c \ + src/thrift/protocol/thrift_protocol.c \ + src/thrift/protocol/thrift_protocol_factory.c \ + src/thrift/protocol/thrift_binary_protocol.c \ + src/thrift/protocol/thrift_binary_protocol_factory.c \ + src/thrift/transport/thrift_transport.c \ + src/thrift/transport/thrift_transport_factory.c \ + src/thrift/transport/thrift_socket.c \ + src/thrift/transport/thrift_server_transport.c \ + src/thrift/transport/thrift_server_socket.c \ + src/thrift/transport/thrift_buffered_transport.c \ + src/thrift/transport/thrift_framed_transport.c \ + src/thrift/transport/thrift_memory_buffer.c \ + src/thrift/server/thrift_server.c \ + src/thrift/server/thrift_simple_server.c libthrift_c_glib_la_CFLAGS = $(common_cflags) include_thriftdir = $(includedir)/thrift/c_glib include_thrift_HEADERS = \ $(top_builddir)/config.h \ - src/thrift.h \ - src/thrift_application_exception.h \ - src/thrift_struct.h + src/thrift/thrift.h \ + src/thrift/thrift_application_exception.h \ + src/thrift/thrift_struct.h include_protocoldir = $(include_thriftdir)/protocol -include_protocol_HEADERS = src/protocol/thrift_protocol.h \ - src/protocol/thrift_protocol_factory.h \ - src/protocol/thrift_binary_protocol.h \ - src/protocol/thrift_binary_protocol_factory.h +include_protocol_HEADERS = src/thrift/protocol/thrift_protocol.h \ + src/thrift/protocol/thrift_protocol_factory.h \ + src/thrift/protocol/thrift_binary_protocol.h \ + src/thrift/protocol/thrift_binary_protocol_factory.h include_transportdir = $(include_thriftdir)/transport -include_transport_HEADERS = src/transport/thrift_buffered_transport.h \ - src/transport/thrift_framed_transport.h \ - src/transport/thrift_memory_buffer.h \ - src/transport/thrift_server_socket.h \ - src/transport/thrift_server_transport.h \ - src/transport/thrift_socket.h \ - src/transport/thrift_transport.h \ - src/transport/thrift_transport_factory.h +include_transport_HEADERS = src/thrift/transport/thrift_buffered_transport.h \ + src/thrift/transport/thrift_framed_transport.h \ + src/thrift/transport/thrift_memory_buffer.h \ + src/thrift/transport/thrift_server_socket.h \ + src/thrift/transport/thrift_server_transport.h \ + src/thrift/transport/thrift_socket.h \ + src/thrift/transport/thrift_transport.h \ + src/thrift/transport/thrift_transport_factory.h include_serverdir = $(include_thriftdir)/server -include_server_HEADERS = src/server/thrift_server.h \ - src/server/thrift_simple_server.h +include_server_HEADERS = src/thrift/server/thrift_server.h \ + src/thrift/server/thrift_simple_server.h include_processordir = $(include_thriftdir)/processor -include_processor_HEADERS = src/processor/thrift_processor.h +include_processor_HEADERS = src/thrift/processor/thrift_processor.h EXTRA_DIST = \ diff --git a/lib/c_glib/src/processor/thrift_processor.c b/lib/c_glib/src/thrift/processor/thrift_processor.c similarity index 95% rename from lib/c_glib/src/processor/thrift_processor.c rename to lib/c_glib/src/thrift/processor/thrift_processor.c index 6e9f454f..a993a62e 100644 --- a/lib/c_glib/src/processor/thrift_processor.c +++ b/lib/c_glib/src/thrift/processor/thrift_processor.c @@ -17,8 +17,8 @@ * under the License. */ -#include "thrift.h" -#include "processor/thrift_processor.h" +#include +#include G_DEFINE_ABSTRACT_TYPE(ThriftProcessor, thrift_processor, G_TYPE_OBJECT) diff --git a/lib/c_glib/src/processor/thrift_processor.h b/lib/c_glib/src/thrift/processor/thrift_processor.h similarity index 98% rename from lib/c_glib/src/processor/thrift_processor.h rename to lib/c_glib/src/thrift/processor/thrift_processor.h index 390e31b4..90af7e98 100644 --- a/lib/c_glib/src/processor/thrift_processor.h +++ b/lib/c_glib/src/thrift/processor/thrift_processor.h @@ -22,7 +22,7 @@ #include -#include "protocol/thrift_protocol.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/protocol/thrift_binary_protocol.c b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol.c similarity index 99% rename from lib/c_glib/src/protocol/thrift_binary_protocol.c rename to lib/c_glib/src/thrift/protocol/thrift_binary_protocol.c index 7ee28e89..4e3ee1ee 100644 --- a/lib/c_glib/src/protocol/thrift_binary_protocol.c +++ b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol.c @@ -20,9 +20,9 @@ #include #include -#include "thrift.h" -#include "protocol/thrift_protocol.h" -#include "protocol/thrift_binary_protocol.h" +#include +#include +#include G_DEFINE_TYPE(ThriftBinaryProtocol, thrift_binary_protocol, THRIFT_TYPE_PROTOCOL) diff --git a/lib/c_glib/src/protocol/thrift_binary_protocol.h b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol.h similarity index 96% rename from lib/c_glib/src/protocol/thrift_binary_protocol.h rename to lib/c_glib/src/thrift/protocol/thrift_binary_protocol.h index 95dced9c..782d4699 100644 --- a/lib/c_glib/src/protocol/thrift_binary_protocol.h +++ b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol.h @@ -22,8 +22,8 @@ #include -#include "protocol/thrift_protocol.h" -#include "transport/thrift_transport.h" +#include +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/protocol/thrift_binary_protocol_factory.c b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.c similarity index 92% rename from lib/c_glib/src/protocol/thrift_binary_protocol_factory.c rename to lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.c index 3c9f5228..1e36b37f 100644 --- a/lib/c_glib/src/protocol/thrift_binary_protocol_factory.c +++ b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.c @@ -17,9 +17,9 @@ * under the License. */ -#include "thrift.h" -#include "protocol/thrift_binary_protocol.h" -#include "protocol/thrift_binary_protocol_factory.h" +#include +#include +#include G_DEFINE_TYPE(ThriftBinaryProtocolFactory, thrift_binary_protocol_factory, THRIFT_TYPE_PROTOCOL_FACTORY) diff --git a/lib/c_glib/src/protocol/thrift_binary_protocol_factory.h b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.h similarity index 97% rename from lib/c_glib/src/protocol/thrift_binary_protocol_factory.h rename to lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.h index 3b7fcc21..48e48f9a 100644 --- a/lib/c_glib/src/protocol/thrift_binary_protocol_factory.h +++ b/lib/c_glib/src/thrift/protocol/thrift_binary_protocol_factory.h @@ -22,7 +22,7 @@ #include -#include "protocol/thrift_protocol_factory.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/protocol/thrift_protocol.c b/lib/c_glib/src/thrift/protocol/thrift_protocol.c similarity index 99% rename from lib/c_glib/src/protocol/thrift_protocol.c rename to lib/c_glib/src/thrift/protocol/thrift_protocol.c index d9510310..a322fef1 100644 --- a/lib/c_glib/src/protocol/thrift_protocol.c +++ b/lib/c_glib/src/thrift/protocol/thrift_protocol.c @@ -17,9 +17,9 @@ * under the License. */ -#include "thrift.h" -#include "protocol/thrift_protocol.h" -#include "transport/thrift_transport.h" +#include +#include +#include /* define the GError domain string */ #define THRIFT_PROTOCOL_ERROR_DOMAIN "thrift-protocol-error-quark" diff --git a/lib/c_glib/src/protocol/thrift_protocol.h b/lib/c_glib/src/thrift/protocol/thrift_protocol.h similarity index 99% rename from lib/c_glib/src/protocol/thrift_protocol.h rename to lib/c_glib/src/thrift/protocol/thrift_protocol.h index 1aeaed93..5dd562d2 100644 --- a/lib/c_glib/src/protocol/thrift_protocol.h +++ b/lib/c_glib/src/thrift/protocol/thrift_protocol.h @@ -22,7 +22,7 @@ #include -#include "transport/thrift_transport.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/protocol/thrift_protocol_factory.c b/lib/c_glib/src/thrift/protocol/thrift_protocol_factory.c similarity index 94% rename from lib/c_glib/src/protocol/thrift_protocol_factory.c rename to lib/c_glib/src/thrift/protocol/thrift_protocol_factory.c index 073b33c2..e4c7c123 100644 --- a/lib/c_glib/src/protocol/thrift_protocol_factory.c +++ b/lib/c_glib/src/thrift/protocol/thrift_protocol_factory.c @@ -17,8 +17,8 @@ * under the License. */ -#include "thrift.h" -#include "protocol/thrift_protocol_factory.h" +#include +#include G_DEFINE_ABSTRACT_TYPE(ThriftProtocolFactory, thrift_protocol_factory, G_TYPE_OBJECT) diff --git a/lib/c_glib/src/protocol/thrift_protocol_factory.h b/lib/c_glib/src/thrift/protocol/thrift_protocol_factory.h similarity index 96% rename from lib/c_glib/src/protocol/thrift_protocol_factory.h rename to lib/c_glib/src/thrift/protocol/thrift_protocol_factory.h index b9aeb1b6..5975e31a 100644 --- a/lib/c_glib/src/protocol/thrift_protocol_factory.h +++ b/lib/c_glib/src/thrift/protocol/thrift_protocol_factory.h @@ -22,8 +22,8 @@ #include -#include "transport/thrift_transport.h" -#include "protocol/thrift_protocol.h" +#include +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/server/thrift_server.c b/lib/c_glib/src/thrift/server/thrift_server.c similarity index 99% rename from lib/c_glib/src/server/thrift_server.c rename to lib/c_glib/src/thrift/server/thrift_server.c index 61995764..cef5a01f 100644 --- a/lib/c_glib/src/server/thrift_server.c +++ b/lib/c_glib/src/thrift/server/thrift_server.c @@ -17,7 +17,7 @@ * under the License. */ -#include "thrift.h" +#include #include "thrift_server.h" /* object properties */ diff --git a/lib/c_glib/src/server/thrift_server.h b/lib/c_glib/src/thrift/server/thrift_server.h similarity index 92% rename from lib/c_glib/src/server/thrift_server.h rename to lib/c_glib/src/thrift/server/thrift_server.h index b1113f85..a091a200 100644 --- a/lib/c_glib/src/server/thrift_server.h +++ b/lib/c_glib/src/thrift/server/thrift_server.h @@ -22,10 +22,10 @@ #include -#include "processor/thrift_processor.h" -#include "transport/thrift_server_transport.h" -#include "transport/thrift_transport_factory.h" -#include "protocol/thrift_protocol_factory.h" +#include +#include +#include +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/server/thrift_simple_server.c b/lib/c_glib/src/thrift/server/thrift_simple_server.c similarity index 94% rename from lib/c_glib/src/server/thrift_simple_server.c rename to lib/c_glib/src/thrift/server/thrift_simple_server.c index fe3067aa..c39a58d6 100644 --- a/lib/c_glib/src/server/thrift_simple_server.c +++ b/lib/c_glib/src/thrift/server/thrift_simple_server.c @@ -17,10 +17,10 @@ * under the License. */ -#include "server/thrift_simple_server.h" -#include "transport/thrift_transport_factory.h" -#include "protocol/thrift_protocol_factory.h" -#include "protocol/thrift_binary_protocol_factory.h" +#include +#include +#include +#include G_DEFINE_TYPE(ThriftSimpleServer, thrift_simple_server, THRIFT_TYPE_SERVER) diff --git a/lib/c_glib/src/server/thrift_simple_server.h b/lib/c_glib/src/thrift/server/thrift_simple_server.h similarity index 98% rename from lib/c_glib/src/server/thrift_simple_server.h rename to lib/c_glib/src/thrift/server/thrift_simple_server.h index 235500cd..35479821 100644 --- a/lib/c_glib/src/server/thrift_simple_server.h +++ b/lib/c_glib/src/thrift/server/thrift_simple_server.h @@ -22,7 +22,7 @@ #include -#include "server/thrift_server.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/thrift.c b/lib/c_glib/src/thrift/thrift.c similarity index 97% rename from lib/c_glib/src/thrift.c rename to lib/c_glib/src/thrift/thrift.c index 886e5c35..34cadd46 100644 --- a/lib/c_glib/src/thrift.c +++ b/lib/c_glib/src/thrift/thrift.c @@ -17,7 +17,7 @@ * under the License. */ -#include "thrift.h" +#include /** * GHashTable callback to add keys to a GList. diff --git a/lib/c_glib/src/thrift.h b/lib/c_glib/src/thrift/thrift.h similarity index 100% rename from lib/c_glib/src/thrift.h rename to lib/c_glib/src/thrift/thrift.h diff --git a/lib/c_glib/src/thrift_application_exception.c b/lib/c_glib/src/thrift/thrift_application_exception.c similarity index 99% rename from lib/c_glib/src/thrift_application_exception.c rename to lib/c_glib/src/thrift/thrift_application_exception.c index f1bee3c4..c10a95e9 100644 --- a/lib/c_glib/src/thrift_application_exception.c +++ b/lib/c_glib/src/thrift/thrift_application_exception.c @@ -18,7 +18,7 @@ */ #include "thrift_application_exception.h" -#include "protocol/thrift_protocol.h" +#include G_DEFINE_TYPE(ThriftApplicationException, thrift_application_exception, THRIFT_TYPE_STRUCT) diff --git a/lib/c_glib/src/thrift_application_exception.h b/lib/c_glib/src/thrift/thrift_application_exception.h similarity index 100% rename from lib/c_glib/src/thrift_application_exception.h rename to lib/c_glib/src/thrift/thrift_application_exception.h diff --git a/lib/c_glib/src/thrift_struct.c b/lib/c_glib/src/thrift/thrift_struct.c similarity index 98% rename from lib/c_glib/src/thrift_struct.c rename to lib/c_glib/src/thrift/thrift_struct.c index 8a0928a6..233d6223 100644 --- a/lib/c_glib/src/thrift_struct.c +++ b/lib/c_glib/src/thrift/thrift_struct.c @@ -17,7 +17,7 @@ * under the License. */ -#include "thrift.h" +#include #include "thrift_struct.h" G_DEFINE_ABSTRACT_TYPE(ThriftStruct, thrift_struct, G_TYPE_OBJECT) diff --git a/lib/c_glib/src/thrift_struct.h b/lib/c_glib/src/thrift/thrift_struct.h similarity index 97% rename from lib/c_glib/src/thrift_struct.h rename to lib/c_glib/src/thrift/thrift_struct.h index edf99842..7542c05e 100644 --- a/lib/c_glib/src/thrift_struct.h +++ b/lib/c_glib/src/thrift/thrift_struct.h @@ -22,7 +22,7 @@ #include -#include "protocol/thrift_protocol.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/transport/thrift_buffered_transport.c b/lib/c_glib/src/thrift/transport/thrift_buffered_transport.c similarity index 98% rename from lib/c_glib/src/transport/thrift_buffered_transport.c rename to lib/c_glib/src/thrift/transport/thrift_buffered_transport.c index 53c14b1b..a3d7c214 100644 --- a/lib/c_glib/src/transport/thrift_buffered_transport.c +++ b/lib/c_glib/src/thrift/transport/thrift_buffered_transport.c @@ -24,9 +24,9 @@ #include #include -#include "thrift.h" -#include "transport/thrift_transport.h" -#include "transport/thrift_buffered_transport.h" +#include +#include +#include /* object properties */ enum _ThriftBufferedTransportProperties diff --git a/lib/c_glib/src/transport/thrift_buffered_transport.h b/lib/c_glib/src/thrift/transport/thrift_buffered_transport.h similarity index 98% rename from lib/c_glib/src/transport/thrift_buffered_transport.h rename to lib/c_glib/src/thrift/transport/thrift_buffered_transport.h index aaa51831..5082ceab 100644 --- a/lib/c_glib/src/transport/thrift_buffered_transport.h +++ b/lib/c_glib/src/thrift/transport/thrift_buffered_transport.h @@ -23,7 +23,7 @@ #include #include -#include "transport/thrift_transport.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/transport/thrift_framed_transport.c b/lib/c_glib/src/thrift/transport/thrift_framed_transport.c similarity index 98% rename from lib/c_glib/src/transport/thrift_framed_transport.c rename to lib/c_glib/src/thrift/transport/thrift_framed_transport.c index 2bed0a12..d764d48b 100644 --- a/lib/c_glib/src/transport/thrift_framed_transport.c +++ b/lib/c_glib/src/thrift/transport/thrift_framed_transport.c @@ -24,9 +24,9 @@ #include #include -#include "thrift.h" -#include "transport/thrift_transport.h" -#include "transport/thrift_framed_transport.h" +#include +#include +#include /* object properties */ enum _ThriftFramedTransportProperties diff --git a/lib/c_glib/src/transport/thrift_framed_transport.h b/lib/c_glib/src/thrift/transport/thrift_framed_transport.h similarity index 98% rename from lib/c_glib/src/transport/thrift_framed_transport.h rename to lib/c_glib/src/thrift/transport/thrift_framed_transport.h index 5e14e357..da2e42ea 100644 --- a/lib/c_glib/src/transport/thrift_framed_transport.h +++ b/lib/c_glib/src/thrift/transport/thrift_framed_transport.h @@ -23,7 +23,7 @@ #include #include -#include "transport/thrift_transport.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/transport/thrift_memory_buffer.c b/lib/c_glib/src/thrift/transport/thrift_memory_buffer.c similarity index 98% rename from lib/c_glib/src/transport/thrift_memory_buffer.c rename to lib/c_glib/src/thrift/transport/thrift_memory_buffer.c index cc6717df..b32d4a59 100644 --- a/lib/c_glib/src/transport/thrift_memory_buffer.c +++ b/lib/c_glib/src/thrift/transport/thrift_memory_buffer.c @@ -24,9 +24,9 @@ #include #include -#include "thrift.h" -#include "transport/thrift_transport.h" -#include "transport/thrift_memory_buffer.h" +#include +#include +#include /* object properties */ enum _ThriftMemoryBufferProperties diff --git a/lib/c_glib/src/transport/thrift_memory_buffer.h b/lib/c_glib/src/thrift/transport/thrift_memory_buffer.h similarity index 97% rename from lib/c_glib/src/transport/thrift_memory_buffer.h rename to lib/c_glib/src/thrift/transport/thrift_memory_buffer.h index a2079297..8ee697ee 100644 --- a/lib/c_glib/src/transport/thrift_memory_buffer.h +++ b/lib/c_glib/src/thrift/transport/thrift_memory_buffer.h @@ -23,7 +23,7 @@ #include #include -#include "transport/thrift_transport.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/transport/thrift_server_socket.c b/lib/c_glib/src/thrift/transport/thrift_server_socket.c similarity index 97% rename from lib/c_glib/src/transport/thrift_server_socket.c rename to lib/c_glib/src/thrift/transport/thrift_server_socket.c index 2ebc01c6..88093f28 100644 --- a/lib/c_glib/src/transport/thrift_server_socket.c +++ b/lib/c_glib/src/thrift/transport/thrift_server_socket.c @@ -23,11 +23,11 @@ #include #include -#include "thrift.h" -#include "transport/thrift_socket.h" -#include "transport/thrift_transport.h" -#include "transport/thrift_server_transport.h" -#include "transport/thrift_server_socket.h" +#include +#include +#include +#include +#include /* object properties */ enum _ThriftServerSocketProperties diff --git a/lib/c_glib/src/transport/thrift_server_socket.h b/lib/c_glib/src/thrift/transport/thrift_server_socket.h similarity index 100% rename from lib/c_glib/src/transport/thrift_server_socket.h rename to lib/c_glib/src/thrift/transport/thrift_server_socket.h diff --git a/lib/c_glib/src/transport/thrift_server_transport.c b/lib/c_glib/src/thrift/transport/thrift_server_transport.c similarity index 94% rename from lib/c_glib/src/transport/thrift_server_transport.c rename to lib/c_glib/src/thrift/transport/thrift_server_transport.c index 87ce8e08..d0a46c3e 100644 --- a/lib/c_glib/src/transport/thrift_server_transport.c +++ b/lib/c_glib/src/thrift/transport/thrift_server_transport.c @@ -17,9 +17,9 @@ * under the License. */ -#include "thrift.h" -#include "transport/thrift_transport.h" -#include "transport/thrift_server_transport.h" +#include +#include +#include G_DEFINE_ABSTRACT_TYPE(ThriftServerTransport, thrift_server_transport, G_TYPE_OBJECT) diff --git a/lib/c_glib/src/transport/thrift_server_transport.h b/lib/c_glib/src/thrift/transport/thrift_server_transport.h similarity index 100% rename from lib/c_glib/src/transport/thrift_server_transport.h rename to lib/c_glib/src/thrift/transport/thrift_server_transport.h diff --git a/lib/c_glib/src/transport/thrift_socket.c b/lib/c_glib/src/thrift/transport/thrift_socket.c similarity index 98% rename from lib/c_glib/src/transport/thrift_socket.c rename to lib/c_glib/src/thrift/transport/thrift_socket.c index d231bc66..c2588988 100644 --- a/lib/c_glib/src/transport/thrift_socket.c +++ b/lib/c_glib/src/thrift/transport/thrift_socket.c @@ -23,9 +23,9 @@ #include #include -#include "thrift.h" -#include "transport/thrift_transport.h" -#include "transport/thrift_socket.h" +#include +#include +#include /* object properties */ enum _ThriftSocketProperties diff --git a/lib/c_glib/src/transport/thrift_socket.h b/lib/c_glib/src/thrift/transport/thrift_socket.h similarity index 97% rename from lib/c_glib/src/transport/thrift_socket.h rename to lib/c_glib/src/thrift/transport/thrift_socket.h index b3dd3573..dde269cf 100644 --- a/lib/c_glib/src/transport/thrift_socket.h +++ b/lib/c_glib/src/thrift/transport/thrift_socket.h @@ -22,7 +22,7 @@ #include -#include "transport/thrift_transport.h" +#include G_BEGIN_DECLS diff --git a/lib/c_glib/src/transport/thrift_transport.c b/lib/c_glib/src/thrift/transport/thrift_transport.c similarity index 97% rename from lib/c_glib/src/transport/thrift_transport.c rename to lib/c_glib/src/thrift/transport/thrift_transport.c index a37787de..890bcade 100644 --- a/lib/c_glib/src/transport/thrift_transport.c +++ b/lib/c_glib/src/thrift/transport/thrift_transport.c @@ -17,8 +17,8 @@ * under the License. */ -#include "thrift.h" -#include "transport/thrift_transport.h" +#include +#include /* define the GError domain string */ #define THRIFT_TRANSPORT_ERROR_DOMAIN "thrift-transport-error-quark" diff --git a/lib/c_glib/src/transport/thrift_transport.h b/lib/c_glib/src/thrift/transport/thrift_transport.h similarity index 100% rename from lib/c_glib/src/transport/thrift_transport.h rename to lib/c_glib/src/thrift/transport/thrift_transport.h diff --git a/lib/c_glib/src/transport/thrift_transport_factory.c b/lib/c_glib/src/thrift/transport/thrift_transport_factory.c similarity index 94% rename from lib/c_glib/src/transport/thrift_transport_factory.c rename to lib/c_glib/src/thrift/transport/thrift_transport_factory.c index 8f9a1f2a..e1125a3a 100644 --- a/lib/c_glib/src/transport/thrift_transport_factory.c +++ b/lib/c_glib/src/thrift/transport/thrift_transport_factory.c @@ -17,8 +17,8 @@ * under the License. */ -#include "thrift.h" -#include "transport/thrift_transport_factory.h" +#include +#include G_DEFINE_TYPE(ThriftTransportFactory, thrift_transport_factory, G_TYPE_OBJECT) diff --git a/lib/c_glib/src/transport/thrift_transport_factory.h b/lib/c_glib/src/thrift/transport/thrift_transport_factory.h similarity index 100% rename from lib/c_glib/src/transport/thrift_transport_factory.h rename to lib/c_glib/src/thrift/transport/thrift_transport_factory.h diff --git a/lib/c_glib/test/testbinaryprotocol.c b/lib/c_glib/test/testbinaryprotocol.c index 34846c68..7545fb96 100644 --- a/lib/c_glib/test/testbinaryprotocol.c +++ b/lib/c_glib/test/testbinaryprotocol.c @@ -24,9 +24,9 @@ #include #include -#include "protocol/thrift_protocol.h" -#include "transport/thrift_socket.h" -#include "transport/thrift_server_socket.h" +#include +#include +#include #define TEST_BOOL TRUE #define TEST_BYTE 123 diff --git a/lib/c_glib/test/testbufferedtransport.c b/lib/c_glib/test/testbufferedtransport.c index fb49c8f6..64dbdd13 100644 --- a/lib/c_glib/test/testbufferedtransport.c +++ b/lib/c_glib/test/testbufferedtransport.c @@ -20,10 +20,10 @@ #include #include -#include "transport/thrift_transport.h" -#include "transport/thrift_socket.h" -#include "transport/thrift_server_transport.h" -#include "transport/thrift_server_socket.h" +#include +#include +#include +#include #define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' } diff --git a/lib/c_glib/test/testframedtransport.c b/lib/c_glib/test/testframedtransport.c index 3269bf5b..3587711a 100644 --- a/lib/c_glib/test/testframedtransport.c +++ b/lib/c_glib/test/testframedtransport.c @@ -20,10 +20,10 @@ #include #include -#include "transport/thrift_transport.h" -#include "transport/thrift_socket.h" -#include "transport/thrift_server_transport.h" -#include "transport/thrift_server_socket.h" +#include +#include +#include +#include #define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' } diff --git a/lib/c_glib/test/testmemorybuffer.c b/lib/c_glib/test/testmemorybuffer.c index 65901bf7..b716f5fe 100644 --- a/lib/c_glib/test/testmemorybuffer.c +++ b/lib/c_glib/test/testmemorybuffer.c @@ -20,10 +20,10 @@ #include #include -#include "transport/thrift_transport.h" -#include "transport/thrift_socket.h" -#include "transport/thrift_server_transport.h" -#include "transport/thrift_server_socket.h" +#include +#include +#include +#include #define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' } diff --git a/lib/c_glib/test/testoptionalrequired.c b/lib/c_glib/test/testoptionalrequired.c index 7165d931..fdd4c1af 100644 --- a/lib/c_glib/test/testoptionalrequired.c +++ b/lib/c_glib/test/testoptionalrequired.c @@ -21,9 +21,9 @@ #include #include "thrift_struct.h" -#include "protocol/thrift_protocol.h" -#include "protocol/thrift_binary_protocol.h" -#include "transport/thrift_memory_buffer.h" +#include +#include +#include #include "gen-c_glib/t_test_optional_required_test_types.h" #include "gen-c_glib/t_test_optional_required_test_types.c" diff --git a/lib/c_glib/test/testsimpleserver.c b/lib/c_glib/test/testsimpleserver.c index 282a6e8a..6f7d3a4c 100644 --- a/lib/c_glib/test/testsimpleserver.c +++ b/lib/c_glib/test/testsimpleserver.c @@ -24,13 +24,13 @@ #include #include -#include "thrift.h" -#include "processor/thrift_processor.h" -#include "transport/thrift_server_socket.h" +#include +#include +#include #define TEST_PORT 51199 -#include "server/thrift_simple_server.c" +#include /* create a rudimentary processor */ #define TEST_PROCESSOR_TYPE (test_processor_get_type ()) diff --git a/lib/c_glib/test/testthrifttest.c b/lib/c_glib/test/testthrifttest.c index b14b6068..806166e2 100644 --- a/lib/c_glib/test/testthrifttest.c +++ b/lib/c_glib/test/testthrifttest.c @@ -1,8 +1,8 @@ #include #include -#include "transport/thrift_server_transport.h" -#include "transport/thrift_server_socket.h" +#include +#include static const char TEST_ADDRESS[] = "localhost"; static const int TEST_PORT = 64444; diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp index 795e47fd..fb6af0b0 100644 --- a/lib/c_glib/test/testthrifttestclient.cpp +++ b/lib/c_glib/test/testthrifttestclient.cpp @@ -22,10 +22,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "ThriftTest.h" #include "ThriftTest_types.h" @@ -314,9 +314,9 @@ extern "C" { #include "t_test_thrift_test.h" #include "t_test_thrift_test_types.h" -#include "transport/thrift_socket.h" -#include "protocol/thrift_protocol.h" -#include "protocol/thrift_binary_protocol.h" +#include +#include +#include static void test_thrift_client (void) diff --git a/lib/c_glib/test/testtransportsocket.c b/lib/c_glib/test/testtransportsocket.c index 279da86d..cc21d581 100644 --- a/lib/c_glib/test/testtransportsocket.c +++ b/lib/c_glib/test/testtransportsocket.c @@ -20,9 +20,9 @@ #include #include -#include "transport/thrift_transport.h" -#include "transport/thrift_server_transport.h" -#include "transport/thrift_server_socket.h" +#include +#include +#include #define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' } diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am index 188b3716..1eec8ab7 100644 --- a/lib/cpp/Makefile.am +++ b/lib/cpp/Makefile.am @@ -48,63 +48,63 @@ pkgconfig_DATA += thrift-qt.pc endif AM_CXXFLAGS = -Wall -AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(srcdir)/src +AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(srcdir)/src -I$(srcdir)/src/thrift AM_LDFLAGS = $(BOOST_LDFLAGS) # Define the source files for the module -libthrift_la_SOURCES = src/Thrift.cpp \ - src/TApplicationException.cpp \ - src/VirtualProfiling.cpp \ - src/concurrency/ThreadManager.cpp \ - src/concurrency/TimerManager.cpp \ - src/concurrency/Util.cpp \ - src/protocol/TDebugProtocol.cpp \ - src/protocol/TDenseProtocol.cpp \ - src/protocol/TJSONProtocol.cpp \ - src/protocol/TBase64Utils.cpp \ - src/transport/TTransportException.cpp \ - src/transport/TFDTransport.cpp \ - src/transport/TFileTransport.cpp \ - src/transport/TSimpleFileTransport.cpp \ - src/transport/THttpTransport.cpp \ - src/transport/THttpClient.cpp \ - src/transport/THttpServer.cpp \ - src/transport/TSocket.cpp \ - src/transport/TSSLSocket.cpp \ - src/transport/TSocketPool.cpp \ - src/transport/TServerSocket.cpp \ - src/transport/TSSLServerSocket.cpp \ - src/transport/TTransportUtils.cpp \ - src/transport/TBufferTransports.cpp \ - src/server/TServer.cpp \ - src/server/TSimpleServer.cpp \ - src/server/TThreadPoolServer.cpp \ - src/server/TThreadedServer.cpp \ - src/async/TAsyncChannel.cpp \ - src/processor/PeekProcessor.cpp +libthrift_la_SOURCES = src/thrift/Thrift.cpp \ + src/thrift/TApplicationException.cpp \ + src/thrift/VirtualProfiling.cpp \ + src/thrift/concurrency/ThreadManager.cpp \ + src/thrift/concurrency/TimerManager.cpp \ + src/thrift/concurrency/Util.cpp \ + src/thrift/protocol/TDebugProtocol.cpp \ + src/thrift/protocol/TDenseProtocol.cpp \ + src/thrift/protocol/TJSONProtocol.cpp \ + src/thrift/protocol/TBase64Utils.cpp \ + src/thrift/transport/TTransportException.cpp \ + src/thrift/transport/TFDTransport.cpp \ + src/thrift/transport/TFileTransport.cpp \ + src/thrift/transport/TSimpleFileTransport.cpp \ + src/thrift/transport/THttpTransport.cpp \ + src/thrift/transport/THttpClient.cpp \ + src/thrift/transport/THttpServer.cpp \ + src/thrift/transport/TSocket.cpp \ + src/thrift/transport/TSSLSocket.cpp \ + src/thrift/transport/TSocketPool.cpp \ + src/thrift/transport/TServerSocket.cpp \ + src/thrift/transport/TSSLServerSocket.cpp \ + src/thrift/transport/TTransportUtils.cpp \ + src/thrift/transport/TBufferTransports.cpp \ + src/thrift/server/TServer.cpp \ + src/thrift/server/TSimpleServer.cpp \ + src/thrift/server/TThreadPoolServer.cpp \ + src/thrift/server/TThreadedServer.cpp \ + src/thrift/async/TAsyncChannel.cpp \ + src/thrift/processor/PeekProcessor.cpp if WITH_BOOSTTHREADS -libthrift_la_SOURCES += src/concurrency/BoostThreadFactory.cpp \ - src/concurrency/BoostMonitor.cpp \ - src/concurrency/BoostMutex.cpp +libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \ + src/thrift/concurrency/BoostMonitor.cpp \ + src/thrift/concurrency/BoostMutex.cpp else -libthrift_la_SOURCES += src/concurrency/Mutex.cpp \ - src/concurrency/Monitor.cpp \ - src/concurrency/PosixThreadFactory.cpp +libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \ + src/thrift/concurrency/Monitor.cpp \ + src/thrift/concurrency/PosixThreadFactory.cpp endif -libthriftnb_la_SOURCES = src/server/TNonblockingServer.cpp \ - src/async/TAsyncProtocolProcessor.cpp \ - src/async/TEvhttpServer.cpp \ - src/async/TEvhttpClientChannel.cpp +libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \ + src/thrift/async/TAsyncProtocolProcessor.cpp \ + src/thrift/async/TEvhttpServer.cpp \ + src/thrift/async/TEvhttpClientChannel.cpp -libthriftz_la_SOURCES = src/transport/TZlibTransport.cpp +libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp libthriftqt_la_MOC = src/qt/moc_TQTcpServer.cpp libthriftqt_la_SOURCES = $(libthriftqt_la_MOC) \ - src/qt/TQIODeviceTransport.cpp \ - src/qt/TQTcpServer.cpp + src/thrift/qt/TQIODeviceTransport.cpp \ + src/thrift/qt/TQTcpServer.cpp CLEANFILES = $(libthriftqt_la_MOC) # Flags for the various libraries @@ -121,100 +121,100 @@ libthriftqt_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS) include_thriftdir = $(includedir)/thrift include_thrift_HEADERS = \ $(top_builddir)/config.h \ - src/TDispatchProcessor.h \ - src/Thrift.h \ - src/TReflectionLocal.h \ - src/TProcessor.h \ - src/TApplicationException.h \ - src/TLogging.h + src/thrift/TDispatchProcessor.h \ + src/thrift/Thrift.h \ + src/thrift/TReflectionLocal.h \ + src/thrift/TProcessor.h \ + src/thrift/TApplicationException.h \ + src/thrift/TLogging.h include_concurrencydir = $(include_thriftdir)/concurrency include_concurrency_HEADERS = \ - src/concurrency/BoostThreadFactory.h \ - src/concurrency/Exception.h \ - src/concurrency/Mutex.h \ - src/concurrency/Monitor.h \ - src/concurrency/PlatformThreadFactory.h \ - src/concurrency/PosixThreadFactory.h \ - src/concurrency/Thread.h \ - src/concurrency/ThreadManager.h \ - src/concurrency/TimerManager.h \ - src/concurrency/FunctionRunner.h \ - src/concurrency/Util.h + src/thrift/concurrency/BoostThreadFactory.h \ + src/thrift/concurrency/Exception.h \ + src/thrift/concurrency/Mutex.h \ + src/thrift/concurrency/Monitor.h \ + src/thrift/concurrency/PlatformThreadFactory.h \ + src/thrift/concurrency/PosixThreadFactory.h \ + src/thrift/concurrency/Thread.h \ + src/thrift/concurrency/ThreadManager.h \ + src/thrift/concurrency/TimerManager.h \ + src/thrift/concurrency/FunctionRunner.h \ + src/thrift/concurrency/Util.h include_protocoldir = $(include_thriftdir)/protocol include_protocol_HEADERS = \ - src/protocol/TBinaryProtocol.h \ - src/protocol/TBinaryProtocol.tcc \ - src/protocol/TCompactProtocol.h \ - src/protocol/TCompactProtocol.tcc \ - src/protocol/TDenseProtocol.h \ - src/protocol/TDebugProtocol.h \ - src/protocol/TBase64Utils.h \ - src/protocol/TJSONProtocol.h \ - src/protocol/TProtocolTap.h \ - src/protocol/TProtocolException.h \ - src/protocol/TVirtualProtocol.h \ - src/protocol/TProtocol.h + src/thrift/protocol/TBinaryProtocol.h \ + src/thrift/protocol/TBinaryProtocol.tcc \ + src/thrift/protocol/TCompactProtocol.h \ + src/thrift/protocol/TCompactProtocol.tcc \ + src/thrift/protocol/TDenseProtocol.h \ + src/thrift/protocol/TDebugProtocol.h \ + src/thrift/protocol/TBase64Utils.h \ + src/thrift/protocol/TJSONProtocol.h \ + src/thrift/protocol/TProtocolTap.h \ + src/thrift/protocol/TProtocolException.h \ + src/thrift/protocol/TVirtualProtocol.h \ + src/thrift/protocol/TProtocol.h include_transportdir = $(include_thriftdir)/transport include_transport_HEADERS = \ - src/transport/TFDTransport.h \ - src/transport/TFileTransport.h \ - src/transport/TSimpleFileTransport.h \ - src/transport/TServerSocket.h \ - src/transport/TSSLServerSocket.h \ - src/transport/TServerTransport.h \ - src/transport/THttpTransport.h \ - src/transport/THttpClient.h \ - src/transport/THttpServer.h \ - src/transport/TSocket.h \ - src/transport/TSSLSocket.h \ - src/transport/TSocketPool.h \ - src/transport/TVirtualTransport.h \ - src/transport/TTransport.h \ - src/transport/TTransportException.h \ - src/transport/TTransportUtils.h \ - src/transport/TBufferTransports.h \ - src/transport/TShortReadTransport.h \ - src/transport/TZlibTransport.h + src/thrift/transport/TFDTransport.h \ + src/thrift/transport/TFileTransport.h \ + src/thrift/transport/TSimpleFileTransport.h \ + src/thrift/transport/TServerSocket.h \ + src/thrift/transport/TSSLServerSocket.h \ + src/thrift/transport/TServerTransport.h \ + src/thrift/transport/THttpTransport.h \ + src/thrift/transport/THttpClient.h \ + src/thrift/transport/THttpServer.h \ + src/thrift/transport/TSocket.h \ + src/thrift/transport/TSSLSocket.h \ + src/thrift/transport/TSocketPool.h \ + src/thrift/transport/TVirtualTransport.h \ + src/thrift/transport/TTransport.h \ + src/thrift/transport/TTransportException.h \ + src/thrift/transport/TTransportUtils.h \ + src/thrift/transport/TBufferTransports.h \ + src/thrift/transport/TShortReadTransport.h \ + src/thrift/transport/TZlibTransport.h include_serverdir = $(include_thriftdir)/server include_server_HEADERS = \ - src/server/TServer.h \ - src/server/TSimpleServer.h \ - src/server/TThreadPoolServer.h \ - src/server/TThreadedServer.h \ - src/server/TNonblockingServer.h + src/thrift/server/TServer.h \ + src/thrift/server/TSimpleServer.h \ + src/thrift/server/TThreadPoolServer.h \ + src/thrift/server/TThreadedServer.h \ + src/thrift/server/TNonblockingServer.h include_processordir = $(include_thriftdir)/processor include_processor_HEADERS = \ - src/processor/PeekProcessor.h \ - src/processor/StatsProcessor.h + src/thrift/processor/PeekProcessor.h \ + src/thrift/processor/StatsProcessor.h include_asyncdir = $(include_thriftdir)/async include_async_HEADERS = \ - src/async/TAsyncChannel.h \ - src/async/TAsyncDispatchProcessor.h \ - src/async/TAsyncProcessor.h \ - src/async/TAsyncBufferProcessor.h \ - src/async/TAsyncProtocolProcessor.h \ - src/async/TEvhttpClientChannel.h \ - src/async/TEvhttpServer.h + src/thrift/async/TAsyncChannel.h \ + src/thrift/async/TAsyncDispatchProcessor.h \ + src/thrift/async/TAsyncProcessor.h \ + src/thrift/async/TAsyncBufferProcessor.h \ + src/thrift/async/TAsyncProtocolProcessor.h \ + src/thrift/async/TEvhttpClientChannel.h \ + src/thrift/async/TEvhttpServer.h include_qtdir = $(include_thriftdir)/qt include_qt_HEADERS = \ - src/qt/TQIODeviceTransport.h \ - src/qt/TQTcpServer.h + src/thrift/qt/TQIODeviceTransport.h \ + src/thrift/qt/TQTcpServer.h noinst_PROGRAMS = concurrency_test concurrency_test_SOURCES = \ - src/concurrency/test/Tests.cpp \ - src/concurrency/test/ThreadFactoryTests.h \ - src/concurrency/test/ThreadManagerTests.h \ - src/concurrency/test/TimerManagerTests.h + src/thrift/concurrency/test/Tests.cpp \ + src/thrift/concurrency/test/ThreadFactoryTests.h \ + src/thrift/concurrency/test/ThreadManagerTests.h \ + src/thrift/concurrency/test/TimerManagerTests.h concurrency_test_LDADD = libthrift.la diff --git a/lib/cpp/libthrift.vcxproj b/lib/cpp/libthrift.vcxproj index 57add634..4a285739 100644 --- a/lib/cpp/libthrift.vcxproj +++ b/lib/cpp/libthrift.vcxproj @@ -19,192 +19,192 @@ - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - - + + + + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + %(PreprocessorDefinitions) %(PreprocessorDefinitions) %(PreprocessorDefinitions) %(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - + + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - + + true true - - - + + + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - + + + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - + + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + true true true true - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - + + + NotUsing NotUsing NotUsing NotUsing - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + {DD26F57E-60F2-4F37-A616-D219A9BF338F} @@ -252,16 +252,16 @@ - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;..\..\..\..\boost;..\..\..\..\boost\boost;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;..\..\..\..\boost;..\..\..\..\boost\boost;$(IncludePath) - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath) - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;..\..\..\..\boost;..\..\..\..\boost\boost;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;..\..\..\..\boost;..\..\..\..\boost\boost;$(IncludePath) - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(ProjectDir)\src\transport\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\openssl\OpenSSL-Win32\include\;$(IncludePath) @@ -328,4 +328,4 @@ - \ No newline at end of file + diff --git a/lib/cpp/libthrift.vcxproj.filters b/lib/cpp/libthrift.vcxproj.filters index 0762fb40..4025270c 100644 --- a/lib/cpp/libthrift.vcxproj.filters +++ b/lib/cpp/libthrift.vcxproj.filters @@ -1,99 +1,99 @@  - + transport - - - + + + windows - + transport - + windows - + concurrency - + concurrency - + concurrency - + protocal - + protocal - + protocal - + protocal - + transport - + transport - + transport - + transport - + transport - + transport - + transport - + transport - + server - + server - + async - + processor - + transport - + transport - + windows - + windows - + concurrency - + concurrency - + concurrency - + windows @@ -104,118 +104,118 @@ - + transport - + transport - + protocal - - - - + + + + windows - + windows - + concurrency - + transport - + transport - + transport - + windows - + transport - + windows - + protocal - + protocal - + server - + server - + server - + async - + processor - + transport - + transport - + transport - + transport - + transport - + transport - + transport - + protocal - + protocal - + protocal - + transport - + windows - + windows - + windows - + windows - + concurrency - + concurrency - + windows @@ -252,10 +252,10 @@ - + protocal - + windows\tr1 diff --git a/lib/cpp/libthriftnb.vcxproj b/lib/cpp/libthriftnb.vcxproj index c075d9c9..640397c0 100644 --- a/lib/cpp/libthriftnb.vcxproj +++ b/lib/cpp/libthriftnb.vcxproj @@ -19,41 +19,41 @@ - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - + - - - - - - - - + + + + + + + + {D8696CCE-7D46-4659-B432-91754A41DEB0} @@ -100,16 +100,16 @@ - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath) - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath) - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath) - $(ProjectDir)\src\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath) + $(ProjectDir)\src\thrift\;$(ProjectDir)\src\windows\;$(THIRD_PARTY)\boost\boost_1_47_0\include;$(THIRD_PARTY)\boost\boost_1_47_0\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\WIN32-Code\;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\include;$(THIRD_PARTY)\libevent\libevent-2.0.13-stable\;$(IncludePath) diff --git a/lib/cpp/libthriftnb.vcxproj.filters b/lib/cpp/libthriftnb.vcxproj.filters index d481d8f0..5245544e 100644 --- a/lib/cpp/libthriftnb.vcxproj.filters +++ b/lib/cpp/libthriftnb.vcxproj.filters @@ -12,45 +12,45 @@ - + server - + async - + async - + async - + windows - + server - + async - + async - + async - + windows - + windows - + windows - + windows diff --git a/lib/cpp/src/TApplicationException.cpp b/lib/cpp/src/thrift/TApplicationException.cpp similarity index 96% rename from lib/cpp/src/TApplicationException.cpp rename to lib/cpp/src/thrift/TApplicationException.cpp index 32238fbc..1110ba2a 100644 --- a/lib/cpp/src/TApplicationException.cpp +++ b/lib/cpp/src/thrift/TApplicationException.cpp @@ -17,8 +17,8 @@ * under the License. */ -#include -#include +#include +#include namespace apache { namespace thrift { diff --git a/lib/cpp/src/TApplicationException.h b/lib/cpp/src/thrift/TApplicationException.h similarity index 99% rename from lib/cpp/src/TApplicationException.h rename to lib/cpp/src/thrift/TApplicationException.h index 61e68644..79f026da 100644 --- a/lib/cpp/src/TApplicationException.h +++ b/lib/cpp/src/thrift/TApplicationException.h @@ -20,7 +20,7 @@ #ifndef _THRIFT_TAPPLICATIONEXCEPTION_H_ #define _THRIFT_TAPPLICATIONEXCEPTION_H_ 1 -#include +#include namespace apache { namespace thrift { diff --git a/lib/cpp/src/TDispatchProcessor.h b/lib/cpp/src/thrift/TDispatchProcessor.h similarity index 100% rename from lib/cpp/src/TDispatchProcessor.h rename to lib/cpp/src/thrift/TDispatchProcessor.h diff --git a/lib/cpp/src/TLogging.h b/lib/cpp/src/thrift/TLogging.h similarity index 100% rename from lib/cpp/src/TLogging.h rename to lib/cpp/src/thrift/TLogging.h diff --git a/lib/cpp/src/TProcessor.h b/lib/cpp/src/thrift/TProcessor.h similarity index 99% rename from lib/cpp/src/TProcessor.h rename to lib/cpp/src/thrift/TProcessor.h index 26c3ee46..b4a4657a 100644 --- a/lib/cpp/src/TProcessor.h +++ b/lib/cpp/src/thrift/TProcessor.h @@ -21,7 +21,7 @@ #define _THRIFT_TPROCESSOR_H_ 1 #include -#include +#include #include namespace apache { namespace thrift { diff --git a/lib/cpp/src/TReflectionLocal.h b/lib/cpp/src/thrift/TReflectionLocal.h similarity index 98% rename from lib/cpp/src/TReflectionLocal.h rename to lib/cpp/src/thrift/TReflectionLocal.h index e83e4753..2ef7511b 100644 --- a/lib/cpp/src/TReflectionLocal.h +++ b/lib/cpp/src/thrift/TReflectionLocal.h @@ -22,7 +22,7 @@ #include #include -#include +#include /** * Local Reflection is a blanket term referring to the the structure diff --git a/lib/cpp/src/Thrift.cpp b/lib/cpp/src/thrift/Thrift.cpp similarity index 99% rename from lib/cpp/src/Thrift.cpp rename to lib/cpp/src/thrift/Thrift.cpp index 114947f2..bcbdb1a4 100644 --- a/lib/cpp/src/Thrift.cpp +++ b/lib/cpp/src/thrift/Thrift.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include #include #include #include diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/thrift/Thrift.h similarity index 99% rename from lib/cpp/src/Thrift.h rename to lib/cpp/src/thrift/Thrift.h index 60a66f46..5cdc37e7 100644 --- a/lib/cpp/src/Thrift.h +++ b/lib/cpp/src/thrift/Thrift.h @@ -21,7 +21,7 @@ #define _THRIFT_THRIFT_H_ 1 #ifdef _WIN32 -#include "windows/config.h" +#include #endif #ifdef HAVE_CONFIG_H diff --git a/lib/cpp/src/VirtualProfiling.cpp b/lib/cpp/src/thrift/VirtualProfiling.cpp similarity index 99% rename from lib/cpp/src/VirtualProfiling.cpp rename to lib/cpp/src/thrift/VirtualProfiling.cpp index 0b023af2..180cfb73 100644 --- a/lib/cpp/src/VirtualProfiling.cpp +++ b/lib/cpp/src/thrift/VirtualProfiling.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include // Do nothing if virtual call profiling is not enabled #if T_GLOBAL_DEBUG_VIRTUAL > 1 @@ -36,7 +36,7 @@ #endif // !__GLIBC__ -#include +#include #include #include diff --git a/lib/cpp/src/async/TAsyncBufferProcessor.h b/lib/cpp/src/thrift/async/TAsyncBufferProcessor.h similarity index 97% rename from lib/cpp/src/async/TAsyncBufferProcessor.h rename to lib/cpp/src/thrift/async/TAsyncBufferProcessor.h index bfaf3230..a7f6435b 100644 --- a/lib/cpp/src/async/TAsyncBufferProcessor.h +++ b/lib/cpp/src/thrift/async/TAsyncBufferProcessor.h @@ -23,7 +23,7 @@ #include #include -#include "transport/TBufferTransports.h" +#include namespace apache { namespace thrift { namespace async { diff --git a/lib/cpp/src/async/TAsyncChannel.cpp b/lib/cpp/src/thrift/async/TAsyncChannel.cpp similarity index 96% rename from lib/cpp/src/async/TAsyncChannel.cpp rename to lib/cpp/src/thrift/async/TAsyncChannel.cpp index 9397017b..bfde660e 100644 --- a/lib/cpp/src/async/TAsyncChannel.cpp +++ b/lib/cpp/src/thrift/async/TAsyncChannel.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include #include namespace apache { namespace thrift { namespace async { diff --git a/lib/cpp/src/async/TAsyncChannel.h b/lib/cpp/src/thrift/async/TAsyncChannel.h similarity index 98% rename from lib/cpp/src/async/TAsyncChannel.h rename to lib/cpp/src/thrift/async/TAsyncChannel.h index 856ab311..634b6a43 100644 --- a/lib/cpp/src/async/TAsyncChannel.h +++ b/lib/cpp/src/thrift/async/TAsyncChannel.h @@ -21,7 +21,7 @@ #define _THRIFT_ASYNC_TASYNCCHANNEL_H_ 1 #include -#include +#include namespace apache { namespace thrift { namespace transport { class TMemoryBuffer; diff --git a/lib/cpp/src/async/TAsyncDispatchProcessor.h b/lib/cpp/src/thrift/async/TAsyncDispatchProcessor.h similarity index 100% rename from lib/cpp/src/async/TAsyncDispatchProcessor.h rename to lib/cpp/src/thrift/async/TAsyncDispatchProcessor.h diff --git a/lib/cpp/src/async/TAsyncProcessor.h b/lib/cpp/src/thrift/async/TAsyncProcessor.h similarity index 98% rename from lib/cpp/src/async/TAsyncProcessor.h rename to lib/cpp/src/thrift/async/TAsyncProcessor.h index c62f8b7a..593ea69c 100644 --- a/lib/cpp/src/async/TAsyncProcessor.h +++ b/lib/cpp/src/thrift/async/TAsyncProcessor.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include namespace apache { namespace thrift { namespace async { diff --git a/lib/cpp/src/async/TAsyncProtocolProcessor.cpp b/lib/cpp/src/thrift/async/TAsyncProtocolProcessor.cpp similarity index 100% rename from lib/cpp/src/async/TAsyncProtocolProcessor.cpp rename to lib/cpp/src/thrift/async/TAsyncProtocolProcessor.cpp diff --git a/lib/cpp/src/async/TAsyncProtocolProcessor.h b/lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h similarity index 97% rename from lib/cpp/src/async/TAsyncProtocolProcessor.h rename to lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h index 647bbb69..139e394a 100644 --- a/lib/cpp/src/async/TAsyncProtocolProcessor.h +++ b/lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h @@ -22,7 +22,7 @@ #include "TAsyncProcessor.h" #include "TAsyncBufferProcessor.h" -#include "protocol/TProtocol.h" +#include namespace apache { namespace thrift { namespace async { diff --git a/lib/cpp/src/async/TEvhttpClientChannel.cpp b/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp similarity index 97% rename from lib/cpp/src/async/TEvhttpClientChannel.cpp rename to lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp index c0363fc7..58715032 100755 --- a/lib/cpp/src/async/TEvhttpClientChannel.cpp +++ b/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp @@ -19,8 +19,8 @@ #include "TEvhttpClientChannel.h" #include -#include "transport/TBufferTransports.h" -#include +#include +#include #include #include diff --git a/lib/cpp/src/async/TEvhttpClientChannel.h b/lib/cpp/src/thrift/async/TEvhttpClientChannel.h similarity index 100% rename from lib/cpp/src/async/TEvhttpClientChannel.h rename to lib/cpp/src/thrift/async/TEvhttpClientChannel.h diff --git a/lib/cpp/src/async/TEvhttpServer.cpp b/lib/cpp/src/thrift/async/TEvhttpServer.cpp similarity index 98% rename from lib/cpp/src/async/TEvhttpServer.cpp rename to lib/cpp/src/thrift/async/TEvhttpServer.cpp index b92422c6..73516dbe 100755 --- a/lib/cpp/src/async/TEvhttpServer.cpp +++ b/lib/cpp/src/thrift/async/TEvhttpServer.cpp @@ -19,7 +19,7 @@ #include "TEvhttpServer.h" #include "TAsyncBufferProcessor.h" -#include "transport/TBufferTransports.h" +#include #include #include diff --git a/lib/cpp/src/async/TEvhttpServer.h b/lib/cpp/src/thrift/async/TEvhttpServer.h similarity index 100% rename from lib/cpp/src/async/TEvhttpServer.h rename to lib/cpp/src/thrift/async/TEvhttpServer.h diff --git a/lib/cpp/src/concurrency/BoostMonitor.cpp b/lib/cpp/src/thrift/concurrency/BoostMonitor.cpp similarity index 100% rename from lib/cpp/src/concurrency/BoostMonitor.cpp rename to lib/cpp/src/thrift/concurrency/BoostMonitor.cpp diff --git a/lib/cpp/src/concurrency/BoostMutex.cpp b/lib/cpp/src/thrift/concurrency/BoostMutex.cpp similarity index 100% rename from lib/cpp/src/concurrency/BoostMutex.cpp rename to lib/cpp/src/thrift/concurrency/BoostMutex.cpp diff --git a/lib/cpp/src/concurrency/BoostThreadFactory.cpp b/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp similarity index 100% rename from lib/cpp/src/concurrency/BoostThreadFactory.cpp rename to lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp diff --git a/lib/cpp/src/concurrency/BoostThreadFactory.h b/lib/cpp/src/thrift/concurrency/BoostThreadFactory.h similarity index 100% rename from lib/cpp/src/concurrency/BoostThreadFactory.h rename to lib/cpp/src/thrift/concurrency/BoostThreadFactory.h diff --git a/lib/cpp/src/concurrency/Exception.h b/lib/cpp/src/thrift/concurrency/Exception.h similarity index 98% rename from lib/cpp/src/concurrency/Exception.h rename to lib/cpp/src/thrift/concurrency/Exception.h index 06ba0d3d..c62f1168 100644 --- a/lib/cpp/src/concurrency/Exception.h +++ b/lib/cpp/src/thrift/concurrency/Exception.h @@ -21,7 +21,7 @@ #define _THRIFT_CONCURRENCY_EXCEPTION_H_ 1 #include -#include +#include namespace apache { namespace thrift { namespace concurrency { diff --git a/lib/cpp/src/concurrency/FunctionRunner.h b/lib/cpp/src/thrift/concurrency/FunctionRunner.h similarity index 100% rename from lib/cpp/src/concurrency/FunctionRunner.h rename to lib/cpp/src/thrift/concurrency/FunctionRunner.h diff --git a/lib/cpp/src/concurrency/Monitor.cpp b/lib/cpp/src/thrift/concurrency/Monitor.cpp similarity index 100% rename from lib/cpp/src/concurrency/Monitor.cpp rename to lib/cpp/src/thrift/concurrency/Monitor.cpp diff --git a/lib/cpp/src/concurrency/Monitor.h b/lib/cpp/src/thrift/concurrency/Monitor.h similarity index 100% rename from lib/cpp/src/concurrency/Monitor.h rename to lib/cpp/src/thrift/concurrency/Monitor.h diff --git a/lib/cpp/src/concurrency/Mutex.cpp b/lib/cpp/src/thrift/concurrency/Mutex.cpp similarity index 100% rename from lib/cpp/src/concurrency/Mutex.cpp rename to lib/cpp/src/thrift/concurrency/Mutex.cpp diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/thrift/concurrency/Mutex.h similarity index 100% rename from lib/cpp/src/concurrency/Mutex.h rename to lib/cpp/src/thrift/concurrency/Mutex.h diff --git a/lib/cpp/src/concurrency/PlatformThreadFactory.h b/lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h similarity index 92% rename from lib/cpp/src/concurrency/PlatformThreadFactory.h rename to lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h index 04fdc5bb..04f6ee32 100644 --- a/lib/cpp/src/concurrency/PlatformThreadFactory.h +++ b/lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h @@ -21,9 +21,9 @@ #define _THRIFT_CONCURRENCY_PLATFORMTHREADFACTORY_H_ 1 #ifndef USE_BOOST_THREAD -# include +# include #else -# include +# include #endif namespace apache { namespace thrift { namespace concurrency { diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.cpp b/lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp similarity index 100% rename from lib/cpp/src/concurrency/PosixThreadFactory.cpp rename to lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.h b/lib/cpp/src/thrift/concurrency/PosixThreadFactory.h similarity index 100% rename from lib/cpp/src/concurrency/PosixThreadFactory.h rename to lib/cpp/src/thrift/concurrency/PosixThreadFactory.h diff --git a/lib/cpp/src/concurrency/Thread.h b/lib/cpp/src/thrift/concurrency/Thread.h similarity index 100% rename from lib/cpp/src/concurrency/Thread.h rename to lib/cpp/src/thrift/concurrency/Thread.h diff --git a/lib/cpp/src/concurrency/ThreadManager.cpp b/lib/cpp/src/thrift/concurrency/ThreadManager.cpp similarity index 100% rename from lib/cpp/src/concurrency/ThreadManager.cpp rename to lib/cpp/src/thrift/concurrency/ThreadManager.cpp diff --git a/lib/cpp/src/concurrency/ThreadManager.h b/lib/cpp/src/thrift/concurrency/ThreadManager.h similarity index 100% rename from lib/cpp/src/concurrency/ThreadManager.h rename to lib/cpp/src/thrift/concurrency/ThreadManager.h diff --git a/lib/cpp/src/concurrency/TimerManager.cpp b/lib/cpp/src/thrift/concurrency/TimerManager.cpp similarity index 100% rename from lib/cpp/src/concurrency/TimerManager.cpp rename to lib/cpp/src/thrift/concurrency/TimerManager.cpp diff --git a/lib/cpp/src/concurrency/TimerManager.h b/lib/cpp/src/thrift/concurrency/TimerManager.h similarity index 100% rename from lib/cpp/src/concurrency/TimerManager.h rename to lib/cpp/src/thrift/concurrency/TimerManager.h diff --git a/lib/cpp/src/concurrency/Util.cpp b/lib/cpp/src/thrift/concurrency/Util.cpp similarity index 100% rename from lib/cpp/src/concurrency/Util.cpp rename to lib/cpp/src/thrift/concurrency/Util.cpp diff --git a/lib/cpp/src/concurrency/Util.h b/lib/cpp/src/thrift/concurrency/Util.h similarity index 100% rename from lib/cpp/src/concurrency/Util.h rename to lib/cpp/src/thrift/concurrency/Util.h diff --git a/lib/cpp/src/concurrency/test/Tests.cpp b/lib/cpp/src/thrift/concurrency/test/Tests.cpp similarity index 100% rename from lib/cpp/src/concurrency/test/Tests.cpp rename to lib/cpp/src/thrift/concurrency/test/Tests.cpp diff --git a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h b/lib/cpp/src/thrift/concurrency/test/ThreadFactoryTests.h similarity index 97% rename from lib/cpp/src/concurrency/test/ThreadFactoryTests.h rename to lib/cpp/src/thrift/concurrency/test/ThreadFactoryTests.h index d9066b5d..b7e873ff 100644 --- a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h +++ b/lib/cpp/src/thrift/concurrency/test/ThreadFactoryTests.h @@ -18,10 +18,10 @@ */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/lib/cpp/src/concurrency/test/ThreadManagerTests.h b/lib/cpp/src/thrift/concurrency/test/ThreadManagerTests.h similarity index 98% rename from lib/cpp/src/concurrency/test/ThreadManagerTests.h rename to lib/cpp/src/thrift/concurrency/test/ThreadManagerTests.h index e12201c0..b734f7a0 100644 --- a/lib/cpp/src/concurrency/test/ThreadManagerTests.h +++ b/lib/cpp/src/thrift/concurrency/test/ThreadManagerTests.h @@ -18,10 +18,10 @@ */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/lib/cpp/src/concurrency/test/TimerManagerTests.h b/lib/cpp/src/thrift/concurrency/test/TimerManagerTests.h similarity index 95% rename from lib/cpp/src/concurrency/test/TimerManagerTests.h rename to lib/cpp/src/thrift/concurrency/test/TimerManagerTests.h index 41f1674d..4fe96673 100644 --- a/lib/cpp/src/concurrency/test/TimerManagerTests.h +++ b/lib/cpp/src/thrift/concurrency/test/TimerManagerTests.h @@ -17,10 +17,10 @@ * under the License. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/lib/cpp/src/processor/PeekProcessor.cpp b/lib/cpp/src/thrift/processor/PeekProcessor.cpp similarity index 100% rename from lib/cpp/src/processor/PeekProcessor.cpp rename to lib/cpp/src/thrift/processor/PeekProcessor.cpp diff --git a/lib/cpp/src/processor/PeekProcessor.h b/lib/cpp/src/thrift/processor/PeekProcessor.h similarity index 95% rename from lib/cpp/src/processor/PeekProcessor.h rename to lib/cpp/src/thrift/processor/PeekProcessor.h index cb703f65..60e1559c 100644 --- a/lib/cpp/src/processor/PeekProcessor.h +++ b/lib/cpp/src/thrift/processor/PeekProcessor.h @@ -22,9 +22,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include namespace apache { namespace thrift { namespace processor { diff --git a/lib/cpp/src/processor/StatsProcessor.h b/lib/cpp/src/thrift/processor/StatsProcessor.h similarity index 98% rename from lib/cpp/src/processor/StatsProcessor.h rename to lib/cpp/src/thrift/processor/StatsProcessor.h index 8600c6b0..58cd1dc5 100644 --- a/lib/cpp/src/processor/StatsProcessor.h +++ b/lib/cpp/src/thrift/processor/StatsProcessor.h @@ -21,8 +21,8 @@ #define STATSPROCESSOR_H #include -#include -#include +#include +#include #include namespace apache { namespace thrift { namespace processor { diff --git a/lib/cpp/src/protocol/TBase64Utils.cpp b/lib/cpp/src/thrift/protocol/TBase64Utils.cpp similarity index 100% rename from lib/cpp/src/protocol/TBase64Utils.cpp rename to lib/cpp/src/thrift/protocol/TBase64Utils.cpp diff --git a/lib/cpp/src/protocol/TBase64Utils.h b/lib/cpp/src/thrift/protocol/TBase64Utils.h similarity index 100% rename from lib/cpp/src/protocol/TBase64Utils.h rename to lib/cpp/src/thrift/protocol/TBase64Utils.h diff --git a/lib/cpp/src/protocol/TBinaryProtocol.h b/lib/cpp/src/thrift/protocol/TBinaryProtocol.h similarity index 100% rename from lib/cpp/src/protocol/TBinaryProtocol.h rename to lib/cpp/src/thrift/protocol/TBinaryProtocol.h diff --git a/lib/cpp/src/protocol/TBinaryProtocol.tcc b/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc similarity index 100% rename from lib/cpp/src/protocol/TBinaryProtocol.tcc rename to lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc diff --git a/lib/cpp/src/protocol/TCompactProtocol.h b/lib/cpp/src/thrift/protocol/TCompactProtocol.h similarity index 100% rename from lib/cpp/src/protocol/TCompactProtocol.h rename to lib/cpp/src/thrift/protocol/TCompactProtocol.h diff --git a/lib/cpp/src/protocol/TCompactProtocol.tcc b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc similarity index 100% rename from lib/cpp/src/protocol/TCompactProtocol.tcc rename to lib/cpp/src/thrift/protocol/TCompactProtocol.tcc diff --git a/lib/cpp/src/protocol/TDebugProtocol.cpp b/lib/cpp/src/thrift/protocol/TDebugProtocol.cpp similarity index 100% rename from lib/cpp/src/protocol/TDebugProtocol.cpp rename to lib/cpp/src/thrift/protocol/TDebugProtocol.cpp diff --git a/lib/cpp/src/protocol/TDebugProtocol.h b/lib/cpp/src/thrift/protocol/TDebugProtocol.h similarity index 99% rename from lib/cpp/src/protocol/TDebugProtocol.h rename to lib/cpp/src/thrift/protocol/TDebugProtocol.h index 3f7877c0..f64928ea 100644 --- a/lib/cpp/src/protocol/TDebugProtocol.h +++ b/lib/cpp/src/thrift/protocol/TDebugProtocol.h @@ -171,7 +171,7 @@ class TDebugProtocolFactory : public TProtocolFactory { // TODO(dreiss): Move (part of) ThriftDebugString into a .cpp file and remove this. -#include +#include namespace apache { namespace thrift { diff --git a/lib/cpp/src/protocol/TDenseProtocol.cpp b/lib/cpp/src/thrift/protocol/TDenseProtocol.cpp similarity index 100% rename from lib/cpp/src/protocol/TDenseProtocol.cpp rename to lib/cpp/src/thrift/protocol/TDenseProtocol.cpp diff --git a/lib/cpp/src/protocol/TDenseProtocol.h b/lib/cpp/src/thrift/protocol/TDenseProtocol.h similarity index 100% rename from lib/cpp/src/protocol/TDenseProtocol.h rename to lib/cpp/src/thrift/protocol/TDenseProtocol.h diff --git a/lib/cpp/src/protocol/TJSONProtocol.cpp b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp similarity index 99% rename from lib/cpp/src/protocol/TJSONProtocol.cpp rename to lib/cpp/src/thrift/protocol/TJSONProtocol.cpp index d038df4a..6f1612e8 100644 --- a/lib/cpp/src/protocol/TJSONProtocol.cpp +++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp @@ -22,7 +22,7 @@ #include #include #include "TBase64Utils.h" -#include +#include using namespace apache::thrift::transport; diff --git a/lib/cpp/src/protocol/TJSONProtocol.h b/lib/cpp/src/thrift/protocol/TJSONProtocol.h similarity index 99% rename from lib/cpp/src/protocol/TJSONProtocol.h rename to lib/cpp/src/thrift/protocol/TJSONProtocol.h index 799c3616..0a6f09c6 100644 --- a/lib/cpp/src/protocol/TJSONProtocol.h +++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.h @@ -314,7 +314,7 @@ class TJSONProtocolFactory : public TProtocolFactory { // TODO(dreiss): Move part of ThriftJSONString into a .cpp file and remove this. -#include +#include namespace apache { namespace thrift { diff --git a/lib/cpp/src/protocol/TProtocol.h b/lib/cpp/src/thrift/protocol/TProtocol.h similarity index 99% rename from lib/cpp/src/protocol/TProtocol.h rename to lib/cpp/src/thrift/protocol/TProtocol.h index dfd5eb58..f6802e6c 100644 --- a/lib/cpp/src/protocol/TProtocol.h +++ b/lib/cpp/src/thrift/protocol/TProtocol.h @@ -20,8 +20,8 @@ #ifndef _THRIFT_PROTOCOL_TPROTOCOL_H_ #define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1 -#include -#include +#include +#include #include #include diff --git a/lib/cpp/src/protocol/TProtocolException.h b/lib/cpp/src/thrift/protocol/TProtocolException.h similarity index 100% rename from lib/cpp/src/protocol/TProtocolException.h rename to lib/cpp/src/thrift/protocol/TProtocolException.h diff --git a/lib/cpp/src/protocol/TProtocolTap.h b/lib/cpp/src/thrift/protocol/TProtocolTap.h similarity index 99% rename from lib/cpp/src/protocol/TProtocolTap.h rename to lib/cpp/src/thrift/protocol/TProtocolTap.h index 3772bff5..f493f888 100644 --- a/lib/cpp/src/protocol/TProtocolTap.h +++ b/lib/cpp/src/thrift/protocol/TProtocolTap.h @@ -20,7 +20,7 @@ #ifndef _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ #define _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ 1 -#include +#include namespace apache { namespace thrift { namespace protocol { diff --git a/lib/cpp/src/protocol/TVirtualProtocol.h b/lib/cpp/src/thrift/protocol/TVirtualProtocol.h similarity index 99% rename from lib/cpp/src/protocol/TVirtualProtocol.h rename to lib/cpp/src/thrift/protocol/TVirtualProtocol.h index 6c7f5197..e0687254 100644 --- a/lib/cpp/src/protocol/TVirtualProtocol.h +++ b/lib/cpp/src/thrift/protocol/TVirtualProtocol.h @@ -20,7 +20,7 @@ #ifndef _THRIFT_PROTOCOL_TVIRTUALPROTOCOL_H_ #define _THRIFT_PROTOCOL_TVIRTUALPROTOCOL_H_ 1 -#include +#include namespace apache { namespace thrift { namespace protocol { diff --git a/lib/cpp/src/qt/TQIODeviceTransport.cpp b/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp similarity index 98% rename from lib/cpp/src/qt/TQIODeviceTransport.cpp rename to lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp index c03894ee..9344e40a 100644 --- a/lib/cpp/src/qt/TQIODeviceTransport.cpp +++ b/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp @@ -19,10 +19,10 @@ #include "TQIODeviceTransport.h" -#include +#include #include -#include +#include using boost::shared_ptr; diff --git a/lib/cpp/src/qt/TQIODeviceTransport.h b/lib/cpp/src/thrift/qt/TQIODeviceTransport.h similarity index 97% rename from lib/cpp/src/qt/TQIODeviceTransport.h rename to lib/cpp/src/thrift/qt/TQIODeviceTransport.h index 3d152f47..64faa12d 100644 --- a/lib/cpp/src/qt/TQIODeviceTransport.h +++ b/lib/cpp/src/thrift/qt/TQIODeviceTransport.h @@ -22,7 +22,7 @@ #include -#include +#include class QIODevice; diff --git a/lib/cpp/src/qt/TQTcpServer.cpp b/lib/cpp/src/thrift/qt/TQTcpServer.cpp similarity index 98% rename from lib/cpp/src/qt/TQTcpServer.cpp rename to lib/cpp/src/thrift/qt/TQTcpServer.cpp index f08ec3d8..2af8fa31 100644 --- a/lib/cpp/src/qt/TQTcpServer.cpp +++ b/lib/cpp/src/thrift/qt/TQTcpServer.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include using boost::shared_ptr; using apache::thrift::protocol::TProtocol; diff --git a/lib/cpp/src/qt/TQTcpServer.h b/lib/cpp/src/thrift/qt/TQTcpServer.h similarity index 100% rename from lib/cpp/src/qt/TQTcpServer.h rename to lib/cpp/src/thrift/qt/TQTcpServer.h diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/thrift/server/TNonblockingServer.cpp similarity index 99% rename from lib/cpp/src/server/TNonblockingServer.cpp rename to lib/cpp/src/thrift/server/TNonblockingServer.cpp index bd76cfcf..3e95508e 100644 --- a/lib/cpp/src/server/TNonblockingServer.cpp +++ b/lib/cpp/src/thrift/server/TNonblockingServer.cpp @@ -24,9 +24,9 @@ #endif #include "TNonblockingServer.h" -#include -#include -#include +#include +#include +#include #include diff --git a/lib/cpp/src/server/TNonblockingServer.h b/lib/cpp/src/thrift/server/TNonblockingServer.h similarity index 98% rename from lib/cpp/src/server/TNonblockingServer.h rename to lib/cpp/src/thrift/server/TNonblockingServer.h index 6b854b50..e995424d 100644 --- a/lib/cpp/src/server/TNonblockingServer.h +++ b/lib/cpp/src/thrift/server/TNonblockingServer.h @@ -20,15 +20,15 @@ #ifndef _THRIFT_SERVER_TNONBLOCKINGSERVER_H_ #define _THRIFT_SERVER_TNONBLOCKINGSERVER_H_ 1 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/lib/cpp/src/server/TServer.cpp b/lib/cpp/src/thrift/server/TServer.cpp similarity index 100% rename from lib/cpp/src/server/TServer.cpp rename to lib/cpp/src/thrift/server/TServer.cpp diff --git a/lib/cpp/src/server/TServer.h b/lib/cpp/src/thrift/server/TServer.h similarity index 98% rename from lib/cpp/src/server/TServer.h rename to lib/cpp/src/thrift/server/TServer.h index 42bfc9d7..f172ad14 100644 --- a/lib/cpp/src/server/TServer.h +++ b/lib/cpp/src/thrift/server/TServer.h @@ -20,10 +20,10 @@ #ifndef _THRIFT_SERVER_TSERVER_H_ #define _THRIFT_SERVER_TSERVER_H_ 1 -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/lib/cpp/src/server/TSimpleServer.cpp b/lib/cpp/src/thrift/server/TSimpleServer.cpp similarity index 98% rename from lib/cpp/src/server/TSimpleServer.cpp rename to lib/cpp/src/thrift/server/TSimpleServer.cpp index 344945b4..b132a66a 100644 --- a/lib/cpp/src/server/TSimpleServer.cpp +++ b/lib/cpp/src/thrift/server/TSimpleServer.cpp @@ -17,8 +17,8 @@ * under the License. */ -#include "server/TSimpleServer.h" -#include "transport/TTransportException.h" +#include +#include #include #include diff --git a/lib/cpp/src/server/TSimpleServer.h b/lib/cpp/src/thrift/server/TSimpleServer.h similarity index 97% rename from lib/cpp/src/server/TSimpleServer.h rename to lib/cpp/src/thrift/server/TSimpleServer.h index ea40ab09..f9e0e2b0 100644 --- a/lib/cpp/src/server/TSimpleServer.h +++ b/lib/cpp/src/thrift/server/TSimpleServer.h @@ -20,8 +20,8 @@ #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_ #define _THRIFT_SERVER_TSIMPLESERVER_H_ 1 -#include "server/TServer.h" -#include "transport/TServerTransport.h" +#include +#include namespace apache { namespace thrift { namespace server { diff --git a/lib/cpp/src/server/TThreadPoolServer.cpp b/lib/cpp/src/thrift/server/TThreadPoolServer.cpp similarity index 97% rename from lib/cpp/src/server/TThreadPoolServer.cpp rename to lib/cpp/src/thrift/server/TThreadPoolServer.cpp index fe58ff3e..db639511 100644 --- a/lib/cpp/src/server/TThreadPoolServer.cpp +++ b/lib/cpp/src/thrift/server/TThreadPoolServer.cpp @@ -21,10 +21,10 @@ #include #endif -#include "server/TThreadPoolServer.h" -#include "transport/TTransportException.h" -#include "concurrency/Thread.h" -#include "concurrency/ThreadManager.h" +#include +#include +#include +#include #include #include diff --git a/lib/cpp/src/server/TThreadPoolServer.h b/lib/cpp/src/thrift/server/TThreadPoolServer.h similarity index 97% rename from lib/cpp/src/server/TThreadPoolServer.h rename to lib/cpp/src/thrift/server/TThreadPoolServer.h index b860ae25..48a11cb6 100644 --- a/lib/cpp/src/server/TThreadPoolServer.h +++ b/lib/cpp/src/thrift/server/TThreadPoolServer.h @@ -20,9 +20,9 @@ #ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_ #define _THRIFT_SERVER_TTHREADPOOLSERVER_H_ 1 -#include -#include -#include +#include +#include +#include #include diff --git a/lib/cpp/src/server/TThreadedServer.cpp b/lib/cpp/src/thrift/server/TThreadedServer.cpp similarity index 98% rename from lib/cpp/src/server/TThreadedServer.cpp rename to lib/cpp/src/thrift/server/TThreadedServer.cpp index e99a9093..6ed8fd88 100644 --- a/lib/cpp/src/server/TThreadedServer.cpp +++ b/lib/cpp/src/thrift/server/TThreadedServer.cpp @@ -17,9 +17,9 @@ * under the License. */ -#include "server/TThreadedServer.h" -#include "transport/TTransportException.h" -#include +#include +#include +#include #include #include diff --git a/lib/cpp/src/server/TThreadedServer.h b/lib/cpp/src/thrift/server/TThreadedServer.h similarity index 97% rename from lib/cpp/src/server/TThreadedServer.h rename to lib/cpp/src/thrift/server/TThreadedServer.h index 2db3facf..42faaf0c 100644 --- a/lib/cpp/src/server/TThreadedServer.h +++ b/lib/cpp/src/thrift/server/TThreadedServer.h @@ -20,10 +20,10 @@ #ifndef _THRIFT_SERVER_TTHREADEDSERVER_H_ #define _THRIFT_SERVER_TTHREADEDSERVER_H_ 1 -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/lib/cpp/src/transport/TBufferTransports.cpp b/lib/cpp/src/thrift/transport/TBufferTransports.cpp similarity index 99% rename from lib/cpp/src/transport/TBufferTransports.cpp rename to lib/cpp/src/thrift/transport/TBufferTransports.cpp index b8a7ec3c..a2cc0663 100644 --- a/lib/cpp/src/transport/TBufferTransports.cpp +++ b/lib/cpp/src/thrift/transport/TBufferTransports.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include using std::string; diff --git a/lib/cpp/src/transport/TBufferTransports.h b/lib/cpp/src/thrift/transport/TBufferTransports.h similarity index 99% rename from lib/cpp/src/transport/TBufferTransports.h rename to lib/cpp/src/thrift/transport/TBufferTransports.h index 5f8257e4..b5570f59 100644 --- a/lib/cpp/src/transport/TBufferTransports.h +++ b/lib/cpp/src/thrift/transport/TBufferTransports.h @@ -23,8 +23,8 @@ #include #include "boost/scoped_array.hpp" -#include -#include +#include +#include #ifdef __GNUC__ #define TDB_LIKELY(val) (__builtin_expect((val), 1)) diff --git a/lib/cpp/src/transport/TFDTransport.cpp b/lib/cpp/src/thrift/transport/TFDTransport.cpp similarity index 98% rename from lib/cpp/src/transport/TFDTransport.cpp rename to lib/cpp/src/thrift/transport/TFDTransport.cpp index a47e2a45..fb9cc57d 100644 --- a/lib/cpp/src/transport/TFDTransport.cpp +++ b/lib/cpp/src/thrift/transport/TFDTransport.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #ifdef HAVE_UNISTD_H #include diff --git a/lib/cpp/src/transport/TFDTransport.h b/lib/cpp/src/thrift/transport/TFDTransport.h similarity index 100% rename from lib/cpp/src/transport/TFDTransport.h rename to lib/cpp/src/thrift/transport/TFDTransport.h diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/thrift/transport/TFileTransport.cpp similarity index 100% rename from lib/cpp/src/transport/TFileTransport.cpp rename to lib/cpp/src/thrift/transport/TFileTransport.cpp diff --git a/lib/cpp/src/transport/TFileTransport.h b/lib/cpp/src/thrift/transport/TFileTransport.h similarity index 98% rename from lib/cpp/src/transport/TFileTransport.h rename to lib/cpp/src/thrift/transport/TFileTransport.h index b0e48d1b..e27f5a6b 100644 --- a/lib/cpp/src/transport/TFileTransport.h +++ b/lib/cpp/src/thrift/transport/TFileTransport.h @@ -20,9 +20,9 @@ #ifndef _THRIFT_TRANSPORT_TFILETRANSPORT_H_ #define _THRIFT_TRANSPORT_TFILETRANSPORT_H_ 1 -#include "TTransport.h" -#include "Thrift.h" -#include "TProcessor.h" +#include +#include +#include #include #include @@ -38,8 +38,8 @@ #include #include -#include "concurrency/Mutex.h" -#include "concurrency/Monitor.h" +#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/THttpClient.cpp b/lib/cpp/src/thrift/transport/THttpClient.cpp similarity index 97% rename from lib/cpp/src/transport/THttpClient.cpp rename to lib/cpp/src/thrift/transport/THttpClient.cpp index 04864cef..adfc9593 100644 --- a/lib/cpp/src/transport/THttpClient.cpp +++ b/lib/cpp/src/thrift/transport/THttpClient.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/THttpClient.h b/lib/cpp/src/thrift/transport/THttpClient.h similarity index 96% rename from lib/cpp/src/transport/THttpClient.h rename to lib/cpp/src/thrift/transport/THttpClient.h index 142063d0..0898b11d 100644 --- a/lib/cpp/src/transport/THttpClient.h +++ b/lib/cpp/src/thrift/transport/THttpClient.h @@ -20,7 +20,7 @@ #ifndef _THRIFT_TRANSPORT_THTTPCLIENT_H_ #define _THRIFT_TRANSPORT_THTTPCLIENT_H_ 1 -#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/THttpServer.cpp b/lib/cpp/src/thrift/transport/THttpServer.cpp similarity index 97% rename from lib/cpp/src/transport/THttpServer.cpp rename to lib/cpp/src/thrift/transport/THttpServer.cpp index 166c0f67..b10e6da3 100644 --- a/lib/cpp/src/transport/THttpServer.cpp +++ b/lib/cpp/src/thrift/transport/THttpServer.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/THttpServer.h b/lib/cpp/src/thrift/transport/THttpServer.h similarity index 97% rename from lib/cpp/src/transport/THttpServer.h rename to lib/cpp/src/thrift/transport/THttpServer.h index 65234084..bf69dbeb 100644 --- a/lib/cpp/src/transport/THttpServer.h +++ b/lib/cpp/src/thrift/transport/THttpServer.h @@ -20,7 +20,7 @@ #ifndef _THRIFT_TRANSPORT_THTTPSERVER_H_ #define _THRIFT_TRANSPORT_THTTPSERVER_H_ 1 -#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/THttpTransport.cpp b/lib/cpp/src/thrift/transport/THttpTransport.cpp similarity index 99% rename from lib/cpp/src/transport/THttpTransport.cpp rename to lib/cpp/src/thrift/transport/THttpTransport.cpp index 95fe207a..3bda20e7 100644 --- a/lib/cpp/src/transport/THttpTransport.cpp +++ b/lib/cpp/src/thrift/transport/THttpTransport.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/THttpTransport.h b/lib/cpp/src/thrift/transport/THttpTransport.h similarity index 98% rename from lib/cpp/src/transport/THttpTransport.h rename to lib/cpp/src/thrift/transport/THttpTransport.h index 977c65fb..9997c93f 100644 --- a/lib/cpp/src/transport/THttpTransport.h +++ b/lib/cpp/src/thrift/transport/THttpTransport.h @@ -20,7 +20,7 @@ #ifndef _THRIFT_TRANSPORT_THTTPTRANSPORT_H_ #define _THRIFT_TRANSPORT_THTTPTRANSPORT_H_ 1 -#include +#include #include "TVirtualTransport.h" namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/TSSLServerSocket.cpp b/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp similarity index 100% rename from lib/cpp/src/transport/TSSLServerSocket.cpp rename to lib/cpp/src/thrift/transport/TSSLServerSocket.cpp diff --git a/lib/cpp/src/transport/TSSLServerSocket.h b/lib/cpp/src/thrift/transport/TSSLServerSocket.h similarity index 100% rename from lib/cpp/src/transport/TSSLServerSocket.h rename to lib/cpp/src/thrift/transport/TSSLServerSocket.h diff --git a/lib/cpp/src/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp similarity index 99% rename from lib/cpp/src/transport/TSSLSocket.cpp rename to lib/cpp/src/thrift/transport/TSSLSocket.cpp index 522d293f..14c13dc7 100755 --- a/lib/cpp/src/transport/TSSLSocket.cpp +++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp @@ -35,7 +35,7 @@ #include #include #include -#include "concurrency/Mutex.h" +#include #include "TSSLSocket.h" #define OPENSSL_VERSION_NO_THREAD_ID 0x10000000L diff --git a/lib/cpp/src/transport/TSSLSocket.h b/lib/cpp/src/thrift/transport/TSSLSocket.h similarity index 99% rename from lib/cpp/src/transport/TSSLSocket.h rename to lib/cpp/src/thrift/transport/TSSLSocket.h index a0a15029..d77c2f56 100755 --- a/lib/cpp/src/transport/TSSLSocket.h +++ b/lib/cpp/src/thrift/transport/TSSLSocket.h @@ -23,7 +23,7 @@ #include #include #include -#include "concurrency/Mutex.h" +#include #include "TSocket.h" namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/TServerSocket.cpp b/lib/cpp/src/thrift/transport/TServerSocket.cpp similarity index 100% rename from lib/cpp/src/transport/TServerSocket.cpp rename to lib/cpp/src/thrift/transport/TServerSocket.cpp diff --git a/lib/cpp/src/transport/TServerSocket.h b/lib/cpp/src/thrift/transport/TServerSocket.h similarity index 100% rename from lib/cpp/src/transport/TServerSocket.h rename to lib/cpp/src/thrift/transport/TServerSocket.h diff --git a/lib/cpp/src/transport/TServerTransport.h b/lib/cpp/src/thrift/transport/TServerTransport.h similarity index 100% rename from lib/cpp/src/transport/TServerTransport.h rename to lib/cpp/src/thrift/transport/TServerTransport.h diff --git a/lib/cpp/src/transport/TShortReadTransport.h b/lib/cpp/src/thrift/transport/TShortReadTransport.h similarity index 95% rename from lib/cpp/src/transport/TShortReadTransport.h rename to lib/cpp/src/thrift/transport/TShortReadTransport.h index 0d0eb861..b5cdc7dc 100644 --- a/lib/cpp/src/transport/TShortReadTransport.h +++ b/lib/cpp/src/thrift/transport/TShortReadTransport.h @@ -20,10 +20,10 @@ #ifndef _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_ #define _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_ 1 -#include +#include -#include -#include +#include +#include namespace apache { namespace thrift { namespace transport { namespace test { diff --git a/lib/cpp/src/transport/TSimpleFileTransport.cpp b/lib/cpp/src/thrift/transport/TSimpleFileTransport.cpp similarity index 100% rename from lib/cpp/src/transport/TSimpleFileTransport.cpp rename to lib/cpp/src/thrift/transport/TSimpleFileTransport.cpp diff --git a/lib/cpp/src/transport/TSimpleFileTransport.h b/lib/cpp/src/thrift/transport/TSimpleFileTransport.h similarity index 100% rename from lib/cpp/src/transport/TSimpleFileTransport.h rename to lib/cpp/src/thrift/transport/TSimpleFileTransport.h diff --git a/lib/cpp/src/transport/TSocket.cpp b/lib/cpp/src/thrift/transport/TSocket.cpp similarity index 99% rename from lib/cpp/src/transport/TSocket.cpp rename to lib/cpp/src/thrift/transport/TSocket.cpp index a0cc77a3..3c235d2c 100644 --- a/lib/cpp/src/transport/TSocket.cpp +++ b/lib/cpp/src/thrift/transport/TSocket.cpp @@ -45,7 +45,7 @@ #include #include -#include "concurrency/Monitor.h" +#include #include "TSocket.h" #include "TTransportException.h" diff --git a/lib/cpp/src/transport/TSocket.h b/lib/cpp/src/thrift/transport/TSocket.h similarity index 100% rename from lib/cpp/src/transport/TSocket.h rename to lib/cpp/src/thrift/transport/TSocket.h diff --git a/lib/cpp/src/transport/TSocketPool.cpp b/lib/cpp/src/thrift/transport/TSocketPool.cpp similarity index 100% rename from lib/cpp/src/transport/TSocketPool.cpp rename to lib/cpp/src/thrift/transport/TSocketPool.cpp diff --git a/lib/cpp/src/transport/TSocketPool.h b/lib/cpp/src/thrift/transport/TSocketPool.h similarity index 100% rename from lib/cpp/src/transport/TSocketPool.h rename to lib/cpp/src/thrift/transport/TSocketPool.h diff --git a/lib/cpp/src/transport/TTransport.h b/lib/cpp/src/thrift/transport/TTransport.h similarity index 99% rename from lib/cpp/src/transport/TTransport.h rename to lib/cpp/src/thrift/transport/TTransport.h index fa0ed8a6..3b552c4f 100644 --- a/lib/cpp/src/transport/TTransport.h +++ b/lib/cpp/src/thrift/transport/TTransport.h @@ -20,9 +20,9 @@ #ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_ #define _THRIFT_TRANSPORT_TTRANSPORT_H_ 1 -#include +#include #include -#include +#include #include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/TTransportException.cpp b/lib/cpp/src/thrift/transport/TTransportException.cpp similarity index 95% rename from lib/cpp/src/transport/TTransportException.cpp rename to lib/cpp/src/thrift/transport/TTransportException.cpp index f0aaedc2..e24198ae 100644 --- a/lib/cpp/src/transport/TTransportException.cpp +++ b/lib/cpp/src/thrift/transport/TTransportException.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include #include #include #include diff --git a/lib/cpp/src/transport/TTransportException.h b/lib/cpp/src/thrift/transport/TTransportException.h similarity index 99% rename from lib/cpp/src/transport/TTransportException.h rename to lib/cpp/src/thrift/transport/TTransportException.h index e0630ef5..028dbb87 100644 --- a/lib/cpp/src/transport/TTransportException.h +++ b/lib/cpp/src/thrift/transport/TTransportException.h @@ -21,7 +21,7 @@ #define _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ 1 #include -#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/TTransportUtils.cpp b/lib/cpp/src/thrift/transport/TTransportUtils.cpp similarity index 98% rename from lib/cpp/src/transport/TTransportUtils.cpp rename to lib/cpp/src/thrift/transport/TTransportUtils.cpp index 72289bca..44f61010 100644 --- a/lib/cpp/src/transport/TTransportUtils.cpp +++ b/lib/cpp/src/thrift/transport/TTransportUtils.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include using std::string; diff --git a/lib/cpp/src/transport/TTransportUtils.h b/lib/cpp/src/thrift/transport/TTransportUtils.h similarity index 98% rename from lib/cpp/src/transport/TTransportUtils.h rename to lib/cpp/src/thrift/transport/TTransportUtils.h index d7cdaad6..aa294b49 100644 --- a/lib/cpp/src/transport/TTransportUtils.h +++ b/lib/cpp/src/thrift/transport/TTransportUtils.h @@ -24,10 +24,10 @@ #include #include #include -#include +#include // Include the buffered transports that used to be defined here. -#include -#include +#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/TVirtualTransport.h b/lib/cpp/src/thrift/transport/TVirtualTransport.h similarity index 99% rename from lib/cpp/src/transport/TVirtualTransport.h rename to lib/cpp/src/thrift/transport/TVirtualTransport.h index 17606819..575f5473 100644 --- a/lib/cpp/src/transport/TVirtualTransport.h +++ b/lib/cpp/src/thrift/transport/TVirtualTransport.h @@ -20,7 +20,7 @@ #ifndef _THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_ #define _THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_ 1 -#include +#include namespace apache { namespace thrift { namespace transport { diff --git a/lib/cpp/src/transport/TZlibTransport.cpp b/lib/cpp/src/thrift/transport/TZlibTransport.cpp similarity index 99% rename from lib/cpp/src/transport/TZlibTransport.cpp rename to lib/cpp/src/thrift/transport/TZlibTransport.cpp index be65288e..fc407cb2 100644 --- a/lib/cpp/src/transport/TZlibTransport.cpp +++ b/lib/cpp/src/thrift/transport/TZlibTransport.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include using std::string; diff --git a/lib/cpp/src/transport/TZlibTransport.h b/lib/cpp/src/thrift/transport/TZlibTransport.h similarity index 98% rename from lib/cpp/src/transport/TZlibTransport.h rename to lib/cpp/src/thrift/transport/TZlibTransport.h index db765237..b3656415 100644 --- a/lib/cpp/src/transport/TZlibTransport.h +++ b/lib/cpp/src/thrift/transport/TZlibTransport.h @@ -21,8 +21,8 @@ #define _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_ 1 #include -#include -#include +#include +#include struct z_stream_s; diff --git a/lib/cpp/src/windows/GetTimeOfDay.cpp b/lib/cpp/src/thrift/windows/GetTimeOfDay.cpp similarity index 100% rename from lib/cpp/src/windows/GetTimeOfDay.cpp rename to lib/cpp/src/thrift/windows/GetTimeOfDay.cpp diff --git a/lib/cpp/src/windows/GetTimeOfDay.h b/lib/cpp/src/thrift/windows/GetTimeOfDay.h similarity index 100% rename from lib/cpp/src/windows/GetTimeOfDay.h rename to lib/cpp/src/thrift/windows/GetTimeOfDay.h diff --git a/lib/cpp/src/windows/Operators.h b/lib/cpp/src/thrift/windows/Operators.h similarity index 100% rename from lib/cpp/src/windows/Operators.h rename to lib/cpp/src/thrift/windows/Operators.h diff --git a/lib/cpp/src/windows/SocketPair.cpp b/lib/cpp/src/thrift/windows/SocketPair.cpp similarity index 100% rename from lib/cpp/src/windows/SocketPair.cpp rename to lib/cpp/src/thrift/windows/SocketPair.cpp diff --git a/lib/cpp/src/windows/SocketPair.h b/lib/cpp/src/thrift/windows/SocketPair.h similarity index 100% rename from lib/cpp/src/windows/SocketPair.h rename to lib/cpp/src/thrift/windows/SocketPair.h diff --git a/lib/cpp/src/windows/StdAfx.cpp b/lib/cpp/src/thrift/windows/StdAfx.cpp similarity index 100% rename from lib/cpp/src/windows/StdAfx.cpp rename to lib/cpp/src/thrift/windows/StdAfx.cpp diff --git a/lib/cpp/src/windows/StdAfx.h b/lib/cpp/src/thrift/windows/StdAfx.h similarity index 100% rename from lib/cpp/src/windows/StdAfx.h rename to lib/cpp/src/thrift/windows/StdAfx.h diff --git a/lib/cpp/src/windows/TWinsockSingleton.cpp b/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp similarity index 100% rename from lib/cpp/src/windows/TWinsockSingleton.cpp rename to lib/cpp/src/thrift/windows/TWinsockSingleton.cpp diff --git a/lib/cpp/src/windows/TWinsockSingleton.h b/lib/cpp/src/thrift/windows/TWinsockSingleton.h similarity index 100% rename from lib/cpp/src/windows/TWinsockSingleton.h rename to lib/cpp/src/thrift/windows/TWinsockSingleton.h diff --git a/lib/cpp/src/windows/TargetVersion.h b/lib/cpp/src/thrift/windows/TargetVersion.h similarity index 100% rename from lib/cpp/src/windows/TargetVersion.h rename to lib/cpp/src/thrift/windows/TargetVersion.h diff --git a/lib/cpp/src/windows/WinFcntl.cpp b/lib/cpp/src/thrift/windows/WinFcntl.cpp similarity index 100% rename from lib/cpp/src/windows/WinFcntl.cpp rename to lib/cpp/src/thrift/windows/WinFcntl.cpp diff --git a/lib/cpp/src/windows/WinFcntl.h b/lib/cpp/src/thrift/windows/WinFcntl.h similarity index 100% rename from lib/cpp/src/windows/WinFcntl.h rename to lib/cpp/src/thrift/windows/WinFcntl.h diff --git a/lib/cpp/src/windows/config.h b/lib/cpp/src/thrift/windows/config.h similarity index 100% rename from lib/cpp/src/windows/config.h rename to lib/cpp/src/thrift/windows/config.h diff --git a/lib/cpp/src/windows/force_inc.h b/lib/cpp/src/thrift/windows/force_inc.h similarity index 98% rename from lib/cpp/src/windows/force_inc.h rename to lib/cpp/src/thrift/windows/force_inc.h index 803d1322..f9af3122 100644 --- a/lib/cpp/src/windows/force_inc.h +++ b/lib/cpp/src/thrift/windows/force_inc.h @@ -42,7 +42,7 @@ # define _WIN32_WINNT 0x0601 #endif -#include "windows/config.h" +#include #undef gai_strerror #define gai_strerror gai_strerrorA diff --git a/lib/cpp/src/windows/tr1/functional b/lib/cpp/src/thrift/windows/tr1/functional similarity index 100% rename from lib/cpp/src/windows/tr1/functional rename to lib/cpp/src/thrift/windows/tr1/functional diff --git a/lib/cpp/src/transport/TPipe.cpp b/lib/cpp/src/transport/TPipe.cpp deleted file mode 100644 index 2c7cf56d..00000000 --- a/lib/cpp/src/transport/TPipe.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ - -#ifdef _WIN32 - -#include "TTransportException.h" -#include "TPipe.h" - -namespace apache { namespace thrift { namespace transport { - -using namespace std; - -/** -* TPipe implementation. -*/ - -//---- Constructors ---- -TPipe::TPipe(HANDLE hpipe) : - pipename_(""), - hPipe_(hpipe), - TimeoutSeconds_(3), - isAnonymous(false) -{} - -TPipe::TPipe(string pipename) : - pipename_(pipename), - hPipe_(INVALID_HANDLE_VALUE), - TimeoutSeconds_(3), - isAnonymous(false) -{} - -TPipe::TPipe(HANDLE hPipeRd, HANDLE hPipeWrt) : - pipename_(""), - hPipe_(hPipeRd), - hPipeWrt_(hPipeWrt), - TimeoutSeconds_(3), - isAnonymous(true) -{} - - TPipe::TPipe() : - pipename_(""), - hPipe_(INVALID_HANDLE_VALUE), - TimeoutSeconds_(3) -{} - -//---- Destructor ---- -TPipe::~TPipe() { - close(); -} - - -bool TPipe::isOpen() { - return (hPipe_ != INVALID_HANDLE_VALUE); -} - -//--------------------------------------------------------- -// Transport callbacks -//--------------------------------------------------------- - -bool TPipe::peek() { - if (!isOpen()) { - return false; - } - DWORD bytesavail = 0; - int PeekRet = 0; - PeekRet = PeekNamedPipe(hPipe_, NULL, 0, NULL, &bytesavail, NULL); - return (PeekRet != 0 && bytesavail > 0); -} - -void TPipe::open() { - if (isOpen()) { - return; - } - - int SleepInterval = 500; //ms - int retries = TimeoutSeconds_ * 1000 / SleepInterval; - for(int i=0; i { - public: - - // Constructs a new pipe object. - TPipe(); - // Named pipe constructors - - TPipe(HANDLE hPipe); - TPipe(std::string path); - // Anonymous pipe - - TPipe(HANDLE hPipeRd, HANDLE hPipeWrt); - - // Destroys the pipe object, closing it if necessary. - virtual ~TPipe(); - - // Returns whether the pipe is open & valid. - virtual bool isOpen(); - - // Checks whether more data is available in the pipe. - virtual bool peek(); - - // Creates and opens the named/anonymous pipe. - virtual void open(); - - // Shuts down communications on the pipe. - virtual void close(); - - // Reads from the pipe. - virtual uint32_t read(uint8_t* buf, uint32_t len); - - // Writes to the pipe. - virtual void write(const uint8_t* buf, uint32_t len); - - - //Accessors - std::string getPipename(); - void setPipename(std::string pipename); - HANDLE getPipeHandle(); //doubles as the read handle for anon pipe - void setPipeHandle(HANDLE pipehandle); - HANDLE getWrtPipeHandle(); - void setWrtPipeHandle(HANDLE pipehandle); - long getConnectTimeout(); - void setConnectTimeout(long seconds); - - private: - std::string pipename_; - //Named pipe handles are R/W, while anonymous pipes are one or the other (half duplex). - HANDLE hPipe_, hPipeWrt_; - long TimeoutSeconds_; - bool isAnonymous; - -}; - -}}} // apache::thrift::transport - -#endif //_WIN32 -#endif // #ifndef _THRIFT_TRANSPORT_TPIPE_H_ - diff --git a/lib/cpp/src/transport/TPipeServer.cpp b/lib/cpp/src/transport/TPipeServer.cpp deleted file mode 100644 index 6f2f73db..00000000 --- a/lib/cpp/src/transport/TPipeServer.cpp +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef _WIN32 - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -#include "TPipe.h" -#include "TPipeServer.h" -#include -#include -#include - -namespace apache { namespace thrift { namespace transport { - -using namespace std; -using boost::shared_ptr; - -//---- Constructors ---- -TPipeServer::TPipeServer(string pipename, uint32_t bufsize) : - pipename_(pipename), - bufsize_(bufsize), - hPipe_(INVALID_HANDLE_VALUE), - isAnonymous(false), - maxconns_(TPIPE_SERVER_MAX_CONNS_DEFAULT) - {} - -TPipeServer::TPipeServer(string pipename, uint32_t bufsize, uint32_t maxconnections) : - pipename_(pipename), - bufsize_(bufsize), - hPipe_(INVALID_HANDLE_VALUE), - isAnonymous(false) - { //Restrict maxconns_ to 1-255 - if(maxconnections == 0) - maxconns_ = 1; - else if (maxconnections > 255) - maxconns_ = 255; - else - maxconns_ = maxconnections; - } - -TPipeServer::TPipeServer(string pipename) : - pipename_(pipename), - bufsize_(1024), - hPipe_(INVALID_HANDLE_VALUE), - isAnonymous(false), - maxconns_(TPIPE_SERVER_MAX_CONNS_DEFAULT) - {} - -TPipeServer::TPipeServer(int bufsize) : - pipename_(""), - bufsize_(bufsize), - hPipe_(INVALID_HANDLE_VALUE), - isAnonymous(true), - maxconns_(1) - { - //The anonymous pipe needs to be created first so that the server can - //pass the handles on to the client before the serve (acceptImpl) - //blocking call. - if (!TCreateAnonPipe()) { - GlobalOutput.perror("TPipeServer Create(Anon)Pipe failed, GLE=", GetLastError()); - throw TTransportException(TTransportException::NOT_OPEN, " TPipeServer Create(Anon)Pipe failed"); - } -} - -TPipeServer::TPipeServer() : - pipename_(""), - bufsize_(1024), - hPipe_(INVALID_HANDLE_VALUE), - isAnonymous(true), - maxconns_(1) -{ - if (!TCreateAnonPipe()) { - GlobalOutput.perror("TPipeServer Create(Anon)Pipe failed, GLE=", GetLastError()); - throw TTransportException(TTransportException::NOT_OPEN, " TPipeServer Create(Anon)Pipe failed"); - } -} - -//---- Destructor ---- -TPipeServer::~TPipeServer() { - close(); -} - -//--------------------------------------------------------- -// Transport callbacks -//--------------------------------------------------------- - -shared_ptr TPipeServer::acceptImpl() { - shared_ptr client; - - if(isAnonymous) - { //Anonymous Pipe - //This 0-byte read serves merely as a blocking call. - byte buf; - DWORD br; - int fSuccess = ReadFile( - hPipe_, // pipe handle - &buf, // buffer to receive reply - 0, // size of buffer - &br, // number of bytes read - NULL); // not overlapped - - if ( !fSuccess && GetLastError() != ERROR_MORE_DATA ) { - GlobalOutput.perror("TPipeServer unable to initiate pipe comms, GLE=", GetLastError()); - throw TTransportException(TTransportException::NOT_OPEN, " TPipeServer unable to initiate pipe comms"); - } - client.reset(new TPipe(hPipe_, hPipeW_)); - } - else - { //Named Pipe - int ConnectRet; - while (true) - { - if (!TCreateNamedPipe()) { - GlobalOutput.perror("TPipeServer CreateNamedPipe failed, GLE=", GetLastError()); - throw TTransportException(TTransportException::NOT_OPEN, " TPipeServer CreateNamedPipe failed"); - } - - // Wait for the client to connect; if it succeeds, the - // function returns a nonzero value. If the function returns - // zero, GetLastError should return ERROR_PIPE_CONNECTED. - ConnectRet = ConnectNamedPipe(hPipe_, NULL) ? - TRUE : (GetLastError() == ERROR_PIPE_CONNECTED); - - if (ConnectRet == TRUE) - { - GlobalOutput.printf("Client connected."); - break; - } - else - { - close(); - GlobalOutput.perror("TPipeServer ConnectNamedPipe GLE=", GetLastError()); - throw TTransportException(TTransportException::NOT_OPEN, "TPipeServer: client connection failed"); - } - } - client.reset(new TPipe(hPipe_)); - } - - return client; -} - -void TPipeServer::interrupt() { - if(hPipe_ != INVALID_HANDLE_VALUE) { - CancelIo(hPipe_); - } -} - -void TPipeServer::close() { - if(!isAnonymous) - { - if(hPipe_ != INVALID_HANDLE_VALUE) { - DisconnectNamedPipe(hPipe_); - CloseHandle(hPipe_); - hPipe_ = INVALID_HANDLE_VALUE; - } - } - else - { - try { - CloseHandle(hPipe_); - CloseHandle(hPipeW_); - CloseHandle(ClientAnonRead); - CloseHandle(ClientAnonWrite); - } - catch(...) { - GlobalOutput.perror("TPipeServer anon close GLE=", GetLastError()); - } - } -} - - -bool TPipeServer::TCreateNamedPipe() { - - //Windows - set security to allow non-elevated apps - //to access pipes created by elevated apps. - SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY; - PSID everyone_sid = NULL; - AllocateAndInitializeSid(&SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &everyone_sid); - - EXPLICIT_ACCESS ea; - ZeroMemory(&ea, sizeof(EXPLICIT_ACCESS)); - ea.grfAccessPermissions = SPECIFIC_RIGHTS_ALL | STANDARD_RIGHTS_ALL; - ea.grfAccessMode = SET_ACCESS; - ea.grfInheritance = NO_INHERITANCE; - ea.Trustee.TrusteeForm = TRUSTEE_IS_SID; - ea.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; - ea.Trustee.ptstrName = (LPSTR)everyone_sid; - - PACL acl = NULL; - SetEntriesInAcl(1, &ea, NULL, &acl); - - PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)LocalAlloc(LPTR,SECURITY_DESCRIPTOR_MIN_LENGTH); - InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); - SetSecurityDescriptorDacl(sd, TRUE, acl, FALSE); - - SECURITY_ATTRIBUTES sa; - sa.nLength = sizeof(SECURITY_ATTRIBUTES); - sa.lpSecurityDescriptor = sd; - sa.bInheritHandle = FALSE; - - // Create an instance of the named pipe - hPipe_ = CreateNamedPipe( - pipename_.c_str(), // pipe name - PIPE_ACCESS_DUPLEX, // read/write access - PIPE_TYPE_MESSAGE | // message type pipe - PIPE_READMODE_MESSAGE, // message-read mode - maxconns_, // max. instances - bufsize_, // output buffer size - bufsize_, // input buffer size - 0, // client time-out - &sa); // default security attribute - - return (hPipe_ != INVALID_HANDLE_VALUE); -} - -bool TPipeServer::TCreateAnonPipe() { - SECURITY_ATTRIBUTES sa; - SECURITY_DESCRIPTOR sd; //security information for pipes - - InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION); - SetSecurityDescriptorDacl(&sd, true, NULL, false); - sa.lpSecurityDescriptor = &sd; - sa.lpSecurityDescriptor = NULL; - sa.nLength = sizeof(SECURITY_ATTRIBUTES); - sa.bInheritHandle = true; //allow passing handle to child - - if (!CreatePipe(&ClientAnonRead,&hPipeW_,&sa,0)) //create stdin pipe - { - GlobalOutput.perror("TPipeServer CreatePipe (anon) failed, GLE=", GetLastError()); - return false; - } - if (!CreatePipe(&hPipe_,&ClientAnonWrite,&sa,0)) //create stdout pipe - { - GlobalOutput.perror("TPipeServer CreatePipe (anon) failed, GLE=", GetLastError()); - CloseHandle(ClientAnonRead); - CloseHandle(hPipeW_); - return false; - } - - return true; -} - - -//--------------------------------------------------------- -// Accessors -//--------------------------------------------------------- - -string TPipeServer::getPipename() { - return pipename_; -} - -void TPipeServer::setPipename(std::string pipename) { - pipename_ = pipename; -} - -int TPipeServer::getBufferSize() { - return bufsize_; -} - -void TPipeServer::setBufferSize(int bufsize) { - bufsize_ = bufsize; -} - -HANDLE TPipeServer::getPipeHandle() { - return hPipe_; -} - -HANDLE TPipeServer::getWrtPipeHandle() -{ - return hPipeW_; -} - -HANDLE TPipeServer::getClientRdPipeHandle() -{ - return ClientAnonRead; -} - -HANDLE TPipeServer::getClientWrtPipeHandle() -{ - return ClientAnonWrite; -} - -bool TPipeServer::getAnonymous() { - return isAnonymous; -} - -void TPipeServer::setAnonymous(bool anon) { - isAnonymous = anon; -} - -}}} // apache::thrift::transport - -#endif //_WIN32 diff --git a/lib/cpp/src/transport/TPipeServer.h b/lib/cpp/src/transport/TPipeServer.h deleted file mode 100644 index 1732546a..00000000 --- a/lib/cpp/src/transport/TPipeServer.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TSERVERWINPIPES_H_ -#define _THRIFT_TRANSPORT_TSERVERWINPIPES_H_ 1 -#ifdef _WIN32 - -#include "TServerTransport.h" -#include - -#define TPIPE_SERVER_MAX_CONNS_DEFAULT 10 - -namespace apache { namespace thrift { namespace transport { - -/** - * Windows Pipes implementation of TServerTransport. - */ -class TPipeServer : public TServerTransport { - public: - //Constructors - // Named Pipe - - TPipeServer(std::string pipename, uint32_t bufsize); - TPipeServer(std::string pipename, uint32_t bufsize, uint32_t maxconnections); - TPipeServer(std::string pipename); - // Anonymous pipe - - TPipeServer(int bufsize); - TPipeServer(); - - //Destructor - ~TPipeServer(); - - //Standard transport callbacks - //void listen(); //Unnecessary for Windows pipes - void interrupt(); - void close(); - protected: - boost::shared_ptr acceptImpl(); - - bool TCreateNamedPipe(); - bool TCreateAnonPipe(); - - public: - //Accessors - std::string getPipename(); - void setPipename(std::string pipename); - int getBufferSize(); - void setBufferSize(int bufsize); - HANDLE getPipeHandle(); //Named Pipe R/W -or- Anonymous pipe Read handle - HANDLE getWrtPipeHandle(); - HANDLE getClientRdPipeHandle(); - HANDLE getClientWrtPipeHandle(); - bool getAnonymous(); - void setAnonymous(bool anon); - - private: - std::string pipename_; - uint32_t bufsize_; - uint32_t maxconns_; - HANDLE hPipe_; //Named Pipe (R/W) or Anonymous Pipe (R) - HANDLE hPipeW_; //Anonymous Pipe (W) - HANDLE ClientAnonRead, ClientAnonWrite; //Client side anonymous pipe handles - //? Do we need duplicates to send to client? - bool isAnonymous; -}; - -}}} // apache::thrift::transport - -#endif //_WIN32 -#endif // #ifndef _THRIFT_TRANSPORT_TSERVERWINPIPES_H_ diff --git a/lib/cpp/test/AllProtocolTests.cpp b/lib/cpp/test/AllProtocolTests.cpp index 8fec7f54..65d1927d 100644 --- a/lib/cpp/test/AllProtocolTests.cpp +++ b/lib/cpp/test/AllProtocolTests.cpp @@ -19,9 +19,9 @@ #include -#include -#include -#include +#include +#include +#include #include "AllProtocolTests.tcc" using namespace apache::thrift; diff --git a/lib/cpp/test/AllProtocolTests.tcc b/lib/cpp/test/AllProtocolTests.tcc index a5a31156..82f87381 100644 --- a/lib/cpp/test/AllProtocolTests.tcc +++ b/lib/cpp/test/AllProtocolTests.tcc @@ -20,11 +20,11 @@ #ifndef _THRIFT_TEST_GENERICPROTOCOLTEST_TCC_ #define _THRIFT_TEST_GENERICPROTOCOLTEST_TCC_ 1 -#include +#include -#include -#include -#include +#include +#include +#include #include "GenericHelpers.h" diff --git a/lib/cpp/test/Benchmark.cpp b/lib/cpp/test/Benchmark.cpp index 413802d2..9ee25866 100755 --- a/lib/cpp/test/Benchmark.cpp +++ b/lib/cpp/test/Benchmark.cpp @@ -22,8 +22,8 @@ #endif #include #include -#include "transport/TBufferTransports.h" -#include "protocol/TBinaryProtocol.h" +#include "thrift/transport/TBufferTransports.h" +#include "thrift/protocol/TBinaryProtocol.h" #include "gen-cpp/DebugProtoTest_types.h" #include #ifdef HAVE_SYS_TIME_H diff --git a/lib/cpp/test/DebugProtoTest.cpp b/lib/cpp/test/DebugProtoTest.cpp index 4f456f31..26cc1ea6 100644 --- a/lib/cpp/test/DebugProtoTest.cpp +++ b/lib/cpp/test/DebugProtoTest.cpp @@ -20,7 +20,7 @@ #include #include #include "gen-cpp/DebugProtoTest_types.h" -#include +#include int main() { using std::cout; diff --git a/lib/cpp/test/DenseProtoTest.cpp b/lib/cpp/test/DenseProtoTest.cpp index 99f78655..f73579f0 100644 --- a/lib/cpp/test/DenseProtoTest.cpp +++ b/lib/cpp/test/DenseProtoTest.cpp @@ -39,8 +39,8 @@ g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \ #include #include "gen-cpp/DebugProtoTest_types.h" #include "gen-cpp/OptionalRequiredTest_types.h" -#include -#include +#include +#include // Can't use memcmp here. GCC is too smart. diff --git a/lib/cpp/test/GenericHelpers.h b/lib/cpp/test/GenericHelpers.h index d661d8ba..1853a371 100644 --- a/lib/cpp/test/GenericHelpers.h +++ b/lib/cpp/test/GenericHelpers.h @@ -20,9 +20,9 @@ #ifndef _THRIFT_TEST_GENERICHELPERS_H_ #define _THRIFT_TEST_GENERICHELPERS_H_ 1 -#include -#include -#include +#include +#include +#include using boost::shared_ptr; using namespace apache::thrift::protocol; diff --git a/lib/cpp/test/JSONProtoTest.cpp b/lib/cpp/test/JSONProtoTest.cpp index a9268a2b..dcb34d17 100644 --- a/lib/cpp/test/JSONProtoTest.cpp +++ b/lib/cpp/test/JSONProtoTest.cpp @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include "gen-cpp/DebugProtoTest_types.h" int main() { diff --git a/lib/cpp/test/OptionalRequiredTest.cpp b/lib/cpp/test/OptionalRequiredTest.cpp index 5d58f098..ddafa81d 100644 --- a/lib/cpp/test/OptionalRequiredTest.cpp +++ b/lib/cpp/test/OptionalRequiredTest.cpp @@ -24,9 +24,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "gen-cpp/OptionalRequiredTest_types.h" using std::cout; diff --git a/lib/cpp/test/RWMutexStarveTest.cpp b/lib/cpp/test/RWMutexStarveTest.cpp index 8042d496..e6cccf2d 100644 --- a/lib/cpp/test/RWMutexStarveTest.cpp +++ b/lib/cpp/test/RWMutexStarveTest.cpp @@ -23,8 +23,8 @@ #include #include -#include "concurrency/Mutex.h" -#include "concurrency/PosixThreadFactory.h" +#include "thrift/concurrency/Mutex.h" +#include "thrift/concurrency/PosixThreadFactory.h" using boost::shared_ptr; using boost::unit_test::test_suite; diff --git a/lib/cpp/test/SpecializationTest.cpp b/lib/cpp/test/SpecializationTest.cpp index fae1d324..7a3d347e 100644 --- a/lib/cpp/test/SpecializationTest.cpp +++ b/lib/cpp/test/SpecializationTest.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include using std::cout; diff --git a/lib/cpp/test/TBufferBaseTest.cpp b/lib/cpp/test/TBufferBaseTest.cpp index 1a0552ab..f88a019e 100644 --- a/lib/cpp/test/TBufferBaseTest.cpp +++ b/lib/cpp/test/TBufferBaseTest.cpp @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include using std::string; using boost::shared_ptr; diff --git a/lib/cpp/test/TFDTransportTest.cpp b/lib/cpp/test/TFDTransportTest.cpp index 1ec538e3..7ffca714 100644 --- a/lib/cpp/test/TFDTransportTest.cpp +++ b/lib/cpp/test/TFDTransportTest.cpp @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include using apache::thrift::transport::TTransportException; using apache::thrift::transport::TFDTransport; diff --git a/lib/cpp/test/TFileTransportTest.cpp b/lib/cpp/test/TFileTransportTest.cpp index 6ba71f3a..984deda2 100644 --- a/lib/cpp/test/TFileTransportTest.cpp +++ b/lib/cpp/test/TFileTransportTest.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include using namespace apache::thrift::transport; diff --git a/lib/cpp/test/TMemoryBufferTest.cpp b/lib/cpp/test/TMemoryBufferTest.cpp index 3711970e..10b53f43 100644 --- a/lib/cpp/test/TMemoryBufferTest.cpp +++ b/lib/cpp/test/TMemoryBufferTest.cpp @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include #include "gen-cpp/ThriftTest_types.h" BOOST_AUTO_TEST_SUITE( TMemoryBufferTest ) diff --git a/lib/cpp/test/TPipedTransportTest.cpp b/lib/cpp/test/TPipedTransportTest.cpp index e1e372c3..7762f056 100644 --- a/lib/cpp/test/TPipedTransportTest.cpp +++ b/lib/cpp/test/TPipedTransportTest.cpp @@ -19,9 +19,9 @@ #include #include -#include -#include -#include +#include +#include +#include using namespace std; using apache::thrift::transport::TTransportException; using apache::thrift::transport::TPipedTransport; diff --git a/lib/cpp/test/ThriftTest_extras.cpp b/lib/cpp/test/ThriftTest_extras.cpp index b78f2763..33f681ff 100644 --- a/lib/cpp/test/ThriftTest_extras.cpp +++ b/lib/cpp/test/ThriftTest_extras.cpp @@ -19,7 +19,7 @@ // Extra functions required for ThriftTest_types to work -#include +#include #include "gen-cpp/ThriftTest_types.h" diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp index bc0529dc..508d3e37 100644 --- a/lib/cpp/test/TransportTest.cpp +++ b/lib/cpp/test/TransportTest.cpp @@ -34,11 +34,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include using namespace apache::thrift::transport; diff --git a/lib/cpp/test/ZlibTest.cpp b/lib/cpp/test/ZlibTest.cpp index 605e9db0..4d7966ee 100644 --- a/lib/cpp/test/ZlibTest.cpp +++ b/lib/cpp/test/ZlibTest.cpp @@ -36,8 +36,8 @@ #include #include -#include -#include +#include +#include using namespace std; using namespace boost; diff --git a/test/cpp/src/StressTest.cpp b/test/cpp/src/StressTest.cpp index a668fdf3..5b0b3596 100755 --- a/test/cpp/src/StressTest.cpp +++ b/test/cpp/src/StressTest.cpp @@ -17,19 +17,19 @@ * under the License. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include "Service.h" diff --git a/test/cpp/src/StressTestNonBlocking.cpp b/test/cpp/src/StressTestNonBlocking.cpp index 4826a509..4b9e29ed 100755 --- a/test/cpp/src/StressTestNonBlocking.cpp +++ b/test/cpp/src/StressTestNonBlocking.cpp @@ -17,20 +17,20 @@ * under the License. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include "Service.h" diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp index e752f1c9..d8618d5e 100755 --- a/test/cpp/src/TestClient.cpp +++ b/test/cpp/src/TestClient.cpp @@ -23,14 +23,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include // +#include +#include +#include +#include +#include +#include +#include +#include // #include #include diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp index b8cb8804..f90bde8f 100755 --- a/test/cpp/src/TestServer.cpp +++ b/test/cpp/src/TestServer.cpp @@ -20,23 +20,23 @@ #define __STDC_FORMAT_MACROS #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "ThriftTest.h" #include diff --git a/test/threads/ThreadsClient.cpp b/test/threads/ThreadsClient.cpp index f5c076f2..70b08ad8 100644 --- a/test/threads/ThreadsClient.cpp +++ b/test/threads/ThreadsClient.cpp @@ -21,13 +21,13 @@ // You should copy it to another filename to avoid overwriting it. #include "ThreadsTest.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include using boost::shared_ptr; using namespace apache::thrift; diff --git a/test/threads/ThreadsServer.cpp b/test/threads/ThreadsServer.cpp index 8420c2f0..9c1a7d97 100644 --- a/test/threads/ThreadsServer.cpp +++ b/test/threads/ThreadsServer.cpp @@ -21,14 +21,14 @@ // You should copy it to another filename to avoid overwriting it. #include "ThreadsTest.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include using boost::shared_ptr; using namespace apache::thrift; diff --git a/tutorial/cpp/CppClient.cpp b/tutorial/cpp/CppClient.cpp index 4dac90c4..6b7e9744 100644 --- a/tutorial/cpp/CppClient.cpp +++ b/tutorial/cpp/CppClient.cpp @@ -21,9 +21,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "../gen-cpp/Calculator.h" diff --git a/tutorial/cpp/CppServer.cpp b/tutorial/cpp/CppServer.cpp index 860381ee..d0dbad9f 100644 --- a/tutorial/cpp/CppServer.cpp +++ b/tutorial/cpp/CppServer.cpp @@ -17,14 +17,14 @@ * under the License. */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include