class CFSMailBox : public CFSMailBoxBase |
mailbox data handling
FSFWCommonLib
Private Member Functions | |
---|---|
CFSMailBox() | |
void | AddAndRemoveExcessMruL(CDesCArraySeg &, CFSMailAddress &) |
void | AppendMruItemL(CDesCArraySeg &, CFSMailAddress &) |
void | ConstructL(TFSMailMsgId) |
CDesCArraySeg * | CopyArrayL(MDesCArray &) |
TInt | FindAddressFromMruList(CDesCArraySeg &, TDesC &, TInt &) |
void | SetAsMostRecentMruL(CDesCArraySeg &, TInt, CFSMailAddress &) |
void | UpdateMruListL(CDesCArraySeg &, const RPointerArray< CFSMailAddress > &) |
void | UpdateMrusL(const RPointerArray< CFSMailAddress > &, const RPointerArray< CFSMailAddress > &, const RPointerArray< CFSMailAddress > &) |
Private Attributes | |
---|---|
RPointerArray< CFSMailFolder > | iFolders |
CFSMailRequestHandler * | iRequestHandler |
Inherited Attributes | |
---|---|
CExtendableEmail::iExtensions | |
CFSMailBoxBase::iMailBoxId |
void | AddAndRemoveExcessMruL | ( | CDesCArraySeg & | aMruList, |
CFSMailAddress & | aToBeAdded | |||
) | const [private] |
Removes the oldest entry from the mru list and adds given address info to the mru list.
CDesCArraySeg & aMruList | Mru list. |
CFSMailAddress & aToBeAdded | Address info to be added into the mru list. |
IMPORT_C void | AddObserver | ( | const TFSMailMsgId | aFolderId, |
MFSMailEventObserver & | aObserver | |||
) |
DEPRECATED
const TFSMailMsgId aFolderId | |
MFSMailEventObserver & aObserver | observer |
void | AppendMruItemL | ( | CDesCArraySeg & | aMruList, |
CFSMailAddress & | aToBeAppended | |||
) | const [private] |
Function to append mru entry to the mru list. This implementation adds display name and then the address in this order into the mru list.
CDesCArraySeg & aMruList | Mru list. |
CFSMailAddress & aToBeAppended |
IMPORT_C void | CancelSearch | ( | ) |
Cancels current search. Does nothing if there is not any search ongoing. The search client will not be called back after this function is called.
note CancelSearch() method does NOT clear the search result cached in the store. A different sort order can be used for the same search string, and the cache will be utilized. Only by using a different search string can the cache be cleaned.
IMPORT_C void | CancelSyncL | ( | ) |
cancels all ongoing synchronizations in this mailbox regardless of initiator, by user or by plugin itself
IMPORT_C void | ClearSearchResultCache | ( | ) |
Inform the store to clean up its cache for search results.
This method cancels the the ongoing search (if exists), and then clean ups store's cache.
This function should be called by the UI when search results are no longer in display.
void | ConstructL | ( | TFSMailMsgId | aMailBoxId | ) | [private] |
Two-phased constructor
TFSMailMsgId aMailBoxId |
CDesCArraySeg * | CopyArrayL | ( | MDesCArray & | aArrayToBeCopied | ) | const [private] |
Function used to copy array contents to another array.
MDesCArray & aArrayToBeCopied | Array that should be copied. |
IMPORT_C void | CopyMessagesL | ( | const RArray< TFSMailMsgId > & | aMessageIds, |
RArray< TFSMailMsgId > & | aCopiedMessages, | |||
const TFSMailMsgId | aSourceFolderId, | |||
const TFSMailMsgId | aDestinationFolderId | |||
) |
Copies a messages from one folder to another folder. including the properties, content, and all attachments. (note only works if the store is in an authenticated state, otherwise this function leaves with KErrNotReady)
const RArray< TFSMailMsgId > & aMessageIds | ids of the messages to be copied |
RArray< TFSMailMsgId > & aCopiedMessages | table containing (new) ids of the copied messages owned by user |
const TFSMailMsgId aSourceFolderId | source folder id |
const TFSMailMsgId aDestinationFolderId | destination folder id |
IMPORT_C CFSMailMessage * | CreateForwardMessage | ( | const TFSMailMsgId | aOriginalMessageId, |
const TDesC & | aHeaderDescriptor = KNullDesC | |||
) |
creates into this mailbox new draft email to be forwarded
const TFSMailMsgId aOriginalMessageId | message id of the original message to be forwarded |
const TDesC & aHeaderDescriptor = KNullDesC | user can give quote headers data to plugin as parameter if needed |
IMPORT_C CFSMailMessage * | CreateMessageFromFileL | ( | const RFile & | aFile | ) |
creates email from RFC822 format data stream located in given attachment file
return new email object, ownership is transferred to user
const RFile & aFile | access to file containing data stream contents given by user |
IMPORT_C CFSMailMessage * | CreateMessageToSend | ( | ) |
creates into this mailbox new draft email
IMPORT_C CFSMailMessage * | CreateReplyMessage | ( | const TFSMailMsgId | aOriginalMessageId, |
const TBool | aReplyToAll, | |||
const TDesC & | aHeaderDescriptor = KNullDesC | |||
) |
creates into this mailbox new email for reply
const TFSMailMsgId aOriginalMessageId | id of the original message to be replied |
const TBool aReplyToAll | is set true if reply to all is requested |
const TDesC & aHeaderDescriptor = KNullDesC | user can give quote headers data to plugin as parameter if needed |
IMPORT_C TSSMailSyncState | CurrentSyncState | ( | ) | const |
Returns the current synchronizing state of this mailbox.
IMPORT_C CEmailExtension * | ExtensionL | ( | const TUid & | aInterfaceUid | ) | [virtual] |
Returns extension by uid, leaves KErrNotSupported if extension is not available.
const TUid & aInterfaceUid | extension interface uid |
TInt | FindAddressFromMruList | ( | CDesCArraySeg & | aMruList, |
TDesC & | searchedAddress, | |||
TInt & | aPos | |||
) | const [private] |
Function used to search an address from given mru list. Fucntion goes through the addresses in the mru list and returns the first one matching the given address.
CDesCArraySeg & aMruList | Mru list that is searched through. |
TDesC & searchedAddress | Address that is searched from the given mru list. |
TInt & aPos | Reference parameter used to return the position of a matching address if such was found. |
IMPORT_C TDesC & | GetBrandingIdL | ( | ) |
Branding id accessor for this mailbox. This function is used by Branding Manager to associate mailbox to a branding definition.
IMPORT_C TInt | GetConnectionId | ( | TUint32 & | aConnectionId | ) |
reads connection id from plugin
TUint32 & aConnectionId | reference to connection id |
IMPORT_C TFSProgress | GetLastSyncStatusL | ( | ) |
Returns last synchronizing operation progress status.
IMPORT_C TFSMailMsgId | GetStandardFolderId | ( | const TFSFolderType | aFolderType | ) |
Standard folder id accessor.
const TFSFolderType aFolderType | defines folder type |
IMPORT_C void | GoOfflineL | ( | ) |
Disables mailbox synchronization. Connection to server in order to synchronize the mailbox is not allowed after this.
If GoOnlineL has effect on other mailboxes using the same connection then this function has effect on those mailboxes also.
IMPORT_C void | GoOnlineL | ( | ) |
Enables synchronization of the mailbox. This means that the framework can connect to server to do synchronization of the mailbox when necessary or stay connected all the time. The actual functionality depends on user settings and connection implementation.
All collections (mail etc.) supported by the connection and enabled by user settings are synchronized.
This function sets the mailbox online but it may have a side effect that also other mailboxes provided through the same connection are set online too.
Connection is set offline normally by using specific function for this purpose. There are also other reasons for ending up in offline state like network error or scheduling.
IMPORT_C TBool | HasCapability | ( | const TFSMailBoxCapabilities | aCapability | ) | const |
mailbox capability check for user
const TFSMailBoxCapabilities aCapability |
IMPORT_C TInt | IsConnectionAllowedWhenRoaming | ( | TBool & | aConnectionAllowed | ) |
checks from plugin if connection is allowed when roaming
TBool & aConnectionAllowed |
IMPORT_C void | ListFolders | ( | const TFSMailMsgId | aFolderId, |
RPointerArray< CFSMailFolder > & | aFolderList | |||
) |
List subfolders of given folder. Only direct subfolders of given folder are returned.
folder id
folder name
folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
message count
unread message count
mailbox id
parent folder
subfolder count
const TFSMailMsgId aFolderId | defines parent folder id. TFSMailId::NullId() for root level list. |
RPointerArray< CFSMailFolder > & aFolderList | plugin writes results in this array owned by user |
IMPORT_C RPointerArray< CFSMailFolder > & | ListFolders | ( | ) |
List all subfolders of mailbox.
folder id
folder name
folder type ; Inbox, Outbox, Sent Items, Drafts, Deleted Items, Other
message count
unread message count
mailbox id
parent folder
subfolder count
IMPORT_C MDesCArray * | ListMrusL | ( | ) | const |
Get a list of most recently used addresses of this mailbox. Each MRU entry consists of two descriptors placed sequentially in the array. First one is the display name and the second one is the actual email address. If for example some entry does not contain a name at all then a KNullDesC is found in place of the name.
IMPORT_C void | MoveMessagesL | ( | const RArray< TFSMailMsgId > & | aMessageIds, |
const TFSMailMsgId | aSourceFolderId, | |||
const TFSMailMsgId | aDestinationFolderId | |||
) |
Moves a messages between folders.
const RArray< TFSMailMsgId > & aMessageIds | ids of the messages to be transferred |
const TFSMailMsgId aSourceFolderId | source folder id |
const TFSMailMsgId aDestinationFolderId | destination folder id |
IMPORT_C TInt | MoveMessagesL | ( | MFSMailRequestObserver & | aOperationObserver, |
const RArray< TFSMailMsgId > & | aMessageIds, | |||
const TFSMailMsgId | aSourceFolderId, | |||
const TFSMailMsgId | aDestinationFolderId | |||
) |
Moves a messages between folders. Async version.
MFSMailRequestObserver & aOperationObserver | |
const RArray< TFSMailMsgId > & aMessageIds | ids of the messages to be transferred |
const TFSMailMsgId aSourceFolderId | source folder id |
const TFSMailMsgId aDestinationFolderId | destination folder id |
IMPORT_C CFSMailBox * | NewL | ( | TFSMailMsgId | aMailBoxId | ) | [static] |
two based constructor
TFSMailMsgId aMailBoxId | mailbox id in plugin containing mailbox |
IMPORT_C CFSMailBox * | NewLC | ( | TFSMailMsgId | aMailBoxId | ) | [static] |
two based constructor
TFSMailMsgId aMailBoxId | mailbox id in plugin containing mailbox |
IMPORT_C TInt | RefreshNowL | ( | MFSMailRequestObserver & | aOperationObserver | ) |
Forces synchronization of mailbox. This can be called whether the mailbox is currently offline or online. In the case the mailbox is offline in the beginning, connection is made up for the time of the synchronization.
All collections (mail etc.) supported by the connection and enabled by user settings are synchronized.
This is an asynchronous operation and the request id is returned for cancelling purpose.
User can provide an observer as a parameter, which will pass progress notifications during the operation as callbacks related to this operation.
Alternatively user can use overloaded parallel implementation of function without an observer function and rely only on general events. Notice that the general event system is not as comprehensive as the observing using dedicated observer.
MFSMailRequestObserver & aOperationObserver | optional observer given by user |
IMPORT_C void | ReleaseExtension | ( | CEmailExtension * | aExtension | ) | [virtual] |
CEmailExtension * aExtension |
IMPORT_C void | RemoveDownLoadedAttachmentsL | ( | ) |
removes downloaded attachments from local/terminal memory
IMPORT_C void | SearchL | ( | const RPointerArray< TDesC > & | aSearchStrings, |
const TFSMailSortCriteria & | aSortCriteria, | |||
MFSMailBoxSearchObserver & | aSearchObserver | |||
) |
Asyncronous call for starting search for given string. Only one search can be performed at a time.
This function will search for message's containing the given search string. The search will be performed on the all message fields: To, Cc, Bcc, subject, body. The search client will be notified of each found message, and upon completion of the search. Only one search can be performed at a time.
To change the sort order in the search result, use the same search string in the but change the aSortCriteria parameter. The store "caches" the search results generated by the same search string.
The function will leave with KErrInUse if a search is already in progress.
note only works if the store is in an authenticated state, otherwise this function leaves with KErrNotReady
const RPointerArray< TDesC > & aSearchStrings | text strings that will be searched from different message fields. |
const TFSMailSortCriteria & aSortCriteria | sort criteria for the results |
MFSMailBoxSearchObserver & aSearchObserver |
IMPORT_C void | SearchL | ( | const RPointerArray< TDesC > & | aSearchStrings, |
const TFSMailSortCriteria & | aSortCriteria, | |||
MFSMailBoxSearchObserver & | aSearchObserver, | |||
RArray< TFSMailMsgId > | aFolderIds | |||
) |
const RPointerArray< TDesC > & aSearchStrings | |
const TFSMailSortCriteria & aSortCriteria | |
MFSMailBoxSearchObserver & aSearchObserver | |
RArray< TFSMailMsgId > aFolderIds |
IMPORT_C void | SendMessageL | ( | CFSMailMessage & | aMessage | ) |
sends email
CFSMailMessage & aMessage | message to be sent |
void | SetAsMostRecentMruL | ( | CDesCArraySeg & | aMruList, |
TInt | aPosition, | |||
CFSMailAddress & | aMostRecent | |||
) | const [private] |
Function to set the already existing entry in the mru list as the most recent one.
CDesCArraySeg & aMruList | Mru list that should be edited. |
TInt aPosition | Position where from the address element of the most recent address is found. The display name of the address is found with index one less from the mru list. |
CFSMailAddress & aMostRecent | After removal of the mru entry with given index, this entry is added into the mru list as the most recently used one. |
IMPORT_C void | SetCredentialsL | ( | const TDesC & | aUsername, |
const TDesC & | aPassword | |||
) |
mailbox authentication data mutator
void | UpdateMruListL | ( | CDesCArraySeg & | aMruList, |
const RPointerArray< CFSMailAddress > & | aNewRecentlyUsedOnes | |||
) | const [private] |
Function used to update given mru list with recently used address info. If this info is already found from the mru list then it is moved to the end of the mru list. This way the most recent ones are found from the end of the list.
CDesCArraySeg & aMruList | Mru list that should be updated. |
const RPointerArray< CFSMailAddress > & aNewRecentlyUsedOnes | Addresses that should be used to update the given mru list. |
void | UpdateMrusL | ( | const RPointerArray< CFSMailAddress > & | aRecipients, |
const RPointerArray< CFSMailAddress > & | aCCRecipients, | |||
const RPointerArray< CFSMailAddress > & | aBCCRecipients | |||
) | const [private] |
Function used internally to inform that Mru list related to this mailbox should now be updated using the given recipient info. In other words this function makes sure that the given recipients are found from the mru list in which the mrus of this mailbox are stored. Mrus are stored in the plugin.
const RPointerArray< CFSMailAddress > & aRecipients | email recipients in TO-field |
const RPointerArray< CFSMailAddress > & aCCRecipients | email recipients in CC-field |
const RPointerArray< CFSMailAddress > & aBCCRecipients | email recipients in BCC-field |
RPointerArray< CFSMailFolder > | iFolders | [private] |
mailbox folder list
CFSMailRequestHandler * | iRequestHandler | [private] |
request handler for plugin requests
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.