├── .clang-format ├── .gitignore ├── .gitmodules ├── .vscode ├── launch.json └── settings.json ├── Build_android ├── configure.sh └── openssl │ ├── Makefile │ ├── openssl-1.0.2k.patch │ ├── openssl-1.0.2l.patch │ ├── openssl-1.0.2m.patch │ ├── openssl-1.0.2n.patch │ ├── openssl-1.1.0g.patch │ └── openssl-1.1.0j.patch ├── Build_iOS ├── .gitignore ├── CMakeLists.txt ├── README.md └── configure.sh ├── CMakeLists.txt ├── CONTRIBUTORS.txt ├── README.md ├── Release ├── .gitignore ├── CMakeLists.txt ├── cmake │ ├── cpprest_find_boost.cmake │ ├── cpprest_find_brotli.cmake │ ├── cpprest_find_openssl.cmake │ ├── cpprest_find_websocketpp.cmake │ ├── cpprest_find_zlib.cmake │ └── cpprestsdk-config.in.cmake ├── include │ ├── cpprest │ │ ├── astreambuf.h │ │ ├── asyncrt_utils.h │ │ ├── base_uri.h │ │ ├── containerstream.h │ │ ├── details │ │ │ ├── SafeInt3.hpp │ │ │ ├── basic_types.h │ │ │ ├── cpprest_compat.h │ │ │ ├── fileio.h │ │ │ ├── http_constants.dat │ │ │ ├── http_helpers.h │ │ │ ├── http_server.h │ │ │ ├── http_server_api.h │ │ │ ├── nosal.h │ │ │ ├── resource.h │ │ │ └── web_utilities.h │ │ ├── filestream.h │ │ ├── http_client.h │ │ ├── http_compression.h │ │ ├── http_headers.h │ │ ├── http_listener.h │ │ ├── http_msg.h │ │ ├── interopstream.h │ │ ├── json.h │ │ ├── oauth1.h │ │ ├── oauth2.h │ │ ├── producerconsumerstream.h │ │ ├── rawptrstream.h │ │ ├── streams.h │ │ ├── uri.h │ │ ├── uri_builder.h │ │ ├── version.h │ │ ├── ws_client.h │ │ └── ws_msg.h │ └── pplx │ │ ├── pplx.h │ │ ├── pplxcancellation_token.h │ │ ├── pplxconv.h │ │ ├── pplxinterface.h │ │ ├── pplxlinux.h │ │ ├── pplxtasks.h │ │ ├── pplxwin.h │ │ └── threadpool.h ├── public_apis_doxyfile ├── samples │ ├── .gitignore │ ├── BingRequest │ │ ├── CMakeLists.txt │ │ └── bingrequest.cpp │ ├── BlackJack │ │ ├── BlackJack_Client │ │ │ ├── BlackJackClient.cpp │ │ │ └── CMakeLists.txt │ │ ├── BlackJack_Server │ │ │ ├── BlackJack_Server.cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── Dealer.cpp │ │ │ ├── Table.cpp │ │ │ ├── Table.h │ │ │ ├── messagetypes.h │ │ │ ├── stdafx.cpp │ │ │ └── stdafx.h │ │ ├── BlackJack_UIClient │ │ │ ├── App.xaml │ │ │ ├── App.xaml.cpp │ │ │ ├── App.xaml.h │ │ │ ├── Assets │ │ │ │ ├── Logo.png │ │ │ │ ├── SmallLogo.png │ │ │ │ ├── SplashScreen.png │ │ │ │ └── StoreLogo.png │ │ │ ├── BlackJack_UIClient140.vcxproj │ │ │ ├── BlackJack_UIClient141.vcxproj │ │ │ ├── BlackJack_UIClient_TemporaryKey.pfx │ │ │ ├── CardShape.xaml │ │ │ ├── CardShape.xaml.cpp │ │ │ ├── CardShape.xaml.h │ │ │ ├── Cards.PNG │ │ │ ├── Common │ │ │ │ └── StandardStyles.xaml │ │ │ ├── Package.appxmanifest │ │ │ ├── Package.uwp.appxmanifest │ │ │ ├── Player.xaml │ │ │ ├── Player.xaml.cpp │ │ │ ├── Player.xaml.h │ │ │ ├── PlayingTable.xaml │ │ │ ├── PlayingTable.xaml.cpp │ │ │ ├── PlayingTable.xaml.h │ │ │ ├── messagetypes.h │ │ │ ├── pch.cpp │ │ │ └── pch.h │ │ └── CMakeLists.txt │ ├── CMakeLists.txt │ ├── CasaLens │ │ ├── AppCode.html │ │ ├── CasaLens140 │ │ │ └── CasaLens140.vcxproj │ │ ├── CasaLens141 │ │ │ ├── AppCode.html │ │ │ ├── CasaLens141.vcxproj │ │ │ ├── css │ │ │ │ └── default.css │ │ │ ├── image │ │ │ │ ├── bing-logo.jpg │ │ │ │ ├── logo.png │ │ │ │ └── wall.jpg │ │ │ └── js │ │ │ │ └── default.js │ │ ├── ReadMe.txt │ │ ├── casalens.cpp │ │ ├── casalens.h │ │ ├── css │ │ │ └── default.css │ │ ├── datafetcher.cpp │ │ ├── image │ │ │ ├── bing-logo.jpg │ │ │ ├── logo.png │ │ │ └── wall.jpg │ │ ├── js │ │ │ └── default.js │ │ ├── stdafx.cpp │ │ └── stdafx.h │ ├── FacebookDemo │ │ ├── App.xaml │ │ ├── App.xaml.cpp │ │ ├── App.xaml.h │ │ ├── Assets │ │ │ ├── Logo.png │ │ │ ├── SmallLogo.png │ │ │ ├── SplashScreen.png │ │ │ └── StoreLogo.png │ │ ├── Common │ │ │ └── StandardStyles.xaml │ │ ├── Facebook.cpp │ │ ├── Facebook.h │ │ ├── FacebookDemo140.vcxproj │ │ ├── FacebookDemo141.vcxproj │ │ ├── FacebookDemo_TemporaryKey.pfx │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cpp │ │ ├── MainPage.xaml.h │ │ ├── Package.appxmanifest │ │ ├── Package.uwp.appxmanifest │ │ ├── pch.cpp │ │ └── pch.h │ ├── OAuth2Live │ │ ├── App.xaml │ │ ├── App.xaml.cpp │ │ ├── App.xaml.h │ │ ├── Assets │ │ │ ├── Logo.png │ │ │ ├── SmallLogo.png │ │ │ ├── SplashScreen.png │ │ │ └── StoreLogo.png │ │ ├── Common │ │ │ └── StandardStyles.xaml │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cpp │ │ ├── MainPage.xaml.h │ │ ├── OAuth2Live140.vcxproj │ │ ├── OAuth2Live141.vcxproj │ │ ├── OAuth2Live_TemporaryKey.pfx │ │ ├── Package.appxmanifest │ │ ├── Package.uwp.appxmanifest │ │ ├── pch.cpp │ │ └── pch.h │ ├── Oauth1Client │ │ ├── CMakeLists.txt │ │ └── Oauth1Client.cpp │ ├── Oauth2Client │ │ ├── CMakeLists.txt │ │ └── Oauth2Client.cpp │ ├── Regenerate-Certificates.ps1 │ ├── SearchFile │ │ ├── CMakeLists.txt │ │ └── searchfile.cpp │ └── WindowsLiveAuth │ │ ├── App.xaml │ │ ├── App.xaml.cpp │ │ ├── App.xaml.h │ │ ├── Assets │ │ ├── Logo.png │ │ ├── SmallLogo.png │ │ ├── SplashScreen.png │ │ └── StoreLogo.png │ │ ├── Common │ │ └── StandardStyles.xaml │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cpp │ │ ├── MainPage.xaml.h │ │ ├── Package.appxmanifest │ │ ├── WindowsLiveAuth140.vcxproj │ │ ├── WindowsLiveAuth141.vcxproj │ │ ├── WindowsLiveAuth_TemporaryKey.pfx │ │ ├── live_connect.h │ │ ├── pch.cpp │ │ └── pch.h ├── src │ ├── .gitignore │ ├── CMakeLists.txt │ ├── http │ │ ├── client │ │ │ ├── http_client.cpp │ │ │ ├── http_client_asio.cpp │ │ │ ├── http_client_impl.h │ │ │ ├── http_client_msg.cpp │ │ │ ├── http_client_winhttp.cpp │ │ │ ├── http_client_winrt.cpp │ │ │ └── x509_cert_utilities.cpp │ │ ├── common │ │ │ ├── connection_pool_helpers.h │ │ │ ├── http_compression.cpp │ │ │ ├── http_helpers.cpp │ │ │ ├── http_msg.cpp │ │ │ ├── internal_http_helpers.h │ │ │ └── x509_cert_utilities.h │ │ ├── listener │ │ │ ├── http_listener.cpp │ │ │ ├── http_listener_msg.cpp │ │ │ ├── http_server_api.cpp │ │ │ ├── http_server_asio.cpp │ │ │ ├── http_server_httpsys.cpp │ │ │ ├── http_server_httpsys.h │ │ │ └── http_server_impl.h │ │ └── oauth │ │ │ ├── oauth1.cpp │ │ │ └── oauth2.cpp │ ├── json │ │ ├── json.cpp │ │ ├── json_parsing.cpp │ │ └── json_serialization.cpp │ ├── pch │ │ ├── stdafx.cpp │ │ └── stdafx.h │ ├── pplx │ │ ├── pplx.cpp │ │ ├── pplxapple.cpp │ │ ├── pplxlinux.cpp │ │ ├── pplxwin.cpp │ │ └── threadpool.cpp │ ├── streams │ │ ├── fileio_posix.cpp │ │ ├── fileio_win32.cpp │ │ └── fileio_winrt.cpp │ ├── uri │ │ ├── uri.cpp │ │ └── uri_builder.cpp │ ├── utilities │ │ ├── Resource.rc │ │ ├── asyncrt_utils.cpp │ │ ├── base64.cpp │ │ └── web_utilities.cpp │ └── websockets │ │ └── client │ │ ├── ws_client.cpp │ │ ├── ws_client_impl.h │ │ ├── ws_client_winrt.cpp │ │ ├── ws_client_wspp.cpp │ │ └── ws_msg.cpp └── tests │ ├── .gitignore │ ├── CMakeLists.txt │ ├── common │ ├── CMakeLists.txt │ ├── TestRunner │ │ ├── CMakeLists.txt │ │ ├── test_module_loader.cpp │ │ ├── test_module_loader.h │ │ └── test_runner.cpp │ ├── UnitTestpp │ │ ├── CMakeLists.txt │ │ ├── COPYING │ │ ├── ThirdPartyNotices.txt │ │ ├── config.h │ │ ├── src │ │ │ ├── AssertException.cpp │ │ │ ├── AssertException.h │ │ │ ├── CheckMacros.h │ │ │ ├── Checks.h │ │ │ ├── CompositeTestReporter.cpp │ │ │ ├── CompositeTestReporter.h │ │ │ ├── CurrentTest.cpp │ │ │ ├── CurrentTest.h │ │ │ ├── DeferredTestReporter.cpp │ │ │ ├── DeferredTestReporter.h │ │ │ ├── DeferredTestResult.cpp │ │ │ ├── DeferredTestResult.h │ │ │ ├── ExceptionMacros.h │ │ │ ├── ExecuteTest.h │ │ │ ├── GlobalSettings.cpp │ │ │ ├── GlobalSettings.h │ │ │ ├── HelperMacros.h │ │ │ ├── MemoryOutStream.cpp │ │ │ ├── MemoryOutStream.h │ │ │ ├── Posix │ │ │ │ ├── SignalTranslator.cpp │ │ │ │ ├── SignalTranslator.h │ │ │ │ ├── TimeHelpers.cpp │ │ │ │ └── TimeHelpers.h │ │ │ ├── ReportAssert.cpp │ │ │ ├── ReportAssert.h │ │ │ ├── ReportAssertImpl.h │ │ │ ├── Test.cpp │ │ │ ├── Test.h │ │ │ ├── TestDetails.cpp │ │ │ ├── TestDetails.h │ │ │ ├── TestList.cpp │ │ │ ├── TestList.h │ │ │ ├── TestMacros.h │ │ │ ├── TestProperties.h │ │ │ ├── TestReporter.cpp │ │ │ ├── TestReporter.h │ │ │ ├── TestReporterStdout.cpp │ │ │ ├── TestReporterStdout.h │ │ │ ├── TestResults.cpp │ │ │ ├── TestResults.h │ │ │ ├── TestRunner.cpp │ │ │ ├── TestRunner.h │ │ │ ├── TestSuite.h │ │ │ ├── TimeHelpers.h │ │ │ ├── Win32 │ │ │ │ ├── TimeHelpers.cpp │ │ │ │ └── TimeHelpers.h │ │ │ ├── XmlTestReporter.cpp │ │ │ ├── XmlTestReporter.h │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ └── tests │ │ │ │ ├── RecordingReporter.h │ │ │ │ ├── ScopedCurrentTest.h │ │ │ │ ├── TestAssertHandler.cpp │ │ │ │ ├── TestCheckMacros.cpp │ │ │ │ ├── TestChecks.cpp │ │ │ │ ├── TestCompositeTestReporter.cpp │ │ │ │ ├── TestCurrentTest.cpp │ │ │ │ ├── TestDeferredTestReporter.cpp │ │ │ │ ├── TestMemoryOutStream.cpp │ │ │ │ ├── TestTest.cpp │ │ │ │ ├── TestTestList.cpp │ │ │ │ ├── TestTestMacros.cpp │ │ │ │ ├── TestTestResults.cpp │ │ │ │ ├── TestTestRunner.cpp │ │ │ │ ├── TestTestSuite.cpp │ │ │ │ ├── TestUnitTestPP.cpp │ │ │ │ ├── TestXmlTestReporter.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ └── unittestpp.h │ └── utilities │ │ ├── CMakeLists.txt │ │ ├── include │ │ ├── common_utilities_public.h │ │ ├── locale_guard.h │ │ └── os_utilities.h │ │ └── os_utilities.cpp │ └── functional │ ├── CMakeLists.txt │ ├── http │ ├── CMakeLists.txt │ ├── client │ │ ├── CMakeLists.txt │ │ ├── authentication_tests.cpp │ │ ├── building_request_tests.cpp │ │ ├── client_construction.cpp │ │ ├── compression_tests.cpp │ │ ├── connection_pool_tests.cpp │ │ ├── connections_and_errors.cpp │ │ ├── header_tests.cpp │ │ ├── http_client_fuzz_tests.cpp │ │ ├── http_client_tests.cpp │ │ ├── http_client_tests.h │ │ ├── http_methods_tests.cpp │ │ ├── multiple_requests.cpp │ │ ├── oauth1_tests.cpp │ │ ├── oauth2_tests.cpp │ │ ├── outside_tests.cpp │ │ ├── pipeline_stage_tests.cpp │ │ ├── progress_handler_tests.cpp │ │ ├── proxy_tests.cpp │ │ ├── request_helper_tests.cpp │ │ ├── request_stream_tests.cpp │ │ ├── request_uri_tests.cpp │ │ ├── response_extract_tests.cpp │ │ ├── response_stream_tests.cpp │ │ ├── status_code_reason_phrase_tests.cpp │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ ├── timeout_handler.h │ │ └── to_string_tests.cpp │ ├── listener │ │ ├── CMakeLists.txt │ │ ├── building_response_tests.cpp │ │ ├── connections_and_errors.cpp │ │ ├── header_tests.cpp │ │ ├── http_listener_tests.h │ │ ├── listener_construction_tests.cpp │ │ ├── reply_helper_tests.cpp │ │ ├── request_extract_tests.cpp │ │ ├── request_handler_tests.cpp │ │ ├── request_relative_uri_tests.cpp │ │ ├── request_stream_tests.cpp │ │ ├── requests_tests.cpp │ │ ├── response_stream_tests.cpp │ │ ├── status_code_reason_phrase_tests.cpp │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── to_string_tests.cpp │ └── utilities │ │ ├── CMakeLists.txt │ │ ├── http_asserts.cpp │ │ ├── include │ │ ├── http_asserts.h │ │ ├── http_test_utilities.h │ │ ├── http_test_utilities_public.h │ │ ├── test_http_client.h │ │ ├── test_http_server.h │ │ └── test_server_utilities.h │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ ├── test_http_client.cpp │ │ ├── test_http_server.cpp │ │ └── test_server_utilities.cpp │ ├── json │ ├── CMakeLists.txt │ ├── construction_tests.cpp │ ├── fuzz_tests.cpp │ ├── iterator_tests.cpp │ ├── json_numbers_tests.cpp │ ├── json_tests.h │ ├── negative_parsing_tests.cpp │ ├── parsing_tests.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ └── to_as_and_operators_tests.cpp │ ├── misc │ └── atl_headers │ │ ├── Resource.h │ │ ├── header_test.rc │ │ ├── header_test1.cpp │ │ └── header_test2.cpp │ ├── pplx │ ├── CMakeLists.txt │ └── pplx_test │ │ ├── CMakeLists.txt │ │ ├── pplx_op_test.cpp │ │ ├── pplx_task_options.cpp │ │ ├── pplxtask_tests.cpp │ │ ├── stdafx.cpp │ │ └── stdafx.h │ ├── streams │ ├── CMakeLists.txt │ ├── CppSparseFile.cpp │ ├── CppSparseFile.h │ ├── fstreambuf_tests.cpp │ ├── fuzz_tests.cpp │ ├── istream_tests.cpp │ ├── memstream_tests.cpp │ ├── ostream_tests.cpp │ ├── prefix.h │ ├── stdafx.cpp │ ├── stdafx.h │ ├── stdstream_tests.cpp │ ├── streams_tests.h │ └── winrt_interop_tests.cpp │ ├── uri │ ├── CMakeLists.txt │ ├── accessor_tests.cpp │ ├── combining_tests.cpp │ ├── constructor_tests.cpp │ ├── conversions_tests.cpp │ ├── diagnostic_tests.cpp │ ├── encoding_tests.cpp │ ├── operator_tests.cpp │ ├── resolve_uri_tests.cpp │ ├── splitting_tests.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ ├── uri_builder_tests.cpp │ └── uri_tests.h │ ├── utils │ ├── CMakeLists.txt │ ├── base64.cpp │ ├── datetime.cpp │ ├── macro_test.cpp │ ├── nonce_generator_tests.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ ├── strings.cpp │ ├── utils_tests.h │ └── win32_encryption_tests.cpp │ └── websockets │ ├── CMakeLists.txt │ ├── client │ ├── authentication_tests.cpp │ ├── client_construction.cpp │ ├── close_tests.cpp │ ├── error_tests.cpp │ ├── proxy_tests.cpp │ ├── receive_msg_tests.cpp │ ├── send_msg_tests.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ └── websocket_client_tests.h │ └── utilities │ ├── stdafx.cpp │ ├── stdafx.h │ ├── test_websocket_server.cpp │ └── test_websocket_server.h ├── ThirdPartyNotices.txt ├── azure-pipelines.yml ├── changelog.md └── license.txt /.clang-format: -------------------------------------------------------------------------------- 1 | # https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormatStyleOptions.html 2 | 3 | --- 4 | Language: Cpp 5 | 6 | BasedOnStyle: WebKit 7 | 8 | AlignAfterOpenBracket: Align 9 | AlignOperands: true 10 | AlignTrailingComments: true 11 | AllowAllParametersOfDeclarationOnNextLine: true 12 | AllowShortBlocksOnASingleLine: false 13 | AllowShortCaseLabelsOnASingleLine: true 14 | AllowShortFunctionsOnASingleLine: All 15 | AllowShortIfStatementsOnASingleLine: true 16 | AllowShortLoopsOnASingleLine: false 17 | AlwaysBreakTemplateDeclarations: true 18 | BinPackArguments: false 19 | BinPackParameters: false 20 | BreakBeforeBinaryOperators: None 21 | BreakBeforeBraces: Allman 22 | BreakConstructorInitializersBeforeComma: true 23 | ColumnLimit: 120 24 | ConstructorInitializerAllOnOneLineOrOnePerLine: true 25 | Cpp11BracedListStyle: true 26 | FixNamespaceComments: true 27 | IncludeBlocks: Regroup 28 | IncludeCategories: 29 | - Regex: '^["<](stdafx|pch)\.h[">]$' 30 | Priority: -1 31 | - Regex: '^$' 32 | Priority: 3 33 | - Regex: '^<(WinIoCtl|winhttp|Shellapi)\.h>$' 34 | Priority: 4 35 | - Regex: '.*' 36 | Priority: 2 37 | IndentCaseLabels: true 38 | IndentWidth: 4 39 | KeepEmptyLinesAtTheStartOfBlocks: false 40 | MaxEmptyLinesToKeep: 2 41 | NamespaceIndentation: None 42 | PenaltyReturnTypeOnItsOwnLine: 1000 43 | PointerAlignment: Left 44 | SpaceAfterTemplateKeyword: false 45 | Standard: Cpp11 46 | UseTab: Never 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Visual Studio files 2 | *.o 3 | *.d 4 | *.so 5 | *.[Oo]bj 6 | *.user 7 | *.aps 8 | *.pch 9 | *.vspscc 10 | *.vssscc 11 | *_i.c 12 | *_p.c 13 | *.ncb 14 | *.suo 15 | *.tlb 16 | *.tlh 17 | *.bak 18 | *.[Cc]ache 19 | *.ilk 20 | *.log 21 | *.lib 22 | *.sbr 23 | *.sdf 24 | *.sdf 25 | *.opensdf 26 | *.pdb 27 | *.idb 28 | *.res 29 | *.unsuccessfulbuild 30 | *.lastbuildstate 31 | *.tlog 32 | *.intermediate 33 | *.dll 34 | *.exp 35 | *.exe 36 | *.manifest 37 | *.rc 38 | *~ 39 | ipch/ 40 | obj/ 41 | # OSX files 42 | *.xccheckout 43 | *.pbxuser 44 | *.mode1v3 45 | *.mode2v3 46 | *.perspective3 47 | !default.pbxuser 48 | !default.mode1v3 49 | !default.mode2v3 50 | !default.perspective3 51 | xcuserdata 52 | *.xcuserstate 53 | .DS_Store 54 | .Trashes 55 | *.swp 56 | *.lock 57 | *~.nib 58 | *.resfiles 59 | [Bb]in 60 | Binaries/ 61 | Intermediate/ 62 | # The packages folder can be ignored because of Package Restore 63 | **/packages/* 64 | # except build/, which is used as an MSBuild target. 65 | !**/packages/build/ 66 | .vs/ 67 | # Ignore cmake building directories 68 | build.*/ 69 | docs/ 70 | # Ignore NuGet artifacts 71 | .nuget/ 72 | Build_android/build/ 73 | Generated Files/ 74 | # Ignore iOS temp build directories 75 | Build_iOS/Apple-Boost-BuildScript 76 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vcpkg"] 2 | path = vcpkg 3 | url = https://github.com/Microsoft/vcpkg 4 | [submodule "websocketspp"] 5 | path = Release/libs/websocketpp 6 | url = https://github.com/zaphoyd/websocketpp/ 7 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "(Windows) Launch Debug Tests", 9 | "type": "cppvsdbg", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/build.debug/Release/Binaries/test_runner.exe", 12 | "args": ["*testd.dll"], 13 | "stopAtEntry": false, 14 | "cwd": "${workspaceFolder}/build.debug/Release/Binaries", 15 | "environment": [], 16 | "externalConsole": true 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.watcherExclude": { 3 | "**/.git/objects/**": true, 4 | "**/.git/subtree-cache/**": true, 5 | "**/node_modules/*/**": true, 6 | "**/vcpkg/**": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Build_iOS/.gitignore: -------------------------------------------------------------------------------- 1 | # iOS folders that dependencies get stored in 2 | boostoniphone/ 3 | boost 4 | boost.framework/ 5 | ios-cmake/ 6 | openssl/ 7 | OpenSSL-for-iPhone/ -------------------------------------------------------------------------------- /Build_iOS/README.md: -------------------------------------------------------------------------------- 1 | Please consult the documentation [here](https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-iOS) for iOS compilation. 2 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | project(cpprestsdk-root NONE) 3 | enable_testing() 4 | add_subdirectory(Release) 5 | -------------------------------------------------------------------------------- /CONTRIBUTORS.txt: -------------------------------------------------------------------------------- 1 | Contributors should submit an update to this file with a commit in order to receive recognition. Thank you for your contributions. 2 | 3 | 4 | List of Contributors 5 | ==================== 6 | 7 | Microsoft Corporation 8 | Brian Wengert (bwengert79) 9 | Leslie Brody (Les1966) 10 | Michael M (M1xa) 11 | Matt Peterson (MattPeterson1) 12 | Dmitry Kolomiets (kolomiets) 13 | rdeterre 14 | DeCarabas 15 | luisfeliu 16 | intercommiura 17 | halex2005 18 | simonlep 19 | jracle 20 | gandziej 21 | adish 22 | LeonidCSIT 23 | kreuzerkrieg 24 | evanc 25 | Jesse Towner (jwtowner) 26 | 27 | Abinsula s.r.l. 28 | Gianfranco Costamagna (LocutusOfBorg) 29 | 30 | AutoDesk Inc. 31 | Cyrille Fauvel (cyrillef) 32 | 33 | Illumina Inc. 34 | Gery Vessere (gery@vessere.com) 35 | 36 | Cisco Systems 37 | Gergely Lukacsy (glukacsy) 38 | Chris Deering (deeringc) 39 | 40 | Ocedo GmbH 41 | Henning Pfeiffer (megaposer) 42 | 43 | thomasschaub 44 | 45 | Trimble 46 | Tim Boundy (gigaplex) 47 | 48 | Rami Abughazaleh (icnocop) 49 | 50 | TastenTrick 51 | Christian Deneke (chris0x44) 52 | 53 | leetal 54 | 55 | Benjamin Lee (mobileben) 56 | René Meusel (reneme) 57 | 58 | Sony Corporation 59 | Gareth Sylvester-Bradley (garethsb-sony) 60 | -------------------------------------------------------------------------------- /Release/.gitignore: -------------------------------------------------------------------------------- 1 | .ninja_* 2 | *.ninja 3 | CMakeFiles/ 4 | CMakeCache.txt 5 | CTestTestfile.cmake 6 | cmake_install.cmake 7 | -------------------------------------------------------------------------------- /Release/cmake/cpprest_find_brotli.cmake: -------------------------------------------------------------------------------- 1 | function(cpprest_find_brotli) 2 | if(TARGET cpprestsdk_brotli_internal) 3 | return() 4 | endif() 5 | 6 | 7 | find_package(PkgConfig) 8 | pkg_check_modules(BROTLIENC libbrotlienc) 9 | pkg_check_modules(BROTLIDEC libbrotlidec) 10 | if(BROTLIDEC_FOUND AND BROTLIENC_FOUND) 11 | target_link_libraries(cpprest PRIVATE ${BROTLIDEC_LDFLAGS} ${BROTLIENC_LDFLAGS}) 12 | else(BROTLIDEC_FOUND AND BROTLIENC_FOUND) 13 | find_package(unofficial-brotli REQUIRED) 14 | add_library(cpprestsdk_brotli_internal INTERFACE) 15 | target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon) 16 | target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal) 17 | endif(BROTLIDEC_FOUND AND BROTLIENC_FOUND) 18 | 19 | endfunction() 20 | -------------------------------------------------------------------------------- /Release/cmake/cpprest_find_websocketpp.cmake: -------------------------------------------------------------------------------- 1 | function(cpprest_find_websocketpp) 2 | if(TARGET cpprestsdk_websocketpp_internal) 3 | return() 4 | endif() 5 | 6 | find_package(WEBSOCKETPP CONFIG QUIET) 7 | if(WEBSOCKETPP_FOUND) 8 | message("-- Found websocketpp version " ${WEBSOCKETPP_VERSION} " on system") 9 | set(WEBSOCKETPP_INCLUDE_DIR ${WEBSOCKETPP_INCLUDE_DIR} CACHE INTERNAL "") 10 | elseif(EXISTS ${PROJECT_SOURCE_DIR}/libs/websocketpp/CMakeLists.txt) 11 | message("-- websocketpp not found, using the embedded version") 12 | set(WEBSOCKETPP_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/libs/websocketpp CACHE INTERNAL "") 13 | else() 14 | message(FATAL_ERROR "-- websocketpp not found and embedded version not present; try `git submodule update --init` and run CMake again") 15 | endif() 16 | 17 | cpprest_find_boost() 18 | cpprest_find_openssl() 19 | 20 | add_library(cpprestsdk_websocketpp_internal INTERFACE) 21 | target_include_directories(cpprestsdk_websocketpp_internal INTERFACE "$") 22 | target_link_libraries(cpprestsdk_websocketpp_internal 23 | INTERFACE 24 | cpprestsdk_boost_internal 25 | cpprestsdk_openssl_internal 26 | ) 27 | endfunction() 28 | -------------------------------------------------------------------------------- /Release/cmake/cpprest_find_zlib.cmake: -------------------------------------------------------------------------------- 1 | function(cpprest_find_zlib) 2 | if(TARGET cpprestsdk_zlib_internal) 3 | return() 4 | endif() 5 | 6 | if(APPLE AND NOT IOS) 7 | # Prefer the homebrew version of zlib 8 | find_library(ZLIB_LIBRARY NAMES libz.a PATHS /usr/local/Cellar/zlib/1.2.8/lib NO_DEFAULT_PATH) 9 | find_path(ZLIB_INCLUDE_DIRS NAMES zlib.h PATHS /usr/local/Cellar/zlib/1.2.8/include NO_DEFAULT_PATH) 10 | 11 | if(NOT ZLIB_LIBRARY OR NOT ZLIB_INCLUDE_DIRS) 12 | find_package(ZLIB REQUIRED) 13 | endif() 14 | else() 15 | find_package(ZLIB REQUIRED) 16 | endif() 17 | 18 | add_library(cpprestsdk_zlib_internal INTERFACE) 19 | if(TARGET ZLIB::ZLIB) 20 | target_link_libraries(cpprestsdk_zlib_internal INTERFACE ZLIB::ZLIB) 21 | else() 22 | target_link_libraries(cpprestsdk_zlib_internal INTERFACE "$") 23 | target_include_directories(cpprestsdk_zlib_internal INTERFACE "$") 24 | endif() 25 | endfunction() 26 | -------------------------------------------------------------------------------- /Release/cmake/cpprestsdk-config.in.cmake: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | if(@CPPREST_USES_ZLIB@) 3 | find_dependency(ZLIB) 4 | endif() 5 | 6 | if(@CPPREST_USES_BROTLI@) 7 | find_dependency(unofficial-brotli) 8 | endif() 9 | 10 | if(@CPPREST_USES_OPENSSL@) 11 | find_dependency(OpenSSL) 12 | endif() 13 | 14 | if(@CPPREST_USES_BOOST@ AND OFF) 15 | if(UNIX) 16 | find_dependency(Boost COMPONENTS random system thread filesystem chrono atomic date_time regex) 17 | else() 18 | find_dependency(Boost COMPONENTS system date_time regex) 19 | endif() 20 | endif() 21 | include("${CMAKE_CURRENT_LIST_DIR}/cpprestsdk-targets.cmake") 22 | -------------------------------------------------------------------------------- /Release/include/cpprest/details/http_helpers.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * Implementation Details of the http.h layer of messaging 8 | * 9 | * Functions and types for interoperating with http.h from modern C++ 10 | * This file includes windows definitions and should not be included in a public header 11 | * 12 | * For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk 13 | * 14 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 15 | ****/ 16 | #pragma once 17 | 18 | #include "cpprest/details/basic_types.h" 19 | #include "cpprest/http_msg.h" 20 | 21 | namespace web 22 | { 23 | namespace http 24 | { 25 | namespace details 26 | { 27 | namespace chunked_encoding 28 | { 29 | // Transfer-Encoding: chunked support 30 | static const size_t additional_encoding_space = 12; 31 | static const size_t data_offset = additional_encoding_space - 2; 32 | 33 | // Add the data necessary for properly sending data with transfer-encoding: chunked. 34 | // 35 | // There are up to 12 additional bytes needed for each chunk: 36 | // 37 | // The last chunk requires 5 bytes, and is fixed. 38 | // All other chunks require up to 8 bytes for the length, and four for the two CRLF 39 | // delimiters. 40 | // 41 | _ASYNCRTIMP size_t __cdecl add_chunked_delimiters(_Out_writes_(buffer_size) uint8_t* data, 42 | _In_ size_t buffer_size, 43 | size_t bytes_read); 44 | } // namespace chunked_encoding 45 | 46 | } // namespace details 47 | } // namespace http 48 | } // namespace web 49 | -------------------------------------------------------------------------------- /Release/include/cpprest/details/http_server.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * HTTP Library: interface to implement HTTP server to service http_listeners. 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #pragma once 13 | 14 | #if _WIN32_WINNT < _WIN32_WINNT_VISTA 15 | #error "Error: http server APIs are not supported in XP" 16 | #endif //_WIN32_WINNT < _WIN32_WINNT_VISTA 17 | 18 | #include "cpprest/http_listener.h" 19 | 20 | namespace web 21 | { 22 | namespace http 23 | { 24 | namespace experimental 25 | { 26 | namespace details 27 | { 28 | /// 29 | /// Interface http listeners interact with for receiving and responding to http requests. 30 | /// 31 | class http_server 32 | { 33 | public: 34 | /// 35 | /// Release any held resources. 36 | /// 37 | virtual ~http_server() {}; 38 | 39 | /// 40 | /// Start listening for incoming requests. 41 | /// 42 | virtual pplx::task start() = 0; 43 | 44 | /// 45 | /// Registers an http listener. 46 | /// 47 | virtual pplx::task register_listener( 48 | _In_ web::http::experimental::listener::details::http_listener_impl* pListener) = 0; 49 | 50 | /// 51 | /// Unregisters an http listener. 52 | /// 53 | virtual pplx::task unregister_listener( 54 | _In_ web::http::experimental::listener::details::http_listener_impl* pListener) = 0; 55 | 56 | /// 57 | /// Stop processing and listening for incoming requests. 58 | /// 59 | virtual pplx::task stop() = 0; 60 | 61 | /// 62 | /// Asynchronously sends the specified http response. 63 | /// 64 | /// The http_response to send. 65 | /// A operation which is completed once the response has been sent. 66 | virtual pplx::task respond(http::http_response response) = 0; 67 | }; 68 | 69 | } // namespace details 70 | } // namespace experimental 71 | } // namespace http 72 | } // namespace web 73 | -------------------------------------------------------------------------------- /Release/include/cpprest/details/nosal.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * 6 | * For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk 7 | * 8 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 9 | ***/ 10 | 11 | #pragma once 12 | // selected MS SAL annotations 13 | 14 | #ifdef _In_ 15 | #undef _In_ 16 | #endif 17 | #define _In_ 18 | 19 | #ifdef _Inout_ 20 | #undef _Inout_ 21 | #endif 22 | #define _Inout_ 23 | 24 | #ifdef _Out_ 25 | #undef _Out_ 26 | #endif 27 | #define _Out_ 28 | 29 | #ifdef _In_z_ 30 | #undef _In_z_ 31 | #endif 32 | #define _In_z_ 33 | 34 | #ifdef _Out_z_ 35 | #undef _Out_z_ 36 | #endif 37 | #define _Out_z_ 38 | 39 | #ifdef _Inout_z_ 40 | #undef _Inout_z_ 41 | #endif 42 | #define _Inout_z_ 43 | 44 | #ifdef _In_opt_ 45 | #undef _In_opt_ 46 | #endif 47 | #define _In_opt_ 48 | 49 | #ifdef _Out_opt_ 50 | #undef _Out_opt_ 51 | #endif 52 | #define _Out_opt_ 53 | 54 | #ifdef _Inout_opt_ 55 | #undef _Inout_opt_ 56 | #endif 57 | #define _Inout_opt_ 58 | 59 | #ifdef _Out_writes_ 60 | #undef _Out_writes_ 61 | #endif 62 | #define _Out_writes_(x) 63 | 64 | #ifdef _Out_writes_opt_ 65 | #undef _Out_writes_opt_ 66 | #endif 67 | #define _Out_writes_opt_(x) 68 | 69 | #ifdef _In_reads_ 70 | #undef _In_reads_ 71 | #endif 72 | #define _In_reads_(x) 73 | 74 | #ifdef _Inout_updates_bytes_ 75 | #undef _Inout_updates_bytes_ 76 | #endif 77 | #define _Inout_updates_bytes_(x) 78 | -------------------------------------------------------------------------------- /Release/include/cpprest/details/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /Release/include/cpprest/uri.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * Protocol independent support for URIs. 8 | * 9 | * For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk 10 | * 11 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 12 | ****/ 13 | #pragma once 14 | 15 | #ifndef CASA_URI_H 16 | #define CASA_URI_H 17 | 18 | #include "cpprest/base_uri.h" 19 | #include "cpprest/uri_builder.h" 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Release/include/cpprest/version.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | */ 6 | #define CPPREST_VERSION_MINOR 10 7 | #define CPPREST_VERSION_MAJOR 2 8 | #define CPPREST_VERSION_REVISION 13 9 | 10 | #define CPPREST_VERSION (CPPREST_VERSION_MAJOR * 100000 + CPPREST_VERSION_MINOR * 100 + CPPREST_VERSION_REVISION) 11 | -------------------------------------------------------------------------------- /Release/samples/.gitignore: -------------------------------------------------------------------------------- 1 | *.cmake 2 | -------------------------------------------------------------------------------- /Release/samples/BingRequest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) 2 | add_executable(BingRequest bingrequest.cpp) 3 | target_link_libraries(BingRequest cpprest) 4 | endif() -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_Client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (UNIX) 2 | add_definitions(-Wno-switch) 3 | endif() 4 | 5 | add_executable(blackjackclient 6 | BlackJackClient.cpp 7 | ) 8 | 9 | target_link_libraries(blackjackclient cpprest) 10 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_Server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (UNIX) 2 | add_definitions(-Wno-sign-compare -Wno-enum-compare) 3 | endif() 4 | 5 | add_executable(blackjackserver 6 | BlackJack_Server.cpp 7 | Dealer.cpp 8 | Table.cpp 9 | ) 10 | 11 | target_link_libraries(blackjackserver cpprest) 12 | 13 | if(MSVC) 14 | get_target_property(_srcs blackjackserver SOURCES) 15 | if(NOT CMAKE_GENERATOR MATCHES "Visual Studio .*") 16 | set_property(SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/blackjack-server-stdafx.pch") 17 | set_property(SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/blackjack-server-stdafx.pch") 18 | endif() 19 | set_source_files_properties(stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h /Fpblackjack-server-stdafx.pch /Zm120") 20 | target_sources(blackjackserver PRIVATE stdafx.cpp) 21 | target_compile_options(blackjackserver PRIVATE /Yustdafx.h /Fpblackjack-server-stdafx.pch /Zm120) 22 | endif() 23 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_Server/Table.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * Table.h 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #pragma once 13 | #include "stdafx.h" 14 | 15 | #ifdef _WIN32 16 | #include 17 | #endif 18 | #include "messagetypes.h" 19 | #include 20 | #include 21 | #include 22 | 23 | class DealerTable : public BJTable 24 | { 25 | public: 26 | DealerTable() : m_currentPlayer(0), m_betsMade(0), m_betting(true) 27 | { 28 | _init(); 29 | FillShoe(6); 30 | } 31 | DealerTable(int id, size_t capacity, int decks) 32 | : BJTable(id, capacity), m_currentPlayer(0), m_betsMade(0), m_betting(true) 33 | { 34 | _init(); 35 | FillShoe(decks); 36 | } 37 | 38 | void Deal(); 39 | void Hit(web::http::http_request); 40 | void Stay(web::http::http_request); // True if it's now your turn again, such as when you're the only player... 41 | 42 | void DoubleDown(web::http::http_request); 43 | void Bet(web::http::http_request); 44 | void Insure(web::http::http_request); 45 | 46 | void Wait(web::http::http_request); 47 | 48 | bool AddPlayer(const Player& player); 49 | bool RemovePlayer(const utility::string_t& name); 50 | 51 | private: 52 | void FillShoe(size_t decks); 53 | void DealerDeal(); 54 | void PayUp(size_t playerId); 55 | void NextPlayer(web::http::http_request); 56 | 57 | int FindPlayer(const utility::string_t& name); 58 | 59 | void _init() 60 | { 61 | m_responses.push_back(message_wrapper()); 62 | m_pendingrefresh.push_back(ST_None); 63 | } 64 | 65 | int m_stopAt; 66 | std::queue m_shoe; 67 | 68 | bool m_betting; 69 | 70 | pplx::extensibility::critical_section_t m_resplock; 71 | 72 | typedef std::shared_ptr message_wrapper; 73 | 74 | std::vector m_pendingrefresh; 75 | std::vector m_responses; 76 | 77 | int m_currentPlayer; 78 | int m_betsMade; 79 | }; 80 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_Server/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * stdafx.cpp : source file that includes just the standard includes 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #include "stdafx.h" 13 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_Server/stdafx.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * stdafx.h : include file for standard system include files, 8 | * or project specific include files that are used frequently, 9 | * but are changed infrequently 10 | * 11 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 12 | ****/ 13 | 14 | #pragma once 15 | 16 | #include "cpprest/asyncrt_utils.h" 17 | #include "cpprest/http_listener.h" 18 | #include "cpprest/json.h" 19 | #include "cpprest/uri.h" 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #ifdef _WIN32 29 | #ifndef NOMINMAX 30 | #define NOMINMAX 31 | #endif 32 | #include 33 | #else 34 | #include 35 | #endif 36 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/App.xaml.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * App.xaml.h - Declaration of the App class. 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #pragma once 13 | 14 | #include "App.g.h" 15 | 16 | namespace BlackjackClient 17 | { 18 | /// 19 | /// Provides application-specific behavior to supplement the default Application class. 20 | /// 21 | ref class App sealed 22 | { 23 | public: 24 | App(); 25 | virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs ^ args) override; 26 | 27 | private: 28 | void OnSuspending(Platform::Object ^ sender, Windows::ApplicationModel::SuspendingEventArgs ^ e); 29 | }; 30 | } // namespace BlackjackClient 31 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/BlackJack/BlackJack_UIClient/Assets/Logo.png -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Assets/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/BlackJack/BlackJack_UIClient/Assets/SmallLogo.png -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/BlackJack/BlackJack_UIClient/Assets/SplashScreen.png -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/BlackJack/BlackJack_UIClient/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/BlackJack_UIClient_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/BlackJack/BlackJack_UIClient/BlackJack_UIClient_TemporaryKey.pfx -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/CardShape.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/CardShape.xaml.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * CardShape.xaml.h - Declaration of the CardShape class 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #pragma once 13 | 14 | #include "pch.h" 15 | 16 | #include "CardShape.g.h" 17 | 18 | #define CardWidth 71 19 | #define CardHeight 96 20 | #define CardWidthRect 72 21 | #define CardHeightRect 97 22 | 23 | #define SCALE_FACTOR 1.80 24 | 25 | namespace BlackjackClient 26 | { 27 | public 28 | ref class CardShape sealed 29 | { 30 | public: 31 | CardShape(); 32 | virtual ~CardShape(); 33 | 34 | private: 35 | friend ref class PlayingTable; 36 | friend ref class PlayerSpace; 37 | 38 | void adjust(); 39 | 40 | int _suit; 41 | int _value; 42 | Platform::Boolean _visible; 43 | }; 44 | } // namespace BlackjackClient 45 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Cards.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/BlackJack/BlackJack_UIClient/Cards.PNG -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Blackjack Client 6 | Microsoft Corporation 7 | Assets\StoreLogo.png 8 | 9 | 10 | 6.2.1 11 | 6.2.1 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Package.uwp.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 7 | 8 | 9 | Blackjack Client 10 | Andy 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Player.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/Player.xaml.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * Player.xaml.h: Declaration of the Player class. 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #pragma once 13 | 14 | #include "pch.h" 15 | 16 | #include "Player.g.h" 17 | 18 | namespace BlackjackClient 19 | { 20 | public 21 | ref class PlayerSpace sealed 22 | { 23 | public: 24 | PlayerSpace() { _init(); } 25 | 26 | void Clear() 27 | { 28 | playerBalance->Text = L""; 29 | playerBet->Text = L""; 30 | playerName->Text = L""; 31 | playerInsurance->Text = L""; 32 | m_cards.clear(); 33 | playerCardGrid->Children->Clear(); 34 | } 35 | 36 | int CardsHeld() { return int(m_cards.size()); } 37 | 38 | private: 39 | friend ref class PlayingTable; 40 | 41 | void AddCard(Card card); 42 | void Update(Player player); 43 | 44 | void ShowResult(BJHandResult result); 45 | 46 | void _init(); 47 | 48 | std::vector m_cards; 49 | }; 50 | } // namespace BlackjackClient 51 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/pch.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * pch.cpp: Include the standard header and generate the precompiled header. 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #include "pch.h" 13 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/BlackJack_UIClient/pch.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * pch.h: Header for standard system include files. 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #pragma once 13 | 14 | #include "App.xaml.h" 15 | #include "messagetypes.h" 16 | #include 17 | -------------------------------------------------------------------------------- /Release/samples/BlackJack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) 2 | add_subdirectory(BlackJack_Server) 3 | add_subdirectory(BlackJack_Client) 4 | else() 5 | # TODO: add BlackJack_UIClient 6 | endif() 7 | -------------------------------------------------------------------------------- /Release/samples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(SearchFile) 2 | add_subdirectory(BingRequest) 3 | add_subdirectory(BlackJack) 4 | add_subdirectory(Oauth1Client) 5 | add_subdirectory(Oauth2Client) 6 | 7 | add_custom_target(samples 8 | DEPENDS SearchFile BingRequest blackjackclient blackjackserver oauth1client oauth2client 9 | ) -------------------------------------------------------------------------------- /Release/samples/CasaLens/CasaLens141/css/default.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | width: 100%; 4 | height: 100%; 5 | font-family: Calibri; 6 | background-image: linear-gradient(20deg, white, #DDE6DF 62.6%, #24507C); 7 | background-repeat: no-repeat; 8 | background-size: 100% 100%; 9 | } 10 | 11 | h4 { 12 | height:25px; 13 | text-align: center; 14 | } 15 | 16 | .Logo { 17 | width: 105.59px; 18 | height: 103.64px; 19 | } 20 | 21 | .searchBox { 22 | } 23 | 24 | .textclass 25 | { 26 | width: 46%; 27 | font-family: "segoe ui"; 28 | } 29 | 30 | .tftextbtn 31 | { 32 | color: #fff; 33 | display: inline-block; 34 | background-color: rgb(230, 100, 0); 35 | font-family: "segoe ui"; 36 | } 37 | 38 | .PictureGallery { 39 | } 40 | 41 | .mainPic { 42 | } 43 | 44 | .thumbnailPic { 45 | } 46 | 47 | .CurrentTemperature { 48 | vertical-align:middle; 49 | text-align: center; 50 | font-size: 75px; 51 | } 52 | 53 | .WeatherData { 54 | } 55 | 56 | .EventTitle { 57 | font-size: large; 58 | } 59 | 60 | .EventDescription { 61 | font-family:Helvetica; 62 | word-wrap:break-word; 63 | font-size:small; 64 | } 65 | 66 | a:link {text-decoration:none;} 67 | td 68 | { 69 | vertical-align:top; 70 | valign:top; 71 | } 72 | 73 | .verticalLine { 74 | border-left: thick solid #ff0000; 75 | } 76 | 77 | .wrap-words { 78 | word-wrap:break-word; 79 | } 80 | 81 | .eventful-badge, 82 | .eventful-badge * { 83 | margin: 0 !important; 84 | padding: 0 !important; 85 | border: 0 !important; 86 | text-align: center !important; 87 | color: #CCC !important; 88 | font-family: Arial !important; 89 | text-decoration: none !important; 90 | } 91 | 92 | .eventful-medium { 93 | position: relative !important; 94 | width: 100px !important; 95 | font-size: 12px !important; 96 | line-height: 13px !important; 97 | } -------------------------------------------------------------------------------- /Release/samples/CasaLens/CasaLens141/image/bing-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/CasaLens/CasaLens141/image/bing-logo.jpg -------------------------------------------------------------------------------- /Release/samples/CasaLens/CasaLens141/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/CasaLens/CasaLens141/image/logo.png -------------------------------------------------------------------------------- /Release/samples/CasaLens/CasaLens141/image/wall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/CasaLens/CasaLens141/image/wall.jpg -------------------------------------------------------------------------------- /Release/samples/CasaLens/css/default.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | width: 100%; 4 | height: 100%; 5 | font-family: Calibri; 6 | background-image: linear-gradient(20deg, white, #DDE6DF 62.6%, #24507C); 7 | background-repeat: no-repeat; 8 | background-size: 100% 100%; 9 | } 10 | 11 | h4 { 12 | height:25px; 13 | text-align: center; 14 | } 15 | 16 | .Logo { 17 | width: 105.59px; 18 | height: 103.64px; 19 | } 20 | 21 | .searchBox { 22 | } 23 | 24 | .textclass 25 | { 26 | width: 46%; 27 | font-family: "segoe ui"; 28 | } 29 | 30 | .tftextbtn 31 | { 32 | color: #fff; 33 | display: inline-block; 34 | background-color: rgb(230, 100, 0); 35 | font-family: "segoe ui"; 36 | } 37 | 38 | .PictureGallery { 39 | } 40 | 41 | .mainPic { 42 | } 43 | 44 | .thumbnailPic { 45 | } 46 | 47 | .CurrentTemperature { 48 | vertical-align:middle; 49 | text-align: center; 50 | font-size: 75px; 51 | } 52 | 53 | .WeatherData { 54 | } 55 | 56 | .EventTitle { 57 | font-size: large; 58 | } 59 | 60 | .EventDescription { 61 | font-family:Helvetica; 62 | word-wrap:break-word; 63 | font-size:small; 64 | } 65 | 66 | a:link {text-decoration:none;} 67 | td 68 | { 69 | vertical-align:top; 70 | valign:top; 71 | } 72 | 73 | .verticalLine { 74 | border-left: thick solid #ff0000; 75 | } 76 | 77 | .wrap-words { 78 | word-wrap:break-word; 79 | } 80 | 81 | .eventful-badge, 82 | .eventful-badge * { 83 | margin: 0 !important; 84 | padding: 0 !important; 85 | border: 0 !important; 86 | text-align: center !important; 87 | color: #CCC !important; 88 | font-family: Arial !important; 89 | text-decoration: none !important; 90 | } 91 | 92 | .eventful-medium { 93 | position: relative !important; 94 | width: 100px !important; 95 | font-size: 12px !important; 96 | line-height: 13px !important; 97 | } -------------------------------------------------------------------------------- /Release/samples/CasaLens/image/bing-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/CasaLens/image/bing-logo.jpg -------------------------------------------------------------------------------- /Release/samples/CasaLens/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/CasaLens/image/logo.png -------------------------------------------------------------------------------- /Release/samples/CasaLens/image/wall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/CasaLens/image/wall.jpg -------------------------------------------------------------------------------- /Release/samples/CasaLens/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * stdafx.cpp 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #include "stdafx.h" 13 | -------------------------------------------------------------------------------- /Release/samples/CasaLens/stdafx.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * stdafx.h : include file for standard system include files, 8 | * or project specific include files that are used frequently, but 9 | * are changed infrequently 10 | * 11 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 12 | ****/ 13 | 14 | #pragma once 15 | 16 | #include "cpprest/http_client.h" 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/App.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/App.xaml.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * App.xaml.h - Declaration of the App class. 8 | * 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | #pragma once 12 | 13 | #include "App.g.h" 14 | 15 | namespace FacebookDemo 16 | { 17 | /// 18 | /// Provides application-specific behavior to supplement the default Application class. 19 | /// 20 | ref class App sealed 21 | { 22 | public: 23 | App(); 24 | virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs ^ args) override; 25 | 26 | private: 27 | void OnSuspending(Platform::Object ^ sender, Windows::ApplicationModel::SuspendingEventArgs ^ e); 28 | }; 29 | } // namespace FacebookDemo 30 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/FacebookDemo/Assets/Logo.png -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/Assets/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/FacebookDemo/Assets/SmallLogo.png -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/FacebookDemo/Assets/SplashScreen.png -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/FacebookDemo/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/Facebook.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * Facebook.h - Simple client for connecting to facebook. See blog post 8 | * at http://aka.ms/FacebookCppRest for a detailed walkthrough of this sample 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | 12 | #pragma once 13 | #include 14 | #include 15 | 16 | class facebook_client 17 | { 18 | public: 19 | static facebook_client& instance(); // Singleton 20 | pplx::task login(std::wstring scopes); 21 | pplx::task get(std::wstring path); 22 | web::http::uri_builder base_uri(bool absolute = false); 23 | 24 | private: 25 | facebook_client() : raw_client(L"https://graph.facebook.com/"), signed_in(false) {} 26 | 27 | pplx::task full_login(std::wstring scopes); 28 | 29 | std::wstring token_; 30 | bool signed_in; 31 | web::http::client::http_client raw_client; 32 | }; 33 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/FacebookDemo_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/FacebookDemo/FacebookDemo_TemporaryKey.pfx -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/MainPage.xaml.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * MainPage.xaml.h - Declaration of the MainPage class. Also includes 8 | * the declaration for the FacebookAlbum class that the GridView databinds to. 9 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 10 | ****/ 11 | #pragma once 12 | 13 | #include "MainPage.g.h" 14 | 15 | namespace FacebookDemo 16 | { 17 | /// 18 | /// An empty page that can be used on its own or navigated to within a Frame. 19 | /// 20 | public ref class MainPage sealed 21 | { 22 | public: 23 | MainPage(); 24 | 25 | protected: 26 | virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override; 27 | 28 | private: 29 | void LoginButton_Click_1(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); 30 | void AlbumButton_Click_1(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); 31 | }; 32 | 33 | [Windows::UI::Xaml::Data::Bindable] 34 | [Windows::Foundation::Metadata::WebHostHidden] 35 | public ref class FacebookAlbum sealed 36 | { 37 | internal: 38 | FacebookAlbum(std::wstring title, int count, std::wstring id, std::wstring photo_id): 39 | title_(title), count_(count), id_(id), photo_id_(photo_id) {} 40 | 41 | public: 42 | property Platform::String^ Title { 43 | Platform::String^ get(); 44 | } 45 | 46 | property int Count { 47 | int get(); 48 | } 49 | 50 | property Windows::UI::Xaml::Media::ImageSource^ Preview { 51 | Windows::UI::Xaml::Media::ImageSource^ get(); 52 | } 53 | 54 | private: 55 | std::wstring id_; 56 | std::wstring title_; 57 | std::wstring photo_id_; 58 | int count_; 59 | Windows::UI::Xaml::Media::ImageSource^ preview_; 60 | }; 61 | } 62 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | FacebookDemo 6 | Andy 7 | Assets\StoreLogo.png 8 | 9 | 10 | 10.0 11 | 10.0 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/Package.uwp.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | FacebookDemo 10 | Andy 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/pch.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * pch.cpp - Source file to generate pre-compiled header. 8 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 9 | ****/ 10 | 11 | #include "pch.h" 12 | -------------------------------------------------------------------------------- /Release/samples/FacebookDemo/pch.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 6 | * 7 | * pch.h - Pre-compiled header standard include file 8 | * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 9 | ****/ 10 | 11 | #pragma once 12 | 13 | #include "App.xaml.h" 14 | #include 15 | -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/App.xaml.h: -------------------------------------------------------------------------------- 1 | // 2 | // App.xaml.h 3 | // Declaration of the App class. 4 | // 5 | 6 | #pragma once 7 | 8 | #include "App.g.h" 9 | 10 | namespace OAuth2Live 11 | { 12 | /// 13 | /// Provides application-specific behavior to supplement the default Application class. 14 | /// 15 | ref class App sealed 16 | { 17 | public: 18 | App(); 19 | virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs ^ args) override; 20 | 21 | private: 22 | void OnSuspending(Platform::Object ^ sender, Windows::ApplicationModel::SuspendingEventArgs ^ e); 23 | }; 24 | } // namespace OAuth2Live 25 | -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/OAuth2Live/Assets/Logo.png -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/Assets/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/OAuth2Live/Assets/SmallLogo.png -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/OAuth2Live/Assets/SplashScreen.png -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/OAuth2Live/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/MainPage.xaml.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainPage.xaml.h 3 | // Declaration of the MainPage class. 4 | // 5 | 6 | #pragma once 7 | 8 | #include "MainPage.g.h" 9 | 10 | using web::http::client::http_client; 11 | using web::http::oauth2::experimental::oauth2_config; 12 | 13 | namespace OAuth2Live 14 | { 15 | /// 16 | /// An empty page that can be used on its own or navigated to within a Frame. 17 | /// 18 | public 19 | ref class MainPage sealed 20 | { 21 | public: 22 | MainPage(); 23 | 24 | protected: 25 | virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e) override; 26 | 27 | private: 28 | oauth2_config m_live_oauth2_config; 29 | std::unique_ptr m_live_client; 30 | 31 | void _UpdateButtonState(); 32 | void _GetToken(); 33 | 34 | void GetTokenButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e); 35 | void RefreshTokenButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); 36 | void ImplicitGrantUnchecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); 37 | void ImplicitGrantChecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); 38 | 39 | void GetInfoButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e); 40 | void GetContactsButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e); 41 | void GetEventsButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e); 42 | 43 | void AccessTokenTextChanged(Platform::Object ^ sender, Windows::UI::Xaml::Controls::TextChangedEventArgs ^ e); 44 | }; 45 | } // namespace OAuth2Live 46 | -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/OAuth2Live_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/OAuth2Live/OAuth2Live_TemporaryKey.pfx -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 7 | 8 | 9 | OAuth2Live 10 | Microsoft Corporation 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 6.2.1 16 | 6.2.1 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/Package.uwp.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 7 | 8 | 9 | OAuth2Live 10 | Andy 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/pch.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // pch.cpp 3 | // Include the standard header and generate the precompiled header. 4 | // 5 | 6 | #include "pch.h" 7 | -------------------------------------------------------------------------------- /Release/samples/OAuth2Live/pch.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | * 5 | ****/ 6 | 7 | #pragma once 8 | 9 | #include "App.xaml.h" 10 | #include "MainPage.xaml.h" 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | -------------------------------------------------------------------------------- /Release/samples/Oauth1Client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) 2 | add_executable(oauth1client 3 | Oauth1Client.cpp 4 | ) 5 | 6 | target_link_libraries(oauth1client cpprest) 7 | endif() 8 | -------------------------------------------------------------------------------- /Release/samples/Oauth2Client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) 2 | add_executable(oauth2client 3 | Oauth2Client.cpp 4 | ) 5 | 6 | target_link_libraries(oauth2client cpprest) 7 | endif() 8 | -------------------------------------------------------------------------------- /Release/samples/Regenerate-Certificates.ps1: -------------------------------------------------------------------------------- 1 | [CmdletBinding(SupportsShouldProcess=$true)] 2 | param( 3 | [Parameter(Mandatory=$true)] 4 | [String]$PublisherName 5 | ) 6 | 7 | $ErrorActionPreference = "Stop" 8 | 9 | $Paths = @( 10 | "$PSScriptRoot\BlackJack\BlackJack_UIClient\BlackJack_UIClient_TemporaryKey.pfx", 11 | "$PSScriptRoot\FacebookDemo\FacebookDemo_TemporaryKey.pfx", 12 | "$PSScriptRoot\OAuth2Live\OAuth2Live_TemporaryKey.pfx", 13 | "$PSScriptRoot\WindowsLiveAuth\WindowsLiveAuth_TemporaryKey.pfx" 14 | ) 15 | 16 | $MakeCert = "C:\Program Files (x86)\Windows Kits\10\bin\x86\makecert.exe" 17 | $Pvk2Pfx = "C:\Program Files (x86)\Windows Kits\10\bin\x86\pvk2pfx.exe" 18 | 19 | pushd $PSScriptRoot 20 | 21 | foreach($Path in $Paths) 22 | { 23 | Remove-Item $Path -ErrorAction SilentlyContinue 24 | if ($PSCmdlet.ShouldProcess($PSScriptRoot, "MakeCert")) 25 | { 26 | & $MakeCert -n "CN=$PublisherName" -a sha512 -m 12 -r -h 0 -eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /sv "Temp.pvk" "Temp.cer" 27 | } 28 | if ($PSCmdlet.ShouldProcess($Path, "Pvk2Pfx")) 29 | { 30 | & $Pvk2Pfx -pvk "Temp.pvk" -spc "Temp.cer" -pfx $Path 31 | Remove-Item "$PSScriptRoot\Temp.pvk" 32 | Remove-Item "$PSScriptRoot\Temp.cer" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Release/samples/SearchFile/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) 2 | add_executable(SearchFile searchfile.cpp) 3 | target_link_libraries(SearchFile cpprest) 4 | endif() 5 | -------------------------------------------------------------------------------- /Release/samples/WindowsLiveAuth/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Release/samples/WindowsLiveAuth/App.xaml.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * Copyright (C) Microsoft. All rights reserved. 3 | * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. 4 | ****/ 5 | 6 | #pragma once 7 | 8 | #include "App.g.h" 9 | 10 | namespace WindowsLiveAuth 11 | { 12 | /// 13 | /// Provides application-specific behavior to supplement the default Application class. 14 | /// 15 | ref class App sealed 16 | { 17 | public: 18 | App(); 19 | virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs ^ args) override; 20 | 21 | private: 22 | void OnSuspending(Platform::Object ^ sender, Windows::ApplicationModel::SuspendingEventArgs ^ e); 23 | }; 24 | } // namespace WindowsLiveAuth 25 | -------------------------------------------------------------------------------- /Release/samples/WindowsLiveAuth/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/WindowsLiveAuth/Assets/Logo.png -------------------------------------------------------------------------------- /Release/samples/WindowsLiveAuth/Assets/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/WindowsLiveAuth/Assets/SmallLogo.png -------------------------------------------------------------------------------- /Release/samples/WindowsLiveAuth/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/WindowsLiveAuth/Assets/SplashScreen.png -------------------------------------------------------------------------------- /Release/samples/WindowsLiveAuth/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yao-msft/cpprestsdk/e037858d627edf175137f3e81c88f2a2ad17f603/Release/samples/WindowsLiveAuth/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Release/samples/WindowsLiveAuth/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 |