Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pagedownloader.h « lang_getter - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8884818c57c2b319672e6cc585ed774a62be4852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once

#include <QObject>
#include <QNetworkAccessManager>


class Logging;
class QUrl;
class QNetworkReply;

class PageDownloader : public QObject
{
  Q_OBJECT

  QNetworkAccessManager m_manager;
  QNetworkReply * m_reply;

  Logging & m_log;

  QByteArray m_res;

public:
  PageDownloader(Logging & log) : m_log(log) {}

  void ConnectFinished(QObject * obj, char const * slot);

  void Download(QUrl const & url);
  void Download(QString const & url);

signals:
  void finished(QString const &);

private slots:
   void httpFinished();
   void httpReadyRead();
   void updateDataReadProgress(qint64 read, qint64 total);
};