//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0008
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "Windows.Foundation.idl";
import "Windows.Storage.idl";
import "Windows.Storage.FileProperties.idl";
// Additional imports to ensure that all required headers are included
cpp_quote("#if defined(__cplusplus)")
cpp_quote("}")
cpp_quote("#endif // defined(__cplusplus)")
cpp_quote("#include <Windows.Foundation.h>")
cpp_quote("#if !defined(__windows2Estorage_h__)")
cpp_quote("#include <Windows.Storage.h>")
cpp_quote("#endif // !defined(__windows2Estorage_h__)")
cpp_quote("#if !defined(__windows2Estorage2Efileproperties_h__)")
cpp_quote("#include <Windows.Storage.FileProperties.h>")
cpp_quote("#endif // !defined(__windows2Estorage2Efileproperties_h__)")
cpp_quote("#if defined(__cplusplus)")
cpp_quote("extern \"C\" {")
cpp_quote("#endif // defined(__cplusplus)")

// Forward Declare
namespace Windows
{
    namespace Storage
    {
        namespace FileProperties
        {
            typedef enum PropertyPrefetchOptions PropertyPrefetchOptions;

            typedef enum ThumbnailMode ThumbnailMode;

            typedef enum ThumbnailOptions ThumbnailOptions;
        }
    }
}
namespace Windows
{
    namespace Storage
    {
        interface IStorageItem;

        runtimeclass StorageFile;

        runtimeclass StorageFolder;
    }
}
namespace Windows
{
    namespace Storage
    {
        namespace Search
        {
            typedef enum DateStackOption DateStackOption;

            typedef enum IndexerOption IndexerOption;

            typedef enum FolderDepth FolderDepth;

            typedef enum CommonFileQuery CommonFileQuery;

            typedef enum CommonFolderQuery CommonFolderQuery;

            typedef enum IndexedState IndexedState;

            typedef struct SortEntry SortEntry;

            interface IQueryOptions;

            interface IQueryOptionsFactory;

            interface IStorageQueryResultBase;

            interface IStorageFileQueryResult;

            interface IStorageFolderQueryResult;

            interface IStorageItemQueryResult;

            interface IStorageFolderQueryOperations;

            runtimeclass QueryOptions;

            runtimeclass StorageFileQueryResult;

            runtimeclass StorageFolderQueryResult;

            runtimeclass StorageItemQueryResult;

