|
| 1 | +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.220607.4 |
| 2 | + |
| 3 | +#pragma once |
| 4 | +#ifndef WINRT_Windows_Devices_Geolocation_Provider_H |
| 5 | +#define WINRT_Windows_Devices_Geolocation_Provider_H |
| 6 | +#include "winrt/base.h" |
| 7 | +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.220607.4"), "Mismatched C++/WinRT headers."); |
| 8 | +#define CPPWINRT_VERSION "2.0.220607.4" |
| 9 | +#include "winrt/Windows.Devices.Geolocation.h" |
| 10 | +#include "winrt/impl/Windows.Devices.Geolocation.2.h" |
| 11 | +#include "winrt/impl/Windows.Foundation.2.h" |
| 12 | +#include "winrt/impl/Windows.Devices.Geolocation.Provider.2.h" |
| 13 | +namespace winrt::impl |
| 14 | +{ |
| 15 | + template <typename D> auto consume_Windows_Devices_Geolocation_Provider_IGeolocationProvider<D>::IsOverridden() const |
| 16 | + { |
| 17 | + bool value{}; |
| 18 | + check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Geolocation::Provider::IGeolocationProvider)->get_IsOverridden(&value)); |
| 19 | + return value; |
| 20 | + } |
| 21 | + template <typename D> auto consume_Windows_Devices_Geolocation_Provider_IGeolocationProvider<D>::SetOverridePosition(winrt::Windows::Devices::Geolocation::BasicGeoposition const& newPosition, winrt::Windows::Devices::Geolocation::PositionSource const& positionSource, double accuracyInMeters) const |
| 22 | + { |
| 23 | + winrt::Windows::Devices::Geolocation::Provider::LocationOverrideStatus result{}; |
| 24 | + check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Geolocation::Provider::IGeolocationProvider)->SetOverridePosition(impl::bind_in(newPosition), static_cast<int32_t>(positionSource), accuracyInMeters, reinterpret_cast<int32_t*>(&result))); |
| 25 | + return result; |
| 26 | + } |
| 27 | + template <typename D> auto consume_Windows_Devices_Geolocation_Provider_IGeolocationProvider<D>::ClearOverridePosition() const |
| 28 | + { |
| 29 | + check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Geolocation::Provider::IGeolocationProvider)->ClearOverridePosition()); |
| 30 | + } |
| 31 | + template <typename D> auto consume_Windows_Devices_Geolocation_Provider_IGeolocationProvider<D>::IsOverriddenChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const |
| 32 | + { |
| 33 | + winrt::event_token token{}; |
| 34 | + check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Geolocation::Provider::IGeolocationProvider)->add_IsOverriddenChanged(*(void**)(&handler), put_abi(token))); |
| 35 | + return token; |
| 36 | + } |
| 37 | + template <typename D> auto consume_Windows_Devices_Geolocation_Provider_IGeolocationProvider<D>::IsOverriddenChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const |
| 38 | + { |
| 39 | + return impl::make_event_revoker<D, IsOverriddenChanged_revoker>(this, IsOverriddenChanged(handler)); |
| 40 | + } |
| 41 | + template <typename D> auto consume_Windows_Devices_Geolocation_Provider_IGeolocationProvider<D>::IsOverriddenChanged(winrt::event_token const& token) const noexcept |
| 42 | + { |
| 43 | + WINRT_IMPL_SHIM(winrt::Windows::Devices::Geolocation::Provider::IGeolocationProvider)->remove_IsOverriddenChanged(impl::bind_in(token)); |
| 44 | + } |
| 45 | +#ifndef WINRT_LEAN_AND_MEAN |
| 46 | + template <typename D> |
| 47 | + struct produce<D, winrt::Windows::Devices::Geolocation::Provider::IGeolocationProvider> : produce_base<D, winrt::Windows::Devices::Geolocation::Provider::IGeolocationProvider> |
| 48 | + { |
| 49 | + int32_t __stdcall get_IsOverridden(bool* value) noexcept final try |
| 50 | + { |
| 51 | + typename D::abi_guard guard(this->shim()); |
| 52 | + *value = detach_from<bool>(this->shim().IsOverridden()); |
| 53 | + return 0; |
| 54 | + } |
| 55 | + catch (...) { return to_hresult(); } |
| 56 | + int32_t __stdcall SetOverridePosition(struct struct_Windows_Devices_Geolocation_BasicGeoposition newPosition, int32_t positionSource, double accuracyInMeters, int32_t* result) noexcept final try |
| 57 | + { |
| 58 | + typename D::abi_guard guard(this->shim()); |
| 59 | + *result = detach_from<winrt::Windows::Devices::Geolocation::Provider::LocationOverrideStatus>(this->shim().SetOverridePosition(*reinterpret_cast<winrt::Windows::Devices::Geolocation::BasicGeoposition const*>(&newPosition), *reinterpret_cast<winrt::Windows::Devices::Geolocation::PositionSource const*>(&positionSource), accuracyInMeters)); |
| 60 | + return 0; |
| 61 | + } |
| 62 | + catch (...) { return to_hresult(); } |
| 63 | + int32_t __stdcall ClearOverridePosition() noexcept final try |
| 64 | + { |
| 65 | + typename D::abi_guard guard(this->shim()); |
| 66 | + this->shim().ClearOverridePosition(); |
| 67 | + return 0; |
| 68 | + } |
| 69 | + catch (...) { return to_hresult(); } |
| 70 | + int32_t __stdcall add_IsOverriddenChanged(void* handler, winrt::event_token* token) noexcept final try |
| 71 | + { |
| 72 | + zero_abi<winrt::event_token>(token); |
| 73 | + typename D::abi_guard guard(this->shim()); |
| 74 | + *token = detach_from<winrt::event_token>(this->shim().IsOverriddenChanged(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler))); |
| 75 | + return 0; |
| 76 | + } |
| 77 | + catch (...) { return to_hresult(); } |
| 78 | + int32_t __stdcall remove_IsOverriddenChanged(winrt::event_token token) noexcept final |
| 79 | + { |
| 80 | + typename D::abi_guard guard(this->shim()); |
| 81 | + this->shim().IsOverriddenChanged(*reinterpret_cast<winrt::event_token const*>(&token)); |
| 82 | + return 0; |
| 83 | + } |
| 84 | + }; |
| 85 | +#endif |
| 86 | +} |
| 87 | +WINRT_EXPORT namespace winrt::Windows::Devices::Geolocation::Provider |
| 88 | +{ |
| 89 | + inline GeolocationProvider::GeolocationProvider() : |
| 90 | + GeolocationProvider(impl::call_factory_cast<GeolocationProvider(*)(winrt::Windows::Foundation::IActivationFactory const&), GeolocationProvider>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<GeolocationProvider>(); })) |
| 91 | + { |
| 92 | + } |
| 93 | +} |
| 94 | +namespace std |
| 95 | +{ |
| 96 | +#ifndef WINRT_LEAN_AND_MEAN |
| 97 | + template<> struct hash<winrt::Windows::Devices::Geolocation::Provider::IGeolocationProvider> : winrt::impl::hash_base {}; |
| 98 | + template<> struct hash<winrt::Windows::Devices::Geolocation::Provider::GeolocationProvider> : winrt::impl::hash_base {}; |
| 99 | +#endif |
| 100 | +#ifdef __cpp_lib_format |
| 101 | +#endif |
| 102 | +} |
| 103 | +#endif |
0 commit comments