|
1 /* |
|
2 * Copyright (c) 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 * Description: |
|
13 * |
|
14 */ |
|
15 |
|
16 #ifndef _SEARCH_RLT_WRAPPER_H_ |
|
17 #define _SEARCH_RLT_WRAPPER_H_ |
|
18 |
|
19 #include "irdbexport.h" |
|
20 #include "irdbwrapper.h" |
|
21 |
|
22 class IRDB_DLL_EXPORT searchRltWrapper: public IRDBWrapper |
|
23 { |
|
24 public: |
|
25 searchRltWrapper(); |
|
26 ~searchRltWrapper(); |
|
27 |
|
28 public: |
|
29 /* |
|
30 * RowData: [direction: in]table row value; |
|
31 * condAND: [direction: in]condition for search searchRlt, it is AND relationship in every pair; |
|
32 * condOR: [direction: in]condition for search searchRlt, it is OR relationship in every pair; |
|
33 */ |
|
34 bool putSearchRlt(const columnMap* const RowData, |
|
35 const logoMap* const logoData = NULL, |
|
36 const columnMap* const condAND = NULL, |
|
37 const columnMap* const condOR = NULL); |
|
38 |
|
39 /* |
|
40 * If all parameters are default,all rows in searchRlt will be deleted if not violating constraint; |
|
41 * condAND: [direction: in]condition for search searchRlt, it is AND relationship in every pair; |
|
42 * condOR: [direction: in]condition for search searchRlt, it is OR relationship in every pair; |
|
43 */ |
|
44 bool deleteSearchRlt(const columnMap* const condAND = NULL, |
|
45 const columnMap* const condOR = NULL); |
|
46 |
|
47 /* |
|
48 * If all parameters are default, all rows in searchRlt will return; |
|
49 * cond1: condition for search searchRlt, it is AND relationship in every pair; |
|
50 * cond2: condition for search searchRlt, it is OR relationship in every pair; |
|
51 */ |
|
52 QList<QVariant*>* getSearchRlt(const columnMap* const condAND = NULL, |
|
53 const columnMap* const condOR = NULL); |
|
54 |
|
55 private: |
|
56 /* |
|
57 * It is called by IRDB instance; |
|
58 * IRDB instance delivers rows set to IRDBWrapper via this function; |
|
59 * the rows set is storaged in m_IRDataSet; |
|
60 */ |
|
61 bool getIRTableCB(QSqlQuery& aIRDataSet, |
|
62 QList<QVariant*>* pDataSet); |
|
63 |
|
64 private: |
|
65 /* |
|
66 * search channelId according to parameter; |
|
67 * condUserCidStr:[direction: in]specific condition(where) string for user-define uid; |
|
68 * condAND: [direction: in]condition for search channelHistory, it is AND relationship in every pair; |
|
69 * condOR: [direction: in]condition for search channelHistory, it is OR relationship in every pair; |
|
70 * uint: return channelId; |
|
71 */ |
|
72 uint srhChannelId(QString& condUserCidStr, |
|
73 const columnMap* const condAND, |
|
74 const columnMap* const condOR = NULL); |
|
75 |
|
76 }; |
|
77 |
|
78 #endif |