1
/* -*- mode: C++; tab-width: 4 -*- */
2
/* ===================================================================== *\
3
Copyright (c) 2001 PocketPyro, Inc.
4
Portions Copyright (c) Palm, Inc.
7
This file is part of the Palm OS Emulator.
9
This program is free software; you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation; either version 2 of the License, or
12
(at your option) any later version.
13
\* ===================================================================== */
15
#ifndef EmPatchModuleTypes_h
16
#define EmPatchModuleTypes_h
18
#include "EmPatchIf.h" // HeadpatchProc, TailpatchProc, IEmPatchModule
19
#include "EmStructs.h" // SystemCallContext
22
// ======================================================================
23
// At compile time, the list of functions we want to head- and tailpatch
24
// are stored in an array of ProtoPatchTableEntries. At runtime, these
25
// compact arrays are expanded by PatchModule into a sparse array
26
// so that the function dispatch number can be used to look up the
28
// ======================================================================
30
struct ProtoPatchTableEntry
33
HeadpatchProc fHeadpatch;
34
TailpatchProc fTailpatch;
38
// ===========================================================================
39
// InstalledLibPatchEntry
40
// ===========================================================================
41
// Structure used to hold tail-patch information.
43
class InstalledLibPatchEntry
46
InstalledLibPatchEntry (void) :
52
bool IsDirty (void) const
57
void SetDirty (bool dirty = true)
62
IEmPatchModule* GetPatchTableP (void) const
67
void SetPatchTableP (IEmPatchModule* tableP)
74
IEmPatchModule* fTableP;
77
typedef vector<InstalledLibPatchEntry> PatchedLibIndex;
80
// ===========================================================================
82
// ===========================================================================
83
// Structure used to hold tail-patch information.
87
SystemCallContext fContext;
89
TailpatchProc fTailpatch;
92
typedef vector<TailpatchType> TailPatchIndex;
94
#endif // EmPatchModuleTypes_h