Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: agmbasic.h
Link against: agnmodel.lib

Class CAgnBasicEntry

CAgnBasicEntry

Support

Supported from 5.0

Description

Abstract base class for the entry classes CAgnAppt, CAgnTodo, CAgnEvent and CAgnAnniv. It provides an interface to alarm and repeat information (for repeating entries) and to entry attributes e.g. whether the entry is tentative and whether it is crossed out.

Repeat exceptions are dates which would normally be included in an entry’s repeat dates, but are excluded. For instance if an entry is to repeat on the 4th of every month but not on the 4th January, then the 4th January is an exception. A repeat can have more than one exception and all exceptions are stored in an exception list, which is part of the entry’s repeat details.

Entries have a last changed date/time, which is used for synchronisation, and is updated each time the entry is changed.

Derivation

CAgnBasicEntryAbstract base class for the entry classes CAgnAppt, CAgnTodo, CAgnEvent and CAgnAnniv
CBaseBase class for all classes to be instantiated on the heap

Defined in CAgnBasicEntry:
AddExceptionL(), AlarmDaysWarning(), AlarmInstanceDateTime(), AlarmTime(), ClearAllAttributes(), ClearRepeat(), DisplayInYearView(), EntrySymbol(), Exceptions(), FindException(), HasAlarm(), HasDefaultDisplayTime(), HasEntrySymbol(), HasExceptions(), HasExtended(), IsADayNote(), IsCrossedOut(), IsRepeating(), IsSketch(), IsStoredInline(), IsTentative(), PruneExceptions(), RemoveAllExceptions(), RemoveException(), RptDef(), SetAlarm(), SetDisplayInYearView(), SetEntrySymbol(), SetHasAlarm(), SetHasDefaultDisplayTime(), SetHasEntrySymbol(), SetHasExceptions(), SetHasExtended(), SetIsADayNote(), SetIsCrossedOut(), SetIsRepeating(), SetIsSketch(), SetIsStoredInline(), SetIsTentative(), SetRptEndDate(), SetRptStartDate(), ~CAgnBasicEntry()

Inherited from CBase:
operator new()


Destruction


~CAgnBasicEntry()

virtual ~CAgnBasicEntry();

Description

The destructor frees all resources owned by the object, prior to its destruction.

[Top]


Alarm information


AlarmDaysWarning()

TTimeIntervalDays AlarmDaysWarning() const;

Description

Returns the number of days warning for the entry’s alarm, as set by CAgnBasicEntry::SetAlarm(). Number of days warning is a time interval in days and is the number of days before an entry’s start date, that the alarm is set to sound. Returns zero if the entry is not alarmed.

Return value

TTimeIntervalDays

Number of days warning for the entry’s alarm.


AlarmInstanceDateTime()

TTime AlarmInstanceDateTime() const;

Description

Returns the due date/time of the alarm for the current instance if the entry is repeating or just its normal due date/time if it’s non-repeating.

Return value

TTime

The alarm’s due date/time.


AlarmTime()

TTimeIntervalMinutes AlarmTime() const;

Description

Returns the time of the alarm as a time interval in minutes from midnight. This time applies to all instances of the alarm if it is repeating because they all occur at the same time on different dates.

Return value

TTimeIntervalMinutes

Time interval in minutes from midnight.


HasAlarm()

TBool HasAlarm() const;

Description

Tests whether the entry is alarmed.

Return value

TBool

ETrue if the entry has an alarm, EFalse if it does not have an alarm or if the entry is crossed out.


SetHasAlarm()

void SetHasAlarm(TBool aHasAlarm);

Description

Set the entry’s alarm property.

Parameters

TBool aHasAlarm

ETrue if the entry has an alarm, EFalse if it does not have an alarm or if the entry is crossed out.


SetAlarm()

void SetAlarm(TTimeIntervalDays aDaysWarning,TTimeIntervalMinutes aTime);

Description

Set the alarm’s due date/time. Two intervals may be set: the time interval in days between the entry's start date and the date on which the alarm will sound; and the time of day (as an interval in minutes from midnight) the alarm is set to sound.

Note

To-dos have their alarm warning period set relative to their due date by default. The period may also be set relative to the start date of the to-do — if this is required CAgnTodo::SetAlarmFromStartDate should be called after calling this function.

Parameters

TTimeIntervalDays aDaysWarning

