// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Devices_Printers_Extensions_H #define WINRT_Windows_Devices_Printers_Extensions_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.Devices.Printers.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Devices.Printers.Extensions.2.h" namespace winrt::impl { template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow::DeviceID() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow)->get_DeviceID(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow::GetPrintModelPackage() const { void* printModelPackage{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow)->GetPrintModelPackage(&printModelPackage)); return winrt::Windows::Foundation::IInspectable{ printModelPackage, take_ownership_from_abi }; } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow::IsPrintReady() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow)->get_IsPrintReady(&value)); return value; } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow::IsPrintReady(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow)->put_IsPrintReady(value)); } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow::PrintRequested(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow)->add_PrintRequested(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow::PrintRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, PrintRequested(eventHandler)); } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow::PrintRequested(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow)->remove_PrintRequested(impl::bind_in(eventCookie)); } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow2::PrinterChanged(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow2)->add_PrinterChanged(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow2::PrinterChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, PrinterChanged(eventHandler)); } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflow2::PrinterChanged(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow2)->remove_PrinterChanged(impl::bind_in(eventCookie)); } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflowPrintRequestedEventArgs::Status() const { winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflowPrintRequestedEventArgs)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflowPrintRequestedEventArgs::SetExtendedStatus(winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowDetail const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflowPrintRequestedEventArgs)->SetExtendedStatus(static_cast(value))); } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflowPrintRequestedEventArgs::SetSource(winrt::Windows::Foundation::IInspectable const& source) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflowPrintRequestedEventArgs)->SetSource(*(void**)(&source))); } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflowPrintRequestedEventArgs::SetSourceChanged(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflowPrintRequestedEventArgs)->SetSourceChanged(value)); } template auto consume_Windows_Devices_Printers_Extensions_IPrint3DWorkflowPrinterChangedEventArgs::NewDeviceId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflowPrinterChangedEventArgs)->get_NewDeviceId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Printers_Extensions_IPrintExtensionContextStatic::FromDeviceId(param::hstring const& deviceId) const { void* context{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintExtensionContextStatic)->FromDeviceId(*(void**)(&deviceId), &context)); return winrt::Windows::Foundation::IInspectable{ context, take_ownership_from_abi }; } template auto consume_Windows_Devices_Printers_Extensions_IPrintNotificationEventDetails::PrinterName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintNotificationEventDetails)->get_PrinterName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Printers_Extensions_IPrintNotificationEventDetails::EventData() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintNotificationEventDetails)->get_EventData(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Printers_Extensions_IPrintNotificationEventDetails::EventData(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintNotificationEventDetails)->put_EventData(*(void**)(&value))); } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfiguration::PrinterExtensionContext() const { void* context{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfiguration)->get_PrinterExtensionContext(&context)); return winrt::Windows::Foundation::IInspectable{ context, take_ownership_from_abi }; } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfiguration::SaveRequested(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfiguration)->add_SaveRequested(*(void**)(&eventHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfiguration::SaveRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, SaveRequested(eventHandler)); } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfiguration::SaveRequested(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfiguration)->remove_SaveRequested(impl::bind_in(eventCookie)); } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfigurationSaveRequest::Cancel() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequest)->Cancel()); } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfigurationSaveRequest::Save(winrt::Windows::Foundation::IInspectable const& printerExtensionContext) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequest)->Save(*(void**)(&printerExtensionContext))); } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfigurationSaveRequest::GetDeferral() const { void* deferral{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequest)->GetDeferral(&deferral)); return winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral{ deferral, take_ownership_from_abi }; } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfigurationSaveRequest::Deadline() const { winrt::Windows::Foundation::DateTime value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequest)->get_Deadline(put_abi(value))); return value; } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfigurationSaveRequestedDeferral::Complete() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequestedDeferral)->Complete()); } template auto consume_Windows_Devices_Printers_Extensions_IPrintTaskConfigurationSaveRequestedEventArgs::Request() const { void* context{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequestedEventArgs)->get_Request(&context)); return winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest{ context, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DeviceID(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceID()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPrintModelPackage(void** printModelPackage) noexcept final try { clear_abi(printModelPackage); typename D::abi_guard guard(this->shim()); *printModelPackage = detach_from(this->shim().GetPrintModelPackage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPrintReady(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPrintReady()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsPrintReady(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPrintReady(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_PrintRequested(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().PrintRequested(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PrintRequested(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PrintRequested(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_PrinterChanged(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().PrinterChanged(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PrinterChanged(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PrinterChanged(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetExtendedStatus(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetExtendedStatus(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetSource(void* source) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetSource(*reinterpret_cast(&source)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetSourceChanged(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetSourceChanged(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NewDeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewDeviceId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromDeviceId(void* deviceId, void** context) noexcept final try { clear_abi(context); typename D::abi_guard guard(this->shim()); *context = detach_from(this->shim().FromDeviceId(*reinterpret_cast(&deviceId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PrinterName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrinterName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EventData(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EventData()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_EventData(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EventData(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PrinterExtensionContext(void** context) noexcept final try { clear_abi(context); typename D::abi_guard guard(this->shim()); *context = detach_from(this->shim().PrinterExtensionContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_SaveRequested(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().SaveRequested(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SaveRequested(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SaveRequested(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Cancel() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Cancel(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Save(void* printerExtensionContext) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Save(*reinterpret_cast(&printerExtensionContext)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** deferral) noexcept final try { clear_abi(deferral); typename D::abi_guard guard(this->shim()); *deferral = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Deadline(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Deadline()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Complete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Complete(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Request(void** context) noexcept final try { clear_abi(context); typename D::abi_guard guard(this->shim()); *context = detach_from(this->shim().Request()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Devices::Printers::Extensions { inline auto PrintExtensionContext::FromDeviceId(param::hstring const& deviceId) { return impl::call_factory([&](IPrintExtensionContextStatic const& f) { return f.FromDeviceId(deviceId); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; 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