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 // e32\debug\crashMonitor\src\scmmulticrashinfo.cpp
15 // Class to store info about the crash flash to enable multiple crashes
24 #include <scmdatatypes.h>
31 SCMMultiCrashInfo::SCMMultiCrashInfo()
40 SCMMultiCrashInfo::~SCMMultiCrashInfo()
45 /** add a pointer to a block to the list - takes ownership of block
46 * @param SCMCrashBlockEntry* aBlockEntry block to add
48 void SCMMultiCrashInfo::AddBlock(SCMCrashBlockEntry* aBlockEntry)
52 CLTRACE4("SCMMultiCrashInfo::AddBlock iBlockOffset = [%d] [0x%X] iBlockSize = [%d] [0x%X]"
53 , aBlockEntry->iBlockOffset,aBlockEntry->iBlockOffset, aBlockEntry->iBlockSize, aBlockEntry->iBlockSize);
56 // adding to empty list
57 iFirstBlock = aBlockEntry;
58 iCurrentBlock = iFirstBlock;
62 SCMCrashBlockEntry* p = iFirstBlock;
67 p->iNext = aBlockEntry;
72 CLTRACE("SCMMultiCrashInfo::AddBlock Adding a NULL block !");
77 /** add a pointer to a block to the list - takes ownership of block
78 * @return SCMCrashBlockEntry* returns NULL when no more blocks
81 SCMCrashBlockEntry* SCMMultiCrashInfo::GetNextBlock()
83 SCMCrashBlockEntry* p = iCurrentBlock;
86 iCurrentBlock = iCurrentBlock->iNext;
92 * sets current block to first in list
94 void SCMMultiCrashInfo::Reset()
96 iCurrentBlock = iFirstBlock;
100 * Clears all entries in the list
102 void SCMMultiCrashInfo::ClearList()
104 SCMCrashBlockEntry* p = iFirstBlock;
108 SCMCrashBlockEntry* tmp = p;
113 iFirstBlock = iCurrentBlock = NULL;