Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: CNTFLDST.H
Link against: cntmodel.lib

Class CContactTextField

class CContactTextField : public CContactFieldStorage;

Description

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

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

Derivation

Members

Defined in CContactTextField:
CContactFieldStorage_Reserved1(), ExternalizeL(), InternalizeL(), IsFull(), RestoreL(), SetStandardTextArray(), SetStandardTextL(), SetText(), SetTextArray(), SetTextL(), StandardTextLC(), StoreL(), Text(), ~CContactTextField()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


~CContactTextField()

IMPORT_C ~CContactTextField();

Description

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

[Top]


Member functions


InternalizeL()

virtual void InternalizeL(RReadStream &aStream);

Description

Internalises the field data.

Parameters

RReadStream &aStream

Stream from which the the contents of the field should be internalised.


ExternalizeL()

virtual void ExternalizeL(RWriteStream &aStream) const;

Description

Externalises the field data.

Parameters

RWriteStream &aStream

Write stream to which the contents of the field should be externalised.


StoreL()

virtual TStreamId StoreL(CStreamStore &aStore) const;

Description

Stores the field data.

Parameters

CStreamStore &aStore

Reference to the stream store to which the field data is written.

Return value

TStreamId

The ID of the stream store.


RestoreL()

virtual void RestoreL(CStreamStore &aStore, RReadStream &aStream);

Description

Restores the field data.

Parameters

CStreamStore &aStore

Reference to the store from which the object is to be restored.

RReadStream &aStream

Reference to the stream which should be passed to InternalizeL().


SetTextL()

IMPORT_C void SetTextL(const TDesC &aText);

Description

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.

Parameters

const TDesC &aText

The new field text.


SetText()

IMPORT_C void SetText(HBufC *aHbuf);

Description

Sets the field text.

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

Parameters

HBufC *aHbuf

The new field text.


SetTextArray()

IMPORT_C void SetTextArray(MDesC16Array *anArray);

Description

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.

Parameters

MDesC16Array *anArray

Pointer to array of descriptors to set as the field text.


Text()

IMPORT_C TPtrC Text() const;

Description

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

Return value

TPtrC

Descriptor pointing to a copy of the field data.


IsFull()

virtual TBool IsFull() const;

Description

Tests whether the field storage contains data.

Return value

TBool

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


StandardTextLC()

IMPORT_C TPtrC StandardTextLC() const;

Description

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.

Return value

TPtrC

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


SetStandardTextL()

IMPORT_C void SetStandardTextL(const TDesC &aText);

Description

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.

Parameters

const TDesC &aText

The new field data.


SetStandardTextArray()

IMPORT_C void SetStandardTextArray(MDesC16Array *anArray);

Description

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.

Parameters

MDesC16Array *anArray

Array of descriptors to set as the field data.


CContactFieldStorage_Reserved1()

private: virtual IMPORT_C void CContactFieldStorage_Reserved1();

Description