messagingfw/msgsrvnstore/server/src/CMsvPlainBodyText.cpp
branchRCL_3
changeset 22 d2c4c66342f3
parent 21 e5b3a2155e1a
child 23 d51193d814ea
equal deleted inserted replaced
21:e5b3a2155e1a 22:d2c4c66342f3
     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".
   606 			// iRfileReadBuf8 will be closed when ConvertChunkToUnicodeForRestoreL returns.
   606 			// iRfileReadBuf8 will be closed when ConvertChunkToUnicodeForRestoreL returns.
   607  			numOfBytesInCurrentChunk = ConvertChunkToUnicodeForRestoreL();
   607  			numOfBytesInCurrentChunk = ConvertChunkToUnicodeForRestoreL();
   608 			}
   608 			}
   609 
   609 
   610 		// Push start position of current chunk in to the stack.
   610 		// Push start position of current chunk in to the stack.
   611 		iStartPosOfEachChunkInFile.Append(iStartPosOfNextChunk);
   611 		iStartPosOfEachChunkInFile.AppendL(iStartPosOfNextChunk);
   612 		iStartPosOfNextChunk += numOfBytesInCurrentChunk;
   612 		iStartPosOfNextChunk += numOfBytesInCurrentChunk;
   613 		iReadChunkLength = numOfBytesInCurrentChunk;
   613 		iReadChunkLength = numOfBytesInCurrentChunk;
   614 		}
   614 		}
   615 	else // KMsvPlainBodyText16
   615 	else // KMsvPlainBodyText16
   616 		{
   616 		{
   917 					iPrevChunk = EFalse;
   917 					iPrevChunk = EFalse;
   918 					}
   918 					}
   919 				else
   919 				else
   920 					{
   920 					{
   921 					// Push Start position of current chunk in to the stack.
   921 					// Push Start position of current chunk in to the stack.
   922 					iStartPosOfEachChunkInFile.Append(iStartPosOfNextChunk);
   922 					iStartPosOfEachChunkInFile.AppendL(iStartPosOfNextChunk);
   923 					iStartPosOfNextChunk += numOfBytesInCurrentChunk;
   923 					iStartPosOfNextChunk += numOfBytesInCurrentChunk;
   924 					}
   924 					}
   925 				iReadChunkLength = numOfBytesInCurrentChunk;
   925 				iReadChunkLength = numOfBytesInCurrentChunk;
   926 				Complete(iStatus.Int());
   926 				Complete(iStatus.Int());
   927 				}
   927 				}
  1118 @return void.
  1118 @return void.
  1119 */
  1119 */
  1120 void CMsvPlainBodyText::RevertL()
  1120 void CMsvPlainBodyText::RevertL()
  1121 	{
  1121 	{
  1122 	iFile.Close();
  1122 	iFile.Close();
  1123 	if(!iIsCommitted && iMsvFileStatus == EMsvFileWriting)
  1123 	if(!iIsCommitted)
  1124 		{
  1124 		{
  1125 		iMsvStoreManager.DeletePlainTextFileL(iMessageId);
  1125 		iMsvStoreManager.DeletePlainTextFileL(iMessageId);
  1126 		}
  1126 		}
  1127 	}
  1127 	}
  1128 	
  1128