Files
nearby/internal/platform/implementation/windows/generated/winrt/Windows.Security.Credentials.h
T
2026-01-27 23:46:02 -08:00

2041 lines
111 KiB
C++

// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1
#pragma once
#ifndef WINRT_Windows_Security_Credentials_H
#define WINRT_Windows_Security_Credentials_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.250303.1"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Windows.Security.Credentials.2.h"
#include "winrt/impl/Windows.Security.Cryptography.Core.2.h"
#include "winrt/impl/Windows.Storage.Streams.2.h"
#include "winrt/impl/Windows.System.2.h"
#include "winrt/impl/Windows.UI.2.h"
namespace winrt::impl
{
template <typename D> auto consume_Windows_Security_Credentials_ICredentialFactory<D>::CreatePasswordCredential(param::hstring const& resource, param::hstring const& userName, param::hstring const& password) const
{
void* credential{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::ICredentialFactory>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::ICredentialFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::ICredentialFactory>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreatePasswordCredential(*(void**)(&resource), *(void**)(&userName), *(void**)(&password), &credential));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::ICredentialFactory>**)this;
check_hresult(_winrt_abi_type->CreatePasswordCredential(*(void**)(&resource), *(void**)(&userName), *(void**)(&password), &credential));
}
return winrt::Windows::Security::Credentials::PasswordCredential{ credential, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredential<D>::Name() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Name(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)this;
check_hresult(_winrt_abi_type->get_Name(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredential<D>::RetrievePublicKey() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RetrievePublicKeyWithDefaultBlobType(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)this;
check_hresult(_winrt_abi_type->RetrievePublicKeyWithDefaultBlobType(&value));
}
return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredential<D>::RetrievePublicKey(winrt::Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType const& blobType) const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RetrievePublicKeyWithBlobType(static_cast<int32_t>(blobType), &value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)this;
check_hresult(_winrt_abi_type->RetrievePublicKeyWithBlobType(static_cast<int32_t>(blobType), &value));
}
return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredential<D>::RequestSignAsync(winrt::Windows::Storage::Streams::IBuffer const& data) const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RequestSignAsync(*(void**)(&data), &value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)this;
check_hresult(_winrt_abi_type->RequestSignAsync(*(void**)(&data), &value));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Credentials::KeyCredentialOperationResult>{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredential<D>::GetAttestationAsync() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetAttestationAsync(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredential>**)this;
check_hresult(_winrt_abi_type->GetAttestationAsync(&value));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Credentials::KeyCredentialAttestationResult>{ value, take_ownership_from_abi };
}
template <typename D>
auto consume_Windows_Security_Credentials_IKeyCredential2<D>::
RequestDeriveSharedSecretAsync(
winrt::Windows::UI::WindowId const& windowId,
param::hstring const& message,
winrt::Windows::Storage::Streams::IBuffer const& encryptedRequest)
const {
void* operation{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::
IKeyCredential2>) {
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<
winrt::Windows::Security::Credentials::IKeyCredential2, D const*>(
static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredential2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RequestDeriveSharedSecretAsync(
impl::bind_in(windowId), *(void**)(&message),
*(void**)(&encryptedRequest), &operation));
} else {
auto const _winrt_abi_type =
*(abi_t<
winrt::Windows::Security::Credentials::IKeyCredential2>**)this;
check_hresult(_winrt_abi_type->RequestDeriveSharedSecretAsync(
impl::bind_in(windowId), *(void**)(&message),
*(void**)(&encryptedRequest), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Security::Credentials::KeyCredentialOperationResult>{
operation, take_ownership_from_abi};
}
template <typename D>
auto consume_Windows_Security_Credentials_IKeyCredential2<D>::
RetrieveAuthorizationContext(
winrt::Windows::Storage::Streams::IBuffer const& encryptedRequest)
const {
void* result{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::
IKeyCredential2>) {
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<
winrt::Windows::Security::Credentials::IKeyCredential2, D const*>(
static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredential2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RetrieveAuthorizationContext(
*(void**)(&encryptedRequest), &result));
} else {
auto const _winrt_abi_type =
*(abi_t<
winrt::Windows::Security::Credentials::IKeyCredential2>**)this;
check_hresult(_winrt_abi_type->RetrieveAuthorizationContext(
*(void**)(&encryptedRequest), &result));
}
return winrt::Windows::Storage::Streams::IBuffer{result,
take_ownership_from_abi};
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialAttestationResult<D>::CertificateChainBuffer() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_CertificateChainBuffer(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>**)this;
check_hresult(_winrt_abi_type->get_CertificateChainBuffer(&value));
}
return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialAttestationResult<D>::AttestationBuffer() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_AttestationBuffer(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>**)this;
check_hresult(_winrt_abi_type->get_AttestationBuffer(&value));
}
return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialAttestationResult<D>::Status() const
{
winrt::Windows::Security::Credentials::KeyCredentialAttestationStatus value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>**)this;
check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D>
auto consume_Windows_Security_Credentials_IKeyCredentialCacheConfiguration<
D>::CacheOption() const {
winrt::Windows::Security::Credentials::KeyCredentialCacheOption value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>) {
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result =
impl::try_as_with_reason<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration,
D const*>(static_cast<D const*>(this),
_winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(
abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_CacheOption(
reinterpret_cast<int32_t*>(&value)));
} else {
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>**)this;
check_hresult(_winrt_abi_type->get_CacheOption(
reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D>
auto consume_Windows_Security_Credentials_IKeyCredentialCacheConfiguration<
D>::Timeout() const {
winrt::Windows::Foundation::TimeSpan value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>) {
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result =
impl::try_as_with_reason<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration,
D const*>(static_cast<D const*>(this),
_winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(
abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Timeout(put_abi(value)));
} else {
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>**)this;
check_hresult(_winrt_abi_type->get_Timeout(put_abi(value)));
}
return value;
}
template <typename D>
auto consume_Windows_Security_Credentials_IKeyCredentialCacheConfiguration<
D>::UsageCount() const {
uint32_t value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>) {
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result =
impl::try_as_with_reason<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration,
D const*>(static_cast<D const*>(this),
_winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(
abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_UsageCount(&value));
} else {
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration>**)this;
check_hresult(_winrt_abi_type->get_UsageCount(&value));
}
return value;
}
template <typename D>
auto
consume_Windows_Security_Credentials_IKeyCredentialCacheConfigurationFactory<
D>::CreateInstance(winrt::Windows::Security::Credentials::
KeyCredentialCacheOption const& cacheOption,
winrt::Windows::Foundation::TimeSpan const& timeout,
uint32_t usageCount) const {
void* result{};
if constexpr (!std::is_same_v<
D, winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfigurationFactory>) {
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<
winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfigurationFactory,
D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<
winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfigurationFactory>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreateInstance(
static_cast<int32_t>(cacheOption), impl::bind_in(timeout),
usageCount, &result));
} else {
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfigurationFactory>**)this;
check_hresult(_winrt_abi_type->CreateInstance(
static_cast<int32_t>(cacheOption), impl::bind_in(timeout),
usageCount, &result));
}
return winrt::Windows::Security::Credentials::
KeyCredentialCacheConfiguration{result, take_ownership_from_abi};
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics<D>::IsSupportedAsync() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->IsSupportedAsync(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)this;
check_hresult(_winrt_abi_type->IsSupportedAsync(&value));
}
return winrt::Windows::Foundation::IAsyncOperation<bool>{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics<D>::RenewAttestationAsync() const
{
void* operation{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RenewAttestationAsync(&operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)this;
check_hresult(_winrt_abi_type->RenewAttestationAsync(&operation));
}
return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics<D>::RequestCreateAsync(param::hstring const& name, winrt::Windows::Security::Credentials::KeyCredentialCreationOption const& option) const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RequestCreateAsync(*(void**)(&name), static_cast<int32_t>(option), &value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)this;
check_hresult(_winrt_abi_type->RequestCreateAsync(*(void**)(&name), static_cast<int32_t>(option), &value));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Credentials::KeyCredentialRetrievalResult>{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics<D>::OpenAsync(param::hstring const& name) const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->OpenAsync(*(void**)(&name), &value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)this;
check_hresult(_winrt_abi_type->OpenAsync(*(void**)(&name), &value));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Credentials::KeyCredentialRetrievalResult>{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics<D>::DeleteAsync(param::hstring const& name) const
{
void* operation{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->DeleteAsync(*(void**)(&name), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>**)this;
check_hresult(_winrt_abi_type->DeleteAsync(*(void**)(&name), &operation));
}
return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
}
template <typename D>
auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics2<D>::
RequestCreateAsync(
param::hstring const& name,
winrt::Windows::Security::Credentials::
KeyCredentialCreationOption const& option,
param::hstring const& algorithm, param::hstring const& message,
winrt::Windows::Security::Credentials::
KeyCredentialCacheConfiguration const& cacheConfiguration,
winrt::Windows::UI::WindowId const& windowId,
winrt::Windows::Security::Credentials::ChallengeResponseKind const&
callbackType,
winrt::Windows::Security::Credentials::
AttestationChallengeHandler const& attestationCallback) const {
void* operation{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2>) {
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result =
impl::try_as_with_reason<winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2,
D const*>(static_cast<D const*>(this),
_winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RequestCreateAsync(
*(void**)(&name), static_cast<int32_t>(option),
*(void**)(&algorithm), *(void**)(&message),
*(void**)(&cacheConfiguration), impl::bind_in(windowId),
static_cast<int32_t>(callbackType), *(void**)(&attestationCallback),
&operation));
} else {
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2>**)this;
check_hresult(_winrt_abi_type->RequestCreateAsync(
*(void**)(&name), static_cast<int32_t>(option),
*(void**)(&algorithm), *(void**)(&message),
*(void**)(&cacheConfiguration), impl::bind_in(windowId),
static_cast<int32_t>(callbackType), *(void**)(&attestationCallback),
&operation));
}
return winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Security::Credentials::KeyCredentialRetrievalResult>{
operation, take_ownership_from_abi};
}
template <typename D>
auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics2<D>::
OpenAsync(
param::hstring const& name,
winrt::Windows::Security::Credentials::ChallengeResponseKind const&
callbackType,
winrt::Windows::Security::Credentials::
AttestationChallengeHandler const& attestationCallback) const {
void* operation{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2>) {
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result =
impl::try_as_with_reason<winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2,
D const*>(static_cast<D const*>(this),
_winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->OpenAsync(
*(void**)(&name), static_cast<int32_t>(callbackType),
*(void**)(&attestationCallback), &operation));
} else {
auto const _winrt_abi_type =
*(abi_t<winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2>**)this;
check_hresult(_winrt_abi_type->OpenAsync(
*(void**)(&name), static_cast<int32_t>(callbackType),
*(void**)(&attestationCallback), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Security::Credentials::KeyCredentialRetrievalResult>{
operation, take_ownership_from_abi};
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialOperationResult<D>::Result() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialOperationResult>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialOperationResult, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialOperationResult>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Result(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialOperationResult>**)this;
check_hresult(_winrt_abi_type->get_Result(&value));
}
return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialOperationResult<D>::Status() const
{
winrt::Windows::Security::Credentials::KeyCredentialStatus value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialOperationResult>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialOperationResult, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialOperationResult>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialOperationResult>**)this;
check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialRetrievalResult<D>::Credential() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Credential(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult>**)this;
check_hresult(_winrt_abi_type->get_Credential(&value));
}
return winrt::Windows::Security::Credentials::KeyCredential{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IKeyCredentialRetrievalResult<D>::Status() const
{
winrt::Windows::Security::Credentials::KeyCredentialStatus value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult>**)this;
check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordCredential<D>::Resource() const
{
void* resource{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Resource(&resource));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)this;
check_hresult(_winrt_abi_type->get_Resource(&resource));
}
return hstring{ resource, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordCredential<D>::Resource(param::hstring const& resource) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->put_Resource(*(void**)(&resource)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)this;
check_hresult(_winrt_abi_type->put_Resource(*(void**)(&resource)));
}
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordCredential<D>::UserName() const
{
void* userName{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_UserName(&userName));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)this;
check_hresult(_winrt_abi_type->get_UserName(&userName));
}
return hstring{ userName, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordCredential<D>::UserName(param::hstring const& userName) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->put_UserName(*(void**)(&userName)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)this;
check_hresult(_winrt_abi_type->put_UserName(*(void**)(&userName)));
}
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordCredential<D>::Password() const
{
void* password{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Password(&password));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)this;
check_hresult(_winrt_abi_type->get_Password(&password));
}
return hstring{ password, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordCredential<D>::Password(param::hstring const& password) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->put_Password(*(void**)(&password)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)this;
check_hresult(_winrt_abi_type->put_Password(*(void**)(&password)));
}
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordCredential<D>::RetrievePassword() const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RetrievePassword());
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)this;
check_hresult(_winrt_abi_type->RetrievePassword());
}
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordCredential<D>::Properties() const
{
void* props{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordCredential>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordCredential, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Properties(&props));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordCredential>**)this;
check_hresult(_winrt_abi_type->get_Properties(&props));
}
return winrt::Windows::Foundation::Collections::IPropertySet{ props, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordVault<D>::Add(winrt::Windows::Security::Credentials::PasswordCredential const& credential) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordVault>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordVault, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->Add(*(void**)(&credential)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)this;
check_hresult(_winrt_abi_type->Add(*(void**)(&credential)));
}
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordVault<D>::Remove(winrt::Windows::Security::Credentials::PasswordCredential const& credential) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordVault>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordVault, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->Remove(*(void**)(&credential)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)this;
check_hresult(_winrt_abi_type->Remove(*(void**)(&credential)));
}
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordVault<D>::Retrieve(param::hstring const& resource, param::hstring const& userName) const
{
void* credential{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordVault>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordVault, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->Retrieve(*(void**)(&resource), *(void**)(&userName), &credential));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)this;
check_hresult(_winrt_abi_type->Retrieve(*(void**)(&resource), *(void**)(&userName), &credential));
}
return winrt::Windows::Security::Credentials::PasswordCredential{ credential, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordVault<D>::FindAllByResource(param::hstring const& resource) const
{
void* credentials{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordVault>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordVault, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->FindAllByResource(*(void**)(&resource), &credentials));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)this;
check_hresult(_winrt_abi_type->FindAllByResource(*(void**)(&resource), &credentials));
}
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Security::Credentials::PasswordCredential>{ credentials, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordVault<D>::FindAllByUserName(param::hstring const& userName) const
{
void* credentials{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordVault>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordVault, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->FindAllByUserName(*(void**)(&userName), &credentials));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)this;
check_hresult(_winrt_abi_type->FindAllByUserName(*(void**)(&userName), &credentials));
}
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Security::Credentials::PasswordCredential>{ credentials, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IPasswordVault<D>::RetrieveAll() const
{
void* credentials{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IPasswordVault>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IPasswordVault, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RetrieveAll(&credentials));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IPasswordVault>**)this;
check_hresult(_winrt_abi_type->RetrieveAll(&credentials));
}
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Security::Credentials::PasswordCredential>{ credentials, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccount<D>::WebAccountProvider() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccount>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccount, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_WebAccountProvider(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount>**)this;
check_hresult(_winrt_abi_type->get_WebAccountProvider(&value));
}
return winrt::Windows::Security::Credentials::WebAccountProvider{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccount<D>::UserName() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccount>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccount, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_UserName(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount>**)this;
check_hresult(_winrt_abi_type->get_UserName(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccount<D>::State() const
{
winrt::Windows::Security::Credentials::WebAccountState value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccount>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccount, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount>**)this;
check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccount2<D>::Id() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccount2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccount2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Id(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)this;
check_hresult(_winrt_abi_type->get_Id(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccount2<D>::Properties() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccount2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccount2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Properties(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)this;
check_hresult(_winrt_abi_type->get_Properties(&value));
}
return winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccount2<D>::GetPictureAsync(winrt::Windows::Security::Credentials::WebAccountPictureSize const& desizedSize) const
{
void* asyncInfo{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccount2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccount2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetPictureAsync(static_cast<int32_t>(desizedSize), &asyncInfo));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)this;
check_hresult(_winrt_abi_type->GetPictureAsync(static_cast<int32_t>(desizedSize), &asyncInfo));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IRandomAccessStream>{ asyncInfo, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccount2<D>::SignOutAsync() const
{
void* asyncInfo{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccount2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccount2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->SignOutAsync(&asyncInfo));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)this;
check_hresult(_winrt_abi_type->SignOutAsync(&asyncInfo));
}
return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccount2<D>::SignOutAsync(param::hstring const& clientId) const
{
void* asyncInfo{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccount2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccount2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->SignOutWithClientIdAsync(*(void**)(&clientId), &asyncInfo));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccount2>**)this;
check_hresult(_winrt_abi_type->SignOutWithClientIdAsync(*(void**)(&clientId), &asyncInfo));
}
return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountFactory<D>::CreateWebAccount(winrt::Windows::Security::Credentials::WebAccountProvider const& webAccountProvider, param::hstring const& userName, winrt::Windows::Security::Credentials::WebAccountState const& state) const
{
void* instance{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountFactory>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountFactory>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreateWebAccount(*(void**)(&webAccountProvider), *(void**)(&userName), static_cast<int32_t>(state), &instance));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountFactory>**)this;
check_hresult(_winrt_abi_type->CreateWebAccount(*(void**)(&webAccountProvider), *(void**)(&userName), static_cast<int32_t>(state), &instance));
}
return winrt::Windows::Security::Credentials::WebAccount{ instance, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountProvider<D>::Id() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountProvider>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Id(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider>**)this;
check_hresult(_winrt_abi_type->get_Id(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountProvider<D>::DisplayName() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountProvider>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_DisplayName(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider>**)this;
check_hresult(_winrt_abi_type->get_DisplayName(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountProvider<D>::IconUri() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountProvider>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_IconUri(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider>**)this;
check_hresult(_winrt_abi_type->get_IconUri(&value));
}
return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountProvider2<D>::DisplayPurpose() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountProvider2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountProvider2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_DisplayPurpose(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider2>**)this;
check_hresult(_winrt_abi_type->get_DisplayPurpose(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountProvider2<D>::Authority() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountProvider2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountProvider2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Authority(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider2>**)this;
check_hresult(_winrt_abi_type->get_Authority(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountProvider3<D>::User() const
{
void* user{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountProvider3>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountProvider3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider3>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_User(&user));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider3>**)this;
check_hresult(_winrt_abi_type->get_User(&user));
}
return winrt::Windows::System::User{ user, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountProvider4<D>::IsSystemProvider() const
{
bool value{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountProvider4>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountProvider4, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider4>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_IsSystemProvider(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProvider4>**)this;
check_hresult(_winrt_abi_type->get_IsSystemProvider(&value));
}
return value;
}
template <typename D> auto consume_Windows_Security_Credentials_IWebAccountProviderFactory<D>::CreateWebAccountProvider(param::hstring const& id, param::hstring const& displayName, winrt::Windows::Foundation::Uri const& iconUri) const
{
void* instance{};
if constexpr (!std::is_same_v<D, winrt::Windows::Security::Credentials::IWebAccountProviderFactory>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Security::Credentials::IWebAccountProviderFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProviderFactory>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreateWebAccountProvider(*(void**)(&id), *(void**)(&displayName), *(void**)(&iconUri), &instance));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Security::Credentials::IWebAccountProviderFactory>**)this;
check_hresult(_winrt_abi_type->CreateWebAccountProvider(*(void**)(&id), *(void**)(&displayName), *(void**)(&iconUri), &instance));
}
return winrt::Windows::Security::Credentials::WebAccountProvider{ instance, take_ownership_from_abi };
}
template <typename H>
struct delegate<
winrt::Windows::Security::Credentials::AttestationChallengeHandler, H>
final : implements_delegate<winrt::Windows::Security::Credentials::
AttestationChallengeHandler,
H> {
delegate(H&& handler)
: implements_delegate<winrt::Windows::Security::Credentials::
AttestationChallengeHandler,
H>(std::forward<H>(handler)) {}
int32_t __stdcall Invoke(void* challenge, void** result) noexcept final
try {
clear_abi(result);
*result = detach_from<winrt::Windows::Storage::Streams::IBuffer>((
*this)(
*reinterpret_cast<winrt::Windows::Storage::Streams::IBuffer const*>(
&challenge)));
return 0;
} catch (...) {
return to_hresult();
}
};
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::ICredentialFactory> : produce_base<D, winrt::Windows::Security::Credentials::ICredentialFactory>
{
int32_t __stdcall CreatePasswordCredential(void* resource, void* userName, void* password, void** credential) noexcept final try
{
clear_abi(credential);
typename D::abi_guard guard(this->shim());
*credential = detach_from<winrt::Windows::Security::Credentials::PasswordCredential>(this->shim().CreatePasswordCredential(*reinterpret_cast<hstring const*>(&resource), *reinterpret_cast<hstring const*>(&userName), *reinterpret_cast<hstring const*>(&password)));
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IKeyCredential> : produce_base<D, winrt::Windows::Security::Credentials::IKeyCredential>
{
int32_t __stdcall get_Name(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().Name());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall RetrievePublicKeyWithDefaultBlobType(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(this->shim().RetrievePublicKey());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall RetrievePublicKeyWithBlobType(int32_t blobType, void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(this->shim().RetrievePublicKey(*reinterpret_cast<winrt::Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType const*>(&blobType)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall RequestSignAsync(void* data, void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Credentials::KeyCredentialOperationResult>>(this->shim().RequestSignAsync(*reinterpret_cast<winrt::Windows::Storage::Streams::IBuffer const*>(&data)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall GetAttestationAsync(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Credentials::KeyCredentialAttestationResult>>(this->shim().GetAttestationAsync());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IKeyCredential2>
: produce_base<D,
winrt::Windows::Security::Credentials::IKeyCredential2> {
int32_t __stdcall RequestDeriveSharedSecretAsync(
struct struct_Windows_UI_WindowId windowId, void* message,
void* encryptedRequest, void** operation) noexcept final try {
clear_abi(operation);
typename D::abi_guard guard(this->shim());
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Security::Credentials::
KeyCredentialOperationResult>>(
this->shim().RequestDeriveSharedSecretAsync(
*reinterpret_cast<winrt::Windows::UI::WindowId const*>(
&windowId),
*reinterpret_cast<hstring const*>(&message),
*reinterpret_cast<
winrt::Windows::Storage::Streams::IBuffer const*>(
&encryptedRequest)));
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall RetrieveAuthorizationContext(
void* encryptedRequest, void** result) noexcept final try {
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Storage::Streams::IBuffer>(
this->shim().RetrieveAuthorizationContext(
*reinterpret_cast<
winrt::Windows::Storage::Streams::IBuffer const*>(
&encryptedRequest)));
return 0;
} catch (...) {
return to_hresult();
}
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<
D,
winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult>
: produce_base<D, winrt::Windows::Security::Credentials::
IKeyCredentialAttestationResult> {
int32_t __stdcall get_CertificateChainBuffer(void** value) noexcept final
try {
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(
this->shim().CertificateChainBuffer());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall get_AttestationBuffer(void** value) noexcept final try {
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(
this->shim().AttestationBuffer());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall get_Status(int32_t* value) noexcept final try {
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Security::Credentials::
KeyCredentialAttestationStatus>(
this->shim().Status());
return 0;
} catch (...) {
return to_hresult();
}
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<
D,
winrt::Windows::Security::Credentials::IKeyCredentialCacheConfiguration>
: produce_base<D, winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfiguration> {
int32_t __stdcall get_CacheOption(int32_t* value) noexcept final try {
typename D::abi_guard guard(this->shim());
*value = detach_from<
winrt::Windows::Security::Credentials::KeyCredentialCacheOption>(
this->shim().CacheOption());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall get_Timeout(int64_t* value) noexcept final try {
zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::TimeSpan>(
this->shim().Timeout());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall get_UsageCount(uint32_t* value) noexcept final try {
typename D::abi_guard guard(this->shim());
*value = detach_from<uint32_t>(this->shim().UsageCount());
return 0;
} catch (...) {
return to_hresult();
}
};
#endif
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfigurationFactory>
: produce_base<D, winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfigurationFactory> {
int32_t __stdcall CreateInstance(int32_t cacheOption, int64_t timeout,
uint32_t usageCount,
void** result) noexcept final try {
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Security::Credentials::
KeyCredentialCacheConfiguration>(
this->shim().CreateInstance(
*reinterpret_cast<winrt::Windows::Security::Credentials::
KeyCredentialCacheOption const*>(
&cacheOption),
*reinterpret_cast<winrt::Windows::Foundation::TimeSpan const*>(
&timeout),
usageCount));
return 0;
} catch (...) {
return to_hresult();
}
};
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<
D, winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics>
: produce_base<D, winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics> {
int32_t __stdcall IsSupportedAsync(void** value) noexcept final try {
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::IAsyncOperation<bool>>(
this->shim().IsSupportedAsync());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall RenewAttestationAsync(void** operation) noexcept final
try {
clear_abi(operation);
typename D::abi_guard guard(this->shim());
*operation = detach_from<winrt::Windows::Foundation::IAsyncAction>(
this->shim().RenewAttestationAsync());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall RequestCreateAsync(void* name, int32_t option,
void** value) noexcept final try {
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Security::Credentials::
KeyCredentialRetrievalResult>>(
this->shim().RequestCreateAsync(
*reinterpret_cast<hstring const*>(&name),
*reinterpret_cast<winrt::Windows::Security::Credentials::
KeyCredentialCreationOption const*>(
&option)));
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall OpenAsync(void* name, void** value) noexcept final try {
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Security::Credentials::
KeyCredentialRetrievalResult>>(
this->shim().OpenAsync(*reinterpret_cast<hstring const*>(&name)));
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall DeleteAsync(void* name, void** operation) noexcept final
try {
clear_abi(operation);
typename D::abi_guard guard(this->shim());
*operation = detach_from<winrt::Windows::Foundation::IAsyncAction>(
this->shim().DeleteAsync(*reinterpret_cast<hstring const*>(&name)));
return 0;
} catch (...) {
return to_hresult();
}
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<
D, winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics2>
: produce_base<D, winrt::Windows::Security::Credentials::
IKeyCredentialManagerStatics2> {
int32_t __stdcall RequestCreateAsync(
void* name, int32_t option, void* algorithm, void* message,
void* cacheConfiguration, struct struct_Windows_UI_WindowId windowId,
int32_t callbackType, void* attestationCallback,
void** operation) noexcept final try {
clear_abi(operation);
typename D::abi_guard guard(this->shim());
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Security::Credentials::
KeyCredentialRetrievalResult>>(
this->shim().RequestCreateAsync(
*reinterpret_cast<hstring const*>(&name),
*reinterpret_cast<winrt::Windows::Security::Credentials::
KeyCredentialCreationOption const*>(
&option),
*reinterpret_cast<hstring const*>(&algorithm),
*reinterpret_cast<hstring const*>(&message),
*reinterpret_cast<winrt::Windows::Security::Credentials::
KeyCredentialCacheConfiguration const*>(
&cacheConfiguration),
*reinterpret_cast<winrt::Windows::UI::WindowId const*>(
&windowId),
*reinterpret_cast<winrt::Windows::Security::Credentials::
ChallengeResponseKind const*>(
&callbackType),
*reinterpret_cast<winrt::Windows::Security::Credentials::
AttestationChallengeHandler const*>(
&attestationCallback)));
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall OpenAsync(void* name, int32_t callbackType,
void* attestationCallback,
void** operation) noexcept final try {
clear_abi(operation);
typename D::abi_guard guard(this->shim());
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Security::Credentials::
KeyCredentialRetrievalResult>>(
this->shim().OpenAsync(
*reinterpret_cast<hstring const*>(&name),
*reinterpret_cast<winrt::Windows::Security::Credentials::
ChallengeResponseKind const*>(
&callbackType),
*reinterpret_cast<winrt::Windows::Security::Credentials::
AttestationChallengeHandler const*>(
&attestationCallback)));
return 0;
} catch (...) {
return to_hresult();
}
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<
D, winrt::Windows::Security::Credentials::IKeyCredentialOperationResult>
: produce_base<D, winrt::Windows::Security::Credentials::
IKeyCredentialOperationResult> {
int32_t __stdcall get_Result(void** value) noexcept final try {
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(
this->shim().Result());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall get_Status(int32_t* value) noexcept final try {
typename D::abi_guard guard(this->shim());
*value = detach_from<
winrt::Windows::Security::Credentials::KeyCredentialStatus>(
this->shim().Status());
return 0;
} catch (...) {
return to_hresult();
}
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult> : produce_base<D, winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult>
{
int32_t __stdcall get_Credential(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Security::Credentials::KeyCredential>(this->shim().Credential());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Status(int32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Security::Credentials::KeyCredentialStatus>(this->shim().Status());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IPasswordCredential> : produce_base<D, winrt::Windows::Security::Credentials::IPasswordCredential>
{
int32_t __stdcall get_Resource(void** resource) noexcept final try
{
clear_abi(resource);
typename D::abi_guard guard(this->shim());
*resource = detach_from<hstring>(this->shim().Resource());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall put_Resource(void* resource) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().Resource(*reinterpret_cast<hstring const*>(&resource));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_UserName(void** userName) noexcept final try
{
clear_abi(userName);
typename D::abi_guard guard(this->shim());
*userName = detach_from<hstring>(this->shim().UserName());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall put_UserName(void* userName) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().UserName(*reinterpret_cast<hstring const*>(&userName));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Password(void** password) noexcept final try
{
clear_abi(password);
typename D::abi_guard guard(this->shim());
*password = detach_from<hstring>(this->shim().Password());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall put_Password(void* password) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().Password(*reinterpret_cast<hstring const*>(&password));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall RetrievePassword() noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().RetrievePassword();
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Properties(void** props) noexcept final try
{
clear_abi(props);
typename D::abi_guard guard(this->shim());
*props = detach_from<winrt::Windows::Foundation::Collections::IPropertySet>(this->shim().Properties());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IPasswordVault> : produce_base<D, winrt::Windows::Security::Credentials::IPasswordVault>
{
int32_t __stdcall Add(void* credential) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().Add(*reinterpret_cast<winrt::Windows::Security::Credentials::PasswordCredential const*>(&credential));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall Remove(void* credential) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().Remove(*reinterpret_cast<winrt::Windows::Security::Credentials::PasswordCredential const*>(&credential));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall Retrieve(void* resource, void* userName, void** credential) noexcept final try
{
clear_abi(credential);
typename D::abi_guard guard(this->shim());
*credential = detach_from<winrt::Windows::Security::Credentials::PasswordCredential>(this->shim().Retrieve(*reinterpret_cast<hstring const*>(&resource), *reinterpret_cast<hstring const*>(&userName)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall FindAllByResource(void* resource, void** credentials) noexcept final try
{
clear_abi(credentials);
typename D::abi_guard guard(this->shim());
*credentials = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Security::Credentials::PasswordCredential>>(this->shim().FindAllByResource(*reinterpret_cast<hstring const*>(&resource)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall FindAllByUserName(void* userName, void** credentials) noexcept final try
{
clear_abi(credentials);
typename D::abi_guard guard(this->shim());
*credentials = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Security::Credentials::PasswordCredential>>(this->shim().FindAllByUserName(*reinterpret_cast<hstring const*>(&userName)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall RetrieveAll(void** credentials) noexcept final try
{
clear_abi(credentials);
typename D::abi_guard guard(this->shim());
*credentials = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Security::Credentials::PasswordCredential>>(this->shim().RetrieveAll());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IWebAccount> : produce_base<D, winrt::Windows::Security::Credentials::IWebAccount>
{
int32_t __stdcall get_WebAccountProvider(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Security::Credentials::WebAccountProvider>(this->shim().WebAccountProvider());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_UserName(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().UserName());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_State(int32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Security::Credentials::WebAccountState>(this->shim().State());
return 0;
}
catch (...) { return to_hresult(); }
};
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IWebAccount2> : produce_base<D, winrt::Windows::Security::Credentials::IWebAccount2>
{
int32_t __stdcall get_Id(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().Id());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Properties(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>>(this->shim().Properties());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall GetPictureAsync(int32_t desizedSize, void** asyncInfo) noexcept final try
{
clear_abi(asyncInfo);
typename D::abi_guard guard(this->shim());
*asyncInfo = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IRandomAccessStream>>(this->shim().GetPictureAsync(*reinterpret_cast<winrt::Windows::Security::Credentials::WebAccountPictureSize const*>(&desizedSize)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall SignOutAsync(void** asyncInfo) noexcept final try
{
clear_abi(asyncInfo);
typename D::abi_guard guard(this->shim());
*asyncInfo = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().SignOutAsync());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall SignOutWithClientIdAsync(void* clientId, void** asyncInfo) noexcept final try
{
clear_abi(asyncInfo);
typename D::abi_guard guard(this->shim());
*asyncInfo = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().SignOutAsync(*reinterpret_cast<hstring const*>(&clientId)));
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IWebAccountFactory> : produce_base<D, winrt::Windows::Security::Credentials::IWebAccountFactory>
{
int32_t __stdcall CreateWebAccount(void* webAccountProvider, void* userName, int32_t state, void** instance) noexcept final try
{
clear_abi(instance);
typename D::abi_guard guard(this->shim());
*instance = detach_from<winrt::Windows::Security::Credentials::WebAccount>(this->shim().CreateWebAccount(*reinterpret_cast<winrt::Windows::Security::Credentials::WebAccountProvider const*>(&webAccountProvider), *reinterpret_cast<hstring const*>(&userName), *reinterpret_cast<winrt::Windows::Security::Credentials::WebAccountState const*>(&state)));
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IWebAccountProvider> : produce_base<D, winrt::Windows::Security::Credentials::IWebAccountProvider>
{
int32_t __stdcall get_Id(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().Id());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_DisplayName(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().DisplayName());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_IconUri(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().IconUri());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IWebAccountProvider2> : produce_base<D, winrt::Windows::Security::Credentials::IWebAccountProvider2>
{
int32_t __stdcall get_DisplayPurpose(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().DisplayPurpose());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Authority(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().Authority());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IWebAccountProvider3> : produce_base<D, winrt::Windows::Security::Credentials::IWebAccountProvider3>
{
int32_t __stdcall get_User(void** user) noexcept final try
{
clear_abi(user);
typename D::abi_guard guard(this->shim());
*user = detach_from<winrt::Windows::System::User>(this->shim().User());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IWebAccountProvider4> : produce_base<D, winrt::Windows::Security::Credentials::IWebAccountProvider4>
{
int32_t __stdcall get_IsSystemProvider(bool* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<bool>(this->shim().IsSystemProvider());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Security::Credentials::IWebAccountProviderFactory> : produce_base<D, winrt::Windows::Security::Credentials::IWebAccountProviderFactory>
{
int32_t __stdcall CreateWebAccountProvider(void* id, void* displayName, void* iconUri, void** instance) noexcept final try
{
clear_abi(instance);
typename D::abi_guard guard(this->shim());
*instance = detach_from<winrt::Windows::Security::Credentials::WebAccountProvider>(this->shim().CreateWebAccountProvider(*reinterpret_cast<hstring const*>(&id), *reinterpret_cast<hstring const*>(&displayName), *reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&iconUri)));
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
}
WINRT_EXPORT namespace winrt::Windows::Security::Credentials
{
inline KeyCredentialCacheConfiguration::KeyCredentialCacheConfiguration(
winrt::Windows::Security::Credentials::KeyCredentialCacheOption const&
cacheOption,
winrt::Windows::Foundation::TimeSpan const& timeout, uint32_t usageCount)
: KeyCredentialCacheConfiguration(
impl::call_factory<KeyCredentialCacheConfiguration,
IKeyCredentialCacheConfigurationFactory>(
[&](IKeyCredentialCacheConfigurationFactory const& f) {
return f.CreateInstance(cacheOption, timeout, usageCount);
})) {}
inline auto KeyCredentialManager::IsSupportedAsync() {
return impl::call_factory_cast<
winrt::Windows::Foundation::IAsyncOperation<bool> (*)(
IKeyCredentialManagerStatics const&),
KeyCredentialManager, IKeyCredentialManagerStatics>(
[](IKeyCredentialManagerStatics const& f) {
return f.IsSupportedAsync();
});
}
inline auto KeyCredentialManager::RenewAttestationAsync()
{
return impl::call_factory_cast<winrt::Windows::Foundation::IAsyncAction(*)(IKeyCredentialManagerStatics const&), KeyCredentialManager, IKeyCredentialManagerStatics>([](IKeyCredentialManagerStatics const& f) { return f.RenewAttestationAsync(); });
}
inline auto KeyCredentialManager::RequestCreateAsync(param::hstring const& name, winrt::Windows::Security::Credentials::KeyCredentialCreationOption const& option)
{
return impl::call_factory<KeyCredentialManager, IKeyCredentialManagerStatics>([&](IKeyCredentialManagerStatics const& f) { return f.RequestCreateAsync(name, option); });
}
inline auto KeyCredentialManager::OpenAsync(param::hstring const& name)
{
return impl::call_factory<KeyCredentialManager, IKeyCredentialManagerStatics>([&](IKeyCredentialManagerStatics const& f) { return f.OpenAsync(name); });
}
inline auto KeyCredentialManager::DeleteAsync(param::hstring const& name)
{
return impl::call_factory<KeyCredentialManager, IKeyCredentialManagerStatics>([&](IKeyCredentialManagerStatics const& f) { return f.DeleteAsync(name); });
}
inline auto KeyCredentialManager::RequestCreateAsync(
param::hstring const& name,
winrt::Windows::Security::Credentials::
KeyCredentialCreationOption const& option,
param::hstring const& algorithm, param::hstring const& message,
winrt::Windows::Security::Credentials::
KeyCredentialCacheConfiguration const& cacheConfiguration,
winrt::Windows::UI::WindowId const& windowId,
winrt::Windows::Security::Credentials::ChallengeResponseKind const&
callbackType,
winrt::Windows::Security::Credentials::
AttestationChallengeHandler const& attestationCallback) {
return impl::call_factory<KeyCredentialManager,
IKeyCredentialManagerStatics2>(
[&](IKeyCredentialManagerStatics2 const& f) {
return f.RequestCreateAsync(name, option, algorithm, message,
cacheConfiguration, windowId,
callbackType, attestationCallback);
});
}
inline auto KeyCredentialManager::OpenAsync(
param::hstring const& name,
winrt::Windows::Security::Credentials::ChallengeResponseKind const&
callbackType,
winrt::Windows::Security::Credentials::
AttestationChallengeHandler const& attestationCallback) {
return impl::call_factory<KeyCredentialManager,
IKeyCredentialManagerStatics2>(
[&](IKeyCredentialManagerStatics2 const& f) {
return f.OpenAsync(name, callbackType, attestationCallback);
});
}
inline PasswordCredential::PasswordCredential() :
PasswordCredential(impl::call_factory_cast<PasswordCredential(*)(winrt::Windows::Foundation::IActivationFactory const&), PasswordCredential>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PasswordCredential>(); }))
{
}
inline PasswordCredential::PasswordCredential(param::hstring const& resource, param::hstring const& userName, param::hstring const& password) :
PasswordCredential(impl::call_factory<PasswordCredential, ICredentialFactory>([&](ICredentialFactory const& f) { return f.CreatePasswordCredential(resource, userName, password); }))
{
}
inline PasswordCredentialPropertyStore::PasswordCredentialPropertyStore() :
PasswordCredentialPropertyStore(impl::call_factory_cast<PasswordCredentialPropertyStore(*)(winrt::Windows::Foundation::IActivationFactory const&), PasswordCredentialPropertyStore>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PasswordCredentialPropertyStore>(); }))
{
}
inline PasswordVault::PasswordVault() :
PasswordVault(impl::call_factory_cast<PasswordVault(*)(winrt::Windows::Foundation::IActivationFactory const&), PasswordVault>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PasswordVault>(); }))
{
}
inline WebAccount::WebAccount(winrt::Windows::Security::Credentials::WebAccountProvider const& webAccountProvider, param::hstring const& userName, winrt::Windows::Security::Credentials::WebAccountState const& state) :
WebAccount(impl::call_factory<WebAccount, IWebAccountFactory>([&](IWebAccountFactory const& f) { return f.CreateWebAccount(webAccountProvider, userName, state); }))
{
}
inline WebAccountProvider::WebAccountProvider(param::hstring const& id, param::hstring const& displayName, winrt::Windows::Foundation::Uri const& iconUri) :
WebAccountProvider(impl::call_factory<WebAccountProvider, IWebAccountProviderFactory>([&](IWebAccountProviderFactory const& f) { return f.CreateWebAccountProvider(id, displayName, iconUri); }))
{
}
template <typename L>
AttestationChallengeHandler::AttestationChallengeHandler(L handler)
: AttestationChallengeHandler(
impl::make_delegate<AttestationChallengeHandler>(
std::forward<L>(handler))) {}
template <typename F>
AttestationChallengeHandler::AttestationChallengeHandler(F * handler)
: AttestationChallengeHandler(
[=](auto&&... args) { return handler(args...); }) {}
template <typename O, typename M>
AttestationChallengeHandler::AttestationChallengeHandler(O * object,
M method)
: AttestationChallengeHandler(
[=](auto&&... args) { return ((*object).*(method))(args...); }) {}
template <typename O, typename M>
AttestationChallengeHandler::AttestationChallengeHandler(
com_ptr<O> && object, M method)
: AttestationChallengeHandler(
[o = std::move(object), method](auto&&... args) {
return ((*o).*(method))(args...);
}) {}
template <typename O, typename LM>
AttestationChallengeHandler::AttestationChallengeHandler(
weak_ref<O> && object, LM && lambda_or_method)
: AttestationChallengeHandler(
[o = std::move(object),
lm = std::forward<LM>(lambda_or_method)](auto&&... args) {
if (auto s = o.get()) {
if constexpr (std::is_member_function_pointer_v<LM>)
((*s).*(lm))(args...);
else
lm(args...);
}
}) {}
template <typename O, typename M>
AttestationChallengeHandler::AttestationChallengeHandler(
std::shared_ptr<O> && object, M method)
: AttestationChallengeHandler(
[o = std::move(object), method](auto&&... args) {
return ((*o).*(method))(args...);
}) {}
template <typename O, typename LM>
AttestationChallengeHandler::AttestationChallengeHandler(
std::weak_ptr<O> && object, LM && lambda_or_method)
: AttestationChallengeHandler(
[o = std::move(object),
lm = std::forward<LM>(lambda_or_method)](auto&&... args) {
if (auto s = o.lock()) {
if constexpr (std::is_member_function_pointer_v<LM>)
((*s).*(lm))(args...);
else
lm(args...);
}
}) {}
inline auto AttestationChallengeHandler::operator()(
winrt::Windows::Storage::Streams::IBuffer const& challenge) const {
void* result{};
check_hresult((*(impl::abi_t<AttestationChallengeHandler>**)this)
->Invoke(*(void**)(&challenge), &result));
return winrt::Windows::Storage::Streams::IBuffer{result,
take_ownership_from_abi};
}
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
template<> struct hash<winrt::Windows::Security::Credentials::ICredentialFactory> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IKeyCredential> : winrt::impl::hash_base {};
template <>
struct hash<winrt::Windows::Security::Credentials::IKeyCredential2>
: winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult> : winrt::impl::hash_base {};
template <>
struct hash<
winrt::Windows::Security::Credentials::IKeyCredentialCacheConfiguration>
: winrt::impl::hash_base {};
template <>
struct hash<winrt::Windows::Security::Credentials::
IKeyCredentialCacheConfigurationFactory>
: winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics> : winrt::impl::hash_base {};
template <>
struct hash<
winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics2>
: winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IKeyCredentialOperationResult> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IPasswordCredential> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IPasswordVault> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IWebAccount> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IWebAccount2> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IWebAccountFactory> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IWebAccountProvider> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IWebAccountProvider2> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IWebAccountProvider3> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IWebAccountProvider4> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::IWebAccountProviderFactory> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::KeyCredential> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::KeyCredentialAttestationResult> : winrt::impl::hash_base {};
template <>
struct hash<
winrt::Windows::Security::Credentials::KeyCredentialCacheConfiguration>
: winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::KeyCredentialManager> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::KeyCredentialOperationResult> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::KeyCredentialRetrievalResult> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::PasswordCredential> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::PasswordCredentialPropertyStore> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::PasswordVault> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::WebAccount> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Security::Credentials::WebAccountProvider> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif