Introduction
Have you tried to sync 100 emails to your phone? Have you got important attachments and you never want to delete them? Are you getting tons of texts everyday? Soon, you might run out of available space. You might think - no worries I've got a memory card which is big enough to store all my data and I can always copy all my messages there. You'll start your messaging application and then what? You'll get disappointed because you might not find this feature there. Why not? There could be many reasons. One of them might be that the behavior is a bit different when a messaging event happens when the external memory is not available anymore.
This application does not address this problem yet, so all people planning to use it should take a word of warning and do it on their own risk.
The reason for this application was to prove that it is possible to copy message stores to the external drive using public Symbian APIs only, therefore, allowing this code to be executed on different platforms.
Since the author is overloaded with other, less funny tasks all good souls are more than welcome to make their contribution
Anyone up for a code review?
Functionality
The application is very simple. Using the 'Move to ext store' option you can copy all your messages to the external drive. After that you can choose which message store you want to use - you can switch between stores using the 'Change to ext store' and 'Change to main store' options. You can also delete the messaging store from the external drive and fall back to the main one using the 'Restore main store' option.
Features planned in the next releases:
- UI additions showing progress of operations, i.e. Progress bar showing status of an operation
- Cancel operation - at the moment once the 'copy' or 'restore' operation is executed it can not be stopped
- Synchronization of messaging stores - at the moment when you perform a 'restore' operation all messages which were saved only on the external store will be lost
- Sending messaging stores over Bluetooth (AllFiles is required)
Implementation details
This application has been implemented using UIQ3.0 SDK and only public APIs.
It performs all operation via Message Server. A channel of communication with a Message Server is established using CMsvSessionclass. In order to copy message store to the external drive properly, first CMsvOperation *CopyStoreL(const TDriveUnit &aDrive, TRequestStatus &aStatus) operation should be performed. After copying the store, message index should also be copied and appropriate settings in msgs.ini should be changed to start using the external store. All of it can be done withCMsvOperation *ChangeDriveL(TInt aDrive, TRequestStatus &aStatus)API.Unfortuantelly,WriteDeviceDatacapability is required for that. To delete message store CMsvOperation *DeleteStoreL(const TDriveUnit &aDrive, TRequestStatus &aStatus) should be used.
We did some quick code review last week and noticed some issues. A major one is a left over code from wrongly used active scheduler. All code should be cleaned up and republished soon.