|
1 /* |
|
2 * Copyright (c) 2010 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 @file |
|
21 @internalComponent |
|
22 @released |
|
23 */ |
|
24 |
|
25 |
|
26 #ifndef __CQWERTYPREDICTIVESEARCHTABLE_H__ |
|
27 #define __CQWERTYPREDICTIVESEARCHTABLE_H__ |
|
28 |
|
29 #include "pltables.h" |
|
30 #include <QList> |
|
31 |
|
32 class CContactItem; |
|
33 class RSqlDatabase; |
|
34 class QStringList; |
|
35 |
|
36 |
|
37 /** |
|
38 CQwertyPredictiveSearchTable class manages the predictive search tables related |
|
39 to the virtual QWERTY keyboard. |
|
40 */ |
|
41 NONSHARABLE_CLASS(CQwertyPredictiveSearchTable) : public CPplPredictiveSearchTableBase |
|
42 { |
|
43 public: |
|
44 static CQwertyPredictiveSearchTable* NewL(RSqlDatabase& aDatabase); |
|
45 static CQwertyPredictiveSearchTable* NewLC(RSqlDatabase& aDatabase); |
|
46 ~CQwertyPredictiveSearchTable(); |
|
47 |
|
48 public: // From CPplPredictiveSearchTableBase |
|
49 void CreateTableL(); |
|
50 |
|
51 QList<QChar> FillAllTables() const; |
|
52 |
|
53 private: // From CPplPredictiveSearchTableBase |
|
54 HBufC* TableNameL(const QChar aCh) const; |
|
55 TBool IsValidChar(const QChar aChar) const; |
|
56 |
|
57 void FillKeyboardSpecificFieldsL(RSqlStatement& aSqlStatement, |
|
58 QStringList aTokens); |
|
59 QStringList GetTableSpecificFields(const CContactItem& aItem, |
|
60 TBool& aMandatoryFieldsPresent) const; |
|
61 |
|
62 private: |
|
63 void ConstructL(); |
|
64 CQwertyPredictiveSearchTable(RSqlDatabase& aDatabase); |
|
65 |
|
66 |
|
67 // For unit testing |
|
68 friend class UT_CQwertyPredictiveSearchTable; |
|
69 }; |
|
70 |
|
71 #endif // __CQWERTYPREDICTIVESEARCHTABLE_H__ |