Split interfaces and state into folders

This commit is contained in:
Justin Swanson 2020-08-11 09:24:47 -05:00
parent 05e25c7fb3
commit b32f12f978
5 changed files with 61 additions and 32 deletions

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Wabbajack.Common;
namespace Compression.BSA
{
public interface IBSABuilder : IAsyncDisposable
{
Task AddFile(FileStateObject state, Stream src);
Task Build(AbsolutePath filename);
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Wabbajack.Common;
namespace Compression.BSA
{
public interface IBSAReader
{
/// <summary>
/// The files defined by the archive
/// </summary>
IEnumerable<IFile> Files { get; }
ArchiveStateObject State { get; }
void Dump(Action<string> print);
}
}

View File

@ -1,43 +1,12 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Wabbajack.Common;
namespace Compression.BSA
{
public interface IBSAReader
{
/// <summary>
/// The files defined by the archive
/// </summary>
IEnumerable<IFile> Files { get; }
ArchiveStateObject State { get; }
void Dump(Action<string> print);
}
public interface IBSABuilder : IAsyncDisposable
{
Task AddFile(FileStateObject state, Stream src);
Task Build(AbsolutePath filename);
}
public class ArchiveStateObject
{
public virtual async Task<IBSABuilder> MakeBuilder(long size)
{
throw new NotImplementedException();
}
}
public class FileStateObject
{
public int Index { get; set; }
public RelativePath Path { get; set; }
}
public interface IFile
{
/// <summary>

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Compression.BSA
{
public abstract class ArchiveStateObject
{
public abstract Task<IBSABuilder> MakeBuilder(long size);
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
using Wabbajack.Common;
namespace Compression.BSA
{
public abstract class FileStateObject
{
public int Index { get; set; }
public RelativePath Path { get; set; }
}
}