Index: courgette/courgette.h |
diff --git a/courgette/courgette.h b/courgette/courgette.h |
index 521053e06550b5b5d2bcbd5bd40e9c90d698e2f8..f847f5056944becf750319f15610c18e1c942514 100644 |
--- a/courgette/courgette.h |
+++ b/courgette/courgette.h |
@@ -50,6 +50,13 @@ enum Status { |
C_ADJUSTMENT_FAILED = 27, // |
}; |
+// What type of executable is something |
+// Generally corresponds to CourgettePatchFile::TransformationMethodId |
+enum ExecutableType { |
+ UNKNOWN, |
+ WIN32_X86 |
+}; |
+ |
class SinkStream; |
class SinkStreamSet; |
class SourceStream; |
@@ -84,8 +91,14 @@ Status GenerateEnsemblePatch(SourceStream* old, SourceStream* target, |
// storing the pointer to the AssemblyProgram in |*output|. |
// Returns C_OK if successful, otherwise returns an error status and sets |
// |*output| to NULL. |
-Status ParseWin32X86PE(const void* buffer, size_t length, |
- AssemblyProgram** output); |
+ExecutableType DetectExecutableType(const void* buffer, size_t length); |
+ |
+// Attempts to detect the type of executable, and parse it with the |
+// appropriate tools, storing the pointer to the AssemblyProgram in |*output|. |
+// Returns C_OK if successful, otherwise returns an error status and sets |
+// |*output| to NULL. |
+Status ParseDetectedExecutable(const void* buffer, size_t length, |
+ AssemblyProgram** output); |
// Converts |program| into encoded form, returning it as |*output|. |
// Returns C_OK if succeeded, otherwise returns an error status and |