Skip to content

Commit 4c84e46

Browse files
committed
Sync to TFS
1 parent a9b9f8e commit 4c84e46

File tree

37 files changed

+724
-506
lines changed

37 files changed

+724
-506
lines changed

Build/Common.Build.settings

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
<PropertyGroup>
3636
<OutputPath>$(BuildRoot)\Binaries\$(Platform)\$(Configuration)\</OutputPath>
3737
<OutDir>$(OutputPath)</OutDir>
38-
<MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)'==''">$(BuildRoot)\Build\MSBuild.Community.Tasks</MSBuildCommunityTasksPath>
39-
<WixToolPath Condition="'$(WixToolPath)'==''">$(BuildRoot)\Build\Wix\3.6\</WixToolPath>
40-
<WixExtDir Condition="'$(WixExtDir)'==''">$(WixToolPath)</WixExtDir>
4138
<TestRoot>$(BuildRoot)\Release\Tests</TestRoot>
4239
<CasablancaSrcDir>$(BuildRoot)\Release\src</CasablancaSrcDir>
4340
<CasablancaResourceDir>$(BuildRoot)\Release\Resource</CasablancaResourceDir>
@@ -66,11 +63,6 @@
6663
<ErrorReport>prompt</ErrorReport>
6764
<WarningLevel>4</WarningLevel>
6865

69-
<WixTargetsPath>$(WixToolPath)Wix.targets</WixTargetsPath>
70-
<WixTasksPath >$(WixToolPath)WixTasks.dll</WixTasksPath>
71-
<LuxTargetsPath>$(WixToolPath)Lux.targets</LuxTargetsPath>
72-
<LuxTasksPath >$(WixToolPath)LuxTasks.dll</LuxTasksPath>
73-
7466
<!--For C#:-->
7567
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
7668
<!-- RunCodeAnalysis, false by default, is set true as necessary from the msbuild command line. -->
@@ -194,8 +186,6 @@
194186
<DefineConstants>TRACE;ARM</DefineConstants>
195187
</PropertyGroup>
196188

197-
198-
199189
<!--end paths configuration -->
200190
<Target Name="CopyToOutputDirectoryAlwaysError"
201191
Condition="'@(Content)'!='' or '@(None)'!=''">

Release/include/compat/linux_compat.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ typedef struct _SYSTEMTIME {
8888
#define UNREFERENCED_PARAMETER(x) (void)x
8989
#define _ASSERTE(x) assert(x)
9090

91+
#ifdef CASABLANCA_DEPRECATION_NO_WARNINGS
92+
#define CASABLANCA_DEPRECATED(x)
93+
#else
94+
#define CASABLANCA_DEPRECATED(x) __attribute__((deprecated(x)))
95+
#endif
96+
9197
#include <string>
9298

9399
typedef char16_t utf16char;

Release/include/compat/windows_compat.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@
3838

3939
#define _noexcept
4040

41+
#ifdef CASABLANCA_DEPRECATION_NO_WARNINGS
42+
#define CASABLANCA_DEPRECATED(x)
43+
#else
44+
#define CASABLANCA_DEPRECATED(x) __declspec(deprecated(x))
45+
#endif
46+
4147
typedef wchar_t utf16char;
4248
typedef std::wstring utf16string;
4349
typedef std::wstringstream utf16stringstream;

Release/include/cpprest/http_client.h

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,39 @@ class web_proxy
112112
public:
113113
enum web_proxy_mode{ use_default = use_default_, use_auto_discovery = use_auto_discovery_, disabled = disabled_};
114114

115+
/// <summary>
116+
/// Constructs a proxy with the default settings.
117+
/// </summary>
115118
web_proxy() : m_address(_XPLATSTR("")), m_mode(use_default_) {}
119+
120+
/// <summary>
121+
/// Creates a proxy with specified mode.
122+
/// </summary>
123+
/// <param name="mode">Mode to use.</param>
116124
web_proxy( web_proxy_mode mode ) : m_address(_XPLATSTR("")), m_mode(static_cast<web_proxy_mode_internal>(mode)) {}
125+
126+
/// <summary>
127+
/// Creates a proxy explicitly with provided address.
128+
/// </summary>
129+
/// <param name="address">Proxy URI to use.</param>
117130
web_proxy( http::uri address ) : m_address(address), m_mode(user_provided_) {}
118131

132+
/// <summary>
133+
/// Gets this proxy's URI address. Returns an empty URI if not explicitly set by user.
134+
/// </summary>
135+
/// <returns>A reference to this proxy's URI.</returns>
119136
const http::uri& address() const { return m_address; }
120137

138+
/// <summary>
139+
/// Gets the credentials used for authentication with this proxy.
140+
/// </summary>
141+
/// <returns>Credentials to for this proxy.</returns>
121142
const http::client::credentials& credentials() const { return m_credentials; }
143+
144+
/// <summary>
145+
/// Sets the credentials to use for authentication with this proxy.
146+
/// </summary>
147+
/// <param name="cred">Credentials to use for this proxy.</param>
122148
void set_credentials(http::client::credentials cred) {
123149
if( m_mode == disabled_ )
124150
{
@@ -127,9 +153,28 @@ class web_proxy
127153
m_credentials = std::move(cred);
128154
}
129155

156+
/// <summary>
157+
/// Checks if this proxy was constructed with default settings.
158+
/// </summary>
159+
/// <returns>True if default, false otherwise.</param>
130160
bool is_default() const { return m_mode == use_default_; }
161+
162+
/// <summary>
163+
/// Checks if using a proxy is disabled.
164+
/// </summary>
165+
/// <returns>True if disabled, false otherwise.</returns>
131166
bool is_disabled() const { return m_mode == disabled_; }
167+
168+
/// <summary>
169+
/// Checks if the auto discovery protocol, WPAD, is to be used.
170+
/// </summary>
171+
/// <returns>True if auto discovery enabled, false otherwise.</returns>
132172
bool is_auto_discovery() const { return m_mode == use_auto_discovery_; }
173+
174+
/// <summary>
175+
/// Checks if a proxy address is explicitly specified by the user.
176+
/// </summary>
177+
/// <returns>True if a proxy address was explicitly specified, false otherwise.</returns>
133178
bool is_specified() const { return m_mode == user_provided_; }
134179

135180
private:

Release/include/cpprest/http_msg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ class http_response
790790
/// </remarks>
791791
void set_body(const json::value &body_data)
792792
{
793-
auto body_text = utility::conversions::to_utf8string(body_data.to_string());
793+
auto body_text = utility::conversions::to_utf8string(body_data.serialize());
794794
auto length = body_text.size();
795795
set_body(concurrency::streams::bytestream::open_istream(std::move(body_text)), length, _XPLATSTR("application/json"));
796796
}
@@ -1169,7 +1169,7 @@ class http_request
11691169
/// </remarks>
11701170
void set_body(const json::value &body_data)
11711171
{
1172-
auto body_text = utility::conversions::to_utf8string(body_data.to_string());
1172+
auto body_text = utility::conversions::to_utf8string(body_data.serialize());
11731173
auto length = body_text.size();
11741174
set_body(concurrency::streams::bytestream::open_istream(std::move(body_text)), length, _XPLATSTR("application/json"));
11751175
}

0 commit comments

Comments
 (0)