CCalAttachmentManager Class Reference

class CCalAttachmentManager : public CBase

Class for managing file attachments in the calendar store.

This class allows the user to find out how many file attachments are in the calendar store, and to fetch them sorted by size or by last modified date. Once an attachment is fetched, the attachment manager can find the entries that reference that attachment.

Inherits from

  • CCalAttachmentManager

Constructor & Destructor Documentation

CCalAttachmentManager()

CCalAttachmentManager()[private]

~CCalAttachmentManager()

IMPORT_C~CCalAttachmentManager()

Destructor for the attachment manager. An attachment manager has been constructed

The attachment manager is destroyed

capability

None

Member Functions Documentation

ConstructL(CCalSession &, MCalProgressCallBack &)

voidConstructL(CCalSession &aSession,
MCalProgressCallBack &aProgressCallBack
)[private]

Parameters

CCalSession & aSession
MCalProgressCallBack & aProgressCallBack

EntriesReferencingFileAttachmentL(RArray< TCalLocalUid > &, const CCalAttachment &)

IMPORT_C voidEntriesReferencingFileAttachmentL(RArray< TCalLocalUid > &aCalLocalUids,
const CCalAttachment &aAttachment
)const

Fetches the local UIDs of all entries in the database that reference this file attachment. This does nothing if a URI attachment is passed in, or if the file attachment has not been stored in the calendar database yet. leave

KErrArgument The attachment is not a file attachment - i.e. of type CCalAttachment::EFile.

None

None

capability

ReadUserData

Parameters

RArray< TCalLocalUid > & aCalLocalUidsOn return, an array of local UIDs of all the entries that contain this file attachment.
const CCalAttachment & aAttachmentThe file attachment object whose referencing entries will be returned.

FetchAttachmentsL(TSortOrder)

IMPORT_C CCalAttachmentIterator *FetchAttachmentsL(TSortOrderaSortType)const

Fetches the details of all unique file attachments referenced from entries within the calendar store, sorted as specified. This does not include URI attachments. Note that the full attachment data is not loaded in this operation, only the metadata for each of the file attachments. If an attachment is referenced by more than one entry, it will appear only once in the iterator. A pointer to an iterator of attachments. The caller takes ownership.

None

A new attachment iterator is returned containing the sorted file attachments.

capability

ReadUserData

Parameters

TSortOrder aSortTypeThe order in which to sort the attachments.

NewL(CCalSession &, MCalProgressCallBack &)

IMPORT_C CCalAttachmentManager *NewL(CCalSession &aSession,
MCalProgressCallBack &aProgressCallBack
)[static]

Create a new attachment manager. A calendar file has been opened on a calendar session.

Once the callback is complete, the attachment manager will be constructed and ready for use.

A pointer to a new attachment manager.

capability

None

Parameters

CCalSession & aSessionAn open calendar session to be used.
MCalProgressCallBack & aProgressCallBackThe class to be called back when the attachment manager is created. Note that if an entry view or instance view has been created already, then this callback will happen immediately.

Member Enumerations Documentation

Enum TSortOrder

Defines the sort order for calendar file attachments.

Enumerators

ESortBySizeLargestFirst

Sorts by file size, largest first.

ESortByDateModifiedNewestFirst

Sorts by last date modified, newest first.

ESortByDateModifiedOldestFirst

Sorts by last date modified, oldest first.

Member Data Documentation

CCalAttachmentManagerImpl * iAttachmentManagerImpl

CCalAttachmentManagerImpl *iAttachmentManagerImpl[private]