Skip to content

Commit

Permalink
Merge branch 'development' into fixing#418
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonBikineev committed Mar 1, 2016
2 parents ff4f311 + 9052811 commit 7a07d38
Show file tree
Hide file tree
Showing 29 changed files with 579 additions and 156 deletions.
1 change: 1 addition & 0 deletions Build/Common.Build.settings
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<PropertyGroup>
<OutputPath>$(BuildRoot)\Binaries\$(Platform)\$(Configuration)\</OutputPath>
<OutDir>$(OutputPath)</OutDir>
<IntDir>$(BuildRoot)\Intermediate\$(MSBuildProjectName)\$(Platform)\$(Configuration)\</IntDir>
<TestRoot>$(BuildRoot)\Release\Tests</TestRoot>
<CasablancaSrcDir>$(BuildRoot)\Release\src</CasablancaSrcDir>
<CasablancaResourceDir>$(BuildRoot)\Release\Resource</CasablancaResourceDir>
Expand Down
1 change: 0 additions & 1 deletion Build/Release.Product.settings
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

<PropertyGroup>
<InternalIncludeDir>$(CasablancaIncludeDir)</InternalIncludeDir>
<IntDir>$(BuildRoot)\Intermediate\$(MSBuildProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>

<ItemDefinitionGroup>
Expand Down
2 changes: 1 addition & 1 deletion Build/version.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<CppRestBaseFileName>cpprest</CppRestBaseFileName>
<CppRestSDKVersionMajor>2</CppRestSDKVersionMajor>
<CppRestSDKVersionMinor>7</CppRestSDKVersionMinor>
<CppRestSDKVersionMinor>8</CppRestSDKVersionMinor>
<CppRestSDKVersionRevision>0</CppRestSDKVersionRevision>
<CppRestSDKVersionFileSuffix>$(CppRestSDKVersionMajor)_$(CppRestSDKVersionMinor)</CppRestSDKVersionFileSuffix>
<CppRestSDKVersionString>$(CppRestSDKVersionMajor).$(CppRestSDKVersionMinor)</CppRestSDKVersionString>
Expand Down
8 changes: 5 additions & 3 deletions Build_iOS/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
pushd OpenSSL-for-iPhone
./build-libssl.sh
popd
mkdir openssl
mv OpenSSL-for-iPhone/include openssl
mv OpenSSL-for-iPhone/lib openssl
mkdir -p openssl/lib
cp -r OpenSSL-for-iPhone/bin/iPhoneOS8.2-armv7.sdk/include openssl
cp OpenSSL-for-iPhone/include/LICENSE openssl
lipo -create -output openssl/lib/libssl.a OpenSSL-for-iPhone/bin/iPhone*/lib/libssl.a
lipo -create -output openssl/lib/libcrypto.a OpenSSL-for-iPhone/bin/iPhone*/lib/libcrypto.a

git clone https://github.com/cristeab/ios-cmake.git
pushd ios-cmake
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Gery Vessere (gery@vessere.com)

Cisco Systems
Gergely Lukacsy (glukacsy)
Chris Deering (deeringc)

Ocedo GmbH
Henning Pfeiffer (megaposer)
Expand Down
7 changes: 5 additions & 2 deletions Release/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ enable_testing()
set(WARNINGS)
set(ANDROID_STL_FLAGS)

option(WERROR "Threat Warnings as Errors" ON)

# Platform (not compiler) specific settings
if(IOS)
set(IOS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Build_iOS")
Expand Down Expand Up @@ -73,7 +75,7 @@ elseif(ANDROID)
set(BUILD_SAMPLES OFF)
option(BUILD_TESTS "Build tests." ON)
elseif(UNIX) # This includes OSX
find_package(Boost REQUIRED COMPONENTS random chrono system thread regex filesystem)
find_package(Boost 1.54 REQUIRED COMPONENTS random chrono system thread regex filesystem)
find_package(Threads REQUIRED)
if(APPLE AND NOT OPENSSL_ROOT_DIR)
# Prefer a homebrew version of OpenSSL over the one in /usr/lib
Expand Down Expand Up @@ -189,7 +191,8 @@ else()
endif()

set(Casablanca_LIBRARY ${LIB}cpprest)
set(Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK})
set(Casablanca_LIBRARIES ${Casablanca_LIBRARY}
${Boost_LIBRARIES})

# Everything in the project needs access to the casablanca include directories
include_directories(${Casablanca_INCLUDE_DIRS})
Expand Down
2 changes: 2 additions & 0 deletions Release/include/cpprest/details/web_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace web
namespace http { namespace client { namespace details {
class winhttp_client;
class winrt_client;
class asio_context;
}}}
namespace websockets { namespace client { namespace details {
class winrt_callback_client;
Expand Down Expand Up @@ -124,6 +125,7 @@ class credentials
private:
friend class http::client::details::winhttp_client;
friend class http::client::details::winrt_client;
friend class http::client::details::asio_context;
friend class websockets::client::details::winrt_callback_client;
friend class websockets::client::details::wspp_callback_client;

Expand Down
21 changes: 21 additions & 0 deletions Release/include/cpprest/oauth1.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define _CASA_OAUTH1_H

#include "cpprest/http_msg.h"
#include "cpprest/details/web_utilities.h"

namespace web
{
Expand Down Expand Up @@ -479,6 +480,24 @@ class oauth1_config
/// </summary>
void clear_parameters() { m_parameters_to_sign.clear(); }

/// <summary>
/// Get the web proxy object
/// </summary>
/// <returns>A reference to the web proxy object.</returns>
const web_proxy& proxy() const
{
return m_proxy;
}

/// <summary>
/// Set the web proxy object that will be used by token_from_code and token_from_refresh
/// </summary>
/// <param name="proxy">A reference to the web proxy object.</param>
void set_proxy(const web_proxy& proxy)
{
m_proxy = proxy;
}

private:
friend class web::http::client::http_client_config;
friend class web::http::oauth1::details::oauth1_handler;
Expand Down Expand Up @@ -532,6 +551,8 @@ class oauth1_config

std::map<utility::string_t, utility::string_t> m_parameters_to_sign;

web::web_proxy m_proxy;

utility::nonce_generator m_nonce_generator;
bool m_is_authorization_completed;
};
Expand Down
2 changes: 1 addition & 1 deletion Release/include/cpprest/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* ==--==
*/
#define CPPREST_VERSION_REVISION 0
#define CPPREST_VERSION_MINOR 7
#define CPPREST_VERSION_MINOR 8
#define CPPREST_VERSION_MAJOR 2

#define CPPREST_VERSION (CPPREST_VERSION_MAJOR*100000+CPPREST_VERSION_MINOR*100+CPPREST_VERSION_REVISION)
33 changes: 20 additions & 13 deletions Release/libs/websocketpp/websocketpp/connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,14 @@ typedef lib::function<void(lib::error_code const & ec)> write_frame_handler;
* @todo Move this to configs to allow compile/runtime disabling or enabling
* of protocol versions
*/
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4592)
#endif
static std::vector<int> const versions_supported = {0,7,8,13};
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#else
/// Helper array to get around lack of initializer lists pre C++11
static int const helper[] = {0,7,8,13};
Expand Down Expand Up @@ -534,7 +541,7 @@ class connection

/// Get maximum message size
/**
* Get maximum message size. Maximum message size determines the point at
* Get maximum message size. Maximum message size determines the point at
* which the connection will fail with the message_too_big protocol error.
*
* The default is set by the endpoint that creates the connection.
Expand All @@ -544,11 +551,11 @@ class connection
size_t get_max_message_size() const {
return m_max_message_size;
}

/// Set maximum message size
/**
* Set maximum message size. Maximum message size determines the point at
* which the connection will fail with the message_too_big protocol error.
* Set maximum message size. Maximum message size determines the point at
* which the connection will fail with the message_too_big protocol error.
* This value may be changed during the connection.
*
* The default is set by the endpoint that creates the connection.
Expand All @@ -563,7 +570,7 @@ class connection
m_processor->set_max_message_size(new_value);
}
}

/// Get maximum HTTP message body size
/**
* Get maximum HTTP message body size. Maximum message body size determines
Expand All @@ -579,7 +586,7 @@ class connection
size_t get_max_http_body_size() const {
return m_request.get_max_body_size();
}

/// Set maximum HTTP message body size
/**
* Set maximum HTTP message body size. Maximum message body size determines
Expand Down Expand Up @@ -683,14 +690,14 @@ class connection
* @return An error code
*/
lib::error_code interrupt();

/// Transport inturrupt callback
void handle_interrupt();

/// Pause reading of new data
/**
* Signals to the connection to halt reading of new data. While reading is paused,
* the connection will stop reading from its associated socket. In turn this will
* Signals to the connection to halt reading of new data. While reading is paused,
* the connection will stop reading from its associated socket. In turn this will
* result in TCP based flow control kicking in and slowing data flow from the remote
* endpoint.
*
Expand All @@ -702,7 +709,7 @@ class connection
*
* If supported by the transport this is done asynchronously. As such reading may not
* stop until the current read operation completes. Typically you can expect to
* receive no more bytes after initiating a read pause than the size of the read
* receive no more bytes after initiating a read pause than the size of the read
* buffer.
*
* If reading is paused for this connection already nothing is changed.
Expand Down Expand Up @@ -1357,7 +1364,7 @@ class connection
* Includes: error code and message for why it was failed
*/
void log_fail_result();

/// Prints information about HTTP connections
/**
* Includes: TODO
Expand Down Expand Up @@ -1506,7 +1513,7 @@ class connection

/// Detailed internal error code
lib::error_code m_ec;

/// A flag that gets set once it is determined that the connection is an
/// HTTP connection and not a WebSocket one.
bool m_is_http;
Expand Down
8 changes: 6 additions & 2 deletions Release/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ if(UNIX)
else()
list(APPEND SOURCES pplx/pplxlinux.cpp)
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS} -Werror -pedantic")

if(WERROR)
set(WARNINGS "${WARNINGS} -Werror")
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS} -pedantic")
elseif(WIN32)
set(SOURCES
${SOURCES_COMMON}
Expand Down Expand Up @@ -99,7 +103,7 @@ target_link_libraries(${Casablanca_LIBRARY}

# Portions specific to cpprest binary versioning.
set (CPPREST_VERSION_MAJOR 2)
set (CPPREST_VERSION_MINOR 7)
set (CPPREST_VERSION_MINOR 8)
set (CPPREST_VERSION_REVISION 0)

if(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion Release/src/build/init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Copy-Natvis($DestFolder)
if ((Test-Path $DestFolder) -eq $True)
{
# Update casablanca version for each release here.
$DestFile = Join-Path -path $DestFolder -childpath "cpprest2_7.natvis";
$DestFile = Join-Path -path $DestFolder -childpath "cpprest2_8.natvis";

# Check to see if cpp rest natvis file for this version already exists
# if not, then copy into user profile for Visual Studio to pick up
Expand Down
3 changes: 0 additions & 3 deletions Release/src/build/vs12.winrt/packages.config

This file was deleted.

3 changes: 0 additions & 3 deletions Release/src/build/vs12.wp81/packages.config

This file was deleted.

3 changes: 0 additions & 3 deletions Release/src/build/vs12.wps81/packages.config

This file was deleted.

4 changes: 1 addition & 3 deletions Release/src/dirs.proj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<ItemGroup Condition="'$(DevToolsVersion)'=='120'">
<ProjectFile Include="build\vs12\casablanca120.vcxproj" Condition="'$(Platform)'!='ARM' or '$(WindowsSDKDesktopARMSupport)' == 'true'" />
<ProjectFile Include="build\vs12.xp\casablanca120.xp.vcxproj" Condition="'$(Platform)'!='ARM' and '$(RunCodeAnalysis)'!='true'" />
<ProjectFile Include="build\vs12.wod\casablanca120.wod.vcxproj" Condition="'$(Platform)'!='ARM'" />
</ItemGroup>

<ItemGroup Condition="'$(OsVersion)|$(DevToolsVersion)'=='6.2|120' or '$(OsVersion)|$(DevToolsVersion)'=='6.3|120'">
Expand All @@ -19,10 +18,9 @@

<ItemGroup Condition="'$(DevToolsVersion)'=='140'">
<ProjectFile Include="build\vs14\casablanca140.vcxproj" Condition="'$(Platform)'!='ARM' or '$(WindowsSDKDesktopARMSupport)' == 'true'" />
<ProjectFile Include="build\vs14.wod\casablanca140.wod.vcxproj" Condition="'$(Platform)'!='ARM'" />
<ProjectFile Include="build\vs14.android\casablanca140.android.vcxproj" Condition="'$(Platform)'!='x64'"/>
</ItemGroup>

<ItemGroup Condition="'$(OsVersion)|$(DevToolsVersion)'=='6.3|140'">
<ProjectFile Include="build\vs14.uwp\cpprestsdk140.uwp.vcxproj" />
</ItemGroup>
Expand Down
Loading

0 comments on commit 7a07d38

Please sign in to comment.