Location:
cntitem.h
Link against: cntmodel.lib
CCntFilter
Supported from 6.0
A contact database filter. Used to get a subset of the contact items contained in a contact database. There are three criteria used when filtering a database: —
the contact item's state
the date/time the contact item was created/last modified/deleted
the contact item's type
The contact item's 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()
.
|
Defined in CCntFilter
:
ContactFilterTypeALL()
, ContactFilterTypeCard()
, ContactFilterTypeGroup()
, ContactFilterTypeOwnCard()
, ContactFilterTypeTemplate()
, EContactCards
, EContactGroups
, EContactOwnCard
, EContactTemplates
, EIncludeAllContacts
, EIncludeAllTypes
, EIncludeDeletedContacts
, EIncludeModifiedContacts
, EIncludeNewContacts
, GetFilterDateTime()
, IncludeDeletedContacts()
, IncludeModifiedContacts()
, IncludeNewContacts()
, NewL()
, NewLC()
, Reset()
, SetContactFilterTypeALL()
, SetContactFilterTypeCard()
, SetContactFilterTypeGroup()
, SetContactFilterTypeOwnCard()
, SetContactFilterTypeTemplate()
, SetFilterDateTime()
, SetIncludeDeletedContacts()
, SetIncludeModifiedContacts()
, SetIncludeNewContacts()
, TContactType
, TInclude
, TestContactFilterType()
, iIds
, ~CCntFilter()
Inherited from CBase
:
operator new()
static CCntFilter* NewL();
Constructs the contact database filter.
|
static CCntFilter* NewLC();
Constructs the contact database filter. The pointer to the filter is left on the cleanup stack.
|
static CCntFilter* NewL(const CCntFilter* aFilter);
Constructs the contact database filter from another filter. The state value, type flags, the date/time value and the ID array are copied.
|
|
static CCntFilter* NewLC(const CCntFilter* aFilter);
Constructs the contact database filter from another filter. The state value, type flags, the date/time value and the ID array are copied. The pointer to the filter is left on the cleanup stack.
|
|
~CCntFilter();
The destructor deletes all resources owned by the filter prior to its destruction.
void Reset();
Resets the filter. The state value is set to
EIncludeAllContacts
and the contact ID array is
reset.
void SetIncludeModifiedContacts(TBool aIncludeModified);
Sets the filter to include only contacts modified since the filter's date/time.
|
void SetIncludeNewContacts(TBool aIncludeNew);
Sets the filter to include only contacts created since the filter's date/time.
|
void SetIncludeDeletedContacts(TBool aIncludeDeleted);
Sets the filter to include only contacts deleted since the filter's date/time.
|
TBool IncludeModifiedContacts();
Tests whether the filter includes only contacts modified since the filter's date/time.
|
TBool IncludeNewContacts();
Tests whether the filter includes only contacts created since the filter's date/time.
|
TBool IncludeDeletedContacts();
Tests whether the filter includes only contacts deleted since the filter's date/time.
|
TBool TestContactFilterType(TUid aTypeUid);
Tests whether a contact item type, identified by its UID is included in or excluded from the filter.
|
|
void SetContactFilterTypeALL(TBool aFilterAllContacts);
Sets whether all contact item types (contact card groups, contact cards, own cards and contact card templates) should be included in the filter.
|
void SetContactFilterTypeCard(TBool aFileterCards);
Sets whether contact cards should be included in or excluded from the filter.
|
void SetContactFilterTypeGroup(TBool aFilterGroups);
Sets whether contact card groups should be included in or excluded from the filter.
|
void SetContactFilterTypeTemplate(TBool aFilterTemplates);
Sets whether contact card templates should be included in or excluded from the filter.
|
void SetContactFilterTypeOwnCard(TBool aFilterOwnCard);
Sets whether own cards should be included in or excluded from the filter.
|
TBool ContactFilterTypeALL() const;
Tests whether all contact item types are included in the
filter, as set by SetContactFilterTypeALL()
.
|
TBool ContactFilterTypeCard() const;
Tests whether contact cards are included in the filter, as set
by SetContactFilterTypeCard()
.
|
TBool ContactFilterTypeGroup() const;
Tests whether contact card groups are included in the filter,
as set by SetContactFilterTypeGroup()
.
|
TBool ContactFilterTypeOwnCard() const;
Tests whether own cards are included in the filter, as set by
SetContactFilterTypeOwnCard()
.
|
TBool ContactFilterTypeTemplate() const;
Tests whether contact card templates are included in the
filter, as set by
SetContactFilterTypeTemplate()
.
|
void SetFilterDateTime(TTime aTime);
Sets the date and time used by the filter in combination with
the TInclude
value to test contact items
against.
|
TTime GetFilterDateTime();
Returns the date and time used by the filter, as set by
SetFilterDateTime()
.
|
CContactIdArray* iIds
A pointer to an array which stores the filtered list of contact IDs.
TInclude
Flags to set 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
.
|
TContactType
Contact item types
|