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.
Public Member Functions | |
---|---|
~CCalAttachmentManager() | |
IMPORT_C void | EntriesReferencingFileAttachmentL(RArray< TCalLocalUid > &, const CCalAttachment &) |
IMPORT_C CCalAttachmentIterator * | FetchAttachmentsL(TSortOrder) |
IMPORT_C CCalAttachmentManager * | NewL(CCalSession &, MCalProgressCallBack &) |
Private Member Functions | |
---|---|
CCalAttachmentManager() | |
void | ConstructL(CCalSession &, MCalProgressCallBack &) |
Public Member Enumerations | |
---|---|
enum | TSortOrder { ESortBySizeLargestFirst, ESortByDateModifiedNewestFirst, ESortByDateModifiedOldestFirst } |
Private Attributes | |
---|---|
CCalAttachmentManagerImpl * | iAttachmentManagerImpl |
IMPORT_C | ~CCalAttachmentManager | ( | ) |
Destructor for the attachment manager. An attachment manager has been constructed
The attachment manager is destroyed
capability
None
void | ConstructL | ( | CCalSession & | aSession, |
MCalProgressCallBack & | aProgressCallBack | |||
) | [private] |
CCalSession & aSession | |
MCalProgressCallBack & aProgressCallBack |
IMPORT_C void | EntriesReferencingFileAttachmentL | ( | 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
RArray< TCalLocalUid > & aCalLocalUids | On return, an array of local UIDs of all the entries that contain this file attachment. |
const CCalAttachment & aAttachment | The file attachment object whose referencing entries will be returned. |
IMPORT_C CCalAttachmentIterator * | FetchAttachmentsL | ( | TSortOrder | aSortType | ) | 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
TSortOrder aSortType | The order in which to sort the attachments. |
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
CCalSession & aSession | An open calendar session to be used. |
MCalProgressCallBack & aProgressCallBack | The 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. |
Defines the sort order for calendar file attachments.
ESortBySizeLargestFirst |
Sorts by file size, largest first. |
ESortByDateModifiedNewestFirst |
Sorts by last date modified, newest first. |
ESortByDateModifiedOldestFirst |
Sorts by last date modified, oldest first. |
CCalAttachmentManagerImpl * | iAttachmentManagerImpl | [private] |