Symbian
Symbian OS Library

SYMBIAN OS V9.2

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



Location: CNTFILT.H
Link against: cntmodel.lib

Class CCntFilter

class CCntFilter : public CBase;

Description

A contact database filter.

This is used to get a subset of the items in a contact database. There are three criteria used when filtering a database:

The state can be one of: deleted, modified or created (since a specified date/time). The filter can be set to include contact items of only one state, or it can be set to include contact items of all states, using the TInclude enumeration.

The date/time value is used in combination with the contact item's state.

The contact item's type is one of contact card, contact card group, contact card template, or own card. Any combination of contact types may be specified in the filter, in addition to the contact item's state.

After the filter has been set up, it should be passed to the function CContactDatabase::FilterDatabaseL().

Derivation

Members

Defined in CCntFilter:
ContactFilterTypeALL(), ContactFilterTypeCard(), ContactFilterTypeGroup(), ContactFilterTypeOwnCard(), ContactFilterTypeTemplate(), EContactCards, EContactGroups, EContactOwnCard, EContactTemplates, EIncludeAllContacts, EIncludeAllTypes, EIncludeDeletedContacts, EIncludeModifiedContacts, EIncludeNewContacts, GetFilterDateTime(), IncludeDeletedContacts(), IncludeModifiedContacts(), IncludeNewContacts(), NewL(), NewL(), NewLC(), NewLC(), Reserved1(), Reserved2(), Reset(), SetContactFilterTypeALL(), SetContactFilterTypeCard(), SetContactFilterTypeGroup(), SetContactFilterTypeOwnCard(), SetContactFilterTypeTemplate(), SetFilterDateTime(), SetIncludeDeletedContacts(), SetIncludeModifiedContacts(), SetIncludeNewContacts(), TContactType, TInclude, TestContactFilterType(), iIds, ~CCntFilter()

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


Construction and destruction


NewL()

static IMPORT_C CCntFilter *NewL();

Description

Allocates and constructs a default contact database filter.

Return value

CCntFilter *

Pointer to the new filter.


NewLC()

static IMPORT_C CCntFilter *NewLC();

Description

Allocates and constructs a default contact database filter.

Return value

CCntFilter *

Pointer to the new filter. This is left on the cleanup stack.


NewL()

static IMPORT_C CCntFilter *NewL(const CCntFilter *aFilter);

Description

Allocates and constructs a contact database filter based on another one.

The state value, type flags, the date/time value and the ID array are copied.

Parameters

const CCntFilter *aFilter

Pointer to the filter to copy.

Return value

CCntFilter *

Pointer to the new filter.


NewLC()

static IMPORT_C CCntFilter *NewLC(const CCntFilter *aFilter);

Description

Allocates and constructs a contact database filter based on another one.

The state value, type flags, the date/time value and the ID array are copied.

Parameters

const CCntFilter *aFilter

Pointer to the filter to copy.

Return value

CCntFilter *

Pointer to the new filter. This is left on the cleanup stack.


~CCntFilter()

IMPORT_C ~CCntFilter();

Description

Deletes all resources owned by the filter prior to its destruction.

[Top]


Member functions


SetIncludeModifiedContacts()

IMPORT_C void SetIncludeModifiedContacts(TBool aIncludeModified);

Description

Sets the filter to include only contacts modified since the filter's date/time.

Parameters

TBool aIncludeModified

ETrue to include only contacts modified since the filter's date/time, EFalse to include contact items in all states.


SetIncludeNewContacts()

IMPORT_C void SetIncludeNewContacts(TBool aIncludeNew);

Description

Sets the filter to include only contacts created since the filter's date/time.

Parameters

TBool aIncludeNew

ETrue to include only contacts created since the filter's date/time, EFalse to include contact items in all states.


SetIncludeDeletedContacts()

IMPORT_C void SetIncludeDeletedContacts(TBool aIncludeDeleted);

Description

Sets the filter to include only contacts deleted since the filter's date/time.

Parameters

TBool aIncludeDeleted

ETrue to include only contacts deleted since the filter's date/time, EFalse to include contact items in all states.


TestContactFilterType()

IMPORT_C TBool TestContactFilterType(TUid aTypeUid);

Description

Tests whether a contact item type, identified by its UID is included in or excluded from the filter.

Parameters

TUid aTypeUid

UID which identifies a contact item type. One of: KUidContactCard, KUidContactGroup, KUidContactCardTemplate or KUidContactOwnCard.

Return value

TBool

ETrue if the specified contact type is included in the filter, EFalse not.


SetContactFilterTypeALL()

IMPORT_C void SetContactFilterTypeALL(TBool aFilterAllContacts);

Description

Sets whether all contact item types (contact card groups, contact cards, own cards and contact card templates) should be included in the filter.

Parameters

TBool aFilterAllContacts

ETrue if all contact item types should be included in the filter, EFalse if not.


