toolsandutils/e32tools/elf2e32/source/parameterlistinterface.h
changeset 0 83f4b4db085c
child 1 d4b442d23379
equal deleted inserted replaced
-1:000000000000 0:83f4b4db085c
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Implementation of the Header file for the ParameterListInterface of the elf2e32 tool
       
    15 // @internalComponent
       
    16 // @released
       
    17 // 
       
    18 //
       
    19 
       
    20 #ifndef PARAMETERLISTINTERFACE_H
       
    21 #define PARAMETERLISTINTERFACE_H
       
    22 
       
    23 #ifdef _MSC_VER 
       
    24 #pragma warning(disable: 4786) // identifier was truncated to '255' characters in the debug information
       
    25 #pragma warning(disable: 4702) // unreachable code
       
    26 #endif
       
    27 
       
    28 #include <string>
       
    29 #include <vector>
       
    30 #include "e32imagedefs.h"
       
    31 
       
    32 enum ETargetType
       
    33 {
       
    34 	ETargetTypeNotSet = - 2,
       
    35 	EInvalidTargetType = - 1,	
       
    36 	/** Target type is Library */
       
    37 	ELib,
       
    38 	/** Target type is DLL */
       
    39 	EDll,
       
    40 	EExe,
       
    41 	EPolyDll,
       
    42 	EExexp,
       
    43 	EStdExe
       
    44 };
       
    45 
       
    46 typedef unsigned int UINT;
       
    47 
       
    48 using std::vector;
       
    49 /**
       
    50 This class is the abstract base class from which ParameterManager is derived.
       
    51 
       
    52 @internalComponent
       
    53 @released
       
    54 */
       
    55 class ParameterListInterface
       
    56 {
       
    57 
       
    58 public:
       
    59 	typedef vector<char *> LibSearchPaths;
       
    60 
       
    61 	struct SysDefs
       
    62 	{
       
    63 		unsigned int iSysDefOrdinalNum;
       
    64 		char * iSysDefSymbolName;
       
    65 	};
       
    66 
       
    67 	typedef struct SysDefs Sys;
       
    68 
       
    69 	typedef std::string string;
       
    70 
       
    71 	virtual ~ParameterListInterface();
       
    72 /**
       
    73 This function extracts the DEF file name that is passed as input through the --definput option.
       
    74 
       
    75 @internalComponent
       
    76 @released
       
    77 
       
    78 @return the name of the input DEF file if provided as input through --definput or 0.
       
    79 */
       
    80 	virtual char * DefInput()=0;
       
    81 /**
       
    82 This function extracts the Elf file name that is passed as input through the --dsoin option.
       
    83 
       
    84 @internalComponent
       
    85 @released
       
    86 
       
    87 @return the name of the input Elf file if provided as input through --dsoin or 0.
       
    88 */
       
    89 	virtual char * ElfInput()=0;
       
    90 /**
       
    91 This function extracts the E32 image name that is passed as input through the --e32dump option.
       
    92 
       
    93 @internalComponent
       
    94 @released
       
    95 
       
    96 @return the name of the input E32 image if provided as input through --e32dump or 0.
       
    97 */
       
    98 	virtual char * E32Input()=0;
       
    99 	virtual bool E32ImageInOption()=0;
       
   100 	virtual bool FileDumpOption()=0;
       
   101 	virtual int DumpOptions()=0;
       
   102 
       
   103 /**
       
   104 This function extracts the output DEF file name that is passed as input through the --defoutput option.
       
   105 
       
   106 @internalComponent
       
   107 @released
       
   108 
       
   109 @return the name of the output DEF file if provided as input through --defoutput or 0.
       
   110 */
       
   111 	virtual char * DefOutput()=0;
       
   112 /**
       
   113 This function extracts the DSO file name that is passed as input through the --dso option.
       
   114 
       
   115 @internalComponent
       
   116 @released
       
   117 
       
   118 @return the name of the output DSO file if provided as input through --dso or 0.
       
   119 */
       
   120 	virtual char * DSOOutput()=0;
       
   121 /**
       
   122 This function extracts the E32 image output that is passed as input through the --output option.
       
   123 
       
   124 @internalComponent
       
   125 @released
       
   126 
       
   127 @return the name of the output E32 image output if provided as input through --output or 0.
       
   128 */
       
   129 	virtual char * E32ImageOutput()=0;
       
   130 /**
       
   131 This function extracts the target type that is passed as input through the --targettype option.
       
   132 
       
   133 @internalComponent
       
   134 @released
       
   135 
       
   136 @return the name of the input target type if provided as input through --targettype or 0.
       
   137 */
       
   138 	virtual ETargetType TargetTypeName()=0;
       
   139 /**
       
   140 This function extracts the name of the DLL (that the DSO is to be linked with) 
       
   141 that is passed as input through the --linkas option.
       
   142 
       
   143 @internalComponent
       
   144 @released
       
   145 
       
   146 @return the name of the DLL name to be linked with if provided as input through --linkas or 0.
       
   147 */
       
   148 	virtual char * LinkAsDLLName()=0;
       
   149 /**
       
   150 This function extracts the path (where the intermediate libraries should be put)
       
   151 that is passed as input through the --libpath option.
       
   152 
       
   153 @internalComponent
       
   154 @released
       
   155 
       
   156 @return the path if provided as input through --libpath or 0.
       
   157 */
       
   158 	virtual LibSearchPaths& LibPath()=0;
       
   159 /**
       
   160 This function extracts the filename from the absolute path that is given as input.
       
   161 
       
   162 @internalComponent
       
   163 @released
       
   164 
       
   165 @param aFileName
       
   166 The filename alongwith the absolute path.
       
   167 
       
   168 @return the filename (without the absolute path) for valid input else the filename itself.
       
   169 
       
   170 */
       
   171 	virtual char * FileName(char * aArg)=0;
       
   172 /**
       
   173 This function finds out the directory separator '\' in the path
       
   174 
       
   175 @internalComponent
       
   176 @released
       
   177 
       
   178 @return the directory spearator '\'
       
   179 */
       
   180 	virtual char DirectorySeparator()=0;
       
   181 /**
       
   182 This function finds out if the --definput option is passed to the program.
       
   183 
       
   184 @internalComponent
       
   185 @released
       
   186 
       
   187 @return True if --definput option is passed in or False.
       
   188 */
       
   189 	virtual bool DefFileInOption()=0;
       
   190 /**
       
   191 This function finds out if the --elfinput option is passed to the program.
       
   192 
       
   193 @internalComponent
       
   194 @released
       
   195 
       
   196 @return True if --elfinput option is passed in or False.
       
   197 */
       
   198 	virtual bool ElfFileInOption()=0;
       
   199 /**
       
   200 This function finds out if the --dso option is passed to the program.
       
   201 
       
   202 @internalComponent
       
   203 @released
       
   204 
       
   205 @return True if --dso option is passed in or False.
       
   206 */
       
   207 	virtual bool DSOFileOutOption()=0;
       
   208 /**
       
   209 This function finds out if the --linkas option is passed to the program.
       
   210 
       
   211 @internalComponent
       
   212 @released
       
   213 
       
   214 @return True if --linkas option is passed in or False.
       
   215 */
       
   216 	virtual bool LinkAsOption()=0;
       
   217 /**
       
   218 This function parses the command line options and sets the appropriate values based on the
       
   219 input options.
       
   220 
       
   221 @internalComponent
       
   222 @released
       
   223 
       
   224 */
       
   225 	virtual void ParameterAnalyser()=0;
       
   226 
       
   227 	virtual bool LogFileOption()=0;
       
   228 	virtual char* LogFile()=0;
       
   229 
       
   230 	virtual bool E32OutOption()=0;
       
   231 	virtual bool DefFileOutOption()=0;
       
   232 
       
   233 	virtual bool Uid1Option()=0;
       
   234 	virtual bool SecureIdOption()=0;
       
   235 	virtual bool VendorIdOption()=0;
       
   236 
       
   237 	virtual bool MessageFileOption()=0;
       
   238 	virtual char* MessageFile()=0;
       
   239 
       
   240 	virtual bool DumpMessageFileOption()=0;
       
   241 	virtual char* DumpMessageFile()=0;
       
   242 
       
   243 	virtual Sys SysDefSymbols(int count)=0;
       
   244 
       
   245 
       
   246 	virtual UINT Uid1() = 0;
       
   247 	virtual UINT Uid2() = 0;
       
   248 	virtual UINT Uid3() = 0;
       
   249 	virtual UINT SecureId() = 0;
       
   250 	virtual UINT VendorId() = 0;
       
   251 	virtual bool FixedAddress() = 0;
       
   252 	virtual bool Compress() = 0;
       
   253 	virtual UINT CompressionMethod() = 0;
       
   254 	virtual size_t HeapCommittedSize() = 0;
       
   255 	virtual size_t HeapReservedSize() = 0;
       
   256 	virtual size_t StackCommittedSize() = 0;
       
   257 	virtual bool Unfrozen() = 0;
       
   258 	virtual bool IgnoreNonCallable() = 0;
       
   259 	virtual SCapabilitySet Capability() = 0;
       
   260 	virtual int SysDefCount() = 0;
       
   261 	virtual char * FileDumpSubOptions() = 0;
       
   262 	virtual TProcessPriority Priority() = 0;
       
   263 	virtual bool DllDataP() = 0;
       
   264 	virtual unsigned int Version() = 0;
       
   265 	virtual bool CallEntryPoint() = 0; //{ return true;}
       
   266 	virtual UINT FPU() = 0;
       
   267 
       
   268 	virtual bool IsCodePaged() = 0;
       
   269 	virtual bool IsCodeUnpaged() = 0;
       
   270 	virtual bool IsCodeDefaultPaged() = 0;
       
   271 
       
   272 	virtual bool IsDataPaged() = 0;
       
   273 	virtual bool IsDataUnpaged() = 0;
       
   274 	virtual bool IsDataDefaultPaged() = 0;
       
   275 	
       
   276 	virtual bool ExcludeUnwantedExports() = 0;
       
   277 	virtual bool IsCustomDllTarget() = 0;
       
   278 	virtual bool SymNamedLookup() = 0;
       
   279 	virtual bool IsDebuggable() = 0;
       
   280 	virtual bool IsSmpSafe() = 0;
       
   281 };
       
   282 
       
   283 
       
   284 #endif // PARAMETERLISTINTERFACE_H
       
   285