PreIndexedPackageSourceFactory.h (1398B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include "ISource.h" 5 #include "SourceFactory.h" 6 7 #include <string_view> 8 9 namespace AppInstaller::Repository::Microsoft 10 { 11 using namespace std::string_view_literals; 12 13 // A source where the index is precomputed and stored on a server within an optional MSIX package. 14 // In addition, the manifest files are also individually available on the server. 15 // Arg :: Expected to be a fully qualified path to the root of the data. 16 // This can be a web location such as https://somewhere/ or a local file share \\somewhere\ 17 // Under this path there must exist an MSIX package called "index.msix". 18 // This must have a file called "index.db" contained within, which is a SQLiteIndex. 19 // The index's paths refer to relative locations under the Arg value. 20 // Data :: The package family name of the package at Arg + /index.msix. 21 struct PreIndexedPackageSourceFactory 22 { 23 // Get the type string for this source. 24 static constexpr std::string_view Type() 25 { 26 using namespace std::string_view_literals; 27 return "Microsoft.PreIndexed.Package"sv; 28 } 29 30 // Creates a source factory for this type. 31 static std::unique_ptr<ISourceFactory> Create(); 32 }; 33 }