|
|
|
|
Location:
CNTFILT.H
Link against: cntmodel.lib
class CCntFilter : public CBase;
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 contact item's state
the date/time the contact item was created/last modified/deleted
the contact item's type
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().
CBase - Base class for all classes to be instantiated on the heapCCntFilter - A contact database filterDefined 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()
static IMPORT_C CCntFilter *NewL();
Allocates and constructs a default contact database filter.
|
static IMPORT_C CCntFilter *NewLC();
Allocates and constructs a default contact database filter.
|
static IMPORT_C CCntFilter *NewL(const CCntFilter *aFilter);
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.
|
|
static IMPORT_C CCntFilter *NewLC(const CCntFilter *aFilter);
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.
|
|
IMPORT_C ~CCntFilter();
Deletes all resources owned by the filter prior to its destruction.
IMPORT_C void SetIncludeModifiedContacts(TBool aIncludeModified);
Sets the filter to include only contacts modified since the filter's date/time.
|
IMPORT_C void SetIncludeNewContacts(TBool aIncludeNew);
Sets the filter to include only contacts created since the filter's date/time.
|
IMPORT_C void SetIncludeDeletedContacts(TBool aIncludeDeleted);
Sets the filter to include only contacts deleted since the filter's date/time.
|
IMPORT_C TBool TestContactFilterType(TUid aTypeUid);
Tests whether a contact item type, identified by its UID is included in or excluded from the filter.
|
|
IMPORT_C 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.
|
IMPORT_C void SetContactFilterTypeCard(TBool aFilterCards);
Sets whether contact cards should be included in or excluded from the filter.
|
IMPORT_C void SetContactFilterTypeGroup(TBool aFilterGroups);
Sets whether contact card groups should be included in or excluded from the filter.
|
IMPORT_C void SetContactFilterTypeTemplate(TBool aFilterTemplates);
Sets whether contact card templates should be included in or excluded from the filter.
|
IMPORT_C void SetContactFilterTypeOwnCard(TBool aFilterOwnCard);
Sets whether own cards should be included in or excluded from the filter.
|
inline TBool ContactFilterTypeALL() const;
Tests whether all contact item types are included in the filter, as set by SetContactFilterTypeALL().
|
inline TBool ContactFilterTypeCard() const;
Tests whether contact cards are included in the filter, as set by SetContactFilterTypeCard().
|
inline TBool ContactFilterTypeGroup() const;
Tests whether contact card groups are included in the filter, as set by SetContactFilterTypeGroup().
|
inline TBool ContactFilterTypeOwnCard() const;
Tests whether own cards are included in the filter, as set by SetContactFilterTypeOwnCard().
|
inline TBool ContactFilterTypeTemplate() const;
Tests whether contact card templates are included in the filter, as set by SetContactFilterTypeTemplate().
|
inline TBool IncludeModifiedContacts();
Tests whether the filter includes only contacts modified since the filter's date/time.
|
inline TBool IncludeNewContacts();
Tests whether the filter includes only contacts created since the filter's date/time.
|
inline TBool IncludeDeletedContacts();
Tests whether the filter includes only contacts deleted since the filter's date/time.
|
inline TTime GetFilterDateTime();
Gets the date and time used by the filter, as set by SetFilterDateTime().
|
inline void SetFilterDateTime(TTime aTime);
Sets the date and time used by the filter in combination with the TInclude value to test contact items against.
|
IMPORT_C void Reset();
Resets the filter. The state value is set to EIncludeAllContacts and the contact ID array is reset.
TInclude
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.
|
TContactType
Contact item types.
|
CContactIdArray * iIds;
A pointer to an array which stores the filtered list of contact IDs.