summaryrefslogtreecommitdiff
path: root/src/browserapplication.h
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-01-20 19:03:00 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-01-20 19:03:00 +0100
commit504311e2a45c18e08865269985f00f7f3f3e6e8a (patch)
treef746c8b9a6becec92d023a112b3dc3e8e133cc65 /src/browserapplication.h
parentUpdated TODO && CMakelists.txt (diff)
downloadrekonq-504311e2a45c18e08865269985f00f7f3f3e6e8a.tar.xz
Implemented a new function to download data with KJob technologies..
It's not working. For now. But we are nearing the goal..
Diffstat (limited to 'src/browserapplication.h')
-rw-r--r--src/browserapplication.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/browserapplication.h b/src/browserapplication.h
index 4ec2cca6..7b8b98bc 100644
--- a/src/browserapplication.h
+++ b/src/browserapplication.h
@@ -27,6 +27,9 @@
#include <KCmdLineArgs>
#include <KIcon>
#include <KUrl>
+#include <KJob>
+#include <kio/job.h>
+#include <kio/jobclasses.h>
// Qt Includes
#include <QPointer>
@@ -37,7 +40,6 @@ QT_END_NAMESPACE
class MainWindow;
class CookieJar;
-class DownloadManager;
class HistoryManager;
class NetworkAccessManager;
@@ -49,19 +51,18 @@ public:
BrowserApplication(KCmdLineArgs*, const QString &);
~BrowserApplication();
static BrowserApplication *instance();
-// void loadSettings();
bool isTheOnlyBrowser() const;
MainWindow *mainWindow();
QList<MainWindow*> mainWindows();
KIcon icon(const KUrl &url) const;
+ void downloadUrl(const KUrl &url);
void saveSession();
bool canRestoreSession() const;
static HistoryManager *historyManager();
static CookieJar *cookieJar();
- static DownloadManager *downloadManager();
static NetworkAccessManager *networkAccessManager();
public slots:
@@ -72,18 +73,23 @@ private slots:
void postLaunch();
void openUrl(const KUrl &url);
void newLocalSocketConnection();
+ void slotResult(KJob*);
+ void slotData(KIO::Job*, const QByteArray&);
private:
void clean();
static HistoryManager *s_historyManager;
- static DownloadManager *s_downloadManager;
static NetworkAccessManager *s_networkAccessManager;
QList<QPointer<MainWindow> > m_mainWindows;
QLocalServer *m_localServer;
QByteArray m_lastSession;
mutable KIcon m_defaultIcon;
+
+ // about download
+ KUrl m_downloadUrl;
+ QByteArray m_downloadData;
};
#endif // BROWSERAPPLICATION_H