summaryrefslogtreecommitdiff
path: root/distfoldd/serveragent.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-09-17 23:03:03 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-09-17 23:03:03 +0200
commitc3a1946675855b299a2b36550cdf2c2f69d153aa (patch)
treef7adf66404cdc47994225b616bcaf082a07dd168 /distfoldd/serveragent.h
downloaddistfold-c3a1946675855b299a2b36550cdf2c2f69d153aa.tar.gz
distfold-c3a1946675855b299a2b36550cdf2c2f69d153aa.zip
initial import
Diffstat (limited to 'distfoldd/serveragent.h')
-rw-r--r--distfoldd/serveragent.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/distfoldd/serveragent.h b/distfoldd/serveragent.h
new file mode 100644
index 0000000..c692e60
--- /dev/null
+++ b/distfoldd/serveragent.h
@@ -0,0 +1,23 @@
+#ifndef SERVERAGENT_H
+#define SERVERAGENT_H
+
+#include "agent.h"
+
+class ServerAgent : public Agent
+{
+ Q_OBJECT
+public:
+ explicit ServerAgent(QSslSocket *socket, const QDir& local_dir, SyncFlags flags, QObject *parent = 0);
+
+protected:
+ void handleMessage(MessageType msg, const QByteArray& data);
+
+private:
+ 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);
+};
+
+#endif // SERVERAGENT_H