equal
deleted
inserted
replaced
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2009 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". |
106 |
106 |
107 void CMsvSearchSortDeltaCache::EntryInDeltaCache(TMsvId aID,TMsgType aType) |
107 void CMsvSearchSortDeltaCache::EntryInDeltaCache(TMsvId aID,TMsgType aType) |
108 { |
108 { |
109 if(aType == ENewMsg ) //New Msg Entry |
109 if(aType == ENewMsg ) //New Msg Entry |
110 { |
110 { |
111 iMsvSearchSortDeltaCache->iNewEntry.AppendL(aID); |
111 iMsvSearchSortDeltaCache->iNewEntry.Append(aID); |
112 iMsvSearchSortDeltaCache->iDeltaCacheDirtyFlag = ETrue; |
112 iMsvSearchSortDeltaCache->iDeltaCacheDirtyFlag = ETrue; |
113 } |
113 } |
114 // This conditional statement is required to check if any msg updation is going on while doing search or not. |
114 // This conditional statement is required to check if any msg updation is going on while doing search or not. |
115 // And if any TMsvId is alreday added it should not add it again. |
115 // And if any TMsvId is alreday added it should not add it again. |
116 else if(aType == EUpdatedMsg && !iIsHeaderSearchEnabled) //Updated msg Entry |
116 else if(aType == EUpdatedMsg && !iIsHeaderSearchEnabled) //Updated msg Entry |
119 TInt foundPos = iMsvSearchSortDeltaCache->iNewEntry.Find(aID); |
119 TInt foundPos = iMsvSearchSortDeltaCache->iNewEntry.Find(aID); |
120 |
120 |
121 if( foundPos < 0 && |
121 if( foundPos < 0 && |
122 iUpdateEntry.Find(aID) == KErrNotFound ) |
122 iUpdateEntry.Find(aID) == KErrNotFound ) |
123 { |
123 { |
124 iMsvSearchSortDeltaCache->iUpdateEntry.AppendL(aID); |
124 iMsvSearchSortDeltaCache->iUpdateEntry.Append(aID); |
125 iMsvSearchSortDeltaCache->iDeltaCacheDirtyFlag = ETrue; |
125 iMsvSearchSortDeltaCache->iDeltaCacheDirtyFlag = ETrue; |
126 } |
126 } |
127 |
127 |
128 } |
128 } |
129 else if(aType == EDeletedMsg) //Deleted msg Entry. |
129 else if(aType == EDeletedMsg) //Deleted msg Entry. |
130 { |
130 { |
131 iMsvSearchSortDeltaCache->iDeleteEntry.AppendL(aID); |
131 iMsvSearchSortDeltaCache->iDeleteEntry.Append(aID); |
132 iMsvSearchSortDeltaCache->iDeltaCacheDirtyFlag = ETrue; |
132 iMsvSearchSortDeltaCache->iDeltaCacheDirtyFlag = ETrue; |
133 } |
133 } |
134 } |
134 } |
135 |
135 |