Skip to content

Commit b16484c

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into passwords
2 parents e01a05c + be02352 commit b16484c

File tree

90 files changed

+1641
-1878
lines changed

Some content is hidden

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

90 files changed

+1641
-1878
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_iOS/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ execute_process(WORKING_DIRECTORY ${ARM_BINARY_DIR}
3535
add_custom_target(sim
3636
COMMAND ${CMAKE_COMMAND}
3737
--build ${SIM_BINARY_DIR}
38-
--target cpprest
3938
--config ${CMAKE_BUILD_TYPE}
4039
COMMENT "Building for i386 (simulator)"
4140
VERBATIM
@@ -45,7 +44,6 @@ add_custom_target(sim
4544
add_custom_target(arm
4645
COMMAND ${CMAKE_COMMAND}
4746
--build ${ARM_BINARY_DIR}
48-
--target cpprest
4947
--config ${CMAKE_BUILD_TYPE}
5048
COMMENT "Building for armv7, armv7s, arm64"
5149
VERBATIM

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ namespace details
250250
class windows_category_impl : public std::error_category
251251
{
252252
public:
253-
virtual const char *name() const _noexcept { return "windows"; }
253+
virtual const char *name() const CPPREST_NOEXCEPT { return "windows"; }
254254

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

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

260260
/// <summary>

Release/include/cpprest/base_uri.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace web {
7070
return *this;
7171
}
7272

73-
uri_components(uri_components &&other) _noexcept :
73+
uri_components(uri_components &&other) CPPREST_NOEXCEPT :
7474
m_scheme(std::move(other.m_scheme)),
7575
m_host(std::move(other.m_host)),
7676
m_user_info(std::move(other.m_user_info)),
@@ -80,7 +80,7 @@ namespace web {
8080
m_port(other.m_port)
8181
{}
8282

83-
uri_components & operator=(uri_components &&other) _noexcept
83+
uri_components & operator=(uri_components &&other) CPPREST_NOEXCEPT
8484
{
8585
if (this != &other)
8686
{
@@ -116,9 +116,9 @@ namespace web {
116116

117117
uri_exception(std::string msg) : m_msg(std::move(msg)) {}
118118

119-
~uri_exception() _noexcept {}
119+
~uri_exception() CPPREST_NOEXCEPT {}
120120

121-
const char* what() const _noexcept
121+
const char* what() const CPPREST_NOEXCEPT
122122
{
123123
return m_msg.c_str();
124124
}
@@ -264,15 +264,15 @@ namespace web {
264264
/// <summary>
265265
/// Move constructor.
266266
/// </summary>
267-
uri(uri &&other) _noexcept :
267+
uri(uri &&other) CPPREST_NOEXCEPT :
268268
m_uri(std::move(other.m_uri)),
269269
m_components(std::move(other.m_components))
270270
{}
271271

272272
/// <summary>
273273
/// Move assignment operator
274274
/// </summary>
275-
uri & operator=(uri &&other) _noexcept
275+
uri & operator=(uri &&other) CPPREST_NOEXCEPT
276276
{
277277
if (this != &other)
278278
{

Release/include/cpprest/basic_types.h

Lines changed: 2 additions & 2 deletions
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
@@ -124,4 +124,4 @@ typedef std::basic_ostringstream<utf16char> utf16ostringstream;
124124
typedef std::basic_ostream<utf16char> utf16ostream;
125125
typedef std::basic_istream<utf16char> utf16istream;
126126
typedef std::basic_istringstream<utf16char> utf16istringstream;
127-
#endif
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)