aboutsummaryrefslogtreecommitdiff
path: root/lib/streamreader.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-07-17 11:11:31 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-07-17 11:11:31 +0000
commit6eead162266621160c78c0b06b904cc5955c29af (patch)
tree0e3a05f0ac71336b5e57ecbd0988495f6ab8c3bc /lib/streamreader.h
parent45f2ee21a34d1899dd45e76061d77ad96ab63404 (diff)
downloadqmmp-6eead162266621160c78c0b06b904cc5955c29af.tar.gz
qmmp-6eead162266621160c78c0b06b904cc5955c29af.tar.bz2
qmmp-6eead162266621160c78c0b06b904cc5955c29af.zip
added contentType() function for StreamReader class
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@27 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'lib/streamreader.h')
-rw-r--r--lib/streamreader.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/streamreader.h b/lib/streamreader.h
index f8bcc753c..a469932b7 100644
--- a/lib/streamreader.h
+++ b/lib/streamreader.h
@@ -23,9 +23,9 @@
#include <QObject>
#include <QIODevice>
#include <QHttp>
+#include <QUrl>
#define BUFFER_SIZE 524288
-class QUrl;
class QFileInfo;
/**
@@ -39,6 +39,9 @@ public:
~StreamReader();
+ /**
+ * QIODevice API
+ */
bool atEnd () const;
qint64 bytesAvailable () const;
qint64 bytesToWrite () const;
@@ -53,6 +56,11 @@ public:
bool waitForBytesWritten ( int msecs );
bool waitForReadyRead ( int msecs );
+ /**
+ * returns content type of a stream
+ */
+ const QString &contentType();
+
protected:
qint64 readData(char*, qint64);
qint64 writeData(const char*, qint64);
@@ -67,11 +75,13 @@ private slots:
private:
void fillBuffer();
- QString m_name;
- QHttp *http;
- bool httpRequestAborted;
- int httpGetId;
- bool f;
+ QUrl m_url;
+ QHttp* m_http;
+ bool m_httpRequestAborted;
+ int m_httpGetId;
+ int m_pos;
+ int m_size;
+ QString m_contentType;
};
#endif