Skip to content

Commit 608043e

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into websocket_tls_windows
2 parents 5caac61 + 922b02d commit 608043e

File tree

574 files changed

+11325
-1340
lines changed

Some content is hidden

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

574 files changed

+11325
-1340
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ obj/
4444
[Bb]in
4545
Binaries/
4646
Intermediate/
47+
# The packages folder can be ignored because of Package Restore
48+
**/packages/*
49+
# except build/, which is used as an MSBuild target.
50+
!**/packages/build/
51+

Build/Common.Build.settings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<TargetsPath>$(BuildRoot)\Build</TargetsPath>
3939
<OsVersion>$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@CurrentVersion)</OsVersion>
4040
<!--If Dev11 and Dev12 are both installed, the default is to build Dev12. This can be overridden by setting the DevToolsVersion variable in powershell-->
41+
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS140COMNTOOLS)' != ''">140</DevToolsVersion>
4142
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS120COMNTOOLS)' != ''">120</DevToolsVersion>
4243
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS110COMNTOOLS)' != ''">110</DevToolsVersion>
4344
<!-- ARM tools are installed in $(FrameworkSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.desktop.arm.props -->

Build_iOS/configure.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
#!/bin/bash
22
set -e
33

4-
git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
5-
pushd OpenSSL-for-iPhone
6-
./build-libssl.sh
7-
popd
8-
mkdir openssl
9-
mv OpenSSL-for-iPhone/include openssl
10-
mv OpenSSL-for-iPhone/lib openssl
114
git clone https://git.gitorious.org/boostoniphone/galbraithjosephs-boostoniphone.git boostoniphone
125
pushd boostoniphone
13-
sed -e 's/\${BOOST_LIBS:=".*"}/\${BOOST_LIBS:="random thread filesystem regex locale system"}/g' -i .bak boost.sh
6+
sed -e 's/\${IPHONE_SDKVERSION:=7.0}/\${IPHONE_SDKVERSION:=8.0}/' -i .bak boost.sh
7+
sed -e 's/\${BOOST_LIBS:=".*"}/\${BOOST_LIBS:="random thread filesystem regex locale system date_time"}/g' -i .bak boost.sh
148
./boost.sh
159
pushd ios/framework/boost.framework/Versions/A
1610
mkdir Headers2
@@ -19,6 +13,15 @@ mv Headers2 Headers
1913
popd
2014
popd
2115
mv boostoniphone/ios/framework/boost.framework .
16+
17+
git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
18+
pushd OpenSSL-for-iPhone
19+
./build-libssl.sh
20+
popd
21+
mkdir openssl
22+
mv OpenSSL-for-iPhone/include openssl
23+
mv OpenSSL-for-iPhone/lib openssl
24+
2225
hg clone https://code.google.com/p/ios-cmake/
2326
mkdir build.ios
2427
pushd build.ios

Release/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ elseif(UNIX) # This includes OSX
7171
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
7272
option(BUILD_TESTS "Build tests." ON)
7373
option(BUILD_SAMPLES "Build samples." ON)
74+
option(CASA_INSTALL_HEADERS "Install header files." ON)
75+
if(CASA_INSTALL_HEADERS)
76+
file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h)
77+
install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest)
78+
file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h)
79+
install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx)
80+
file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h)
81+
install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details)
82+
endif()
7483
elseif(WIN32)
7584
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
7685
option(BUILD_TESTS "Build tests." ON)
@@ -169,4 +178,3 @@ endif()
169178
if(BUILD_SAMPLES)
170179
add_subdirectory(samples)
171180
endif()
172-

Release/include/compat/pplxtasks.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

Release/include/cpprest/astreambuf.h

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -60,66 +60,64 @@ namespace concurrency = Concurrency;
6060
#pragma warning(disable : 4718)
6161
#endif
6262

