Deleting the Specified Per-Bearer-Type Download Rules

This tutorial explains how to delete the specified per-bearer-type download rules of an IMAP account.

Procedure

  1. Create an instance of the CEmailAccounts class.

  2. Obtain the account ID using the TImapAccount class for the IMAP account to be updated.

  3. Create an instance of the CImapSyncDownloadRules class.

  4. Populate the download rules from the central repository (CenRep) using the CEmailAccounts::LoadImapSyncDownloadRules() function, and by passing the IMAP account ID.

  5. Call the CImapSyncDownloadRules::DeleteBearerTypesL() function specifying Inbox or other folders, and the bearer type for which download rules are to be deleted.

  6. Save the download rules to CenRep using the CEmailAccounts::SaveImapSyncDownloadRulesL() function, passing the IMAP account ID and the newly created rules.