// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Management_Policies_0_H #define WINRT_Windows_Management_Policies_0_H WINRT_EXPORT namespace winrt::Windows::Foundation { struct EventRegistrationToken; template struct WINRT_IMPL_EMPTY_BASES TypedEventHandler; } WINRT_EXPORT namespace winrt::Windows::Storage::Streams { struct IBuffer; } WINRT_EXPORT namespace winrt::Windows::System { struct User; } WINRT_EXPORT namespace winrt::Windows::Management::Policies { enum class NamedPolicyKind : int32_t { Invalid = 0, Binary = 1, Boolean = 2, Int32 = 3, Int64 = 4, String = 5, }; struct INamedPolicyData; struct INamedPolicyStatics; struct NamedPolicy; struct NamedPolicyData; } namespace winrt::impl { template <> struct category{ using type = interface_category; }; template <> struct category{ using type = interface_category; }; template <> struct category{ using type = class_category; }; template <> struct category{ using type = class_category; }; template <> struct category{ using type = enum_category; }; template <> inline constexpr auto& name_v = L"Windows.Management.Policies.NamedPolicy"; template <> inline constexpr auto& name_v = L"Windows.Management.Policies.NamedPolicyData"; template <> inline constexpr auto& name_v = L"Windows.Management.Policies.NamedPolicyKind"; template <> inline constexpr auto& name_v = L"Windows.Management.Policies.INamedPolicyData"; template <> inline constexpr auto& name_v = L"Windows.Management.Policies.INamedPolicyStatics"; template <> inline constexpr guid guid_v{ 0x38DCB198,0x95AC,0x4077,{ 0xA6,0x43,0x80,0x78,0xCA,0xE2,0x64,0x00 } }; // 38DCB198-95AC-4077-A643-8078CAE26400 template <> inline constexpr guid guid_v{ 0x7F793BE7,0x76C4,0x4058,{ 0x8C,0xAD,0x67,0x66,0x2C,0xD0,0x5F,0x0D } }; // 7F793BE7-76C4-4058-8CAD-67662CD05F0D template <> struct default_interface{ using type = winrt::Windows::Management::Policies::INamedPolicyData; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall get_Area(void**) noexcept = 0; virtual int32_t __stdcall get_Name(void**) noexcept = 0; virtual int32_t __stdcall get_Kind(int32_t*) noexcept = 0; virtual int32_t __stdcall get_IsManaged(bool*) noexcept = 0; virtual int32_t __stdcall get_IsUserPolicy(bool*) noexcept = 0; virtual int32_t __stdcall get_User(void**) noexcept = 0; virtual int32_t __stdcall GetBoolean(bool*) noexcept = 0; virtual int32_t __stdcall GetBinary(void**) noexcept = 0; virtual int32_t __stdcall GetInt32(int32_t*) noexcept = 0; virtual int32_t __stdcall GetInt64(int64_t*) noexcept = 0; virtual int32_t __stdcall GetString(void**) noexcept = 0; virtual int32_t __stdcall add_Changed(void*, winrt::event_token*) noexcept = 0; virtual int32_t __stdcall remove_Changed(winrt::event_token) noexcept = 0; }; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall GetPolicyFromPath(void*, void*, void**) noexcept = 0; virtual int32_t __stdcall GetPolicyFromPathForUser(void*, void*, void*, void**) noexcept = 0; }; }; template struct consume_Windows_Management_Policies_INamedPolicyData { [[nodiscard]] auto Area() const; [[nodiscard]] auto Name() const; [[nodiscard]] auto Kind() const; [[nodiscard]] auto IsManaged() const; [[nodiscard]] auto IsUserPolicy() const; [[nodiscard]] auto User() const; auto GetBoolean() const; auto GetBinary() const; auto GetInt32() const; auto GetInt64() const; auto GetString() const; auto Changed(winrt::Windows::Foundation::TypedEventHandler const& changedHandler) const; using Changed_revoker = impl::event_revoker::remove_Changed>; [[nodiscard]] auto Changed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& changedHandler) const; auto Changed(winrt::event_token const& cookie) const noexcept; }; template <> struct consume { template using type = consume_Windows_Management_Policies_INamedPolicyData; }; template struct consume_Windows_Management_Policies_INamedPolicyStatics { auto GetPolicyFromPath(param::hstring const& area, param::hstring const& name) const; auto GetPolicyFromPathForUser(winrt::Windows::System::User const& user, param::hstring const& area, param::hstring const& name) const; }; template <> struct consume { template using type = consume_Windows_Management_Policies_INamedPolicyStatics; }; } #endif