Add unused IDetectable interface

This commit is contained in:
Matt Nadareski
2023-03-13 15:34:26 -04:00
parent b7f06f0b59
commit d439ba9592
2 changed files with 30 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
using System.IO;
namespace BinaryObjectScanner.Interfaces
{
/// <summary>
/// Mark a file type as being able to be detected
/// </summary>
public interface IDetectable
{
/// <summary>
/// Check if a file is detected as this file type
/// </summary>
/// <param name="file">Path to the input file</param>
/// <param name="includeDebug">True to include debug data, false otherwise</param>
/// <returns>Detected file or protection type, null on error</returns>
/// <remarks>Ideally, this should just point to the other detect implementation.</remarks>
string Detect(string file, bool includeDebug);
/// <summary>
/// Check if a stream is detected as this file type
/// </summary>
/// <param name="stream">Stream representing the input file</param>
/// <param name="file">Path to the input file</param>
/// <param name="includeDebug">True to include debug data, false otherwise</param>
/// <returns>Detected file or protection type, null on error</returns>
string Detect(Stream stream, string file, bool includeDebug);
}
}

View File

@@ -5,11 +5,10 @@ namespace BinaryObjectScanner.Interfaces
/// <summary>
/// Mark a file type as being able to be extracted
/// </summary>
/// TODO: Add debug flag to both of the declarations
public interface IExtractable
{
/// <summary>
/// Scan a file for all internal protections
/// Extract a file to a temporary path, if possible
/// </summary>
/// <param name="file">Path to the input file</param>
/// <param name="includeDebug">True to include debug data, false otherwise</param>
@@ -18,7 +17,7 @@ namespace BinaryObjectScanner.Interfaces
string Extract(string file, bool includeDebug);
/// <summary>
/// Scan a stream for all internal protections
/// Extract a stream to a temporary path, if possible
/// </summary>
/// <param name="stream">Stream representing the input file</param>
/// <param name="file">Path to the input file</param>