CCalenInterimUtils2Impl Class Reference

class CCalenInterimUtils2Impl : public CBase

This class contains utility methods related to usage of Calendar Interim API

Inherits from

Public Member Functions
~CCalenInterimUtils2Impl ()
void EComChanged ()
HBufC8 * GlobalUidL ()
TBool IsMeetingRequestL (CCalEntry &)
TBool MRViewersEnabledL ( TBool )
CCalenInterimUtils2Impl * NewL ()
void PopulateChildFromParentL (CCalEntry &, const CCalEntry &)
void StoreL (CCalEntryView &, CCalEntry &, TBool )
Private Member Functions
CCalenInterimUtils2Impl ()
TTime BeginningOfDay (const TTime &)
void ConstructL ()
TChar ConvertToCharacterL ( TUint8 )
CCalAttendee * CopyAttendeeLC (const CCalAttendee &)
void CopyChildrenExceptionDataL (CCalEntry &, RPointerArray < CCalEntry > &)
void CopyFieldL (const CCalEntry &, CCalEntry &, TDifferenceFlag )
CCalUser * CopyUserLC (const CCalUser &)
HBufC8 * DoCreateUidLC (const TUint32 &, const TUint64 &, const TUint64 &)
void DoMRViewersEnabledL ()
TBool FieldIsTheSameL (CCalEntry &, CCalEntry &, TDifferenceFlag )
TInt FindInstanceL (CCalInstanceView &, CCalEntry &, const TCalTime &, RPointerArray < CCalInstance > &)
TInt64 GetImeiAsNodeValueL ()
void GetImeiL ( TDes &)
void GetSystemTime ( TInt64 &)
TInt64 GetTicksFromGregorianCalendarStartL ()
TBool HasTimeOrDateChangedL (const CCalEntry &, const CCalEntry &)
TBool HaveRepeatPropertiesChangedL (const CCalEntry &, const CCalEntry &)
TBool IsEntryRepeatingL (const CCalEntry &)
void PopulateAttendeeListL (CCalEntry &, const CCalEntry &)
void PrepareForStorageL (CCalEntry &)
void SingleStoreL (CCalEntryView &, CCalEntry &)
void SingleUpdateL (CCalEntryView &, CCalEntry &)
void StoreEachChildEntryL (CCalEntryView &, CCalEntry &, RPointerArray < CCalEntry > &, TBool )
TTimeIntervalMinutes TimeOfDay (const TTime &)
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 Member Enumerations
enum TDifferenceFlag { EEntryDifferentStartTimeAndEndTime  = 0x001, EEntryDifferentSummary  = 0x002, EEntryDifferentDescription  = 0x004, EEntryDifferentLocation  = 0x08, EEntryDifferenceCount  = 0x010 }
Private Attributes
CCalenEComWatcher * iEcomWatcher
TInt64 iImeiNode
TBool iInited
TBool iMrEnabled
TBool iMrEnabledCheck
TUint16 iThisTick
TUint64 iTimeLast

Constructor & Destructor Documentation

CCalenInterimUtils2Impl()

CCalenInterimUtils2Impl ( ) [private]

~CCalenInterimUtils2Impl()

~CCalenInterimUtils2Impl ( )

Destructor

Member Functions Documentation

BeginningOfDay(const TTime &)

TTime BeginningOfDay ( const TTime & aStartTime ) [private, static]

Parameters

const TTime & aStartTime

ConstructL()

void ConstructL ( ) [private]

ConvertToCharacterL(TUint8)

TChar ConvertToCharacterL ( TUint8 aChar ) [private, static]

Parameters

TUint8 aChar

CopyAttendeeLC(const CCalAttendee &)

CCalAttendee * CopyAttendeeLC ( const CCalAttendee & aSource ) [private, static]

Parameters

const CCalAttendee & aSource

CopyChildrenExceptionDataL(CCalEntry &, RPointerArray< CCalEntry > &)

void CopyChildrenExceptionDataL ( CCalEntry & aEditedEntry,
RPointerArray < CCalEntry > & aOldEntries
) [private, static]

Checks to see if any information can be saved from old entries. Logic of: For every field, if the exception's field is the same field as the old parent entry's field, and the new parent entry field is different from the old parent entry field, copy the new parent's field to the exception's field.

Parameters

CCalEntry & aEditedEntry entry currently being edited
RPointerArray < CCalEntry > & aOldEntries previous array of exception entries, with the parent entry being at position 0. This can be retrieved using CCalEntryView::FetchL().

