CCalenAttachmentModel Class Reference

class CCalenAttachmentModel : public CBase

Attachment model.

Inherits from

  • CCalenAttachmentModel
Public Member Functions
~CCalenAttachmentModel()
IMPORT_C voidAddAttachmentL(const TDesC &, const TDesC &)
IMPORT_C voidAddAttachmentL(const TDesC &, const TDesC &, TInt, TBool, const TDataType &, RFile &)
IMPORT_C CCalenAttachmentInfo &AttachmentInfoAt(TInt)
IMPORT_C voidAttachmentOpen(TBool &)
IMPORT_C CGulIcon *BitmapForFileL(CCalenAttachmentInfo &)
IMPORT_C voidCheckForExistingAttachmentsL(CCalEntry *)
IMPORT_C TBoolDeleteAttachment(TInt)
IMPORT_C RFileGetAttachmentFileL(TInt)
IMPORT_C voidGetAttachmentListL(RPointerArray< CCalenAttachmentInfo > &)
IMPORT_C TBoolIsAttachmentOpen()
IMPORT_C voidLoadResourcesL()
IMPORT_C CCalenAttachmentModel *NewL()
IMPORT_C TIntNumberOfItems()
IMPORT_C voidReset()
IMPORT_C voidSetObserver(MCalenAttachmentModelObserver *)
Private Member Functions
CCalenAttachmentModel()
CGulIcon *BitmapForAppL(const TUid &)
TBool CheckFileSizeLimitL(TInt)
voidConstructL()
CCalenAttachmentInfo *CreateNewInfoL(const TDesC &, const TDesC &, TInt, TBool, const TDataType &, const CCalenAttachmentInfo::TCalenAttachmentStoreType)
TBool DoDeleteAttachmentL(TInt)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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 Attributes
RApaLsSession iAppList
RPointerArray< CCalenAttachmentInfo >iAttachInfoArray
MCalenAttachmentModelObserver *iAttachmentModelObserver
TBool iEmbeddedFileOpened
TSize iIconSize
TBool isAttachmentModelCleared

Constructor & Destructor Documentation

CCalenAttachmentModel()

CCalenAttachmentModel()[private]

Default Constructor.

~CCalenAttachmentModel()

~CCalenAttachmentModel()

Destructor.

Member Functions Documentation

AddAttachmentL(const TDesC &, const TDesC &)

IMPORT_C voidAddAttachmentL(const TDesC &aFullName,
const TDesC &aSystemFileName
)

Adds attachment to the internal array. Notifies attachment model observer with ECalenAttachmentAdded parameter.

Parameters

const TDesC & aFullNamefile name of the attachment to be added
const TDesC & aSystemFileName

AddAttachmentL(const TDesC &, const TDesC &, TInt, TBool, const TDataType &, RFile &)

IMPORT_C voidAddAttachmentL(const TDesC &aFullName,
const TDesC &aSystemFileName,
TIntaSize,
TBoolaFetched,
const TDataType &aDataType,
RFile &aFile
)

Adds attachment to the internal array. Notifies attachment model observer with ECalenAttachmentAdded parameter.

Parameters

const TDesC & aFullNamefile name of the attachment to be added
const TDesC & aSystemFileName
TInt aSizesize of the attachment file
TBool aFetchedfetched or not
const TDataType & aDataTypemime type of the attachment
RFile & aFile

AttachmentInfoAt(TInt)

IMPORT_C CCalenAttachmentInfo &AttachmentInfoAt(TIntaIndex)const

Returns reference to attachment info at given index.

Parameters

TInt aIndexindex for which attachment info is needed

AttachmentOpen(TBool &)

IMPORT_C voidAttachmentOpen(TBool &aEmbeddedFileOpened)

Set the flag to ETrue if the attachment(Photo, audio and vedio files) is open.

Parameters

TBool & aEmbeddedFileOpened

BitmapForAppL(const TUid &)

CGulIcon *BitmapForAppL(const TUid &aAppUid)[private]

Returns pointer to bitmap of given application.

Parameters

const TUid & aAppUidUID of the application for which bitmap is requested

