|
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 _SONG_HISTORY_WRAPPER_H_ |
|
17 #define _SONG_HISTORY_WRAPPER_H_ |
|
18 |
|
19 #include "irdbexport.h" |
|
20 #include "irdbwrapper.h" |
|
21 |
|
22 class IRDB_DLL_EXPORT songHistoryWrapper: public IRDBWrapper |
|
23 { |
|
24 public: |
|
25 songHistoryWrapper(); |
|
26 ~songHistoryWrapper(); |
|
27 |
|
28 public: |
|
29 /* |
|
30 * RowData: [direction: in]table row value; |
|
31 * condAND: [direction: in]condition for search songHistory, it is AND relationship in every pair; |
|
32 * condOR: [direction: in]condition for search songHistory, it is OR relationship in every pair; |
|
33 */ |
|
34 bool putSongHistory(const columnMap* const RowData, |
|
35 const columnMap* const condAND = NULL, |
|
36 const columnMap* const condOR = NULL); |
|
37 |
|
38 /* |
|
39 * If all parameters are default,all rows in songHistory will be deleted if not violating constraint; |
|
40 * condAND: [direction: in]condition for search songHistory, it is AND relationship in every pair; |
|
41 * condOR: [direction: in]condition for search songHistory, it is OR relationship in every pair; |
|
42 */ |
|
43 bool deleteSongHistory(const columnMap* const condAND = NULL, |
|
44 const columnMap* const condOR = NULL); |
|
45 |
|
46 /* |
|
47 * If all parameters are default, all rows in songHistory will return; |
|
48 * cond1: condition for search songHistory, it is AND relationship in every pair; |
|
49 * cond2: condition for search songHistory, it is OR relationship in every pair; |
|
50 */ |
|
51 QList<QVariant*>* getSongHistory(const columnMap* const condAND = NULL, |
|
52 const columnMap* const condOR = NULL); |
|
53 |
|
54 private: |
|
55 /* |
|
56 * It is called by IRDB instance; |
|
57 * IRDB instance delivers rows set to IRDBWrapper via this function; |
|
58 * the rows set is storaged in m_IRDataSet; |
|
59 */ |
|
60 bool getIRTableCB(QSqlQuery& aIRDataSet, |
|
61 QList<QVariant*>* pDataSet); |
|
62 |
|
63 }; |
|
64 |
|
65 #endif |