CImAttachmentManager Class Reference

class CImAttachmentManager : public CActive

Handles attachments for CIMEmailMessage

Inherits from

Public Member Functions
~CImAttachmentManager()
voidAddAttachmentL(const TDesC &, CMsvAttachment *, TRequestStatus &)
voidAddAttachmentL(RFile &, CMsvAttachment *, TRequestStatus &)
voidAddEntryAsAttachmentL(TMsvId, CMsvAttachment *, TRequestStatus &)
voidAddLinkedAttachmentL(const TDesC &, CMsvAttachment *, TRequestStatus &)
voidAppendAttachmentArrayL(TMsvId)
TInt AttachmentCount()
RPointerArray< CMsvAttachment > &AttachmentInfoSelection()
voidCancelRequest()
voidCreateAttachmentL(const TDesC &, RFile &, CMsvAttachment *, TRequestStatus &)
voidDeleteAttachmentInArrayL(TMsvId)
voidDoCancel()
RFile GetAttachmentFileForWriteL(TInt)
RFile GetAttachmentFileForWriteL(TMsvAttachmentId)
RFile GetAttachmentFileL(TInt)
RFile GetAttachmentFileL(TMsvAttachmentId)
CMsvAttachment *GetAttachmentInfoL(TInt)
CMsvAttachment *GetAttachmentInfoL(TMsvAttachmentId)
voidLoadL()
voidModifyAttachmentInfoL(CMsvAttachment *, TRequestStatus &)
CImAttachmentManager *NewL(CImEmailMessage &, CMsvEntry &)
voidRemoveAttachmentL(TInt, TRequestStatus &)
voidRemoveAttachmentL(TMsvAttachmentId, TRequestStatus &)
voidRenameAttachmentL(TInt, const TDesC &, TRequestStatus &)
TInt RunError(TInt)
voidRunL()
TInt UniqueAttachmentId()
Private Member Functions
CImAttachmentManager(CImEmailMessage &, CMsvEntry &)
TInt AttachmentIndexInMessage(CMsvAttachment &)
TInt AttachmentIndexInMessage(TMsvAttachmentId)
voidChangeEntryDetailsL()
voidConstructL()
voidModifyAttachmentInfoL()
voidUpdateModifiedAttachmentInListL()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumTImAttachmentManagerStates { EModifyAttachmentInfo = 0, EChangeEntryDetails }
Inherited Enumerations
CActive:TPriority
Private Attributes
RPointerArray< CMsvAttachment >iAttachmentInfoList
TInt iAttachmentManagerState
CMsvEntry &iClientEntry
CImEmailMessage &iEmailMessage
CMsvEntry *iEntry
CMsvOperation *iMsvOperation
TRequestStatus *iReportStatus
CMsvStore *iStore
TInt iUniqueId
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CImAttachmentManager(CImEmailMessage &, CMsvEntry &)

CImAttachmentManager(CImEmailMessage &aEmailMessage,
CMsvEntry &aEntry
)[private]

Parameters

CImEmailMessage & aEmailMessage
CMsvEntry & aEntry

~CImAttachmentManager()

~CImAttachmentManager()

Member Functions Documentation

AddAttachmentL(const TDesC &, CMsvAttachment *, TRequestStatus &)

voidAddAttachmentL(const TDesC &aFilePath,
CMsvAttachment *aAttachmentInfo,
TRequestStatus &aStatus
)[virtual]

Parameters

const TDesC & aFilePath
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AddAttachmentL(RFile &, CMsvAttachment *, TRequestStatus &)

voidAddAttachmentL(RFile &aFileHandle,
CMsvAttachment *aAttachmentInfo,
TRequestStatus &aStatus
)[virtual]

Parameters

RFile & aFileHandle
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AddEntryAsAttachmentL(TMsvId, CMsvAttachment *, TRequestStatus &)

voidAddEntryAsAttachmentL(TMsvIdaEntryId,
CMsvAttachment *aAttachmentInfo,
TRequestStatus &aStatus
)[virtual]

Parameters

TMsvId aEntryId
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AddLinkedAttachmentL(const TDesC &, CMsvAttachment *, TRequestStatus &)

voidAddLinkedAttachmentL(const TDesC &aFilePath,
CMsvAttachment *aAttachmentInfo,
TRequestStatus &aStatus
)[virtual]

Parameters

const TDesC & aFilePath
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AppendAttachmentArrayL(TMsvId)

voidAppendAttachmentArrayL(TMsvIdaAttachmentId)

Parameters

TMsvId aAttachmentId

AttachmentCount()

TInt AttachmentCount()const [virtual]

AttachmentIndexInMessage(CMsvAttachment &)

TInt AttachmentIndexInMessage(CMsvAttachment &aAttachmentInfo)[private]

Parameters

CMsvAttachment & aAttachmentInfo

AttachmentIndexInMessage(TMsvAttachmentId)

