|
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 * Contributors: |
|
13 * |
|
14 * Description: contentinfodb read api. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CONTENTINFODBREAD_H |
|
19 #define CONTENTINFODBREAD_H |
|
20 |
|
21 /** |
|
22 * @file |
|
23 * @ingroup contentinfodb read api's |
|
24 * @brief Contains ContentInfoDbRead used for reading the DB |
|
25 */ |
|
26 |
|
27 #include <qobject.h> |
|
28 |
|
29 #ifdef BUILD_CONTENTINFODB |
|
30 #define DECL_CONTENTINFODB Q_DECL_EXPORT |
|
31 #else |
|
32 #define DECL_CONTENTINFODB Q_DECL_IMPORT |
|
33 #endif |
|
34 |
|
35 class ContentInfoDbReadPrivate; |
|
36 |
|
37 class DECL_CONTENTINFODB ContentInfoDbRead : public QObject |
|
38 { |
|
39 Q_OBJECT |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Constructor. |
|
44 * @since S60 ?S60_version. |
|
45 */ |
|
46 ContentInfoDbRead(); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 * @since S60 ?S60_version. |
|
51 */ |
|
52 ~ContentInfoDbRead(); |
|
53 |
|
54 public: |
|
55 |
|
56 /** |
|
57 * returns primary keys alias category names |
|
58 */ |
|
59 QStringList getPrimaryKeys(); |
|
60 |
|
61 /** |
|
62 * return db value for the mentioned key and fieldname |
|
63 */ |
|
64 QString getValues(QString Key, QString columnname); |
|
65 |
|
66 /** |
|
67 * returns the list of activity uris for the mentioned category |
|
68 */ |
|
69 QStringList getActionuri(QString Key); |
|
70 |
|
71 /** |
|
72 * returns primary activityuri |
|
73 */ |
|
74 QString getShortTaburi(QString Key); |
|
75 |
|
76 /** |
|
77 * returns list of uri's mapped for particular field |
|
78 */ |
|
79 QStringList getLongTaburi(QString Key, QString FieldName); |
|
80 |
|
81 /** |
|
82 * returns the logical name/icon for a particular uri |
|
83 */ |
|
84 bool geturiDetails(QString key, QString uri, QString& iconname, |
|
85 QString& displayname); |
|
86 |
|
87 /** |
|
88 * returns total number of categories available in contentinfoDb |
|
89 */ |
|
90 int categoryCount(); |
|
91 |
|
92 signals: |
|
93 /* |
|
94 * signal to get notificcation when db gets updated |
|
95 */ |
|
96 void dataChanged(); |
|
97 private: |
|
98 ContentInfoDbReadPrivate* const iPvtImpl; |
|
99 Q_DECLARE_PRIVATE_D( iPvtImpl, ContentInfoDbRead ) |
|
100 }; |
|
101 |
|
102 #endif //CONTENTINFODBREAD_H |