CContactItemFieldSet Class Reference

class CContactItemFieldSet : public CBase

A contact item's field set. The field set owns an array of contact item fields (CContactItemFields). The field set is owned by a contact item, and can be retrieved using CContactItem::CardFields(). Use functions in class CContactItem to add and remove fields to/from the field set.

A field set can contain more than one field of the same type, but this is not advisable as it may cause problems when synchronising the contacts database.

Inherits from

  • CContactItemFieldSet
Public Member Functions
~CContactItemFieldSet()
IMPORT_C CContactItemFieldSet &AddL(CContactItemField &)
CArrayFix< TFieldHeader > *ConstructFieldHeaderArrayLC(RWriteStream &, CStreamStore &)
TBool ContainsFieldTypeMapping(const CContentType &, const TFieldType &)
TInt Count()
voidExternalizeL(RWriteStream &)
TInt FieldText(TFieldType, TDes &, TInt)
TInt FieldTypeCount(const CContactItemFieldSet &, TInt, const CContactItemField &)
TInt Find(TFieldType)
TInt Find(TFieldType, TUid)
IMPORT_C TIntFindNext(TFieldType, TInt)
IMPORT_C TIntFindNext(TFieldType, TUid, TInt)
IMPORT_C voidInsertL(TInt, CContactItemField &)
voidInternalizeL(RReadStream &)
IMPORT_C voidMove(TInt, TInt)
IMPORT_C CContactItemFieldSet *NewL()
IMPORT_C CContactItemFieldSet *NewLC()
IMPORT_C voidRemove(TInt)
voidReset()
IMPORT_C voidRestoreL(CStreamStore &, TStreamId, CStreamStore *, const CContactItemViewDef &, RReadStream &)
IMPORT_C voidRestoreL(CStreamStore &, TStreamId, CStreamStore *, const CContactItemViewDef &, const CContactItem *, HBufC *)
IMPORT_C TStreamIdStoreL(CStreamStore &, RWriteStream &, CStreamStore &)
TStreamId StoreL(CStreamStore &, RWriteStream &, CStreamStore &, CContactTables *)
IMPORT_C voidUpdateFieldL(const CContactItemField &, TInt)
IMPORT_C voidUpdateFieldSyncL(const CContactItemField &, TInt)
const CContactItemField &operator[](TInt)
CContactItemField &operator[](TInt)
Private Member Functions
CContactItemFieldSet()
voidConstructL()
const CContactItemField *FindById(TInt)
HBufC *LoadTextStreamLC(RReadStream &)
TInt MatchTemplateField(const CContentType &, TUint, TBool &)
voidNonZeroFieldText(TFieldType, TDes &)
voidRestoreAndAddTemplateL(CStreamStore &, TStreamId, CStreamStore *, const CContactItemViewDef &, const CContactItem *, RReadStream &, CContactTables *, RArray< TInt > *)
voidRestoreL(CStreamStore &, TStreamId, CStreamStore *, const CContactItemViewDef &, const CContactItem *, RReadStream &, CContactTables *, RArray< TInt > *)
voidSetFieldId(CContactItemField &)
IMPORT_C TStreamIdStoreL(CStreamStore &, const CContactItem *, RWriteStream &, CStreamStore &, CContactTables *)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CArrayPtr< CContactItemField > *iFields

Constructor & Destructor Documentation

CContactItemFieldSet()

CContactItemFieldSet()[private]

~CContactItemFieldSet()

IMPORT_C~CContactItemFieldSet()

Member Functions Documentation

AddL(CContactItemField &)

IMPORT_C CContactItemFieldSet &AddL(CContactItemField &aField)

Parameters

CContactItemField & aField

ConstructFieldHeaderArrayLC(RWriteStream &, CStreamStore &)

CArrayFix< TFieldHeader > *ConstructFieldHeaderArrayLC(RWriteStream &aTextStream,
CStreamStore &aBlobStore
)

Parameters

RWriteStream & aTextStream
CStreamStore & aBlobStore

ConstructL()

voidConstructL()[private]

ContainsFieldTypeMapping(const CContentType &, const TFieldType &)

TBool ContainsFieldTypeMapping(const CContentType &aBaseFieldContentType,
const TFieldType &aContactFieldType
)const

Parameters

const CContentType & aBaseFieldContentType
const TFieldType & aContactFieldType