The time interval in days between the entry's start date (for appointments, events and anniversaries) and the date on which the alarm will sound. If the entry is a to-do, see the note below.

TTimeIntervalMinutes aTime

The time of day, as an interval in minutes from midnight, at which the alarm will sound.

[Top]


Entry symbols


HasEntrySymbol()

TBool HasEntrySymbol() const;

Description

Tests whether the entry has an entry symbol.

Return value

TBool

ETrue if entry has an entry symbol, EFalse if not.


SetHasEntrySymbol()

void SetHasEntrySymbol(TBool aHasEntrySymbol);

Description

Sets whether or not the entry has an entry symbol.

Parameters

TBool aHasEntrySymbol

ETrue if the entry has an entry symbol, EFalse if not.


EntrySymbol()

TChar EntrySymbol() const;

Description

Returns the entry symbol.

Return value

TChar

The entry symbol.


SetEntrySymbol()

void SetEntrySymbol(TChar aEntrySymbol);

Description

Sets the entry symbol.

Parameters

TChar aEntrySymbol

The entry symbol.

[Top]


Repeating information


SetRptEndDate()

void SetRptEndDate(TAgnDate aRptEndDate);

Description

For a repeating entry, sets the repeat end date.

Parameters

TAgnDate aRptEndDate

The repeat end date.


SetRptStartDate()

void SetRptStartDate(TAgnDate aRptStartDate);

Description

For a repeating entry, sets the repeat start date.

Parameters

TAgnDate aRptStartDate

The repeat start date.


IsRepeating()

TBool IsRepeating() const;

Description

Is the entry repeating?

Return value

TBool

ETrue if entry is repeating, EFalse if not.


SetIsRepeating()

void SetIsRepeating(TBool aIsRepeating);

Description

Sets the entry’s is repeating property.

Parameters

TBool aIsRepeating

ETrue if entry is repeating, EFalse if not.


ClearRepeat()

void ClearRepeat();

Description

Clears the repeat details including exceptions and unsets the entry's repeating property.


RptDef()

CAgnRptDef* RptDef();
const CAgnRptDef* RptDef() const;

Description

Returns a pointer to the entry’s repeat details, including exceptions.

Two versions of the function are supplied. The compiler chooses the appropriate version based on the use made of the returned reference. If the returned reference is used in an expression where that reference can be modified, then the non-const version is chosen.

Return value

CAgnRptDef*

A non-const pointer to an object which contains the entry's repeat details including exceptions. NULL if the entry is not repeating.

const CAgnRptDef*

A const pointer to an object which contains the entry's repeat details including exceptions. NULL if the entry is not repeating.

[Top]


Repeat exceptions


AddExceptionL()

void AddExceptionL(const TAgnException& aException);

Description

For a repeating entry, adds an exception to the list of repeat exceptions.

Parameters

const TAgnException& aException

The repeat exception.


Exceptions()

const CAgnExceptionList* Exceptions() const;

Description

For a repeating entry, returns a pointer to a list of the exceptions.

Return value

CAgnExceptionList*

Pointer to a list of exception entries. NULL if the entry is not repeating.


FindException()

TBool FindException(TAgnException& aException) const;

Description

Searches for an exception in the exceptions list. If the exception is found in the exception list, ETrue is returned, otherwise EFalse.

Parameters

TAgnException& aException

The repeat exception to find.

Return value

TBool

ETrue if aException is found, EFalse if not found or if the entry is not repeating.


HasExceptions()

TBool HasExceptions() const;

Description

Returns whether or not the entry has repeat exceptions, as set by SetHasExceptions().

Return value

TBool

ETrue if entry has any repeat exceptions, EFalse if not.


SetHasExceptions()

void SetHasExceptions(TBool aHasExceptions);

Description

Sets the entry’s has exceptions property.

Parameters

TBool aHasExceptions

ETrue to set the entry's has exceptions property, EFalse to unset it.


PruneExceptions()

void PruneExceptions();

Description

Compares the entry's exceptions with the repeat start and end dates. Removes any exceptions which occur before the start or after the end of the repeat period and exceptions which do not fall on repeat dates. If, after pruning, there are no exceptions left, the entry's has exceptions property is unset.


RemoveAllExceptions()

void RemoveAllExceptions();

Description

Removes all exceptions from the exception list. The entry's has exceptions property is unset.


RemoveException()

TBool RemoveException(const TAgnException& aException);

Description

