class CImapSyncDownloadRules : public CBase |
Stores the download rules to be used during the IMAP synchronisation phase.
Each rule consists of a bearer types field, and a set of get mail options. The bearer types are defined by the TCommDbBearer enumeration and it is possible to specify multiple bearer types for one rule by performing a bitwise OR operation on the values from the enumeration and passing the resulting value to the various APIs. The get mail options are defined by the TImImap4GetPartialMailInfo structure.
There are two sets of download rules, one set for the inbox and one set for other folders. Generally each of the APIs takes a flag to indicate which set to operate upon.
Public Member Functions | |
---|---|
~CImapSyncDownloadRules () | |
IMPORT_C TInt | AddRuleL ( TRulesType , TInt , TUint32 , const TImImap4GetPartialMailInfo &) |
IMPORT_C CImapSyncDownloadRules * | CopyL () |
IMPORT_C CImapSyncDownloadRules * | CopyLC () |
IMPORT_C TInt | DeleteBearerTypesL ( TRulesType , TUint32 , TBool &) |
IMPORT_C TBool | DeleteRuleL ( TRulesType , TInt ) |
IMPORT_C TInt | GetMailInfoL ( TRulesType , TUint32 , TImImap4GetPartialMailInfo &) |
IMPORT_C TBool | GetRuleL ( TRulesType , TInt , TUint32 &, TImImap4GetPartialMailInfo &) |
IMPORT_C CImapSyncDownloadRules * | NewL () |
IMPORT_C CImapSyncDownloadRules * | NewLC () |
IMPORT_C void | Reset () |
Private Member Functions | |
---|---|
CImapSyncDownloadRules () | |
void | ConstructL () |
Public Member Enumerations | |
---|---|
enum | TRulesType { EInboxRulesType , EFolderRulesType } |
Private Attributes | |
---|---|
RArray < TImapSyncDownloadRules > | iRulesList |
IMPORT_C TInt | AddRuleL | ( | TRulesType | aType, |
TInt | aPos, | |||
TUint32 | aBearerTypes, | |||
const TImImap4GetPartialMailInfo & | aMailInfo | |||
) |
Adds a new synchronisation download rule.
The position for the new rule is specified in the parameter list. If the position is greater than the number of rules already in the list then the new rule is added at the end of the list. If the position is less than the number of rules already in the list, then the new rule is inserted at that position and all subsequent rules moved down by one position. The actual position where the rule was added is given by the return value.
Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.
TRulesType aType | Type of folder the rule is for (inbox or other folder) |
TInt aPos | Position in the list to add the rule. |
TUint32 aBearerTypes | Bearer types that will use the rule. |
const TImImap4GetPartialMailInfo & aMailInfo | Partial mail info options to use during synchronisation |
IMPORT_C CImapSyncDownloadRules * | CopyLC | ( | ) |
Make new copy of an instance of the class. On return the copy will be on the cleanup stack.
IMPORT_C TInt | DeleteBearerTypesL | ( | TRulesType | aType, |
TUint32 | aBearerTypes, | |||
TBool & | aRuleRemoved | |||
) |
Deletes bearer types from the synchronisation download rules.
Every rule is examined to see if the bearer types associated with that rule contain all of the passed in bearer types. If there is a match then the bearer types are removed from the rule. If this results in all the bearer types for the rule being removed then the rule is deleted and all subsequent rules are moved up one position.
Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.
TRulesType aType | Type of folder the rule is for (inbox or other folder) |
TUint32 aBearerTypes | Bearer types to remove. |
TBool & aRuleRemoved | If the bearer types are removed, this flag indicates if the removal resulted in the rule being removed as well. |
IMPORT_C TBool | DeleteRuleL | ( | TRulesType | aType, |
TInt | aPos | |||
) |
Deletes a synchronisation download rule from a given position
Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.
TRulesType aType | Type of folder the rule is for (inbox or other folder) |
TInt aPos | Position in the list to add the rule. |
IMPORT_C TInt | GetMailInfoL | ( | TRulesType | aType, |
TUint32 | aBearerTypes, | |||
TImImap4GetPartialMailInfo & | aMailInfo | |||
) | const |
Gets the partial mail info object from the synchronisation download rule for a given bearer type.
The mail info is returned only if its associated bearer types contain all the bearer types specified in the passed in value.
Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.
TRulesType aType | Type of folder the rule is for (inbox or other folder) |
TUint32 aBearerTypes | The bearer types to search for |
TImImap4GetPartialMailInfo & aMailInfo | On successful completion, this holds the mail info for the rule |
IMPORT_C TBool | GetRuleL | ( | TRulesType | aType, |
TInt | aPos, | |||
TUint32 & | aBearerTypes, | |||
TImImap4GetPartialMailInfo & | aMailInfo | |||
) | const |
Gets the synchronisation download rule at a given position.
Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.
TRulesType aType | Type of folder the rule is for (inbox or other folder) |
TInt aPos | Position of the rule in the list |
TUint32 & aBearerTypes | On successful completion, this holds the bearer types for the rule |
TImImap4GetPartialMailInfo & aMailInfo | On successful completion, this holds the mail info for the rule |
Defines the type of folder (inbox or other folder)
EInboxRulesType | |
EFolderRulesType |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.