Removable Media Support

Overview

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.

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.

This error can also happen when trying to access file attachments on removed media.

When this error occurs, the user should close the [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]]CCalSession and re-open it once the media has been replaced. The Calendar indexes must then be restored ('rolled back') to their previous state.

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 [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]]RFs::NotifyChange() API.

Use cases

If media is removed during an operation a KErrNotReady again occurs, and in the following cases a rollback is effected:

Function What has happened if it leaves with KErrNotReady Does a rollback occur?

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]] CCalSession::CreateCalFileL(const TDesC& aFileName)

File not created

N/A

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]] CCalSession::OpenL(const TDesC& aFileName)

File not created

N/A

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]]CCalSession::DeleteCalFileL(const TDesC& aFileName)

File not created

N/A

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]]CCalEntryView::StoreL(const RPointerArray <CCalEntry>& aCalEntryList, TInt& aNumSuccessfulEntry)

aNumSuccessfulEntry entries were successfully added before the leave.

Last store rolled back in RAM after disk write fails.

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]]CCalEntryView::UpdateL(const RPointerArray <CCalEntry>& aCalEntryList, TInt& aNumSuccessfulEntry)

aNumSuccessfulEntry entries were successfully added before the leave.

Last store rolled back in RAM after disk write fails.

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]] CCalEntryView::DeleteL(const CDesC8Array& aUidList)

Some of the UIDs were not deleted (how many is unknown).

Last UID delete rolled back in RAM.

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]] CCalEntryView::DeleteL(const CCalEntry& aCalEntry)

Nothing deleted

Deleted entries in RAM are rolled back.

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]]CCalInstanceView::DeleteL(CCalInstance* aInstance, CalCommon::TRecurrenceRange aWhichInstances)

Nothing deleted

Deleted entries in RAM are rolled back.

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]]CCalCategoryManager::AddCategoryL(const CCalCategory& aCategory)

Category not added to file

No rollback in RAM.

[[[ERROR: [NOKX000E] Unable to find definition for key reference 'CCalSession']]]CCalCategoryManager::DeleteCategoryL(const CCalCategory& aCategory, MCalProgressCallBack& aProgressCallBack)

Category not added to file

No rollback in RAM.