CImAttachmentManager Class Reference

class CImAttachmentManager : public CActive

Handles attachments for CIMEmailMessage

Inherits from

Public Member Functions
~CImAttachmentManager ()
void AddAttachmentL (const TDesC &, CMsvAttachment *, TRequestStatus &)
void AddAttachmentL ( RFile &, CMsvAttachment *, TRequestStatus &)
void AddEntryAsAttachmentL ( TMsvId , CMsvAttachment *, TRequestStatus &)
void AddLinkedAttachmentL (const TDesC &, CMsvAttachment *, TRequestStatus &)
void AppendAttachmentArrayL ( TMsvId )
TInt AttachmentCount ()
RPointerArray < CMsvAttachment > & AttachmentInfoSelection ()
void CancelRequest ()
void CreateAttachmentL (const TDesC &, RFile &, CMsvAttachment *, TRequestStatus &)
void DeleteAttachmentInArrayL ( TMsvId )
void DoCancel ()
RFile GetAttachmentFileForWriteL ( TInt )
RFile GetAttachmentFileForWriteL ( TMsvAttachmentId )
RFile GetAttachmentFileL ( TInt )
RFile GetAttachmentFileL ( TMsvAttachmentId )
CMsvAttachment * GetAttachmentInfoL ( TInt )
CMsvAttachment * GetAttachmentInfoL ( TMsvAttachmentId )
void LoadL ()
void ModifyAttachmentInfoL ( CMsvAttachment *, TRequestStatus &)
CImAttachmentManager * NewL ( CImEmailMessage &, CMsvEntry &)
void RemoveAttachmentL ( TInt , TRequestStatus &)
void RemoveAttachmentL ( TMsvAttachmentId , TRequestStatus &)
void RenameAttachmentL ( TInt , const TDesC &, TRequestStatus &)
TInt RunError ( TInt )
void RunL ()
TInt UniqueAttachmentId ()
Private Member Functions
CImAttachmentManager ( CImEmailMessage &, CMsvEntry &)
TInt AttachmentIndexInMessage ( CMsvAttachment &)
TInt AttachmentIndexInMessage ( TMsvAttachmentId )
void ChangeEntryDetailsL ()
void ConstructL ()
void ModifyAttachmentInfoL ()
void UpdateModifiedAttachmentInListL ()
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
enum TImAttachmentManagerStates { 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 &)

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

Parameters

const TDesC & aFilePath
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AddAttachmentL(RFile &, CMsvAttachment *, TRequestStatus &)

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

Parameters

RFile & aFileHandle
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AddEntryAsAttachmentL(TMsvId, CMsvAttachment *, TRequestStatus &)

void AddEntryAsAttachmentL ( TMsvId aEntryId,
CMsvAttachment * aAttachmentInfo,
TRequestStatus & aStatus
) [virtual]

Parameters

TMsvId aEntryId
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

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

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

Parameters

const TDesC & aFilePath
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AppendAttachmentArrayL(TMsvId)

void AppendAttachmentArrayL ( TMsvId aAttachmentId )

Parameters

TMsvId aAttachmentId

AttachmentCount()

TInt AttachmentCount ( ) const [virtual]

AttachmentIndexInMessage(CMsvAttachment &)

TInt AttachmentIndexInMessage ( CMsvAttachment & aAttachmentInfo ) [private]

Parameters

CMsvAttachment & aAttachmentInfo

AttachmentIndexInMessage(TMsvAttachmentId)

TInt AttachmentIndexInMessage ( TMsvAttachmentId aId ) [private]

Parameters

TMsvAttachmentId aId

AttachmentInfoSelection()

RPointerArray < CMsvAttachment > & AttachmentInfoSelection ( )

CancelRequest()

void CancelRequest ( ) [virtual]

ChangeEntryDetailsL()

void ChangeEntryDetailsL ( ) [private]

ConstructL()

void ConstructL ( ) [private]

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

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

Parameters

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

DeleteAttachmentInArrayL(TMsvId)

void DeleteAttachmentInArrayL ( TMsvId aDeletedAttachmentId )

Parameters

TMsvId aDeletedAttachmentId

DoCancel()

void DoCancel ( ) [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 ( TInt aIndex ) [virtual]

Parameters

TInt aIndex

GetAttachmentFileForWriteL(TMsvAttachmentId)

RFile GetAttachmentFileForWriteL ( TMsvAttachmentId aId ) [virtual]

Parameters

TMsvAttachmentId aId

GetAttachmentFileL(TInt)

RFile GetAttachmentFileL ( TInt aIndex ) [virtual]

Parameters

TInt aIndex

GetAttachmentFileL(TMsvAttachmentId)

RFile GetAttachmentFileL ( TMsvAttachmentId aId ) [virtual]

Parameters

TMsvAttachmentId aId

GetAttachmentInfoL(TInt)

CMsvAttachment * GetAttachmentInfoL ( TInt aIndex ) [virtual]

Parameters

TInt aIndex

GetAttachmentInfoL(TMsvAttachmentId)

CMsvAttachment * GetAttachmentInfoL ( TMsvAttachmentId aId ) [virtual]

Parameters

TMsvAttachmentId aId

LoadL()

void LoadL ( )

ModifyAttachmentInfoL(CMsvAttachment *, TRequestStatus &)

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

Parameters

CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

ModifyAttachmentInfoL()

void ModifyAttachmentInfoL ( ) [private]

NewL(CImEmailMessage &, CMsvEntry &)

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

Parameters

CImEmailMessage & aEmailMessage
CMsvEntry & aEntry

RemoveAttachmentL(TInt, TRequestStatus &)

void RemoveAttachmentL ( TInt aIndex,
TRequestStatus & aStatus
) [virtual]

Parameters

TInt aIndex
TRequestStatus & aStatus

RemoveAttachmentL(TMsvAttachmentId, TRequestStatus &)

void RemoveAttachmentL ( TMsvAttachmentId aId,
TRequestStatus & aStatus
) [virtual]

Parameters

TMsvAttachmentId aId
TRequestStatus & aStatus

RenameAttachmentL(TInt, const TDesC &, TRequestStatus &)

void RenameAttachmentL ( TInt aIndex,
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 ( TInt aError ) [virtual]

Parameters

TInt aError

RunL()

void RunL ( ) [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()

void UpdateModifiedAttachmentInListL ( ) [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]