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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // some utility classes for writing data to flash buffer
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.
26 #ifndef __SCMCONFIGITEM_H_INCLUDED__
27 #define __SCMCONFIGITEM_H_INCLUDED__
31 #ifndef __KERNEL_MODE__
33 #endif // ! __KERNEL_MODE__
35 #include <scmbytestreamutil.h>
41 * This object represents a data type to dump
43 class TConfigItem : public MByteStreamSerializable
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 */
70 TConfigItem(TSCMDataType aDataType, TUint8 aPriority, TInt32 aSizeToDump);
72 TSCMDataType GetDataType() const;
73 TInt GetPriority() const;
74 TInt GetSizeToDump() const;
76 // from MByteStreamSerializable
77 virtual TInt Serialize(TByteStreamWriter& aWriter);
78 virtual TInt Deserialize(TByteStreamReader& aReader);
79 virtual TInt GetSize() const;
81 void SetSpaceRequired(TUint aSpaceReq);
82 TUint GetSpaceRequired();
85 TBool operator == (const TConfigItem& aOther) const;
86 TConfigItem* Next() const;
88 #ifndef __KERNEL_MODE__
89 static const TDesC& GetSCMConfigOptionText(TConfigItem::TSCMDataType aType);
90 #endif // ! __KERNEL_MODE__
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 */
99 friend class SCMConfiguration;
105 #endif // __SCMCONFIGITEM_H_INCLUDED__