CMsvFindText Class Reference

#include <mw/msvftext.h>

class CMsvFindText : public CMsgActive, public CMsgActive

Detailed Description

A utility class which searches through given plain text or rich text for a specified text string.

The class is an active object and searching can be done synchronously or asynchronously. An instance of this class can be re-used to perform multiple searches for text.

Constructor & Destructor Documentation

~CMsvFindText ( )

IMPORT_C~CMsvFindText()

Destructor.

Any outstanding search is cancelled.

Member Function Documentation

FindRichTextL ( const TDesC &, const CRichText &, TMsvPartList, TRequestStatus & )

IMPORT_C voidFindRichTextL(const TDesC &aFind,
const CRichText &aSource,
TMsvPartListaFlags,
TRequestStatus &aStatus
)

Searches for a specified text string within the given rich text asynchronously.

Parameters
aFindThe text string to search for.
aSourceThe rich text to be searched.
aFlagsA set of flags which modify the way the search works: KMsvFindCaseSensitive means the search is successful only if there is an exact case match for the text. KMsvFindWholeWord means the search is successful only if the matching text in aSource is not delimited by alphanumeric characters.
aStatusThe request status object, which is set when the search operation is complete. Use FoundText() to return the result of the search.

FindRichTextL ( const TDesC &, const CRichText &, TMsvPartList )

IMPORT_C TBoolFindRichTextL(const TDesC &aFind,
const CRichText &aSource,
TMsvPartListaFlags
)

Searches for a specified text string within the given rich text synchronously.

Parameters
aFindThe text string to search for.
aSourceThe rich text to be searched.
aFlagsA set of flags which modify the way the search works: KMsvFindCaseSensitive means the search is successful only if there is an exact case match for the text. KMsvFindWholeWord means the search is successful only if the matching text in aSource is not delimited by alphanumeric characters.
Return Value
ETrue if there is a match, otherwise EFalse.

FindTextL ( const TDesC &, const TDesC &, TMsvPartList, TRequestStatus & )

IMPORT_C voidFindTextL(const TDesC &aFind,
const TDesC &aSource,
TMsvPartListaFlags,
TRequestStatus &aStatus
)

Performs an asynchronous search for a text string within another text string.

Parameters
aFindThe text string to search for.
aSourceThe plain text to be searched.
aFlagsA set of flags which modify the way the search works: KMsvFindCaseSensitive means the search is successful only if there is an exact case match for the text. KMsvFindWholeWord means the search is successful only if the matching text in aSource is not delimited by alphanumeric characters.
aStatusThe request status object, which is set when the search operation is complete. Use FoundText() to return the result of the search.

FindTextL ( const TDesC &, const TDesC &, TMsvPartList )

IMPORT_C TBoolFindTextL(const TDesC &aFind,
const TDesC &aSource,
TMsvPartListaFlags
)

Performs a synchronous search for a text string within another text string.

Parameters
aFindThe text string to search for.
aSourceThe plain text to be searched.
aFlagsA set of flags which modify the way the search works: KMsvFindCaseSensitive means the search is successful only if there is an exact case match for the text. KMsvFindWholeWord means the search is successful only if the matching text in aSource is not delimited by alphanumeric characters.
Return Value
ETrue if there is a match, otherwise EFalse.

FoundText ( )

TBool FoundText()const [inline]

NewL ( TInt )

IMPORT_C CMsvFindText *NewL(TIntaPriority = EPriorityStandard)[static]

Creates a new find text utility object with the specified priority.

The function leaves if the object cannot be created.

Parameters
aPriorityThe priority of this active object.
Return Value
Pointer to the new find text utility object

NewLC ( TInt )

IMPORT_C CMsvFindText *NewLC(TIntaPriority = EPriorityStandard)[static]

Creates a new find text utility object with the specified priority and puts a pointer to the new object onto the cleanup stack.

The function leaves if the object cannot be created.

Parameters
aPriorityThe priority of this active object.
Return Value
Pointer to the new find text utility object