messagingfw/msgsrvnstore/server/src/msventryfreepool.cpp
changeset 36 e7635922c074
parent 0 8e480a14352b
child 46 d51193d814ea
equal deleted inserted replaced
34:b66b8f3a7fd8 36:e7635922c074
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   385  * @return None.
   385  * @return None.
   386  * 
   386  * 
   387  * The function resets and appends the passed 
   387  * The function resets and appends the passed 
   388  * entry to freepool so that it can be reused.
   388  * entry to freepool so that it can be reused.
   389  */
   389  */
   390 void CMsvEntryFreePool::ReleaseEntry(CMsvCacheEntry* aMsvCacheEntry, TBool aBypassTransaction /* DEFAULT=EFalse*/)
   390 void CMsvEntryFreePool::ReleaseEntryL(CMsvCacheEntry* aMsvCacheEntry, TBool aBypassTransaction /* DEFAULT=EFalse*/)
   391 	{
   391 	{
   392 	if( NULL == aMsvCacheEntry )
   392 	if( NULL == aMsvCacheEntry )
   393 		{
   393 		{
   394 		return;
   394 		return;
   395 		}
   395 		}
   396 	
   396 	
   397 	if(isTransactionOpen && (EFalse == aBypassTransaction))
   397 	if(isTransactionOpen && (EFalse == aBypassTransaction))
   398 		{
   398 		{
   399 		iMsvTmpEntries.Append(aMsvCacheEntry);
   399 		iMsvTmpEntries.AppendL(aMsvCacheEntry);
   400 		}
   400 		}
   401 	else
   401 	else
   402 		{
   402 		{
   403 		// 1. Reset the entry data.
   403 		// 1. Reset the entry data.
   404 		aMsvCacheEntry->ResetEntry();
   404 		aMsvCacheEntry->ResetEntry();
   405 	
   405 	
   406 		// 2. Append entry to the freepool.
   406 		// 2. Append entry to the freepool.
   407 		iMsvEntries->Append(aMsvCacheEntry);
   407 		iMsvEntries->AppendL(aMsvCacheEntry);
   408 		}
   408 		}
   409 	}
   409 	}
   410 
   410 
   411 
   411 
   412 
   412