Skip to content
This repository was archived by the owner on Jun 20, 2020. It is now read-only.

Commit feecbc2

Browse files
committed
Moved http subdirectory; includes version.hpp and constants.
1 parent 1d158ca commit feecbc2

File tree

202 files changed

+16530
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+16530
-2
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ if (Boost_FOUND)
7878
if(CPP-NETLIB_BUILD_TESTS)
7979
enable_testing()
8080
endif()
81-
add_subdirectory(libs/network/src)
81+
#add_subdirectory(libs/network/src)
8282
if(CPP-NETLIB_BUILD_TESTS)
8383
enable_testing()
84-
add_subdirectory(libs/network/test)
84+
#add_subdirectory(libs/network/test)
8585
if (NOT MSVC)
8686
#add_subdirectory(libs/mime/test)
8787
endif(NOT MSVC)
@@ -111,3 +111,4 @@ add_subdirectory(uri)
111111
add_subdirectory(message)
112112
add_subdirectory(logging)
113113
add_subdirectory(concurrency)
114+
add_subdirectory(http)

http/CMakeLists.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) Glyn Matthews 2012.
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at
4+
# http://www.boost.org/LICENSE_1_0.txt)
5+
6+
add_subdirectory(src)
7+
8+
if(CPP-NETLIB_BUILD_TESTS)
9+
enable_testing()
10+
add_subdirectory(test)
11+
endif(CPP-NETLIB_BUILD_TESTS)

