Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: calinstanceview.h
Link against: calinterimapi.lib

Class CCalInstanceView

class CCalInstanceView : public CBase;

Description

View class for accessing instances of calendar entries.

Once a session to a calendar file has been created, a view to the session can be created.

An instance is a calendar entry, a repeated instance of a calendar entry, or an RDate added to an entry.

This view can be used to search for instances and also to delete instances.

Derivation

Members

Defined in CCalInstanceView:
DeleteL(), FindInstanceL(), FindInstanceL(), NewL(), NextInstanceL(), PreviousInstanceL(), TCalSearchParams, ~CCalInstanceView()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

Capability: Illegal

static IMPORT_C CCalInstanceView *NewL(CCalSession &aSession, MCalProgressCallBack &aProgressCallBack);

Description

Allocates and constructs an instance view.

The instance view can not be used until the Completed() function is called on the progress callback with the value KErrNone.

Parameters

CCalSession &aSession

The calendar session from which to create the instance view.

MCalProgressCallBack &aProgressCallBack

Reference to a callback object which reports the progress of the operation.

Return value

CCalInstanceView *

Pointer to the newly created instance view.


~CCalInstanceView()

Capability: Illegal

IMPORT_C ~CCalInstanceView();

Description

Destructor for the view. Clears away any resources. Cancels any active asynchronous operation, providing notification by calling Completed() function with the value KErrCancel on progress callback object. Note: Progress callback object must not be deleted before the instance view is destroyed, otherwise a panic will occur.

[Top]


Member functions


FindInstanceL()

Capability: ReadUserData

IMPORT_C void FindInstanceL(RPointerArray< CCalInstance > &aInstanceList, CalCommon::TCalViewFilter aCalViewFilter, const CalCommon::TCalTimeRange &aTimeRange) const;

Description

Gets all instances found in the specified date range, filtered as required.

Parameters

RPointerArray< CCalInstance > &aInstanceList

On return, this array contains all instances that were found.

CalCommon::TCalViewFilter aCalViewFilter

Filters instances based on the values in TCalViewFilter.

const CalCommon::TCalTimeRange &aTimeRange

Specifies the start and end dates between which instances should be searched for. Any matching instances on these dates will be included.


FindInstanceL()

Capability: ReadUserData

IMPORT_C void FindInstanceL(RPointerArray< CCalInstance > &aMatchedInstanceList, CalCommon::TCalViewFilter aCalViewFilter, const CalCommon::TCalTimeRange &aTimeRange, const TCalSearchParams &aSearchParams) const;

Description

Gets all unexcepted instances found in the specified date range, filtered as required, with the specified text.

Parameters

RPointerArray< CCalInstance > &aMatchedInstanceList

On return, this array contains all instances that were found.

CalCommon::TCalViewFilter aCalViewFilter

Filters instances based on the values in TCalViewFilter.

const CalCommon::TCalTimeRange &aTimeRange

Specifies the start and end dates between which instances should be searched for. Any matching instances on these dates will be included.

const TCalSearchParams &aSearchParams

Contains the text to search for.

Leave codes

KErrArgument

The search text in aSearchParams contains more than 32 characters


DeleteL()

Capability: WriteUserData

IMPORT_C void DeleteL(CCalInstance *aInstance, CalCommon::TRecurrenceRange aWhichInstances);

Description

Deletes this instance, and other instances of this entry as required.

This function is intended to be used together with CCalInstanceView::FindInstanceL(). FindInstanceL() may be called to get an instance, and it can then be passed to this function to be deleted.

If all instances of an entry is deleted, then the entry itself will be removed.

Parameters

CCalInstance *aInstance

The instance to be deleted. This function takes ownership of the instance.

CalCommon::TRecurrenceRange aWhichInstances

Indicates whether only this instance should be deleted, or future/past/all instances of the same entry should also be deleted.


NextInstanceL()

Capability: Illegal

IMPORT_C TCalTime NextInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime &aStartDate) const;

Description

Gets the next day with an instance on it that matches the filter.

Parameters

CalCommon::TCalViewFilter aCalViewFilter

Filters instances based on the values in TCalViewFilter.

const TCalTime &aStartDate

Specifies the start date from which instances should be searched. Any matching instances on this date will NOT be included.

Return value

TCalTime

The next day that contains a suitable instance, or Time::NullTime() if none is found.


PreviousInstanceL()

Capability: Illegal

IMPORT_C TCalTime PreviousInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime &aStartDate) const;

Description

Gets the previous day with an instance on it that matches the filter.

Parameters

CalCommon::TCalViewFilter aCalViewFilter

Filters instances based on the values in TCalViewFilter.

const TCalTime &aStartDate

Specifies the start date before which instances should be searched. Any matching instances on this date will NOT be included.

Return value

TCalTime

The previous day that contains a suitable instance, or Time::NullTime() if none is found.

[Top]


Member classes


Class TCalSearchParams

class TCalSearchParams;

Description

Parameter struct for storing search data. This contains a descriptor to store search text and an enum to describe the text search behaviour.

Members

Defined in CCalInstanceView::TCalSearchParams:
Behaviour(), TCalSearchParams(), Text()

Construction and destruction


TCalSearchParams()

Capability: Illegal

IMPORT_C TCalSearchParams(const TDesC &aText, CalCommon::TCalSearchBehaviour aBehaviour);

Description

Constructor for the search parameter data structure.

Parameters

const TDesC &aText

The text to search for.

CalCommon::TCalSearchBehaviour aBehaviour

The type of text search to do.

Member functions


Text()

Capability: Illegal

IMPORT_C const TDesC &Text() const;

Description

Get the search text.

Return value

const TDesC &

The search text.


Behaviour()

Capability: Illegal

IMPORT_C CalCommon::TCalSearchBehaviour Behaviour() const;

Description

Get the search behaviour.

Return value

CalCommon::TCalSearchBehaviour

The search behaviour.