CContactTextField Class Reference

#include <app/cntfldst.h>

class CContactTextField : public CContactFieldStorage

Inherits from

Detailed Description

Provides access to the text stored in a contact item field.

An object of this class can be retrieved using CContactItemField::TextStorage().

Constructor & Destructor Documentation

~CContactTextField ( )

IMPORT_C~CContactTextField()

Deletes the text owned by the object, prior to its destruction.

Member Function Documentation

ExternalizeL ( RWriteStream & )

voidExternalizeL(RWriteStream &aStream)const [virtual]

Reimplemented from CContactFieldStorage::ExternalizeL(RWriteStream &)const

Externalises the field data.

ParameterDescription
aStreamWrite stream to which the contents of the field should be externalised.

ExternalizeL ( RWriteStream &, TBool, TInt )

voidExternalizeL(RWriteStream &aStream,
TBoolaIsInlineBlob,
TIntaTextFieldIndex
)const

InternalizeL ( HBufC *, TInt )

voidInternalizeL(HBufC *aTextStream,
TIntaTextFieldIndex
)

InternalizeL ( RReadStream & )

voidInternalizeL(RReadStream &aStream)[virtual]

Internalises the field data.

ParameterDescription
aStreamStream from which the the contents of the field should be internalised.

IsFull ( )

TBool IsFull()const [virtual]

Tests whether the field storage contains data.

Returns: True if the field storage contains data, false if not.

RestoreL ( CStreamStore &, RReadStream & )

voidRestoreL(CStreamStore &aStore,
RReadStream &aStream
)[virtual]

Restores the field data.

ParameterDescription
aStoreReference to the store from which the object is to be restored.
aStreamReference to the stream which should be passed to InternalizeL().

SetStandardTextArray ( MDesCArray * )

IMPORT_C voidSetStandardTextArray(MDesCArray *anArray)

Converts an array of text strings from plain text into Symbian editable text, appends them to a single descriptor, separating them with the new line character, and sets this as the text which is stored in the field. Any existing field text is replaced. The text is truncated to KCntMaxTextFieldLength characters if necessary.

ParameterDescription
anArrayArray of descriptors to set as the field data.

SetStandardTextL ( const TDesC & )

IMPORT_C voidSetStandardTextL(const TDesC &aText)

Converts a text string from plain text into Symbian editable text, and sets this as the text which is stored in the field. The text is truncated to KCntMaxTextFieldLength characters if necessary.

ParameterDescription
aTextThe new field data.

SetText ( HBufC * )

IMPORT_C voidSetText(HBufC *aHbuf)

Sets the field text.

The text field object takes ownership of the specified descriptor. The function cannot leave.

ParameterDescription
aHbufThe new field text.

SetTextArray ( MDesCArray * )

IMPORT_C voidSetTextArray(MDesCArray *anArray)

Sets the field text from a descriptor array. Each descriptor in the array is appended to the text field storage. They are separated by paragraph delimiters (CEditableText::EParagraphDelimiter). Any existing text is replaced.

ParameterDescription
anArrayPointer to array of descriptors to set as the field text.

SetTextL ( const TDesC & )

IMPORT_C voidSetTextL(const TDesC &aText)

Sets the field text.

This function allocates a new HBufC descriptor, deleting any existing one, and copies the new text into it. The function can leave.

ParameterDescription
aTextThe new field text.

StandardTextLC ( )

IMPORT_C TPtrCStandardTextLC()const

Converts a copy of the text stored in the field from Symbian editable text format into plain text and returns it as a pointer descriptor.

Returns: Descriptor pointing to a copy of the field data as plain text.

StoreL ( CStreamStore & )

TStreamId StoreL(CStreamStore &aStore)const [virtual]

Stores the field data.

ParameterDescription
aStoreReference to the stream store to which the field data is written.

Returns: The ID of the stream store.

Text ( )

IMPORT_C TPtrCText()const

Gets a copy of the text which is stored in the field.

Returns: Descriptor pointing to a copy of the field data.