»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Application Engines CNTMODEL »
CViewContact
Location:
cntviewbase.h
Link against: cntmodel.lib
class CViewContact : public CBase;
Description
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
).
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CViewContact
- The representation of a contact item used in contact views
Members
Defined in CViewContact
:
AddFieldL()
, CViewContact()
, ContactMatchesFilter()
, ContactType()
, EContactItem
, EGroup
, ExternalizeL()
, ExternalizedSize()
, Field()
, FieldCount()
, Id()
, InternalizeL()
, NewL()
, NewLC()
, SetContactType()
, SetId()
, TViewContactType
, ~CViewContact()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Construction and destruction
IMPORT_C CViewContact(TContactItemId aId);
Description
Constructs a CViewContact object.
This should not be called by clients. CViewContact::NewLC()
should be used instead.
Parameters
static IMPORT_C CViewContact *NewL(const CViewContact &aContact);
Description
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.
|
|
Return value
CViewContact *
|
Pointer to the newly created representation of a contact item used in contact views.
|
|
static IMPORT_C CViewContact *NewLC(TContactItemId aId);
Description
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.
|
|
Return value
CViewContact *
|
Pointer to the newly created representation of a contact item used in contact views.
|
|
IMPORT_C ~CViewContact();
Description
Destructor.
IMPORT_C void InternalizeL(RReadStream &aStream);
Description
Internalises a CViewContact object from a read stream.
Parameters
RReadStream &aStream |
Stream from which the object is internalised.
|
|
IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Description
Externalises a CViewContact object to a write stream.
Parameters
RWriteStream &aStream |
Stream to which the object is externalised.
|
|
IMPORT_C TInt ExternalizedSize() const;
Description
Retrieves the number of bytes required to store the contact view item when externalised.
Return value
TInt
|
The size of the contact view item.
|
|
IMPORT_C TInt FieldCount() const;
Description
Gets the number of fields in the contact view item.
Return value
TInt
|
The number of fields in the item.
|
|
IMPORT_C TPtrC Field(TInt aPosition) const;
Description
Gets a pointer descriptor to the contents of the single field located at the specified field index.
Parameters
TInt aPosition |
A field index.
|
|
Return value
TPtrC
|
The contents of the field located at the specified 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 TBool ContactMatchesFilter(TInt aFilter) const;
Description
Checks if this contact matches the supplied filter.
Parameters
Return value
TBool
|
ETrue, if this contact matches the filter supplied; EFalse, otherwise.
|
|
IMPORT_C void AddFieldL(const TDesC &aField);
Description
Parameters
inline TContactItemId Id() const;
Description
Gets the view item's ID.
Return value
inline TViewContactType ContactType() const;
Description
Gets the view item's type.
Return value
inline void SetId(TContactItemId aId);
Description
Sets the view item's ID.
Parameters
inline void SetContactType(CViewContact::TViewContactType aContactType);
Description
Sets the view item's type.
Parameters
TViewContactType
Description
Defines whether the contact view item is a contact group.