CopyFieldL(const CCalEntry &, CCalEntry &, TDifferenceFlag)

void CopyFieldL ( const CCalEntry & aSrc,
CCalEntry & aDst,
TDifferenceFlag aField
) [private, static]

Copys a single field from one entry to another.

Parameters

const CCalEntry & aSrc source entry
CCalEntry & aDst destination entry
TDifferenceFlag aField Difference flag containing ONE field to copy

CopyUserLC(const CCalUser &)

CCalUser * CopyUserLC ( const CCalUser & aSource ) [private, static]

Parameters

const CCalUser & aSource

DoCreateUidLC(const TUint32 &, const TUint64 &, const TUint64 &)

HBufC8 * DoCreateUidLC ( const TUint32 & aClockSeq,
const TUint64 & aTimeStamp,
const TUint64 & aNodeValue
) [private, static]

Parameters

const TUint32 & aClockSeq
const TUint64 & aTimeStamp
const TUint64 & aNodeValue

DoMRViewersEnabledL()

void DoMRViewersEnabledL ( ) [private]

EComChanged()

void EComChanged ( )

From MCalenEComChangeObserver Called by when the ecom registry gets changed.

FieldIsTheSameL(CCalEntry &, CCalEntry &, TDifferenceFlag)

TBool FieldIsTheSameL ( CCalEntry & aEntryOne,
CCalEntry & aEntryTwo,
TDifferenceFlag aFlag
) [private, static]

Check to see if the two given entries' fields are the same.

Parameters

CCalEntry & aEntryOne first entry
CCalEntry & aEntryTwo second entry
TDifferenceFlag aFlag Difference flag containing ONE field to copy

FindInstanceL(CCalInstanceView &, CCalEntry &, const TCalTime &, RPointerArray< CCalInstance > &)

TInt FindInstanceL ( CCalInstanceView & aInstanceView,
CCalEntry & aEntry,
const TCalTime & aInstanceDate,
RPointerArray < CCalInstance > & aInstances
) [private, static]

Parameters

CCalInstanceView & aInstanceView
CCalEntry & aEntry
const TCalTime & aInstanceDate
RPointerArray < CCalInstance > & aInstances

GetImeiAsNodeValueL()

TInt64 GetImeiAsNodeValueL ( ) [private, static]

GetImeiL(TDes &)

void GetImeiL ( TDes & aImei ) [private, static]

Helper which reads handset's imei. Caller must pass long enough descriptor ( RMobilePhone::KPhoneSerialNumberSize ).

Parameters

TDes & aImei handset's imei

GetSystemTime(TInt64 &)

void GetSystemTime ( TInt64 & aTimeStamp ) [private]

Parameters

TInt64 & aTimeStamp

GetTicksFromGregorianCalendarStartL()

TInt64 GetTicksFromGregorianCalendarStartL ( ) [private, static]

GlobalUidL()

HBufC8 * GlobalUidL ( )

Allocates and returns a new global UID.

HasTimeOrDateChangedL(const CCalEntry &, const CCalEntry &)

TBool HasTimeOrDateChangedL ( const CCalEntry & aNewEntry,
const CCalEntry & aOldEntry
) [private, static]

Compares the start and end datetimes of two entries

Parameters

const CCalEntry & aNewEntry The entry to be updated
const CCalEntry & aOldEntry The original entry

HaveRepeatPropertiesChangedL(const CCalEntry &, const CCalEntry &)

TBool HaveRepeatPropertiesChangedL ( const CCalEntry & aNewEntry,
const CCalEntry & aOldEntry
) [private, static]

Compares the repeat properties (RDates and RRules) of two entries

Parameters

const CCalEntry & aNewEntry The entry to be updated
const CCalEntry & aOldEntry The original entry

IsEntryRepeatingL(const CCalEntry &)

TBool IsEntryRepeatingL ( const CCalEntry & aEntry ) [private, static]

Return ETrue if the entry is a repeating entry

Parameters

const CCalEntry & aEntry

IsMeetingRequestL(CCalEntry &)

TBool IsMeetingRequestL ( CCalEntry & aEntry ) [static]

Checks to see if the given entry has properties consistent with a meeting request.

Parameters

CCalEntry & aEntry Entry to test

MRViewersEnabledL(TBool)

TBool MRViewersEnabledL ( TBool aForceCheck )

Checks to see if Meeting Request Viewer functionality is enabled and is available to use