Count()

TInt Count()const [inline]

Gets the number of fields in the field set.

The number of fields in the field set.

ExternalizeL(RWriteStream &)

voidExternalizeL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

FieldText(TFieldType, TDes &, TInt)

TInt FieldText(TFieldTypeaFieldType,
TDes &aText,
TIntaStartPosition
)const

Parameters

TFieldType aFieldType
TDes & aText
TInt aStartPosition

FieldTypeCount(const CContactItemFieldSet &, TInt, const CContactItemField &)

TInt FieldTypeCount(const CContactItemFieldSet &aSystemTemplateFields,
TIntaStartIndex,
const CContactItemField &aField
)const

Parameters

const CContactItemFieldSet & aSystemTemplateFields
TInt aStartIndex
const CContactItemField & aField

Find(TFieldType)

TInt Find(TFieldTypeaFieldType)const [inline]

Finds the first field in the field set with the specified field type.

If found, the index of the field within the field set, or KErrNotFound if not found.

Parameters

TFieldType aFieldTypeThe field type of interest.

Find(TFieldType, TUid)

TInt Find(TFieldTypeaFieldType,
TUidaMapping
)const [inline]

Finds the first field in the field set containing both the content type mapping and the field type specified.

If found, the index of the field within the field set, or KErrNotFound if not found.

Parameters

TFieldType aFieldTypeThe field type of interest.
TUid aMappingThe content type mapping of interest.

FindById(TInt)

const CContactItemField *FindById(TIntaId)const [private]

Parameters

TInt aId

FindNext(TFieldType, TInt)

IMPORT_C TIntFindNext(TFieldTypeaFieldType,
TIntaStartPos =  KContactFieldSetSearchAll
)const

Parameters

TFieldType aFieldType
TInt aStartPos =  KContactFieldSetSearchAll

FindNext(TFieldType, TUid, TInt)

IMPORT_C TIntFindNext(TFieldTypeaFieldType,
TUidaMapping,
TIntaStartPos =  KContactFieldSetSearchAll
)const

Parameters

TFieldType aFieldType
TUid aMapping
TInt aStartPos =  KContactFieldSetSearchAll

InsertL(TInt, CContactItemField &)

IMPORT_C voidInsertL(TIntaIndex,
CContactItemField &aField
)

Parameters

TInt aIndex
CContactItemField & aField

InternalizeL(RReadStream &)

voidInternalizeL(RReadStream &aStream)

Parameters

RReadStream & aStream

LoadTextStreamLC(RReadStream &)

HBufC *LoadTextStreamLC(RReadStream &aStream)[private, static]

Parameters

RReadStream & aStream

MatchTemplateField(const CContentType &, TUint, TBool &)

TInt MatchTemplateField(const CContentType &aContentType,
TUintaUserFlags,
TBool &aExactMatch
)const [private]

Parameters

const CContentType & aContentType
TUint aUserFlags
TBool & aExactMatch

Move(TInt, TInt)

IMPORT_C voidMove(TIntaFrom,
TIntaTo
)

Parameters

TInt aFrom
TInt aTo

NewL()

IMPORT_C CContactItemFieldSet *NewL()[static]

NewLC()

IMPORT_C CContactItemFieldSet *NewLC()[static]

NonZeroFieldText(TFieldType, TDes &)

voidNonZeroFieldText(TFieldTypeaFieldType,
TDes &aText
)const [private]

Parameters

TFieldType aFieldType
TDes & aText

Remove(TInt)

IMPORT_C voidRemove(TIntaIndex)

Parameters

TInt aIndex

Reset()

voidReset()[inline]

Deletes all fields in the field set.

RestoreAndAddTemplateL(CStreamStore &, TStreamId, CStreamStore *, const CContactItemViewDef &, const CContactItem *, RReadStream &, CContactTables *, RArray< TInt > *)

voidRestoreAndAddTemplateL(CStreamStore &aStore,
TStreamIdaId,
CStreamStore *aBlobStore,
const CContactItemViewDef &aViewDef,
const CContactItem *aTemplate,
RReadStream &aReadStream,
CContactTables *aContactsTable,
RArray< TInt > *aEmailIdArray
)[private]

Parameters

