CViewContact Class Reference
class CViewContact : public CBase |
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).
Constructor & Destructor Documentation
CViewContact(TContactItemId)
Member Functions Documentation
AddFieldL(const TDesC &)
IMPORT_C void | AddFieldL | ( | const TDesC & | aField | ) | |
ChangeToLightweightObject()
IMPORT_C void | ChangeToLightweightObject | ( | ) | |
Change the view contact object to lightweight object to save memory. It actually just delete the instance of CViewContactExtension.
ConstructL(TInt)
void | ConstructL | ( | TInt | aLength = 0 | ) | [private] |
ConstructL(const CViewContact &)
ContactHint()
IMPORT_C TInt | ContactHint | ( | ) | const |
Get this contact's hint field value
ContactMatchesFilter(TInt)
IMPORT_C TBool | ContactMatchesFilter | ( | TInt | aFilter | ) | const |
Checks if this contact matches the supplied filter.
ContactType()
Gets the view item's type.
ContactTypeUid()
IMPORT_C TUid | ContactTypeUid | ( | ) | const |
CopyL(const CViewContact &)
Copy the given view contact object to this instance.
ExternalizeL(RWriteStream &)
Parameters
RWriteStream & aStream | Stream to which the object is externalised. |
ExternalizedSize()
IMPORT_C TInt | ExternalizedSize | ( | ) | const |
Retrieves the number of bytes required to store the contact view item when externalised.
Field(TInt)
Gets a pointer descriptor to the contents of the single field located at the specified field index.
-
panic
- CNTMODEL 27 In debug builds, this indicates that aPosition is invalid. It must be less than the number of fields in the item.
Parameters
TInt aPosition | A field index. |
FieldCount()
IMPORT_C TInt | FieldCount | ( | ) | const |
Gets the number of fields in the contact view item.
FindFirstPopulatedField(TInt, TInt &)
TPtrC
| FindFirstPopulatedField | ( | TInt | aOffset, |
| TInt & | aFoundPosition |
| ) | const |
HintFieldMatchesFilter(TInt, TInt)
TBool
| HintFieldMatchesFilter | ( | TInt | aHintField, |
| TInt | aFilter |
| ) | [static] |
Compares a given hint field with any given filter. static function. Used to support member function ContactMatchesFilter and exported function ContactMatchesHintFieldL, from CContactDatabase.
Parameters
TInt aHintField | the hint bit flag field |
TInt aFilter | the filter to compare against |
InternalizeL(RReadStream &)
Parameters
RReadStream & aStream | Stream from which the object is internalised. |
IsLightweightObject()
TBool
| IsLightweightObject | ( | ) | const |
Check if the view contact object is a lightweight object.
IsSortable()
IMPORT_C TBool | IsSortable | ( | ) | const |
Test if contact is 'Sortable'
NewL(const CViewContact &)
Allocates and constructs a CViewContact object, based on an existing one.
Parameters
const CViewContact & aContact | An existing CViewContact object whose values are used to initialise the new one. |
NewL(TContactItemId, TInt)
Allocates and constructs a CViewContact object, based on an existing one.
Parameters
TContactItemId aId | ID of the existing CViewContact object whose values are used to initialise the new one. |
TInt aLength | initial MaxLenght of a contact buffer |
NewLC(TContactItemId)
Allocates and constructs a CViewContact object, based on an existing one.
Parameters
TContactItemId aId | ID of the existing CViewContact object whose values are used to initialise the new one. |
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.
SetContactHint(TInt)
IMPORT_C void | SetContactHint | ( | TInt | aHint | ) | |
Set this contact's hint field value
Parameters
TInt aHint | The new contact hint value |
SetContactType(CViewContact::TViewContactType)
Sets the view item's type.
SetContactTypeUid(TUid)
IMPORT_C void | SetContactTypeUid | ( | TUid | aUid | ) | |
Note: This method can leave.
-
leave
- KErrNoMemory The CViewContactExtension cannot be allocated.
SetFirstFieldForBlankContactL(const TDesC &)
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.
Parameters
const TDesC & aFirstField | |
Member Enumerations Documentation
Enum TViewContactType
Defines whether the contact view item is a contact group.
Enumerators
EContactItem |
The contact view item is not a contact group.
|
EGroup |
The contact view item is a contact group (CContactGroup).
|
Member Data Documentation
TViewContactType
iContactType
CViewContactExtension * iExtension
CViewContactExtension * | iExtension | [private] |
RArray< TInt > iTextIndexes
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.