class CMsvAttachmentManager : public CActive |
Provides the implementation of the Attachment API.
The attachment API interface class manages all the attachment management and uses MMsvStoreManager to provide access to the message store to manage the physical attachment files and manipulate the attachment stream in the message store.
Public Member Functions | |
---|---|
~CMsvAttachmentManager () | |
void | CreateShareProtectedAttachmentL (const TDesC &, RFile &, CMsvAttachment *) |
void | HandleCommitComplete () |
CMsvAttachmentManager * | NewL ( CMsvStore &, MMsvStoreManager &, const TMsvId , RFs &, TBool ) |
void | RestoreL () |
void | StoreL () |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Private Attributes | |
---|---|
RPointerArray < HBufC > | iAddedAttachments |
RPointerArray < CMsvAttachment > | iAttachments |
CCopyOneFile * | iCopyOneFile |
RPointerArray < HBufC > | iDeletedAttachments |
const TMsvId | iEntryId |
RFs & | iFs |
TUint | iIdGenerator |
TBool | iReadOnly |
RPointerArray < CMsvAttachmentRename > | iRenamed |
TRequestStatus * | iReportStatus |
CMsvStore & | iStore |
MMsvStoreManager & | iStoreManager |
Inherited Attributes | |
---|---|
CActive::iStatus |
CMsvAttachmentManager | ( | CMsvStore & | aStore, |
MMsvStoreManager & | aStoreManager, | ||
const TMsvId | aEntryId, | ||
RFs & | aFs, | ||
TBool | aReadOnly | ||
) | [private] |
CMsvStore & aStore | |
MMsvStoreManager & aStoreManager | |
const TMsvId aEntryId | |
RFs & aFs | |
TBool aReadOnly |
void | AddAttachmentL | ( | const TDesC & | aFilePath, |
CMsvAttachment * | aAttachmentInfo, | |||
TRequestStatus & | aStatus | |||
) | [private, virtual] |
const TDesC & aFilePath | |
CMsvAttachment * aAttachmentInfo | |
TRequestStatus & aStatus |
void | AddAttachmentL | ( | RFile & | aFileHandle, |
CMsvAttachment * | aAttachmentInfo, | |||
TRequestStatus & | aStatus | |||
) | [private, virtual] |
RFile & aFileHandle | |
CMsvAttachment * aAttachmentInfo | |
TRequestStatus & aStatus |
void | AddEntryAsAttachmentL | ( | TMsvId | aEntryId, |
CMsvAttachment * | aAttachmentInfo, | |||
TRequestStatus & | aStatus | |||
) | [private, virtual] |
TMsvId aEntryId | |
CMsvAttachment * aAttachmentInfo | |
TRequestStatus & aStatus |
void | AddLinkedAttachmentL | ( | const TDesC & | aFilePath, |
CMsvAttachment * | aAttachmentInfo, | |||
TRequestStatus & | aStatus | |||
) | [private, virtual] |
const TDesC & aFilePath | |
CMsvAttachment * aAttachmentInfo | |
TRequestStatus & aStatus |
void | CreateAttachmentInStoreLC | ( | TDes & | aFileName, |
RFile & | aFile, | |||
CMsvAttachment * | aAttachmentInfo, | |||
TBool | aIsShareProtected | |||
) | [private] |
TDes & aFileName | |
RFile & aFile | |
CMsvAttachment * aAttachmentInfo | |
TBool aIsShareProtected |
void | CreateAttachmentL | ( | const TDesC & | aFileName, |
RFile & | aAttachmentFile, | |||
CMsvAttachment * | aAttachmentInfo, | |||
TRequestStatus & | aStatus | |||
) | [private, virtual] |
const TDesC & aFileName | |
RFile & aAttachmentFile | |
CMsvAttachment * aAttachmentInfo | |
TRequestStatus & aStatus |
void | CreateAttachmentL | ( | const TDesC & | aFileName, |
RFile & | aAttachmentFile, | |||
CMsvAttachment * | aAttachmentInfo | |||
) | [private, virtual] |
const TDesC & aFileName | |
RFile & aAttachmentFile | |
CMsvAttachment * aAttachmentInfo |
void | CreateShareProtectedAttachmentL | ( | const TDesC & | aFileName, |
RFile & | aAttachmentFile, | |||
CMsvAttachment * | aAttachmentInfo | |||
) |
const TDesC & aFileName | |
RFile & aAttachmentFile | |
CMsvAttachment * aAttachmentInfo |
void | DoAttachmentRenameL | ( | TInt | aIndex, |
const TDesC & | aNewName | |||
) | [private] |
void | DoCancel | ( | ) | [private, virtual] |
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel() .
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel() must not wait for event completion; this is handled by Cancel() .
RFile | GetAttachmentFileForWriteL | ( | TInt | aIndex | ) | [private, virtual] |
TInt aIndex |
RFile | GetAttachmentFileForWriteL | ( | TMsvAttachmentId | aId | ) | [private, virtual] |
TMsvAttachmentId aId |
RFile | GetAttachmentFileL | ( | TInt | aIndex | ) | [private, virtual] |
TInt aIndex |
RFile | GetAttachmentFileL | ( | TMsvAttachmentId | aId | ) | [private, virtual] |
TMsvAttachmentId aId |
CMsvAttachment * | GetAttachmentInfoL | ( | TInt | aIndex | ) | [private, virtual] |
TInt aIndex |
CMsvAttachment * | GetAttachmentInfoL | ( | TMsvAttachmentId | aId | ) | [private, virtual] |
TMsvAttachmentId aId |
TInt | IndexPositionOfAttachmentL | ( | TMsvAttachmentId | aId | ) | const [private] |
TMsvAttachmentId aId |
void | ModifyAttachmentInfoL | ( | CMsvAttachment * | aAttachmentInfo, |
TRequestStatus & | aStatus | |||
) | [private, virtual] |
CMsvAttachment * aAttachmentInfo | |
TRequestStatus & aStatus |
void | ModifyAttachmentInfoL | ( | CMsvAttachment * | aAttachmentInfo | ) | [private, virtual] |
CMsvAttachment * aAttachmentInfo |
CMsvAttachmentManager * | NewL | ( | CMsvStore & | aStore, |
MMsvStoreManager & | aStoreManager, | |||
const TMsvId | aEntryId, | |||
RFs & | aFs, | |||
TBool | aReadOnly | |||
) | [static] |
CMsvStore & aStore | |
MMsvStoreManager & aStoreManager | |
const TMsvId aEntryId | |
RFs & aFs | |
TBool aReadOnly |
void | RemoveAttachmentL | ( | TInt | aIndex, |
TRequestStatus & | aStatus | |||
) | [private, virtual] |
TInt aIndex | |
TRequestStatus & aStatus |
void | RemoveAttachmentL | ( | TMsvAttachmentId | aId, |
TRequestStatus & | aStatus | |||
) | [private, virtual] |
TMsvAttachmentId aId | |
TRequestStatus & aStatus |
void | RemoveAttachmentL | ( | TInt | aIndex | ) | [private, virtual] |
TInt aIndex |
void | RenameAttachmentL | ( | TInt | aIndex, |
const TDesC & | aNewName, | |||
TRequestStatus & | aStatus | |||
) | [private, virtual] |
TInt aIndex | |
const TDesC & aNewName | |
TRequestStatus & aStatus |
void | RenameAttachmentL | ( | TInt | aIndex, |
const TDesC & | aNewName | |||
) | [private, virtual] |
void | RunL | ( | ) | [private, virtual] |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD
RPointerArray < HBufC > | iAddedAttachments | [private] |
An array to list the attachment files that have been copied into the store but not yet commited.
RPointerArray < CMsvAttachment > | iAttachments | [private] |
Array of attachments that are associated with the entry.
CCopyOneFile * | iCopyOneFile | [private] |
Utility for copying a single file.
RPointerArray < HBufC > | iDeletedAttachments | [private] |
An array to list the attachments that are due for deletion.
const TMsvId | iEntryId | [private] |
The current message entry that the attachment manages.
TUint | iIdGenerator | [private] |
A persisted value used to generate attachment Ids to assign to new attachments.
RPointerArray < CMsvAttachmentRename > | iRenamed | [private] |
An array to manage the renaming of attachments.
TRequestStatus * | iReportStatus | [private] |
Caller's request status to complete.
CMsvStore & | iStore | [private] |
The message store representing the current message entry.
MMsvStoreManager & | iStoreManager | [private] |
The store manager providing access to the message store.
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.