Parameters

TBool aForceCheck

NewL()

CCalenInterimUtils2Impl * NewL ( ) [static]

Create a new instance of CCalenInterimUtils2

PopulateAttendeeListL(CCalEntry &, const CCalEntry &)

void PopulateAttendeeListL ( CCalEntry & aChild,
const CCalEntry & aParent
) [private, static]

Helper method which populates child's attendee list if is empty.

Parameters

CCalEntry & aChild
const CCalEntry & aParent

PopulateChildFromParentL(CCalEntry &, const CCalEntry &)

void PopulateChildFromParentL ( CCalEntry & aChild,
const CCalEntry & aParent
) [static]

Populates empty fields of a child entry with data from the parent entry.

Parameters

CCalEntry & aChild child (modifying) entry to be populated
const CCalEntry & aParent parent (originating) entry

PrepareForStorageL(CCalEntry &)

void PrepareForStorageL ( CCalEntry & aEntry ) [private, static]

Helper which sets the last modified date of a given entry and, if aEntry is a meeting request, sets the phone owner of the entry, if not previously set.

Parameters

CCalEntry & aEntry entry to update

SingleStoreL(CCalEntryView &, CCalEntry &)

void SingleStoreL ( CCalEntryView & aEntryView,
CCalEntry & aEntry
) [private, static]

Helper which puts the given entry into an entry array and calls StoreL on it.

Parameters

CCalEntryView & aEntryView entry view upon which StoreL is performed
CCalEntry & aEntry entry to store

SingleUpdateL(CCalEntryView &, CCalEntry &)

void SingleUpdateL ( CCalEntryView & aEntryView,
CCalEntry & aEntry
) [private, static]

Helper which puts the given entry into an entry array and calls UpdateL on it.

Parameters

CCalEntryView & aEntryView entry view upon which UpdateL is performed
CCalEntry & aEntry entry to store

StoreEachChildEntryL(CCalEntryView &, CCalEntry &, RPointerArray< CCalEntry > &, TBool)

void StoreEachChildEntryL ( CCalEntryView & aEntryView,
CCalEntry & aEntry,
RPointerArray < CCalEntry > & aEntries,
TBool aResetLocalUid
) [private, static]

Stores each child entry in aEntries in a separate call to CCalEntryView::StoreL(). This function traps and ignores any failures.

Parameters

CCalEntryView & aEntryView view of the entries
CCalEntry & aEntry current entry being updated. Used for UID and RecurrenceId.
RPointerArray < CCalEntry > & aEntries array of CCalEntries to be stored
TBool aResetLocalUid resets local uid of restored child entries

StoreL(CCalEntryView &, CCalEntry &, TBool)

void StoreL ( CCalEntryView & aEntryView,
CCalEntry & aEntry,
TBool aCopyToChildren = EFalse
) [static]

This function is a wrapper around CCalEntryView::StoreL() and CCalEntryView::UpdateL(). The function makes the appropriate call to either of those functions, depending on several factors, such as whether the entry is a child or parent, and whether it has exceptions or not. If aCopyToChildren is set to ETrue, extra logic is applied as follows: For each exception, for each field, if the field is NOT the reason for the entry being an exception, copy the new parent's field across to the exception.

Parameters

CCalEntryView & aEntryView view of the entries
CCalEntry & aEntry entry to be stored
TBool aCopyToChildren = EFalse whether the extra logic regarding exception data should be run

TimeOfDay(const TTime &)

TTimeIntervalMinutes TimeOfDay ( const TTime & aDateTime ) [private, static]

Parameters

const TTime & aDateTime

Member Enumerations Documentation

Enum TDifferenceFlag

Enumerators

EEntryDifferentStartTimeAndEndTime = 0x001
EEntryDifferentSummary = 0x002
EEntryDifferentDescription = 0x004
EEntryDifferentLocation = 0x08
EEntryDifferenceCount = 0x010

Member Data Documentation

CCalenEComWatcher * iEcomWatcher

CCalenEComWatcher * iEcomWatcher [private]

TInt64 iImeiNode

TInt64 iImeiNode [private]

TBool iInited

TBool iInited [private]

TBool iMrEnabled

TBool iMrEnabled [private]

TBool iMrEnabledCheck

TBool iMrEnabledCheck [private]

TUint16 iThisTick

TUint16 iThisTick [private]

TUint64 iTimeLast

TUint64 iTimeLast [private]