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().
Private Member Functions | |
---|---|
CCntFilter() | |
CCntFilter(const CCntFilter *) |
Public Member Enumerations | |
---|---|
enum | TContactType { EIncludeAllTypes = 0x01, EContactCards = 0x02, EContactGroups = 0x04, EContactTemplates = 0x08, EContactOwnCard = 0x10 } |
enum | TInclude { EIncludeAllContacts, EIncludeNewContacts, EIncludeModifiedContacts, EIncludeDeletedContacts } |
Public Attributes | |
---|---|
CContactIdArray * | iIds |
Private Attributes | |
---|---|
TInt32 | iContactType |
TInclude | iInclude |
TAny * | iReserved1 |
TAny * | iReserved2 |
TTime | iSinceDateTime |
CCntFilter | ( | const CCntFilter * | aFilter | ) | [private] |
const CCntFilter * aFilter |
IMPORT_C | ~CCntFilter | ( | ) |
Deletes all resources owned by the filter prior to its destruction.
TBool | ContactFilterTypeALL | ( | ) | const [inline] |
Tests whether all contact item types are included in the filter, as set by SetContactFilterTypeALL().
TBool | ContactFilterTypeCard | ( | ) | const [inline] |
Tests whether contact cards are included in the filter, as set by SetContactFilterTypeCard().
TBool | ContactFilterTypeGroup | ( | ) | const [inline] |
Tests whether contact card groups are included in the filter, as set by SetContactFilterTypeGroup().
TBool | ContactFilterTypeOwnCard | ( | ) | const [inline] |
Tests whether own cards are included in the filter, as set by SetContactFilterTypeOwnCard().
TBool | ContactFilterTypeTemplate | ( | ) | const [inline] |
Tests whether contact card templates are included in the filter, as set by SetContactFilterTypeTemplate().
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises a CCntFilter object to a write stream.
RWriteStream & aStream | Stream to which the object should be externalised. |
TTime | GetFilterDateTime | ( | ) | [inline] |
Gets the date and time used by the filter, as set by SetFilterDateTime().
TBool | IncludeDeletedContacts | ( | ) | [inline] |
Tests whether the filter includes only contacts deleted since the filter's date/time.
TBool | IncludeModifiedContacts | ( | ) | [inline] |
Tests whether the filter includes only contacts modified since the filter's date/time.
TBool | IncludeNewContacts | ( | ) | [inline] |
Tests whether the filter includes only contacts created since the filter's date/time.
void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalises a CCntFilter object from a read stream.
RReadStream & aStream | Stream from which the object should be internalised. |
IMPORT_C CCntFilter * | NewL | ( | ) | [static] |
Allocates and constructs a default contact database filter.
IMPORT_C CCntFilter * | NewL | ( | const CCntFilter * | aFilter | ) | [static] |
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.
const CCntFilter * aFilter | Pointer to the filter to copy. |
IMPORT_C CCntFilter * | NewLC | ( | ) | [static] |
Allocates and constructs a default contact database filter.
IMPORT_C CCntFilter * | NewLC | ( | const CCntFilter * | aFilter | ) | [static] |
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.
const CCntFilter * aFilter | Pointer to the filter to copy. |
CCntFilter * | NewLC | ( | RReadStream & | aStream | ) | [static] |
Allocates and constructs a contact database filter based on a RReadStream.
The state value, type flags, the date/time value and the ID array are copied.
RReadStream & aStream | RReadStream containing object to internalize. |
IMPORT_C void | Reset | ( | ) |
Resets the filter. The state value is set to EIncludeAllContacts and the contact ID array is reset.
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.
TBool aFilterAllContacts | ETrue if all contact item types should be included in the filter, EFalse if not. |
IMPORT_C void | SetContactFilterTypeCard | ( | TBool | aFilterCards | ) |
Sets whether contact cards should be included in or excluded from the filter.
TBool aFilterCards | ETrue to include contact cards in the filter, EFalse to exclude them. |
IMPORT_C void | SetContactFilterTypeGroup | ( | TBool | aFilterGroups | ) |
Sets whether contact card groups should be included in or excluded from the filter.
TBool aFilterGroups | ETrue to include contact card groups in the filter, EFalse to exclude them. |
IMPORT_C void | SetContactFilterTypeOwnCard | ( | TBool | aFilterOwnCard | ) |
Sets whether own cards should be included in or excluded from the filter.
TBool aFilterOwnCard | ETrue to include own cards in the filter, EFalse to exclude them. |
IMPORT_C void | SetContactFilterTypeTemplate | ( | TBool | aFilterTemplates | ) |
Sets whether contact card templates should be included in or excluded from the filter.
TBool aFilterTemplates | ETrue to include contact card templates in the filter, EFalse to exclude them. |
void | SetFilterDateTime | ( | TTime | aTime | ) | [inline] |
Sets the date and time used by the filter in combination with the TInclude value to test contact items against.
TTime aTime | The new date and time value. |
IMPORT_C void | SetIncludeDeletedContacts | ( | TBool | aIncludeDeleted | ) |
Sets the filter to include only contacts deleted since the filter's date/time.
TBool aIncludeDeleted | ETrue to include only contacts deleted since the filter's date/time, EFalse to include contact items in all states. |
IMPORT_C void | SetIncludeModifiedContacts | ( | TBool | aIncludeModified | ) |
Sets the filter to include only contacts modified since the filter's date/time.
TBool aIncludeModified | ETrue to include only contacts modified since the filter's date/time, EFalse to include contact items in all states. |
IMPORT_C void | SetIncludeNewContacts | ( | TBool | aIncludeNew | ) |
Sets the filter to include only contacts created since the filter's date/time.
TBool aIncludeNew | ETrue to include only contacts created since the filter's date/time, EFalse to include contact items in all states. |
IMPORT_C TBool | TestContactFilterType | ( | TUid | aTypeUid | ) |
Tests whether a contact item type, identified by its UID is included in or excluded from the filter.
TUid aTypeUid | UID which identifies a contact item type. One of: KUidContactCard, KUidContactGroup, KUidContactCardTemplate or KUidContactOwnCard. |
Contact item types.
EIncludeAllTypes = 0x01 |
All contact item types should be included. |
EContactCards = 0x02 |
Contact cards should be included in the filter. |
EContactGroups = 0x04 |
Contact card groups should be included in the filter. |
EContactTemplates = 0x08 |
Contact card templates should be included in the filter. |
EContactOwnCard = 0x10 |
Own cards should be included in the filter. |
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. |
CContactIdArray * | iIds |
A pointer to an array which stores the filtered list of contact IDs.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.