summaryrefslogtreecommitdiff
path: root/src/opensearch/opensearchmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opensearch/opensearchmanager.h')
-rw-r--r--src/opensearch/opensearchmanager.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/opensearch/opensearchmanager.h b/src/opensearch/opensearchmanager.h
index 4f42b4a8..df8e5367 100644
--- a/src/opensearch/opensearchmanager.h
+++ b/src/opensearch/opensearchmanager.h
@@ -39,6 +39,7 @@
// Qt Includes
#include <QtCore/QObject>
+#include <QFile>
// Forward Declarations
class OpenSearchEngine;
@@ -59,7 +60,7 @@ class OpenSearchManager : public QObject
REQ_DESCRIPTION,
IDLE
};
-
+
public:
/**
* Constructor
@@ -76,7 +77,7 @@ public:
*/
bool isSuggestionAvailable();
- void addOpenSearchEngine(const KUrl &url, const QString &title);
+ bool engineExists(const KUrl &url);
public Q_SLOTS:
/**
@@ -85,6 +86,8 @@ public Q_SLOTS:
* @param searchText the text to be queried to the suggestion service
*/
void requestSuggestion(const QString &searchText);
+ void addOpenSearchEngine(const KUrl &url, const QString &title, const QString &shortcut);
+ void removeDeletedEngines();
private Q_SLOTS:
void dataReceived(KIO::Job *job, const QByteArray &data);
@@ -96,18 +99,23 @@ Q_SIGNALS:
private:
QString trimmedEngineName(const QString &engineName) const;
-
+ void loadEngines();
+ void saveEngines();
void idleJob();
-
+
// QString substitutueSearchText(const QString &searchText, const QString &requestURL) const;
QByteArray m_jobData;
- QMap<QString, OpenSearchEngine*> m_enginesMap;
+ QMap<QString, OpenSearchEngine*> m_engineCache;
+ QMap<KUrl, QString> m_engines;
+
OpenSearchEngine *m_activeEngine;
STATE m_state;
-
+
KIO::TransferJob *m_currentJob;
+ KUrl m_jobUrl;
QString _typedText;
+ QString m_shortcut;
};
#endif // OPENSEARCHMANAGER_H