Symbian3/SDK/Source/GUID-1B363B7B-35E9-5CD9-BC44-A19D94DA1D21.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-1B363B7B-35E9-5CD9-BC44-A19D94DA1D21" xml:lang="en"><title>Removing
attachments from messages</title><shortdesc>The messaging framework allows you to remove attachments from messages. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context id="GUID-E21AD703-A9AA-5153-B0EE-D068D6295257"><p>Attachments to
a message may be removed. </p> </context>
<steps id="GUID-F9F2F6BC-DC86-5931-BA0F-9E20212640ED">
<step id="GUID-38716981-EE99-52C2-9522-082D188776C9"><cmd>Get the details
of the message to which you want to add an attachment using <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita#GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49/GUID-1864B96D-CB22-3EE1-8E73-023F12C68CB0"><apiname>CMsvEntry::EditStoreL()</apiname></xref>. </cmd>
<info>This function returns <xref href="GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE.dita"><apiname>CMsvStore</apiname></xref> in writable mode. </info>
</step>
<step id="GUID-98B33831-888B-5354-80B6-9628C32F05C8"><cmd>Get an <xref href="GUID-4E2B0CEA-1EDA-3452-895D-3CE1B59FD8FD.dita"><apiname>MMsvAttachmentManager</apiname></xref> attachment
manager for the message entry, using <xref href="GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE.dita#GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE/GUID-73CE27F3-855B-3F87-AE11-4B4F2B8F8825"><apiname>CMsvStore::AttachmentManagerL()</apiname></xref>. </cmd>
</step>
<step id="GUID-DCE18F1F-1314-581E-A6A9-06EFF8FF102D"><cmd/>
<info>Remove an attachment using the <xref href="GUID-4E2B0CEA-1EDA-3452-895D-3CE1B59FD8FD.dita#GUID-4E2B0CEA-1EDA-3452-895D-3CE1B59FD8FD/GUID-3BD2E3BF-AD83-3BFA-9C8D-D823F4F9D71E"><apiname>MMsvAttachmentManager::RemoveAttachmentL()</apiname></xref> function. </info>
<stepxmp><codeblock id="GUID-A70E9B23-6962-5347-8C4A-D79E7CD514E6" xml:space="preserve">void CFoo::RemoveAttachL(TInt aNum)
    {
    ...
    
    TRequestStatus status;
    
    // Remove attachment with index aNum
    attManager.RemoveAttachmentL(aNum, status);
    
    // Wait for request to complete
    User::WaitForRequest(status);
    
    ...
    }</codeblock> </stepxmp>
</step>
</steps>
</taskbody><related-links>
<link href="GUID-1963A487-D6A7-4225-8D0C-EC5FAB746854.dita"><linktext>Attachment
Tutorial</linktext></link>
<link href="GUID-54AB166A-8B24-5065-92AD-5FC1BF3ED89C.dita"><linktext>Messaging
Framework Overview</linktext></link>
</related-links></task>