CStreamStore & aStore
TStreamId aId
CStreamStore * aBlobStore
const CContactItemViewDef & aViewDef
const CContactItem * aTemplate
RReadStream & aReadStream
CContactTables * aContactsTable
RArray< TInt > * aEmailIdArray

RestoreL(CStreamStore &, TStreamId, CStreamStore *, const CContactItemViewDef &, RReadStream &)

IMPORT_C voidRestoreL(CStreamStore &aStore,
TStreamIdanId,
CStreamStore *aBlobStore,
const CContactItemViewDef &aViewDef,
RReadStream &aReadStream
)

Parameters

CStreamStore & aStore
TStreamId anId
CStreamStore * aBlobStore
const CContactItemViewDef & aViewDef
RReadStream & aReadStream

RestoreL(CStreamStore &, TStreamId, CStreamStore *, const CContactItemViewDef &, const CContactItem *, HBufC *)

IMPORT_C voidRestoreL(CStreamStore &aStore,
TStreamIdanId,
CStreamStore *aBlobStore,
const CContactItemViewDef &aViewDef,
const CContactItem *aTemplate,
HBufC *aTextBuf
)

Parameters

CStreamStore & aStore
TStreamId anId
CStreamStore * aBlobStore
const CContactItemViewDef & aViewDef
const CContactItem * aTemplate
HBufC * aTextBuf

RestoreL(CStreamStore &, TStreamId, CStreamStore *, const CContactItemViewDef &, const CContactItem *, RReadStream &, CContactTables *, RArray< TInt > *)

voidRestoreL(CStreamStore &aStore,
TStreamIdanId,
CStreamStore *aBlobStore,
const CContactItemViewDef &aViewDef,
const CContactItem *aTemplate,
RReadStream &aReadStream,
CContactTables *aContactsTable,
RArray< TInt > *aEmailIdArray
)[private]

Parameters

CStreamStore & aStore
TStreamId anId
CStreamStore * aBlobStore
const CContactItemViewDef & aViewDef
const CContactItem * aTemplate
RReadStream & aReadStream
CContactTables * aContactsTable
RArray< TInt > * aEmailIdArray

SetFieldId(CContactItemField &)

voidSetFieldId(CContactItemField &aField)[private]

Parameters

CContactItemField & aField

StoreL(CStreamStore &, RWriteStream &, CStreamStore &)

IMPORT_C TStreamIdStoreL(CStreamStore &aStore,
RWriteStream &aTextStream,
CStreamStore &aBlobStore
)

Parameters

CStreamStore & aStore
RWriteStream & aTextStream
CStreamStore & aBlobStore

StoreL(CStreamStore &, RWriteStream &, CStreamStore &, CContactTables *)

TStreamId StoreL(CStreamStore &aStore,
RWriteStream &aTextStream,
CStreamStore &aBlobStore,
CContactTables *aTables
)

Parameters

CStreamStore & aStore
RWriteStream & aTextStream
CStreamStore & aBlobStore
CContactTables * aTables

StoreL(CStreamStore &, const CContactItem *, RWriteStream &, CStreamStore &, CContactTables *)

IMPORT_C TStreamIdStoreL(CStreamStore &aStore,
const CContactItem *aTemplate,
RWriteStream &aStream,
CStreamStore &aBlobStore,
CContactTables *aTables
)[private]

Parameters

CStreamStore & aStore
const CContactItem * aTemplate
RWriteStream & aStream
CStreamStore & aBlobStore
CContactTables * aTables

UpdateFieldL(const CContactItemField &, TInt)

IMPORT_C voidUpdateFieldL(const CContactItemField &aField,
TIntaMatchCount
)

Parameters

const CContactItemField & aField
TInt aMatchCount

UpdateFieldSyncL(const CContactItemField &, TInt)

IMPORT_C voidUpdateFieldSyncL(const CContactItemField &aField,
TIntaMatchCount
)

Parameters

const CContactItemField & aField
TInt aMatchCount

operator[](TInt)

const CContactItemField &operator[](TIntaIndex)const [inline]

Gets the field located at a specified position in the field set.

A const reference to an element in the array.

Parameters

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

operator[](TInt)

CContactItemField &operator[](TIntaIndex)[inline]

Gets the field located at a specified position in the field set.

A non-const reference to an element in the array.

Parameters

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

Member Data Documentation

CArrayPtr< CContactItemField > * iFields

CArrayPtr< CContactItemField > *iFields[private]