mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Split interfaces and state into folders
This commit is contained in:
parent
05e25c7fb3
commit
b32f12f978
15
Compression.BSA/Interfaces/IBSABuilder.cs
Normal file
15
Compression.BSA/Interfaces/IBSABuilder.cs
Normal 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);
|
||||
}
|
||||
}
|
20
Compression.BSA/Interfaces/IBSAReader.cs
Normal file
20
Compression.BSA/Interfaces/IBSAReader.cs
Normal 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);
|
||||
}
|
||||
}
|
@ -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>
|
12
Compression.BSA/State/ArchiveStateObject.cs
Normal file
12
Compression.BSA/State/ArchiveStateObject.cs
Normal 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);
|
||||
}
|
||||
}
|
13
Compression.BSA/State/FileStateObject.cs
Normal file
13
Compression.BSA/State/FileStateObject.cs
Normal 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; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user