Removes an exception from the exception list if it can be found and if so, returns ETrue. If the exception cannot be found, it returns EFalse. If no more exceptions are left after aException is removed, the entry's has exceptions property is unset.

Parameters

const TAgnException& aException

The exception to remove from the exception list.

Return value

TBool

ETrue if the specified exception was present in the exception list, EFalse if it was not present or if the entry is not repeating.

[Top]


Other entry attributes


HasDefaultDisplayTime()

TBool HasDefaultDisplayTime() const;

Description

Does the entry use the default display time?

Return value

TBool

ETrue if the entry uses the default display time, EFalse if not.


SetHasDefaultDisplayTime()

void SetHasDefaultDisplayTime(TBool aHasDefaultDisplayTime);

Description

Sets the entry’s has default display time property. This property is set to true when an entry (excluding appointments which must have a display time set when created) is created and before a display time has been set. Once the display time is set, this property is set to false.

Parameters

TBool aHasDefaultDisplayTime

ETrue if entry uses the default display time, EFalse if not.


HasExtended()

TBool HasExtended() const;

Description

This function indicates whether the entry has extended attributes (added in EPOC Release 5 and later). It should not be called by third parties.


SetHasExtended()

void SetHasExtended(TBool aHasExtended);

Description

This function sets a flag to indicate whether the entry has extended attributes (added in EPOC Release 5 and later). This flag is set automatically so this function should not be called by third parties.


IsSketch()

TBool IsSketch() const;

Description

Tests whether the entry is a sketch. An entry can be a sketch if the only thing contained in the entry's rich text is a picture character providing a link to the embedded sketch.

Return value

TBool

ETrue if entry is a sketch, EFalse if not.


SetIsSketch()

void SetIsSketch(TBool aIsSketch);

Description

Set the entry’s sketch property. An entry can be a sketch if the only thing contained in the entry's rich text is a picture character providing a link to the embedded sketch.

Parameters

TBool aIsSketch

ETrue if entry is a sketch, EFalse if not.


IsTentative()

TBool IsTentative() const;

Description

Tests whether the entry is tentative (not yet confirmed).

Return value

TBool

ETrue if entry is tentative, EFalse if not.


SetIsTentative()

void SetIsTentative(TBool aIsTentative);

Description

Sets the entry’s tentative property. This is set to true if the entry is not yet confirmed.

Parameters

TBool aIsTentative

ETrue if entry is tentative, EFalse if not.


DisplayInYearView()

TBool DisplayInYearView() const;

Description

Returns whether the entry is displayed in the application's year view.

Return value

TBool

ETrue if entry is displayed in the year view, EFalse if not.


SetDisplayInYearView()

void SetDisplayInYearView(TBool aDisplayInYearView);

Description

Sets whether the entry should be displayed in the application's year view.

Parameters

TBool aDisplayInYearView

ETrue if entry should be displayed in the year view, EFalse if not.


IsADayNote()

TBool IsADayNote() const;

Description

Tests whether the entry is a day note.

Return value

TBool

ETrue if the entry is a day note, EFalse if not.


SetIsADayNote()

void SetIsADayNote(TBool aIsADayNote);

Description

Sets the entry’s is a day note property.

Parameters

TBool aIsADayNote

ETrue if the entry is a day note, EFalse if not.


IsCrossedOut()

TBool IsCrossedOut() const;

Description

Tests whether the entry is crossed out.

Return value

TBool

ETrue if the entry is crossed out, EFalse if not.


SetIsCrossedOut()

void SetIsCrossedOut(TBool aIsCrossedOut);

Description

Sets the entry’s crossed out property.

Note

If the entry is a to-do, call CAgnTodo::CrossOut() or CAgnTodo::UnCrossOut() instead.

Parameters

TBool aIsCrossedOut

ETrue if the entry is crossed out, EFalse if not.


IsStoredInline()

TBool IsStoredInline() const;

Description

Tests whether the entry's rich text object is stored inline or out of line.

Return value

TBool

ETrue if the entry is stored inline, EFalse if not.


SetIsStoredInline()

void SetIsStoredInline(TBool aIsStoredInline);

Description

Sets whether the entry's rich text object is stored inline or out of line.

Parameters

TBool aIsStoredInline

ETrue if the entry is stored inline, EFalse if not.


ClearAllAttributes()

void ClearAllAttributes();

Description

Clears all entry attributes, for instance whether the entry is tentative and whether it is crossed out.