imgtools/imglib/inc/e32image.h
changeset 620 ad8ffc8e1982
parent 590 360bd6b35136
equal deleted inserted replaced
585:238f4cb8391f 620:ad8ffc8e1982
    17 
    17 
    18 
    18 
    19 #ifndef __E32IMAGE_H__
    19 #ifndef __E32IMAGE_H__
    20 #define __E32IMAGE_H__
    20 #define __E32IMAGE_H__
    21 
    21 
       
    22  
    22 #if defined(__MSVCDOTNET__) || defined(__TOOLS2__)
    23 #if defined(__MSVCDOTNET__) || defined(__TOOLS2__)
    23 #include <fstream>
    24 #include <fstream>
    24 using namespace std;
    25 using namespace std;
    25 #else //!__MSVCDOTNET__
    26 #else //!__MSVCDOTNET__
    26 #include <fstream.h>
    27 #include <fstream.h>
    59 	TUint BssOffset();
    60 	TUint BssOffset();
    60 	TUint32 Capability();
    61 	TUint32 Capability();
    61 	TUint32 Format();
    62 	TUint32 Format();
    62 	TInt NumberOfImports();
    63 	TInt NumberOfImports();
    63 
    64 
    64 	TInt IsValid();
    65 	TInt IsValid() const {return (iError == KErrNone);}
    65 	TInt IsDll();
    66 	TInt IsDll();
    66 	enum TDumpFlags
    67 	enum TDumpFlags
    67 		{
    68 		{
    68 		EDumpHeader = 1<<0,
    69 		EDumpHeader = 1<<0,
    69 		EDumpSecurityInfo = 1<<1,
    70 		EDumpSecurityInfo = 1<<1,
    71 		EDumpData = 1<<3,
    72 		EDumpData = 1<<3,
    72 		EDumpExports = 1<<4,
    73 		EDumpExports = 1<<4,
    73 		EDumpImports = 1<<5,
    74 		EDumpImports = 1<<5,
    74 		EDumpDefaults = EDumpHeader|EDumpCode|EDumpData|EDumpExports|EDumpImports
    75 		EDumpDefaults = EDumpHeader|EDumpCode|EDumpData|EDumpExports|EDumpImports
    75 		};
    76 		};
    76 	void Dump(TText *aFileName,TInt aDumpFlags);
    77 	void Dump(const char* aFileName,TInt aDumpFlags);
    77 	void DumpHeader(TInt aDumpFlags);
    78 	void DumpHeader(TInt aDumpFlags);
    78 	void DumpData(TInt aDumpFlags);
    79 	void DumpData(TInt aDumpFlags);
    79 	void SetStackSize(TInt aSize);
    80 	void SetStackSize(TInt aSize);
    80 	void SetHeapSizeMin(TInt aSize);
    81 	void SetHeapSizeMin(TInt aSize);
    81 	void SetHeapSizeMax(TInt aSize);
    82 	void SetHeapSizeMax(TInt aSize);
    85 	void SetCallEntryPoints(TInt aBool);
    86 	void SetCallEntryPoints(TInt aBool);
    86 	void SetFixedAddress(TInt aBool);
    87 	void SetFixedAddress(TInt aBool);
    87 	void SetPriority(TProcessPriority aPri);
    88 	void SetPriority(TProcessPriority aPri);
    88 	void SetCapability(SCapabilitySet& aCapabilities);
    89 	void SetCapability(SCapabilitySet& aCapabilities);
    89 	void SetFPU(unsigned int aFPU);
    90 	void SetFPU(unsigned int aFPU);
    90 	static TInt IsE32ImageFile(char *aFileName);
    91 	static TInt IsE32ImageFile(const char *aFileName);
    91 	TInt DetermineEntryPointType();
    92 	TInt DetermineEntryPointType();
    92 	void UpdateHeaderCrc();
    93 	void UpdateHeaderCrc();
    93 	void SetDefaultHeader();
    94 	void SetDefaultHeader();
    94 	void CreateExportBitMap();
    95 	void CreateExportBitMap();
    95 	void AddExportDescription();
    96 	void AddExportDescription();
   120 	TUint8* iExportBitMap;
   121 	TUint8* iExportBitMap;
   121 	TInt iMissingExports;
   122 	TInt iMissingExports;
   122 	CBytePair *iBPE;
   123 	CBytePair *iBPE;
   123 	};
   124 	};
   124 
   125 
   125 #ifdef __VC32__
   126 ostream& operator<<(ostream &os, const E32ImageFile &aImage); 
   126 ostream &operator<<(ostream &os, const E32ImageFile &aImage);
   127 ifstream& operator>>(ifstream &is, E32ImageFile &aImage);
   127 #else
       
   128 ostream &operator<<(ostream &os, const E32ImageFile &aImage);
       
   129 #endif
       
   130 ifstream &operator>>(ifstream &is, E32ImageFile &aImage);
       
   131 
   128 
   132 #endif
   129 #endif