// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Networking_Proximity_2_H #define WINRT_Windows_Networking_Proximity_2_H #include "winrt/impl/Windows.Foundation.1.h" #include "winrt/impl/Windows.Storage.Streams.1.h" #include "winrt/impl/Windows.Networking.Proximity.1.h" WINRT_EXPORT namespace winrt::Windows::Networking::Proximity { struct DeviceArrivedEventHandler : winrt::Windows::Foundation::IUnknown { DeviceArrivedEventHandler(std::nullptr_t = nullptr) noexcept {} DeviceArrivedEventHandler(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IUnknown(ptr, take_ownership_from_abi) {} template DeviceArrivedEventHandler(L lambda); template DeviceArrivedEventHandler(F* function); template DeviceArrivedEventHandler(O* object, M method); template DeviceArrivedEventHandler(com_ptr&& object, M method); template DeviceArrivedEventHandler(weak_ref&& object, LM&& lambda_or_method); template DeviceArrivedEventHandler(std::shared_ptr&& object, M method); template DeviceArrivedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method); auto operator()(winrt::Windows::Networking::Proximity::ProximityDevice const& sender) const; }; struct DeviceDepartedEventHandler : winrt::Windows::Foundation::IUnknown { DeviceDepartedEventHandler(std::nullptr_t = nullptr) noexcept {} DeviceDepartedEventHandler(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IUnknown(ptr, take_ownership_from_abi) {} template DeviceDepartedEventHandler(L lambda); template DeviceDepartedEventHandler(F* function); template DeviceDepartedEventHandler(O* object, M method); template DeviceDepartedEventHandler(com_ptr&& object, M method); template DeviceDepartedEventHandler(weak_ref&& object, LM&& lambda_or_method); template DeviceDepartedEventHandler(std::shared_ptr&& object, M method); template DeviceDepartedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method); auto operator()(winrt::Windows::Networking::Proximity::ProximityDevice const& sender) const; }; struct MessageReceivedHandler : winrt::Windows::Foundation::IUnknown { MessageReceivedHandler(std::nullptr_t = nullptr) noexcept {} MessageReceivedHandler(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IUnknown(ptr, take_ownership_from_abi) {} template MessageReceivedHandler(L lambda); template MessageReceivedHandler(F* function); template MessageReceivedHandler(O* object, M method); template MessageReceivedHandler(com_ptr&& object, M method); template MessageReceivedHandler(weak_ref&& object, LM&& lambda_or_method); template MessageReceivedHandler(std::shared_ptr&& object, M method); template MessageReceivedHandler(std::weak_ptr&& object, LM&& lambda_or_method); auto operator()(winrt::Windows::Networking::Proximity::ProximityDevice const& sender, winrt::Windows::Networking::Proximity::ProximityMessage const& message) const; }; struct MessageTransmittedHandler : winrt::Windows::Foundation::IUnknown { MessageTransmittedHandler(std::nullptr_t = nullptr) noexcept {} MessageTransmittedHandler(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IUnknown(ptr, take_ownership_from_abi) {} template MessageTransmittedHandler(L lambda); template MessageTransmittedHandler(F* function); template MessageTransmittedHandler(O* object, M method); template MessageTransmittedHandler(com_ptr&& object, M method); template MessageTransmittedHandler(weak_ref&& object, LM&& lambda_or_method); template MessageTransmittedHandler(std::shared_ptr&& object, M method); template MessageTransmittedHandler(std::weak_ptr&& object, LM&& lambda_or_method); auto operator()(winrt::Windows::Networking::Proximity::ProximityDevice const& sender, int64_t messageId) const; }; struct WINRT_IMPL_EMPTY_BASES ConnectionRequestedEventArgs : winrt::Windows::Networking::Proximity::IConnectionRequestedEventArgs { ConnectionRequestedEventArgs(std::nullptr_t) noexcept {} ConnectionRequestedEventArgs(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Networking::Proximity::IConnectionRequestedEventArgs(ptr, take_ownership_from_abi) {} }; struct PeerFinder { PeerFinder() = delete; [[nodiscard]] static auto AllowBluetooth(); static auto AllowBluetooth(bool value); [[nodiscard]] static auto AllowInfrastructure(); static auto AllowInfrastructure(bool value); [[nodiscard]] static auto AllowWiFiDirect(); static auto AllowWiFiDirect(bool value); [[nodiscard]] static auto DisplayName(); static auto DisplayName(param::hstring const& value); [[nodiscard]] static auto SupportedDiscoveryTypes(); [[nodiscard]] static auto AlternateIdentities(); static auto Start(); static auto Start(param::hstring const& peerMessage); static auto Stop(); static auto TriggeredConnectionStateChanged(winrt::Windows::Foundation::TypedEventHandler const& handler); using TriggeredConnectionStateChanged_revoker = impl::factory_event_revoker::remove_TriggeredConnectionStateChanged>; [[nodiscard]] static auto TriggeredConnectionStateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler); static auto TriggeredConnectionStateChanged(winrt::event_token const& cookie); static auto ConnectionRequested(winrt::Windows::Foundation::TypedEventHandler const& handler); using ConnectionRequested_revoker = impl::factory_event_revoker::remove_ConnectionRequested>; [[nodiscard]] static auto ConnectionRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler); static auto ConnectionRequested(winrt::event_token const& cookie); static auto FindAllPeersAsync(); static auto ConnectAsync(winrt::Windows::Networking::Proximity::PeerInformation const& peerInformation); [[nodiscard]] static auto Role(); static auto Role(winrt::Windows::Networking::Proximity::PeerRole const& value); [[nodiscard]] static auto DiscoveryData(); static auto DiscoveryData(winrt::Windows::Storage::Streams::IBuffer const& value); static auto CreateWatcher(); }; struct WINRT_IMPL_EMPTY_BASES PeerInformation : winrt::Windows::Networking::Proximity::IPeerInformation, impl::require { PeerInformation(std::nullptr_t) noexcept {} PeerInformation(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Networking::Proximity::IPeerInformation(ptr, take_ownership_from_abi) {} }; struct WINRT_IMPL_EMPTY_BASES PeerWatcher : winrt::Windows::Networking::Proximity::IPeerWatcher { PeerWatcher(std::nullptr_t) noexcept {} PeerWatcher(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Networking::Proximity::IPeerWatcher(ptr, take_ownership_from_abi) {} }; struct WINRT_IMPL_EMPTY_BASES ProximityDevice : winrt::Windows::Networking::Proximity::IProximityDevice { ProximityDevice(std::nullptr_t) noexcept {} ProximityDevice(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Networking::Proximity::IProximityDevice(ptr, take_ownership_from_abi) {} static auto GetDeviceSelector(); static auto GetDefault(); static auto FromId(param::hstring const& deviceId); }; struct WINRT_IMPL_EMPTY_BASES ProximityMessage : winrt::Windows::Networking::Proximity::IProximityMessage { ProximityMessage(std::nullptr_t) noexcept {} ProximityMessage(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Networking::Proximity::IProximityMessage(ptr, take_ownership_from_abi) {} }; struct WINRT_IMPL_EMPTY_BASES TriggeredConnectionStateChangedEventArgs : winrt::Windows::Networking::Proximity::ITriggeredConnectionStateChangedEventArgs { TriggeredConnectionStateChangedEventArgs(std::nullptr_t) noexcept {} TriggeredConnectionStateChangedEventArgs(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Networking::Proximity::ITriggeredConnectionStateChangedEventArgs(ptr, take_ownership_from_abi) {} }; } #endif