// C++/WinRT v2.0.200609.3 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef WINRT_Windows_Web_Http_Filters_H #define WINRT_Windows_Web_Http_Filters_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.200609.3"), "Mismatched C++/WinRT headers."); #include "winrt/Windows.Web.Http.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Networking.Sockets.2.h" #include "winrt/impl/Windows.Security.Credentials.2.h" #include "winrt/impl/Windows.Security.Cryptography.Certificates.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.Web.Http.2.h" #include "winrt/impl/Windows.Web.Http.Filters.2.h" namespace winrt::impl { template WINRT_IMPL_AUTO(bool) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::AllowAutoRedirect() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_AllowAutoRedirect(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::AllowAutoRedirect(bool value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->put_AllowAutoRedirect(value)); } template WINRT_IMPL_AUTO(bool) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::AllowUI() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_AllowUI(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::AllowUI(bool value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->put_AllowUI(value)); } template WINRT_IMPL_AUTO(bool) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::AutomaticDecompression() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_AutomaticDecompression(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::AutomaticDecompression(bool value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->put_AutomaticDecompression(value)); } template WINRT_IMPL_AUTO(Windows::Web::Http::Filters::HttpCacheControl) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::CacheControl() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_CacheControl(&value)); return Windows::Web::Http::Filters::HttpCacheControl{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(Windows::Web::Http::HttpCookieManager) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::CookieManager() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_CookieManager(&value)); return Windows::Web::Http::HttpCookieManager{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(Windows::Security::Cryptography::Certificates::Certificate) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::ClientCertificate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_ClientCertificate(&value)); return Windows::Security::Cryptography::Certificates::Certificate{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::ClientCertificate(Windows::Security::Cryptography::Certificates::Certificate const& value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->put_ClientCertificate(*(void**)(&value))); } template WINRT_IMPL_AUTO(Windows::Foundation::Collections::IVector) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::IgnorableServerCertificateErrors() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_IgnorableServerCertificateErrors(&value)); return Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(uint32_t) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::MaxConnectionsPerServer() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_MaxConnectionsPerServer(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::MaxConnectionsPerServer(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->put_MaxConnectionsPerServer(value)); } template WINRT_IMPL_AUTO(Windows::Security::Credentials::PasswordCredential) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::ProxyCredential() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_ProxyCredential(&value)); return Windows::Security::Credentials::PasswordCredential{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::ProxyCredential(Windows::Security::Credentials::PasswordCredential const& value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->put_ProxyCredential(*(void**)(&value))); } template WINRT_IMPL_AUTO(Windows::Security::Credentials::PasswordCredential) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::ServerCredential() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_ServerCredential(&value)); return Windows::Security::Credentials::PasswordCredential{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::ServerCredential(Windows::Security::Credentials::PasswordCredential const& value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->put_ServerCredential(*(void**)(&value))); } template WINRT_IMPL_AUTO(bool) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::UseProxy() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->get_UseProxy(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter::UseProxy(bool value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter)->put_UseProxy(value)); } template WINRT_IMPL_AUTO(Windows::Web::Http::HttpVersion) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter2::MaxVersion() const { Windows::Web::Http::HttpVersion value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter2)->get_MaxVersion(reinterpret_cast(&value))); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter2::MaxVersion(Windows::Web::Http::HttpVersion const& value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter2)->put_MaxVersion(static_cast(value))); } template WINRT_IMPL_AUTO(Windows::Web::Http::Filters::HttpCookieUsageBehavior) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter3::CookieUsageBehavior() const { Windows::Web::Http::Filters::HttpCookieUsageBehavior value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter3)->get_CookieUsageBehavior(reinterpret_cast(&value))); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter3::CookieUsageBehavior(Windows::Web::Http::Filters::HttpCookieUsageBehavior const& value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter3)->put_CookieUsageBehavior(static_cast(value))); } template WINRT_IMPL_AUTO(winrt::event_token) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter4::ServerCustomValidationRequested(Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter4)->add_ServerCustomValidationRequested(*(void**)(&handler), put_abi(token))); return token; } template typename consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter4::ServerCustomValidationRequested_revoker consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter4::ServerCustomValidationRequested(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ServerCustomValidationRequested(handler)); } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter4::ServerCustomValidationRequested(winrt::event_token const& token) const noexcept { WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter4)->remove_ServerCustomValidationRequested(impl::bind_in(token))); } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter4::ClearAuthenticationCache() const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter4)->ClearAuthenticationCache()); } template WINRT_IMPL_AUTO(Windows::System::User) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilter5::User() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilter5)->get_User(&value)); return Windows::System::User{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(Windows::Web::Http::Filters::HttpBaseProtocolFilter) consume_Windows_Web_Http_Filters_IHttpBaseProtocolFilterStatics::CreateForUser(Windows::System::User const& user) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpBaseProtocolFilterStatics)->CreateForUser(*(void**)(&user), &result)); return Windows::Web::Http::Filters::HttpBaseProtocolFilter{ result, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(Windows::Web::Http::Filters::HttpCacheReadBehavior) consume_Windows_Web_Http_Filters_IHttpCacheControl::ReadBehavior() const { Windows::Web::Http::Filters::HttpCacheReadBehavior value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpCacheControl)->get_ReadBehavior(reinterpret_cast(&value))); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpCacheControl::ReadBehavior(Windows::Web::Http::Filters::HttpCacheReadBehavior const& value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpCacheControl)->put_ReadBehavior(static_cast(value))); } template WINRT_IMPL_AUTO(Windows::Web::Http::Filters::HttpCacheWriteBehavior) consume_Windows_Web_Http_Filters_IHttpCacheControl::WriteBehavior() const { Windows::Web::Http::Filters::HttpCacheWriteBehavior value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpCacheControl)->get_WriteBehavior(reinterpret_cast(&value))); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpCacheControl::WriteBehavior(Windows::Web::Http::Filters::HttpCacheWriteBehavior const& value) const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpCacheControl)->put_WriteBehavior(static_cast(value))); } template WINRT_IMPL_AUTO(Windows::Foundation::IAsyncOperationWithProgress) consume_Windows_Web_Http_Filters_IHttpFilter::SendRequestAsync(Windows::Web::Http::HttpRequestMessage const& request) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpFilter)->SendRequestAsync(*(void**)(&request), &operation)); return Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(Windows::Web::Http::HttpRequestMessage) consume_Windows_Web_Http_Filters_IHttpServerCustomValidationRequestedEventArgs::RequestMessage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpServerCustomValidationRequestedEventArgs)->get_RequestMessage(&value)); return Windows::Web::Http::HttpRequestMessage{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(Windows::Security::Cryptography::Certificates::Certificate) consume_Windows_Web_Http_Filters_IHttpServerCustomValidationRequestedEventArgs::ServerCertificate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpServerCustomValidationRequestedEventArgs)->get_ServerCertificate(&value)); return Windows::Security::Cryptography::Certificates::Certificate{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(Windows::Networking::Sockets::SocketSslErrorSeverity) consume_Windows_Web_Http_Filters_IHttpServerCustomValidationRequestedEventArgs::ServerCertificateErrorSeverity() const { Windows::Networking::Sockets::SocketSslErrorSeverity value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpServerCustomValidationRequestedEventArgs)->get_ServerCertificateErrorSeverity(reinterpret_cast(&value))); return value; } template WINRT_IMPL_AUTO(Windows::Foundation::Collections::IVectorView) consume_Windows_Web_Http_Filters_IHttpServerCustomValidationRequestedEventArgs::ServerCertificateErrors() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpServerCustomValidationRequestedEventArgs)->get_ServerCertificateErrors(&value)); return Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(Windows::Foundation::Collections::IVectorView) consume_Windows_Web_Http_Filters_IHttpServerCustomValidationRequestedEventArgs::ServerIntermediateCertificates() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpServerCustomValidationRequestedEventArgs)->get_ServerIntermediateCertificates(&value)); return Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_Web_Http_Filters_IHttpServerCustomValidationRequestedEventArgs::Reject() const { check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpServerCustomValidationRequestedEventArgs)->Reject()); } template WINRT_IMPL_AUTO(Windows::Foundation::Deferral) consume_Windows_Web_Http_Filters_IHttpServerCustomValidationRequestedEventArgs::GetDeferral() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(Windows::Web::Http::Filters::IHttpServerCustomValidationRequestedEventArgs)->GetDeferral(&result)); return Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AllowAutoRedirect(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowAutoRedirect()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowAutoRedirect(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowAutoRedirect(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowUI(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowUI()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowUI(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowUI(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutomaticDecompression(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutomaticDecompression()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutomaticDecompression(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutomaticDecompression(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CacheControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CacheControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CookieManager(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CookieManager()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClientCertificate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClientCertificate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClientCertificate(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClientCertificate(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IgnorableServerCertificateErrors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().IgnorableServerCertificateErrors()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxConnectionsPerServer(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxConnectionsPerServer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxConnectionsPerServer(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxConnectionsPerServer(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProxyCredential(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProxyCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProxyCredential(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProxyCredential(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCredential(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ServerCredential(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ServerCredential(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UseProxy(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UseProxy()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_UseProxy(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UseProxy(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MaxVersion(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxVersion()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxVersion(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxVersion(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CookieUsageBehavior(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CookieUsageBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CookieUsageBehavior(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CookieUsageBehavior(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ServerCustomValidationRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ServerCustomValidationRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ServerCustomValidationRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ServerCustomValidationRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall ClearAuthenticationCache() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClearAuthenticationCache(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateForUser(void* user, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForUser(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ReadBehavior(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReadBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ReadBehavior(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReadBehavior(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WriteBehavior(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WriteBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_WriteBehavior(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WriteBehavior(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall SendRequestAsync(void* request, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SendRequestAsync(*reinterpret_cast(&request))); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RequestMessage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RequestMessage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCertificate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificateErrorSeverity(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCertificateErrorSeverity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCertificateErrors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ServerCertificateErrors()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerIntermediateCertificates(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ServerIntermediateCertificates()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Reject() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Reject(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Web::Http::Filters { inline HttpBaseProtocolFilter::HttpBaseProtocolFilter() : HttpBaseProtocolFilter(impl::call_factory_cast([](Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto HttpBaseProtocolFilter::CreateForUser(Windows::System::User const& user) { return impl::call_factory([&](IHttpBaseProtocolFilterStatics const& f) { return f.CreateForUser(user); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif } #endif