summaryrefslogtreecommitdiff
path: root/distfoldd/serveragent.h
diff options
context:
space:
mode:
Diffstat (limited to 'distfoldd/serveragent.h')
-rw-r--r--distfoldd/serveragent.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/distfoldd/serveragent.h b/distfoldd/serveragent.h
index c692e60..b5fd380 100644
--- a/distfoldd/serveragent.h
+++ b/distfoldd/serveragent.h
@@ -7,17 +7,25 @@ class ServerAgent : public Agent
{
Q_OBJECT
public:
- explicit ServerAgent(QSslSocket *socket, const QDir& local_dir, SyncFlags flags, QObject *parent = 0);
+ explicit ServerAgent(QSslSocket *socket, const QDir& local_dir, const QString& passwd, SyncFlags flags, QObject *parent = 0);
protected:
void handleMessage(MessageType msg, const QByteArray& data);
private:
+ bool checkAuth();
+ void handleAuth(const QByteArray& response);
void handleClientFileList(const RemoteFileInfoList& list);
void handlePullFile(const QString& path);
void handlePushedFile(const QByteArray& data);
void handlePushedMetadata(const RemoteFileInfoList& list);
void handleDeleteFile(const QString& path);
+
+private:
+ QByteArray _challenge;
+ QByteArray _clientChallenge;
+ bool _authAttempted;
+ bool _authOk;
};
#endif // SERVERAGENT_H