TInt AttachmentIndexInMessage(TMsvAttachmentIdaId)[private]

Parameters

TMsvAttachmentId aId

AttachmentInfoSelection()

RPointerArray< CMsvAttachment > &AttachmentInfoSelection()

CancelRequest()

voidCancelRequest()[virtual]

ChangeEntryDetailsL()

voidChangeEntryDetailsL()[private]

ConstructL()

voidConstructL()[private]

CreateAttachmentL(const TDesC &, RFile &, CMsvAttachment *, TRequestStatus &)

voidCreateAttachmentL(const TDesC &aFileName,
RFile &aAttachmentFile,
CMsvAttachment *aAttachmentInfo,
TRequestStatus &aStatus
)[virtual]

Parameters

const TDesC & aFileName
RFile & aAttachmentFile
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

DeleteAttachmentInArrayL(TMsvId)

voidDeleteAttachmentInArrayL(TMsvIdaDeletedAttachmentId)

Parameters

TMsvId aDeletedAttachmentId

DoCancel()

voidDoCancel()[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().

CActive::Cancel

GetAttachmentFileForWriteL(TInt)

RFile GetAttachmentFileForWriteL(TIntaIndex)[virtual]

Parameters

TInt aIndex

GetAttachmentFileForWriteL(TMsvAttachmentId)

RFile GetAttachmentFileForWriteL(TMsvAttachmentIdaId)[virtual]

Parameters

TMsvAttachmentId aId

GetAttachmentFileL(TInt)

RFile GetAttachmentFileL(TIntaIndex)[virtual]

Parameters

TInt aIndex

GetAttachmentFileL(TMsvAttachmentId)

RFile GetAttachmentFileL(TMsvAttachmentIdaId)[virtual]

Parameters

TMsvAttachmentId aId

GetAttachmentInfoL(TInt)

CMsvAttachment *GetAttachmentInfoL(TIntaIndex)[virtual]

Parameters

TInt aIndex

GetAttachmentInfoL(TMsvAttachmentId)

CMsvAttachment *GetAttachmentInfoL(TMsvAttachmentIdaId)[virtual]

Parameters

TMsvAttachmentId aId

LoadL()

voidLoadL()

ModifyAttachmentInfoL(CMsvAttachment *, TRequestStatus &)

voidModifyAttachmentInfoL(CMsvAttachment *aAttachmentInfo,
TRequestStatus &aStatus
)[virtual]

Parameters

CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

ModifyAttachmentInfoL()

voidModifyAttachmentInfoL()[private]

NewL(CImEmailMessage &, CMsvEntry &)

CImAttachmentManager *NewL(CImEmailMessage &aEmailMessage,
CMsvEntry &aEntry
)[static]

Parameters

CImEmailMessage & aEmailMessage
CMsvEntry & aEntry

RemoveAttachmentL(TInt, TRequestStatus &)

voidRemoveAttachmentL(TIntaIndex,
TRequestStatus &aStatus
)[virtual]

Parameters

TInt aIndex
TRequestStatus & aStatus

RemoveAttachmentL(TMsvAttachmentId, TRequestStatus &)

voidRemoveAttachmentL(TMsvAttachmentIdaId,
TRequestStatus &aStatus
)[virtual]

Parameters

TMsvAttachmentId aId
TRequestStatus & aStatus

RenameAttachmentL(TInt, const TDesC &, TRequestStatus &)

voidRenameAttachmentL(TIntaIndex,
const TDesC &aNewName,
TRequestStatus &aStatus
)[virtual]

This API not supported. Leaves with KErrNotSupported.

Parameters

TInt aIndex
const TDesC & aNewName
TRequestStatus & aStatus

RunError(TInt)

TInt RunError(TIntaError)[virtual]

Parameters

TInt aError

RunL()

voidRunL()[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

UniqueAttachmentId()

TInt UniqueAttachmentId()

UpdateModifiedAttachmentInListL()

voidUpdateModifiedAttachmentInListL()[private]

Member Enumerations Documentation

Enum TImAttachmentManagerStates

Enumerators

EModifyAttachmentInfo = 0
EChangeEntryDetails

Member Data Documentation

RPointerArray< CMsvAttachment > iAttachmentInfoList

RPointerArray< CMsvAttachment >iAttachmentInfoList[private]

TInt iAttachmentManagerState

TInt iAttachmentManagerState[private]

CMsvEntry & iClientEntry

CMsvEntry &iClientEntry[private]

CImEmailMessage & iEmailMessage

CImEmailMessage &iEmailMessage[private]

CMsvEntry * iEntry

CMsvEntry *iEntry[private]

CMsvOperation * iMsvOperation

CMsvOperation *iMsvOperation[private]

TRequestStatus * iReportStatus

TRequestStatus *iReportStatus[private]

CMsvStore * iStore

CMsvStore *iStore[private]

TInt iUniqueId

TInt iUniqueId[private]