Rewrite code for returning information about torrents as JSON (Web UI)

- The new code is simpler, cleaner and more efficient
This commit is contained in:
Christophe Dumez
2012-05-26 20:42:44 +03:00
parent fc4989d738
commit 9a964d871d
19 changed files with 825 additions and 412 deletions

View File

@@ -58,7 +58,7 @@ class HttpServer : public QTcpServer {
Q_DISABLE_COPY(HttpServer)
public:
HttpServer(int msec, QObject* parent = 0);
HttpServer(QObject* parent = 0);
~HttpServer();
void setAuthorization(const QString& username, const QString& password_sha1);
bool isAuthorized(const QByteArray& auth, const QString& method) const;
@@ -80,7 +80,6 @@ private:
void incomingConnection(int socketDescriptor);
private slots:
void onTimer();
void UnbanTimerEvent();
void onLocaleChanged(const QString &locale);
@@ -90,8 +89,7 @@ private:
private:
QByteArray m_username;
QByteArray m_passwordSha1;
EventManager *m_eventManager;
QTimer m_timer;
EventManager *m_eventManager; // TODO: Remove
QHash<QString, int> m_clientFailedAttempts;
bool m_localAuthEnabled;
bool m_needsTranslation;