#include <app/cntfldst.h>
class CContactTextField : public CContactFieldStorage, public CContactFieldStorage |
Public Member Functions | |
---|---|
~CContactTextField() | |
virtual void | ExternalizeL(RWriteStream &) |
void | ExternalizeL(RWriteStream &, TBool, TInt) |
void | InternalizeL(HBufC *, TInt) |
virtual void | InternalizeL(RReadStream &) |
virtual TBool | IsFull() |
virtual void | RestoreL(CStreamStore &, RReadStream &) |
IMPORT_C void | SetStandardTextArray(MDesCArray *) |
IMPORT_C void | SetStandardTextArray(MDesC16Array *) |
IMPORT_C void | SetStandardTextL(const TDesC &) |
IMPORT_C void | SetText(HBufC *) |
IMPORT_C void | SetTextArray(MDesCArray *) |
IMPORT_C void | SetTextArray(MDesC16Array *) |
IMPORT_C void | SetTextL(const TDesC &) |
IMPORT_C TPtrC | StandardTextLC() |
virtual TStreamId | StoreL(CStreamStore &) |
IMPORT_C TPtrC | Text() |
Provides access to the text stored in a contact item field.
An object of this class can be retrieved using CContactItemField::TextStorage().
IMPORT_C | ~CContactTextField | ( | ) |
Deletes the text owned by the object, prior to its destruction.
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const [virtual] |
Reimplemented from CContactFieldStorage::ExternalizeL(RWriteStream &)const
Externalises the field data.
Parameters | |
---|---|
aStream | Write stream to which the contents of the field should be externalised. |
void | ExternalizeL | ( | RWriteStream & | aStream, |
TBool | aIsInlineBlob, | |||
TInt | aTextFieldIndex | |||
) | const |
void | InternalizeL | ( | RReadStream & | aStream | ) | [virtual] |
Reimplemented from CContactFieldStorage::InternalizeL(RReadStream &)
Internalises the field data.
Parameters | |
---|---|
aStream | Stream from which the the contents of the field should be internalised. |
TBool | IsFull | ( | ) | const [virtual] |
Reimplemented from CContactFieldStorage::IsFull()const
Tests whether the field storage contains data.
void | RestoreL | ( | CStreamStore & | aStore, |
RReadStream & | aStream | |||
) | [virtual] |
Reimplemented from CContactFieldStorage::RestoreL(CStreamStore &,RReadStream &)
Restores the field data.
Parameters | |
---|---|
aStore | Reference to the store from which the object is to be restored. |
aStream | Reference to the stream which should be passed to InternalizeL(). |
IMPORT_C void | SetStandardTextArray | ( | 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.
Parameters | |
---|---|
anArray | Array of descriptors to set as the field data. |
IMPORT_C void | SetStandardTextArray | ( | MDesC16Array * | anArray | ) |
IMPORT_C void | SetStandardTextL | ( | 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.
Parameters | |
---|---|
aText | The new field data. |
IMPORT_C void | SetText | ( | HBufC * | aHbuf | ) |
Sets the field text.
The text field object takes ownership of the specified descriptor. The function cannot leave.
Parameters | |
---|---|
aHbuf | The new field text. |
IMPORT_C void | SetTextArray | ( | 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.
Parameters | |
---|---|
anArray | Pointer to array of descriptors to set as the field text. |
IMPORT_C void | SetTextArray | ( | MDesC16Array * | anArray | ) |
IMPORT_C void | SetTextL | ( | 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.
Parameters | |
---|---|
aText | The new field text. |
IMPORT_C TPtrC | StandardTextLC | ( | ) | 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.
TStreamId | StoreL | ( | CStreamStore & | aStore | ) | const [virtual] |
Reimplemented from CContactFieldStorage::StoreL(CStreamStore &)const
Stores the field data.
Parameters | |
---|---|
aStore | Reference to the stream store to which the field data is written. |
IMPORT_C TPtrC | Text | ( | ) | const |
Gets a copy of the text which is stored in the field.