messagingfw/msgsrvnstore/server/src/CMsvAttachmentManager.cpp
branchRCL_3
changeset 23 d51193d814ea
parent 22 d2c4c66342f3
equal deleted inserted replaced
22:d2c4c66342f3 23:d51193d814ea
   434 		iStoreManager.OpenAttachmentL(iEntryId, attachment->FilePath(), attachmentFile);
   434 		iStoreManager.OpenAttachmentL(iEntryId, attachment->FilePath(), attachmentFile);
   435 		}
   435 		}
   436 	else // attachment->iType == ELinkedFile
   436 	else // attachment->iType == ELinkedFile
   437 		{
   437 		{
   438 		RFs fs;
   438 		RFs fs;
   439 		User::LeaveIfError(fs.Connect());
   439 		fs.Connect();
   440 		User::LeaveIfError(fs.ShareProtected());  		
   440 		fs.ShareProtected();
   441 		User::LeaveIfError(attachmentFile.Open(fs, attachment->FilePath(), EFileRead | EFileShareReadersOnly));
   441 		User::LeaveIfError(attachmentFile.Open(fs, attachment->FilePath(), EFileRead | EFileShareReadersOnly));
   442 		}
   442 		}
   443 	
   443 	
   444 	// handle to attachment file allocated, return to caller
   444 	// handle to attachment file allocated, return to caller
   445 	return attachmentFile;
   445 	return attachmentFile;
   468 		iStoreManager.OpenAttachmentForWriteL(iEntryId, attachment->FilePath(), attachmentFile);
   468 		iStoreManager.OpenAttachmentForWriteL(iEntryId, attachment->FilePath(), attachmentFile);
   469 		}
   469 		}
   470 	else // attachment->iType == ELinkedFile
   470 	else // attachment->iType == ELinkedFile
   471 		{
   471 		{
   472 		RFs fs;
   472 		RFs fs;
   473 		User::LeaveIfError(fs.Connect());
   473 		fs.Connect();
   474 		User::LeaveIfError(fs.ShareProtected());
   474 		fs.ShareProtected();
   475 		User::LeaveIfError(attachmentFile.Open(fs, attachment->FilePath(), EFileWrite));
   475 		User::LeaveIfError(attachmentFile.Open(fs, attachment->FilePath(), EFileWrite));
   476 		}
   476 		}
   477 	
   477 	
   478 	// handle to attachment file allocated, return to caller
   478 	// handle to attachment file allocated, return to caller
   479 	return attachmentFile;
   479 	return attachmentFile;