diff --git a/Release/collateral/Samples/BlackJack/BlackJack_Client/BlackJackClient.cpp b/Release/collateral/Samples/BlackJack/BlackJack_Client/BlackJackClient.cpp index 706ae94516..0975cb1c54 100644 --- a/Release/collateral/Samples/BlackJack/BlackJack_Client/BlackJackClient.cpp +++ b/Release/collateral/Samples/BlackJack/BlackJack_Client/BlackJackClient.cpp @@ -127,7 +127,8 @@ void PrintTable(const http_response &response, bool &refresh) if ( suppressMoney ) ucout << "'" << name.as_string() << "'" ; else - fprintf(stdout, "'%s' Balance = $%02g ", name.as_string().c_str(), bet.as_double()); + ucout << "'" << name.as_string() << "' Balance = $" << bet.as_double() << " "; + PrintHand(suppressMoney, BJHand::FromJSON(player[HAND])); ucout << std::endl; } diff --git a/Release/include/cpprest/http_client.h b/Release/include/cpprest/http_client.h index e312b974b8..20f4dd0ac0 100644 --- a/Release/include/cpprest/http_client.h +++ b/Release/include/cpprest/http_client.h @@ -29,6 +29,16 @@ #ifndef _CASA_HTTP_CLIENT_H #define _CASA_HTTP_CLIENT_H +#if defined (__cplusplus_winrt) +#define __WRL_NO_DEFAULT_LIB__ +#include +#include +namespace web { namespace http{namespace client{ +typedef IXMLHTTPRequest2* native_handle;}}} +#else +namespace web { namespace http{namespace client{ +typedef void* native_handle;}}} +#endif // __cplusplus_winrt #include #include @@ -53,6 +63,16 @@ namespace web { namespace http namespace client { +#ifdef _MS_WINDOWS +namespace details { +#ifdef __cplusplus_winrt + class winrt_client ; +#else + class winhttp_client; +#endif // __cplusplus_winrt +} +#endif // _MS_WINDOWS + /// /// credentials represents a set of user credentials (username and password) to be used /// for the client and proxy authentication @@ -130,6 +150,7 @@ class http_client_config #if !defined(__cplusplus_winrt) , m_validate_certificates(true) #endif + ,m_set_user_nativehandle_options([](native_handle)->void{}) { } @@ -245,6 +266,15 @@ class http_client_config } #endif + /// + /// Sets a callback to enable custom setting of winhttp options + /// + /// A user callback allowing for customization of the request + void set_nativehandle_options(std::function callback) + { + m_set_user_nativehandle_options = callback; + } + private: web_proxy m_proxy; http::client::credentials m_credentials; @@ -255,9 +285,29 @@ class http_client_config #if !defined(__cplusplus_winrt) bool m_validate_certificates; #endif + std::function m_set_user_nativehandle_options; utility::seconds m_timeout; size_t m_chunksize; + +#ifdef _MS_WINDOWS +#ifdef __cplusplus_winrt + friend class details::winrt_client; +#else + friend class details::winhttp_client; +#endif // __cplusplus_winrt +#endif // _MS_WINDOWS + + + /// + /// Invokes a user callback to allow for customization of the requst + /// + /// The internal http_request handle + /// True if users set WinHttp/IXAMLHttpRequest2 options correctly, false otherwise. + void call_user_nativehandle_options(native_handle handle) const + { + m_set_user_nativehandle_options(handle); + } }; /// diff --git a/Release/setup/CasablancaSetup.wxs b/Release/setup/CasablancaSetup.wxs index 09548f5837..1ced3e3e80 100644 --- a/Release/setup/CasablancaSetup.wxs +++ b/Release/setup/CasablancaSetup.wxs @@ -10,11 +10,13 @@ + +