Update contrib.
2 // Copyright (c) 2008-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".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
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.
25 #ifndef __SCMCONFIG_H_INCLUDED__
26 #define __SCMCONFIG_H_INCLUDED__
31 #include <scmbytestreamutil.h>
32 #include <scmconfigitem.h>
36 //Note -- Changing the size of this requires a change in KScmConfigMaxSize
37 _LIT8(KScmConfigHeaderString, "SCMCONFIG");
40 * This class handles the configuration section of the crash partition.
41 * It is responsible for reading and writing it
43 class SCMConfiguration : public MByteStreamSerializable
48 //The 9 here refers to the size of KScmConfigHeaderString which is serialised
49 static const TInt KScmConfigMaxSize = TConfigItem::ELast * sizeof(TConfigItem) + 9;
52 virtual ~SCMConfiguration();
54 // from MByteStreamSerializable
55 virtual TInt Serialize(TByteStreamWriter& aWriter);
56 virtual TInt Deserialize(TByteStreamReader& aReader);
57 virtual TInt GetSize() const;
59 TConfigItem* GetNextItem();
60 TInt SetDefaultConfig();
62 TInt CreateConfigItem(const TConfigItem::TSCMDataType aDataType, const TUint8 aPriority, const TInt32 aSizeToDump);
63 TInt ModifyConfigItemPriority(const TConfigItem::TSCMDataType aDataType, const TUint8 aPriority);
65 void ResetToHighestPriority();
67 TBool operator == (const SCMConfiguration& aOther) const;
69 TConfigItem* ConfigList() const;
70 TInt InsertToList(TConfigItem* aItem);
76 * This is an ordered linked list of TConfigItems. The first is the highest priority and so on until the lowest priority
78 TConfigItem* iConfigList;
81 * Everytime GetNextItemToDump is called this moves down along the list
83 TConfigItem* iNextItem;
86 TInt RemoveFromList(TConfigItem* aItem);
92 #endif /*__SCMCONFIG_H_INCLUDED__*/