// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Storage_Search_H #define WINRT_Windows_Storage_Search_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.Storage.h" #include "winrt/impl/Windows.Data.Text.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.FileProperties.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Storage.Search.2.h" namespace winrt::impl { template auto consume_Windows_Storage_Search_IContentIndexer::AddAsync(winrt::Windows::Storage::Search::IIndexableContent const& indexableContent) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexer)->AddAsync(*(void**)(&indexableContent), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexer::UpdateAsync(winrt::Windows::Storage::Search::IIndexableContent const& indexableContent) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexer)->UpdateAsync(*(void**)(&indexableContent), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexer::DeleteAsync(param::hstring const& contentId) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexer)->DeleteAsync(*(void**)(&contentId), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexer::DeleteMultipleAsync(param::async_iterable const& contentIds) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexer)->DeleteMultipleAsync(*(void**)(&contentIds), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexer::DeleteAllAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexer)->DeleteAllAsync(&operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexer::RetrievePropertiesAsync(param::hstring const& contentId, param::async_iterable const& propertiesToRetrieve) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexer)->RetrievePropertiesAsync(*(void**)(&contentId), *(void**)(&propertiesToRetrieve), &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexer::Revision() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexer)->get_Revision(&value)); return value; } template auto consume_Windows_Storage_Search_IContentIndexerQuery::GetCountAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQuery)->GetCountAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerQuery::GetPropertiesAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQuery)->GetPropertiesAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation>>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerQuery::GetPropertiesAsync(uint32_t startIndex, uint32_t maxItems) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQuery)->GetPropertiesRangeAsync(startIndex, maxItems, &operation)); return winrt::Windows::Foundation::IAsyncOperation>>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerQuery::GetAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQuery)->GetAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerQuery::GetAsync(uint32_t startIndex, uint32_t maxItems) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQuery)->GetRangeAsync(startIndex, maxItems, &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerQuery::QueryFolder() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQuery)->get_QueryFolder(&value)); return winrt::Windows::Storage::StorageFolder{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerQueryOperations::CreateQuery(param::hstring const& searchFilter, param::iterable const& propertiesToRetrieve, param::iterable const& sortOrder, param::hstring const& searchFilterLanguage) const { void* query{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQueryOperations)->CreateQueryWithSortOrderAndLanguage(*(void**)(&searchFilter), *(void**)(&propertiesToRetrieve), *(void**)(&sortOrder), *(void**)(&searchFilterLanguage), &query)); return winrt::Windows::Storage::Search::ContentIndexerQuery{ query, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerQueryOperations::CreateQuery(param::hstring const& searchFilter, param::iterable const& propertiesToRetrieve, param::iterable const& sortOrder) const { void* query{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQueryOperations)->CreateQueryWithSortOrder(*(void**)(&searchFilter), *(void**)(&propertiesToRetrieve), *(void**)(&sortOrder), &query)); return winrt::Windows::Storage::Search::ContentIndexerQuery{ query, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerQueryOperations::CreateQuery(param::hstring const& searchFilter, param::iterable const& propertiesToRetrieve) const { void* query{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerQueryOperations)->CreateQuery(*(void**)(&searchFilter), *(void**)(&propertiesToRetrieve), &query)); return winrt::Windows::Storage::Search::ContentIndexerQuery{ query, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerStatics::GetIndexer(param::hstring const& indexName) const { void* index{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerStatics)->GetIndexerWithName(*(void**)(&indexName), &index)); return winrt::Windows::Storage::Search::ContentIndexer{ index, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IContentIndexerStatics::GetIndexer() const { void* index{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IContentIndexerStatics)->GetIndexer(&index)); return winrt::Windows::Storage::Search::ContentIndexer{ index, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IIndexableContent::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IIndexableContent)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IIndexableContent::Id(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IIndexableContent)->put_Id(*(void**)(&value))); } template auto consume_Windows_Storage_Search_IIndexableContent::Properties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IIndexableContent)->get_Properties(&value)); return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IIndexableContent::Stream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IIndexableContent)->get_Stream(&value)); return winrt::Windows::Storage::Streams::IRandomAccessStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IIndexableContent::Stream(winrt::Windows::Storage::Streams::IRandomAccessStream const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IIndexableContent)->put_Stream(*(void**)(&value))); } template auto consume_Windows_Storage_Search_IIndexableContent::StreamContentType() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IIndexableContent)->get_StreamContentType(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IIndexableContent::StreamContentType(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IIndexableContent)->put_StreamContentType(*(void**)(&value))); } template auto consume_Windows_Storage_Search_IQueryOptions::FileTypeFilter() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_FileTypeFilter(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptions::FolderDepth() const { winrt::Windows::Storage::Search::FolderDepth value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_FolderDepth(reinterpret_cast(&value))); return value; } template auto consume_Windows_Storage_Search_IQueryOptions::FolderDepth(winrt::Windows::Storage::Search::FolderDepth const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->put_FolderDepth(static_cast(value))); } template auto consume_Windows_Storage_Search_IQueryOptions::ApplicationSearchFilter() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_ApplicationSearchFilter(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptions::ApplicationSearchFilter(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->put_ApplicationSearchFilter(*(void**)(&value))); } template auto consume_Windows_Storage_Search_IQueryOptions::UserSearchFilter() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_UserSearchFilter(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptions::UserSearchFilter(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->put_UserSearchFilter(*(void**)(&value))); } template auto consume_Windows_Storage_Search_IQueryOptions::Language() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_Language(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptions::Language(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->put_Language(*(void**)(&value))); } template auto consume_Windows_Storage_Search_IQueryOptions::IndexerOption() const { winrt::Windows::Storage::Search::IndexerOption value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_IndexerOption(reinterpret_cast(&value))); return value; } template auto consume_Windows_Storage_Search_IQueryOptions::IndexerOption(winrt::Windows::Storage::Search::IndexerOption const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->put_IndexerOption(static_cast(value))); } template auto consume_Windows_Storage_Search_IQueryOptions::SortOrder() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_SortOrder(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptions::GroupPropertyName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_GroupPropertyName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptions::DateStackOption() const { winrt::Windows::Storage::Search::DateStackOption value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->get_DateStackOption(reinterpret_cast(&value))); return value; } template auto consume_Windows_Storage_Search_IQueryOptions::SaveToString() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->SaveToString(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptions::LoadFromString(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->LoadFromString(*(void**)(&value))); } template auto consume_Windows_Storage_Search_IQueryOptions::SetThumbnailPrefetch(winrt::Windows::Storage::FileProperties::ThumbnailMode const& mode, uint32_t requestedSize, winrt::Windows::Storage::FileProperties::ThumbnailOptions const& options) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->SetThumbnailPrefetch(static_cast(mode), requestedSize, static_cast(options))); } template auto consume_Windows_Storage_Search_IQueryOptions::SetPropertyPrefetch(winrt::Windows::Storage::FileProperties::PropertyPrefetchOptions const& options, param::iterable const& propertiesToRetrieve) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptions)->SetPropertyPrefetch(static_cast(options), *(void**)(&propertiesToRetrieve))); } template auto consume_Windows_Storage_Search_IQueryOptionsFactory::CreateCommonFileQuery(winrt::Windows::Storage::Search::CommonFileQuery const& query, param::iterable const& fileTypeFilter) const { void* queryOptions{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptionsFactory)->CreateCommonFileQuery(static_cast(query), *(void**)(&fileTypeFilter), &queryOptions)); return winrt::Windows::Storage::Search::QueryOptions{ queryOptions, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptionsFactory::CreateCommonFolderQuery(winrt::Windows::Storage::Search::CommonFolderQuery const& query) const { void* queryOptions{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptionsFactory)->CreateCommonFolderQuery(static_cast(query), &queryOptions)); return winrt::Windows::Storage::Search::QueryOptions{ queryOptions, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IQueryOptionsWithProviderFilter::StorageProviderIdFilter() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IQueryOptionsWithProviderFilter)->get_StorageProviderIdFilter(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFileQueryResult::GetFilesAsync(uint32_t startIndex, uint32_t maxNumberOfItems) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFileQueryResult)->GetFilesAsync(startIndex, maxNumberOfItems, &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFileQueryResult::GetFilesAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFileQueryResult)->GetFilesAsyncDefaultStartAndCount(&operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFileQueryResult2::GetMatchingPropertiesWithRanges(winrt::Windows::Storage::StorageFile const& file) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFileQueryResult2)->GetMatchingPropertiesWithRanges(*(void**)(&file), &result)); return winrt::Windows::Foundation::Collections::IMap>{ result, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::GetIndexedStateAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->GetIndexedStateAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::CreateFileQuery() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->CreateFileQueryOverloadDefault(&value)); return winrt::Windows::Storage::Search::StorageFileQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::CreateFileQuery(winrt::Windows::Storage::Search::CommonFileQuery const& query) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->CreateFileQuery(static_cast(query), &value)); return winrt::Windows::Storage::Search::StorageFileQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::CreateFileQueryWithOptions(winrt::Windows::Storage::Search::QueryOptions const& queryOptions) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->CreateFileQueryWithOptions(*(void**)(&queryOptions), &value)); return winrt::Windows::Storage::Search::StorageFileQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::CreateFolderQuery() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->CreateFolderQueryOverloadDefault(&value)); return winrt::Windows::Storage::Search::StorageFolderQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::CreateFolderQuery(winrt::Windows::Storage::Search::CommonFolderQuery const& query) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->CreateFolderQuery(static_cast(query), &value)); return winrt::Windows::Storage::Search::StorageFolderQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::CreateFolderQueryWithOptions(winrt::Windows::Storage::Search::QueryOptions const& queryOptions) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->CreateFolderQueryWithOptions(*(void**)(&queryOptions), &value)); return winrt::Windows::Storage::Search::StorageFolderQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::CreateItemQuery() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->CreateItemQuery(&value)); return winrt::Windows::Storage::Search::StorageItemQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::CreateItemQueryWithOptions(winrt::Windows::Storage::Search::QueryOptions const& queryOptions) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->CreateItemQueryWithOptions(*(void**)(&queryOptions), &value)); return winrt::Windows::Storage::Search::StorageItemQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::GetFilesAsync(winrt::Windows::Storage::Search::CommonFileQuery const& query, uint32_t startIndex, uint32_t maxItemsToRetrieve) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->GetFilesAsync(static_cast(query), startIndex, maxItemsToRetrieve, &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::GetFilesAsync(winrt::Windows::Storage::Search::CommonFileQuery const& query) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->GetFilesAsyncOverloadDefaultStartAndCount(static_cast(query), &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::GetFoldersAsync(winrt::Windows::Storage::Search::CommonFolderQuery const& query, uint32_t startIndex, uint32_t maxItemsToRetrieve) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->GetFoldersAsync(static_cast(query), startIndex, maxItemsToRetrieve, &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::GetFoldersAsync(winrt::Windows::Storage::Search::CommonFolderQuery const& query) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->GetFoldersAsyncOverloadDefaultStartAndCount(static_cast(query), &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::GetItemsAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->GetItemsAsync(startIndex, maxItemsToRetrieve, &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::AreQueryOptionsSupported(winrt::Windows::Storage::Search::QueryOptions const& queryOptions) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->AreQueryOptionsSupported(*(void**)(&queryOptions), &value)); return value; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::IsCommonFolderQuerySupported(winrt::Windows::Storage::Search::CommonFolderQuery const& query) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->IsCommonFolderQuerySupported(static_cast(query), &value)); return value; } template auto consume_Windows_Storage_Search_IStorageFolderQueryOperations::IsCommonFileQuerySupported(winrt::Windows::Storage::Search::CommonFileQuery const& query) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryOperations)->IsCommonFileQuerySupported(static_cast(query), &value)); return value; } template auto consume_Windows_Storage_Search_IStorageFolderQueryResult::GetFoldersAsync(uint32_t startIndex, uint32_t maxNumberOfItems) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryResult)->GetFoldersAsync(startIndex, maxNumberOfItems, &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageFolderQueryResult::GetFoldersAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageFolderQueryResult)->GetFoldersAsyncDefaultStartAndCount(&operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageItemQueryResult::GetItemsAsync(uint32_t startIndex, uint32_t maxNumberOfItems) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageItemQueryResult)->GetItemsAsync(startIndex, maxNumberOfItems, &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageItemQueryResult::GetItemsAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageItemQueryResult)->GetItemsAsyncDefaultStartAndCount(&operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageLibraryChangeTrackerTriggerDetails::Folder() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageLibraryChangeTrackerTriggerDetails)->get_Folder(&value)); return winrt::Windows::Storage::StorageFolder{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageLibraryChangeTrackerTriggerDetails::ChangeTracker() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageLibraryChangeTrackerTriggerDetails)->get_ChangeTracker(&value)); return winrt::Windows::Storage::StorageLibraryChangeTracker{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageLibraryContentChangedTriggerDetails::Folder() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageLibraryContentChangedTriggerDetails)->get_Folder(&value)); return winrt::Windows::Storage::StorageFolder{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageLibraryContentChangedTriggerDetails::CreateModifiedSinceQuery(winrt::Windows::Foundation::DateTime const& lastQueryTime) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageLibraryContentChangedTriggerDetails)->CreateModifiedSinceQuery(impl::bind_in(lastQueryTime), &result)); return winrt::Windows::Storage::Search::StorageItemQueryResult{ result, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::GetItemCountAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->GetItemCountAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::Folder() const { void* container{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->get_Folder(&container)); return winrt::Windows::Storage::StorageFolder{ container, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::ContentsChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->add_ContentsChanged(*(void**)(&handler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::ContentsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ContentsChanged(handler)); } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::ContentsChanged(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->remove_ContentsChanged(impl::bind_in(eventCookie)); } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::OptionsChanged(winrt::Windows::Foundation::TypedEventHandler const& changedHandler) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->add_OptionsChanged(*(void**)(&changedHandler), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::OptionsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& changedHandler) const { return impl::make_event_revoker(this, OptionsChanged(changedHandler)); } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::OptionsChanged(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->remove_OptionsChanged(impl::bind_in(eventCookie)); } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::FindStartIndexAsync(winrt::Windows::Foundation::IInspectable const& value) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->FindStartIndexAsync(*(void**)(&value), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::GetCurrentQueryOptions() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->GetCurrentQueryOptions(&value)); return winrt::Windows::Storage::Search::QueryOptions{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IStorageQueryResultBase::ApplyNewQueryOptions(winrt::Windows::Storage::Search::QueryOptions const& newQueryOptions) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IStorageQueryResultBase)->ApplyNewQueryOptions(*(void**)(&newQueryOptions))); } template auto consume_Windows_Storage_Search_IValueAndLanguage::Language() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IValueAndLanguage)->get_Language(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IValueAndLanguage::Language(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IValueAndLanguage)->put_Language(*(void**)(&value))); } template auto consume_Windows_Storage_Search_IValueAndLanguage::Value() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IValueAndLanguage)->get_Value(&value)); return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; } template auto consume_Windows_Storage_Search_IValueAndLanguage::Value(winrt::Windows::Foundation::IInspectable const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Storage::Search::IValueAndLanguage)->put_Value(*(void**)(&value))); } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AddAsync(void* indexableContent, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().AddAsync(*reinterpret_cast(&indexableContent))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateAsync(void* indexableContent, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().UpdateAsync(*reinterpret_cast(&indexableContent))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteAsync(void* contentId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().DeleteAsync(*reinterpret_cast(&contentId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteMultipleAsync(void* contentIds, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().DeleteMultipleAsync(*reinterpret_cast const*>(&contentIds))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteAllAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().DeleteAllAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RetrievePropertiesAsync(void* contentId, void* propertiesToRetrieve, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().RetrievePropertiesAsync(*reinterpret_cast(&contentId), *reinterpret_cast const*>(&propertiesToRetrieve))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Revision(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Revision()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCountAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetCountAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPropertiesAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>>(this->shim().GetPropertiesAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPropertiesRangeAsync(uint32_t startIndex, uint32_t maxItems, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>>(this->shim().GetPropertiesAsync(startIndex, maxItems)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetRangeAsync(uint32_t startIndex, uint32_t maxItems, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetAsync(startIndex, maxItems)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_QueryFolder(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().QueryFolder()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateQueryWithSortOrderAndLanguage(void* searchFilter, void* propertiesToRetrieve, void* sortOrder, void* searchFilterLanguage, void** query) noexcept final try { clear_abi(query); typename D::abi_guard guard(this->shim()); *query = detach_from(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast const*>(&propertiesToRetrieve), *reinterpret_cast const*>(&sortOrder), *reinterpret_cast(&searchFilterLanguage))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateQueryWithSortOrder(void* searchFilter, void* propertiesToRetrieve, void* sortOrder, void** query) noexcept final try { clear_abi(query); typename D::abi_guard guard(this->shim()); *query = detach_from(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast const*>(&propertiesToRetrieve), *reinterpret_cast const*>(&sortOrder))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateQuery(void* searchFilter, void* propertiesToRetrieve, void** query) noexcept final try { clear_abi(query); typename D::abi_guard guard(this->shim()); *query = detach_from(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast const*>(&propertiesToRetrieve))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetIndexerWithName(void* indexName, void** index) noexcept final try { clear_abi(index); typename D::abi_guard guard(this->shim()); *index = detach_from(this->shim().GetIndexer(*reinterpret_cast(&indexName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetIndexer(void** index) noexcept final try { clear_abi(index); typename D::abi_guard guard(this->shim()); *index = detach_from(this->shim().GetIndexer()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Id(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Stream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Stream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Stream(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stream(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StreamContentType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StreamContentType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_StreamContentType(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StreamContentType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FileTypeFilter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().FileTypeFilter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FolderDepth(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FolderDepth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FolderDepth(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FolderDepth(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ApplicationSearchFilter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ApplicationSearchFilter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ApplicationSearchFilter(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ApplicationSearchFilter(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserSearchFilter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserSearchFilter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_UserSearchFilter(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UserSearchFilter(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Language(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Language()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Language(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Language(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IndexerOption(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IndexerOption()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IndexerOption(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IndexerOption(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SortOrder(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SortOrder()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GroupPropertyName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GroupPropertyName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DateStackOption(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DateStackOption()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SaveToString(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SaveToString()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFromString(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().LoadFromString(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetThumbnailPrefetch(int32_t mode, uint32_t requestedSize, uint32_t options) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetThumbnailPrefetch(*reinterpret_cast(&mode), requestedSize, *reinterpret_cast(&options)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPropertyPrefetch(uint32_t options, void* propertiesToRetrieve) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPropertyPrefetch(*reinterpret_cast(&options), *reinterpret_cast const*>(&propertiesToRetrieve)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateCommonFileQuery(int32_t query, void* fileTypeFilter, void** queryOptions) noexcept final try { clear_abi(queryOptions); typename D::abi_guard guard(this->shim()); *queryOptions = detach_from(this->shim().CreateCommonFileQuery(*reinterpret_cast(&query), *reinterpret_cast const*>(&fileTypeFilter))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateCommonFolderQuery(int32_t query, void** queryOptions) noexcept final try { clear_abi(queryOptions); typename D::abi_guard guard(this->shim()); *queryOptions = detach_from(this->shim().CreateCommonFolderQuery(*reinterpret_cast(&query))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_StorageProviderIdFilter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().StorageProviderIdFilter()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetFilesAsync(uint32_t startIndex, uint32_t maxNumberOfItems, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetFilesAsync(startIndex, maxNumberOfItems)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFilesAsyncDefaultStartAndCount(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetFilesAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetMatchingPropertiesWithRanges(void* file, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>>(this->shim().GetMatchingPropertiesWithRanges(*reinterpret_cast(&file))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall GetIndexedStateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetIndexedStateAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFileQueryOverloadDefault(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFileQuery()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFileQuery(int32_t query, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFileQuery(*reinterpret_cast(&query))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFileQueryWithOptions(void* queryOptions, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFileQueryWithOptions(*reinterpret_cast(&queryOptions))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFolderQueryOverloadDefault(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFolderQuery()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFolderQuery(int32_t query, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFolderQuery(*reinterpret_cast(&query))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFolderQueryWithOptions(void* queryOptions, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFolderQueryWithOptions(*reinterpret_cast(&queryOptions))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateItemQuery(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateItemQuery()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateItemQueryWithOptions(void* queryOptions, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateItemQueryWithOptions(*reinterpret_cast(&queryOptions))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFilesAsync(int32_t query, uint32_t startIndex, uint32_t maxItemsToRetrieve, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetFilesAsync(*reinterpret_cast(&query), startIndex, maxItemsToRetrieve)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFilesAsyncOverloadDefaultStartAndCount(int32_t query, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetFilesAsync(*reinterpret_cast(&query))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFoldersAsync(int32_t query, uint32_t startIndex, uint32_t maxItemsToRetrieve, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetFoldersAsync(*reinterpret_cast(&query), startIndex, maxItemsToRetrieve)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFoldersAsyncOverloadDefaultStartAndCount(int32_t query, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetFoldersAsync(*reinterpret_cast(&query))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetItemsAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetItemsAsync(startIndex, maxItemsToRetrieve)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AreQueryOptionsSupported(void* queryOptions, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AreQueryOptionsSupported(*reinterpret_cast(&queryOptions))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsCommonFolderQuerySupported(int32_t query, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsCommonFolderQuerySupported(*reinterpret_cast(&query))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsCommonFileQuerySupported(int32_t query, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsCommonFileQuerySupported(*reinterpret_cast(&query))); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetFoldersAsync(uint32_t startIndex, uint32_t maxNumberOfItems, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetFoldersAsync(startIndex, maxNumberOfItems)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFoldersAsyncDefaultStartAndCount(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetFoldersAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetItemsAsync(uint32_t startIndex, uint32_t maxNumberOfItems, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetItemsAsync(startIndex, maxNumberOfItems)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetItemsAsyncDefaultStartAndCount(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetItemsAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Folder(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Folder()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ChangeTracker(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ChangeTracker()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Folder(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Folder()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateModifiedSinceQuery(int64_t lastQueryTime, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateModifiedSinceQuery(*reinterpret_cast(&lastQueryTime))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall GetItemCountAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetItemCountAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Folder(void** container) noexcept final try { clear_abi(container); typename D::abi_guard guard(this->shim()); *container = detach_from(this->shim().Folder()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ContentsChanged(void* handler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().ContentsChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ContentsChanged(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ContentsChanged(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall add_OptionsChanged(void* changedHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().OptionsChanged(*reinterpret_cast const*>(&changedHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_OptionsChanged(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().OptionsChanged(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall FindStartIndexAsync(void* value, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().FindStartIndexAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentQueryOptions(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentQueryOptions()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ApplyNewQueryOptions(void* newQueryOptions) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ApplyNewQueryOptions(*reinterpret_cast(&newQueryOptions)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Language(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Language()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Language(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Language(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Value(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Storage::Search { inline auto ContentIndexer::GetIndexer(param::hstring const& indexName) { return impl::call_factory([&](IContentIndexerStatics const& f) { return f.GetIndexer(indexName); }); } inline auto ContentIndexer::GetIndexer() { return impl::call_factory_cast([](IContentIndexerStatics const& f) { return f.GetIndexer(); }); } inline IndexableContent::IndexableContent() : IndexableContent(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline QueryOptions::QueryOptions() : QueryOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline QueryOptions::QueryOptions(winrt::Windows::Storage::Search::CommonFileQuery const& query, param::iterable const& fileTypeFilter) : QueryOptions(impl::call_factory([&](IQueryOptionsFactory const& f) { return f.CreateCommonFileQuery(query, fileTypeFilter); })) { } inline QueryOptions::QueryOptions(winrt::Windows::Storage::Search::CommonFolderQuery const& query) : QueryOptions(impl::call_factory([&](IQueryOptionsFactory const& f) { return f.CreateCommonFolderQuery(query); })) { } inline ValueAndLanguage::ValueAndLanguage() : ValueAndLanguage(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } } 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 {}; 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