sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "LogServRecentListManager.h" sl@0: #include "LogServResourceInterpreter.h" sl@0: #include "LogServRecentList.h" sl@0: #include "logservpanic.h" sl@0: sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: // -----> CLogServRecentListManager (source) sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: sl@0: CLogServRecentListManager::~CLogServRecentListManager() sl@0: { sl@0: iLists.ResetAndDestroy(); sl@0: iLists.Close(); sl@0: } sl@0: sl@0: void CLogServRecentListManager::ConstructL(CLogServResourceInterpreter& aResourceInterpreter, TInt aResourceId) sl@0: { sl@0: TResourceReader reader; sl@0: aResourceInterpreter.CreateResourceReaderLC(reader, aResourceId); sl@0: const TInt count = reader.ReadInt16(); sl@0: iLists.ReserveL(count); sl@0: for(TInt i=0; iConstructL(aResourceInterpreter, aResourceId); sl@0: CleanupStack::Pop(); sl@0: return self; sl@0: } sl@0: sl@0: const CLogServRecentList* CLogServRecentListManager::GetRecentList(const CLogEvent& aEvent) const sl@0: { sl@0: TInt count = iLists.Count(); sl@0: while(count--) sl@0: { sl@0: const CLogServRecentList* list = iLists[count]; sl@0: if (list->IsRecent(aEvent)) sl@0: return list; sl@0: } sl@0: return NULL; sl@0: } sl@0: