~ubuntu-branches/debian/stretch/smplayer/stretch

« back to all changes in this revision

Viewing changes to src/findsubtitles/filedownloader/filedownloader.h

  • Committer: Package Import Robot
  • Author(s): Mateusz Łukasik
  • Date: 2014-04-21 11:53:59 UTC
  • mfrom: (1.3.2)
  • Revision ID: package-import@ubuntu.com-20140421115359-oz572avkq20ieqaf
Tags: 14.3.0-1
* Add myself to uploaders.
* New upstream release. (Closes: #740769, #742685)
* debian/control:
  - bump standards version to 3.9.5. (no changes needed)
  - rename smplayer-translations to smplayer-l10n. (Closes: #698365)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
 
2
    Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net>
3
3
 
4
4
    This program is free software; you can redistribute it and/or modify
5
5
    it under the terms of the GNU General Public License as published by
16
16
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
17
*/
18
18
 
19
 
/* Based on the Qt network/http example */
20
 
 
21
 
#ifndef _FILEDOWNLOADER_H_
22
 
#define _FILEDOWNLOADER_H_
 
19
#ifndef FILEDOWNLOADER_H
 
20
#define FILEDOWNLOADER_H
23
21
 
24
22
#include <QProgressDialog>
25
23
#include <QUrl>
26
24
#include <QNetworkProxy>
27
 
 
28
 
class QHttp;
29
 
class QHttpResponseHeader;
 
25
#include <QNetworkAccessManager>
 
26
#include <QNetworkReply>
30
27
 
31
28
class FileDownloader : public QProgressDialog
32
29
{
33
 
    Q_OBJECT
 
30
        Q_OBJECT
34
31
 
35
32
public:
36
33
        FileDownloader(QWidget *parent = 0);
47
44
        void downloadFailed(const QString & reason);
48
45
 
49
46
private slots:
50
 
        void httpRequestFinished(int request_id, bool error);
51
 
        void readResponseHeader(const QHttpResponseHeader &responseHeader);
52
 
        void updateDataReadProgress(int bytes_read, int total_bytes);
 
47
        void gotResponse(QNetworkReply* reply);
 
48
        void updateDataReadProgress(qint64 bytes_read, qint64 total_bytes);
 
49
 
 
50
        /*
 
51
        void reportFileSaved(const QString &, const QString &);
 
52
        void reportSaveFailed(const QString &);
 
53
        void reportError(int error_number, QString error_str);
 
54
        */
53
55
 
54
56
private:
55
 
        QHttp * http;
56
 
        int http_get_id;
57
 
        bool http_request_aborted;
58
 
 
 
57
        QNetworkAccessManager* manager;
 
58
        QNetworkReply* reply;
59
59
};
60
60
 
61
61
#endif