CCalenInterimUtils2Impl Class Reference

class CCalenInterimUtils2Impl : public CBase

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

Inherits from

  • CCalenInterimUtils2Impl
Public Member Functions
~CCalenInterimUtils2Impl()
voidEComChanged()
HBufC8 *GlobalUidL()
TBool IsMeetingRequestL(CCalEntry &)
TBool MRViewersEnabledL(TBool)
CCalenInterimUtils2Impl *NewL()
voidPopulateChildFromParentL(CCalEntry &, const CCalEntry &)
voidStoreL(CCalEntryView &, CCalEntry &, TBool)
Private Member Functions
CCalenInterimUtils2Impl()
TTime BeginningOfDay(const TTime &)
voidConstructL()
TChar ConvertToCharacterL(TUint8)
CCalAttendee *CopyAttendeeLC(const CCalAttendee &)
voidCopyChildrenExceptionDataL(CCalEntry &, RPointerArray< CCalEntry > &)
voidCopyFieldL(const CCalEntry &, CCalEntry &, TDifferenceFlag)
CCalUser *CopyUserLC(const CCalUser &)
HBufC8 *DoCreateUidLC(const TUint32 &, const TUint64 &, const TUint64 &)
voidDoMRViewersEnabledL()
TBool FieldIsTheSameL(CCalEntry &, CCalEntry &, TDifferenceFlag)
TInt FindInstanceL(CCalInstanceView &, CCalEntry &, const TCalTime &, RPointerArray< CCalInstance > &)
TInt64 GetImeiAsNodeValueL()
voidGetImeiL(TDes &)
voidGetSystemTime(TInt64 &)
TInt64 GetTicksFromGregorianCalendarStartL()
TBool HasTimeOrDateChangedL(const CCalEntry &, const CCalEntry &)
TBool HaveRepeatPropertiesChangedL(const CCalEntry &, const CCalEntry &)
TBool IsEntryRepeatingL(const CCalEntry &)
voidPopulateAttendeeListL(CCalEntry &, const CCalEntry &)
voidPrepareForStorageL(CCalEntry &)
voidSingleStoreL(CCalEntryView &, CCalEntry &)
voidSingleUpdateL(CCalEntryView &, CCalEntry &)
voidStoreEachChildEntryL(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
enumTDifferenceFlag { 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()

voidConstructL()[private]

ConvertToCharacterL(TUint8)

TChar ConvertToCharacterL(TUint8aChar)[private, static]

Parameters

TUint8 aChar

CopyAttendeeLC(const CCalAttendee &)

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

Parameters

const CCalAttendee & aSource

CopyChildrenExceptionDataL(CCalEntry &, RPointerArray< CCalEntry > &)

voidCopyChildrenExceptionDataL(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 & aEditedEntryentry currently being edited
RPointerArray< CCalEntry > & aOldEntriesprevious array of exception entries, with the parent entry being at position 0. This can be retrieved using CCalEntryView::FetchL().

CopyFieldL(const CCalEntry &, CCalEntry &, TDifferenceFlag)

voidCopyFieldL(const CCalEntry &aSrc,
CCalEntry &aDst,
TDifferenceFlagaField
)[private, static]

Copys a single field from one entry to another.

Parameters

const CCalEntry & aSrcsource entry
CCalEntry & aDstdestination entry
TDifferenceFlag aFieldDifference 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()

voidDoMRViewersEnabledL()[private]

EComChanged()

voidEComChanged()

From MCalenEComChangeObserver Called by when the ecom registry gets changed.

FieldIsTheSameL(CCalEntry &, CCalEntry &, TDifferenceFlag)

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

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

Parameters

CCalEntry & aEntryOnefirst entry
CCalEntry & aEntryTwosecond entry
TDifferenceFlag aFlagDifference 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 &)

voidGetImeiL(TDes &aImei)[private, static]

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

Parameters

TDes & aImeihandset's imei

GetSystemTime(TInt64 &)

voidGetSystemTime(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 & aNewEntryThe entry to be updated
const CCalEntry & aOldEntryThe 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 & aNewEntryThe entry to be updated
const CCalEntry & aOldEntryThe 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 & aEntryEntry to test

MRViewersEnabledL(TBool)

TBool MRViewersEnabledL(TBoolaForceCheck)

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 &)

voidPopulateAttendeeListL(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 &)

voidPopulateChildFromParentL(CCalEntry &aChild,
const CCalEntry &aParent
)[static]

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

Parameters

CCalEntry & aChildchild (modifying) entry to be populated
const CCalEntry & aParentparent (originating) entry

PrepareForStorageL(CCalEntry &)

voidPrepareForStorageL(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 & aEntryentry to update

SingleStoreL(CCalEntryView &, CCalEntry &)

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

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

Parameters

CCalEntryView & aEntryViewentry view upon which StoreL is performed
CCalEntry & aEntryentry to store

SingleUpdateL(CCalEntryView &, CCalEntry &)

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

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

Parameters

CCalEntryView & aEntryViewentry view upon which UpdateL is performed
CCalEntry & aEntryentry to store

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

voidStoreEachChildEntryL(CCalEntryView &aEntryView,
CCalEntry &aEntry,
RPointerArray< CCalEntry > &aEntries,
TBoolaResetLocalUid
)[private, static]

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

Parameters

CCalEntryView & aEntryViewview of the entries
CCalEntry & aEntrycurrent entry being updated. Used for UID and RecurrenceId.
RPointerArray< CCalEntry > & aEntriesarray of CCalEntries to be stored
TBool aResetLocalUidresets local uid of restored child entries

StoreL(CCalEntryView &, CCalEntry &, TBool)

voidStoreL(CCalEntryView &aEntryView,
CCalEntry &aEntry,
TBoolaCopyToChildren = 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 & aEntryViewview of the entries
CCalEntry & aEntryentry to be stored
TBool aCopyToChildren = EFalsewhether 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]