// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Web_AtomPub_H #define WINRT_Windows_Web_AtomPub_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.Web.h" #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.Storage.Streams.2.h" #include "winrt/impl/Windows.Web.Syndication.2.h" #include "winrt/impl/Windows.Web.AtomPub.2.h" namespace winrt::impl { template auto consume_Windows_Web_AtomPub_IAtomPubClient::RetrieveServiceDocumentAsync(winrt::Windows::Foundation::Uri const& uri) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->RetrieveServiceDocumentAsync(*(void**)(&uri), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::RetrieveMediaResourceAsync(winrt::Windows::Foundation::Uri const& uri) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->RetrieveMediaResourceAsync(*(void**)(&uri), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::RetrieveResourceAsync(winrt::Windows::Foundation::Uri const& uri) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->RetrieveResourceAsync(*(void**)(&uri), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::CreateResourceAsync(winrt::Windows::Foundation::Uri const& uri, param::hstring const& description, winrt::Windows::Web::Syndication::SyndicationItem const& item) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->CreateResourceAsync(*(void**)(&uri), *(void**)(&description), *(void**)(&item), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::CreateMediaResourceAsync(winrt::Windows::Foundation::Uri const& uri, param::hstring const& mediaType, param::hstring const& description, winrt::Windows::Storage::Streams::IInputStream const& mediaStream) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->CreateMediaResourceAsync(*(void**)(&uri), *(void**)(&mediaType), *(void**)(&description), *(void**)(&mediaStream), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::UpdateMediaResourceAsync(winrt::Windows::Foundation::Uri const& uri, param::hstring const& mediaType, winrt::Windows::Storage::Streams::IInputStream const& mediaStream) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->UpdateMediaResourceAsync(*(void**)(&uri), *(void**)(&mediaType), *(void**)(&mediaStream), &operation)); return winrt::Windows::Foundation::IAsyncActionWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::UpdateResourceAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::Web::Syndication::SyndicationItem const& item) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->UpdateResourceAsync(*(void**)(&uri), *(void**)(&item), &operation)); return winrt::Windows::Foundation::IAsyncActionWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::UpdateResourceItemAsync(winrt::Windows::Web::Syndication::SyndicationItem const& item) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->UpdateResourceItemAsync(*(void**)(&item), &operation)); return winrt::Windows::Foundation::IAsyncActionWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::DeleteResourceAsync(winrt::Windows::Foundation::Uri const& uri) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->DeleteResourceAsync(*(void**)(&uri), &operation)); return winrt::Windows::Foundation::IAsyncActionWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::DeleteResourceItemAsync(winrt::Windows::Web::Syndication::SyndicationItem const& item) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->DeleteResourceItemAsync(*(void**)(&item), &operation)); return winrt::Windows::Foundation::IAsyncActionWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IAtomPubClient::CancelAsyncOperations() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClient)->CancelAsyncOperations()); } template auto consume_Windows_Web_AtomPub_IAtomPubClientFactory::CreateAtomPubClientWithCredentials(winrt::Windows::Security::Credentials::PasswordCredential const& serverCredential) const { void* atomPubClient{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IAtomPubClientFactory)->CreateAtomPubClientWithCredentials(*(void**)(&serverCredential), &atomPubClient)); return winrt::Windows::Web::AtomPub::AtomPubClient{ atomPubClient, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IResourceCollection::Title() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IResourceCollection)->get_Title(&value)); return winrt::Windows::Web::Syndication::ISyndicationText{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IResourceCollection::Uri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IResourceCollection)->get_Uri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IResourceCollection::Categories() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IResourceCollection)->get_Categories(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IResourceCollection::Accepts() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IResourceCollection)->get_Accepts(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IServiceDocument::Workspaces() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IServiceDocument)->get_Workspaces(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IWorkspace::Title() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IWorkspace)->get_Title(&value)); return winrt::Windows::Web::Syndication::ISyndicationText{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_AtomPub_IWorkspace::Collections() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Web::AtomPub::IWorkspace)->get_Collections(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RetrieveServiceDocumentAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RetrieveServiceDocumentAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RetrieveMediaResourceAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RetrieveMediaResourceAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RetrieveResourceAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RetrieveResourceAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateResourceAsync(void* uri, void* description, void* item, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateResourceAsync(*reinterpret_cast(&uri), *reinterpret_cast(&description), *reinterpret_cast(&item))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateMediaResourceAsync(void* uri, void* mediaType, void* description, void* mediaStream, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateMediaResourceAsync(*reinterpret_cast(&uri), *reinterpret_cast(&mediaType), *reinterpret_cast(&description), *reinterpret_cast(&mediaStream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateMediaResourceAsync(void* uri, void* mediaType, void* mediaStream, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().UpdateMediaResourceAsync(*reinterpret_cast(&uri), *reinterpret_cast(&mediaType), *reinterpret_cast(&mediaStream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateResourceAsync(void* uri, void* item, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().UpdateResourceAsync(*reinterpret_cast(&uri), *reinterpret_cast(&item))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateResourceItemAsync(void* item, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().UpdateResourceItemAsync(*reinterpret_cast(&item))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteResourceAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().DeleteResourceAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteResourceItemAsync(void* item, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().DeleteResourceItemAsync(*reinterpret_cast(&item))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CancelAsyncOperations() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CancelAsyncOperations(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateAtomPubClientWithCredentials(void* serverCredential, void** atomPubClient) noexcept final try { clear_abi(atomPubClient); typename D::abi_guard guard(this->shim()); *atomPubClient = detach_from(this->shim().CreateAtomPubClientWithCredentials(*reinterpret_cast(&serverCredential))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Uri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Categories(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Categories()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Accepts(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Accepts()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Workspaces(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Workspaces()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Collections(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Collections()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Web::AtomPub { inline AtomPubClient::AtomPubClient() : AtomPubClient(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline AtomPubClient::AtomPubClient(winrt::Windows::Security::Credentials::PasswordCredential const& serverCredential) : AtomPubClient(impl::call_factory([&](IAtomPubClientFactory const& f) { return f.CreateAtomPubClientWithCredentials(serverCredential); })) { } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif