diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2007-09-18 17:43:25 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2007-09-18 17:43:25 +0000 |
| commit | d80498e562ae70cfe5f0d2400046e6e4db6af260 (patch) | |
| tree | f45e3480c94b6cf1c756b4f35a5c42eead8fabc4 /lib/downloader.h | |
| parent | 41c154d03342aa03cc3932ca032eba387c7a2bff (diff) | |
| download | qmmp-d80498e562ae70cfe5f0d2400046e6e4db6af260.tar.gz qmmp-d80498e562ae70cfe5f0d2400046e6e4db6af260.tar.bz2 qmmp-d80498e562ae70cfe5f0d2400046e6e4db6af260.zip | |
improved stream support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@157 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'lib/downloader.h')
| -rw-r--r-- | lib/downloader.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/downloader.h b/lib/downloader.h index 13be0121e..05175e379 100644 --- a/lib/downloader.h +++ b/lib/downloader.h @@ -27,8 +27,10 @@ #include <curl/curl.h> +#define BUFFER_SIZE 128000 + /** - @author Ilya Kotov <forkotov02@hotmail.ru> + @author Ilya Kotov <forkotov02@hotmail.ru> */ struct Stream @@ -44,7 +46,7 @@ struct Stream class Downloader : public QThread { -Q_OBJECT + Q_OBJECT public: Downloader(QObject *parent, const QString &url); @@ -57,9 +59,12 @@ public: void abort(); int bytesAvailable(); const QString& title() const; + void checkBuffer(); + bool isReady(); signals: - void titleChanged (); + void titleChanged(); + void readyRead(); private: qint64 readBuffer(char* data, qint64 maxlen); @@ -71,6 +76,7 @@ private: QString m_url; int m_metacount; QString m_title; + bool m_ready; protected: void run(); |
