#include <app/cntviewbase.h>
class CViewContact : public CBase, 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.
Parameters | |
---|---|
aId | The contact ID to assign to the object. |
IMPORT_C void | AddFieldL | ( | const TDesC & | aField | ) |
IMPORT_C void | ChangeToLightweightObject | ( | ) |
Change the view contact object to lightweight object to save memory. It actually just delete the instance of CViewContactExtension.
IMPORT_C TInt | ContactHint | ( | ) | const |
Get this contact's hint field value
Checks if this contact matches the supplied filter.
TViewContactType | ContactType | ( | ) | const [inline] |
Gets the view item's type.
IMPORT_C TUid | ContactTypeUid | ( | ) | const |
void | CopyL | ( | const CViewContact & | aContact | ) |
Copy the given view contact object to this instance.
Parameters | |
---|---|
aContact | the view contact to be copied. |
Leave Codes | |
---|---|
KErrNoMemory |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises a CViewContact object to a write stream.
Parameters | |
---|---|
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.
Gets a pointer descriptor to the contents of the single field located at the specified field index.
Parameters | |
---|---|
aPosition | A field index. |
Panic Codes | |
---|---|
CNTMODEL | 27 In debug builds, this indicates that aPosition is invalid. It must be less than the number of fields in the item. |
IMPORT_C TInt | FieldCount | ( | ) | const |
Gets the number of fields in the contact view item.
Compares a given hint field with any given filter. static function. Used to support member function ContactMatchesFilter and exported function ContactMatchesHintFieldL, from CContactDatabase.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
aContact | An existing CViewContact object whose values are used to initialise the new one. |
IMPORT_C CViewContact * | NewL | ( | TContactItemId | aId, |
TInt | aLength | |||
) | [static] |
Allocates and constructs a CViewContact object, based on an existing one.
Parameters | |
---|---|
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.
Parameters | |
---|---|
aId | ID of the existing CViewContact object whose values are used to initialise the new one. |
CViewContact * | NewLC | ( | RReadStream & | aStream | ) | [static] |
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
Parameters | |
---|---|
aHint | The new contact hint value |
void | SetContactType | ( | CViewContact::TViewContactType | aContactType | ) | [inline] |
Sets the view item's type.
Parameters | |
---|---|
aContactType | The view item's type. |
IMPORT_C void | SetContactTypeUid | ( | TUid | aUid | ) |
Note: This method can leave.
Leave Codes | |
---|---|
KErrNoMemory | The CViewContactExtension cannot be allocated. |
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.