CContactItemViewDef Class Reference

class CContactItemViewDef : public CBase

A view definition for a contact item.

When reading or opening a contact item using the CContactDatabase class, a view definition may be specified to indicate which field data should be retrieved. See for instance CContactDatabase::ReadContactL().

A view definition for a contact item contains an array of field types, a use (CContactItemViewDef::TUse) and a mode (CContactItemViewDef::TMode). The use indicates whether the field types contained in the view definition should be included in or excluded from the view. The mode indicates whether fields with the hidden attribute should be included or excluded.

Inherits from

Constructor & Destructor Documentation

CContactItemViewDef(TUse, TMode)

CContactItemViewDef(TUseaUse,
TModeaMode
)[private]

Parameters

TUse aUse
TMode aMode

Member Functions Documentation

AddL(TFieldType)

IMPORT_C voidAddL(TFieldTypeaFieldType)

Parameters

TFieldType aFieldType

Contains(const CContactItem &)

IMPORT_C TBoolContains(const CContactItem &aItem)

Parameters

const CContactItem & aItem

Count()

TInt Count()const [inline]

Gets the number of field types in the view definition.

The number of field types in the view definition.

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

Find(const CContentType &)

IMPORT_C TIntFind(const CContentType &aContentType)const

Parameters

const CContentType & aContentType

Find(TFieldType)

IMPORT_C TIntFind(TFieldTypeaFieldType)const

Parameters

TFieldType aFieldType

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Parameters

RReadStream & aStream

MatchesAll()

IMPORT_C TBoolMatchesAll()const

Mode()

TMode Mode()const [inline]

Gets the view definition's mode.

The current TMode setting.

NewL(TUse, TMode)

IMPORT_C CContactItemViewDef *NewL(TUseaUse,
TModeaMode
)[static]

Parameters

TUse aUse
TMode aMode

NewLC(TUse, TMode)

IMPORT_C CContactItemViewDef *NewLC(TUseaUse,
TModeaMode
)[static]

Parameters

TUse aUse
TMode aMode

NewLC(RReadStream &)

CContactItemViewDef *NewLC(RReadStream &aStream)[static]

Parameters

RReadStream & aStream

Remove(TFieldType)

IMPORT_C voidRemove(TFieldTypeaFieldType)

Parameters

TFieldType aFieldType

Remove(TInt)

IMPORT_C voidRemove(TIntaIndex)

Parameters

TInt aIndex

Reset()

voidReset()[inline]

Deletes all field types from the view definition's field type array.

SetMode(TMode)

voidSetMode(TModeaMode)[inline]

Sets the view definition's mode.

Parameters

TMode aModeThe new TMode setting.

SetUse(TUse)

voidSetUse(TUseaUse)[inline]

Sets the view definition's use.

Parameters

TUse aUseThe new TUse setting.

Use()

TUse Use()const [inline]

Gets the view definition's use.

The current TUse setting.

operator[](TInt)

TUid operator[](TIntaIndex)const [inline]

Gets the field type located at a specified index position within the field type array.

The field type located at index aIndex within the array (this is equivalent to a TFieldType).

Parameters

TInt aIndexThe position of the field type in the array, relative to zero. It must be non-negative and less than the number of objects in the array otherwise the function raises a panic.

Member Enumerations Documentation

Enum TMode

Include or exclude hidden fields.

Enumerators

EIncludeHiddenFields

Include hidden fields in the view.

EMaskHiddenFields

Exclude hidden fields from the view.

Enum TUse

Include or exclude specified fields.

Enumerators

EIncludeFields

Include specified fields in the view.

EMaskFields

Exclude specified fields from the view.

Member Data Documentation

CArrayFixFlat< TUid > iFieldTypes

CArrayFixFlat< TUid >iFieldTypes[private]

TMode iMode

TMode iMode[private]

TUse iUse

TUse iUse[private]