messagingfw/msgsrvnstore/server/src/msvsearchsortdbwrapper.cpp
branchRCL_3
changeset 22 d2c4c66342f3
parent 0 8e480a14352b
child 23 d51193d814ea
equal deleted inserted replaced
21:e5b3a2155e1a 22:d2c4c66342f3
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2008-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".
   269 		TInt initQuerySize = 0;
   269 		TInt initQuerySize = 0;
   270 		TInt idsAdded = 0;
   270 		TInt idsAdded = 0;
   271 		
   271 		
   272 		RBuf8 queryString;
   272 		RBuf8 queryString;
   273 		queryString.CleanupClosePushL();
   273 		queryString.CleanupClosePushL();
   274 		queryString.Create(KMaxQuerySize);
   274 		queryString.CreateL(KMaxQuerySize);
   275 		
   275 		
   276 		//Folderlist for subfolder search
   276 		//Folderlist for subfolder search
   277 		RArray<TMsvId> folderIdList;
   277 		RArray<TMsvId> folderIdList;
   278 		TMsvId parentId;
   278 		TMsvId parentId;
   279 	#if (defined SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT)
   279 	#if (defined SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT)
   280 		parentId = UnmaskTMsvId(aQuery.iParentId);
   280 		parentId = UnmaskTMsvId(aQuery.iParentId);
   281 	#else
   281 	#else
   282 		parentId = aQuery.iParentId;
   282 		parentId = aQuery.iParentId;
   283 	#endif  
   283 	#endif  
   284 		//Append the parentid on which the search/sort is intiated into the folder list
   284 		//Append the parentid on which the search/sort is intiated into the folder list
   285 		folderIdList.Append(parentId);
   285 		folderIdList.AppendL(parentId);
   286 		
   286 		
   287 		iSortOnHeader = aSortOnHeader;
   287 		iSortOnHeader = aSortOnHeader;
   288 #if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB)	
   288 #if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB)	
   289 		iTypeOfQuery = aTypeOfQuery;
   289 		iTypeOfQuery = aTypeOfQuery;
   290 		iTotalNumMsgPartsOnHeader = 0;
   290 		iTotalNumMsgPartsOnHeader = 0;