| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | |
| 3 | namespace WixToolset.Extensibility.Services |
| 4 | { |
| 5 | using System.Collections.Generic; |
| 6 | using WixToolset.Data; |
| 7 | using WixToolset.Extensibility.Data; |
| 8 | |
| 9 | /// <summary> |
| 10 | /// Support for processing paths. |
| 11 | /// </summary> |
| 12 | public interface IPathResolver |
| 13 | { |
| 14 | /// <summary> |
| 15 | /// Get the canonical source path of a directory. |
| 16 | /// </summary> |
| 17 | /// <param name="directories">All cached directories.</param> |
| 18 | /// <param name="componentIdGenSeeds">Hash table of Component GUID generation seeds indexed by directory id.</param> |
| 19 | /// <param name="directory">Directory identifier.</param> |
| 20 | /// <param name="platform">Current platform.</param> |
| 21 | /// <returns>Source path of a directory.</returns> |
| 22 | string GetCanonicalDirectoryPath(Dictionary<string, IResolvedDirectory> directories, Dictionary<string, string> componentIdGenSeeds, string directory, Platform platform); |
| 23 | |
| 24 | /// <summary> |
| 25 | /// Get the source path of a directory. |
| 26 | /// </summary> |
| 27 | /// <param name="directories">All cached directories.</param> |
| 28 | /// <param name="directory">Directory identifier.</param> |
| 29 | /// <returns>Source path of a directory.</returns> |
| 30 | string GetDirectoryPath(Dictionary<string, IResolvedDirectory> directories, string directory); |
| 31 | |
| 32 | /// <summary> |
| 33 | /// Gets the source path of a file. |
| 34 | /// </summary> |
| 35 | /// <param name="directories">All cached directories in <see cref="IResolvedDirectory"/>.</param> |
| 36 | /// <param name="directoryId">Parent directory identifier.</param> |
| 37 | /// <param name="fileName">File name (in long|source format).</param> |
| 38 | /// <param name="compressed">Specifies the package is compressed.</param> |
| 39 | /// <param name="useLongName">Specifies the package uses long file names.</param> |
| 40 | /// <returns>Source path of file relative to package directory.</returns> |
| 41 | string GetFileSourcePath(Dictionary<string, IResolvedDirectory> directories, string directoryId, string fileName, bool compressed, bool useLongName); |
| 42 | } |
| 43 | } |