CESMRCalDbBase Class Reference

class CESMRCalDbBase : public CBase

Base class representing a calendar database.


Inherits from

Constructor & Destructor Documentation

CESMRCalDbBase(MESMRCalDbObserver &, MCalProgressCallBack &)

CESMRCalDbBase ( MESMRCalDbObserver & aDbObserver,
MCalProgressCallBack & aCmdObserver
) [protected]

C++ default constructor.


MESMRCalDbObserver & aDbObserver database observer reference
MCalProgressCallBack & aCmdObserver asynchronous command observer reference


~CESMRCalDbBase ( )


Member Functions Documentation

Compare(const CCalEntry &, const CCalEntry &)

TInt Compare ( const CCalEntry & aFirst,
const CCalEntry & aSecond
) [static]

Wrapper which traps leaving CompareL() , and in leave situation returns that objects are equal since that is a safer interpretation and avoids duplicates in database. In real life CompareL() is not expected to ever leave.


const CCalEntry & aFirst entry
const CCalEntry & aSecond entry

CompareL(const CCalEntry &, const CCalEntry &)

TInt CompareL ( const CCalEntry & aFirst,
const CCalEntry & aSecond
) [static]

Helper which allows ordering entries in an array. That is implemented by evaluating GUID and RECURRENCE-ID of the two entries.


const CCalEntry & aFirst entry
const CCalEntry & aSecond entry


MESMRCalDbObserver::TDbStatus DbStatus ( )

Database status getter.


const CCalEntryView * EntryView ( ) const

Entry view accessor. Ownership not transferred.


CCalEntryView * EntryView ( )

Entry view accessor. Ownership not transferred.

FetchWithRangeL(RPointerArray< CCalEntry > &, const CalCommon::TCalTimeRange &, TBool)

void FetchWithRangeL ( RPointerArray < CCalEntry > & aCalEntryArray,
const CalCommon::TCalTimeRange & aCalTimeRange,
TBool aFetchFullCopy = ETrue

CCalEntryView lacks fetch with time range. This method provides such functionality. In case of repeating entries the entire sequence must be within range (but modifying entries are considered separately). If database doesn't have both instance and entry view then this method leaves with KErrNotSupported.


RPointerArray < CCalEntry > & aCalEntryArray fetched entries, caller owns array items
const CalCommon::TCalTimeRange & aCalTimeRange time range
TBool aFetchFullCopy = ETrue copy type of calendar entry


const CCalInstanceView * InstanceView ( ) const

Instance view accessor. Ownership not transferred.


CCalInstanceView * InstanceView ( )

Instance view accessor. Ownership not transferred.

IsCompletelyWithinRangeL(const CCalEntry &, const CalCommon::TCalTimeRange &)

TBool IsCompletelyWithinRangeL ( const CCalEntry & aEntry,
const CalCommon::TCalTimeRange & aCalTimeRange
) [static]

Tests whether given entry fits completely within given time range.


const CCalEntry & aEntry entry to test
const CalCommon::TCalTimeRange & aCalTimeRange criterion


TBool NotifyProgress ( ) [protected]


void Progress ( TInt aPercentageCompleted ) [protected]


TInt aPercentageCompleted


void ResetDbL ( ) [virtual]

Reset database, causes asynchronous db initialization which is notified through MMRUtilsCalDbObserver interface. Calling this method requires that there are no external open references for the session. The default implementation leaves with KErrNotSupported.


const CCalSession * Session ( ) const

Session accessor. Ownership not transferred.


CCalSession * Session ( )

Session accessor. Ownership not transferred.

Member Data Documentation

CCalEntryView * iCalEntryView

CCalEntryView * iCalEntryView [protected]

Calender DB view. Managed by the subclass Own.

CCalInstanceView * iCalInstanceView

CCalInstanceView * iCalInstanceView [protected]

Caledar DB instance view. Managed by the subclass Own.

CCalSession * iCalSession

CCalSession * iCalSession [protected]

Calendar DB session. Managed by the subclass Own.

MCalProgressCallBack & iCmdObserver

MCalProgressCallBack & iCmdObserver [protected]

This callback is used for notifying about asynchronous command progress, Note: currently not used for anything! Not own.

MESMRCalDbObserver & iDbObserver

MESMRCalDbObserver & iDbObserver [protected]

Used for notifying about database status Not own.

MESMRCalDbObserver::TDbStatus iDbStatus

MESMRCalDbObserver::TDbStatus iDbStatus [protected]

Current database status Own.