equal
deleted
inserted
replaced
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 |