os/kernelhwsrv/kernel/eka/debug/crashMonitor/inc/scmconfigitem.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-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 the License "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 // some utility classes for writing data to flash buffer
    15 // 
    16 // WARNING: This file contains some APIs which are internal and are subject
    17 //          to change without notice. Such APIs should therefore not be used
    18 //          outside the Kernel and Hardware Services package.
    19 //
    20 
    21 /**
    22  @file
    23  @internalTechnology
    24 */
    25 
    26 #ifndef __SCMCONFIGITEM_H_INCLUDED__
    27 #define __SCMCONFIGITEM_H_INCLUDED__
    28 
    29 
    30 #include <e32def.h>
    31 #ifndef __KERNEL_MODE__
    32 #include <e32std.h>
    33 #endif // ! __KERNEL_MODE__
    34 
    35 #include <scmbytestreamutil.h>
    36 
    37 
    38 namespace Debug
    39 	{ 	
    40 	/**
    41 	 * This object represents a data type to dump
    42 	 */
    43 	class TConfigItem : public MByteStreamSerializable
    44 		{
    45 		public:
    46 			enum TSCMDataType
    47 				{				
    48 				EExceptionStacks,			/**< Dumps exception stacks */
    49 				EVariantSpecificData,		/**< Dumps Variant Specific data */
    50 				ERomInfo,					/**< Dumps ROM Build Info */
    51 				ELocks,						/**< Dumps Kernel Lock Info */
    52 				EKernelHeap,				/**< Dumps the Kernel Heap */
    53 				ETraceData,					/**< Dumps any trace data we find */
    54 				EProcessCodeSegs,			/**< Dumps System wide Code Segments for each Process */
    55 				EThreadsUsrStack,			/**< Dumps System wide User Stacks for each thread */
    56 				EThreadsSvrStack,			/**< Dumps System wide Supervisor Stacks for each thread */
    57 				EThreadsUsrRegisters,		/**< Dumps User Registers available for every thread in the System */
    58 				EThreadsSvrRegisters,		/**< Dumps Supervisor Registers available for every thread in the System */ 
    59 				EProcessMetaData,			/**< Dumps the Process List */
    60 				EThreadsMetaData,			/**< Dumps the Thread List */
    61 				ECrashedProcessCodeSegs,    /**< Dumps the Code Segments for the process that has crashed */
    62 				ECrashedProcessUsrStacks,	/**< Dumps the User stacks for each thread in the process that has crashed */
    63 				ECrashedProcessSvrStacks,	/**< Dumps the Supervisor stacks for each thread in the process that has crashed */
    64 				ECrashedProcessMetaData,	/**< Dumps Info about the process that has crashed */
    65 				ECrashedThreadMetaData,		/**< Dumps Info about the Thread that has crashed */				
    66 				ELast						/**< End Marker */
    67 				};
    68 			
    69 			TConfigItem();
    70 			TConfigItem(TSCMDataType aDataType,  TUint8 aPriority, TInt32 aSizeToDump);
    71 	
    72 			TSCMDataType GetDataType() const;
    73 			TInt GetPriority() const;
    74 			TInt GetSizeToDump() const;
    75 			
    76 			// from MByteStreamSerializable
    77 			virtual TInt Serialize(TByteStreamWriter& aWriter);
    78 			virtual TInt Deserialize(TByteStreamReader& aReader);
    79 		 	virtual TInt GetSize() const;
    80 		 	
    81 		 	void SetSpaceRequired(TUint aSpaceReq);
    82 		 	TUint GetSpaceRequired();
    83 		 	
    84 		 	void Print() const;
    85 		 	TBool operator == (const TConfigItem& aOther) const;
    86 		 	TConfigItem* Next() const;
    87 
    88 #ifndef __KERNEL_MODE__		 	
    89 		 	 static const TDesC& GetSCMConfigOptionText(TConfigItem::TSCMDataType aType);
    90 #endif // ! __KERNEL_MODE__
    91 		 	 
    92 		private:
    93 			TSCMDataType iDataType;		/** The type this data represents */
    94 			TUint iSizeToDump;			/** the size of the data to dump */
    95 			TUint iSpaceRequiredToDump;	/** If known, this will contain the size of the data we need to dump */
    96 			TUint8  iPriority;			/** Priority of this data (0 is not required) */
    97 			TConfigItem* iNext;	 		/** Next config item in list */
    98 			
    99 			friend class SCMConfiguration;
   100 			
   101 		};			
   102 	}
   103 
   104 
   105 #endif //  __SCMCONFIGITEM_H_INCLUDED__