syncmlfw/dm/hostserver/dmhostserverbase/src/nsmldmhostsession.cpp
changeset 66 08c8318ec9cb
parent 2 5594fba90824
equal deleted inserted replaced
64:910464db1b65 66:08c8318ec9cb
  1275 		{
  1275 		{
  1276 		RPointerArray<CNSmlDmResultElement> someResults;
  1276 		RPointerArray<CNSmlDmResultElement> someResults;
  1277 		CleanupClosePushL ( someResults );
  1277 		CleanupClosePushL ( someResults );
  1278 		for ( TInt i(0); i<okToWrite; i++ )
  1278 		for ( TInt i(0); i<okToWrite; i++ )
  1279 			{
  1279 			{
  1280 			someResults.Append ( iResultList[i] );			
  1280 			someResults.AppendL ( iResultList[i] );			
  1281 			}
  1281 			}
  1282 		NSmlDmCmdArgHandler::PacketResultsL ( writeStream, someResults );
  1282 		NSmlDmCmdArgHandler::PacketResultsL ( writeStream, someResults );
  1283 		CleanupStack::PopAndDestroy();  // someResults
  1283 		CleanupStack::PopAndDestroy();  // someResults
  1284 		RemoveResultCallbacksL ( okToWrite );
  1284 		RemoveResultCallbacksL ( okToWrite );
  1285 		}
  1285 		}
  1290 			User::Leave ( KErrGeneral );			
  1290 			User::Leave ( KErrGeneral );			
  1291 			}
  1291 			}
  1292 		
  1292 		
  1293 		RPointerArray<CNSmlDmResultElement> result;
  1293 		RPointerArray<CNSmlDmResultElement> result;
  1294 		CleanupClosePushL ( result );
  1294 		CleanupClosePushL ( result );
  1295 		result.Append ( iResultList[0] );			
  1295 		result.AppendL ( iResultList[0] );			
  1296 		NSmlDmCmdArgHandler::PacketResultsL ( writeStream, result );
  1296 		NSmlDmCmdArgHandler::PacketResultsL ( writeStream, result );
  1297 
  1297 
  1298 		largeTotSize = iResultReadStream->Source()->SizeL();
  1298 		largeTotSize = iResultReadStream->Source()->SizeL();
  1299 		TInt leftToRead = largeTotSize - iResultOffset;
  1299 		TInt leftToRead = largeTotSize - iResultOffset;
  1300 		TInt available = RoomForLargeData ( *iResultList[0]->iMimeType );
  1300 		TInt available = RoomForLargeData ( *iResultList[0]->iMimeType );
  1333 		CBufBase* oldBuffer = iResultList[0]->iResult;
  1333 		CBufBase* oldBuffer = iResultList[0]->iResult;
  1334 		iResultList[0]->iResult = newBuffer;
  1334 		iResultList[0]->iResult = newBuffer;
  1335 				
  1335 				
  1336 		RPointerArray<CNSmlDmResultElement> truncResult;
  1336 		RPointerArray<CNSmlDmResultElement> truncResult;
  1337 		CleanupClosePushL ( truncResult );
  1337 		CleanupClosePushL ( truncResult );
  1338 		truncResult.Append ( iResultList[0] );			
  1338 		truncResult.AppendL ( iResultList[0] );			
  1339 		NSmlDmCmdArgHandler::PacketResultsL ( writeStream, truncResult );
  1339 		NSmlDmCmdArgHandler::PacketResultsL ( writeStream, truncResult );
  1340 		
  1340 		
  1341 		CleanupStack::PopAndDestroy(2);  // truncResult, newBuffer
  1341 		CleanupStack::PopAndDestroy(2);  // truncResult, newBuffer
  1342 		oldBuffer->Delete ( 0, available );
  1342 		oldBuffer->Delete ( 0, available );
  1343 		iResultList[0]->iResult = oldBuffer;
  1343 		iResultList[0]->iResult = oldBuffer;