63-
#ifndef _MS_WINDOWS
64-
// TFS 579628 - 1206: figure out how to avoid having this specialization for Linux (beware of 64-bit Linux)
65-
namespace std {
63+
namespace Concurrency
64+
{
65+
/// Library for asychronous streams.
66+
namespace streams
67+
{
68+
/// <summary>
69+
/// Extending the standard char_traits type with one that adds values and types
70+
/// that are unique to "C++ REST SDK" streams.
71+
/// </summary>
72+
/// <typeparam name="_CharType">
73+
/// The data type of the basic element of the stream.
74+
/// </typeparam>
75+
template<typename _CharType>
76+
struct char_traits : std::char_traits<_CharType>
77+
{
78+
/// <summary>
79+
/// Some synchronous functions will return this value if the operation
80+
/// requires an asynchronous call in a given situation.
81+
/// </summary>
82+
/// <returns>An <c>int_type</c> value which implies that an asynchronous call is required.</returns>
83+
static typename std::char_traits<_CharType>::int_type requires_async() { return std::char_traits<_CharType>::eof()-1; }
84+
};
85+
#if !defined(_MS_WINDOWS)
6686
template<>
67-
struct char_traits<unsigned char> : private char_traits<char>
87+
struct char_traits<unsigned char> : private std::char_traits<char>
6888
{
6989
public:
7090
typedef unsigned char char_type;
7191

72-
using char_traits<char>::eof;
73-
using char_traits<char>::int_type;
74-
using char_traits<char>::off_type;
75-
using char_traits<char>::pos_type;
92+
using std::char_traits<char>::eof;
93+
using std::char_traits<char>::int_type;
94+
using std::char_traits<char>::off_type;
95+
using std::char_traits<char>::pos_type;
7696

7797
static size_t length(const unsigned char* str)
7898
{
79-
return char_traits<char>::length(reinterpret_cast<const char*>(str));
99+
return std::char_traits<char>::length(reinterpret_cast<const char*>(str));
80100
}
81101

82102
static void assign(unsigned char& left, const unsigned char& right) { left = right; }
83103
static unsigned char* assign(unsigned char* left, size_t n, unsigned char value)
84104
{
85-
return reinterpret_cast<unsigned char*>(char_traits<char>::assign(reinterpret_cast<char*>(left), n, static_cast<char>(value)));
105+
return reinterpret_cast<unsigned char*>(std::char_traits<char>::assign(reinterpret_cast<char*>(left), n, static_cast<char>(value)));
86106
}
87107

88108
static unsigned char* copy(unsigned char* left, const unsigned char* right, size_t n)
89109
{
90-
return reinterpret_cast<unsigned char*>(char_traits<char>::copy(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
110+
return reinterpret_cast<unsigned char*>(std::char_traits<char>::copy(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
91111
}
92112

93113
static unsigned char* move(unsigned char* left, const unsigned char* right, size_t n)
94114
{
95-
return reinterpret_cast<unsigned char*>(char_traits<char>::move(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
115+
return reinterpret_cast<unsigned char*>(std::char_traits<char>::move(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
96116
}
97-
};
98-
}
99-
#endif // _MS_WINDOWS
100117

101-
namespace Concurrency
102-
{
103-
/// Library for asychronous streams.
104-
namespace streams
105-
{
106-
/// <summary>
107-
/// Extending the standard char_traits type with one that adds values and types
108-
/// that are unique to "C++ REST SDK" streams.
109-
/// </summary>
110-
/// <typeparam name="_CharType">
111-
/// The data type of the basic element of the stream.
112-
/// </typeparam>
113-
template<typename _CharType>
114-
struct char_traits : std::char_traits<_CharType>
115-
{
116-
/// <summary>
117-
/// Some synchronous functions will return this value if the operation
118-
/// requires an asynchronous call in a given situation.
119-
/// </summary>
120-
/// <returns>An <c>int_type</c> value which implies that an asynchronous call is required.</returns>
121-
static typename std::char_traits<_CharType>::int_type requires_async() { return std::char_traits<_CharType>::eof()-1; }
118+
static int_type requires_async() { return eof()-1; }
122119
};
120+
#endif
123121

124122
namespace details {
125123

Release/include/cpprest/asyncrt_utils.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/***
22
* ==++==
33
*
4-
* Copyright (c) Microsoft Corporation. All rights reserved.
4+
* Copyright (c) Microsoft Corporation. All rights reserved.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@
3030
#if defined(_MSC_VER) && (_MSC_VER >= 1800)
3131
#include <ppltasks.h>
3232
namespace pplx = Concurrency;
33-
#else
33+
#else
3434
#include "pplx/pplxtasks.h"
3535
#endif
3636

@@ -250,11 +250,11 @@ namespace details
250250
class windows_category_impl : public std::error_category
251251
{
252252
public:
253-
virtual const char *name() const { return "windows"; }
253+
virtual const char *name() const _noexcept { return "windows"; }
254254

255-
_ASYNCRTIMP virtual std::string message(int errorCode) const;
255+
_ASYNCRTIMP virtual std::string message(int errorCode) const _noexcept;
256256

257-
_ASYNCRTIMP virtual std::error_condition default_error_condition(int errorCode) const;
257+
_ASYNCRTIMP virtual std::error_condition default_error_condition(int errorCode) const _noexcept;
258258
};
259259

260260
/// <summary>

Release/include/cpprest/basic_types.h

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include <cstdint>
4141
#endif
4242

43-
#include "compat/SafeInt3.hpp"
43+
#include "cpprest/details/SafeInt3.hpp"
4444
typedef SafeInt<size_t> SafeSize;
4545

4646
namespace utility
@@ -99,3 +99,29 @@ typedef std::stringstream stringstream_t;
9999
#endif // !_TURN_OFF_PLATFORM_STRING
100100

101101
}// namespace utility
102+
103+
typedef char utf8char;
104+
typedef std::string utf8string;
105+
typedef std::stringstream utf8stringstream;
106+
typedef std::ostringstream utf8ostringstream;
107+
typedef std::ostream utf8ostream;
108+
typedef std::istream utf8istream;
109+
typedef std::istringstream utf8istringstream;
110+
111+
#ifdef _UTF16_STRINGS
112+
typedef wchar_t utf16char;
113+
typedef std::wstring utf16string;
114+
typedef std::wstringstream utf16stringstream;
115+
typedef std::wostringstream utf16ostringstream;
116+
typedef std::wostream utf16ostream;
117+
typedef std::wistream utf16istream;
118+
typedef std::wistringstream utf16istringstream;
119+
#else
120+
typedef char16_t utf16char;
121+
typedef std::u16string utf16string;
122+
typedef std::basic_stringstream<utf16char> utf16stringstream;
123+
typedef std::basic_ostringstream<utf16char> utf16ostringstream;
124+
typedef std::basic_ostream<utf16char> utf16ostream;
125+
typedef std::basic_istream<utf16char> utf16istream;
126+
typedef std::basic_istringstream<utf16char> utf16istringstream;
127+
#endif

Release/include/cpprest/containerstream.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ namespace Concurrency { namespace streams {
325325
{
326326
pos_type beg(0);
327327

328-
// Inorder to support relative seeking from the end postion we need to fix an end position.
328+
// In order to support relative seeking from the end position we need to fix an end position.
329329
// Technically, there is no end for the stream buffer as new writes would just expand the buffer.
330-
// For now, we assume that the current write_end is the end of the buffer. We use this aritifical
330+
// For now, we assume that the current write_end is the end of the buffer. We use this artificial
331331
// end to restrict the read head from seeking beyond what is available.
332332

333333
pos_type end(m_size);

0 commit comments

Comments
 (0)