| Index: courgette/ensemble.h
|
| diff --git a/courgette/ensemble.h b/courgette/ensemble.h
|
| index f907f9d9a62273a6bf88febd72b60d36b304d47b..ae2fdacf68c2cf02a3b87b0266d0275fe4f5a65f 100644
|
| --- a/courgette/ensemble.h
|
| +++ b/courgette/ensemble.h
|
| @@ -36,11 +36,14 @@ class PEInfo;
|
| //
|
| class Element {
|
| public:
|
| - enum Kind { WIN32_X86_WITH_CODE, WIN32_NOCODE };
|
| + Element(ExecutableType kind,
|
| + Ensemble* ensemble,
|
| + const Region& region,
|
| + PEInfo*info);
|
|
|
| - virtual ~Element() {}
|
| + virtual ~Element();
|
|
|
| - Kind kind() const { return kind_; }
|
| + ExecutableType kind() const { return kind_; }
|
| const Region& region() const { return region_; }
|
|
|
| // The name is used only for debugging and logging.
|
| @@ -50,16 +53,14 @@ class Element {
|
| // containing Ensemble.
|
| size_t offset_in_ensemble() const;
|
|
|
| - // Some subclasses of Element might have a PEInfo.
|
| - virtual PEInfo* GetPEInfo() const { return NULL; }
|
| -
|
| - protected:
|
| - Element(Kind kind, Ensemble* ensemble, const Region& region);
|
| + // The ImageInfo for this executable
|
| + virtual PEInfo* GetImageInfo() const { return info_; }
|
|
|
| private:
|
| - Kind kind_;
|
| + ExecutableType kind_;
|
| Ensemble* ensemble_;
|
| Region region_;
|
| + PEInfo *info_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Element);
|
| };
|
| @@ -139,7 +140,8 @@ struct CourgettePatchFile {
|
|
|
| static const uint32 kVersion = 20110216;
|
|
|
| - // Transformation method IDs.
|
| + // Transformation method IDs. These are embedded in generated files, so
|
| + // never remove or change an existing id.
|
| enum TransformationMethodId {
|
| T_COURGETTE_WIN32_X86 = 1, // Windows 32 bit 'Portable Executable' x86.
|
| };
|
|
|