http/src/CMakeLists.txt

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# Copyright (c) Glyn Matthews 2011, 2012.
2+
# Copyright 2011 Dean Michael Berris ([email protected])
3+
# Copyright 2012 A. Joel Lamotte ([email protected])
4+
# Copyright 2011 Google, Inc.
5+
# Distributed under the Boost Software License, Version 1.0.
6+
# (See accompanying file LICENSE_1_0.txt or copy at
7+
# http://www.boost.org/LICENSE_1_0.txt)
8+
9+
10+
include_directories(
11+
${CPP-NETLIB_SOURCE_DIR}/uri/src
12+
${CPP-NETLIB_SOURCE_DIR}/message/src
13+
${CPP-NETLIB_SOURCE_DIR}/logging/src
14+
${CPP-NETLIB_SOURCE_DIR}/include
15+
${CPP-NETLIB_SOURCE_DIR})
16+
17+
if (OPENSSL_FOUND)
18+
include_directories(${OPENSSL_INCLUDE_DIR})
19+
endif()
20+
21+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
22+
if (HAVE_STD11)
23+
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11")
24+
elseif (HAVE_STD0X)
25+
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++0x")
26+
endif()
27+
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
28+
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD11)
29+
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11 -stdlib=libc++")
30+
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11 -stdlib=libc++")
31+
endif()
32+
33+
set(CPP-NETLIB_HTTP_MESSAGE_SRCS http/request.cpp http/response.cpp)
34+
add_library(cppnetlib-http-message ${CPP-NETLIB_HTTP_MESSAGE_SRCS})
35+
add_dependencies(cppnetlib-http-message
36+
# ${Boost_LIBRARIES}
37+
cppnetlib-message)
38+
target_link_libraries(cppnetlib-http-message
39+
${Boost_LIBRARIES}
40+
cppnetlib-message)
41+
foreach (src_file ${CPP-NETLIB_HTTP_MESSAGE_SRCS})
42+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
43+
set_source_files_properties(${src_file}
44+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
45+
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
46+
set_source_files_properties(${src_file}
47+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
48+
endif()
49+
endforeach(src_file)
50+
51+
set(CPP-NETLIB_HTTP_MESSAGE_WRAPPERS_SRCS http/message/wrappers.cpp)
52+
add_library(cppnetlib-http-message-wrappers ${CPP-NETLIB_HTTP_MESSAGE_WRAPPERS_SRCS})
53+
foreach (src_file ${CPP-NETLIB_HTTP_MESSAGE_WRAPPERS_SRCS})
54+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
55+
set_source_files_properties(${src_file}
56+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
57+
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
58+
set_source_files_properties(${src_file}
59+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
60+
endif()
61+
endforeach(src_file)
62+
63+
#set(CPP-NETLIB_HTTP_SERVER_PARSERS_SRCS server_request_parsers_impl.cpp)
64+
#add_library(cppnetlib-http-server-parsers ${CPP-NETLIB_HTTP_SERVER_PARSERS_SRCS})
65+
#foreach (src_file ${CPP-NETLIB_HTTP_SERVER_PARSERS_SRCS})
66+
#if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
67+
# set_source_files_properties(${src_file}
68+
# PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
69+
#elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
70+
# set_source_files_properties(${src_file}
71+
# PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
72+
#endif()
73+
#endforeach(src_file)
74+
#
75+
#set(CPP-NETLIB_HTTP_SERVER_SRCS
76+
# http/server_async_impl.cpp
77+
# http/server_options.cpp
78+
# http/server_socket_options_setter.cpp
79+
# http/server_sync_impl.cpp
80+
# )
81+
#add_library(cppnetlib-http-server ${CPP-NETLIB_HTTP_SERVER_SRCS})
82+
#add_dependencies(cppnetlib-http-server
83+
# ${CPP-NETLIB_LOGGING_LIB}
84+
# cppnetlib-constants
85+
# cppnetlib-uri
86+
# cppnetlib-message
87+
# cppnetlib-message-wrappers
88+
# cppnetlib-message-directives
89+
# cppnetlib-http-message
90+
# cppnetlib-http-message-wrappers
91+
# cppnetlib-http-server-parsers
92+
# cppnetlib-utils-thread_pool
93+
# )
94+
#target_link_libraries(cppnetlib-http-server
95+
# ${Boost_LIBRARIES}
96+
# ${CPP-NETLIB_LOGGING_LIB}
97+
# cppnetlib-constants
98+
# cppnetlib-uri
99+
# cppnetlib-message
100+
# cppnetlib-message-wrappers
101+
# cppnetlib-message-directives
102+
# cppnetlib-http-message
103+
# cppnetlib-http-message-wrappers
104+
# cppnetlib-http-server-parsers
105+
# cppnetlib-utils-thread_pool
106+
# )
107+
#foreach (src_file ${CPP-NETLIB_HTTP_SERVER_SRCS})
108+
#if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
109+
# set_source_files_properties(${src_file}
110+
# PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
111+
#elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
112+
# set_source_files_properties(${src_file}
113+
# PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
114+
#endif()
115+
#endforeach(src_file)
116+
117+
set(CPP-NETLIB_HTTP_CLIENT_CONNECTIONS_SRCS
118+
http/client_connections.cpp
119+
http/simple_connection_manager.cpp
120+
http/simple_connection_factory.cpp
121+
http/connection_delegate_factory.cpp
122+
http/client_resolver_delegate.cpp
123+
http/client_resolver_delegate_factory.cpp
124+
http/client_connection_delegates.cpp
125+
http/client_connection_factory.cpp
126+
http/client_async_resolver.cpp
127+
http/client_connection_normal.cpp)
128+
add_library(cppnetlib-http-client-connections ${CPP-NETLIB_HTTP_CLIENT_CONNECTIONS_SRCS})
129+
foreach (src_file ${CPP-NETLIB_HTTP_CLIENT_CONNECTIONS_SRCS})
130+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
131+
set_source_files_properties(${src_file}
132+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
133+
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
134+
set_source_files_properties(${src_file}
135+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
136+
endif()
137+
endforeach(src_file)
138+
139+
set(CPP-NETLIB_HTTP_CLIENT_SRCS
140+
http/client.cpp)
141+
add_library(cppnetlib-http-client ${CPP-NETLIB_HTTP_CLIENT_SRCS})
142+
add_dependencies(cppnetlib-http-client
143+
${CPP-NETLIB_LOGGING_LIB}
144+
cppnetlib-constants
145+
cppnetlib-uri
146+
cppnetlib-message
147+
cppnetlib-message-wrappers
148+
cppnetlib-message-directives
149+
cppnetlib-http-message
150+
cppnetlib-http-message-wrappers
151+
cppnetlib-http-client-connections
152+
)
153+
target_link_libraries(cppnetlib-http-client
154+
${Boost_LIBRARIES}
155+
${CPP-NETLIB_LOGGING_LIB}
156+
cppnetlib-constants
157+
cppnetlib-uri
158+
cppnetlib-message
159+
cppnetlib-message-wrappers
160+
cppnetlib-message-directives
161+
cppnetlib-http-message
162+
cppnetlib-http-message-wrappers
163+
cppnetlib-http-client-connections
164+
)
165+
foreach (src_file ${CPP-NETLIB_HTTP_CLIENT_SRCS})
166+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
167+
set_source_files_properties(${src_file}
168+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
169+
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
170+
set_source_files_properties(${src_file}
171+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
172+
endif()
173+
endforeach(src_file)
174+
175+
set(CPP-NETLIB_CONSTANTS_SRCS constants.cpp)
176+
add_library(cppnetlib-constants ${CPP-NETLIB_CONSTANTS_SRCS})
177+
foreach (src_file ${CPP-NETLIB_CONSTANTS_SRCS})
178+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
179+
set_source_files_properties(${src_file}
180+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
181+
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
182+
set_source_files_properties(${src_file}
183+
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
184+
endif()
185+
endforeach(src_file)

http/src/client.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
// Copyright 2011 Dean Michael Berris ([email protected]).
3+
// Copyright 2011 Google, Inc.
4+
// Distributed under the Boost Software License, Version 1.0.
5+
// (See accompanying file LICENSE_1_0.txt or copy at
6+
// http://www.boost.org/LICENSE_1_0.txt)
7+
8+
#ifdef NETWORK_NO_LIB
9+
#warn Building the library even with NETWORK_NO_LIB defined.
10+
#undef NETWORK_NO_LIB
11+
#endif
12+
13+
#include <network/protocol/http/client/connection/normal_delegate.ipp>
14+
15+
#ifdef NETWORK_ENABLE_HTTPS
16+
#include <network/protocol/http/client/connection/ssl_delegate.ipp>
17+
#endif

http/src/constants.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/constants.ipp>

http/src/http/client.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/client.ipp>
12+
#include <network/protocol/http/client/base.ipp>
13+
#include <network/protocol/http/client/facade.ipp>
14+
#include <network/protocol/http/client/options.ipp>
15+
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/client/connection/async_resolver.ipp>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/client/connection/normal_delegate.ipp>
12+
#ifdef NETWORK_ENABLE_HTTPS
13+
#include <network/protocol/http/client/connection/ssl_delegate.ipp>
14+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/client/connection/connection_factory.ipp>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/client/connection/async_normal.ipp>

http/src/http/client_connections.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/impl/access.hpp>
12+
#include <network/protocol/http/response.hpp>
13+
#include <network/protocol/http/request.hpp>
14+
#include <network/protocol/http/client/connection_manager.ipp>
15+
#include <network/protocol/http/client/client_connection.ipp>
16+
#include <network/protocol/http/impl/access.ipp>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/client/connection/resolver_delegate.ipp>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/client/connection/resolver_delegate_factory.ipp>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/client/connection/connection_delegate_factory.ipp>

http/src/http/message/wrappers.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2012 Dean Michael Berris <[email protected]>.
2+
// Copyright 2012 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#include <network/protocol/http/message/wrappers/uri.ipp>
8+
#include <network/protocol/http/message/wrappers/anchor.ipp>
9+
#include <network/protocol/http/message/wrappers/host.ipp>
10+
#include <network/protocol/http/message/wrappers/path.ipp>
11+
#include <network/protocol/http/message/wrappers/port.ipp>
12+
#include <network/protocol/http/message/wrappers/query.ipp>

http/src/http/request.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2011 Dean Michael Berris <[email protected]>.
2+
// Copyright 2011 Google, Inc.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#ifdef NETWORK_NO_LIB
8+
#undef NETWORK_NO_LIB
9+
#endif
10+
11+
#include <network/protocol/http/request/request.ipp>
12+
#include <network/protocol/http/request/request_base.ipp>

0 commit comments

Comments
 (0)