f_types_ <<
"/* base includes */" << endl <<
"#include <glib-object.h>" << endl <<
- "#include <thrift/thrift_struct.h>" << endl <<
- "#include <thrift/protocol/thrift_protocol.h>" << endl;
+ "#include <thrift/c_glib/thrift_struct.h>" << endl <<
+ "#include <thrift/c_glib/protocol/thrift_protocol.h>" << endl;
/* include other thrift includes */
const vector<t_program *> &includes = program_->get_includes();
endl <<
"#include \"" << this->nspace_lc << program_name_u <<
"_types.h\"" << endl <<
- "#include <thrift/thrift.h>" << endl <<
+ "#include <thrift/c_glib/thrift.h>" << endl <<
endl;
f_types_ <<
// include the headers
f_service_ <<
"#include <string.h>" << endl <<
- "#include <thrift/thrift.h>" << endl <<
- "#include <thrift/thrift_application_exception.h>" << endl <<
+ "#include <thrift/c_glib/thrift.h>" << endl <<
+ "#include <thrift/c_glib/thrift_application_exception.h>" << endl <<
"#include \"" << filename << ".h\"" << endl <<
endl;
lib_LTLIBRARIES = libthrift_c_glib.la
pkgconfig_DATA = thrift_c_glib.pc
-common_cflags = -g -Wall -W -Werror -Isrc -I src/thrift $(GLIB_CFLAGS)
+common_cflags = -g -Wall -W -Werror -Isrc -I src/thrift/c_glib $(GLIB_CFLAGS)
common_ldflags = -g -Wall -W $(GLIB_LDFLAGS) @GCOV_LDFLAGS@
# this removes optimizations and adds coverage flags
# Define the source files for the module
-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_SOURCES = src/thrift/c_glib/thrift.c \
+ src/thrift/c_glib/thrift_struct.c \
+ src/thrift/c_glib/thrift_application_exception.c \
+ src/thrift/c_glib/processor/thrift_processor.c \
+ src/thrift/c_glib/protocol/thrift_protocol.c \
+ src/thrift/c_glib/protocol/thrift_protocol_factory.c \
+ src/thrift/c_glib/protocol/thrift_binary_protocol.c \
+ src/thrift/c_glib/protocol/thrift_binary_protocol_factory.c \
+ src/thrift/c_glib/transport/thrift_transport.c \
+ src/thrift/c_glib/transport/thrift_transport_factory.c \
+ src/thrift/c_glib/transport/thrift_socket.c \
+ src/thrift/c_glib/transport/thrift_server_transport.c \
+ src/thrift/c_glib/transport/thrift_server_socket.c \
+ src/thrift/c_glib/transport/thrift_buffered_transport.c \
+ src/thrift/c_glib/transport/thrift_framed_transport.c \
+ src/thrift/c_glib/transport/thrift_memory_buffer.c \
+ src/thrift/c_glib/server/thrift_server.c \
+ src/thrift/c_glib/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/thrift.h \
- src/thrift/thrift_application_exception.h \
- src/thrift/thrift_struct.h
+ src/thrift/c_glib/thrift.h \
+ src/thrift/c_glib/thrift_application_exception.h \
+ src/thrift/c_glib/thrift_struct.h
include_protocoldir = $(include_thriftdir)/protocol
-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_protocol_HEADERS = src/thrift/c_glib/protocol/thrift_protocol.h \
+ src/thrift/c_glib/protocol/thrift_protocol_factory.h \
+ src/thrift/c_glib/protocol/thrift_binary_protocol.h \
+ src/thrift/c_glib/protocol/thrift_binary_protocol_factory.h
include_transportdir = $(include_thriftdir)/transport
-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_transport_HEADERS = src/thrift/c_glib/transport/thrift_buffered_transport.h \
+ src/thrift/c_glib/transport/thrift_framed_transport.h \
+ src/thrift/c_glib/transport/thrift_memory_buffer.h \
+ src/thrift/c_glib/transport/thrift_server_socket.h \
+ src/thrift/c_glib/transport/thrift_server_transport.h \
+ src/thrift/c_glib/transport/thrift_socket.h \
+ src/thrift/c_glib/transport/thrift_transport.h \
+ src/thrift/c_glib/transport/thrift_transport_factory.h
include_serverdir = $(include_thriftdir)/server
-include_server_HEADERS = src/thrift/server/thrift_server.h \
- src/thrift/server/thrift_simple_server.h
+include_server_HEADERS = src/thrift/c_glib/server/thrift_server.h \
+ src/thrift/c_glib/server/thrift_simple_server.h
include_processordir = $(include_thriftdir)/processor
-include_processor_HEADERS = src/thrift/processor/thrift_processor.h
+include_processor_HEADERS = src/thrift/c_glib/processor/thrift_processor.h
EXTRA_DIST = \
* under the License.
*/
-#include <thrift/thrift.h>
-#include <thrift/processor/thrift_processor.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/processor/thrift_processor.h>
G_DEFINE_ABSTRACT_TYPE(ThriftProcessor, thrift_processor, G_TYPE_OBJECT)
#include <glib-object.h>
-#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
G_BEGIN_DECLS
#include <string.h>
#include <stdio.h>
-#include <thrift/thrift.h>
-#include <thrift/protocol/thrift_protocol.h>
-#include <thrift/protocol/thrift_binary_protocol.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
+#include <thrift/c_glib/protocol/thrift_binary_protocol.h>
G_DEFINE_TYPE(ThriftBinaryProtocol, thrift_binary_protocol, THRIFT_TYPE_PROTOCOL)
#include <glib-object.h>
-#include <thrift/protocol/thrift_protocol.h>
-#include <thrift/transport/thrift_transport.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
G_BEGIN_DECLS
* under the License.
*/
-#include <thrift/thrift.h>
-#include <thrift/protocol/thrift_binary_protocol.h>
-#include <thrift/protocol/thrift_binary_protocol_factory.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/protocol/thrift_binary_protocol.h>
+#include <thrift/c_glib/protocol/thrift_binary_protocol_factory.h>
G_DEFINE_TYPE(ThriftBinaryProtocolFactory, thrift_binary_protocol_factory, THRIFT_TYPE_PROTOCOL_FACTORY)
#include <glib-object.h>
-#include <thrift/protocol/thrift_protocol_factory.h>
+#include <thrift/c_glib/protocol/thrift_protocol_factory.h>
G_BEGIN_DECLS
* under the License.
*/
-#include <thrift/thrift.h>
-#include <thrift/protocol/thrift_protocol.h>
-#include <thrift/transport/thrift_transport.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
/* define the GError domain string */
#define THRIFT_PROTOCOL_ERROR_DOMAIN "thrift-protocol-error-quark"
#include <glib-object.h>
-#include <thrift/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
G_BEGIN_DECLS
* under the License.
*/
-#include <thrift/thrift.h>
-#include <thrift/protocol/thrift_protocol_factory.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/protocol/thrift_protocol_factory.h>
G_DEFINE_ABSTRACT_TYPE(ThriftProtocolFactory, thrift_protocol_factory, G_TYPE_OBJECT)
#include <glib-object.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
G_BEGIN_DECLS
* under the License.
*/
-#include <thrift/thrift.h>
+#include <thrift/c_glib/thrift.h>
#include "thrift_server.h"
/* object properties */
#include <glib-object.h>
-#include <thrift/processor/thrift_processor.h>
-#include <thrift/transport/thrift_server_transport.h>
-#include <thrift/transport/thrift_transport_factory.h>
-#include <thrift/protocol/thrift_protocol_factory.h>
+#include <thrift/c_glib/processor/thrift_processor.h>
+#include <thrift/c_glib/transport/thrift_server_transport.h>
+#include <thrift/c_glib/transport/thrift_transport_factory.h>
+#include <thrift/c_glib/protocol/thrift_protocol_factory.h>
G_BEGIN_DECLS
* under the License.
*/
-#include <thrift/server/thrift_simple_server.h>
-#include <thrift/transport/thrift_transport_factory.h>
-#include <thrift/protocol/thrift_protocol_factory.h>
-#include <thrift/protocol/thrift_binary_protocol_factory.h>
+#include <thrift/c_glib/server/thrift_simple_server.h>
+#include <thrift/c_glib/transport/thrift_transport_factory.h>
+#include <thrift/c_glib/protocol/thrift_protocol_factory.h>
+#include <thrift/c_glib/protocol/thrift_binary_protocol_factory.h>
G_DEFINE_TYPE(ThriftSimpleServer, thrift_simple_server, THRIFT_TYPE_SERVER)
#include <glib-object.h>
-#include <thrift/server/thrift_server.h>
+#include <thrift/c_glib/server/thrift_server.h>
G_BEGIN_DECLS
* under the License.
*/
-#include <thrift/thrift.h>
+#include <thrift/c_glib/thrift.h>
/**
* GHashTable callback to add keys to a GList.
*/
#include "thrift_application_exception.h"
-#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
G_DEFINE_TYPE(ThriftApplicationException, thrift_application_exception, THRIFT_TYPE_STRUCT)
* under the License.
*/
-#include <thrift/thrift.h>
+#include <thrift/c_glib/thrift.h>
#include "thrift_struct.h"
G_DEFINE_ABSTRACT_TYPE(ThriftStruct, thrift_struct, G_TYPE_OBJECT)
#include <glib-object.h>
-#include <thrift/protocol/thrift_protocol.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
G_BEGIN_DECLS
#include <string.h>
#include <unistd.h>
-#include <thrift/thrift.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_buffered_transport.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_buffered_transport.h>
/* object properties */
enum _ThriftBufferedTransportProperties
#include <glib.h>
#include <glib-object.h>
-#include <thrift/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
G_BEGIN_DECLS
#include <sys/socket.h>
#include <netinet/in.h>
-#include <thrift/thrift.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_framed_transport.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_framed_transport.h>
/* object properties */
enum _ThriftFramedTransportProperties
#include <glib.h>
#include <glib-object.h>
-#include <thrift/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
G_BEGIN_DECLS
#include <string.h>
#include <unistd.h>
-#include <thrift/thrift.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_memory_buffer.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_memory_buffer.h>
/* object properties */
enum _ThriftMemoryBufferProperties
#include <glib.h>
#include <glib-object.h>
-#include <thrift/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
G_BEGIN_DECLS
#include <sys/socket.h>
#include <netinet/in.h>
-#include <thrift/thrift.h>
-#include <thrift/transport/thrift_socket.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_server_transport.h>
-#include <thrift/transport/thrift_server_socket.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/transport/thrift_socket.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_server_transport.h>
+#include <thrift/c_glib/transport/thrift_server_socket.h>
/* object properties */
enum _ThriftServerSocketProperties
* under the License.
*/
-#include <thrift/thrift.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_server_transport.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_server_transport.h>
G_DEFINE_ABSTRACT_TYPE(ThriftServerTransport, thrift_server_transport, G_TYPE_OBJECT)
#include <sys/socket.h>
#include <netinet/in.h>
-#include <thrift/thrift.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_socket.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_socket.h>
/* object properties */
enum _ThriftSocketProperties
#include <glib-object.h>
-#include <thrift/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
G_BEGIN_DECLS
* under the License.
*/
-#include <thrift/thrift.h>
-#include <thrift/transport/thrift_transport.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
/* define the GError domain string */
#define THRIFT_TRANSPORT_ERROR_DOMAIN "thrift-transport-error-quark"
* under the License.
*/
-#include <thrift/thrift.h>
-#include <thrift/transport/thrift_transport_factory.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/transport/thrift_transport_factory.h>
G_DEFINE_TYPE(ThriftTransportFactory, thrift_transport_factory, G_TYPE_OBJECT)
#include <netdb.h>
#include <string.h>
-#include <thrift/protocol/thrift_protocol.h>
-#include <thrift/transport/thrift_socket.h>
-#include <thrift/transport/thrift_server_socket.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
+#include <thrift/c_glib/transport/thrift_socket.h>
+#include <thrift/c_glib/transport/thrift_server_socket.h>
#define TEST_BOOL TRUE
#define TEST_BYTE 123
#define thrift_transport_read my_thrift_transport_read
#define thrift_transport_write my_thrift_transport_write
-#include "../src/thrift/protocol/thrift_binary_protocol.c"
+#include "../src/thrift/c_glib/protocol/thrift_binary_protocol.c"
#undef thrift_transport_read
#undef thrift_transport_write
#include <assert.h>
#include <netdb.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_socket.h>
-#include <thrift/transport/thrift_server_transport.h>
-#include <thrift/transport/thrift_server_socket.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_socket.h>
+#include <thrift/c_glib/transport/thrift_server_transport.h>
+#include <thrift/c_glib/transport/thrift_server_socket.h>
#define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
-#include "../src/thrift/transport/thrift_buffered_transport.c"
+#include "../src/thrift/c_glib/transport/thrift_buffered_transport.c"
static const char TEST_ADDRESS[] = "localhost";
static const short TEST_PORT = 64444;
#include <assert.h>
#include <netdb.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_socket.h>
-#include <thrift/transport/thrift_server_transport.h>
-#include <thrift/transport/thrift_server_socket.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_socket.h>
+#include <thrift/c_glib/transport/thrift_server_transport.h>
+#include <thrift/c_glib/transport/thrift_server_socket.h>
#define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
-#include "../src/thrift/transport/thrift_framed_transport.c"
+#include "../src/thrift/c_glib/transport/thrift_framed_transport.c"
static const char TEST_ADDRESS[] = "localhost";
static const short TEST_PORT = 64444;
#include <assert.h>
#include <netdb.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_socket.h>
-#include <thrift/transport/thrift_server_transport.h>
-#include <thrift/transport/thrift_server_socket.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_socket.h>
+#include <thrift/c_glib/transport/thrift_server_transport.h>
+#include <thrift/c_glib/transport/thrift_server_socket.h>
#define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
-#include "../src/thrift/transport/thrift_memory_buffer.c"
+#include "../src/thrift/c_glib/transport/thrift_memory_buffer.c"
/* test object creation and destruction */
static void
#include <assert.h>
#include <glib.h>
-#include <thrift/thrift_struct.h>
-#include <thrift/protocol/thrift_protocol.h>
-#include <thrift/protocol/thrift_binary_protocol.h>
-#include <thrift/transport/thrift_memory_buffer.h>
+#include <thrift/c_glib/thrift_struct.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
+#include <thrift/c_glib/protocol/thrift_binary_protocol.h>
+#include <thrift/c_glib/transport/thrift_memory_buffer.h>
#include "gen-c_glib/t_test_optional_required_test_types.h"
#include "gen-c_glib/t_test_optional_required_test_types.c"
#include <sys/types.h>
#include <sys/wait.h>
-#include <thrift/thrift.h>
-#include <thrift/processor/thrift_processor.h>
-#include <thrift/transport/thrift_server_socket.h>
+#include <thrift/c_glib/thrift.h>
+#include <thrift/c_glib/processor/thrift_processor.h>
+#include <thrift/c_glib/transport/thrift_server_socket.h>
#define TEST_PORT 51199
-#include <thrift/server/thrift_simple_server.c>
+#include <thrift/c_glib/server/thrift_simple_server.c>
/* create a rudimentary processor */
#define TEST_PROCESSOR_TYPE (test_processor_get_type ())
#include <assert.h>
#include <glib-object.h>
-#include "../src/thrift/thrift_struct.c"
+#include "../src/thrift/c_glib/thrift_struct.c"
/* tests to ensure we can extend a ThriftStruct */
#include <assert.h>
#include <netdb.h>
-#include <thrift/transport/thrift_server_transport.h>
-#include <thrift/transport/thrift_server_socket.h>
+#include <thrift/c_glib/transport/thrift_server_transport.h>
+#include <thrift/c_glib/transport/thrift_server_socket.h>
static const char TEST_ADDRESS[] = "localhost";
static const int TEST_PORT = 64444;
#include "t_test_thrift_test.h"
#include "t_test_thrift_test_types.h"
-#include <thrift/transport/thrift_socket.h>
-#include <thrift/protocol/thrift_protocol.h>
-#include <thrift/protocol/thrift_binary_protocol.h>
+#include <thrift/c_glib/transport/thrift_socket.h>
+#include <thrift/c_glib/protocol/thrift_protocol.h>
+#include <thrift/c_glib/protocol/thrift_binary_protocol.h>
static void
test_thrift_client (void)
#include <assert.h>
#include <netdb.h>
-#include <thrift/transport/thrift_transport.h>
-#include <thrift/transport/thrift_server_transport.h>
-#include <thrift/transport/thrift_server_socket.h>
+#include <thrift/c_glib/transport/thrift_transport.h>
+#include <thrift/c_glib/transport/thrift_server_transport.h>
+#include <thrift/c_glib/transport/thrift_server_socket.h>
#define TEST_DATA { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
#define socket my_socket
#define recv my_recv
#define send my_send
-#include "../src/thrift/transport/thrift_socket.c"
+#include "../src/thrift/c_glib/transport/thrift_socket.c"
#undef socket
#undef recv
#undef send
Version: @VERSION@
Requires: glib-2.0 gobject-2.0
Libs: -L${libdir} -lthrift_c_glib
-Cflags: -I${includedir}/thrift
+Cflags: -I${includedir}/thrift/c_glib