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