imgtools/imgcheck/inc/common.h
changeset 0 044383f39525
child 590 360bd6b35136
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * These declarations are used all over the program.
       
    16 * @internalComponent
       
    17 * @released
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 #ifndef COMMON_H
       
    24 #define COMMON_H
       
    25 
       
    26 #include "typedefs.h"
       
    27 
       
    28 /**
       
    29 Forward declaration
       
    30 
       
    31 @internalComponent
       
    32 @released
       
    33 */
       
    34 class ReportWriter;
       
    35 class Checker;
       
    36 class ImageReader;
       
    37 
       
    38 /**
       
    39 Typedefs used all over the tool.
       
    40 
       
    41 @internalComponent
       
    42 @released
       
    43 */
       
    44 typedef std::multimap<String, ExeNamesVsDepListMap> ImageVsDependencyMap;
       
    45 typedef std::list<unsigned int> UnIntList;
       
    46 typedef std::vector<ReportWriter*> WriterPtrList;
       
    47 typedef std::vector<Checker*> CheckerPtrList;
       
    48 typedef std::vector<ImageReader*> ImageReaderPtrList;
       
    49 
       
    50 /**
       
    51 Constants used to mark whether the option received or not.
       
    52 
       
    53 @internalComponent
       
    54 @released
       
    55 */
       
    56 const unsigned int KNone = 0x0;
       
    57 const unsigned int QuietMode = 0x1;
       
    58 const unsigned int KAll = 0x2;
       
    59 const unsigned int KXmlReport = 0x4;
       
    60 const unsigned int KVerbose = 0x8;
       
    61 const unsigned int KSidAll = 0x10;
       
    62 const unsigned int KNoCheck = 0x20;
       
    63 const unsigned int KE32Input = 0x40;
       
    64 //Can set value for new options over here
       
    65 
       
    66 /**
       
    67 Class used to put each attribute of a exetuble into integrated container.
       
    68 
       
    69 @internalComponent
       
    70 @released
       
    71 */
       
    72 class ExeAttribute
       
    73 {
       
    74 public:
       
    75 	ExeAttribute(){};
       
    76 	~ExeAttribute(){};
       
    77 
       
    78 	String iAttName;
       
    79 	String iAttValue;
       
    80 	String iAttStatus;
       
    81 };
       
    82 
       
    83 /**
       
    84 Enums used during command line input processing.
       
    85 
       
    86 @internalComponent
       
    87 @released
       
    88 */
       
    89 typedef enum ReturnType
       
    90 {
       
    91 	ESuccess = 0,
       
    92 	EQuit,
       
    93 	EFail
       
    94 };
       
    95 
       
    96 /**
       
    97 Tool's exit status
       
    98 
       
    99 @internalComponent
       
   100 @released
       
   101 */
       
   102 #define EXIT_SUCCESS 0
       
   103 #define EXIT_FAILURE 1
       
   104 
       
   105 /**
       
   106 Class Common, all general purpose funtions can be included here.
       
   107 
       
   108 @internalComponent
       
   109 @released
       
   110 */
       
   111 class Common
       
   112 {
       
   113 public:
       
   114 	static String IntToString(unsigned int aValue);
       
   115 	static unsigned int StringToInt(String& aStringVal);
       
   116 };
       
   117 
       
   118 /** 
       
   119 Default Log file name, used for logging the progress of application.
       
   120 
       
   121 @internalComponent
       
   122 @released
       
   123 */
       
   124 const String gLogFileName ("imgcheck.log");
       
   125 
       
   126 #endif //COMMON_H