|
1 /* |
|
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef FINDITEMENGINE_H |
|
21 #define FINDITEMENGINE_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <tuladdressstringtokenizer.h> |
|
25 |
|
26 class CFindItemEngine : public CBase |
|
27 /** |
|
28 @deprecated |
|
29 @see CTulAddressStringTokenizer |
|
30 @note For compatibility with S60 only |
|
31 */ |
|
32 { |
|
33 public: |
|
34 enum TFindItemSearchCase |
|
35 { |
|
36 EFindItemSearchPhoneNumberBin = CTulAddressStringTokenizer::EFindItemSearchPhoneNumberBin, |
|
37 EFindItemSearchMailAddressBin = CTulAddressStringTokenizer::EFindItemSearchMailAddressBin, |
|
38 EFindItemSearchURLBin = CTulAddressStringTokenizer::EFindItemSearchURLBin, |
|
39 EFindItemSearchScheme = CTulAddressStringTokenizer::EFindItemSearchScheme |
|
40 }; |
|
41 |
|
42 // Struct to contain a found item. |
|
43 struct SFoundItem |
|
44 { |
|
45 TInt iStartPos; |
|
46 TInt iLength; |
|
47 TFindItemSearchCase iItemType; |
|
48 }; |
|
49 |
|
50 IMPORT_C static CFindItemEngine* NewL( const TDesC& aText, CFindItemEngine::TFindItemSearchCase aSearchCase ); |
|
51 IMPORT_C static CFindItemEngine* NewL( const TDesC& aText, CFindItemEngine::TFindItemSearchCase aSearchCase, TInt aMinNumbers ); |
|
52 IMPORT_C ~CFindItemEngine(); |
|
53 IMPORT_C TBool Item( CFindItemEngine::SFoundItem& aItem ); |
|
54 IMPORT_C TBool NextItem( CFindItemEngine::SFoundItem& aItem ); |
|
55 IMPORT_C TBool PrevItem( CFindItemEngine::SFoundItem& aItem ); |
|
56 IMPORT_C const CArrayFixFlat<CFindItemEngine::SFoundItem>* ItemArray() const; |
|
57 IMPORT_C TInt Position() const; |
|
58 IMPORT_C void ResetPosition(); |
|
59 IMPORT_C TInt ItemCount() const; |
|
60 IMPORT_C TInt DoNewSearchL( const TDesC& aText, CFindItemEngine::TFindItemSearchCase aSearchCase); |
|
61 IMPORT_C TInt DoNewSearchL( const TDesC& aText, CFindItemEngine::TFindItemSearchCase aSearchCase, TInt aMinNumbers ); |
|
62 private: |
|
63 CFindItemEngine(); |
|
64 }; |
|
65 |
|
66 #endif // FINDITEMENGINE_H |
|
67 |
|
68 // End of File |