            runtimeclass SortEntryVector;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Storage
    {
        namespace Search
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Storage.Search.SortEntry>;

                interface Windows.Foundation.Collections.IIterator<Windows.Storage.Search.SortEntry>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Storage.Search.SortEntry>;

                interface Windows.Foundation.Collections.IVector<Windows.Storage.Search.SortEntry>;

                interface Windows.Foundation.IAsyncOperation<Windows.Storage.Search.IndexedState>;

                interface Windows.Foundation.TypedEventHandler<Windows.Storage.Search.IStorageQueryResultBase*, IInspectable*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Storage
    {
        namespace Search
        {
            [version(0x06020000)]
            enum DateStackOption
            {
                None  = 0,
                Year  = 1,
                Month = 2
            };

            [version(0x06020000)]
            enum IndexerOption
            {
                UseIndexerWhenAvailable = 0,
                OnlyUseIndexer          = 1,
                DoNotUseIndexer         = 2
            };

            [version(0x06020000)]
            enum FolderDepth
            {
                Shallow = 0,
                Deep    = 1
            };

            [version(0x06020000)]
            enum CommonFileQuery
            {
                DefaultQuery           = 0,
                OrderByName            = 1,
                OrderByTitle           = 2,
                OrderByMusicProperties = 3,
                OrderBySearchRank      = 4,
                OrderByDate            = 5
            };

            [version(0x06020000)]
            enum CommonFolderQuery
            {
                DefaultQuery         = 0,
                GroupByYear          = 100,
                GroupByMonth         = 101,
                GroupByArtist        = 102,
                GroupByAlbum         = 103,
                GroupByAlbumArtist   = 104,
                GroupByComposer      = 105,
                GroupByGenre         = 106,
                GroupByPublishedYear = 107,
                GroupByRating        = 108,
                GroupByTag           = 109,
                GroupByAuthor        = 110,
                GroupByType          = 111
            };

            [version(0x06020000)]
            enum IndexedState
            {
                Unknown          = 0,
                NotIndexed       = 1,
                PartiallyIndexed = 2,
                FullyIndexed     = 3
            };

            [version(0x06020000)]
            struct SortEntry
            {
                HSTRING PropertyName;
                boolean AscendingOrder;
            };

            [uuid(1E5E46EE-0F45-4838-A8E9-D0479D446C30)]
            [exclusiveto(Windows.Storage.Search.QueryOptions)]
            [version(0x06020000)]
            interface IQueryOptions : IInspectable
            {
                [propget] HRESULT FileTypeFilter([out] [retval] Windows.Foundation.Collections.IVector<HSTRING>** value);
                [propget] HRESULT FolderDepth([out] [retval] Windows.Storage.Search.FolderDepth* value);
                [propput] HRESULT FolderDepth([in] Windows.Storage.Search.FolderDepth value);
                [propget] HRESULT ApplicationSearchFilter([out] [retval] HSTRING* value);
                [propput] HRESULT ApplicationSearchFilter([in] HSTRING value);
                [propget] HRESULT UserSearchFilter([out] [retval] HSTRING* value);
                [propput] HRESULT UserSearchFilter([in] HSTRING value);
                [propget] HRESULT Language([out] [retval] HSTRING* value);
                [propput] HRESULT Language([in] HSTRING value);
                [propget] HRESULT IndexerOption([out] [retval] Windows.Storage.Search.IndexerOption* value);
                [propput] HRESULT IndexerOption([in] Windows.Storage.Search.IndexerOption value);
                [propget] HRESULT SortOrder([out] [retval] Windows.Foundation.Collections.IVector<Windows.Storage.Search.SortEntry>** value);
                [propget] HRESULT GroupPropertyName([out] [retval] HSTRING* value);
                [propget] HRESULT DateStackOption([out] [retval] Windows.Storage.Search.DateStackOption* value);
                HRESULT SaveToString([out] [retval] HSTRING* value);
                HRESULT LoadFromString([in] HSTRING value);
                HRESULT SetThumbnailPrefetch([in] Windows.Storage.FileProperties.ThumbnailMode mode, [in] UINT32 requestedSize, [in] Windows.Storage.FileProperties.ThumbnailOptions options);
                HRESULT SetPropertyPrefetch([in] Windows.Storage.FileProperties.PropertyPrefetchOptions options, [in] Windows.Foundation.Collections.IIterable<HSTRING>* propertiesToRetrieve);
            }

            [uuid(032E1F8C-A9C1-4E71-8011-0DEE9D4811A3)]
            [version(0x06020000)]
            [exclusiveto(Windows.Storage.Search.QueryOptions)]
            interface IQueryOptionsFactory : IInspectable
            {
                HRESULT CreateCommonFileQuery([in] Windows.Storage.Search.CommonFileQuery query, [in] Windows.Foundation.Collections.IIterable<HSTRING>* fileTypeFilter, [out] [retval] Windows.Storage.Search.QueryOptions** queryOptions);
                HRESULT CreateCommonFolderQuery([in] Windows.Storage.Search.CommonFolderQuery query, [out] [retval] Windows.Storage.Search.QueryOptions** queryOptions);
            }

            [uuid(C297D70D-7353-47AB-BA58-8C61425DC54B)]
            [version(0x06020000)]
            interface IStorageQueryResultBase : IInspectable
            {
                HRESULT GetItemCountAsync([out] [retval] Windows.Foundation.IAsyncOperation<UINT32>** operation);
                [propget] HRESULT Folder([out] [retval] Windows.Storage.StorageFolder** container);
                [eventadd] HRESULT ContentsChanged([in] Windows.Foundation.TypedEventHandler<Windows.Storage.Search.IStorageQueryResultBase*, IInspectable*>* handler, [out] [retval] EventRegistrationToken* eventCookie);
                [eventremove] HRESULT ContentsChanged([in] EventRegistrationToken eventCookie);
                [eventadd] HRESULT OptionsChanged([in] Windows.Foundation.TypedEventHandler<Windows.Storage.Search.IStorageQueryResultBase*, IInspectable*>* changedHandler, [out] [retval] EventRegistrationToken* eventCookie);
                [eventremove] HRESULT OptionsChanged([in] EventRegistrationToken eventCookie);
                HRESULT FindStartIndexAsync([in] IInspectable* value, [out] [retval] Windows.Foundation.IAsyncOperation<UINT32>** operation);
                HRESULT GetCurrentQueryOptions([out] [retval] Windows.Storage.Search.QueryOptions** value);
                HRESULT ApplyNewQueryOptions([in] Windows.Storage.Search.QueryOptions* newQueryOptions);
            }

            [uuid(52FDA447-2BAA-412C-B29F-D4B1778EFA1E)]
            [version(0x06020000)]
            [exclusiveto(Windows.Storage.Search.StorageFileQueryResult)]
            interface IStorageFileQueryResult : IInspectable
                requires
                    Windows.Storage.Search.IStorageQueryResultBase
            {
                [overload("GetFilesAsync")] HRESULT GetFilesAsync([in] UINT32 startIndex, [in] UINT32 maxNumberOfItems, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile*>*>** operation);
                [overload("GetFilesAsync")] HRESULT GetFilesAsyncDefaultStartAndCount([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile*>*>** operation);
            }

            [uuid(6654C911-7D66-46FA-AECF-E4A4BAA93AB8)]
            [exclusiveto(Windows.Storage.Search.StorageFolderQueryResult)]
            [version(0x06020000)]
            interface IStorageFolderQueryResult : IInspectable
                requires
                    Windows.Storage.Search.IStorageQueryResultBase
            {
                [overload("GetFoldersAsync")] HRESULT GetFoldersAsync([in] UINT32 startIndex, [in] UINT32 maxNumberOfItems, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder*>*>** operation);
                [overload("GetFoldersAsync")] HRESULT GetFoldersAsyncDefaultStartAndCount([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder*>*>** operation);
            }

            [uuid(E8948079-9D58-47B8-B2B2-41B07F4795F9)]
            [exclusiveto(Windows.Storage.Search.StorageItemQueryResult)]
            [version(0x06020000)]
            interface IStorageItemQueryResult : IInspectable
                requires
                    Windows.Storage.Search.IStorageQueryResultBase
            {
                [overload("GetItemsAsync")] HRESULT GetItemsAsync([in] UINT32 startIndex, [in] UINT32 maxNumberOfItems, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem*>*>** operation);
                [overload("GetItemsAsync")] HRESULT GetItemsAsyncDefaultStartAndCount([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem*>*>** operation);
            }

            [uuid(CB43CCC9-446B-4A4F-BE97-757771BE5203)]
            [version(0x06020000)]
            interface IStorageFolderQueryOperations : IInspectable
            {
                HRESULT GetIndexedStateAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Search.IndexedState>** operation);
                [overload("CreateFileQuery")] HRESULT CreateFileQueryOverloadDefault([out] [retval] Windows.Storage.Search.StorageFileQueryResult** value);
                [overload("CreateFileQuery")] HRESULT CreateFileQuery([in] Windows.Storage.Search.CommonFileQuery query, [out] [retval] Windows.Storage.Search.StorageFileQueryResult** value);
                HRESULT CreateFileQueryWithOptions([in] Windows.Storage.Search.QueryOptions* queryOptions, [out] [retval] Windows.Storage.Search.StorageFileQueryResult** value);
                [overload("CreateFolderQuery")] HRESULT CreateFolderQueryOverloadDefault([out] [retval] Windows.Storage.Search.StorageFolderQueryResult** value);
                [overload("CreateFolderQuery")] HRESULT CreateFolderQuery([in] Windows.Storage.Search.CommonFolderQuery query, [out] [retval] Windows.Storage.Search.StorageFolderQueryResult** value);
                HRESULT CreateFolderQueryWithOptions([in] Windows.Storage.Search.QueryOptions* queryOptions, [out] [retval] Windows.Storage.Search.StorageFolderQueryResult** value);
                HRESULT CreateItemQuery([out] [retval] Windows.Storage.Search.StorageItemQueryResult** value);
                HRESULT CreateItemQueryWithOptions([in] Windows.Storage.Search.QueryOptions* queryOptions, [out] [retval] Windows.Storage.Search.StorageItemQueryResult** value);
                [overload("GetFilesAsync")] HRESULT GetFilesAsync([in] Windows.Storage.Search.CommonFileQuery query, [in] UINT32 startIndex, [in] UINT32 maxItemsToRetrieve, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile*>*>** operation);
                [overload("GetFilesAsync")] HRESULT GetFilesAsyncOverloadDefaultStartAndCount([in] Windows.Storage.Search.CommonFileQuery query, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile*>*>** operation);
                [overload("GetFoldersAsync")] HRESULT GetFoldersAsync([in] Windows.Storage.Search.CommonFolderQuery query, [in] UINT32 startIndex, [in] UINT32 maxItemsToRetrieve, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder*>*>** operation);
                [overload("GetFoldersAsync")] HRESULT GetFoldersAsyncOverloadDefaultStartAndCount([in] Windows.Storage.Search.CommonFolderQuery query, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder*>*>** operation);
                [overload("GetItemsAsync")] HRESULT GetItemsAsync([in] UINT32 startIndex, [in] UINT32 maxItemsToRetrieve, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem*>*>** operation);
                HRESULT AreQueryOptionsSupported([in] Windows.Storage.Search.QueryOptions* queryOptions, [out] [retval] boolean* value);
                HRESULT IsCommonFolderQuerySupported([in] Windows.Storage.Search.CommonFolderQuery query, [out] [retval] boolean* value);
                HRESULT IsCommonFileQuerySupported([in] Windows.Storage.Search.CommonFileQuery query, [out] [retval] boolean* value);
            }

            [version(0x06020000)]
            [marshaling_behavior(agile)]
            [activatable(0x06020000)]
            [activatable(Windows.Storage.Search.IQueryOptionsFactory, 0x06020000)]
            runtimeclass QueryOptions
            {
                [default] interface Windows.Storage.Search.IQueryOptions;
            }

            [version(0x06020000)]
            runtimeclass StorageFileQueryResult
            {
                [default] interface Windows.Storage.Search.IStorageFileQueryResult;
                interface Windows.Storage.Search.IStorageQueryResultBase;
            }

            [version(0x06020000)]
            runtimeclass StorageFolderQueryResult
            {
                [default] interface Windows.Storage.Search.IStorageFolderQueryResult;
                interface Windows.Storage.Search.IStorageQueryResultBase;
            }

            [version(0x06020000)]
            runtimeclass StorageItemQueryResult
            {
                [default] interface Windows.Storage.Search.IStorageItemQueryResult;
                interface Windows.Storage.Search.IStorageQueryResultBase;
            }

            [version(0x06020000)]
            runtimeclass SortEntryVector
            {
                [default] interface Windows.Foundation.Collections.IVector<Windows.Storage.Search.SortEntry>;
                interface Windows.Foundation.Collections.IIterable<Windows.Storage.Search.SortEntry>;
            }
        }
    }
}
