Changeset 156 for smplayer/trunk/src/youtube/retrieveyoutubeurl.h
- Timestamp:
- Feb 21, 2014, 5:26:03 PM (11 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 154
- Property svn:mergeinfo changed
-
smplayer/trunk/src/youtube/retrieveyoutubeurl.h
r142 r156 20 20 #define _RETRIEVEYOUTUBEURL_ 21 21 22 #include "simplehttp.h" 22 #include <QNetworkAccessManager> 23 #include <QNetworkReply> 23 24 #include <QMap> 24 25 25 class RetrieveYoutubeUrl : public SimpleHttp26 class RetrieveYoutubeUrl : public QObject 26 27 { 27 28 Q_OBJECT … … 36 37 37 38 void fetchPage(const QString & url); 39 void close(); 40 41 void setUserAgent(const QString & s) { user_agent = s; }; 42 QString userAgent() { return user_agent; }; 38 43 39 44 void setPreferredQuality(Quality q) { preferred_quality = q; } … … 52 57 void gotEmptyList(); 53 58 59 void connecting(QString host); 60 void errorOcurred(int error_number, QString error_str); 61 62 void signatureNotFound(const QString & title); 63 54 64 protected slots: 65 void gotResponse(QNetworkReply* reply); 55 66 void parse(QByteArray text); 56 67 57 68 protected: 58 QString sanitizeForUnicodePoint(QString string);59 void htmlDecode(QString& string);69 static QString sanitizeForUnicodePoint(QString string); 70 static void htmlDecode(QString& string); 60 71 61 72 QMap<int, QString> urlMap; … … 65 76 66 77 Quality preferred_quality; 78 QString user_agent; 79 80 private: 81 QNetworkAccessManager* manager; 82 QNetworkReply* reply; 67 83 }; 68 84
Note:
See TracChangeset
for help on using the changeset viewer.