// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Storage_AccessCache_2_H #define WINRT_Windows_Storage_AccessCache_2_H #include "winrt/impl/Windows.Foundation.Collections.1.h" #include "winrt/impl/Windows.System.1.h" #include "winrt/impl/Windows.Storage.AccessCache.1.h" WINRT_EXPORT namespace winrt::Windows::Storage::AccessCache { struct AccessListEntry { hstring Token {}; hstring Metadata {}; }; inline bool operator==(AccessListEntry const& left, AccessListEntry const& right) noexcept { return left.Token == right.Token && left.Metadata == right.Metadata; } inline bool operator!=(AccessListEntry const& left, AccessListEntry const& right) noexcept { return !(left == right); } struct WINRT_IMPL_EMPTY_BASES AccessListEntryView : winrt::Windows::Foundation::Collections::IVectorView { AccessListEntryView(std::nullptr_t) noexcept {} AccessListEntryView(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::Collections::IVectorView(ptr, take_ownership_from_abi) {} }; struct WINRT_IMPL_EMPTY_BASES ItemRemovedEventArgs : winrt::Windows::Storage::AccessCache::IItemRemovedEventArgs { ItemRemovedEventArgs(std::nullptr_t) noexcept {} ItemRemovedEventArgs(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Storage::AccessCache::IItemRemovedEventArgs(ptr, take_ownership_from_abi) {} }; struct StorageApplicationPermissions { StorageApplicationPermissions() = delete; [[nodiscard]] static auto FutureAccessList(); [[nodiscard]] static auto MostRecentlyUsedList(); static auto GetFutureAccessListForUser(winrt::Windows::System::User const& user); static auto GetMostRecentlyUsedListForUser(winrt::Windows::System::User const& user); }; struct WINRT_IMPL_EMPTY_BASES StorageItemAccessList : winrt::Windows::Storage::AccessCache::IStorageItemAccessList { StorageItemAccessList(std::nullptr_t) noexcept {} StorageItemAccessList(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Storage::AccessCache::IStorageItemAccessList(ptr, take_ownership_from_abi) {} }; struct WINRT_IMPL_EMPTY_BASES StorageItemMostRecentlyUsedList : winrt::Windows::Storage::AccessCache::IStorageItemMostRecentlyUsedList, impl::require { StorageItemMostRecentlyUsedList(std::nullptr_t) noexcept {} StorageItemMostRecentlyUsedList(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Storage::AccessCache::IStorageItemMostRecentlyUsedList(ptr, take_ownership_from_abi) {} using winrt::Windows::Storage::AccessCache::IStorageItemMostRecentlyUsedList::Add; using impl::consume_t::Add; using winrt::Windows::Storage::AccessCache::IStorageItemMostRecentlyUsedList::AddOrReplace; using impl::consume_t::AddOrReplace; }; } #endif