EPOC   SDK Home Glossary Indexes Previous Next Up

CContactTextField class


Contents


CContactTextField class — Storage for field text

Section Contents


Overview

Compatibility

Applications that use this class will not work correctly on a version of EPOC earlier than ER5.

Derivation

CBase

Abstract: CBase behaviour

CContactFieldStorage

Abstract: Field data storage.

Defined in

cntfldst.h

Link against

cntmodel.lib

Description

This class is used to store, set and retrieve the text contained in a contact item field.

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


Set / get text


SetTextL() — Allocate and set the text

void SetTextL(const TDesC& aText);

Description

Set the text to be stored in the field. This function allocates a new HBufC descriptor, freeing any existing descriptor, and copies aText into it.

On return, the referenced descriptor aText can be safely discarded.

Arguments

const TDesC& aText

The new field text.


SetText() — Set the text

void SetText(HBufC *aHbuf);

Description

Set the text to be stored in the field. This function takes ownership of the descriptor aHbuf.

Arguments

HBufC *aHbuf

The new field text.


Text() — Get the text

TPtrC Text() const;

Description

Retrieve the text stored in the field.

Return value

TPtrC

Descriptor pointing to the location of the text string stored in the field.

EPOC       SDK Home Glossary Indexes Previous Next Up