1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MSVFTEXT_H__
17 #define __MSVFTEXT_H__
27 class CMsvFindText : public CMsgActive
28 /** A utility class which searches through given plain text or rich text for a
29 specified text string.
31 The class is an active object and searching can be done synchronously or asynchronously.
32 An instance of this class can be re-used to perform multiple searches for
39 IMPORT_C static CMsvFindText* NewLC(TInt aPriority = EPriorityStandard);
40 IMPORT_C static CMsvFindText* NewL(TInt aPriority = EPriorityStandard);
41 IMPORT_C ~CMsvFindText();
43 IMPORT_C void FindTextL(const TDesC& aFind, const TDesC& aSource, TMsvPartList aFlags, TRequestStatus& aStatus);
44 IMPORT_C void FindRichTextL(const TDesC& aFind, const CRichText& aSource, TMsvPartList aFlags, TRequestStatus& aStatus);
46 IMPORT_C TBool FindTextL(const TDesC& aFind, const TDesC& aSource, TMsvPartList aFlags);
47 IMPORT_C TBool FindRichTextL(const TDesC& aFind, const CRichText& aSource, TMsvPartList aFlags);
49 inline TBool FoundText() const;
52 CMsvFindText(TInt aPriority);
54 void InitialiseL(const TDesC& aFind, const TDesC* aPlainSource, const CRichText* aRichSource, TMsvPartList aFlags);
55 void DoFindAsyncL(TRequestStatus& aStatus);
56 void DoComplete(TInt&);
69 const CRichText* iRichText;
70 const TDesC* iPlainText;
77 #include <msvftext.inl>