<?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 concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-DA0F4990-DDC4-5B0A-A446-A3C8672DA95A"><title>Removable Media Support</title><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Overview</title> <p>External drives can already be used to store the calendar database file. This means that all clients may access, modify and create calendar files on removable media in the same way as on non-removable media. </p> <p>A calendar file can be opened on any writable drive. Note that if the file is opened on a removable drive and that drive is removed, the operation leaves with an error. </p> <p>This error can also happen when trying to access file attachments on removed media. </p> <p>When this error occurs, the user should close the <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname>CCalSession</apiname></xref> and re-open it once the media has been replaced. The Calendar indexes must then be restored ('rolled back') to their previous state. </p> <p>It is recommended that when using a calendar file on removable media, the user should watch for when the media is removed or replaced using the <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname>RFs::NotifyChange()</apiname></xref> API. </p> </section> <section><title>Use cases</title> <p>If media is removed during an operation a KErrNotReady again occurs, and in the following cases a rollback is effected: </p> <table id="GUID-F392B402-1E46-5044-8F70-03C0F822C43B"><tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/><thead><row><entry>Function</entry> <entry>What has happened if it leaves with KErrNotReady</entry> <entry>Does a rollback occur?</entry> </row> </thead> <tbody><row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname> CCalSession::CreateCalFileL(const TDesC&
aFileName)</apiname></xref> </p> </entry> <entry><p>File not created </p> </entry> <entry><p>N/A </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname> CCalSession::OpenL(const TDesC&
aFileName)</apiname></xref> </p> </entry> <entry><p>File not created </p> </entry> <entry><p>N/A </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname>CCalSession::DeleteCalFileL(const TDesC&
aFileName)</apiname></xref> </p> </entry> <entry><p>File not created </p> </entry> <entry><p>N/A </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname>CCalEntryView::StoreL(const RPointerArray
<CCalEntry>& aCalEntryList, TInt& aNumSuccessfulEntry)</apiname></xref> </p> </entry> <entry><p>aNumSuccessfulEntry entries were successfully added before the leave. </p> </entry> <entry><p>Last store rolled back in RAM after disk write fails. </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname>CCalEntryView::UpdateL(const RPointerArray
<CCalEntry>& aCalEntryList, TInt& aNumSuccessfulEntry)</apiname></xref> </p> </entry> <entry><p>aNumSuccessfulEntry entries were successfully added before the leave. </p> </entry> <entry><p>Last store rolled back in RAM after disk write fails. </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname> CCalEntryView::DeleteL(const CDesC8Array&
aUidList)</apiname></xref> </p> </entry> <entry><p>Some of the UIDs were not deleted (how many is unknown). </p> </entry> <entry><p>Last UID delete rolled back in RAM. </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname> CCalEntryView::DeleteL(const CCalEntry&
aCalEntry)</apiname></xref> </p> </entry> <entry><p>Nothing deleted </p> </entry> <entry><p>Deleted entries in RAM are rolled back. </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname>CCalInstanceView::DeleteL(CCalInstance* aInstance,
CalCommon::TRecurrenceRange aWhichInstances)</apiname></xref> </p> </entry> <entry><p>Nothing deleted </p> </entry> <entry><p>Deleted entries in RAM are rolled back. </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname>CCalCategoryManager::AddCategoryL(const
CCalCategory& aCategory)</apiname></xref> </p> </entry> <entry><p>Category not added to file </p> </entry> <entry><p>No rollback in RAM. </p> </entry> </row> <row><entry><p> <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita"><apiname>CCalCategoryManager::DeleteCategoryL(const
CCalCategory& aCategory, MCalProgressCallBack&
aProgressCallBack)</apiname></xref> </p> </entry> <entry><p>Category not added to file </p> </entry> <entry><p>No rollback in RAM. </p> </entry> </row> </tbody> </tgroup> </table> </section> </conbody></concept>