Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: cntviewbase.h
Link against: cntmodel.lib

Class CViewContact

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

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


CViewContact()

IMPORT_C CViewContact(TContactItemId aId);

Description

Constructs a CViewContact object.

This should not be called by clients. CViewContact::NewLC() should be used instead.

Parameters

TContactItemId aId

The contact ID to assign to the object.


NewL()

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.


NewLC()

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.


~CViewContact()

IMPORT_C ~CViewContact();

Description

Destructor.

[Top]


Member functions


InternalizeL()

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.


ExternalizeL()

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.


ExternalizedSize()

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.


FieldCount()

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.


Field()

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.


ContactMatchesFilter()

IMPORT_C TBool ContactMatchesFilter(TInt aFilter) const;

Description

Checks if this contact matches the supplied filter.

Parameters

TInt aFilter

Return value

TBool

ETrue, if this contact matches the filter supplied; EFalse, otherwise.


AddFieldL()

IMPORT_C void AddFieldL(const TDesC &aField);

Description

Parameters

const TDesC &aField


Id()

inline TContactItemId Id() const;

Description

Gets the view item's ID.

Return value

TContactItemId

The view item's ID.


ContactType()

inline TViewContactType ContactType() const;

Description

Gets the view item's type.

Return value

TViewContactType

The view item's type.


SetId()

inline void SetId(TContactItemId aId);

Description

Sets the view item's ID.

Parameters

TContactItemId aId

The contact item ID.


SetContactType()

inline void SetContactType(CViewContact::TViewContactType aContactType);

Description

Sets the view item's type.

Parameters

CViewContact::TViewContactType aContactType

The view item's type.

[Top]


Member enumerations


Enum TViewContactType

TViewContactType

Description

Defines whether the contact view item is a contact group.

EContactItem

The contact view item is not a contact group.

EGroup

The contact view item is a contact group (CContactGroup).