// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using System.ComponentModel;
namespace GitDependencies
{
///
/// Contains information about a binary dependency in the workspace
///
[DebuggerDisplay("{Name}")]
public class DependencyFile
{
///
/// Name of the file, relative to the root. Directories are separated with forward slashes, without a leading slash.
///
[XmlAttribute]
public string Name = null!;
///
/// Hash of this file. Used to determine which blob represents its contents.
///
[XmlAttribute]
public string Hash = null!;
///
/// Whether this file should have the exectuable bit set, on platforms that support it.
///
[XmlAttribute]
[DefaultValue(false)]
public bool IsExecutable;
}
///
/// Represents a hashed binary blob of data.
///
[DebuggerDisplay("{Hash}")]
public class DependencyBlob
{
///
/// Hash of the blob.
///
[XmlAttribute]
public string Hash = null!;
///
/// Size of the blob.
///
[XmlAttribute]
public long Size;
///
/// Hash of the pack file containing this blob.
///
[XmlAttribute]
public string PackHash = null!;
///
/// Offset of this blob's data within the pack file.
///
[XmlAttribute]
public long PackOffset;
}
///
/// A downloadable data file which can contain several blobs.
///
[DebuggerDisplay("{Hash}")]
public class DependencyPack
{
///
/// Hash of this pack file.
///
[XmlAttribute]
public string Hash = null!;
///
/// Size of this pack file, when uncompressed.
///
[XmlAttribute]
public long Size;
///
/// Compressed size of this pack file.
///
[XmlAttribute]
public long CompressedSize;
///
/// Subdirectory for this pack file on the remote server.
///
[XmlAttribute]
public string RemotePath = null!;
}
///
/// A manifest for dependencies that should be unpacked into the workspace at a given revision.
///
public class DependencyManifest
{
///
/// Base URL for downloading pack files from.
///
[XmlAttribute]
public string BaseUrl = "http://cdn.unrealengine.com/dependencies";
///
/// Whether to ignore proxy servers when downloading files from this remote.
///
[XmlAttribute]
[DefaultValue(false)]
public bool IgnoreProxy;
///
/// Files which should be extracted into the workspace.
///
[XmlArrayItem("File")]
public DependencyFile[] Files = new DependencyFile[0];
///
/// All the blobs required for entries in the Files array.
///
[XmlArrayItem("Blob")]
public DependencyBlob[] Blobs = new DependencyBlob[0];
///
/// All the packs required for entries in the Blobs array
///
[XmlArrayItem("Pack")]
public DependencyPack[] Packs = new DependencyPack[0];
}
}