#include <app/cntviewbase.h>
| class CViewContact : public CBase | 
| Public Member Enumerations | |
|---|---|
| enum | TViewContactType { EContactItem, EGroup } | 
The representation of a contact item used in contact views.
It stores the contact item ID and other information. This includes a buffer holding the contents of all the item's fields, an array of indexes into the buffer indicating the start position of each field and a hint bit field (a combination of CContactDatabase::TContactViewFilter values) which is used in filtered views.
The fields are defined by the view's sort order (RContactViewSortOrder).
Defines whether the contact view item is a contact group.
| Enumerator | Value | Description | 
|---|---|---|
| EContactItem | The contact view item is not a contact group. | |
| EGroup | The contact view item is a contact group (CContactGroup). | 
| IMPORT_C | CViewContact | ( | TContactItemId | aId | ) | 
Constructs a CViewContact object.
This should not be called by clients. CViewContact::NewLC() should be used instead.
| Parameter | Description | 
|---|---|
| aId | The contact ID to assign to the object. | 
| IMPORT_C void | ChangeToLightweightObject | ( | ) | 
Change the view contact object to lightweight object to save memory. It actually just delete the instance of CViewContactExtension.
| TViewContactType | ContactType | ( | ) | const [inline] | 
Gets the view item's type.
Returns: The view item's type.
| void | CopyL | ( | const CViewContact & | aContact | ) | 
Copy the given view contact object to this instance.
| Parameter | Description | 
|---|---|
| aContact | the view contact to be copied. | 
| IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const | 
Externalises a CViewContact object to a write stream.
| Parameter | Description | 
|---|---|
| aStream | Stream to which the object is externalised. | 
| IMPORT_C TInt | ExternalizedSize | ( | ) | const | 
Retrieves the number of bytes required to store the contact view item when externalised.
Returns: The size of the contact view item.
Gets a pointer descriptor to the contents of the single field located at the specified field index.
| Parameter | Description | 
|---|---|
| aPosition | A field index. | 
Returns: The contents of the field located at the specified field index.
| IMPORT_C TInt | FieldCount | ( | ) | const | 
Gets the number of fields in the contact view item.
Returns: The number of fields in the item.
Compares a given hint field with any given filter. static function. Used to support member function ContactMatchesFilter and exported function ContactMatchesHintFieldL, from CContactDatabase.
| Parameter | Description | 
|---|---|
| aHintField | the hint bit flag field | 
| aFilter | the filter to compare against | 
| IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) | 
Internalises a CViewContact object from a read stream.
| Parameter | Description | 
|---|---|
| aStream | Stream from which the object is internalised. | 
| TBool | IsLightweightObject | ( | ) | const | 
Check if the view contact object is a lightweight object.
| IMPORT_C CViewContact * | NewL | ( | const CViewContact & | aContact | ) | [static] | 
Allocates and constructs a CViewContact object, based on an existing one.
| Parameter | Description | 
|---|---|
| aContact | An existing CViewContact object whose values are used to initialise the new one. | 
Returns: Pointer to the newly created representation of a contact item used in contact views.
| IMPORT_C CViewContact * | NewL | ( | TContactItemId | aId, | 
| TInt | aLength | |||
| ) | [static] | |||
Allocates and constructs a CViewContact object, based on an existing one.
| Parameter | Description | 
|---|---|
| aId | ID of the existing CViewContact object whose values are used to initialise the new one. | 
| aLength | initial MaxLenght of a contact buffer | 
| IMPORT_C CViewContact * | NewLC | ( | TContactItemId | aId | ) | [static] | 
Allocates and constructs a CViewContact object, based on an existing one.
| Parameter | Description | 
|---|---|
| aId | ID of the existing CViewContact object whose values are used to initialise the new one. | 
Returns: Pointer to the newly created representation of a contact item used in contact views.
| IMPORT_C void | Reset | ( | ) | 
Used for creating a view. Allows to re-use the same contact object what reduces the number of memory re-allocations. Resets the indexes array and contact buffer. The buffer MaxLength stays the same.
| IMPORT_C void | SetContactHint | ( | TInt | aHint | ) | 
Set this contact's hint field value
| Parameter | Description | 
|---|---|
| aHint | The new contact hint value | 
| void | SetContactType | ( | CViewContact::TViewContactType | aContactType | ) | [inline] | 
Sets the view item's type.
| Parameter | Description | 
|---|---|
| aContactType | The view item's type. | 
| IMPORT_C void | SetContactTypeUid | ( | TUid | aUid | ) | 
Note: This method can leave.
| IMPORT_C void | SetFirstFieldForBlankContactL | ( | const TDesC & | aFirstField | ) | 
Set the first field text for the CViewContact. Fields are stored in one HBufC. Each field can be accessed using the indexes stored in the iTextIndexes member.
| void | SetId | ( | TContactItemId | aId | ) | [inline] | 
Sets the view item's ID.
| Parameter | Description | 
|---|---|
| aId | The contact item ID. |