SetContactFilterTypeCard()

IMPORT_C void SetContactFilterTypeCard(TBool aFilterCards);

Description

Sets whether contact cards should be included in or excluded from the filter.

Parameters

TBool aFilterCards

ETrue to include contact cards in the filter, EFalse to exclude them.


SetContactFilterTypeGroup()

IMPORT_C void SetContactFilterTypeGroup(TBool aFilterGroups);

Description

Sets whether contact card groups should be included in or excluded from the filter.

Parameters

TBool aFilterGroups

ETrue to include contact card groups in the filter, EFalse to exclude them.


SetContactFilterTypeTemplate()

IMPORT_C void SetContactFilterTypeTemplate(TBool aFilterTemplates);

Description

Sets whether contact card templates should be included in or excluded from the filter.

Parameters

TBool aFilterTemplates

ETrue to include contact card templates in the filter, EFalse to exclude them.


SetContactFilterTypeOwnCard()

IMPORT_C void SetContactFilterTypeOwnCard(TBool aFilterOwnCard);

Description

Sets whether own cards should be included in or excluded from the filter.

Parameters

TBool aFilterOwnCard

ETrue to include own cards in the filter, EFalse to exclude them.


ContactFilterTypeALL()

inline TBool ContactFilterTypeALL() const;

Description

Tests whether all contact item types are included in the filter, as set by SetContactFilterTypeALL().

Return value

TBool

ETrue if all contact item types are included in the filter, EFalse if not.


ContactFilterTypeCard()

inline TBool ContactFilterTypeCard() const;

Description

Tests whether contact cards are included in the filter, as set by SetContactFilterTypeCard().

Return value

TBool

ETrue if contact cards are included in the filter, EFalse if not.


ContactFilterTypeGroup()

inline TBool ContactFilterTypeGroup() const;

Description

Tests whether contact card groups are included in the filter, as set by SetContactFilterTypeGroup().

Return value

TBool

ETrue if contact card groups are included in the filter, EFalse if not.


ContactFilterTypeOwnCard()

inline TBool ContactFilterTypeOwnCard() const;

Description

Tests whether own cards are included in the filter, as set by SetContactFilterTypeOwnCard().

Return value

TBool

ETrue if own cards are included in the filter, EFalse if not.


ContactFilterTypeTemplate()

inline TBool ContactFilterTypeTemplate() const;

Description

Tests whether contact card templates are included in the filter, as set by SetContactFilterTypeTemplate().

Return value

TBool

ETrue if contact card templates are included in the filter, EFalse if not.


IncludeModifiedContacts()

inline TBool IncludeModifiedContacts();

Description

Tests whether the filter includes only contacts modified since the filter's date/time.

Return value

TBool

ETrue if the filter only includes modified contacts. EFalse if not.


IncludeNewContacts()

inline TBool IncludeNewContacts();

Description

Tests whether the filter includes only contacts created since the filter's date/time.

Return value

TBool

ETrue if the filter only includes new contacts. EFalse if not.


IncludeDeletedContacts()

inline TBool IncludeDeletedContacts();

Description

Tests whether the filter includes only contacts deleted since the filter's date/time.

Return value

TBool

ETrue if the filter only includes deleted contacts. EFalse if not.


GetFilterDateTime()

inline TTime GetFilterDateTime();

Description

Gets the date and time used by the filter, as set by SetFilterDateTime().

Return value

TTime

The filter's date and time value.


SetFilterDateTime()

inline void SetFilterDateTime(TTime aTime);

Description

Sets the date and time used by the filter in combination with the TInclude value to test contact items against.

Parameters

TTime aTime

The new date and time value.


Reset()

IMPORT_C void Reset();

Description

Resets the filter. The state value is set to EIncludeAllContacts and the contact ID array is reset.


Reserved1()

IMPORT_C void Reserved1();

Description


Reserved2()

IMPORT_C void Reserved2();

Description

[Top]


Member enumerations


Enum TInclude

TInclude

Description

Flags to identify which contact items should be included in the filter.

Only one of the following values can be set in the filter at a time. However the client may select to filter contacts in all states using EIncludeAllContacts.

EIncludeAllContacts

Contact items in all states should be included.

EIncludeNewContacts

Only contact items which have been added since the date/time should be included.

EIncludeModifiedContacts

Only contact items which have been modified since the date/time should be included.

EIncludeDeletedContacts

Only contact items which have been deleted since the date/time should be included.


Enum TContactType

TContactType

Description

Contact item types.

EIncludeAllTypes

All contact item types should be included.

EContactCards

Contact cards should be included in the filter.

EContactGroups

Contact card groups should be included in the filter.

EContactTemplates

Contact card templates should be included in the filter.

EContactOwnCard

Own cards should be included in the filter.

[Top]


Member data


iIds

CContactIdArray * iIds;

Description

A pointer to an array which stores the filtered list of contact IDs.