BitmapForFileL(CCalenAttachmentInfo &)

IMPORT_C CGulIcon *BitmapForFileL(CCalenAttachmentInfo &aAttaInfo)

Returns pointer to bitmap of the application that handles given file.

Parameters

CCalenAttachmentInfo & aAttaInforeference to the attachment info

CheckFileSizeLimitL(TInt)

TBool CheckFileSizeLimitL(TIntaNewFileSize)[private]

Parameters

TInt aNewFileSizeSize of the selected attachment.

CheckForExistingAttachmentsL(CCalEntry *)

IMPORT_C voidCheckForExistingAttachmentsL(CCalEntry *entry)

Updates attachment mode with the attahcments of entr if it has any

Parameters

CCalEntry * entry

ConstructL()

voidConstructL()[private]

2nd phase constructor.

CreateNewInfoL(const TDesC &, const TDesC &, TInt, TBool, const TDataType &, const CCalenAttachmentInfo::TCalenAttachmentStoreType)

CCalenAttachmentInfo *CreateNewInfoL(const TDesC &aFileName,
const TDesC &aSystemFileName,
TIntaSize,
TBoolaFetched,
const TDataType &aDataType,
const CCalenAttachmentInfo::TCalenAttachmentStoreTypeaStoreType
)[private]

Creates new attachment info object.

Parameters

const TDesC & aFileNamefilename of the attachment
const TDesC & aSystemFileName
TInt aSizesize of the attachment
TBool aFetchedattacment fetched or not
const TDataType & aDataTypemime type of the attachment
const CCalenAttachmentInfo::TCalenAttachmentStoreType aStoreType

DeleteAttachment(TInt)

IMPORT_C TBoolDeleteAttachment(TIntaIndex)

Deletes attachment from internal array. Notifies attachment model observer with ECalenAttachmentRemoved parameter.

Parameters

TInt aIndexindex for which attachment to be deleted

DoDeleteAttachmentL(TInt)

TBool DoDeleteAttachmentL(TIntaIndex)[private]

Deletes attachment from given index.

Parameters

TInt aIndexIndex of the deleted attachment.

GetAttachmentFileL(TInt)

IMPORT_C RFileGetAttachmentFileL(TIntaIndex)

Parameters

TInt aIndex

GetAttachmentListL(RPointerArray< CCalenAttachmentInfo > &)

IMPORT_C voidGetAttachmentListL(RPointerArray< CCalenAttachmentInfo > &aAttachmentList)

Get the attachment lists

Parameters

RPointerArray< CCalenAttachmentInfo > & aAttachmentListfills the attachment list

IsAttachmentOpen()

IMPORT_C TBoolIsAttachmentOpen()

return ETrue if the atacchment is opened.

LoadResourcesL()

IMPORT_C voidLoadResourcesL()

Loads resources, i.e. bitmaps & layouts

NewL()

IMPORT_C CCalenAttachmentModel *NewL()[static]

First phase constructor

NumberOfItems()

IMPORT_C TIntNumberOfItems()const

Returns number of attachments in the internal array of attachments.

Reset()

IMPORT_C voidReset()

Reset the attachment model (empties the internal array).

SetObserver(MCalenAttachmentModelObserver *)

IMPORT_C voidSetObserver(MCalenAttachmentModelObserver *aObserver)

Sets attachment model observer.

Parameters

MCalenAttachmentModelObserver * aObserverpointer to the MCalenAttachmentModelObserver

Member Data Documentation

RApaLsSession iAppList

RApaLsSession iAppList[private]

RPointerArray< CCalenAttachmentInfo > iAttachInfoArray

RPointerArray< CCalenAttachmentInfo >iAttachInfoArray[private]

MCalenAttachmentModelObserver * iAttachmentModelObserver

MCalenAttachmentModelObserver *iAttachmentModelObserver[private]

TBool iEmbeddedFileOpened

TBool iEmbeddedFileOpened[private]

TSize iIconSize

TSize iIconSize[private]

TBool isAttachmentModelCleared

TBool isAttachmentModelCleared[private]