3
|
1 |
/**
|
|
2 |
This file is part of CWRT package **
|
|
3 |
|
|
4 |
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). **
|
|
5 |
|
|
6 |
This program is free software: you can redistribute it and/or modify
|
|
7 |
it under the terms of the GNU (Lesser) General Public License as
|
|
8 |
published by the Free Software Foundation, version 2.1 of the License.
|
|
9 |
This program is distributed in the hope that it will be useful, but
|
|
10 |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12 |
(Lesser) General Public License for more details. You should have
|
|
13 |
received a copy of the GNU (Lesser) General Public License along
|
|
14 |
with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
15 |
*/
|
|
16 |
|
|
17 |
#ifndef CONTENT_AGENT_H
|
|
18 |
#define CONTENT_AGENT_H
|
|
19 |
|
|
20 |
#include <QObject>
|
|
21 |
#include <QMap>
|
|
22 |
|
|
23 |
namespace WRT {
|
|
24 |
|
|
25 |
class ContentAgentPrivate;
|
|
26 |
class BookmarkNode;
|
|
27 |
class HistoryModel;
|
|
28 |
|
|
29 |
|
|
30 |
class ContentAgent : public QObject
|
|
31 |
{
|
|
32 |
Q_OBJECT
|
|
33 |
|
|
34 |
public:
|
|
35 |
ContentAgent(QWidget *parent = 0);
|
|
36 |
~ContentAgent();
|
|
37 |
static ContentAgent* getSingleton();
|
|
38 |
|
|
39 |
public slots:
|
|
40 |
//javascript APIS
|
|
41 |
QString getBookmarks();
|
|
42 |
QMap<QString, QString> getSuggestedBookmarks(QString atitle);
|
|
43 |
QMap<QString, QString> getSuggestedHistory(QString atitle);
|
|
44 |
QObjectList getUISuggestion(QString suggest);
|
|
45 |
|
|
46 |
private:
|
|
47 |
ContentAgentPrivate* const d;
|
|
48 |
// list of URL suggestions from history and bookmarks
|
|
49 |
QObjectList combinedList;
|
|
50 |
};
|
|
51 |
}//wrt
|
|
52 |
|
|
53 |
#endif //CONTENT_AGENT_H
|